Re: [cssom-view] getBoundingClientRect() when the first rectangle is empty

2016-05-06 13:29 GMT+09:00 Tab Atkins Jr. <>:

> [please don't top-post]
> On Thu, May 5, 2016 at 10:28 AM, Myles C. Maxfield <>
> wrote:
> > The spec has rather peculiar wording around this, as if it is making
> special
> > affordances to make sure the first rectangle is always in the return
> value.
> >
> > Do we know why the current version is written this way?
> It's probably an attempt to be clever/compact and ensure that you
> don't hit a degenerate case (no rectangles left).
> ~TJ

It looks like this was done for the feedback from roc[1], so that it
returns a meaningful value for a collapsed range.

But when Blink fixed this[2], authors complained to us that the algorithm
is not reasonable when rects[0] is empty and rect[1] is not. I then talked
to roc to confirm that Gecko does what proposed here rather than what's
currently spec'ed.



Received on Friday, 6 May 2016 05:30:51 UTC