Skip to content

Do not allow for forcing classic scrollbars#1087

Open
sadym-chromium wants to merge 1 commit into
mainfrom
sadym/emulation.setScrollbarTypeOverride
Open

Do not allow for forcing classic scrollbars#1087
sadym-chromium wants to merge 1 commit into
mainfrom
sadym/emulation.setScrollbarTypeOverride

Conversation

@sadym-chromium
Copy link
Copy Markdown
Contributor

@sadym-chromium sadym-chromium commented Feb 26, 2026

In some cases it is non-trivial and meaningless to try to emulate classic scrollbar. E.g. on mobile device, while forcing overlay scrollbar instead of the classic one is very common use-case. This PR restricts the emulation to only force using overlay scrollbars.


Preview | Diff

Comment thread index.bs
@sadym-chromium sadym-chromium changed the title editorial: do not allow for forcing classic scrollbars Do not allow for forcing classic scrollbars Feb 26, 2026
Copy link
Copy Markdown
Member

@gsnedders gsnedders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So on macOS, where overlay scrollbars are (more-or-less) the default, we now have emulation.SetScrollbarTypeOverrideParameters.scrollbarType with the values: "default" (overlay), "overlay", or null (the default, so overlay).

This fundamentally does not work for WPT where large numbers of tests rely on classic scrollbars.

This is far from the only case with emulation where we're going to run into "the endpoint node doesn't support this", and in almost every case we should just be returning an error where it isn't supported.

Endpoints which only support "overlay" scrollbars should return an error when you try and set it; endpoints which only support "classic" scrollbars should return an error when you try and set it.

@sadym-chromium
Copy link
Copy Markdown
Contributor Author

So on macOS, where overlay scrollbars are (more-or-less) the default, we now have emulation.SetScrollbarTypeOverrideParameters.scrollbarType with the values: "default" (overlay), "overlay", or null (the default, so overlay).

This fundamentally does not work for WPT where large numbers of tests rely on classic scrollbars.

This is far from the only case with emulation where we're going to run into "the endpoint node doesn't support this", and in almost every case we should just be returning an error where it isn't supported.

Endpoints which only support "overlay" scrollbars should return an error when you try and set it; endpoints which only support "classic" scrollbars should return an error when you try and set it.

Hi @gsnedders! Thanks for your comment. I see the motivation, but I'm not sure if I understood your proposal. Which of the following options seems reasonable for you?

  1. (current) classic / overlay / null
  2. default / overlay / null
  3. default / classic / overlay / null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants