WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 91091
103538
getComputedStyle() for line-height property is wrong when unitless value and with scaling factor != 1.0
https://bugs.webkit.org/show_bug.cgi?id=103538
Summary
getComputedStyle() for line-height property is wrong when unitless value and ...
Martin Bouladour
Reported
2012-11-28 10:36:10 PST
When the CSS line-height property of an element is set to a unitless value (e.g. 1.2), and when a scaling factor is applied (i.e. when zoomed-in/out), then the line-height value returned by window.getComputedStyle is not correct. Thus, if this computed value is applied back to the element in a JS script, then the displayed line-height is changed. I believe this is wrong. (I assume that re-applying back every value returned by getComputedStyle to an element shouldn't lead to any change in the way the element is displayed.) This behavior happens only when the scaling factor is not 1.0. Also, it happens only when a unitless value is used. Other values (any length, percentage or "normal") are handled correctly. See the attached HTML document for an illustration of this bug (you have to zoom out/in and reload the page to see it). I've checked and seen this bug using every webkit browsers I have access to, that is to say: Chrome 23 on Linux (Fedora 17) Chrome 23 on Windows 7 Safari 5.1.7 on Windows 7 By the way, this computed-style line-height value is returned in px, but the W3C spec seems to indicate that it should be the "specified value" when using a unitless number (but maybe I misunderstood this point of the spec). See
http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height
Attachments
An illustration of this bug
(5.73 KB, text/html)
2012-11-28 10:37 PST
,
Martin Bouladour
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Martin Bouladour
Comment 1
2012-11-28 10:37:11 PST
Created
attachment 176514
[details]
An illustration of this bug
Martin Bouladour
Comment 2
2012-11-28 10:40:29 PST
I'm not sure but it may be the same bug as
https://bugs.webkit.org/show_bug.cgi?id=91091
Emil A Eklund
Comment 3
2013-03-08 15:27:10 PST
*** This bug has been marked as a duplicate of
bug 91091
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug