W3C home > Mailing lists > Public > www-style@w3.org > May 2016

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

From: Koji Ishii <kojiishi@gmail.com>
Date: Fri, 6 May 2016 14:30:04 +0900
Message-ID: <CAN9ydbXN290=_Mg4Ak1mn7yvsvDLOSzjvZ-1=ST5iMJA=ykPvA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Myles C. Maxfield" <mmaxfield@apple.com>, "www-style@w3.org" <www-style@w3.org>
2016-05-06 13:29 GMT+09:00 Tab Atkins Jr. <jackalmage@gmail.com>:

> [please don't top-post https://wiki.csswg.org/tools/www-style]
> On Thu, May 5, 2016 at 10:28 AM, Myles C. Maxfield <mmaxfield@apple.com>
> 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.

[1] https://lists.w3.org/Archives/Public/www-style/2009Jul/0149.html
[2] http://crbug.com/574363

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:59 UTC