Closed Bug 2062782 Opened 2 months ago Closed 2 months ago

Stop claiming support for ::-webkit-scrollbar in @supports conditions, since sites typically use it as a signal that ::-webkit-scrollbar-thumb is supported

Categories

(Core :: Layout: Scrolling and Overflow, defect)

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: dholbert, Assigned: hiro)

References

Details

(Keywords: dev-doc-complete, webcompat:platform-bug, Whiteboard: [tracked-in:FFXP-3766])

User Story

user-impact-score:300

Attachments

(1 external file)

See bug 2057977 comment 3.

Gmail has a scrollbar that auto-hides via some modern CSS that's wrapped in a @supports not (selector(::-webkit-scrollbar)) { guard, so we skip over that modern CSS as long as our pref layout.css.fake-webkit-scrollbar.enabled is enabled (as it is by default).

Then Gmail has some equivalent-ish styles that use both ::-webkit-scrollbar (which we sort of support) and ::-webkit-scrollbar-thumb (which we don't support). Since we don't fully understand those equivalent-ish styles, and we skipped the modern CSS due to failing the @supports check, we end up with a bad outcome.

For reasons stated in bug 2057977 comment 4, I think we should make @supports behave as if ::-webkit-scrollbar is unsupported (semantically considering it to be a check for "do you support ::-webkit-scrollbar as well as ::-webkit-scrollbar-thumb", since that's often what the site is sort-of trying to check. We support one but not the other of those selectors, so we can somewhat reasonably say "no" to a supports check, and "yes" to a "supports not" check.)

Or if there's a better way of reaching a good outcome in bug 2057977, we can morph this bug to be about that.

User Story: (updated)
Whiteboard: [tracked-in:FFXP-3766]

Calin, would you mind trying this try build to see whether there's any side-effects of this bug's change? (here is the direct link to target.zip Windows binary)

I had a quick test on the build locally: bug 2057977 is no longer able to be observed, bug 1973196 is not observed either.

I am not sure what kind of things you guys usually test on a site, so just some quick testing might be sufficient. Thank you!

Flags: needinfo?(ctanase)

Work as expected for both of issues using the provided build. I couldn't find any other issues while testing the website either.

Flags: needinfo?(ctanase)

Sites use selector(::-webkit-scrollbar) as a check for the whole family of
WebKit scrollbar pseudo-elements, and guard their non-WebKit styles behind the
negation of it. We only implement ::-webkit-scrollbar itself, so a site that
takes the WebKit branch on our answer ends up with styles we only partly apply,
which is worse than the non-WebKit branch it would otherwise have taken.

Add a hidden_from_supports key to pseudo_elements.toml for that, and set it on
-webkit-scrollbar. The answer no longer depends on the enabled-domains
allowlist, so the allowlist reftests now probe the pseudo-element through the
scrollbar it hides rather than through @supports.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Attachment #9626571 - Attachment description: WIP: Bug 2062782 - Report ::-webkit-scrollbar as unsupported in @supports conditions. r#firefox-style-system-reviewers → Bug 2062782 - Report ::-webkit-scrollbar as unsupported in @supports conditions. r#firefox-style-system-reviewers
Pushed by hikezoe.birchill@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1d3daf987cd8 https://hg.mozilla.org/integration/autoland/rev/5a21bd152dae Report ::-webkit-scrollbar as unsupported in @supports conditions. r#firefox-style-system-reviewers r=firefox-style-system-reviewers,layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
Keywords: dev-doc-needed
See Also: → 1977511
QA Whiteboard: [qa-triage-done-c157/b156]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: