Bug #14722 notes that WebKit does not include the border of the offsetParent in the offsetLeft/Top values for an element, in order to imitate Mozilla's behaviour. However there is one case where Mozilla does include the border (and WebKit doesn't), and that is when the parent element has -moz-box-sizing border-box. WebKit should do this too if it wants to follow Mozilla.
Created attachment 16699 [details] Test case The test case checks the offsetLeft/Top of a div whose parent has box-sizing set to border-box.
Created attachment 16700 [details] The result on Firefox 2.0.0.7 This shows that the border of div1 is included in offsetLeft/Top.
Created attachment 16701 [details] The result on WebKit r26570 This shows that WebKit does not include the border of div1 in the offsetLeft/Top.
Created attachment 16705 [details] Corrected test case There was a minor bug in the test case that doesn't affect the results.
I see no reason why box-sizing should affect the values returned by offsetLeft/Top. This sounds like a bug in Mozilla to me.
(In reply to comment #5) > I see no reason why box-sizing should affect the values returned by > offsetLeft/Top. This sounds like a bug in Mozilla to me. Could be. Internet Explorer 7 behaves like WebKit here. I'll see if I can find more information.
Filed a bug for Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=400258
The behavior in Firefox, Chromium, and WebKit all match now. The Gecko bug was fixed. I think we can close this.