Summary: | border is not taken in account with offsetLeft/Top in border-box mode | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Marcus Better <marcus> | ||||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED INVALID | ||||||||||||
Severity: | Normal | CC: | mrobinson | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 523.x (Safari 3) | ||||||||||||
Hardware: | Mac (Intel) | ||||||||||||
OS: | OS X 10.4 | ||||||||||||
Attachments: |
|
Description
Marcus Better
2007-10-17 05:29:54 PDT
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. |