Bug 236186

Summary: [LBSE] Generalize RenderLayer::renderBoxLocation(), adding support for SVG layers
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, kondapallykalyan, pdr, rbuis, ryuan.choi, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 90738, 236192, 236194    
Attachments:
Description Flags
Patch, v1
none
Patch, v2 rbuis: review+

Description Nikolas Zimmermann 2022-02-05 16:24:29 PST
Prepare RenderLayer/RenderLayerBacking for RenderSVGModelObject support:

Rename renderBoxLocation() -> rendererLocation() and extended it to support RenderSVGModelObject.
Comment 1 Nikolas Zimmermann 2022-02-05 16:33:13 PST
Created attachment 451011 [details]
Patch, v1
Comment 2 Nikolas Zimmermann 2022-02-06 02:33:08 PST
Created attachment 451028 [details]
Patch, v2
Comment 3 Nikolas Zimmermann 2022-02-06 02:35:49 PST
Forgot to include the Headers.cmake changes necessary to copy some new SVG headers to PrivateHeaders - patch v1 already included the necessary Xcode project changes, v2 also the CMake related changes.
Comment 4 Rob Buis 2022-02-07 03:27:02 PST
Comment on attachment 451028 [details]
Patch, v2

View in context: https://bugs.webkit.org/attachment.cgi?id=451028&action=review

> Source/WebCore/Headers.cmake:1917
> +    rendering/svg/SVGRenderSupport.h

Why is this needed exactly?
Comment 5 Nikolas Zimmermann 2022-02-07 03:30:43 PST
(In reply to Rob Buis from comment #4)
> Comment on attachment 451028 [details]
> Patch, v2
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=451028&action=review
> 
> > Source/WebCore/Headers.cmake:1917
> > +    rendering/svg/SVGRenderSupport.h
> 
> Why is this needed exactly?

rendererLocation() is inlined in RenderLayer.h, and therefore RenderLayer.h needs to include RenderBox.h. To generalize this to additionally support RenderSVGModelObject, RenderLayer.h needs to include RenderSVGModelObject.h to be able to perform the is<...>/downcast<...> type system.

RenderLayer.h is utilized by projects outside of WebCore utilizing the WebCore PrivateHeaders/. Therefore RenderSVGModelObject.h and all its included need to be marked as 'private headers' in both the Xcode and CMake project files.
Comment 6 Nikolas Zimmermann 2022-02-07 05:53:53 PST
Committed r289210 (246895@trunk): <https://commits.webkit.org/246895@trunk>
Comment 7 Radar WebKit Bug Importer 2022-02-07 05:54:19 PST
<rdar://problem/88568285>