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

The sticky positioned element should reset the scroll to an unshifted position by any operation #28098

Merged
merged 1 commit into from May 4, 2021

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 16, 2021

When the sticky element takes the operation, it keeps the sticky offset to move its position.

However, According to the specification [1], the scroll position should be reset by any operation to that element.

Therefore, pass kIgnoreStickyOffset to AbsoluteToLocalRect() for removing sticky-position offset which is 'unshifted-position'.

[1] https://www.w3.org/TR/css-position-3/#stickypos-scroll

Bug: 664246, 1178622
Change-Id: I7b9e42d1274894a0f3282316a2eb69d0d10c5530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727895
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Seokho Song <0xdevssh@gmail.com>
Cr-Commit-Position: refs/heads/master@{#878763}

Copy link
Collaborator

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should block scroll The sticky positioned input element in the scrollable should skip the area Mar 16, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch from af077b4 to 27c8bda Mar 16, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch from 27c8bda to 67933fe Mar 26, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should skip the area The sticky positioned input element in the scrollable should ignore the scroll-padding Mar 26, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch from 67933fe to 6843d8f Mar 26, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 2 times, most recently from ed9cce3 to 0950d2b Apr 19, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 2 times, most recently from 45eac9f to ebd8009 Apr 23, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should ignore the scroll-padding The sticky positioned element should reset the scroll to an unshifted position by any operation Apr 23, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 5 times, most recently from 7e0d5e1 to c952b8f Apr 29, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch from c952b8f to a64c109 May 1, 2021
… position by any operation

When the sticky element takes the operation, it keeps the sticky offset to move its position.

However, According to the specification [1], the scroll position should be reset by any operation to that element.

Therefore, pass kIgnoreStickyOffset to AbsoluteToLocalRect() for removing sticky-position offset which is 'unshifted-position'.

[1] https://www.w3.org/TR/css-position-3/#stickypos-scroll

Bug: 664246, 1178622
Change-Id: I7b9e42d1274894a0f3282316a2eb69d0d10c5530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727895
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Seokho Song <0xdevssh@gmail.com>
Cr-Commit-Position: refs/heads/master@{#878763}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch from a64c109 to ab4bda8 May 4, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 1b31053 into master May 4, 2021
22 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-2727895 branch May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants