You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.
@flackr can you help judge if the tests here are sufficient? There are tests for both properties, but it's hard for me to tell if they're missing important things.
It looks like we don't have any tests of the difference between overscroll-behavior: contain and overscroll-behavior: none. There is only a difference on certain platforms - I think Mac, iOS and Android - but we could write tests that pass if there is no observable default scroll overflow behavior on the current platform.
The CSS scroll-behavior tests look sufficient for the CSS property, though I haven't been able to find any that test the JS scrolling APIs with behavior: smooth, e.g. elem.scrollIntoView({behavior: 'smooth'});. There's scrollIntoView-smooth.html however it doesn't seem to have any checks that the scroll is not instant.
A proposed list of tests has been labeled with interop-2022-scrolling. It would be great if someone from each browser engine team can look over this list and comment if there are any issues.
The proposed list is a good start, though we should work on adding support for the areas I mentioned above:
The difference between overscroll-behavior: contain and overscroll-behavior: none on root and non-root scrollers. E.g. see crbug.com/1256902.
Consider whether we can test that scrollIntoView-smooth.html is smooth reliably? E.g. maybe keep scrolling between 2 points until we observe a scroll that is somewhere in between.
A bunch of scrolling tests came up in my analysis in #48. It spans this issue and #14, but I'll past the whole comment since the root cause seems shared across the two in one case:
There are 3 tests that use new test_driver.Actions().scroll(...) and either ERROR or TIMEOUT in Firefox/Safari:
/css/css-scroll-snap/input/keyboard.html is TIMEOUT in Firefox and Safari, but the first test runs and fails in Firefox. I don't think this is due to a missing testdriver.js API, but it needs investigation.
I wrote the initial tests in /css/cssom-view/scroll-behavior-smooth.html, but tests using fragment navigation and history.back() was added later and they time out because the history behavior is different in Chrome than in Firefox. Seem like a history entry is not added for Chrome and history.back() in that test will navigate out of the test page resulting in a time out.
@lilles this raises the question of whether scroll-behavior-smooth-navigation.html should be included in Interop 2022. @flackr can you have a look at this test and give advice?
Activity
[-]Scroll-behavior[/-][+]Scroll-behavior & overscroll-behavior[/+]gsnedders commentedon Nov 18, 2021
https://wpt.fyi/results/css/cssom-view?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&q=scroll-behavior
foolip commentedon Nov 23, 2021
@flackr can you help judge if the tests here are sufficient? There are tests for both properties, but it's hard for me to tell if they're missing important things.
flackr commentedon Nov 25, 2021
It looks like we don't have any tests of the difference between
overscroll-behavior: containandoverscroll-behavior: none. There is only a difference on certain platforms - I think Mac, iOS and Android - but we could write tests that pass if there is no observable default scroll overflow behavior on the current platform.The CSS scroll-behavior tests look sufficient for the CSS property, though I haven't been able to find any that test the JS scrolling APIs with
behavior: smooth, e.g.elem.scrollIntoView({behavior: 'smooth'});. There's scrollIntoView-smooth.html however it doesn't seem to have any checks that the scroll is not instant.foolip commentedon Jan 10, 2022
A proposed list of tests has been labeled with
interop-2022-scrolling. It would be great if someone from each browser engine team can look over this list and comment if there are any issues.flackr commentedon Jan 18, 2022
The proposed list is a good start, though we should work on adding support for the areas I mentioned above:
overscroll-behavior: containandoverscroll-behavior: noneon root and non-root scrollers. E.g. see crbug.com/1256902.foolip commentedon Jan 20, 2022
A bunch of scrolling tests came up in my analysis in #48. It spans this issue and #14, but I'll past the whole comment since the root cause seems shared across the two in one case:
lilles commentedon Jan 21, 2022
I wrote the initial tests in /css/cssom-view/scroll-behavior-smooth.html, but tests using fragment navigation and history.back() was added later and they time out because the history behavior is different in Chrome than in Firefox. Seem like a history entry is not added for Chrome and history.back() in that test will navigate out of the test page resulting in a time out.
I split out the navigation tests into a separate scroll-behavior-smooth-navigation.html here: https://chromium-review.googlesource.com/c/chromium/src/+/3403031 and reported an issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=1289222
foolip commentedon Jan 21, 2022
@lilles this raises the question of whether scroll-behavior-smooth-navigation.html should be included in Interop 2022. @flackr can you have a look at this test and give advice?