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

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 UTC