Closed
Bug 2057921
Opened 22 days ago
Closed 20 days ago
Consider not disabling overlay scrollbars on the top level root scroll container on mobile even if there's non-zero width/hight ::-webkit-scrollbar styles
Categories
(Core :: Layout: Scrolling and Overflow, enhancement, P2)
Core
Layout: Scrolling and Overflow
Tracking
()
RESOLVED
FIXED
155 Branch
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Looks like that's what Chrome does.
VisualViewport& viewport = frame->GetPage()->GetVisualViewport();
if (!settings->GetAllowCustomScrollbarInMainFrame() &&
frame->IsMainFrame() && viewport.IsActiveViewport()) {
return layout_box;
}
IIUC, layout_box is not the one used for resolving ::-webkit-scrollbar styles, rather it's for scrollbar-color etc.
In fact below the above code there's:
// If the <body> didn't have a custom style, then the root element might.
Element* doc_element = doc.documentElement();
if (doc_element && doc_element->GetLayoutObject() &&
doc_element->GetLayoutObject()->StyleRef().HasCustomScrollbarStyle(
doc_element) &&
!layout_box.StyleRef().UsesStandardScrollbarStyle()) {
return *doc_element->GetLayoutObject();
}
doc_element->GetLayoutObject() is the one.
Anyway, an important thing is GetAllowCustomScrollbarInMainFrame returns false on Android, the flag is forcibly set to false:
#if BUILDFLAG(IS_ANDROID)
settings->SetAllowCustomScrollbarInMainFrame(false);
| Assignee | ||
Updated•22 days ago
|
Severity: -- → S3
Priority: -- → P2
| Assignee | ||
Comment 1•22 days ago
|
||
Updated•22 days ago
|
Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Pushed by hikezoe.birchill@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/0f4e0830528e
https://hg.mozilla.org/integration/autoland/rev/dd86d8376718
Stop disabling overlay scrollbars on the root scroll container on mobile even with a ::-webkit-scrollbar style. r=layout-reviewers,emilio
Pushed by pstanciu@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/ab3bfd4d1a4e
https://hg.mozilla.org/integration/autoland/rev/027e6efbe932
Revert "Bug 2057921 - Stop disabling overlay scrollbars on the root scroll container on mobile even with a ::-webkit-scrollbar style. r=layout-reviewers,emilio" for causing reftest failures @ webkit-scrollbar-on-root-on-mobile.html
Backed out for causing reftest failures @ webkit-scrollbar-on-root-on-mobile.html
Flags: needinfo?(hikezoe.birchill)
| Assignee | ||
Comment 5•21 days ago
|
||
Filed bug 2058388. For some reasons with reftest.use-draw-snapshot=true the root scrollbars are not rendered at all.
Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/2bcc5c1a352d
https://hg.mozilla.org/integration/autoland/rev/3a0ed263e80d
Stop disabling overlay scrollbars on the root scroll container on mobile even with a ::-webkit-scrollbar style. r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 20 days ago
status-firefox155:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•