Created attachment 40161 [details]
We should implement CSSOM Range.getClientRects/getBoundingClientRect (http://www.w3.org/TR/2009/WD-cssom-view-20090804/) to complement Element.getClientRects/getBoundingClientRect.
The attached patch works, but I am not happy with how I determined if the parent node was in the Range. It obviously also needs tests.
Created attachment 40207 [details]
Comment on attachment 40207 [details]
> + IntRect result = quads.enclosingBoundingBox();
> + for (size_t i = 1; i < quads.size(); ++i)
> + result.unite(quads[i].enclosingBoundingBox());
There is no need to special-case the first rect.
Landed in r48806.