Граф коммитов

10790 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 9331a654a0 Bug 1837664 - Improve border shorthand serialization. r=boris,devtools-reviewers
Fix some bugs caught by css/cssom/shorthand-values. In particular:

 * Make the shorthand order match the spec.
 * Omit values when we can.

Fix a subtest that wasn't correct. Shorthands can be serialized as long
as !important matches in all components.

Differential Revision: https://phabricator.services.mozilla.com/D180466
2023-06-12 10:20:46 +00:00
Emilio Cobos Álvarez 28c6afd3ce Bug 1837664 - Minor clean-ups to border shorthand parsing. r=boris
This doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D180465
2023-06-10 23:23:35 +00:00
Emilio Cobos Álvarez 77f1717931 Bug 1836848 - Avoid selecting zero-resolution images in image-set. r=dholbert
Fairly straight-forward. This fixes the two tests mentioned in comment 0
which aren't still in the repo.

Differential Revision: https://phabricator.services.mozilla.com/D180414
2023-06-09 17:42:08 +00:00
Andrew Osmond b45d20e3ac Bug 1792758 - Part 1. Add method to parse CSS filters without context for workers. r=emilio
This patch adds the ability to parse most CSS filters without a context.
OffscreenCanvas can use this on worker threads to provide support for
filter operations.

Differential Revision: https://phabricator.services.mozilla.com/D179994
2023-06-09 13:38:40 +00:00
CanadaHonk 85d2f0234e Bug 1834164 - Serialize NaN and infinity numbers r=emilio
Added NaN/inf serialization of <number> and changed calc() code to not
remove NaN/infinity in code using it.

This change is unfortunately imperfect as some things using <number>
still refuse to serialize NaN/infinity for some reason (scale()?), but
this bug/patch is just for <number> so leaving that out of scope for
this.

Also added new WPT test file for number NaN/inf serialization based
on existing serialization tests (all pass already!).

5 other WPT subtests now newly pass.

Differential Revision: https://phabricator.services.mozilla.com/D178587
2023-06-08 21:22:19 +00:00
Emilio Cobos Álvarez 7d40adb9a1 Bug 1836564 - Forbid negative CSS resolutions at parse time. r=dholbert
Apply some clang-tidy suggestions while I was going through the
ServoStyleConstsInlines while at it.

Remove one 0x test because it's tested on the same test and causes a
harness error.

Differential Revision: https://phabricator.services.mozilla.com/D180331
2023-06-08 16:57:31 +00:00
Ting-Yu Lin 463b02aca1 Bug 1837292 - Make flex-flow serialization interoperable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D180270
2023-06-08 16:37:21 +00:00
Emilio Cobos Álvarez 20cac1714b Bug 1837273 - Remove viewport rule code. r=Oriol
Turns out Servo doesn't need this either, see
https://github.com/servo/servo/pull/29850.

Differential Revision: https://phabricator.services.mozilla.com/D180264
2023-06-08 11:20:53 +00:00
Emilio Cobos Álvarez fb308bcf11 Bug 1835923 - Unify parallel and sequential traversal scheduling. r=smaug
Use in_place_scope_fifo to spawn work into the thread pool while doing
work in the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D179492
2023-06-08 08:29:55 +00:00
Mike Hommey 71f165597b Bug 1836869 - Move malloc_size_of_derive as first-party into xpcom/rust. r=supply-chain-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D180018
2023-06-07 20:45:35 +00:00
Emilio Cobos Álvarez 46e70a849e Bug 1837174 - Remove :nth-child(... of) pref. r=zrhoffman
We ship this, and the front-end uses it by default, so remove the pref.

Differential Revision: https://phabricator.services.mozilla.com/D180222
2023-06-07 14:38:45 +00:00
Boris Chiou 887d4b5da8 Bug 1820070 - Part 4: Send offset-position to the compositor. r=emilio
We send offset-position to the compositor, just like other similar
properties, e.g. offset-rotate, offset-anchor. This includes extracting
this animation value, doing serialization and sending it via IPC.

So now we can run the animation of ray() on the compositor properly.

Differential Revision: https://phabricator.services.mozilla.com/D179862
2023-06-06 21:40:52 +00:00
Boris Chiou ffe41dcabb Bug 1820070 - Part 2: Add at <position> into ray() in style system. r=emilio
We reuse PositionOrAuto here, and let "auto" represent the situation when the
author omits "at <position>" because it has a special meaning.

https://drafts.fxtf.org/motion-1/#valdef-ray-at-position

Note: No need to update css/motion/parsing/offset-path-parsing-valid.html
because Blink added some to the upstream repo already.

Differential Revision: https://phabricator.services.mozilla.com/D179860
2023-06-06 21:40:51 +00:00
Boris Chiou 069ab2df90 Bug 1820070 - Part 1: Return Err() in to_animated_zero() for offset-path. r=emilio
It's unnecessary to implement ToAnimatedZero for this property and so we
return Err(()), just like other properties which also use basic shapes,
e.g. clip-path, shape-outside.

Differential Revision: https://phabricator.services.mozilla.com/D179859
2023-06-06 21:40:51 +00:00
Emilio Cobos Álvarez cab7729f37 Bug 1836928 - Change some references to raw pointers in some FFI functions. r=glandium
Even tho https://github.com/rust-lang/rust/issues/112337 is IMO a rust
bug, it's easy to work around in our code and it doesn't really affect
expressiveness.

Differential Revision: https://phabricator.services.mozilla.com/D180065
2023-06-06 09:06:15 +00:00
Jihye Hong d4c3e2b7c4 Bug 1804761 - Make content-visibility: auto forces contain-intrinsic-size to gain an auto value, r=emilio,Oriol
When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport,
its computed value keeps changing.
This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue.

Differential Revision: https://phabricator.services.mozilla.com/D174583
2023-06-05 20:46:25 +00:00
Mike Hommey d0b7892964 Bug 1836229 - Update serde_with to 3.0.0. r=emilio,supply-chain-reviewers
We upgrade enumset alongside so that we keep only one copy of darling.

Differential Revision: https://phabricator.services.mozilla.com/D179651
2023-06-05 20:28:30 +00:00
Natalia Csoregi 4582f2cd66 Backed out changeset 8752ecf83874 (bug 1804761) for causing failures on content-visibility-070.html. CLOSED TREE 2023-06-03 02:25:55 +03:00
Jihye Hong 2597ec0e89 Bug 1804761 - Make content-visibility: auto forces contain-intrinsic-size to gain an auto value, r=emilio,Oriol
When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport,
its computed value keeps changing.
This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue.

Differential Revision: https://phabricator.services.mozilla.com/D174583
2023-06-02 20:16:46 +00:00
Norisz Fay 9c0eaab6ba Backed out changeset 9e2c7d3018de (bug 1804761) for causing wpt failures on content-visibility-068.html CLOSED TREE 2023-06-02 00:14:15 +03:00
Boris Chiou a8f0d29cf3 Bug 1559232 - Update the syntax of offset-position. r=devtools-reviewers,emilio
Now it supports "normal" keyword. Also, offset-position doesn't create
stacking context and it doesn't have offset transform, so we can
simplify CompareMotionValues() a little bit.

Note: We don't have to add test in [1] because Blink added one to WPT
upstream repo already.

[1] css/motion/parsing/offset-position-parsing-valid.html

Note: the usage of offset-position is in other bugs.

Differential Revision: https://phabricator.services.mozilla.com/D179623
2023-06-01 20:04:52 +00:00
Jihye Hong f06667d996 Bug 1804761 - Make content-visibility: auto forces contain-intrinsic-size to gain an auto value, r=emilio,Oriol
When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport,
its computed value keeps changing.
This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue.

