Bug 134092

Summary: Introduce RenderLayer::offsetFromAncestorLayer() to make convertToLayerCoords() calls with LayoutPoint(0, 0) as parameter more explicit.
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   
Attachments:
Description Flags
Patch simon.fraser: review+

zalan
Reported 2014-06-19 22:59:08 PDT
Most of the RenderLayer::convertToLayerCoords() callers are just interested in getting the offset from the ancestor layer. Introducing offsetFromAncestorLayer() makes those calls more explicit/self-explanatory -> callsite's code can be simplified.
Attachments
Patch (32.07 KB, patch)
2014-06-19 23:04 PDT, zalan
simon.fraser: review+
zalan
Comment 1 2014-06-19 23:04:36 PDT
Simon Fraser (smfr)
Comment 2 2014-06-20 08:34:18 PDT
Comment on attachment 233407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=233407&action=review > Source/WebCore/rendering/RenderGeometryMap.cpp:-190 > -// fprintf(stderr, "RenderGeometryMap::pushMappingsToAncestor from layer %p to layer %p, canConvertInLayerTree=%d\n", layer, ancestorLayer, canConvertInLayerTree); Lots of commented printfs in this patch. > Source/WebCore/rendering/RenderLayer.cpp:2026 > +LayoutPoint RenderLayer::offsetFromAncestorLayer(const RenderLayer* ancestorLayer) const I think you could call this offsetFromAncestor. Would it make sense to return a LayoutSize?
zalan
Comment 3 2014-06-20 08:36:41 PDT
(In reply to comment #2) > (From update of attachment 233407 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=233407&action=review > > > Source/WebCore/rendering/RenderGeometryMap.cpp:-190 > > -// fprintf(stderr, "RenderGeometryMap::pushMappingsToAncestor from layer %p to layer %p, canConvertInLayerTree=%d\n", layer, ancestorLayer, canConvertInLayerTree); > > Lots of commented printfs in this patch. You want me to keep them in? :) > > > Source/WebCore/rendering/RenderLayer.cpp:2026 > > +LayoutPoint RenderLayer::offsetFromAncestorLayer(const RenderLayer* ancestorLayer) const > > I think you could call this offsetFromAncestor. Would it make sense to return a LayoutSize? Indeed!
zalan
Comment 4 2014-06-20 15:58:06 PDT
Note You need to log in before you can comment on or make changes to this bug.