[cssom-view] Range.getClientRects does not seem interoperable
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
Firefox seems to understand the specs of Range.getClientRects() differently than WebKit and Blink based browsers.
The former will apparently return only the DOMRects of the nodes appearing at the first level of the Range's content, while the latter will traverse whatever element the Range contains to find every text node.
I can understand both readings of the specs, the first step indeed asks that only the elements whose parents aren't selected in the Range participate in the DOMRectList. It can make sense that the inner text nodes would also get ignored in the second step. Also, I personally have no idea which behavior is "the best". So maybe this should be clarified here and then bugs opened on whichever implementation has to change.
I couldn't find a WPT test for this, but Chromium has a web-test that Firefox fails:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSSOM View specification section for Range.getClientRects() and compare its algorithm with Chromium's web-test at third_party/blink/web_tests/fast/dom/Range/getClientRects.html. Determine which interpretation is intended, clarify the specification, and establish whether a WPT test or implementation bug should follow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100