Closed Bug 1669742 Opened 5 years ago Closed 5 years ago

window.matchMedia result doesn't match original query for aspect-ratio 1/1

Categories

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

Firefox 83
defect

Tracking

()

RESOLVED FIXED
83 Branch
Webcompat Priority P2
Tracking Status
firefox83 --- fixed

People

(Reporter: ksenia, Assigned: emilio)

References

()

Details

Attachments

(2 files)

Attached file 15124-fenix.html

This was originally reported in https://github.com/mozilla-mobile/fenix/issues/15124

When querying for window.matchMedia for (max-aspect-ratio: 1/1) the result contains a shorter version (max-aspect-ratio: 1). Even though the serialization is correct, the site expecting the result to match the original query.

https://drafts.csswg.org/css-values-4/#ratio-value
"The second <number> is optional, defaulting to 1. However, <ratio> is always serialized with both components."

Severity: -- → S2
Component: Layout → CSS Parsing and Computation
Priority: -- → P2
Webcompat Priority: ? → P2
Flags: needinfo?(emilio)

So there are two issues here:

So we should:

Assignee: nobody → emilio
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

  • File a bug on chrome to add spaces around the /.

Emilio opened https://bugs.chromium.org/p/chromium/issues/detail?id=1138849

Note that there is a third issue which is about the order.

Attachment #9181751 - Attachment description: Bug 1669742 - Always serialize ratio without spaces and with both components. r=boris,#style → Bug 1669742 - Always serialize ratio with both components. r=boris,#style
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b11ef23004d6 Always serialize ratio with both components. r=boris
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26386 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: