You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[devtools.html] Range.getBoundingClientRect support #8982
@bgrins, do you have more details about this? When running the latest servo-client branch, I did not see this error directly, but perhaps you have more local changes?
Please ask questions if anything's unclear. We can start with using the existing support for Element.getClientRects and Element.getBoundingClientRect and then extend it to support the special behaviour described for slices of text nodes.
In case anyone is wondering, I did make some progress toward an implementation here, but then I got stuck when I started writing tests and noticed that every engine seems to give different results for these APIs. I wasn't sure how to resolve that... If anyone has suggestions, maybe I can continue to push forward.
Activity
Ms2ger commentedon Dec 15, 2015
getBoundingClientRectis defined onElement. Can you give some more context on how this breaks?jryans commentedon Dec 21, 2015
@bgrins, do you have more details about this? When running the latest
servo-clientbranch, I did not see this error directly, but perhaps you have more local changes?bgrins commentedon Dec 21, 2015
I did have a workaround for #8981 locally but I've now pushed that in joewalker/devtools.html@b1cb205.
So if you pull the latest servo-client branch then do:
TypeError: range(...).getBoundingClientRect is not a functionjdm commentedon Dec 22, 2015
This is Range.getBoundingClientRect, which isn't implemented yet:
[-][devtools.html] getBoundingClientRect support[/-][+][devtools.html] Range.getBoundingClientRect support[/+]jaysonsantos commentedon Apr 22, 2016
Hey @jdm I would like to try this one.
jdm commentedon Apr 22, 2016
Please ask questions if anything's unclear. We can start with using the existing support for Element.getClientRects and Element.getBoundingClientRect and then extend it to support the special behaviour described for slices of text nodes.
KiChjang commentedon Jun 8, 2016
Previous attempt in #10828.
jryans commentedon Jun 30, 2016
@jdm can you assign this one to me? I'd like to give it a try.
jdm commentedon Jun 30, 2016
It's already marked as assigned, and we can't set the assignee field to people who aren't part of the servo organization.
jdm commentedon Jun 30, 2016
So yes, go ahead :)
jryans commentedon Oct 27, 2016
In case anyone is wondering, I did make some progress toward an implementation here, but then I got stuck when I started writing tests and noticed that every engine seems to give different results for these APIs. I wasn't sure how to resolve that... If anyone has suggestions, maybe I can continue to push forward.
paulrouget commentedon Oct 28, 2016
Isn't there some wpt test for getClientRects and getBoudingClientRect?
jaysonsantos commentedon Oct 28, 2016
@jryans when I was trying to do it i created some sort of tests but every browser will return a different value which makes that a bit hard to do but here [1] is the closed pr.
[1] https://github.com/servo/servo/pull/10828/files
Ms2ger commentedon Oct 28, 2016
Doesn't look like there's any tests for
getBoundingClientRectonRange.jryans commentedon Apr 20, 2017
If someone wants to pick up where I left off with this, here's my branch:
https://github.com/jryans/servo/commits/range-client-rects
lumiscosity commentedon Jul 28, 2025
Added in 6be7612.