Commit Graph
104 Commits
Author SHA1 Message Date
Nico Burns f993b0a200 Bug 2028949: Upgrade cssparser to 0.37.0 (r=emilio,supply-chain-reviewers,firefox-style-system-reviewers)
Signed-off-by: Nico Burns <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D291829
2026-04-02 19:37:57 +00:00
Mike Hommey 1c26b8dd06 Bug 2011354 - Bump required cargo version to 1.90 for vendoring. r=firefox-build-system-reviewers,webrtc-reviewers,dom-worker-reviewers,ng,ahochheiden
We're going to update the MSRV to 1.90 soon, and we might as well remove
the hacks we have in place from bug 1982939 and bug 1995920 for vendoring
backwards compatibility early.

Differential Revision: https://phabricator.services.mozilla.com/D279628
2026-01-23 04:16:34 +00:00
Cristian Tuns ccfef2563e Revert "Bug 2011354 - Bump required cargo version to 1.90 for vendoring. r=firefox-build-system-reviewers,webrtc-reviewers,dom-worker-reviewers,ng,ahochheiden" for causing build bustages in settings.json DONTBUILD
This reverts commit 1aa3509022.
2026-01-22 23:52:45 +00:00
Mike Hommey 1aa3509022 Bug 2011354 - Bump required cargo version to 1.90 for vendoring. r=firefox-build-system-reviewers,webrtc-reviewers,dom-worker-reviewers,ng,ahochheiden
We're going to update the MSRV to 1.90 soon, and we might as well remove
the hacks we have in place from bug 1982939 and bug 1995920 for vendoring
backwards compatibility early.

Differential Revision: https://phabricator.services.mozilla.com/D279628
2026-01-22 23:11:32 +00:00
Norisz Fay 6db049f251 Revert "Bug 2011354 - Bump required cargo version to 1.90 for vendoring. r=firefox-build-system-reviewers,webrtc-reviewers,ng,ahochheiden" for causing bustages @ Cargo.toml.orig
This reverts commit 3f94558d34.
2026-01-22 01:13:37 +00:00
Mike Hommey 3f94558d34 Bug 2011354 - Bump required cargo version to 1.90 for vendoring. r=firefox-build-system-reviewers,webrtc-reviewers,ng,ahochheiden
We're going to update the MSRV to 1.90 soon, and we might as well remove
the hacks we have in place from bug 1982939 and bug 1995920 for vendoring
backwards compatibility early.

Differential Revision: https://phabricator.services.mozilla.com/D279628
2026-01-22 00:55:24 +00:00
Diego Escalante d278239b59 Bug 2000621 - Update css-parser crate from 0.35.0 to 0.36.0. r=emilio,supply-chain-reviewers,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D272882
2025-11-17 18:50:15 +00:00
Emilio Cobos Álvarez 26d6791036 Bug 1996318 - Fix vendored toml for cssparser, which had a leftover of the previous patch. 2025-10-28 20:37:45 +00:00
Emilio Cobos Álvarez d762927acf Bug 1996318 - Add display-p3-linear color-space to css color(). r=firefox-style-system-reviewers,dshin,supply-chain-reviewers
It's display-p3 without gamma encoding. cssparser change will obviously
go upstream.

Differential Revision: https://phabricator.services.mozilla.com/D270012
2025-10-28 20:12:07 +00:00
Emilio Cobos Álvarez 361b6c9ea5 Bug 1996409 - Update cssparser. r=firefox-style-system-reviewers,layout-reviewers,supply-chain-reviewers,dshin
This updates cssparser to a version that doesn't include any api break
from the version we use currently, mostly dependency bumps, and updates
relevant dependencies as well.

Differential Revision: https://phabricator.services.mozilla.com/D270085
2025-10-28 18:21:10 +00:00
Nicolas Chevobbe 80af76ba24 Bug 1950551 - [devtools] Fix source_location of CssRule::NestedDeclarations. r=emilio,supply-chain-reviewers.
Nested declarations were getting the location of their parent rule, which would
cause issue in the DevTools Inspector (e.g. for InspectorUtils.getRelativeRuleLine).
We now track the first declaration of the nested declaration to set it as the location
of the rule.

This required some changes in upstream cssparser that are vendored in this patch:
- https://github.com/servo/rust-cssparser/commit/5e477ab8195f64ed9b22ab1cf7b08685347f3879
- https://github.com/servo/rust-cssparser/commit/958a3f098acb92ddacdce18a7ef2c4a87ac3326f

Differential Revision: https://phabricator.services.mozilla.com/D238911
2025-03-12 05:58:39 +00:00
Emilio Cobos Álvarez c9c0831681 Bug 1884879 - [css-syntax] Implement recent syntax spec change to avoid parsing custom properties that look like selectors. r=firefox-style-system-reviewers,zrhoffman,supply-chain-reviewers,glandium
This implements the:

> If the first two non-<whitespace-token> values of rule’s prelude are
> an <ident-token> whose value starts with "--" followed by a
> <colon-token>, then...

