Closed Bug 1460655 Opened 6 years ago Closed 6 years ago

Support 'x' as a resolution unit.

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

      No description provided.
Comment on attachment 8974749 [details]
Bug 1460655: Make resolutions more like the rest of the CSS values.

https://reviewboard.mozilla.org/r/243130/#review249068
Attachment #8974749 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8974749 [details]
Bug 1460655: Make resolutions more like the rest of the CSS values.

https://reviewboard.mozilla.org/r/243130/#review249070

::: servo/components/style/values/specified/resolution.rs:60
(Diff revision 1)
> +        if value <= 0. {
> +            return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
> +        }

Could you file a followup to remove this condition if there isn't one already?

This seems wrong to exclude zero from a number type. Also the spec seems to allow negative for resolution (it just always resolves to false, but should still parse).
Comment on attachment 8974750 [details]
Bug 1460655: Support x as a resolution unit.

https://reviewboard.mozilla.org/r/243132/#review249072

::: layout/style/test/test_media_queries.html:562
(Diff revision 1)
> +    expression_should_be_parseable(feature + ": 1.5x");
>      expression_should_be_parseable(feature + ": 2.0dppx");
>      expression_should_not_be_parseable(feature + ": 0dpi");
>      expression_should_not_be_parseable(feature + ": -3dpi");
>      expression_should_not_be_parseable(feature + ": 0dppx");
> +    expression_should_not_be_parseable(feature + ": 0dppx");

I suppose you mean `0x` here.
Attachment #8974750 - Flags: review?(xidorn+moz) → review+
Blocks: 1460946
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f04aa80db6d0
Make resolutions more like the rest of the CSS values. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/30f281e6cd1f
Support x as a resolution unit. r=xidorn
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10969 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
I've updated https://developer.mozilla.org/en-US/docs/Web/CSS/resolution as well as the compat data and the mdn/data data.

Marking dev-doc-complete, but please let me know if we need anything else.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: