Re: [cssom-view] small update

A few comments...

You might want to clarify in getBoundingClientRect what an "empty"
border-box is. In our implementation, we consider a box empty if its width
OR height is zero. IE considers a box empty if the width AND height are
zero. (I think our definition is more useful, e.g. if you're trying to
scroll an element into view, or you want to draw the bounding box of the
element.)

In our implementation of getBoundingClientRect, if all the client rects are
empty, getBoundingClientRect just returns the first one. That might not have
bottom == top or left == right. This seems to be more useful than what the
spec says. I don't remember what IE does.

For table elements, getClientRects returns a rect for the table border-box
and a separate rect for the caption if one is present (both in Gecko 1.9 and
IE7 IIRC). You might want to mention this in the spec.

Anonymous block boxes such as those created for block-in-inline splits are
"drilled into" by getClientRects. So for example, given
<span>Foo <div style="width:50px; height:50px;"></div> Bar</span>
the span would have three client rects, one for the first inline, one for
the <div> (with width 50px), and one for the last inline. This is true in
both Gecko 1.9 and IE7 and it matters for Web-compatibility.

For SVG elements, which don't really have border-boxes, our implementation
of getClientRects returns a single rect which is the bounding-box of the SVG
element.

In our implementation, if an element is a descendant of an SVG
foreignObject, we treat the nearest enclosing foreignObject as establishing
the viewport for the element for the purposes of getClientRects and
getBoundingClientRect. It doesn't seem to make sense to use the true
viewport in the presence of possible SVG transformations.

Thanks,
Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Thursday, 6 March 2008 13:00:06 UTC