Prepare RenderLayer/RenderLayerBacking for RenderSVGModelObject support: Stop relying on renderBox() / downcast<RenderBox>(renderer()) to query layer geometry information, instead introduce helpers that take RenderLayerModelObject instead of RenderBox, to allow querying non-RenderBox derived renderers such as RenderSVGModelObject for geometry information.
Created attachment 451009 [details] Patch, v1
Comment on attachment 451009 [details] Patch, v1 View in context: https://bugs.webkit.org/attachment.cgi?id=451009&action=review > Source/WebCore/rendering/RenderLayerBacking.cpp:-3965 > - return { }; Is this safe? Previously, non RenderBox would bail out. Is there now a chance the ASSERT_NOT_REACHED in rendererBorderBoxRect will be triggered?
(In reply to Rob Buis from comment #2) > Comment on attachment 451009 [details] > Patch, v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=451009&action=review > > > Source/WebCore/rendering/RenderLayerBacking.cpp:-3965 > > - return { }; > > Is this safe? Previously, non RenderBox would bail out. Is there now a > chance the ASSERT_NOT_REACHED in rendererBorderBoxRect will be triggered? It Is. The ASSERT_NOT_REACHED() is mainly to document that there is no missing edge case - verified by debug layout test runs. There are no cases in RenderLayerBacking that had a bail-out, if the renderer type was not RenderBox, it was assumed to be RenderBox (and guaranteed by RenderLayer so far). transformMatrixForProperty() was the only method that had indeed a null check on renderBox() - but I cannot see how a non-RenderBox derived object can come there (only one callosities from within GraphicsLayers -- which are only ever created for RenderBox derived renderers, that create layers).
Committed r289213 (246898@trunk): <https://commits.webkit.org/246898@trunk>
<rdar://problem/88569054>