Commit graph

10456 commits

Author SHA1 Message Date
Marian-Vasile Laza
b78c0fa6a0 Backed out changeset fa7252da2862 (bug 1695565) for xpcshell failures on test_css-properties-db.js. CLOSED TREE 2023-03-01 02:55:50 +02:00
Emilio Cobos Álvarez
a7ac7df28f Bug 1695565 - Fix appearance-cssom-001.html. r=boris
* Remove some legacy appearance aliases that other engines don't
   implement.

 * Allow to pass with unimplemented <compat-auto> values, since per the
   spec the idea of these is to get them removed, see
   https://github.com/w3c/csswg-drafts/issues/8506 for the ones we don't
   implement.

 * Also allow the `-moz-` prefix to be implemented, because we can't
   quite get rid of it (people use it to remove the <input type=number>
   buttons with -moz-appearance: textfield and so on), and the
   alternative is to implement a bunch of non-standard ::-webkit-
   pseudo-elements.

Differential Revision: https://phabricator.services.mozilla.com/D171243
2023-02-28 23:47:45 +00:00
Emilio Cobos Álvarez
22b93499fa Bug 1818811 - Make -moz-box-layout: flex default, and clean-up CSS. r=Gijs,extension-reviewers,settings-reviewers,desktop-theme-reviewers,dao
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.

Differential Revision: https://phabricator.services.mozilla.com/D170944
2023-02-27 12:41:13 +00:00
Tiaan Louw
6fe94c07e9 Bug 1813481 - Use abstract color parser r=emilio,supply-chain-reviewers
In stead of having the css parser construct a color in it's own format
and then converting it to what Gecko needs to perform operations, we now
construct a Gecko friendly color type directly.

Differential Revision: https://phabricator.services.mozilla.com/D170187
2023-02-26 11:11:21 +00:00
Emilio Cobos Álvarez
3380aefce2 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-26 00:15:25 +00:00
Emilio Cobos Álvarez
1c9b0d5648 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-26 00:15:24 +00:00
CanadaHonk
d17b6e45fc Bug 1818598 - Fix parsing nested image-set funcs as valid r=layout-reviewers,emilio
Nested image-set CSS functions should fail to parse as per spec.

WPT tests (2 newly pass):
a2154e3f97/css/css-images/image-set/image-set-parsing.html (L223-L239)

Differential Revision: https://phabricator.services.mozilla.com/D170829
2023-02-25 23:53:02 +00:00
Stanca Serban
a3a9112d4d Backed out 2 changesets (bug 1818329) for causing wpt failures in image-set-parsing.html. CLOSED TREE
Backed out changeset 01c1a2d4f4fd (bug 1818329)
Backed out changeset 6c3a6a328d47 (bug 1818329)
2023-02-26 01:34:12 +02:00
Cosmin Sabou
2a1ffc6e4f Backed out changeset a154633506f0 (bug 1818598) for causing mochitest plain failures. CLOSED TREE 2023-02-25 23:27:46 +02:00
CanadaHonk
33c69203cb Bug 1818598 - Fix parsing nested image-set funcs as valid r=layout-reviewers,emilio
Nested image-set CSS functions should fail to parse as per spec.

WPT tests (2 newly pass):
a2154e3f97/css/css-images/image-set/image-set-parsing.html (L223-L239)

Differential Revision: https://phabricator.services.mozilla.com/D170829
2023-02-25 20:13:58 +00:00
Emilio Cobos Álvarez
48e93a14bc Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-25 17:59:18 +00:00
Emilio Cobos Álvarez
cdc7d10ad9 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-25 17:59:18 +00:00
Noemi Erli
d521cb7246 Backed out 2 changesets (bug 1818329) for causing wpt failures
Backed out changeset af4cdf10aafd (bug 1818329)
Backed out changeset 8c7eb3fca5a8 (bug 1818329)
2023-02-25 07:41:14 +02:00
Emilio Cobos Álvarez
0a87908520 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).

Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).

Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-24 23:33:39 +00:00
Emilio Cobos Álvarez
de9beb6e1a Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-24 23:33:39 +00:00
Cosmin Sabou
86da4d63eb Backed out changeset fa64d4d68a0c (bug 1818329) for causing wpt reftest failures on mq-negative-range-001.html. CLOSED TREE 2023-02-24 18:39:42 +02:00
Cosmin Sabou
71a67276df Backed out changeset 89c458212f3c (bug 1818329) for causing wpt reftest failures on image-set-invalid-resolution-rendering-2.html 2023-02-24 15:55:07 +02:00
Emilio Cobos Álvarez
9873096897 Bug 1818329 - Don't reject negative resolutions either. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D170762
2023-02-23 22:49:04 +00:00
Emilio Cobos Álvarez
101f17ccd3 Bug 1818329 - Don't reject negative values at parse time in media features. r=dshin
Clean-up some other test expectations while at it.

