Commit graph

10819 commits

Author SHA1 Message Date
Tiaan Louw
891c4741c0 Bug 1844333 - Clamp and normalize color values to appropriate ranges. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183983
2023-08-04 21:19:28 +00:00
Tiaan Louw
a2d75730cc Bug 1845693 - Make AbsoluteColor deal with legacy and modern color syntax more concise r=emilio
Now the default of a color is the modern syntax and converting to legacy
syntax is very explicit.

AbsoluteColor::new can now take u8, f32 and Option<f32> as component
arguments and the flags will be set automagically.

Differential Revision: https://phabricator.services.mozilla.com/D184685
2023-08-04 12:39:58 +00:00
Boris Chiou
7902a61494 Bug 1846817 - Change the initial value of offset-position to be normal. r=dholbert
Per spec issue, https://github.com/w3c/fxtf-drafts/issues/522, its
initial value should be normal. (This has been merged into the spec.)

Note: css/motion/inheritance.html was updated in the WPT remote repo, so
I intentionally didn't change it and added the expection for now.

Differential Revision: https://phabricator.services.mozilla.com/D185230
2023-08-03 18:42:17 +00:00
Emilio Cobos Álvarez
bdce6101d4 Bug 1846859 - Remove appearance: {checkbox,radio}-{label,container}. r=desktop-theme-reviewers,dao
I didn't find a single GTK theme that drew something useful for this:

 * The container appearance isn't needed. It is a hack needed to get the
   right styles for the native checkbox, but that's it, we don't need to
   expose it to CSS.

 * The label appearance was meant to draw the focus outline but since it
   didn't work reliably we've been doing it manually since seven years
   ago (see bug 582951 and bug 1312169).

Other platforms also don't use these so this simplifies the code a bit.

Depends on D185279

Differential Revision: https://phabricator.services.mozilla.com/D185286
2023-08-03 16:36:39 +00:00
Emilio Cobos Álvarez
dddcd7a819 Bug 1846745 - Use static atoms for predefined counter-style names. r=layout-reviewers,jfkthame
Depends on D185156

Differential Revision: https://phabricator.services.mozilla.com/D185157
2023-08-03 13:53:13 +00:00
Emilio Cobos Álvarez
070c1a117c Bug 1844466 - Speed up and simplify cumulative changehint computation. r=boris,hiro
As a bonus we now can throttle some additive and visibility animations
more properly, because before we couldn't compute a change hint for
those but now we don't need to.

Differential Revision: https://phabricator.services.mozilla.com/D185175
2023-08-03 09:04:11 +00:00
Zach Hoffman
9ab2978aef Bug 1846635 - [css-properties-values-api] Support <string> syntax r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185203
2023-08-02 21:45:17 +00:00
Emilio Cobos Álvarez
a12b2fedd1 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
Emilio Cobos Álvarez
f3842f9404 Bug 1844466 - Add affects="" to CSS property metadata, and relevant flags. r=boris
We don't use these yet. The flags are taken from current gecko change
hints as described in the bug comments.

Differential Revision: https://phabricator.services.mozilla.com/D185061
2023-08-02 12:45:37 +00:00
Tiaan Louw
2bf90dc51c Bug 1846272 - AbsoluteColor::new now detects none components automatically. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D184941
2023-08-02 06:32:17 +00:00
Tiaan Louw
6798545271 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 13:14:32 +00:00
Jonathan Kew
8b2747cfc4 Bug 1708240 - Implement the from-font keyword for CSS font-size-adjust. r=emilio,devtools-reviewers
Depends on D182450

Differential Revision: https://phabricator.services.mozilla.com/D182451
2023-08-01 12:40:31 +00:00
Jonathan Kew
3b3eafa0b4 Bug 1708240 - Remove the layout.css.font-size-adjust.basis.enabled pref, as this has been shipping by default for a couple years. r=emilio
I don't think there's any reason to keep this pref around; let's just clean it up.

Differential Revision: https://phabricator.services.mozilla.com/D182450
2023-08-01 12:40:31 +00:00
Noemi Erli
1bf4a97b5d Backed out 5 changesets (bug 1708240) for causing failures in test_css-properties-db.js CLOSED TREE
Backed out changeset 695203c0ff61 (bug 1708240)
Backed out changeset e686e061b8b5 (bug 1708240)
Backed out changeset eac4b88ab28d (bug 1708240)
Backed out changeset e766d2a9180e (bug 1708240)
Backed out changeset 79c808970af5 (bug 1708240)
2023-08-01 15:12:46 +03:00
Cristian Tuns
df732c7c7c Backed out changeset 9763c9244933 (bug 1846249) for causing build bustages in StyleColorInlines.h CLOSED TREE 2023-08-01 07:16:19 -04:00
Jonathan Kew
0677b1aa55 Bug 1708240 - Implement the from-font keyword for CSS font-size-adjust. r=emilio
Depends on D182450

