-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[css-scroll-snap] Add tests for scroll-into-view operations. #8575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-scroll-snap] Add tests for scroll-into-view operations. #8575
Conversation
|
There are no owners for this pull request. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
Build PASSEDStarted: 2017-12-07 01:46:30 View more information about this build on: |
b8ae8a4 to
c126441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tests, but with some bugs and typos to be fixed before merging.
Also included some (non mandatory) suggestions about improving them.
|
I forgot to say in the review, but I think you should also have one test in the scroll-target-padding series that tests if the scroll padding correctly affects the scroll position when the caret moves, as it too is one of the things that must stay in the optimal viewing region (upgraded from a should, with the rest of that section). |
|
@fantasai ping: feedback provided. Please either update the PR or tell me why I'm wrong. |
|
(closed accidentally. Reopening) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
386382e to
6d06d08
Compare
|
Hey, @fantasai , those are actually pretty neat test cases, but I think some of test cases which specify both of scroll-margin and scroll-padding should only specify scroll-margin only. Because the scroll-padding doesn't affect the target position if the target element is positioned far from the scrollport edge. So I believe
should be
Also using overflow:hidden instead of overflow:auto would be nice, the scrollbar is not necessary for those test cases I believe. Showing scrollbars might cause some rendering fuzziness on Gecko, see https://bugzilla.mozilla.org/show_bug.cgi?id=1524031 for example. If Chrome supports scrollbar-width, we could of course use it. |
Oh, no. This was totally my misunderstanding. Why Chrome doesn't work as expected? I have no idea yet. |
|
Nvm about my previous comments. I was just looking at scroll-target-align-00x.html test cases, scroll-target-padding-002.html works as expected. As for scroll-padding-003.html might not work as expected, since it uses Element.focus() and the relevant spec says (block flow direction position set to a UA-defined value)[https://html.spec.whatwg.org/multipage/interaction.html#focus-management-apis:scroll-an-element-into-view]. |
|
Ok, now I understand the reason why XX-001.html doesn't work as expected. The content height in the iframe is large enough not to scroll. I don't know there is a spec definition for this behavior. So we need overflow: auto (overflow: hidden) in iframe. |
6d06d08 to
05fc3d6
Compare
Added scrollbar-width: none. If Chrome doesn't support it, that's OK, unless it's causing fuzziness also on Chrome, right?
And the scroll-snap spec says scrolling an element into view should put its scroll snap area within the snapport. That test constrains the size of the snapport to exactly match the scroll snap area, so the UA has no discretion: there is only one position that fits the constraints.
Not sure what you mean. The iframe is 80px (4em) tall, and the content height is definitely taller than that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for the fixes and for your patience.
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915 --HG-- extra : moz-landing-system : lando
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915 UltraBlame original commit: c5898e18dedf71cc3189151d053874d3235886e5
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915 UltraBlame original commit: c5898e18dedf71cc3189151d053874d3235886e5
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915 UltraBlame original commit: c5898e18dedf71cc3189151d053874d3235886e5
…ding into the position where we scroll to on Element.focus() call. r=masayuki,botond We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. web-platform-tests/wpt#8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915
No description provided.