These IE compatible properties seem to return incorrect values when there is no
content in a block element.
In the following testcase,the document.body contains a empty DIV element named
"div1",no styling is applied to the document.
offsetWidth,clientWidth and scrollWidth all return zero for div1,
but using getComputedStyle() for the width property gives a value.
These properties should be returning the same width values as the document.body
since the width values are "auto".
clientWidth also returns zero in IE6 for some reason.
offWidth also returns zero for the document.body.
clientWidth and scrollWidth both give a value.
These values are both greater then the computed width of the document.body,so
that does'nt seem right.
Is the computed width of document.body suppose to be less than the width of the
The testcase should work in IE as well
Created attachment 109972 [details]
testcase:An alert onload will show property values
Created attachment 109976 [details]
testcase:same as above but with content added to "div1"
Mass-reassigning bugs to firstname.lastname@example.org
*** Bug 198999 has been marked as a duplicate of this bug. ***
The problem here is that the offset rect is computed by starting with an empty
rect and unioning it with every rect of the element (continuations, etc).
But in this case the element rect is 0 height, so empty. Thus we fall into the
"both rects empty case" in UnionRect().
I'm guessing the best fix here is to copy the relevant code out of UnionRect and
do the union by hand.... roc, any better ideas?
nope, that sounds correct.
Created attachment 149701 [details] [diff] [review]
Actually, I wonder if the right thing to do here is to special-case the empty
rect and if it is empty, set it to (first-in-flow.x, first-in-flow.y, 0, 0).
You mean if the result is empty once we're done with the loop?
Yeah. So if during the loop we find a non-empty rect, we use that.
Comment on attachment 149701 [details] [diff] [review]
minusing while we wait for bz to come back and respond
Created attachment 153125 [details] [diff] [review]
Per review comments