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 11:15:54 -0400
Message-ID: <4E68DC2A.2000709@mit.edu>
To: www-style@w3.org
On 9/8/11 11:03 AM, John J Barton 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?

roc gave you a list of JS calls that for-sure cause layout: everything 
in the CSSOM API.  That's not an exhaustive list, but it's most of the 
ones that cause layout.  Certainly all the commonly-used ones....

In general, the above information will depend on the UA, by the way. 
Furthermore, "layout" is not atomic, and a call may trigger parts of it 
but not others (e.g. in Gecko some calls will trigger restyle processing 
but not actual layout... except restyle processing needs to trigger 
layout on ancestor documents due to media queries, of course).

If you just want a quick-n-dirty approximation, you could write a script 
that tests all DOM calls you care about and then instrument (or ask 
someone to instrument) one of the layout engines to, say, fire a sync 
event on layout attempts.  Then see what DOM calls trigger the event. 
Doing that in a test environment where we don't have to worry about 
malicious code running off the event is a lot simpler than doing it on 
the web...

-Boris
Received on Thursday, 8 September 2011 15:16:36 GMT

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