-
Notifications
You must be signed in to change notification settings - Fork 719
[css-highlight-api] Change highlightsFromPoint return type #12031 #12215
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes, I think this is ready.
Just one more question on the thread about the exception.
@frivoal as an editor of https://drafts.csswg.org/css-highlight-api-1/ do you want a chance to take a look at this before we land it? As a sidenote, I think it would make sense for @ffiori and I to be added as editors if that sounds alright with you. Sanket Joshi is no longer at Microsoft, and Fernando and I have both been involved with this spec for a long time. |
[css-highlight-api] Change highlightsFromPoint return type #12031
As discussed and resolved in #12031, this PR changes the return type for
highlightsFromPoint
tosequence<HighlightHitResult>
to include the ranges that are hit at a given point in addition to the custom highlights.This PR also resolves the following issues:
[css-highlight-api] highlightsFromPoint(): Inconsistency between spec and test regarding shadow DOM #12045: Add a step where highlightsFromPoint returns the empty sequence if the topmost box hit by coordinates x,y has an element associated to it that's in a shadow tree whose shadow root is not in the list of shadowRoots passed as an option.
[css-highlight-api] HighlightsFromPoint: Not dealing with invalid static ranges #12003: In the steps for adding an AbstractRange to the ranges attribute of HighlightHitResult, add the necessity for the abstract range to be valid if it's a StaticRange before constructing a Range, and also add a sentence to make sure the Range was successfully constructed.