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

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>  
wrote:
> 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:

http://dev.w3.org/csswg/cssom-view/#offset-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
http://annevankesteren.nl/

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