The sticky positioned element should reset the scroll to an unshifted position by any operation #28098
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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}