Commit Graph
737 Commits
Author SHA1 Message Date
Keith Cirkel a804178a61 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-12 02:15:08 +00:00
Silaghi 98bf5b0321 Revert "Bug 204494, Bug 2041004 - Add <select> pseudo elements to devtools style inspector r=devtools-reviewers,nchevobbe"
This reverts commit 739a225b8a.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit 4b7b2a4083.
2026-06-10 16:55:02 +00:00
Keith Cirkel 4b7b2a4083 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-10 15:27:45 +00:00
Silaghi 50913f8313 Revert "Bug 2044945, Bug 2041004 - Add <select> psuedo elements to devtools style inspector r=devtools-reviewers,nchevobbe" for causing wr failures at select-appearance-disabled.html
This reverts commit 6b8775f47f.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit e3529d76f3.
2026-06-10 10:08:51 +00:00
Keith Cirkel e3529d76f3 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-10 08:20:21 +00:00
Alexandru Marc ca229e12ac Revert (Bug 2044945, Bug 2041004) for causing wr failures @ select-explicit-size.html
This reverts commit b434b10988.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit e92bda8433.
2026-06-09 19:14:13 +00:00
Keith Cirkel e92bda8433 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-09 17:37:46 +00:00
Sandor Molnar 15b6e590cd Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio" for causing wpt failures
This reverts commit 8ecfcdcb81.
2026-06-08 17:32:43 +00:00
Keith Cirkel 8ecfcdcb81 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-08 16:00:35 +00:00
Tiaan Louw aa4033b3f8 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-02 09:40:28 +00:00
Atila Butkovits b2571923b9 Revert "Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe" for causing failures at browser_parsable_css.js.
This reverts commit 3e903c86a3.
2026-06-02 01:46:29 +00:00
Tiaan Louw 3e903c86a3 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-01 20:56:54 +00:00
rperta 32326b72c7 Revert "Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe" for causing mass failures
This reverts commit 498b28b9e5.
2026-06-01 16:14:26 +00:00
Tiaan Louw 498b28b9e5 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-01 15:22:26 +00:00
Emilio Cobos Álvarez b64a7f45e3 Bug 2039479 - Don't cache attr-referencing lazy pseudo styles. r=firefox-style-system-reviewers,dshin
As we don't make the attributes part of the key. If we get sharing
across elements with these we can't really prove that they use the same
attributes / end up with the same style.

We could make the element style itself part of the cache key but that
seems also a bit sketchy.

Differential Revision: https://phabricator.services.mozilla.com/D301278
2026-05-19 13:51:24 +00:00
Emilio Cobos Álvarez e4ecfea530 Bug 2038976 - Make CSSOM work on raw declaration blocks, rather than DeclarationBlock. r=firefox-style-system-reviewers,layout-reviewers,dshin
This will make being more granular with cloning easier, and we don't
need it after the previous patch.

This leaves DeclarationBlock only for the style attribute for now, we
need it for the AttrStyles stuff. But I plan to move that to
MiscContainer instead or so.

Differential Revision: https://phabricator.services.mozilla.com/D300052
2026-05-13 22:29:25 +00:00
Lando df0388feee Bug 1878994: apply code formatting via Lando
# ignore-this-changeset
2026-05-12 14:06:04 +00:00
David Shin 626c3c4620 Bug 1878994: Scoped lookup for @position-try rules. r=layout-anchor-positioning-reviewers,firefox-style-system-reviewers,emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D299242
2026-05-12 14:05:40 +00:00
Emilio Cobos Álvarez 59ca121482 Bug 2035443 - Remove unneeded lock for StaticPresData. r=jfkthame,layout-reviewers
StaticPresData now has an internal lock. Simplify some of the code.

Differential Revision: https://phabricator.services.mozilla.com/D296948
2026-04-28 20:03:58 +00:00
Emilio Cobos Álvarez cbd055339f Bug 2031110 - Remove -moz-scrolled-canvas and make viewport styles non-inheriting. r=jwatt
They never inherit anything (except background, but that is a no-op
because viewport inherits from nullptr, which is the initial style).

It seems in the past we relied on recomputing some of this for direction
propagation or so, according to the comments, but that's definitely no
longer true.

Also the comment about needing overflow: auto is wrong, because we've
since always created scrollbars for the root (and avoided reframes).

