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
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
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
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
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
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
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
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
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
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
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
... 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
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.
... 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