The length unit Q miscalculated
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: haozhes, Unassigned)
Details
Attachments
(1 file)
3.37 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36
Steps to reproduce:
Run the attached test with Firefox nightly build.
Actual results:
property <line-height> from [4q] to [19q] (15q unit) got 17.97 px.
Expected results:
It should be 17.95px. (https://developer.mozilla.org/en-US/docs/Web/CSS/length)
Comment 1•5 years ago
|
||
This is probably just a float precision issue of sorts, combined with the fact that line-height requires conversion to app-units...
Comment 2•5 years ago
|
||
Hmm, isn't this testcase just bogus since it makes assumptions about the absence of rounding errors in a resolved length value? I don't think there are any guaranties in CSS about that for properties that report actual layout values like line-height
, width
, height
etc
Comment 3•5 years ago
|
||
Yeah, though in this case we can represent the 15q value exactly with app-units, so there's a precision error somewhere in the interpolation code that may be worth at least diagnosing (even if it's WONTFIX).
Updated•5 years ago
|
Updated•2 years ago
|
Description
•