Bug 236184 - [LBSE] Introduce RenderSVGModelObject aware geometry accessors in RenderLayerBacking
Summary: [LBSE] Introduce RenderSVGModelObject aware geometry accessors in RenderLayer...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords: InRadar
Depends on:
Blocks: 90738 236194
  Show dependency treegraph
 
Reported: 2022-02-05 16:14 PST by Nikolas Zimmermann
Modified: 2022-02-07 06:24 PST (History)
12 users (show)

See Also:


Attachments
Patch, v1 (10.21 KB, patch)
2022-02-05 16:17 PST, Nikolas Zimmermann
rbuis: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 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.
Comment 1 Nikolas Zimmermann 2022-02-05 16:17:27 PST
Created attachment 451009 [details]
Patch, v1
Comment 2 Rob Buis 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?
Comment 3 Nikolas Zimmermann 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).
Comment 4 Nikolas Zimmermann 2022-02-07 06:23:59 PST
Committed r289213 (246898@trunk): <https://commits.webkit.org/246898@trunk>
Comment 5 Radar WebKit Bug Importer 2022-02-07 06:24:20 PST
<rdar://problem/88569054>