[webkit-reviews] review granted: [Bug 134168] Make offset from ancestor computation explicit by moving it to the callers. : [Attachment 233556] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 22 11:18:32 PDT 2014


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Zalan Bujtas
<zalan at apple.com>'s request for review:
Bug 134168: Make offset from ancestor computation explicit by moving it to the
callers.
https://bugs.webkit.org/show_bug.cgi?id=134168

Attachment 233556: Patch
https://bugs.webkit.org/attachment.cgi?id=233556&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
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.


More information about the webkit-reviews mailing list