Closed Bug 1535923 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 15811 - [css-properties-values-api] Compute <length> values to px.

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15811 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15811
Details from upstream follow.

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[css-properties-values-api] Compute <length> values to px.

According to the spec, the computed value of \<length> registered properties
is the absolute value expressed in pixels. Currently, we are only behaving
correctly if the value is a calc() or if the CSSPrimitiveValue contains a
relative unit (e.g. em). This means that values like '1in' would not be
expressed in pixels.

As of this CL, we absolutize any \<length> which isn't already a simple
(non-calc) px value.

R=futhark@chromium.org

Bug: 641877
Change-Id: Idec079671a094952e122847fc5ebd4b0cb609674
Reviewed-on: https://chromium-review.googlesource.com/1520586
WPT-Export-Revision: 653c1595a30d410f6493608d2ce958bb73160b2c

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 2 tests and 75 subtests
OK     : 2
FAIL   : 75

New tests that have failures or other problems:
/css/css-properties-values-api/registered-property-computation.html
    <length> values are computed correctly [1in]: FAIL
    <length> values are computed correctly [2.54cm]: FAIL
    <length> values are computed correctly [25.4mm]: FAIL
    <length> values are computed correctly [6pc]: FAIL
    <length> values are computed correctly [72pt]: FAIL
/css/css-properties-values-api/registered-property-initial.html
    Initial value for <length> correctly computed [1in]: FAIL
    Initial value for <length> correctly computed [2.54cm]: FAIL
    Initial value for <length> correctly computed [25.4mm]: FAIL
    Initial value for <length> correctly computed [6pc]: FAIL
    Initial value for <length> correctly computed [72pt]: FAIL
    Initial value for <percentage> correctly computed [calc(10% + 20%)]: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef7929ba0342
[wpt PR 15811] - [css-properties-values-api] Compute <length> values to px., a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9055897b2b6
[wpt PR 15811] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.