W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [cssom-view] Correction and clarification for the coordinate systems of getClientRect/getBoundingClientRect

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 1 Dec 2011 13:53:43 -0800
Message-ID: <CAAWBYDC9OAYq9eNG-_F-j9WHsr=vU0y=O-ieg63pzbafE0Cw9w@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: Rik Cabanier <cabanier@gmail.com>, robert@ocallahan.org, www-style <www-style@w3.org>
On Thu, Dec 1, 2011 at 1:44 PM, Simon Fraser <smfr@me.com> wrote:
> On Dec 1, 2011, at 9:17 AM, Rik Cabanier wrote:
>> That was just an example.
>> My point was that information is lost if you append all the transforms.
>> Better to give back the untransformed bounds and tell the user to do the
>> math himself.
> That math is way too hard for the average web developer, if you need to take
> 3D transforms and perspective on ancestor elements into account.
> The better solution would be to have getBoundingClientQuads(), and a
> pointInQuad() helper method.

We've had this discussion before.  There's a bunch of information and
variants of rects and quads that *might* be useful to expose.  Someone
needs to sit down and spend the time to figure out *what* to expose
and how to do it all sanely.  I don't think adding things piecemeal
will give us a good result in the end.

In particular, there are a handful of orthogonal options that specify
what information you can get out.  I suspect a solution built around
those would be necessary.

Received on Thursday, 1 December 2011 21:54:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:08 UTC