Closed Bug 1565061 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 17775 - Partially fix calc() length unit handling in media queries

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream error])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Partially fix calc() length unit handling in media queries

When a calc() length is passed to media queries, the current code
assumes that there's always a DoubleValue(), and the unit type matches
TypeWithCalcResolved(), which is incorrect.

This patch partially fixes the issue when the calc expression can be
resolved without type conversion. Handling type conversion is more
complicated and hence left broken by this patch (as it's already broken).

Bug: 982542
Change-Id: I258b3d1aeec69fb65fbadd86981e97974239289b
Reviewed-on: https://chromium-review.googlesource.com/1696191
WPT-Export-Revision: 55d5effe0eadf1e8e7a60fc7307f06b71b64f8ed

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Type: -- → task
Failed to get results from try push
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/0d91dc041eae [wpt PR 17775] - Partially fix calc() length unit handling in media queries, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.