Differential Revision: https://phabricator.services.mozilla.com/D174583
2023-06-01 18:15:43 +00:00
Emilio Cobos Álvarez b1fe05281f Bug 1834487 - Simplify border snapping. r=Oriol
Make the computed value of border-like properties app units (which is
effectively what happens in Gecko already), and clamp at computed value
time.

Differential Revision: https://phabricator.services.mozilla.com/D179481
2023-05-31 08:49:14 +00:00
Emilio Cobos Álvarez 2aeb7211bc Bug 1835681 - Rustfmt servo/. r=zrhoffman
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt

Depends on D179380

Differential Revision: https://phabricator.services.mozilla.com/D179381
2023-05-30 08:04:52 +00:00
Emilio Cobos Álvarez 81a6d008ca Bug 1835681 - Remove matches from selectors. r=zrhoffman
The std lib has had that macro for a while.

Depends on D179379

Differential Revision: https://phabricator.services.mozilla.com/D179380
2023-05-30 08:04:52 +00:00
Emilio Cobos Álvarez 8600cbca49 Bug 1835681 - Update bitflags in the dom and style crates. r=zrhoffman
Use from_bits_retain where possible to save a few instructions here and there
while at it.

Differential Revision: https://phabricator.services.mozilla.com/D179379
2023-05-30 08:04:51 +00:00
Iulian Moraru d1084a04cf Backed out changeset 7c7183d9dfac (bug 1835407) for causing multiple failures. CLOSED TREE 2023-05-29 01:46:55 +03:00
Emilio Cobos Álvarez d81b0bfdfd Bug 1835407 - Remove useless check in style sharing cache. r=dholbert
Useless by the reason described at the end of the comment, we no longer
have such a flag.

Differential Revision: https://phabricator.services.mozilla.com/D179269
2023-05-28 20:52:42 +00:00
Emilio Cobos Álvarez 3da93d1484 Bug 1834960 - Use non-locked rules for all rule types that can. r=zrhoffman
Anything that doesn't need interior mutability doesn't need Locked<>
around it.

Depends on D179059

Differential Revision: https://phabricator.services.mozilla.com/D179060
2023-05-25 16:50:22 +00:00
Zach Hoffman fc43687c95 Bug 1834960 - [css-properties-values-api] Remove Locked<> from CssRule::Property arc r=emilio
Depends on D179038

Differential Revision: https://phabricator.services.mozilla.com/D179039
2023-05-25 15:13:06 +00:00
David Shin b551599c99 Bug 1793012: Correct style sharing handling for any element that considered `:has()` in selector matching. r=emilio
For any element that anchors a `:has()` selector (i.e. Matches a selector that
contains a `:has()` on its rightmost side), we prevent style sharing altogether,
as evaluation of the `:has()` selector is required in the first place to
determine style sharing.

On the other hand, any element matching a rule containing `:has()` without
anchoring it can do style sharing for siblings, but not cousins.

Differential Revision: https://phabricator.services.mozilla.com/D176836
2023-05-25 14:35:18 +00:00
Zach Hoffman 310f58a829 Bug 1834674 - [css-properties-values-api] Share PropertyRule instance when cloning CssRule::Property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178892
2023-05-25 08:32:41 +00:00
Emilio Cobos Álvarez 76c2412bee Bug 1011468 - Flush parent document layout if needed for viewport dependent media queries. r=dshin
This is necessary to properly report changes in our document.

The remaining failures are about change event scheduling, which is a
pre-existing issue. Will fix, but in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D178917
2023-05-24 15:33:01 +00:00
Emilio Cobos Álvarez 88c3ba6a16 Bug 1834717 - More gracefully deal with broken calls into selector matching. r=dshin
If this happens again, it might be worth not matching rather than
potentially crashing. Though I guess crashing is a very good way getting
it reported soon...

Differential Revision: https://phabricator.services.mozilla.com/D178921
2023-05-24 13:24:14 +00:00
Emilio Cobos Álvarez 902827e1f9 Bug 1834717 - Properly increase the nesting level when matching :nth-child(of) selectors. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D178920
2023-05-24 12:55:12 +00:00
Emilio Cobos Álvarez 825b7b76e5 Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-24 11:13:58 +00:00
Emilio Cobos Álvarez 4e3327c5d1 Bug 1834145 - Make style parallel traversal more tunable at runtime. r=smaug
This adds two prefs to configure the parallel traversal work item size
and kick-off threshold, but otherwise shouldn't change behavior.

I switched from iterator generics to just a slice while at it, mostly
for simplicity, but there is a trade-off:

 * When switching from sequential to parallel traversal, we potentially
   pay the price of memmoving the VecDeque around once to make them a
   contiguous slice.

 * However we win in the common case of the smaller-than-work-unit size
   in which case we no longer need to copy stuff to a WorkItem. So I
   think overall this should be an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D178656
2023-05-24 06:36:08 +00:00
Iulian Moraru 729b189a97 Backed out changeset f020820671c4 (bug 1833403) for causing reftest failures on resizer-bottomend.xhtml. CLOSED TREE 2023-05-24 01:48:48 +03:00
Emilio Cobos Álvarez 6a17b5fdf8 Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-23 15:43:45 +00:00
Emilio Cobos Álvarez 43c710b234 Bug 1834144 - Make stylo thread pool size configurable via pref rather than just env. r=smaug,perftest-reviewers,jgraham,afinder
Remove a variety of code which we don't use to change the pool size. We
can just use the pref as needed in the future.

Differential Revision: https://phabricator.services.mozilla.com/D178575
2023-05-23 09:41:14 +00:00
Butkovits Atila a35652ef08 Backed out changeset 4a8d978dd79c (bug 1834164) for causing failures at 1467277-1.html. CLOSED TREE 2023-05-23 03:23:58 +03:00
CanadaHonk c0c95c1afe Bug 1834164 - Serialize NaN and infinity numbers r=emilio
Added NaN/inf serialization of <number> and changed calc() code to not
remove NaN/infinity in code using it.

This change is unfortunately imperfect as some things using <number>
still refuse to serialize NaN/infinity for some reason (scale()?), but
this bug/patch is just for <number> so leaving that out of scope for this.

Also added new WPT test file for number NaN/inf serialization based
on existing serialization tests (all pass already!).

5 other WPT subtests now newly pass.

Differential Revision: https://phabricator.services.mozilla.com/D178587
2023-05-22 21:46:42 +00:00
Norisz Fay 52188d9733 Backed out changeset e2d6154400a7 (bug 1833403) for causing reftest failures on resizer-bottomend.xhtml 2023-05-23 01:03:26 +03:00
Norisz Fay d7c74834ea Backed out changeset ff7a5040b749 (bug 1834164) for causing build bustages CLOSED TREE 2023-05-23 00:09:41 +03:00
CanadaHonk 5045f26e21 Bug 1834382 - Remove overflow-block optional-paged r=emilio
Removed overflow-block optional-paged value and reftesting as it was
removed from the spec in 2020: https://github.com/w3c/csswg-drafts/issues/5287

1 WPT subtest now newly passes.

WPT tests: https://wpt.fyi/results/css/mediaqueries/test_media_queries.html

Differential Revision: https://phabricator.services.mozilla.com/D178710
2023-05-22 20:44:09 +00:00
Emilio Cobos Álvarez 05b4470d2d Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-22 20:39:11 +00:00
Zach Hoffman 18c5efd367 Bug 1833540 - [css-properties-values-api] Implement parsing and serialization for @property at-rule r=emilio
Implemented behind the new properties-and-values pref.

Support for the CSSPropertyRule WebIDL interface is also added in this
patch, because until it's added, any attempt to access the rule using
the CSSOM would crash the browser.

Depends on D178268

Differential Revision: https://phabricator.services.mozilla.com/D178270
2023-05-22 19:11:30 +00:00
CanadaHonk 19ccb25238 Bug 1834164 - Serialize NaN and infinity numbers r=emilio
Added NaN/inf serialization of <number> and changed calc() code to not
remove NaN/infinity in code using it.

This change is unfortunately imperfect as some things using <number>
still refuse to serialize NaN/infinity for some reason (scale()?), but
this bug/patch is just for <number> so leaving that out of scope for this.

Also added new WPT test file for number NaN/inf serialization based
on existing serialization tests (all pass already!).

5 other WPT subtests now newly pass.

Differential Revision: https://phabricator.services.mozilla.com/D178587
2023-05-22 18:34:58 +00:00
Zach Hoffman 137a9cbef4 Bug 1833538 - [css-properties-values-api] Parsing and serialization for @property syntax descriptor r=emilio
Based off of @emilio's syntax parser at
<https://github.com/emilio/css-typed-om-syntax>.

Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

Differential Revision: https://phabricator.services.mozilla.com/D178268
2023-05-22 05:14:13 +00:00
CanadaHonk ebb42ca1c4 Bug 1834166 - Replace usage of std float constants with primitive type r=emilio
Replaced usage of deprecated/discouraged std float constants
(eg std::f32:INFINITY) with primitive type (eg f32::INFINITY).

Differential Revision: https://phabricator.services.mozilla.com/D178592
2023-05-21 22:32:26 +00:00
Daniel Holbert 4c2d0ab73d Bug 1834133 part 2: Remove code that's flagged as to-be-removed once layout.css.always-repaint-on-unvisited is true. r=emilio
If I'm reading the code comment correctly, this is now unreachable code,
and hence can & should be removed.

Differential Revision: https://phabricator.services.mozilla.com/D178570
2023-05-20 06:07:48 +00:00
Boris Chiou 6741f8fccc Bug 1832729 - Reject empty svg path string for basic shape path function. r=emilio
Per CSS shape spec, the empty path string is invalid. However, for SVG
d property, the EBNF allows the path data string in the d property to be
empty. We just disable the rendering of the path.

Note: only offset-path and clip-path are affected.

Differential Revision: https://phabricator.services.mozilla.com/D178123
2023-05-17 19:58:11 +00:00
Emilio Cobos Álvarez 3e7b667a68 Bug 1833536 - [css-nesting] Do a first pass at parsing nested rules mixed with declarations. r=tlouw
Plumb everything up. This factors out declaration and rule parsing so
we share the code with the regular declaration parser.

This could be made a bit nicer in the future. We need to decide what to
do for @page and @keyframe (it seems conditional rules inside ought to
work, but that's not so easy because per spec we create a nested style
rule).

But this is a first pass that passes a good chunk of the tests. There
are other fixups to cssom, and I think some of the tests we fail are
actually wrong...

Differential Revision: https://phabricator.services.mozilla.com/D178266
2023-05-17 18:18:29 +00:00
Emilio Cobos Álvarez 7e685b737a Bug 1363754 - Disable NSCAP_FEATURE_USE_BASE. r=smaug
This is a relatively small code size regression (130k on windows and
macOS, 180k on Linux), for a few high confidence improvements in
speedometer 3. See link in the bug.

If this sticks, we can actually clean up a bunch of code, and eventually
unify RefPtr and nsCOMPtr. But I want this to be on the tree for a while
before doing more aggressive refactorings / actually removing the code.

Differential Revision: https://phabricator.services.mozilla.com/D178267
2023-05-17 16:59:24 +00:00
David Shin 9333fde7cf Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-17 12:56:53 +00:00
Sandor Molnar 71c2b3db49 Backed out 3 changesets (bug 1809568) for causing build bustages in layout/generic/nsLineLayout.cpp CLOSED TREE
Backed out changeset 6c5bbcbafce9 (bug 1809568)
Backed out changeset b518133a5c34 (bug 1809568)
Backed out changeset 2407088e9b49 (bug 1809568)
2023-05-17 01:34:42 +03:00
David Shin 5f07daa337 Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-16 20:48:17 +00:00
Emily McDonough 866896112c Bug 1828020 - Remove the layout.css.named-pages.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175438
2023-05-16 20:32:11 +00:00
Sandor Molnar a50a2052fe Backed out 3 changesets (bug 1809568) for causing node devtools failures in devtools/client/debugger/src/components/test/QuickOpenModal.spec.js CLOSED TREE
Backed out changeset 56ce741da8f5 (bug 1809568)
Backed out changeset 5a91ce4870e4 (bug 1809568)
Backed out changeset cc00422f050a (bug 1809568)
2023-05-16 22:22:31 +03:00
David Shin 9e3157e78c Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-16 19:02:10 +00:00
Emilio Cobos Álvarez 3abb2e9d89 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 ca7c470a98 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 1885448293 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
Emilio Cobos Álvarez 3c06051877 Bug 1833229 - Move a bit declaration_block and cascade modules. r=boris
So that they aren't imported via #[path]. This allows cargo to see them
even before building.

Differential Revision: https://phabricator.services.mozilla.com/D178105
2023-05-15 20:57:59 +00:00
Cristian Tuns 4d57ea669d Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp CLOSED TREE
Backed out changeset e862b1560caa (bug 1809568)
Backed out changeset 0a20b91de67b (bug 1809568)
Backed out changeset 6060fc7d49d4 (bug 1809568)
2023-05-15 13:03:03 -04:00
David Shin 40fa43a69d Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-15 14:34:25 +00:00
David Shin 8057b837d5 Bug 1775267: Disallow :has selector nesting. r=emilio
Unlike the `ParseRelative` flag, which turns on relative selector parsing for
that parsing level only, the newly added `DISALLOW_RELATIVE_SELECTOR` flag
propagates through nested parsing calls.

Differential Revision: https://phabricator.services.mozilla.com/D176807
2023-05-15 13:33:01 +00:00
Emilio Cobos Álvarez 9d38cfb2a9 Bug 1832803 - Remove some magic from the bindings. r=boris
This simplifies a tiny bit our bindings in some places, and complicates
it in others, but over all I think it's better.

It requires a bit more manual code in the rust side to drop and cast the
relevant pointers (which was done implicitly before), but it's a lot
less magic than it used to be, and that's all autogenerated so consumers
don't need to care about it.

The set up is still not ideal. I don't like that we rely on destructors
running in both sides of the FFI boundary, but that's for another day.

This is the last usage of RawOffsetArc, so remove that. We now support
proper Arc<> in structs (GridTemplateAreas uses it), so I don't think
we'll need it any time soon.

Differential Revision: https://phabricator.services.mozilla.com/D177905
2023-05-12 23:33:12 +00:00
Emilio Cobos Álvarez a7526d2a34 Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 22:31:38 +00:00
Butkovits Atila cc740ca292 Backed out changeset f6e3d050b3e7 (bug 1832173) for causing bustages at CanvasRenderingContext2D.cpp. CLOSED TREE 2023-05-13 01:16:03 +03:00
Emilio Cobos Álvarez 7fc0f42cee Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 21:37:19 +00:00
Emilio Cobos Álvarez 3a99b7feb9 Bug 1831136 - Plumb android text scale via nsLookAndFeel. r=geckoview-reviewers,dholbert,owlish
That's how we do it for all other platforms. Do this rather than via a
custom mostly-untested pref, which allows us to simplify text zoom
handling.