Differential Revision: https://phabricator.services.mozilla.com/D170677
2023-02-23 22:48:24 +00:00
Emilio Cobos Álvarez
465edf8e1a Bug 1818327 - Layer should be an invalid media type. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D170676
2023-02-23 22:28:50 +00:00
Emilio Cobos Álvarez
5f6910e75e Bug 1817071 - Remove -moz-image-region support from layout. r=layout-reviewers,tnikkel
There are no users of non-auto values, so we can just simplify some code and
remove the property.

Differential Revision: https://phabricator.services.mozilla.com/D170010
2023-02-21 12:19:44 +00:00
Emilio Cobos Álvarez
f837a4541f Bug 1812868 - Expose scrollbar-inline-size as a chrome-only environment variable. r=mstange
After the previous patches this is rather straight-forward.

Reviewed in: https://phabricator.services.mozilla.com/D168148
2023-02-20 00:01:12 +01:00
Emilio Cobos Álvarez
122d6ccddd Bug 1812868 - Expose chrome-only environment variables to all chrome:// documents, not just chrome-docshells. r=mstange
This will be necessary to make the new env var testable.

Reviewed in: https://phabricator.services.mozilla.com/D168148
2023-02-20 00:01:12 +01:00
Sandor Molnar
2bc700c04b Backed out 2 changesets (bug 1812868) for causing bug 1817539. CLOSED TREE
Backed out changeset 07c689de250c (bug 1812868)
Backed out changeset e7d370501c50 (bug 1812868)
2023-02-18 09:34:04 +02:00
Emilio Cobos Álvarez
ad4bd6a3ba Bug 1812868 - Expose scrollbar-inline-size as a CSS variable to chrome code. r=mstange
For that we need to:

 * Make GetDPIRatioForScrollbarPart thread-safe: This was using the
   widget for bug 1727289, but just looking at the print preview scale
   is enough to fix that.

 * Make nsPresContext::UseOverlayScrollbars() thread-safe: We store the
   RDM pane stuff in the pres context.

The rest is pretty straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D168148
2023-02-17 21:15:06 +00:00
David Shin
22599b6856 Bug 1816964 - linear() easing function should not consider less than 2 linear stop arguments valid. r=emilio
Latest spec no longer handles `linear() == linear` and `linear(<single value>) == <single value>`.

Differential Revision: https://phabricator.services.mozilla.com/D169955
2023-02-17 17:13:21 +00:00
Fred Chasen
cb0a8abc0b Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-16 21:29:07 +00:00
Tiaan Louw
6446f9a80e Bug 1812545 - Part 3 - Color mixing is done with new color spaces r=emilio
The color mixing is npw using AbsoluteColor and it's conversion
functions. The result is still being converted back to sRGB for now.

Differential Revision: https://phabricator.services.mozilla.com/D169930
2023-02-16 15:19:08 +00:00
Tiaan Louw
f556365d2b Bug 1812545 - Part 2 - Use new color space for color mixing r=emilio
Mixing is now using the new color space for specifying the interpolation
color space.  For that reason hsl and hwb is added to the color space
and also converting to/from them.

Differential Revision: https://phabricator.services.mozilla.com/D169929
2023-02-16 15:19:08 +00:00
Tiaan Louw
9cc1a3c762 Bug 1812545 - Part 1 - Move color mixing code to color module. r=emilio
No functional changes, just moving the code to the shared library in
preperation for replacing it with the new AbsoluteColor.

Differential Revision: https://phabricator.services.mozilla.com/D169928
2023-02-16 15:19:07 +00:00
Christian Sonne
a61bb317db Bug 1468404 - add subgrid to list of suggestions for grid-template-* properties r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169862
2023-02-14 22:48:11 +00:00
Emilio Cobos Álvarez
eb823eb895 Bug 1814626 - Expose line-height resolution to style, and use it from ToResolvedValue. r=jfkthame
For ToResolvedValue implementation purposes we wouldn't need to split
out the vertical / font / line-height arguments and we could just pass
around the ComputedStyle, but the lh unit would need that distinction,
(because computing lh on font properties should use the parent style).

Differential Revision: https://phabricator.services.mozilla.com/D168705
2023-02-14 22:36:31 +00:00
Emilio Cobos Álvarez
99f3fcfb14 Bug 1792431 - Use non-native menus in Windows for documents where we don't have a native theme. r=Gijs
Untested, but it should work.

