Bug 134168

Summary: Make offset from ancestor computation explicit by moving it to the callers.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 134156    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2014-06-21 19:15:20 PDT
Instead of passing the offset by pointer and call compute when the offset is null.
Comment 1 zalan 2014-06-21 20:44:07 PDT
Created attachment 233555 [details]
Patch

It has source dependency on bug 134156, won't compile as it is.
Comment 2 zalan 2014-06-21 20:50:24 PDT
Created attachment 233556 [details]
Patch
Comment 3 Simon Fraser (smfr) 2014-06-22 11:18:53 PDT
Comment on attachment 233556 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233556&action=review

> Source/WebCore/rendering/RenderLayer.cpp:3581
> +    LayoutRect boundingBox = layer->boundingBox(rootLayer, layer->offsetFromAncestor(rootLayer));

I think it would be cleaner for boundingBox to always return a local box (so remove the parameter), and for the caller to offset the result.

> Source/WebCore/rendering/RenderLayer.cpp:5382
> +    calculateRects(clipRectsContext, renderer().view().documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect, offsetFromAncestor(clipRectsContext.rootLayer));

Should check to see if any callers have already computed offsetFromAncestor.
Comment 4 zalan 2014-06-22 19:36:44 PDT
Created attachment 233582 [details]
Patch
Comment 5 zalan 2014-06-22 19:36:59 PDT
Comment on attachment 233582 [details]
Patch

EWSing
Comment 6 WebKit Commit Bot 2014-06-22 21:28:43 PDT
Comment on attachment 233582 [details]
Patch

Clearing flags on attachment: 233582

Committed r170282: <http://trac.webkit.org/changeset/170282>
Comment 7 WebKit Commit Bot 2014-06-22 21:28:47 PDT
All reviewed patches have been landed.  Closing bug.