Skip to content
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

Update wpt scroll-to-visible-areas tests #19007

Merged
merged 1 commit into from Sep 13, 2019

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Sep 11, 2019

The original tests were based on an inaccurate understanding of
"visibility" for a snap area, where a snap area was considered to be
visible if it is in the viewport at the scroll location before the
snap. The definition of visibility per the specification is that a snap
area is visible if it would be in the viewport at its snap point.

See:
w3c/csswg-drafts#2526 (comment)

Also added tests for the consideration of scroll-margin when
calculating visibility as well.

Bug: 954851
Change-Id: Ic2ffef8d02fc5ea2439054b6ea5185bb66622d1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795308
Commit-Queue: Kaan Alsan <alsan@google.com>
Reviewed-by: Yi Gu <yigu@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696435}

Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1795308 branch 3 times, most recently from f1d6500 to fb9ff8c Sep 12, 2019
The original tests were based on an inaccurate understanding of
"visibility" for a snap area, where a snap area was considered to be
visible if it is in the viewport at the scroll location before the
snap. The definition of visibility per the specification is that a snap
area is visible if it would be in the viewport at its snap point.

See:
w3c/csswg-drafts#2526 (comment)

Also added tests for the consideration of scroll-margin when
calculating visibility as well.

Bug: 954851
Change-Id: Ic2ffef8d02fc5ea2439054b6ea5185bb66622d1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795308
Commit-Queue: Kaan Alsan <alsan@google.com>
Reviewed-by: Yi Gu <yigu@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696435}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1795308 branch from fb9ff8c to 5071831 Sep 13, 2019
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 224ecb2 into master Sep 13, 2019
14 checks passed
14 checks passed
update-pr-preview
Details
Azure Pipelines Build #20190913.77 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Taskcluster (pull_request) TaskGroup: success
Details
staging.wpt.fyi - chrome[experimental] Chrome results
Details
staging.wpt.fyi - firefox[experimental] Firefox results
Details
staging.wpt.fyi - safari[experimental] Safari results
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-1795308 branch Sep 13, 2019
@majido

This comment has been minimized.

Copy link
Member

majido commented Sep 13, 2019

@hiikezoe FYI, in this PR we have updated some of the scroll-margin tests as it related to snapping and I believe we have discovered a bug in Firefox implementation. Here is some more details:

Note: 'snap-to-visible-areas-both.html' fails on Firefox. When using scrollTo() and there are no snap areas in the viewport at the scrolled to position (before snap) it does not snap to any points. When using scrollbar/wheel it snaps to a position combining the x-axis of the left-top area and the y-axis of the right-bottom area, which snaps to a position where there is no snap area in the viewport.

@hiikezoe

This comment has been minimized.

Copy link
Contributor

hiikezoe commented Sep 17, 2019

Thank you, @majido! That's an interesting test case. Indeed the current Firefox implementation is broken in such cases. (We probably need to drop the old scroll snap implementation completely before fixing this issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.