Differential Revision: https://phabricator.services.mozilla.com/D177062
2023-05-11 19:01:19 +00:00
Emilio Cobos Álvarez 2fa8d243ad Bug 1832481 - Container units should prevent us from using the rule cache. r=dshin
Much like with font-relative units, when they're used for a
non-inherited property we need to avoid using the rule cache.

This is because two elements matching the same rules won't get
guaranteed-equal non-inherited style structs.

Depends on D177732

Differential Revision: https://phabricator.services.mozilla.com/D177733
2023-05-11 13:29:32 +00:00
Emilio Cobos Álvarez 5cf9767e55 Bug 1832481 - Clean up length handling. r=dshin
No behavior change, but using Self is shorter and while I'm touching
this code might as well clean it up a little bit.

Differential Revision: https://phabricator.services.mozilla.com/D177732
2023-05-11 13:29:32 +00:00
Emilio Cobos Álvarez 924c311c4b Bug 1831841 - Remove dead GTK menu styling code. r=dao,stransky
Differential Revision: https://phabricator.services.mozilla.com/D177369
2023-05-11 08:57:11 +00:00
Emilio Cobos Álvarez 6f904444e8 Bug 1832173 - Remove HasArcFFI for AnimationValue. r=boris
See previous patches for context.

Differential Revision: https://phabricator.services.mozilla.com/D177622
2023-05-11 08:25:36 +00:00
Emilio Cobos Álvarez ee6ab6eb2d Bug 1832173 - Remove HasArcFFI for some types. r=boris
See blocked bug.

For non-Locked types we can just use the same underlying type at the FFI
boundary. Port StylesheetContents and CssUrlData to this set-up.
CssUrlData is already generated by cbindgen anyways.

Differential Revision: https://phabricator.services.mozilla.com/D177559
2023-05-11 00:36:24 +00:00
Emilio Cobos Álvarez a5756102c2 Bug 1778909 - Add an API to parse an absolute length without any other context. r=jfkthame
This should allow making these work on canvas.

Differential Revision: https://phabricator.services.mozilla.com/D177074
2023-05-10 23:07:31 +00:00
Emilio Cobos Álvarez 78b50f098d Bug 1822118 - display: inline list-item is also a line participant. r=dshin
So the line break suppression flags should be propagated through it.

Otherwise ruby invariants might break, leading to a nullptr crash in
this case.

On debug builds the assertion was this one:

  https://searchfox.org/mozilla-central/rev/e6cb503ac22402421186e7488d4250cc1c5fecab/layout/generic/nsRubyBaseContainerFrame.cpp#631

Differential Revision: https://phabricator.services.mozilla.com/D177093
2023-05-10 14:14:03 +00:00
Tiaan Louw 806698afd0 Bug 1831509 - Hardening color checks r=emilio
Avoid trying to resolve a currentcolor when a foreground color is not
available.

Differential Revision: https://phabricator.services.mozilla.com/D177368
2023-05-10 13:39:42 +00:00
Emilio Cobos Álvarez 0af7b8eadb Bug 1832065 - Remove HasFFI as well. r=boris
After the previous patches we only have one trait which we should also
tweak / rework, so let's put it all on that single trait.

Differential Revision: https://phabricator.services.mozilla.com/D177515
2023-05-09 22:50:20 +00:00
Emilio Cobos Álvarez 5df0399104 Bug 1832065 - Remove HasSimpleFFI. r=boris
It's completely unsused and we don't want to use it any time soon, see
bug 1831539 and related.

Differential Revision: https://phabricator.services.mozilla.com/D177497
2023-05-09 22:38:34 +00:00
Stanca Serban 9c569f521c Backed out 2 changesets (bug 1832065) for glue.rs related bustages. CLOSED TREE
Backed out changeset 1260faa596e0 (bug 1832065)
Backed out changeset c64412c2e6fe (bug 1832065)
2023-05-09 21:47:00 +03:00
Emilio Cobos Álvarez a37f84ec9c Bug 1832065 - Remove HasFFI as well. r=boris
After the previous patches we only have one trait which we should also
tweak / rework, so let's put it all on that single trait.

Depends on D177497

Differential Revision: https://phabricator.services.mozilla.com/D177515
2023-05-09 17:44:17 +00:00
Emilio Cobos Álvarez a94cd49ae4 Bug 1832065 - Remove HasSimpleFFI. r=boris
It's completely unsused and we don't want to use it any time soon, see
bug 1831539 and related.

Differential Revision: https://phabricator.services.mozilla.com/D177497
2023-05-09 17:44:17 +00:00
Emilio Cobos Álvarez 1c967006ab Bug 1831539 - Remove HasBoxFFI. r=boris
HasBoxFFI and HasArcFFI aren't great, see bug 1831242 as for examples of
why.

HasArcFFI requires a bit more care, but HasBoxFFI doesn't give us much
benefit. Instead use the same type in the FFI boundary.

Differential Revision: https://phabricator.services.mozilla.com/D177252
2023-05-09 11:07:26 +00:00
Emilio Cobos Álvarez 3e7f0a1f02 Bug 1829540 - when iterating over a selector to find a bucket, choose the rightmost. r=zrhoffman
This restores the pre-regression behavior by choosing the later class in
cases where folks use stuff like `.foo.bar`.

This matches other browsers too.

Differential Revision: https://phabricator.services.mozilla.com/D177398
2023-05-09 09:32:28 +00:00
Boris Chiou 3e70138099 Bug 1814444 - Part 2: Support self keyword for scroll(). r=emilio
`self` keyword specifies to use the element’s own principal box as the
scroll container. If the principal box is not a scroll container, then the
scroll progress timeline is inactive.

Differential Revision: https://phabricator.services.mozilla.com/D175707
2023-05-04 21:35:14 +00:00
Boris Chiou 9c425acafe Bug 1814444 - Part 1: Update the syntax of scroll() to accept <scroller> and <axis> in any order. r=emilio
The order of <scroller> and <axis> doesn't matter in the parser.
However, we serialize <scroller> first, if it is not the initial value.

Differential Revision: https://phabricator.services.mozilla.com/D173906
2023-05-04 21:35:14 +00:00
Emilio Cobos Álvarez 665c208b48 Bug 1830746 - Rework -x-text-zoom to allow disabling text zoom and min-font-size separately. r=jfkthame,layout-reviewers
And use it instead of explicit document checks. This centralizes where
we check for it.

IsChromeDoc is relatively cheap, but this bug wants to also check for
PDF.js which is a bit more expensive.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D176940
2023-05-03 15:02:40 +00:00
Tiaan Louw 2f2f3fd797 Bug 1819893 - Add negate node to use in place of mul_by in sum nodes r=emilio
Sum nodes would use mul_by to negate nodes to do subtraction, but some
nodes are not distributive.  This patch adds a negate node, so that the
operations inside these negate nodes can be resolved first and then the
"subtraction" can be applied.

Differential Revision: https://phabricator.services.mozilla.com/D172941
2023-05-03 14:04:28 +00:00
Boris Chiou 97804f78e4 Bug 1808410 - Part 2: Add animation-timeline: view() in style system. r=emilio
Support view() notation for animation-timeline:
  `<view()> = view( [ <axis> || <'view-timeline-inset'> ]? )`

We move AnimationTimeline and its related types into the generics folder,
and define two new structs for scroll() and view().

