W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [CSSOM] Interaction of getBoundingClientRect/getClientRects with transforms

From: Simon Fraser <smfr@me.com>
Date: Tue, 31 Aug 2010 08:18:55 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-id: <6DEE95AE-5723-4D74-AB8F-B851E3A41D58@me.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
On Aug 31, 2010, at 7:47 am, Boris Zbarsky wrote:

> On 8/31/10 10:34 AM, Tab Atkins Jr. wrote:
>> No, they don't.  And so, they shouldn't.  That was my point.
> 
> OK.  Can we get Webkit and Presto changed, then?  ;)
> 
>>> -moz-element currently uses the untransformed size as the size of the
>>> background image for -moz-element, and draws the transformed element into
>>> that box, clipping at the edges.  Screenshot of a 500px by 500px div using
>>> the 45-degree-rotated div from my other example as a repeating -moz-element
>>> background.
>> 
>> Cool.  That confirms to me that CSS's current conception of "border
>> box" as being something with page-geometry is just fine to use for
>> getBoundingClientRects().
> 
> I'm not sure I follow the argument here, honestly...

Me neither. WebKit returns the bounding box of a transformed element getBoundingClientRect(),
because that's what the user wants in most cases (they use the rect to do scrolling, or to detect
whether something is visible).

It's not clear to me that transforms should affect the behavior of -moz-element, but I haven't seen
a spec for that anywhere.

Simon
Received on Tuesday, 31 August 2010 16:20:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT