[scroll-marker] Adhere more closely to active marker selection algo #52305
+113
−0
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.
In the linked bug, we select a scroll marker while its target element
is not even within the scrollport.
This patch addresses this by adhering more closely to the spec'd
algorithm[1] which addresses this situation by stipulating that a
scroll target whose scroll position has not yet been reached should
only be selected if it is within half a scroll port of the current
scroll position.
We have clarified that although the algorithm[1] is not presented as
normative at the moment, the intention is to make it normative at some
point in the future.
[1] https://drafts.csswg.org/css-overflow-5/#example-d2ca6884
Bug: 413645441
Change-Id: I620cfa8a06cbd4f8f904fdaaef250351110b56dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6505661
Commit-Queue: David Awogbemila <[email protected]>
Reviewed-by: Steve Kobes <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1455009}