[Webkit-unassigned] [Bug 103538] New: getComputedStyle() for line-height property is wrong when unitless value and with scaling factor != 1.0
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 28 10:33:55 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=103538
Summary: getComputedStyle() for line-height property is wrong
when unitless value and with scaling factor != 1.0
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Minor
Priority: P2
Component: Text
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: martin.bouladour at gmail.com
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
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list