From https://drafts.csswg.org/css-syntax/#consume-qualified-rule

Differential Revision: https://phabricator.services.mozilla.com/D207796
2024-04-30 23:49:44 +00:00
Zach Hoffman 03eca92f5e Bug 1858305 - Update cssparser r=firefox-style-system-reviewers,emilio
This replaces TokenSerializationType with
TokenSerializationTypeVariants, which will allow allocating a new
ComputedValue without parsing it (see D193549).

Differential Revision: https://phabricator.services.mozilla.com/D193547
2023-11-14 21:44:44 +00:00
Emilio Cobos Álvarez 3ecca9b5df Bug 1852568 - Update cssparser. r=tlouw,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187910
2023-09-12 16:03:44 +00:00
Emilio Cobos Álvarez 41ef99de7f Bug 1846745 - Update cssparser. r=tlouw,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185154
2023-08-02 16:57:37 +00:00
Mike Hommey 4e02a55287 Bug 1836658 - Update cssparser to 0.31.2. r=emilio,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D180906
2023-06-14 20:50:14 +00:00
Emilio Cobos Álvarez aeeb6edb4f Bug 1836670 - Use NonNull in cssparser::CowRcStr. r=layout-reviewers,glandium,dlrobertson
This prevents the compiler from misoptimizing this code due to undefined
behavior.

Upstream PR: https://github.com/servo/rust-cssparser/pull/345

Differential Revision: https://phabricator.services.mozilla.com/D179921
2023-06-09 11:17:44 +00:00
Emilio Cobos Álvarez bd6d8d319f Bug 1835066 - Make our nesting implementation match the new spec better. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D179687
2023-06-04 10:22:29 +00:00
Butkovits Atila 30bc067c96 Backed out changeset ab9f3266184b (bug 1815186) for causing failures at test_color_to.html. 2023-05-22 23:29:17 +03:00
Tiaan Louw 2b549f2962 Bug 1815186 - Add ColorTo to InspectorUtils to convert color to other color spaces. r=emilio,layout-reviewers,supply-chain-reviewers
This will allow calling `InspectorUtils.ColorTo("red", "lab")` and
receive `{color: "lab(54.3 80.8 69.9)", components: [54.3, 80.8, 69.9, 1.0], adjusted: false}`.

The adjusted value is always "false", because gamut checking and mapping
is not supported at the moment. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=1823363

Differential Revision: https://phabricator.services.mozilla.com/D169942
2023-05-22 17:19:14 +00:00
Emilio Cobos Álvarez 4a2ee701f5 Bug 1833151 - [css-nesting] Update cssparser again. r=tlouw,supply-chain-reviewers,zrhoffman
This changes the cssparser setup to:

 * Avoid having to do copies of the ParsingContext all over the place,
   which is useful because I plan to stash more nesting state in there.

 * Use the new RuleBodyParser which allows parsing qualified rules,
   declarations, and so on. Though we still don't use this anywhere.

The next step is to join NestedRuleParser and PropertyDeclarationParser,
so that we can parse declarations in a lot of the nested rules as well.

Differential Revision: https://phabricator.services.mozilla.com/D178053
2023-05-16 18:02:52 +00:00
Natalia Csoregi 70a9742f2d Backed out changeset 7abf96264256 (bug 1833151) for causing multiple failures e.g. 431948-1.html and test_font_feature_values_parsing.html. CLOSED TREE 2023-05-16 17:41:11 +03:00
Emilio Cobos Álvarez 378b1d1ae0 Bug 1833151 - [css-nesting] Update cssparser again. r=tlouw,supply-chain-reviewers
This changes the cssparser setup to:

 * Avoid having to do copies of the ParsingContext all over the place,
   which is useful because I plan to stash more nesting state in there.

 * Use the new RuleBodyParser which allows parsing qualified rules,
   declarations, and so on. Though we still don't use this anywhere.

The next step is to join NestedRuleParser and PropertyDeclarationParser,
so that we can parse declarations in a lot of the nested rules as well.

Differential Revision: https://phabricator.services.mozilla.com/D178053
2023-05-16 13:28:27 +00:00
Bobby Holley 6b4dfcc9d6 Bug 1830488 — Remove cssparser override. r=emilio,glandium,supply-chain-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D176817
2023-05-02 15:36:58 +00:00
Emilio Cobos Álvarez ce4769dc73 Bug 1830369 - [css-nesting] Update cssparser to allow parsing qualified rules along with declarations. r=tlouw,supply-chain-reviewers
No implementation just yet (the default QualifiedRuleParser
implementation just rejects stuff), but this is plumbing that I'd rather
get reviewed separately.