Note:
1. The syntax of scroll() doesn't match the current version of the spec.
   I will update it in Bug 1814444.
2. We will handle the creation/usage of the Anonymous View Progress Timelines
   in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D173904
2023-05-02 22:47:28 +00:00
Boris Chiou 2e30d8e41a Bug 1808410 - Part 1: Move animation-related values from box.rs/ui.rs to animation.rs. r=emilio
Although we store animation and transition style values in StyleUIReset and
define their properties in longhands/ui.mako.rs, but we may move them in
the future if this style struct becomes too large. So let's move the
definition of their values to an independent module, animation, so we
don't have to worry about this again.

This patch doesn't change any other things. Only move code.

Differential Revision: https://phabricator.services.mozilla.com/D173903
2023-05-02 22:47:28 +00:00
CanadaHonk 1829e4631d Bug 1830656 - Refactor ImportLayer into enum r=emilio
Refactored ImportLayer into an enum instead of a struct and using
Option everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D176793
2023-05-01 21:56:33 +00:00
Sandor Molnar f902ec02ed Backed out changeset 155b9abe4a7e (bug 1830656) for causing dt and wpt failures in layer-rules-cssom.html / browser_rules_layer.js CLOSED TREE 2023-05-01 22:40:04 +03:00
Cosmin Sabou 543905e105 Backed out 3 changesets (bug 1809568) for causing build bustages on nsBlockFrame.cpp. CLOSED TREE
Backed out changeset eaa7fe280317 (bug 1809568)
Backed out changeset ab0f2bcb2d9b (bug 1809568)
Backed out changeset a481bf06452b (bug 1809568)
2023-05-01 21:42:14 +03:00
David Shin 16b1b29afc Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-01 17:04:26 +00:00
CanadaHonk eb9199d00d Bug 1830656 - Refactor ImportLayer into enum r=emilio
Refactored ImportLayer into an enum instead of a struct and using
Option everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D176793
2023-05-01 16:58:00 +00:00
CanadaHonk df62a3d803 Bug 1823295 - Serialize NaN and infinity percentages correctly r=emilio
NaN and infinity percentages are now serialized as expected.

Also added some new WPT tests as percentages were previously untested
and added some spec comments to previous NaN/inf serialization code.

Differential Revision: https://phabricator.services.mozilla.com/D176726
2023-05-01 14:50:32 +00:00
Natalia Csoregi a4769113a6 Backed out changeset 8b600348f317 (bug 1830656) for causing failures on browser_rules_conditional_import.js. CLOSED TREE 2023-05-01 18:43:20 +03:00
Iulian Moraru c9ffb3ffa8 Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp. CLOSED TREE
Backed out changeset 573dc0bd9554 (bug 1809568)
Backed out changeset b8401947aea0 (bug 1809568)
Backed out changeset 7ecabe895121 (bug 1809568)
2023-05-01 17:59:21 +03:00
CanadaHonk e50ec05b89 Bug 1830656 - Refactor ImportLayer into enum r=emilio
Refactored ImportLayer into an enum instead of a struct and using
Option everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D176793
2023-05-01 14:06:02 +00:00
David Shin c7ff30bfe7 Bug 1809568 - Part 1: Implement parsing for `baseline-source`. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173884
2023-05-01 13:44:43 +00:00
Emilio Cobos Álvarez 8d2220d803 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
Emilio Cobos Álvarez 9b2cb69ca0 Bug 1830134 - [css-nesting] Process nested rules at cascade data rebuild. r=firefox-style-system-reviewers,zrhoffman
More nesting plumbing. Still does nothing because we don't parse the
nested rules.

Should be trivial to prove this patch doesn't change any behavior so
far, but I want to land it on its own because it can have performance
implications.

This follows the pattern of what we do with other rules like layers and
container conditions, that is, keep the ancestor selectors in a stack,
and poke at the last one in order to replace the ancestor.

This changes the behavior of replace_parent_selector as with the newer
version of the spec, stuff like:

  div {
    .foo {
      stuff
    }
  }

Should work as `div .foo`. A test is added for this case.

Differential Revision: https://phabricator.services.mozilla.com/D176560
2023-04-28 00:02:45 +00:00
Emilio Cobos Álvarez 7a5c30a7a8 Bug 1830109 - [css-nesting] Add storage for nested rules. r=firefox-style-system-reviewers,zrhoffman
Allow to have a CssRules list inside a StyleRule.

This only introduces the storage and serialization code for them, but we
still don't parse it.

Differential Revision: https://phabricator.services.mozilla.com/D176550
2023-04-28 00:02:45 +00:00
Emilio Cobos Álvarez 873d09c98e Bug 1830342 - Enable all math functions on chrome code. r=dholbert
They should be stable.

Not sure this is worth writing a test for since the idea is that this
code goes away eventually.

Differential Revision: https://phabricator.services.mozilla.com/D176680
2023-04-27 19:52:28 +00:00
Emilio Cobos Álvarez 3f56c738cc Bug 1830141 - Share code to parse @import layer + supports(). r=CanadaHonk
The duplication was slightly annoying me :)

Differential Revision: https://phabricator.services.mozilla.com/D176564
2023-04-26 19:18:43 +00:00
CanadaHonk c3682adcc9 Bug 1829430 - Fix @import supports() parsing position r=emilio
Fixed @import supports() being parsed in the incorrect position as per spec.

Also added more WPT tests for layer and supports in one @import.

Differential Revision: https://phabricator.services.mozilla.com/D176193
2023-04-22 21:46:15 +00:00
Narcis Beleuzu 80eda37a2d Backed out changeset 59455d15fb58 (bug 1829430) for wpt failure on import-conditions.html . CLOSED TREE 2023-04-22 16:17:43 +03:00
CanadaHonk e327a756ba Bug 1829430 - Fix @import supports() parsing position r=emilio
Fixed @import supports() being parsed in the incorrect position as per spec.

Also added more WPT tests for layer and supports in one @import.

Differential Revision: https://phabricator.services.mozilla.com/D176193
2023-04-22 12:30:30 +00:00
CanadaHonk 4b5e00b09f Bug 1829376 - Fix @import serialization order r=emilio
Fixed @import serialization being out of (spec) order.

Also added some more WPT tests.

Differential Revision: https://phabricator.services.mozilla.com/D176182
2023-04-21 21:09:39 +00:00
Emilio Cobos Álvarez fa37578f52 Bug 1828413 - Use more non-native rendering of menus. r=stransky
This makes our menus closer to GTK4, and depends less on the native menu
rendering etc. Thunderbird already does this to some extent.

Leave the old code behind a pref for now (just in case). Also fix some
code in nsNativeTheme::GetContentState (fixes rendering of radio menu
items).

Differential Revision: https://phabricator.services.mozilla.com/D175664
2023-04-20 11:42:44 +00:00
Cristina Horotan 8b53b2373f Backed out changeset c099d64b17e6 (bug 1828413) for causing multiple Menu related failures. CLOSED TREE 2023-04-19 14:51:33 +03:00
Emilio Cobos Álvarez a71dc7a55b Bug 1828413 - Use more non-native rendering of menus. r=stransky
This makes our menus closer to GTK4, and depends less on the native menu
rendering etc. Thunderbird already does this to some extent.

Leave the old code behind a pref for now (just in case). Also fix some
code in nsNativeTheme::GetContentState (fixes rendering of radio menu
items).

