RESOLVED FIXED Bug 28747
getComputedStyle is returning used values for margins and not computed values
https://bugs.webkit.org/show_bug.cgi?id=28747
Summary getComputedStyle is returning used values for margins and not computed values
chrome
Reported 2009-08-26 11:47:02 PDT
Webkit supports "http://www.w3.org/TR/CSS2/visudet.html#blockwidth", paragraph 3. this leads to incorrect rendering (see attached file). original css value can not be read via window.getComputedStyle, the only way (as far as i can see )remaining to read the css values set by stylesheets is parsing them. i fixed this by adding an expando to every generated element at 'startup', this is ugly and slow. So please add a css switch to optionally disable that behaviour.
Attachments
W3C rule and window.getComputedStyle (60.51 KB, image/jpeg)
2009-08-26 11:50 PDT, chrome
no flags
W3C rule and window.getComputedStyle (57.67 KB, image/jpeg)
2009-08-27 04:23 PDT, chrome
no flags
chrome
Comment 1 2009-08-26 11:50:52 PDT
Created attachment 38629 [details] W3C rule and window.getComputedStyle
chrome
Comment 2 2009-08-27 04:23:16 PDT
Created attachment 38665 [details] W3C rule and window.getComputedStyle
chrome
Comment 3 2009-08-27 04:29:36 PDT
Maybe it's the best *not* to follow W3C RFC at this point. I can not see *any* reason what this awfull behaviour should be good for...
Dave Hyatt
Comment 4 2009-08-27 09:30:12 PDT
This is a bug in WebKit actually. In the overconstrained margin case it's the used value that should be modified, not the computed value. Therefore this modification should not affect what is returned by getComputedStyle.
chrome
Comment 5 2009-08-27 11:41:11 PDT
when you start to fix it, please take a look at the values Webkit returns for input type=text, textarea and select, they do not reflect the real values for margins/borders/padding. reported this to chrome buglist. should i create a new one here?
chrome
Comment 6 2011-04-28 11:04:04 PDT
seems to be fixed since 534.24. is this correct? please post the version number. thank you
Tony Chang
Comment 7 2011-08-25 12:29:26 PDT
Note You need to log in before you can comment on or make changes to this bug.