Bug 250283

Summary: RenderLayer::setHasVisibleContent shouldn't call dirtyZOrderLists()
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: CompositingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-01-07 16:17:05 PST
Hi Team,

I came across this clean-up patch from Blink and we still have this code, although I know Blink compositing is not same as WebKit but still good to ask for an opportunity to do code clean-up.

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/3ae6522cf95a377050d18a8d8cc11c7db4ccf2b3

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderLayer.cpp#1522

Unfortunately, it does not have any bug or testcase to confirm that it is dead code but just wanted to ask here, if it is something we can drop.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-01-14 16:18:17 PST
<rdar://problem/104267662>
Comment 2 Ahmad Saleem 2023-01-16 08:27:24 PST
PR - https://github.com/WebKit/WebKit/pull/8695

Let's try on EWS..
Comment 3 Ahmad Saleem 2023-01-16 13:31:19 PST
Based on PR - (In reply to Ahmad Saleem from comment #2)
> PR - https://github.com/WebKit/WebKit/pull/8695
> 
> Let's try on EWS..

Simon replied that this is something still required in WebKit legacy:

'''

I think we may still need this code in WebKitLegacy. RenderLayer::collectLayers() only collects visibility:hidden layers if includeHiddenLayers is true, and that's only true when compositing is enabled. In WebKitLegacy, we enter compositing mode dynamically.

'''

So I am closing my PR for time being but we can explore it in future when we don't support WebKit Legacy. It passes all tests right now even Mac-wk1 as well but it might have potential to introduce future regressions.