kangax said:
What is it exactly that doesn't trigger reflow in Safari 2, older Gecko
and Blackberry? And how do you know that it doesn't?
Reading width property failed me before.
There was an element in the page directly followed by a script that was
trying to read offsetWidth and it was getting the wrong value.
I see his arrival to such conclusion right after list itself:
"All of these above are essentially requesting style information about a
node, and any time you do it, the browser has to give you the most
up-to-date value. In order to do so, it needs to apply all scheduled
changes, flush the queue, bite the bullet and do the reflow."
currentStyle is a cascaded style. What queue needs to be flushed?
MSDN on *currentStyle*:-
You're nitpicking
He didn't say that `insertRule` is Firefox's
method. He said that in Firefox there's `insertRule`. I could also say
that there's `insertRule` in Safari, and that wouldn't be wrong. It
would be just incomplete and somewhat unprofessional.
There isn't any good reason for preferring the non-standard addRule
method over the standard one. The quirks that come with IE dhtml methods
are not always copied the same in other browsers.
With standard method, there is a specification that is clearer then MSDN
and doesn't have all the associated quirks copied over.
I also noticed that some tests are in quirks mode
(<
http://www.phpied.com/files/reflow/restyle.html>), which is not a good
idea.
Right, not a good idea.
I was annoyed by that too. Was it `offsetHeight`?
The tool vendor seems to be referring to jQuery `height` method.
#upper:
`isXMLDoc` is called, then "Rendering (Scheduling layout task #47)".
#lower:
`css` is called, then "Rendering (Scheduling layout task #47)"
| Why does this happen, especially as the property change on the upper
| div element has no effect on the lower div element? When the height
| property of the lower div element is accessed Internet Explorer
| realizes that there is a scheduled layouting task.
Accessing the `height` property of the `jQuery.prototype.init` object
should not require layout update.
The paragraph continues:-
| As this task might – and most likely will – change layout properties
| of other elements it is performed before layouting-related information
| is returned by the DOM call.
Calling the `height` property of the `jQuery.prototype.init` object
should not require layout update.
I should clarify that. The constructor for a jQuery object is the init
function, which is in the prototype property of the jQuery function. The
jQuery constructor is in the prototype, as jQuery.prototype.init.
Any object created by jQuery is an instance of jQuery.prototype.init.
For example, using jQuery:
$() instanceof jQuery.prototype.init;
true
Kind of an odd design, but that is beside the point.
The calling a jQuery.init's `height` property is a not DOM update. There
is no reason that it should require layout update.
When the tool vendor called `height`, the tool displayed rendering
scheduling notification in two cases:
#upper:
`isXMLDoc` is called, then "Rendering (Scheduling layout task #47)".
#lower:
`css` is called, then "Rendering (Scheduling layout task #47)"
Did I miss learning something?