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

Re: [CSSOM] Revisiting transforms and getBoundingClientRect()

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 08 Sep 2011 12:07:30 -0400
Message-ID: <4E68E842.1090309@mit.edu>
To: www-style@w3.org
On 9/8/11 12:00 PM, Tab Atkins Jr. wrote:
> On Thu, Sep 8, 2011 at 8:03 AM, John J Barton
> <johnjbarton@johnjbarton.com>  wrote:
>> A list of JS calls that for-sure cause layout and a list that
>> for-sure-do-not would be a good start. Is that possible?
>
> Here is a probably-complete list for Webkit.  Other browsers should be
> similar or identical:
> http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html

Definitely not identical.  For Gecko, for example, getComputedStyle() 
does not trigger anything, while various getters on the returned object 
may trigger restyles or relayout.

There are also relayout triggers for lots more Window getters 
(innerWidth, etc, etc) at least in Gecko.  Some are relayouts on the 
parent document, though.  I would expect that to be the case in WebKit 
too....

-Boris
Received on Thursday, 8 September 2011 16:07:59 GMT

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