WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
276107
Do not create scrollbar layers (i.e., scrollbar corner) if the subtree is invisible
https://bugs.webkit.org/show_bug.cgi?id=276107
Summary
Do not create scrollbar layers (i.e., scrollbar corner) if the subtree is inv...
Ahmad Saleem
Reported
2024-07-01 19:42:32 PDT
Hi Team, While going through Blink's commit, I came across another failing test case: Test Case:
https://jsfiddle.net/d8v0aocs/
^ Shows 'scrollbar corner' while it shouldn't. Blink Commit:
https://chromium.googlesource.com/chromium/blink/+/5d8a13843d41c418d040d3e1c16d37593c091628
WebKit Source:
https://searchfox.org/wubkat/rev/00b3d6a56f5149245b9e1501389ae169846ec240/Source/WebCore/rendering/RenderLayerBacking.cpp#2328
Following fixes it: // If the subtree is invisible, we don't actually need scrollbar layers. bool invisible = m_owningLayer.subtreeIsInvisible(); needsHorizontalScrollbarLayer &= !invisible; needsVerticalScrollbarLayer &= !invisible; needsScrollCornerLayer &= !invisible; where 'subtreeIsInvisible' is following in RenderLayer.cpp / RenderLayer.h: bool subtreeIsInvisible() const { return !hasVisibleContent() && !hasVisibleDescendant(); } We can also update all call sites in RenderLayer.cpp where this function is used. Thanks!
Attachments
Pre-patch (Scroll Corner) in WebKit
(219.44 KB, image/png)
2024-07-08 06:33 PDT
,
Ahmad Saleem
no flags
Details
Post-patch WebKit (no Scroll corner)
(344.20 KB, image/png)
2024-07-08 06:33 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2024-07-08 06:33:28 PDT
Created
attachment 471841
[details]
Pre-patch (Scroll Corner) in WebKit From screenshot, we get 'scroll corner', while it is not the case in other browsers (Chrome Canary 128 and Firefox Nightly 129). After patch, we also don't get it (will attach another screenshot).
Ahmad Saleem
Comment 2
2024-07-08 06:33:54 PDT
Created
attachment 471842
[details]
Post-patch WebKit (no Scroll corner)
Radar WebKit Bug Importer
Comment 3
2024-07-08 19:43:43 PDT
<
rdar://problem/131351554
>
Ahmad Saleem
Comment 4
2024-09-08 15:09:12 PDT
PR (Closed) -
https://github.com/WebKit/WebKit/pull/30569
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug