Commit Graph
1499 Commits
Author SHA1 Message Date
Seva Alipov 4f6218c8fe Bug 1927186: Alternative approach, fixing matrix zoom upsteam. r=firefox-style-system-reviewers,layout-reviewers,emilio,dshin
Differential Revision: https://phabricator.services.mozilla.com/D304905
2026-06-08 19:15:45 +00:00
Jan Varga e746e7c4eb Bug 2038239 - Introduce a dedicated type for <flex> values; r=emilio,firefox-style-system-reviewers,layout-reviewers
Introduce a dedicated type for representing <flex> values and use it instead
of relying on `#[css(dimension)]`.

This removes the last use of `#[css(dimension)]` and avoids adding special
dimension handling to the `ToTyped` derive. Supporting that annotation in
`ToTyped` would add unnecessary complexity for what is now a single use case.

Having an explicit <flex> value type makes it straightforward to add Typed OM
reification support for <flex> values in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D300350
2026-05-19 11:07:15 +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
Emilio Cobos Álvarez 7f29b8ded8 Bug 1878994 - Use TreeScoped for PositionTryFallbacks. r=dshin,firefox-style-system-reviewers,layout-reviewers
This will allow to implement tree-scoped lookups.

Differential Revision: https://phabricator.services.mozilla.com/D299382
2026-05-12 14:05:36 +00:00
Hiroyuki Ikezoe d1ee4bd4a8 Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio
Some sites probe `@supports selector(::-webkit-scrollbar)` to detect
WebKit/Blink and then ship styles that depend on real WebKit scrollbar
behavior, which our partial `::-webkit-scrollbar` support does not match.
Give us a way to disable the pseudo-element on specific domains while
keeping it enabled everywhere else; on listed domains the pseudo is
treated as unknown by the selector parser, so `@supports selector(...)`
also reports it as unsupported.

Differential Revision: https://phabricator.services.mozilla.com/D299295
2026-05-11 09:15:25 +00:00
Serban Stanca 06e30b558f Revert "Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio" for causing Android reftests failures.
This reverts commit 8a0a6843b1.
2026-05-11 07:48:05 +00:00
Hiroyuki Ikezoe 8a0a6843b1 Bug 2031468 - Disable ::-webkit-scrollbar on a per-domain blocklist. r=firefox-style-system-reviewers,layout-reviewers,emilio
Some sites probe `@supports selector(::-webkit-scrollbar)` to detect
WebKit/Blink and then ship styles that depend on real WebKit scrollbar
behavior, which our partial `::-webkit-scrollbar` support does not match.
Give us a way to disable the pseudo-element on specific domains while
keeping it enabled everywhere else; on listed domains the pseudo is
treated as unknown by the selector parser, so `@supports selector(...)`
also reports it as unsupported.

Differential Revision: https://phabricator.services.mozilla.com/D299295
2026-05-11 05:12:18 +00:00
Emilio Cobos Álvarez c549b667cd Bug 1897279 - Record last successful fallback at ResizeObserver time. r=dshin,layout-anchor-positioning-reviewers,firefox-style-system-reviewers,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D297685
2026-04-30 21:33:41 +00:00
tushar sariya 6e71411356 Bug 2019861 - Resolve <color> values in getComputedStyle for registered custom properties. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D287814
2026-04-17 18:51:52 +00:00
Nicolas Chevobbe 0652464014 Bug 2032064 - Implement nsComputedDOMStyle::HasLonghandProperty. r=layout-reviewers,firefox-style-system-reviewers,emilio.
This will be used by DevTools, in particular to know when a custom properties
is set (they can be empty, so `getPropertyValue()` isn't helpful here).

squash in layout

Differential Revision: https://phabricator.services.mozilla.com/D294768
2026-04-17 08:56:11 +00:00
Atila Butkovits 147d9c589d Revert "Bug 2032064 - Implement nsComputedDOMStyle::HasLonghandProperty. r=layout-reviewers,firefox-style-system-reviewers,emilio." as per request.
This reverts commit a62e813ba1.
2026-04-17 08:40:05 +00:00
Nicolas Chevobbe a62e813ba1 Bug 2032064 - Implement nsComputedDOMStyle::HasLonghandProperty. r=layout-reviewers,firefox-style-system-reviewers,emilio.
This will be used by DevTools, in particular to know when a custom properties
is set (they can be empty, so `getPropertyValue()` isn't helpful here).

Differential Revision: https://phabricator.services.mozilla.com/D294768
2026-04-17 08:12:24 +00:00
rperta ac3952ffb0 Revert "Bug 2019861 - Resolve <color> values in getComputedStyle for registered custom properties. r=emilio,firefox-style-system-reviewers" for causing multiple build bustages
This reverts commit a4a2af2810.
2026-04-09 22:31:03 +00:00
tushar sariya a4a2af2810 Bug 2019861 - Resolve <color> values in getComputedStyle for registered custom properties. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D287814
2026-04-09 21:50:18 +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 7eb8b17a1a Bug 2023344 - Remove some unneeded includes of ServoStyleConst with common headers. r=firefox-style-system-reviewers,dom-core,webidl,layout-reviewers,smaug,tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287782
2026-03-16 13:35:13 +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
Emilio Cobos Álvarez f1dea2d65d Bug 2013141 - Remove custom_consts specialness from CSS keywords. r=firefox-style-system-reviewers,layout-reviewers,dshin
Just name the things like in CSS.

Differential Revision: https://phabricator.services.mozilla.com/D281001
2026-01-30 21:12:51 +00:00
Emilio Cobos Álvarez 15a94ca99a Bug 2010526 - Make -webkit-transform serialize like transform. r=dholbert
This broke in bug 1362499 because we turned that into a shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D279884
2026-01-23 13:05:29 +00:00
Emilio Cobos Álvarez f6d178bf7c Bug 2006499 - Consider exposing active fallback style in getComputedStyle(). r=jwatt
This has bit us consistently, and I guess it's not that hard to do if we
want.

Differential Revision: https://phabricator.services.mozilla.com/D276757
2025-12-18 09:50:07 +00:00
Cristina Horotan dc41e70d99 Revert "Bug 2006499 - Consider exposing active fallback style in getComputedStyle(). r=jwatt" for causing mochitest failures on nsComputedDOMStyle.cpp
This reverts commit 6572b7509a.
2025-12-17 23:37:12 +00:00
Emilio Cobos Álvarez 6572b7509a Bug 2006499 - Consider exposing active fallback style in getComputedStyle(). r=jwatt
This has bit us consistently, and I guess it's not that hard to do if we
want.

Differential Revision: https://phabricator.services.mozilla.com/D276757
2025-12-17 22:11:48 +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
Jan Varga b314d21751 Bug 1998365 - Rename nsCSSPropertyID to NonCustomCSSPropertyId and normalize ID naming; r=emilio,firefox-style-system-reviewers,layout-reviewers
nsCSSPropertyID only enumerates non custom properties, but the name suggests
otherwise. (eCSSPropertyExtra_variable only signals a custom property and does
not carry the custom name.) This mismatch has been confusing and also blocks
renaming AnimatedPropertyID to CSSPropertyId.

This patch renames nsCSSPropertyID to NonCustomCSSPropertyId to make the non
custom scope explicit. It also normalizes identifier naming (aPropID ->
aPropId, mID -> mId, etc.) for consistency.

No behavior changes intended.

Potential follow-ups:
- Move the enum to the mozilla namespace.
- Convert the enum to an enum class.
- Rename nsCSSPropertyIDSet.

Differential Revision: https://phabricator.services.mozilla.com/D271443
2025-11-12 06:11:29 +00:00
Emilio Cobos Álvarez 9ce25678e1 Bug 1998285 - Make computed borders not affect the computed value. r=janv
As per the resolution in
https://github.com/w3c/csswg-drafts/issues/11494.

We need to move the resolved value stuff for border properties to style
to avoid regressing shorthand serialization tests. Note we no longer
have layout-dependent borders tho.

Fix a few tests related to inheritance which I think chromium just gets
wrong for border-width, see the issue discussion. What you inherit is
the computed value.

Differential Revision: https://phabricator.services.mozilla.com/D271314
2025-11-11 16:31:46 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
serge-sans-paille 8a28ab1466 Bug 1992012 - Cleanup FloatingPoint.h inclusion r=emilio,media-playback-reviewers,firefox-svg-reviewers,layout-reviewers,dholbert,alwu
There was a lot of leftovers from previous code cleaning.

Also turn detail::FloatingPointTrait into FloatingPointTrait because
it's specialized in js/src/vm/Float16.h, which shows it's not an
internal API.

Differential Revision: https://phabricator.services.mozilla.com/D267467
2025-10-09 11:36:34 +00:00
David Shin ad5f8e7fd0 Bug 1969305: Pass anchor resolution params for maxsize. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256291
2025-07-14 21:28:26 +00:00
David Shin 8090f17c2b Bug 1969305: Pass anchor resolution params for size. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256290
2025-07-14 21:28:23 +00:00
pstanciu 7a21072acf Revert "Bug 1969305: Adjust WPT expectations. r=layout-reviewers,emilio" for causing failures @ anchor-name-003.html
This reverts commit 5e12720896.

Revert "Bug 1969305: Pass anchor resolution params for maxsize. r=layout-reviewers,emilio"

This reverts commit 27a56d04a1.

Revert "Bug 1969305: Pass anchor resolution params for size. r=layout-reviewers,emilio"

This reverts commit 69b2bd0242.

Revert "Bug 1969305: Pass anchor resolution params for margin. r=layout-reviewers,emilio"

This reverts commit 23c707d5a7.

Revert "Bug 1969305: Implement anchor size resolution. r=layout-reviewers,emilio"

This reverts commit c0d1d8808d.
2025-07-12 02:02:55 +00:00
David Shin 27a56d04a1 Bug 1969305: Pass anchor resolution params for maxsize. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256291
2025-07-11 15:21:45 +00:00
David Shin 69b2bd0242 Bug 1969305: Pass anchor resolution params for size. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256290
2025-07-11 15:21:42 +00:00
Atila Butkovits 0b2944a3d2 Revert "Bug 1969305: Adjust WPT expectations. r=layout-reviewers,emilio" for causing bustages at GeckoBindings.cpp.
This reverts commit 49a7b8afce.

Revert "Bug 1969305: Pass anchor resolution params for maxsize. r=layout-reviewers,emilio"

This reverts commit 0b615836cf.

Revert "Bug 1969305: Pass anchor resolution params for size. r=layout-reviewers,emilio"

This reverts commit 359badb60e.

Revert "Bug 1969305: Pass anchor resolution params for margin. r=layout-reviewers,emilio"

This reverts commit 17f7f64cd8.

Revert "Bug 1969305: Implement anchor size resolution. r=layout-reviewers,emilio"

This reverts commit 47197ef7ab.
2025-07-11 01:18:14 +00:00
David Shin 0b615836cf Bug 1969305: Pass anchor resolution params for maxsize. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256291
2025-07-10 20:58:24 +00:00
David Shin 359badb60e Bug 1969305: Pass anchor resolution params for size. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D256290
2025-07-10 20:58:21 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
David Shin 6f62c65eda Bug 1971135: Implement and use anchor positioning parameter helpers. r=layout-reviewers,TYLin
These helpers for anchor resolution parameters from `nsIFrame` and
`ReflowInput` cover many use cases.

Differential Revision: https://phabricator.services.mozilla.com/D253174
2025-06-16 20:35:27 +00:00
David Shin 90c7608ba6 Bug 1971135: Rename anchor params to be specific for offset resolution. r=TYLin
... Also, consistently use `anchorResolutionParams` as the variable name.

Differential Revision: https://phabricator.services.mozilla.com/D253173
2025-06-16 20:35:24 +00:00
David Shin c5abad242d Bug 1923961: Unify anchor resolution parameters and use it for inset resolution. r=layout-reviewers,emilio
... In addition to previous parameters, we need access to the positioned
frame, as well as the containing block's size (If we're in reflow).

Differential Revision: https://phabricator.services.mozilla.com/D249625
2025-05-29 22:03:13 +00:00
Sandor Molnar 354a4799e0 Revert "Bug 1923961: apply code formatting via Lando" for causing build bustages @ GeckoBindings.cpp
This reverts commit ec57e25d89.

Revert "Bug 1923961: Adjust WPT expectations. r=firefox-style-system-reviewers,emilio"

This reverts commit f2612695a7.

Revert "Bug 1923961: Resolve anchor() in calc(). r=firefox-style-system-reviewers,emilio"

This reverts commit b206c5264b.

Revert "Bug 1923961: Initial implementation of anchor lookup for anchor(). r=firefox-style-system-reviewers,emilio"

This reverts commit 56c17701c5.

Revert "Bug 1923961: Make `nsLayoutUtils::GetRectRelativeToFrame` take in const ptrs. r=firefox-style-system-reviewers,emilio"

This reverts commit 34fb773837.

Revert "Bug 1923961: Pass the new AnchorPosResolutionParams to servo side. r=firefox-style-system-reviewers,emilio"

This reverts commit 73477e3296.

Revert "Bug 1923961: Unify anchor resolution parameters and use it for inset resolution. r=layout-reviewers,emilio"

This reverts commit 8461579472.

Revert "Bug 1923961: Expose `AnchorSide` to C++. r=firefox-style-system-reviewers,boris"

This reverts commit 7ecbb38056.
2025-05-29 20:46:30 +00:00
David Shin 8461579472 Bug 1923961: Unify anchor resolution parameters and use it for inset resolution. r=layout-reviewers,emilio
... In addition to previous parameters, we need access to the positioned
frame, as well as the containing block's size (If we're in reflow).

Differential Revision: https://phabricator.services.mozilla.com/D249625
2025-05-29 19:00:08 +00:00