Skip to content

Conversation

@fantasai
Copy link
Contributor

@fantasai fantasai commented Dec 6, 2017

No description provided.

@fantasai fantasai requested a review from tabatkins December 6, 2017 01:17
@wpt-pr-bot
Copy link
Collaborator

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!

@ghost
Copy link

ghost commented Dec 6, 2017

Build PASSED

Started: 2017-12-07 01:46:30
Finished: 2017-12-07 01:55:50

View more information about this build on:

Copy link
Contributor

@frivoal frivoal left a 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.

@frivoal
Copy link
Contributor

frivoal commented Dec 11, 2017

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).

@frivoal frivoal added the wg-css label Apr 30, 2018
@frivoal
Copy link
Contributor

frivoal commented Jun 19, 2018

@fantasai ping: feedback provided. Please either update the PR or tell me why I'm wrong.

@frivoal frivoal closed this Jun 19, 2018
@frivoal frivoal reopened this Jun 19, 2018
@frivoal
Copy link
Contributor

frivoal commented Jun 19, 2018

(closed accidentally. Reopening)

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

@fantasai fantasai force-pushed the scroll-snap-tests branch from 386382e to 6d06d08 Compare March 14, 2019 00:09
@hiikezoe
Copy link
Contributor

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

.container { scroll-padding: .5em 0 0; } #target { scroll-margin: .5em 0 0; }

should be

#target { scroll-margin: 1em 0 0; }
in some tests (I did confirm on chrome too). Or both Chrome and I are misunderstanding the spec.

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.

@hiikezoe
Copy link
Contributor

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

.container { scroll-padding: .5em 0 0; } #target { scroll-margin: .5em 0 0; }

should be

#target { scroll-margin: 1em 0 0; }
in some tests (I did confirm on chrome too). Or both Chrome and I are misunderstanding the spec.

Oh, no. This was totally my misunderstanding. Why Chrome doesn't work as expected? I have no idea yet.

@hiikezoe
Copy link
Contributor

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].

@hiikezoe
Copy link
Contributor

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.

@fantasai fantasai force-pushed the scroll-snap-tests branch from 6d06d08 to 05fc3d6 Compare March 15, 2019 02:48
@fantasai
Copy link
Contributor Author

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.

Added scrollbar-width: none. If Chrome doesn't support it, that's OK, unless it's causing fuzziness also on Chrome, right?

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.

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.

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.

Not sure what you mean. The iframe is 80px (4em) tall, and the content height is definitely taller than that.

Copy link
Contributor

@frivoal frivoal left a 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.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 11, 2019
…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
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Apr 11, 2019
…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
@gsnedders gsnedders merged commit ba85e61 into web-platform-tests:master Apr 29, 2019
@gsnedders gsnedders deleted the scroll-snap-tests branch April 29, 2019 12:09
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…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
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this pull request May 1, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants