Bug 264889

Summary: [LBSE] Root 'opacity' should be extended to 'RenderSVGRoot'
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-11-15 11:20:17 PST
Hi Team,

While trying to look into some opacity related test case from bug 116856 link below, I noticed that the zooming out cause issue in Minibrowser when LBSE is turned on on test case.

Test Case: https://bug-116856-attachments.webkit.org/attachment.cgi?id=203029

^ Zooming out using LBSE cause the blocks to have 'black' overlap areas.

WebKit Source: https://searchfox.org/wubkat/rev/7753b1fdea4b4605b4851dec61966b8b7247302a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp#99

Current:

float opacity = (renderer.isLegacyRenderSVGRoot() || isRenderingMask) ? 1 : style.opacity();

to

float opacity = (renderer.isRenderOrLegacyRenderSVGRoot() || isRenderingMask) ? 1 : style.opacity();

^ this fixes the issue for me on local build.

Thanks!
Comment 1 Ahmad Saleem 2023-11-16 06:42:51 PST
PR: https://github.com/WebKit/WebKit/pull/20552
Comment 2 Ahmad Saleem 2023-11-16 08:27:25 PST
JSFiddle: https://jsfiddle.net/sad7z94e/2/

Potential Expected file: https://jsfiddle.net/vf4zctbr/

Although I have no idea whether I have to make it 'LBSE' specific or just keep it for all.
Comment 3 Radar WebKit Bug Importer 2023-11-22 11:21:14 PST
<rdar://problem/118724556>
Comment 4 Ahmad Saleem 2024-01-03 15:13:40 PST
Seems to be now fixed with WebKit ToT using test case from Comment 0 and zooming-out.