Similarly, the assertion about viewport is kinda unnecessary. It was
introduced in:

  https://hg.mozilla.org/mozilla-central/rev/8fd06045940a05d56d833a0488262fe2279d3702

But since then we always skip fixup for all anon boxes anyways, and
specify display: block explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D293710
2026-04-13 20:27:47 +00:00
Jonathan Kew 03b30042e6 Bug 2015952 - patch 1 - Clean up some variable declarations and redundant #includes in thebes font code. r=emilio,gfx-reviewers,firefox-style-system-reviewers,bradwerth
(No behavior change, this is just some preparatory cleanup.)

Differential Revision: https://phabricator.services.mozilla.com/D288945
2026-03-26 02:28:06 +00:00
rperta 15cabefac3 Revert "Bug 2015952: apply code formatting via Lando" for causing multiple leak failures at mochitest.toml
This reverts commit 8fa07a521e.

This reverts commit 99ee64706d.

This reverts commit 0676fa07be.

This reverts commit bddea3e6a5.

This reverts commit 208e1948f4.
2026-03-25 06:09:48 +00:00
Jonathan Kew 208e1948f4 Bug 2015952 - patch 1 - Clean up some variable declarations and redundant #includes in thebes font code. r=emilio,gfx-reviewers,firefox-style-system-reviewers,bradwerth
(No behavior change, this is just some preparatory cleanup.)

Differential Revision: https://phabricator.services.mozilla.com/D288945
2026-03-25 04:48:39 +00:00
Vincent Hilla d1449213bf Bug 2020327 - Part 4: Resolve inbound cross-document view-transition for document. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D286729
2026-03-24 08:20:10 +00:00
Vincent Hilla 1cfa63de1d Bug 2020327 - Part 1: @view-transition rule scaffolding. r=emilio,webidl,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D286726
2026-03-24 08:20:02 +00:00
Emilio Cobos Álvarez eb87d1158b Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 17:44:30 +00:00
Serban Stanca e5d7b9992f Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in closed-listbox-rendering.html.
This reverts commit 2b592196ab.
2026-03-17 15:26:31 +00:00
Emilio Cobos Álvarez 2b592196ab Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 12:11:53 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Serban Stanca 756241a7ce Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in select-appearance-sizing-in-flex.html.
This reverts commit 7669d5a11e.
2026-03-17 11:49:24 +00:00
Emilio Cobos Álvarez 7669d5a11e Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 10:14:28 +00:00
rperta 2362c10a63 Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wr failures at closed-listbox-rendering.html
This reverts commit b957d18e90.
2026-03-17 01:32:58 +00:00
Emilio Cobos Álvarez b957d18e90 Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-16 22:41:27 +00:00
Emilio Cobos Álvarez 8df877ddab Bug 2023334 - Don't re-selector match for @starting-style. r=firefox-style-system-reviewers,layout-reviewers,dshin
We're already matching all @starting-style rules during regular
matching, and we're just ignoring them and adding a flag.

Instead, keep them and filter them during the cascade. This is more
similar to what we'd need to do for an @appearance-base container rule,
and simplifies other things as well.

For that, introduce a RuleCascadeFlags (which for now is just a single
bit), and keep that in the CascadePriority (maybe we should call that
something else, RuleCascadeInfo or something?).

Differential Revision: https://phabricator.services.mozilla.com/D287776
2026-03-16 21:32:30 +00:00
Jan-Niklas Jaeschke ad17f64d45 Bug 1987618, part 6 - CSS Highlight API: Diff cached highlight pseudo styles during restyle. r=emilio,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D283664
2026-02-25 08:05:33 +00:00
Atila Butkovits d199cb6e80 Revert "Bug 1987618, part 8 - CSS Highlight API: Add new test case. r=emilio" for causing failures related to ElementData.
This reverts commit 67a72ced59.

Revert "Bug 1987618, part 7 - CSS Highlight API: Update test expectations. r=emilio"

This reverts commit a8ef71263a.

Revert "Bug 1987618, part 6 - CSS Highlight API: Diff cached highlight pseudo styles during restyle. r=emilio,firefox-style-system-reviewers,layout-reviewers"

This reverts commit be94746926.

Revert "Bug 1987618, part 5 - CSS Highlight API: Set primary frame's style as parent when probing highlight styles. r=emilio,layout-reviewers"

This reverts commit 47bf5d2fee.