Differential Revision: https://phabricator.services.mozilla.com/D175664
2023-04-19 10:08:30 +00:00
Jonathan Kew 9c1b2512f5 Bug 1826629 - Implement CSS and rendering (but not copy/paste) support for the (non-standard) -webkit-text-security property. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D174951
2023-04-18 11:47:07 +00:00
Emilio Cobos Álvarez 26057c5cec Bug 1828316 - Avoid linear search to check for custom property presence. r=firefox-style-system-reviewers,zrhoffman
The test-case in the next patch from 10s to a couple hundred
milliseconds on my machine. No behavior change other than that.

Differential Revision: https://phabricator.services.mozilla.com/D175612
2023-04-18 11:09:31 +00:00
Mirko Brodesser c47bb134d2 Bug 1825807: part 1) Replace popover's ':open' and ':closed' pseudo-classes with ':popover-open'. r=emilio
See https://github.com/whatwg/html/pull/9077.

Differential Revision: https://phabricator.services.mozilla.com/D175223
2023-04-17 12:18:03 +00:00
Emilio Cobos Álvarez 96d18c725e Bug 1828183 - Remove cascade layers pref. r=CanadaHonk
These have been enabled by default for quite a while.

Differential Revision: https://phabricator.services.mozilla.com/D175513
2023-04-14 19:05:28 +00:00
CanadaHonk 4d4ecbb77c Bug 1427715 - Implement supports() syntax for @import rules r=emilio
Implemented supports conditions using supports() in @import rules as per
CSS Cascading and Inheritance Level 4.

Locked behind new pref, layout.css.import-supports.enabled,
only enabled in nightlies in this patch.

Also added new WPT tests for @import supports() generally.

Spec: https://drafts.csswg.org/css-cascade-4/#conditional-import
WPT tests: https://wpt.fyi/results/css/css-cascade/import-conditions.html

Differential Revision: https://phabricator.services.mozilla.com/D172622
2023-04-13 09:02:30 +00:00
Noemi Erli e75f4068fb Backed out 2 changesets (bug 1825807) for causing failures in /browser_parsable_css.js CLOSED TREE
Backed out changeset 454a01f16f5b (bug 1825807)
Backed out changeset a82344255795 (bug 1825807)
2023-04-13 12:24:41 +03:00
Mirko Brodesser c888f7c357 Bug 1825807: part 1) Replace popover's ':open' and ':closed' pseudo-classes with ':popover-open'. r=emilio
See https://github.com/whatwg/html/pull/9077.

Differential Revision: https://phabricator.services.mozilla.com/D175223
2023-04-13 07:43:57 +00:00
Emilio Cobos Álvarez 3a961b3d9a Bug 1121792 - Allow to use ThinVec/nsTArray in the style crate. r=jfkthame,layout-reviewers
This allows to clean-up the previous patches by using a single ThinVec
(which stores length / capacity along with the allocation).

Differential Revision: https://phabricator.services.mozilla.com/D175029
2023-04-12 21:58:29 +00:00
Jonathan Kew 40a813f9c6 Bug 1121792 - Accept a comma-separated list of language codes in the :lang() pseudo. r=emilio
This is the other extension to the :lang() pseudo-class in  Selectors-4.
(Also supported in Safari.)

Depends on D174999

Differential Revision: https://phabricator.services.mozilla.com/D175000
2023-04-12 21:46:47 +00:00
Narcis Beleuzu 8d21434933 Backed out 6 changesets (bug 1121792) for mochitest failures in malloc_usable_size . CLOSED TREE
Backed out changeset 879211a561cc (bug 1121792)
Backed out changeset 195d689a6b12 (bug 1121792)
Backed out changeset 9726f4b6035a (bug 1121792)
Backed out changeset be24fa5c3e70 (bug 1121792)
Backed out changeset 2e4e3ae6cddd (bug 1121792)
Backed out changeset e535870263d8 (bug 1121792)
2023-04-12 22:26:19 +03:00
Emilio Cobos Álvarez 60a3fc507d Bug 1121792 - Allow to use ThinVec/nsTArray in the style crate. r=jfkthame,layout-reviewers
This allows to clean-up the previous patches by using a single ThinVec
(which stores length / capacity along with the allocation).

Differential Revision: https://phabricator.services.mozilla.com/D175029
2023-04-12 16:05:13 +00:00
Jonathan Kew a3fca4a96b Bug 1121792 - Accept a comma-separated list of language codes in the :lang() pseudo. r=emilio
This is the other extension to the :lang() pseudo-class in  Selectors-4.
(Also supported in Safari.)

Depends on D174999

Differential Revision: https://phabricator.services.mozilla.com/D175000
2023-04-12 16:05:11 +00:00
CanadaHonk 2d520652e0 Bug 1794628 - Implement inverted-colors media feature r=geckoview-reviewers,morgan,emilio,m_kato,cmartin
Implemented the inverted-colors media feature from Media Queries Level 5
for all platforms.
Spec: https://drafts.csswg.org/mediaqueries-5/#inverted

Platform specific implementations:
- Windows: Checks system color filter setting, and if it is inverted
  (note: Windows does not live update due to having to read a reg key)
- Mac: Checks dedicated inverted accessibility system setting
- Android: Checks dedicated inverted system setting
- Linux: No GTK API exposes anything like it so always none

Locked behind new pref `layout.css.inverted-colors.enabled`,
always off by default for now.

Also added new WPT tests (none previously).

Other browsers:
- WebKit: shipped since Safari 9.1 (Jan 2017)
- Blink: no signal

Test page: https://goose.icu/inverted-colors

Differential Revision: https://phabricator.services.mozilla.com/D173201
2023-04-11 13:34:00 +00:00
Zach Hoffman 4c155dc48d Bug 1808156 - Remove MatchingContext mutability FIXME that no longer applies r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175028
2023-04-10 08:47:18 +00:00
Emilio Cobos Álvarez 641fa20731 Bug 1825825 - Simplify NAC setup. r=smaug
Make all UA widgets also NAC.

Keep the UA widget flag but break at anonymous subtree boundaries, so
that only nodes inside the UA widget directly (and not NAC from those)
get the flag.

This is important because two callers depend on this difference:

 * The style system, since we still want to match content rules from
   stylesheets in the UA widget. We also match user rules, which is a
   bit sketchy, but that was the previous behavior, will file a
   follow-up for that.

 * The reflector code, since we want the scope for UA widgets to not
   include the NAC nodes inside that UA widget. nsINode::IsInUAWidget
   got it wrong.

After this patch, ChromeOnlyAccess is equivalent to
IsInNativeAnonymousSubtree, so we should probably unify the naming.
That's left for a follow-up patch because I don't have a strong
preference.

Differential Revision: https://phabricator.services.mozilla.com/D174310
2023-04-05 09:19:15 +00:00
Emilio Cobos Álvarez 54c93e0a91 No bug - Fix some spec links. DONTBUILD
Trivial, comment-only

Differential Revision: https://phabricator.services.mozilla.com/D174474
2023-04-03 13:45:57 +00:00
Mike Hommey 93784bacca Bug 1825478 - Update bindgen to 0.64. r=emilio,necko-reviewers,supply-chain-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D174054
2023-03-30 21:05:14 +00:00
Emilio Cobos Álvarez 2d0e69f4a1 Bug 1824957 - Remove a bunch of now completely dead XUL layout code. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,TYLin
And some related tests.

A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.

Differential Revision: https://phabricator.services.mozilla.com/D173819
2023-03-29 21:23:55 +00:00
CanadaHonk e276d6225d Bug 1166581 - Implement scripting media feature r=emilio
Implemented the scripting media feature.

Not locked behind a pref as it does not do anything new or particularly
give new data which could be used for fingerprinting (see <noscript>,
etc).

