Re: [CSSOM] offsetWidth, offsetLeft issues

On Sat, Oct 17, 2009 at 1:10 PM, Ojan Vafai <> wrote:

> On Wed, Oct 14, 2009 at 1:17 PM, Robert O'Callahan <>wrote:
>> On Thu, Oct 15, 2009 at 8:50 AM, Erik Arvidsson <> wrote:
>>> The width and height of getBoundingClientRect is always the same as
>>  offsetWidth and offsetHeight.
>> I don't really care about this one. offsetWidth and offsetHeight are
>> really bad legacy features.
> No argument there. But we should at least make them as sane as possible,
> no? In the case of tables with captions, it makes more sense to include the
> caption. Given that IE already does this, it seems likely to maximize
> compatibility, or at least not make it worse.

It seems to me that right now the CSSOM spec is a little vague on this
matter. On the offset* properties it talks about "the border-edge of element
A", when it really needs to specify a particular CSS box (or union of CSS

I don't really mind if the spec changes so that offsetWidth and offsetHeight
match the size of getBoundingClientRect. That would make them include the
table caption. However, I can't promise that we'll change Gecko to match. It
seems almost any change to our offset* implementation produces regressions
in Web content, perhaps because there is browser-sniffing code that makes
assumptions about what we currently do. I'd rather just give up on offset*
and forget about them and concentrate on making
getClientRects/getBoundingClientRect useful and interoperable across

"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

Received on Saturday, 17 October 2009 03:03:57 UTC