Revert "Bug 1987618, part 4 - CSS Highlight API: Fix text-decoration positioning for vertical writing mode. r=jfkthame,layout-reviewers"

This reverts commit 73cc6f91b9.

Revert "Bug 1987618, part 3 - CSS Highlight API: Compute decoration overflow bounds correctly. r=jfkthame,layout-reviewers"

This reverts commit 7d4afe8234.

Revert "Bug 1987618, part 2 - CSS Highlight API: Use correct line thickness for strikeout decorations. r=jfkthame,layout-reviewers"

This reverts commit 8e1d7e02a9.

Revert "Bug 1987618, part 1 - CSS Highlight API: Create and store highlight selection before adding ranges. r=emilio,layout-reviewers"

This reverts commit b585a9be3e.
2026-02-24 15:57:35 +00:00
Jan-Niklas Jaeschke be94746926 Bug 1987618, part 6 - CSS Highlight API: Diff cached highlight pseudo styles during restyle. r=emilio,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D283664
2026-02-24 15:13:13 +00:00
Jan-Niklas Jaeschke 49309478bd Bug 2013226 - CSS Highlight API: Invalidate caches correctly for viewport or container sizes. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280938
2026-02-08 13:13:54 +00:00
Emilio Cobos Álvarez 30b7a3d89a Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 07:39:54 +00:00
Norisz Fay 27f4694604 Revert "Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika" for causing bustage @ ElementAnimationData.h
This reverts commit c70290c619.
2026-02-06 05:34:42 +00:00
Emilio Cobos Álvarez c70290c619 Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 03:42:45 +00:00
Jan-Niklas Jaeschke db71b4860a Bug 2011818 - CSS Highlight API: Cache computedStyle of functional pseudo elements. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280081
2026-01-29 10:35:35 +00:00
David Shin ef26d7876b Bug 2009729: Ensure that we resolve fallback style with original style. r=emilio,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D278855
2026-01-15 22:52:24 +00:00
Emilio Cobos Álvarez d8ba646c79 Bug 1910616 - Invalidate position-try rules on changes/insertion/mutations. r=firefox-style-system-reviewers,layout-anchor-positioning-reviewers,dshin
This introduces infrastructure to invalidate stuff based on CascadeData
mutations.

For now we only use it for `@position-try`, in the future it might be
worth expanding it to `@keyframes` and even moving our existing selector
invalidation infrastructure there, so that we can more accurately
invalidate.

Differential Revision: https://phabricator.services.mozilla.com/D277424
2026-01-05 19:49:14 +00:00
Emilio Cobos Álvarez 45879990e9 Bug 1725177 - Make ::backdrop a real generated content pseudo-element. r=layout-reviewers,firefox-style-system-reviewers,dshin
This allows animating ::backdrop and addresses long-standing animation
issues.

Differential Revision: https://phabricator.services.mozilla.com/D276755
2025-12-17 22:11:20 +00:00
Jonathan Watt 99598e4feb Bug 1991929 p1. Apply <position-area> values for position-try-fallbacks into computed style. r=emilio,firefox-style-system-reviewers,layout-anchor-positioning-reviewers
We already do this for [<dashed-ident> || <try-tactic>] values, but currently
try to pass position-area values through to functions that need it in an effort
to avoid creating a new ComputedValues for this case. Unfortunately we're not
passing it through to all the places that need it, and doing so would be very
messy.

Removal of the current code that passes position-area values will come in a
later patch.

Differential Revision: https://phabricator.services.mozilla.com/D274931
2025-12-03 21:59:07 +00:00
Sajid Anwar 2763574307 Bug 1740584 - Implement relative root font lengths rcap, rch, rex, ric. r=emilio,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D274527
2025-12-03 19:10:33 +00:00
Emilio Cobos Álvarez f289eebba9 Bug 1744292 - Implement @custom-media queries. r=firefox-style-system-reviewers,layout-reviewers,webidl,smaug,dshin
Unfortunately the existing WPT test coverage is rather lacking so we
need to fix that before enabling.

Differential Revision: https://phabricator.services.mozilla.com/D270675
2025-10-30 23:11:25 +00:00
David Shin cb8e73febc Bug 1995774: Consider parent rules on nested declaration mutation. r=firefox-style-system-reviewers,jwatt,emilio
Differential Revision: https://phabricator.services.mozilla.com/D269646
2025-10-29 17:36:16 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00