Also added new WPT tests (none previously). Not supported in any other
browsers yet.

Test page: https://goose.icu/media-scripting

Differential Revision: https://phabricator.services.mozilla.com/D172995
2023-03-28 08:01:49 +00:00
CanadaHonk bb6c288d83 Bug 1820412 - CSS comp funcs should handle NaN contagiously r=emilio
If NaN is given as any input to CSS comp funcs (min/max/clamp), it
should return NaN. Does not cover simplification (see Bug 1820412).

Adjusted WPT test expectations, 18 newly pass. 🎉

Differential Revision: https://phabricator.services.mozilla.com/D171659
2023-03-28 07:24:46 +00:00
Boris Chiou 32323a3e4b Bug 1824426 - Remove layout.css.d-property.enabled. r=devtools-reviewers,longsonr
This feature was shipped in Fx97, and it seems we don't need this pref
anymore.

Differential Revision: https://phabricator.services.mozilla.com/D173591
2023-03-27 20:49:41 +00:00
Emilio Cobos Álvarez c661ccc586 Bug 1822432 - Restyle pseudo-elements as well on part attribute changes. r=jwatt
Refactor a bit the code to unify how we deal with this conditional
restyling (we had similar code for
MustCascadeChildrenIfInheritResetStyle).

Differential Revision: https://phabricator.services.mozilla.com/D172890
2023-03-27 18:17:56 +00:00
Emilio Cobos Álvarez ee5f6df022 Bug 1823214 - Minor clean ups on top of the previous patch. r=tlouw
Remove now dead Mul implementations. Use Self rather than the whole type
to shrink a bit the code.

Differential Revision: https://phabricator.services.mozilla.com/D173143
2023-03-27 08:57:35 +00:00
Tiaan Louw 28d119ff9e Bug 1823214 - Refactor mul_by fn into map fn. r=emilio
Refactor the mul_by function on leafs into a more generic map function
that can be used for more operations like abs, signum and mul.

Differential Revision: https://phabricator.services.mozilla.com/D172936
2023-03-27 08:05:47 +00:00
Boris Chiou be7a7167d0 Bug 1824246 - Use auto as the initial value for view-timeline-inset. r=emilio
Per the proposal in https://github.com/w3c/csswg-drafts/issues/7747,
we change view-timeline-inset to have an initial value of auto.

Differential Revision: https://phabricator.services.mozilla.com/D173487
2023-03-24 19:16:42 +00:00
Cathie Chen 0d88e41955 Bug 1822521 - Update UA stylesheet for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172700
2023-03-22 17:51:09 +00:00
Emilio Cobos Álvarez 270562464f Bug 1823545 - Reuse declaration block with SVG presentation attributes. r=smaug
Ideally we'd only update the attributes that actually changed. That's a
bit more work I can try to look into, but this and bug 1823686 should
improve things here.

Differential Revision: https://phabricator.services.mozilla.com/D173162
2023-03-22 18:12:20 +00:00
Emilio Cobos Álvarez c062dcce43 Bug 1823642 - Optimize [id=foo] as #foo in querySelector/All. r=zrhoffman
This page seems to rely on this optimization being present. Optimizing
it is straight-forward. Why do they do that instead of using the #foo
syntax? Who knows.

Differential Revision: https://phabricator.services.mozilla.com/D173148
2023-03-21 21:40:12 +00:00
Zach Hoffman 96361c5339 Bug 1823602 - Check that the lowercase attribute is different before trying to track it r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173112
2023-03-21 10:23:54 +00:00
Marian-Vasile Laza f078cd0274 Backed out changeset 18595f6364ea (bug 1822521) for wpt failures on popover-focus-child-dialog.html. CLOSED TREE 2023-03-20 21:17:55 +02:00
Cathie Chen 1529996e68 Bug 1822521 - Update UA stylesheet for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172700
2023-03-20 17:01:11 +00:00
Tiaan Louw 03828b4c67 Bug 1822041 - Color interpolation takes none keyword into account r=emilio,layout-reviewers
Now that the none keyword is available, we can take it into account when
interpolating colors following the rules from the spec here:

https://drafts.csswg.org/css-color-4/#interpolation-missing

Differential Revision: https://phabricator.services.mozilla.com/D172666
2023-03-19 10:09:53 +00:00
Marian-Vasile Laza a8ccc1f226 Backed out changeset 6dc913a054e9 (bug 1822521) for bc failures on browser_parsable_css.js. CLOSED TREE 2023-03-18 16:06:04 +02:00
Cathie Chen c289513d2f Bug 1822521 - Update UA stylesheet for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172700
2023-03-18 12:56:18 +00:00
Tiaan Louw 1da980f4b4 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 b1bb1b3c9b Backed out changeset 160ac6b5f726 (bug 1813481) for assertion failure on nsCSSRenderingGradients.cpp. 2023-03-16 01:50:39 +02:00
Tiaan Louw a7a28cf7a6 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 45514b96bb Backed out changeset deabee2364d4 (bug 1813481) for causing assertion failures at gfxUtils.cpp. CLOSED TREE 2023-03-15 19:21:19 +02:00
David Shin f144ecaef2 Bug 1820835: `:has` relative selector matching, with no caching/filtering. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172019
2023-03-15 16:39:33 +00:00
Tiaan Louw 29eaf0b759 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
Emilio Cobos Álvarez cfd61f226f Bug 1427715 - Add (unused for now) parsing for support conditions in @import. r=CanadaHonk
You can use this as:

  input.try_parse(SupportsCondition::parse_for_import).ok()

Or so.

Differential Revision: https://phabricator.services.mozilla.com/D172668
2023-03-15 12:41:26 +00:00
Cristina Horotan d17ba6a363 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 56e7e7777d 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
Zach Hoffman 4f5c70443d Bug 1818151 - Record attribute dependencies within the selector list of :nth-child(... of <selector list>) r=emilio
There are separate filters for IDs, classes, attribute local names, and
element state.

Also, we invalidate siblings of elements matched against the selector
list of :nth-child(... of <selector list>) by marking matched elements
with NODE_HAS_SLOW_SELECTOR_NTH_OF.

The only remaining invalidation case invalidation case is
`:nth-child(An+B of :has())` (bug 1818155), which should not block
shipping `layout.css.nth-child-of.enabled`, because :has(...) is still
being implemented (bug 418039).

Depends on D172352

Differential Revision: https://phabricator.services.mozilla.com/D171936
2023-03-15 06:56:21 +00:00
Zach Hoffman 2e75c9c9f6 Bug 1480746 - Apply selector flags to the shadow root r=emilio
Because restyle events cannot be posted for non-element nodes like the
shadow root, a child's siblings are restyled directly if its parent has
NODE_HAS_SLOW_SELECTOR or NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS but that
parent is the shadow root.

Drive-by, but braces were also added to some single-line "if" statements
in RestyleManager.

Differential Revision: https://phabricator.services.mozilla.com/D172352
2023-03-14 21:23:05 +00:00
Emilio Cobos Álvarez 8d249fa588 Bug 1684958 - Support rendering content: <gradient> images. r=dholbert,devtools-reviewers
We implemented support for list-style-image anyways.

Differential Revision: https://phabricator.services.mozilla.com/D172343
2023-03-14 12:11:34 +00:00
CanadaHonk 3bbca01da2 Bug 1736914 - Implement prefers-reduced-transparency media query r=geckoview-reviewers,emilio,jonalmeida,ohall
Implemented the prefers-reduced-transparency media query for all
platforms.

