RESOLVED FIXED 236184
[LBSE] Introduce RenderSVGModelObject aware geometry accessors in RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=236184
Summary [LBSE] Introduce RenderSVGModelObject aware geometry accessors in RenderLayer...
Nikolas Zimmermann
Reported 2022-02-05 16:14:11 PST
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.
Attachments
Patch, v1 (10.21 KB, patch)
2022-02-05 16:17 PST, Nikolas Zimmermann
rbuis: review+
Nikolas Zimmermann
Comment 1 2022-02-05 16:17:27 PST
Created attachment 451009 [details] Patch, v1
Rob Buis
Comment 2 2022-02-07 04:04:17 PST
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?
Nikolas Zimmermann
Comment 3 2022-02-07 04:59:11 PST
(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).
Nikolas Zimmermann
Comment 4 2022-02-07 06:23:59 PST
Radar WebKit Bug Importer
Comment 5 2022-02-07 06:24:20 PST
Note You need to log in before you can comment on or make changes to this bug.