- From: Jan Jaeschke via GitHub <sysbot+gh@w3.org>
- Date: Thu, 03 Apr 2025 14:34:04 +0000
- To: public-css-archive@w3.org
jnjaeschke has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-highlight-api] highlightsFromPoint(): Inconsistency between spec and test regarding shadow DOM == There is a test which deals with a [live range that starts and ends in light DOM, but has a shadow DOM part inside](https://github.com/web-platform-tests/wpt/blob/dceefcbf785cc73900a88bda459a0edd2eb98a2d/shadow-dom/HighlightRegistry-highlightsFromPoint.html#L81). The test [asserts](https://github.com/web-platform-tests/wpt/blob/dceefcbf785cc73900a88bda459a0edd2eb98a2d/shadow-dom/HighlightRegistry-highlightsFromPoint.html#L119-L122) that `highlightsFromPoint()` does not return anything when being called over the shadow DOM part. However, the spec says that [`highlightsFromPoint()` should return a Highlight if _any_ of the DOMRects returned by `getClientRects()` of _any_ range of the highlight intersects the point](https://drafts.csswg.org/css-highlight-api-1/#dom-highlightregistry-highlightsfrompoint:~:text=The%20coordinates%20x%2Cy%20fall%20inside%20at%20least%20one%20of%20the%20DOMRects%20returned%20by%20calling%20getClientRects%28%29%20on%20range%2E). Both Gecko and Chrome also return DOMRects for the shadow DOM part, therefore the implementation would include the shadow DOM parts as well. cc @ffiori @emilio @smaug---- Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12045 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 3 April 2025 14:34:05 UTC