Windows and Mac have specific settings which are used, others (Android
and Linux/GTK) have it enabled if prefers-reduced-motion is also enabled
as there is no dedicated setting to check.

Locked behind new pref `layout.css.prefers-reduced-transparency.enabled`,
off by default always for now.

Also added new WPT tests (none previously).

Demo video: https://goose.icu/firefox_prt.mp4
Test page: https://goose.icu/prefers-reduced-transparency

Differential Revision: https://phabricator.services.mozilla.com/D172424
2023-03-13 21:30:17 +00:00
Emilio Cobos Álvarez bbb3605eb1 Bug 1821514 - Simplify/remove a couple other length operations. r=CanadaHonk
Differential Revision: https://phabricator.services.mozilla.com/D172430
2023-03-13 17:49:58 +00:00
Emilio Cobos Álvarez bd6c2daf15 Bug 1821514 - Fix a couple minor issues with the previous patch. r=CanadaHonk
Having unused imports and undocumented functions trigger warnings that
don't build in automation.

Differential Revision: https://phabricator.services.mozilla.com/D172429
2023-03-13 17:49:57 +00:00
CanadaHonk dd00a0c918 Bug 1821514 - Serialize NaN and infinity lengths r=emilio
Lengths using NaN and infinity are now serialized properly with some
improvements to computed values as well.

Also added a few minor new relevant WPT tests.
35 WPT tests newly pass 🎉

Differential Revision: https://phabricator.services.mozilla.com/D172183
2023-03-13 17:49:57 +00:00
CanadaHonk a19c27e1da Bug 1821532 - Infinity angles should degenerate compute to 0 r=layout-reviewers,emilio
Also adjusted WPT tests to always expect deg like similar past changes.

WPT tests: https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-infinity-nan-computed.html#L57-L71

Differential Revision: https://phabricator.services.mozilla.com/D172401
2023-03-13 11:38:45 +00:00
Emilio Cobos Álvarez c89c761da3 Bug 1821782 - Rustfmt recent changes to calc.rs. r=CanadaHonk
Differential Revision: https://phabricator.services.mozilla.com/D172339
2023-03-13 11:33:23 +00:00
Emilio Cobos Álvarez 7cd2a63e0c Bug 1821782 - Add resolution support to calc(). r=CanadaHonk
Differential Revision: https://phabricator.services.mozilla.com/D172338
2023-03-13 11:33:22 +00:00
Emilio Cobos Álvarez fdabf61900 Bug 1820661 - Make image-set without valid images render nothing. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D172341
2023-03-13 11:22:06 +00:00
Boris Chiou 82fb47220f Bug 1489392 - Part 1: Re-define CoordPair struct. r=emilio
Redefine/Rename the fields in CoordPair to align the data members of gfx::Point.

Differential Revision: https://phabricator.services.mozilla.com/D5903
2023-03-10 19:19:28 +00:00
Ziran Sun e1b24f642b Bug 1820544 - Add popover attribute and part of basic popover functionality. r=emilio
Starts to add part of the basic functionality for popover. Including
[1] :open & :closed CSS pseudo class
[2] showPopover(), hidePopover() and togglePopover() interfaces. Much of the
functionality is still to-do.
[3] PopoverData interface

Differential Revision: https://phabricator.services.mozilla.com/D171719
2023-03-10 10:52:20 +00:00
CanadaHonk 2e77b5dde1 Bug 1820875 - Parse and serialize NaN and infinity times correctly r=emilio
Times like NaN and infinity are now parsed and serialized correctly.

Rewrote time to use `calc_clamping_mode` instead of `was_calc` to
stop some parse-time clamping which broke these values.

Adjusted WPT test expectations, 19 newly pass 🎉

Also added a new WPT test to cover a missing edge case:
`calc(1<unit> * NaN)` -> `calc(NaN * 1<canonical_unit>)`

The very similar angle tests do this already for angle's units.

Differential Revision: https://phabricator.services.mozilla.com/D171911
2023-03-08 15:04:13 +00:00
Boris Chiou 4fa8c3ce41 Bug 1814786 - Part 6: Create timeline objects when mutating scroll-timeline property. r=emilio
And so we can lookup the timeline from TimelineCollection.

Differential Revision: https://phabricator.services.mozilla.com/D169273
2023-03-07 23:57:55 +00:00
Emilio Cobos Álvarez 01a41fb486 Bug 1820280 - Be consistent for which URIs we expose chrome rules. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D171640
2023-03-07 20:22:23 +00:00
David Shin 5cf1d55ffc Bug 1774588 - Parsing for relative selectors in `:has()`. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D171358
2023-03-07 18:04:27 +00:00
Tiaan Louw c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
CanadaHonk 659a4a38c8 Bug 1820407 - Serialize NaN and infinity angles as per spec r=emilio
`NaN`, `infinity`, and `-infinity` angles should be specially serialized.

Also fixed a few relevant WPT tests which did not follow spec.
(see https://github.com/web-platform-tests/wpt/pull/38825)

Adjusted WPT test expectations, 40 newly pass 🎉

Differential Revision: https://phabricator.services.mozilla.com/D171658
2023-03-07 00:02:55 +00:00
Boris Chiou 3fb6611d01 Bug 1820071 - Make <ray-size> optional and default to 'closest-side'. r=emilio
Per the spec update, the new syntax is:
  `ray() = ray( <angle> && <ray-size>? && contain? )`
And for `<ray-size>`:
  "If no <ray-size> is specified it defaults to closest-side."

So `<ray-size>` is optional and we omit it if it's default value, for
serialization.

By the way, offset=* properties are supported only in Gecko, so we don't
need a servo function to check the preference.

Differential Revision: https://phabricator.services.mozilla.com/D171625
2023-03-07 00:02:52 +00:00
Emilio Cobos Álvarez 7fea7835ba Bug 1819936 - Move legacy -moz-box collapse to its own CSS property. r=jwatt
Make display: -moz-box's visibility: collapse handling switchable by its
own CSS property.

Longer term maybe we should switch the front-end away from visibility:
collapse altogether (there are some alternatives), but for now this will
allow to move the front-end to switch to modern `display: flex` while
keeping `visibility: collapse` work as in -moz-box.

Differential Revision: https://phabricator.services.mozilla.com/D171472
2023-03-06 11:14:40 +00:00
Em Zhan f1f7772453 Bug 1814469 - Implement CSS exponential functions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170842
2023-03-05 10:42:36 +00:00
Boris Chiou f9afc9203f Bug 1818666 - Support offset-position in the style system. r=emilio
Also, we make it animatable but don't apply it to the motion transform and
don't run it on the compositor for now (so it works for getComputedStyle but
doesn't have rendering result).

Per spec: https://w3c.github.io/csswg-drafts/css-values/#calc-serialize,
we tweak the WPT to let calc() serialize the percentage first, and maintain
zero-valued terms, i.e. 0%. (We are doing the same thing as
offset-anchor, so it should be fine with other browsers.)

Besides, I tweak the serialization of shorthand a little bit so we match
the implementation of WebKit.

Differential Revision: https://phabricator.services.mozilla.com/D170972
2023-03-03 23:10:34 +00:00
Emilio Cobos Álvarez f93fd7bede 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-03-01 14:43:57 +00:00
Norisz Fay 33342d4cc5 Backed out changeset 2f565aff38fd (bug 1695565) for causing reftest failures on setsize.xhtml CLOSED TREE 2023-03-01 15:41:35 +02:00
Emilio Cobos Álvarez 63f3faaca9 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-03-01 12:16:01 +00:00
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