Open Bug 1593813 Opened 5 years ago Updated 2 years ago

The length unit Q miscalculated

Categories

(Core :: CSS Parsing and Computation, defect, P3)

72 Branch
defect

Tracking

()

People

(Reporter: haozhes, Unassigned)

Details

Attachments

(1 file)

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)

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

This is probably just a float precision issue of sorts, combined with the fact that line-height requires conversion to app-units...

Status: UNCONFIRMED → NEW
Ever confirmed: true

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

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).

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: