From 48f7b0976410763da1597b4b22e08bd5e4fe923a Mon Sep 17 00:00:00 2001 From: Fernando Fiori Date: Tue, 25 Feb 2025 14:06:59 -0800 Subject: [PATCH] add support for StaticRanges --- css-highlight-api-1/Overview.bs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/css-highlight-api-1/Overview.bs b/css-highlight-api-1/Overview.bs index 0dbaa65d69d..7c1a4475248 100644 --- a/css-highlight-api-1/Overview.bs +++ b/css-highlight-api-1/Overview.bs @@ -668,15 +668,19 @@ method must return the result of running these steps: * x is greater than the viewport width excluding the size of a rendered scroll bar (if any) * y is greater than the viewport height excluding the size of a rendered scroll bar (if any) 1. Otherwise, return a [=sequence=] of [=custom highlights=] given by ordering the highlights contained in this {{HighlightRegistry}} in descending order of [=priority=], - excluding the highlights without at least one [=range=] range that satisfies the following constraints: - 1. The coordinates x,y fall inside at least one of the {{DOMRect}}s returned by calling {{Range/getClientRects()}} on range. + including only those highlights that contain at least one {{AbstractRange}} abstractRange that satisfies the following: + + * Let range be a {{Range}} object whose [=start node=] and [=end node=] are set to abstractRange's [=start node=] and [=end node=] respectively, + and [=start offset=] and [=end offset=] are set to abstractRange's [=start offset=] and [=end offset=] respectively. + + * The coordinates x,y fall inside at least one of the {{DOMRect}}s returned by calling {{Range/getClientRects()}} on range. Note: The specifics of hit testing are out of scope of this specification and therefore the exact details of {{highlightsFromPoint()}} are therefore too. Hit testing will hopefully be defined in a future revision of CSS or HTML. - 1. The range's {{commonAncestorContainer}} is not in a [=shadow tree=] or is in a [=shadow tree=] whose + * The range's {{commonAncestorContainer}} is not in a [=shadow tree=] or is in a [=shadow tree=] whose [=shadow root=] is [=list/contains|contained by=] by options.shadowRoots.