Differential Revision: https://phabricator.services.mozilla.com/D182451
2023-08-01 10:49:58 +00:00
Jonathan Kew
ebf549cbe7 Bug 1708240 - Remove the layout.css.font-size-adjust.basis.enabled pref, as this has been shipping by default for a couple years. r=emilio
I don't think there's any reason to keep this pref around; let's just clean it up.

Differential Revision: https://phabricator.services.mozilla.com/D182450
2023-08-01 10:49:58 +00:00
Tiaan Louw
cfd3c0c4e5 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-08-01 10:35:38 +00:00
Jonathan Kew
99602c82b2 Bug 1832955 - Support font-relative units when parsing letterSpacing/wordSpacing for offscreen canvas. r=gfx-reviewers,lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D184938
2023-08-01 09:27:16 +00:00
Emilio Cobos Álvarez
0f508cfd2a Bug 1846251 - Make CSSStyleRule inherit from CSSGroupingRule. r=peterv,devtools-reviewers
As per https://github.com/w3c/csswg-drafts/issues/8940.

I didn't do this in bug 1837638 because that's what the spec said at the
time, that's what other browsers did, and specially because if we did
this we had no way of runtime-disable nesting during development or if
things went south.

This means that we can't keep the nesting pref in 118, but that seems
fine (it's already enabled everywhere in 117).

Differential Revision: https://phabricator.services.mozilla.com/D184930
2023-08-01 09:01:54 +00:00
David Shin
ec30a6eea6 Bug 1845744: Move selector-specific node flags to a separate field. r=emilio
Upcoming :has invalidation (Bug 1792501) requires 4 more flags, and we're out of space.
This change consumes the remaining 32-bit hole in `nsINode` to migrate selector-specific
node flags.
This has implications on 32-bit platforms, specifically on text nodes.

Differential Revision: https://phabricator.services.mozilla.com/D184718
2023-08-01 00:29:56 +00:00
Iulian Moraru
b0b02efe78 Backed out changeset 085c31f150d3 (bug 1846251) for causing CSSStyleRule related wpt failures. 2023-08-01 01:56:01 +03:00
Iulian Moraru
9b86bfb258 Backed out changeset 2c6e9abd5c86 (bug 1846249) for causing build bustages on ServoStyleConsts.h. CLOSED TREE 2023-07-31 22:06:34 +03:00
Tiaan Louw
54b0405222 Bug 1846249 - Change color functions to constants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D184929
2023-07-31 18:22:46 +00:00
Emilio Cobos Álvarez
b4fbbbb383 Bug 1846251 - Make CSSStyleRule inherit from CSSGroupingRule. r=peterv,devtools-reviewers
As per https://github.com/w3c/csswg-drafts/issues/8940.

I didn't do this in bug 1837638 because that's what the spec said at the
time, that's what other browsers did, and specially because if we did
this we had no way of runtime-disable nesting during development or if
things went south.

This means that we can't keep the nesting pref in 118, but that seems
fine (it's already enabled everywhere in 117).

Differential Revision: https://phabricator.services.mozilla.com/D184930
2023-07-31 17:23:24 +00:00
Jan-Niklas Jaeschke
c84288a36d Bug 1838262, part 2: Implemented getComputedStyle() for custom highlight api. r=emilio
This patch introduces functional pseudo parameters, i.e. `::highlight(foo)`,
for `getComputedStyle()`. This required adapting the parse algorithm (`nsCSSPseudoElements::ParsePseudoElement()`) and forwarding the functional pseudo parameter into the style engine.

Differential Revision: https://phabricator.services.mozilla.com/D183773
2023-07-31 13:47:54 +00:00
David Shin
1a6e83991a Bug 1845095: Make sure caching and filtering for relative selector isn't used in invalidation. r=emilio
Unify the invalidation flag used for nth index cache for this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D184526
2023-07-31 12:21:25 +00:00
David Shin
604783a77a Bug 1845095: Bloom filter for fast-rejecting :has(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184525
2023-07-31 12:21:24 +00:00
Frederic Wang
b8ba2c1e4c Bug 1788223 - Remove preferences for maction/semantics. r=emilio
This commit removes the preference
mathml.legacy_maction_and_semantics_implementations.disabled
that controls whether we layout maction/semantics as an mrow +
extra style. It has been set to true since Firefox 106.

Differential Revision: https://phabricator.services.mozilla.com/D184720
2023-07-31 07:46:30 +00:00
Cristina Horotan
fae61692c7 Backed out 2 changesets (bug 1845095) for causing wpt failures at is-pseudo-containing-complex-in-has.html CLOSED TREE
Backed out changeset 28c18b287904 (bug 1845095)
Backed out changeset fb0e9233e07d (bug 1845095)
2023-07-28 19:07:26 +03:00
David Shin
9e02c40dd1 Bug 1845095: Make sure caching and filtering for relative selector isn't used in invalidation. r=emilio
Unify the invalidation flag used for nth index cache for this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D184526
2023-07-28 13:13:35 +00:00
David Shin
398ecb5c1f Bug 1845095: Bloom filter for fast-rejecting :has(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184525
2023-07-28 13:13:34 +00:00
Emilio Cobos Álvarez
55478c757e Bug 1845636 - Allow browser chrome to enable the non-native theme. r=dshin
I tried to reftest this, but actually the non-native-theme is already
enabled on all reftests, so...

Differential Revision: https://phabricator.services.mozilla.com/D184740
2023-07-27 22:09:10 +00:00
Emilio Cobos Álvarez
30adf86c52 Bug 1844900 - Improve memory usage with nesting. r=dshin
The idea is to share more memory when expanding nested rules (so being
able to share the whole :is() / :where() allocation), and same for the
Dependency computation (basically, share it across all descendant
selectors).

This prevents exponential explosion in cases like the one in bug 1844446
if you replace tag selectors by class selectors (so that we build
invalidation maps for them).

Differential Revision: https://phabricator.services.mozilla.com/D184283
2023-07-27 21:38:10 +00:00
Natalia Csoregi
c181ea32cf Backed out changeset c59d018a76ed (bug 1844900) for causing bustages. CLOSED TREE 2023-07-28 00:04:59 +03:00
Emilio Cobos Álvarez
1f450024cb Bug 1844900 - Improve memory usage with nesting. r=dshin
The idea is to share more memory when expanding nested rules (so being
able to share the whole :is() / :where() allocation), and same for the
Dependency computation (basically, share it across all descendant
selectors).

This prevents exponential explosion in cases like the one in bug 1844446
if you replace tag selectors by class selectors (so that we build
invalidation maps for them).

Differential Revision: https://phabricator.services.mozilla.com/D184283
2023-07-27 20:24:23 +00:00
Natalia Csoregi
cf7c6627a9 Backed out changeset 5939e79c9c50 (bug 1845636) for causing multiple failures moz-theme related. CLOSED TREE 2023-07-27 22:32:23 +03:00
Iulian Moraru
8ec6e4224d Backed out 2 changesets (bug 1845095) for causing build bustages related to DummyAtom: PrecomputedHash. CLOSED TREE
Backed out changeset c3549dbe2420 (bug 1845095)
Backed out changeset 2b7db53664a6 (bug 1845095)
2023-07-27 21:31:19 +03:00
Emilio Cobos Álvarez
adfbcc4b42 Bug 1845636 - Allow browser chrome to enable the non-native theme. r=dshin
I tried to reftest this, but actually the non-native-theme is already
enabled on all reftests, so...

Differential Revision: https://phabricator.services.mozilla.com/D184740
2023-07-27 18:08:01 +00:00
Emilio Cobos Álvarez
e3aa78816f Bug 1845679 - Add an internal light-dark() function to allow defining colors reacting to color-scheme. r=dshin
This implement something like what's proposed in
https://github.com/w3c/csswg-drafts/issues/7561, but the simplest
version possible, until issues are resolved.

This will allow the front-end to experiment with it and use it (and we
can update to the standard feature once there's a spec for it).

Differential Revision: https://phabricator.services.mozilla.com/D184680
2023-07-27 18:04:23 +00:00
David Shin
e928053513 Bug 1845095: Make sure caching and filtering for relative selector isn't used in invalidation. r=emilio
Unify the invalidation flag used for nth index cache for this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D184526
2023-07-27 18:03:38 +00:00
David Shin
50d297a299 Bug 1845095: Bloom filter for fast-rejecting :has(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184525
2023-07-27 18:03:38 +00:00
Emilio Cobos Álvarez
2e99fa25ff Bug 1845623 - Remove more dead native appearance values. r=mhowell
Everytime I look at this code I find more stuff to remove... :)

-moz-default-appearance: groupbox is not used anywhere.

menulist-text is, but it does nothing (it only would prevent drawing a
background, but we don't specify another background anyways).

Differential Revision: https://phabricator.services.mozilla.com/D184647
2023-07-27 14:39:09 +00:00
Frederic Wang
75a319e2e4 Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 13:31:18 +00:00
Noemi Erli
410db5c6df Backed out changeset 414d16a3f4d9 (bug 1845641) for causing build bustages in Decimal.h CLOSED TREE 2023-07-27 18:02:15 +03:00
Frederic Wang
e651359cd7 Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 13:31:18 +00:00
Noemi Erli
6afe6f8b4b Backed out changeset 665285aadf62 (bug 1845641) for causing failures in quotes-1.xhtml 2023-07-27 15:20:57 +03:00
Emilio Cobos Álvarez
5986728210 Bug 1845690 - Don't expose -moz-headerbar system colors to content. r=stransky
I forgot to make these chrome-only.

Move them a bit further down after the standard colors while at it.

Differential Revision: https://phabricator.services.mozilla.com/D184682
2023-07-27 10:43:08 +00:00
Frederic Wang
5709f3323e Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 09:57:32 +00:00
Emilio Cobos Álvarez
1827dc203b Bug 1845540 - Remove some unused win-specific system colors and appearance values. r=mstange,devtools-reviewers,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D184597
2023-07-26 20:57:47 +00:00