Differential Revision: https://phabricator.services.mozilla.com/D169836
2023-02-14 20:35:25 +00:00
Tiaan Louw
f29b943079 Bug 1816394 - Move AbsoluteColor to common color module. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169607
2023-02-14 15:13:10 +00:00
Marian-Vasile Laza
91a3c1e0ce Backed out changeset f4fe07518400 (bug 1591210) for web-platform failures on forced-colors-mode-14.html. CLOSED TREE 2023-02-14 06:40:31 +02:00
Fred Chasen
6f6759dce8 Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-14 00:52:26 +00:00
Cosmin Sabou
2c8367836d Backed out changeset 488ea16d9b8b (bug 1816394) for causing reftest failures on 1315113-1.html. CLOSED TREE 2023-02-13 18:26:17 +02:00
Tiaan Louw
6d92ad74a8 Bug 1816394 - Move AbsoluteColor to common color module. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169607
2023-02-13 14:47:52 +00:00
Tiaan Louw
b87e961ca5 Bug 1813014 - Add missing color conversions r=emilio
The patch adds some of the color conversions away from sRGB.

Differential Revision: https://phabricator.services.mozilla.com/D168895
2023-02-05 20:42:11 +00:00
Emilio Cobos Álvarez
3d092ba60e Bug 1775062 - Implement ipdl reads without needing default ctors. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D149743
2023-02-04 11:12:36 +00:00
Emilio Cobos Álvarez
ab2528e1cf Bug 1814696 - Hint directionality of label content for crop="start" labels. r=Gijs,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D168788
2023-02-03 14:19:07 +00:00
Nicolas Chevobbe
841d5ea3cd Bug 1814350 - [devtools] Add color to DevTools autocomplete. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D168520
2023-02-03 13:52:57 +00:00
Jonathan Kew
05e026f1ff Bug 1813536 - Resolve <number> to <length> in ToResolvedValue for line-height. r=emilio
This makes the serialization of the 'font' shorthand on computed style return the line-height
as an absolute length rather than a number (font-size multiplier), which is consistent with
what the line-height longhand already returns, and with other browsers.

(See also https://github.com/w3c/csswg-drafts/issues/8385.)

Differential Revision: https://phabricator.services.mozilla.com/D168542
2023-02-02 13:35:51 +00:00
Jonathan Kew
cbfcf30602 Bug 1814408 - Fixes for font-language-override parsing and tests. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168555
2023-02-02 11:53:59 +00:00
Jonathan Kew
a72b3cc46c Bug 1813569 - Ensure font-variant-alternates values are serialized in canonical order. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168281
2023-01-31 21:07:05 +00:00
Jonathan Kew
459ee06d92 Bug 1813513 - Avoid redundantly serializing the initial value of font-weight (400) as part of the font shorthand in computed style. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168250
2023-01-30 13:27:29 +00:00
Jonathan Kew
7b1b4f78e7 Bug 1813395 - Use write_char in place of write_str when serializing single-character literals. r=emilio
Generated by running

  find servo/components/style -name "*.rs" -exec perl -p -i -e "s/write_str\(\"(.)\"\)/write_char('\1')/g" {} \;

(and then added `use std::fmt::Write;` in a couple of places to fix build errors that arose).

Differential Revision: https://phabricator.services.mozilla.com/D168217
2023-01-29 22:01:28 +00:00
Jonathan Kew
b927eaab86 Bug 1724892 - Implement the font-synthesis-{weight,style,small-caps} longhand properties, and make font-synthesis into a shorthand. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167480
2023-01-29 13:25:31 +00:00
Jonathan Kew
2d4285c3c9 Bug 1363454 - Create a pref to list icon font families that should be used even when use_document_fonts=0, overriding the browser's font prefs. r=emilio,dholbert
Some widely-used icon fonts use ligature rules to replace icon names such as "volume_up"
or "down_arrow" with icon glyphs. If the site is designed to use such a font, but the user
disables document fonts and we use our default Latin font instead, the underlying text will
be rendered instead of the intended icon.

To enable such fonts to continue to work, we provide a list of known ligature-icon fonts
and allow them to be used even when the document-fonts setting is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D167923
2023-01-27 17:32:54 +00:00
Tiaan Louw
86d43cae15 Bug 1128204 - Implement color() function from CSS specification r=emilio,supply-chain-reviewers
Colors can now be defined in different color spaces with the color()
function.

https://w3c.github.io/csswg-drafts/css-color-4/#predefined

Differential Revision: https://phabricator.services.mozilla.com/D164866
2023-01-27 12:44:18 +00:00