W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [cssom-view] padding edge / border edge for offsetTop/offsetLeft?

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 12 Aug 2010 16:56:51 +0200
To: "Sylvain Galineau" <sylvaing@microsoft.com>, "Garrett Smith" <dhtmlkitchen@gmail.com>
Cc: "Mike Wilson" <mikewse@hotmail.com>, Www-style <www-style@w3.org>
Message-ID: <op.vhbyg12d64w2qv@anne-van-kesterens-macbook-pro.local>
Sorry for resurrecting an old thread, but I made a change based on this  
(and other) email(s).

On Fri, 25 Apr 2008 19:52:29 +0200, Garrett Smith <dhtmlkitchen@gmail.com>  
> 2) the way that offset* are standardized in CSSOM WRT the BODY element
> is unintuitive, makes body special in a bad way, and contradicts other
> browsers except Opera when:
> <!doctype html>
> <body style="position: relative;" onload='alert(a.offsetTop)'><div
> id=a style="position: relative"></div></body>
> Result: 0 in all browsers, except in Opera.
> Result in Opera: 8.
> Opera follows CSSOM Views algorithm, measuring from - a - to viewport  
> edge.

The specification now requires 0 as well. I removed the special casing of  
offsetParent being "the HTML body element" for the offsetLeft and  
offsetTop attributes:


My apologies for taking so long to get back to you guys. I wanted to be  
able to look at the issue freshly, which I have now finally done.  
Hopefully you will continue to review the draft.

(I expect Opera to match the new algorithm in due course.)

Anne van Kesteren
Received on Thursday, 12 August 2010 19:06:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:40 UTC