Summary: | Computed style margins calculated incorrectly for sized elements. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nigel White <nigelw> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | alex, ap, jameskay, jonathan, nigelw | ||||
Priority: | P2 | ||||||
Version: | 420+ | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Attachments: |
|
Description
Nigel White
2009-03-11 04:54:47 PDT
Of course It affects Chrome 2.* too. I just updated Chrome from the latest build channel. Is this not an outrageously bad bug?! *** This bug has been confirmed by popular vote. *** Any progress on this one? Created attachment 40706 [details]
So simple. Just run it. It gets the computed margins WRONG!
The simple test: <html> <head> <title>Margin bug</title> <script type="text/javascript"> runTest = function() { var inner = document.getElementById("inner"); var lm = parseInt(document.defaultView.getComputedStyle(inner, null).marginLeft, 10); var rm = parseInt(document.defaultView.getComputedStyle(inner, null).marginRight, 10); var m = lm + rm; inner.innerHTML ='My left+right margins are ' + m; }; </script> </head> <body onload="runTest();"> <div id="outer" style="height:300px;width:500px;border:1px solid black"> <div id="inner" style="height:200px;width:200px;background-color:red"></div> </div> </body> </html> HEY! Can we have some action on this?! This is a BUG and a bad one! It simply reports a completely erroneous margin value. SO we cannot work out how much space is taken up by an element including its margins! I'd like to add my "voice" to this: please would someone take a look? This is a duplicate of https://bugs.webkit.org/show_bug.cgi?id=13343 which has several people waiting on it. According Chromium bug report: http://code.google.com/p/chromium/issues/detail?id=23816 (In reply to comment #9) > This is a duplicate of https://bugs.webkit.org/show_bug.cgi?id=13343 Thanks, marking as such. *** This bug has been marked as a duplicate of bug 13343 *** |