Differential Revision: https://phabricator.services.mozilla.com/D176686
2023-04-29 18:21:25 +00:00
Mike Hommey 3e3a80c617 Bug 1821255 - Update vendored rust crates with cargo 1.68. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D172094
2023-03-22 22:38:14 +00:00
pmcmanis b039d90fde Bug 1822325 - Vendor Glean 52.4.2 r=janerik,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172797
2023-03-20 17:52:38 +00:00
Norisz Fay 5400754381 Backed out changeset 6c0c507c2227 (bug 1822325) for causing build bustages CLOSED TREE 2023-03-16 19:09:57 +02:00
pmcmanis 3182a9de42 Bug 1822325 - Vendor Glean 52.4.2 r=janerik,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172797
2023-03-16 16:21:06 +00:00
Tiaan Louw 33b1bb1d7a Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-16 11:50:55 +00:00
Marian-Vasile Laza 1336fae15a Backed out changeset 160ac6b5f726 (bug 1813481) for assertion failure on nsCSSRenderingGradients.cpp. 2023-03-16 01:50:39 +02:00
Tiaan Louw 6333a5b9c0 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 21:10:43 +00:00
Butkovits Atila 517158f944 Backed out changeset deabee2364d4 (bug 1813481) for causing assertion failures at gfxUtils.cpp. CLOSED TREE 2023-03-15 19:21:19 +02:00
Tiaan Louw 16c8ab3ca9 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers,devtools-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 16:25:00 +00:00
Cristina Horotan de2e447722 Backed out changeset 00e23971f01b (bug 1813481) for causing xpcshell failures at test_css-properties-db.js CLOSED TREE 2023-03-15 11:19:59 +02:00
Tiaan Louw 362d632d19 Bug 1813481 - Allow 'none' keyword in color components r=emilio,supply-chain-reviewers
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed.  We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.

As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.

Differential Revision: https://phabricator.services.mozilla.com/D170208
2023-03-15 08:15:54 +00:00
Tiaan Louw fc4e8e8161 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
Tiaan Louw c5ec3dca48 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
Tiaan Louw abd417f53d Bug 1352757 - Add lab(), lch(), oklab(), oklch() to specified colors. r=supply-chain-reviewers,emilio
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.

Introduced a new color type AbsoluteColor.  It represents any kind of
color that has absolute numerical values.  It is also tied to a color
space and therefore can be trivially converted to another color space.

Differential Revision: https://phabricator.services.mozilla.com/D163579
2023-01-20 10:55:51 +00:00
Cosmin Sabou 92a112221d Backed out changeset 218b12b92ccb (bug 1352757) for causing failures on test_transitions_per_property.html. 2023-01-19 19:34:50 +02:00
Tiaan Louw 989c929e7c Bug 1352757 - Add lab(), lch(), oklab(), oklch() to specified colors. r=supply-chain-reviewers,emilio
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.

Introduced a new color type AbsoluteColor.  It represents any kind of
color that has absolute numerical values.  It is also tied to a color
space and therefore can be trivially converted to another color space.

Differential Revision: https://phabricator.services.mozilla.com/D163579
2023-01-19 16:17:15 +00:00
Emilio Cobos Álvarez 0307fcc6c1 Bug 1767374 - Update cssparser. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146995
2022-05-21 17:22:53 +00:00
Emilio Cobos Álvarez ca9151e8c7 Bug 1747528 - Update cssparser to fix hwb() syntax. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D134671
2021-12-25 06:24:05 +00:00
Emilio Cobos Álvarez 126843adb4 Bug 1352755 - Update cssparser to pick hwb color support. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D132238
2021-11-26 15:08:53 +00:00
Emilio Cobos Álvarez 7921536cee Bug 1728617 - Tweak at-rule parsing APIs to support cascade layers. r=boris
This needs https://github.com/servo/rust-cssparser/pull/287 and a
cssparser update.

Differential Revision: https://phabricator.services.mozilla.com/D124216
2021-09-03 09:26:10 +00:00
Emilio Cobos Álvarez 55b0020a50 Bug 1685950 - update cssparser. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D101300
2021-01-11 02:11:11 +00:00
Emilio Cobos Álvarez e7a411817c Bug 1680558 - Update cssparser to get ParserState in rule parser. r=heycam
The changes should be trivial.

The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).

The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.

Differential Revision: https://phabricator.services.mozilla.com/D98677
2020-12-04 10:47:55 +00:00
Razvan Maries 84b118470a Backed out changeset 54068f044426 (bug 1680558) for perma failures on browser_resources_stylesheets.js. CLOSED TREE 2020-12-04 06:48:30 +02:00
Emilio Cobos Álvarez 8dcd0ef302 Bug 1680558 - Update cssparser to get ParserState in rule parser. r=heycam
The changes should be trivial.

The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).

The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.

Differential Revision: https://phabricator.services.mozilla.com/D98677
2020-12-04 03:14:36 +00:00
Emilio Cobos Álvarez 6f21e42335 Bug 1601732 - Update in-tree dependencies to smallvec 1.0. r=glandium
We're vendoring it already so no reason not to. Only a couple dependencies left
after these to get rid of 0.6.

Differential Revision: https://phabricator.services.mozilla.com/D56044
2019-12-05 23:30:59 +00:00