1. We should omit `mask-image` if it is the initial value and there are
any other properties which are not initial values.
2. We should omit `mask-origin` if it is the initial value.
3. Tweak the order of `<masking-mode>`, which should be the last one per spec.
Differential Revision: https://phabricator.services.mozilla.com/D188545
* Lazily calculate changed states and classes when processing pending state & attribute invalidations
* Avoid constructing empty `SmallVec` invalidations when we know there is no invalidation
Differential Revision: https://phabricator.services.mozilla.com/D188733
Implemented support for fallback values in CSS attr():
`attr(<attr-name>, <attr-fallback>)`
Full syntax supported as of this rev:
`[namespace? `|`]? ident [`,` fallback]?`
Spec: https://drafts.csswg.org/css-values-5/#attr-notation
Also added a new WPT reftest for attr fallback without a type,
and some new attr serialization WPTs (namespace and fallback).
Differential Revision: https://phabricator.services.mozilla.com/D176801
This is not _quite_ the thing that the spec asks for, but it's more
correct than what we're doing.
What we were doing before this patch was a poor man's version of this
that didn't deal with shadow DOM.
Differential Revision: https://phabricator.services.mozilla.com/D188324
This is not _quite_ the thing that the spec asks for, but it's more
correct than what we're doing.
What we were doing before this patch was a poor man's version of this
that didn't deal with shadow DOM.
Differential Revision: https://phabricator.services.mozilla.com/D188324
Some appearance values are really just a background.
Being able to draw them using `background-image` instead of appearance
allows us to preserve borders, etc.
Differential Revision: https://phabricator.services.mozilla.com/D187851
Now that we have a proper defined order for these properties, this
uncovered an issue where we were relying on the relative order of the
SMIL override (font-size in this case) and presentational hints
(-x-text-scale), so that the first one got zoomed and then unzoomed to
arrive with the right font-size.
Instead first un-zoom, then apply stuff normally.
MANUAL PUSH: Trivial-ish fix CLOSED TREE.
Instead of cascade groups, track the position in the declaration list of
the small-ish number of prioritary properties, and apply them
out-of-band.
This reduces the amount of cascade groups we need, and makes the amount
of times we need to iterate over the declarations constant.
The DeclarationIndex set-up (having to track the relevant declarations
as needed) is a bit annoying, but is needed to deal with `revert` and
`revert-layer` without exponential time complexity.
Differential Revision: https://phabricator.services.mozilla.com/D188274
Invalidating a relative selector requires traversal in the opposite direction of
the usual invalidation, i.e. In the directions of ancestor and/or earlier sibling.
However, when there are complex selectors within the relative selector, e.g.
`:has(:is(..) ..)`, we first need to perform invalidation in the usual direction to
reach the relative selector's search space, then perform the relative selector
invalidation.
There are two major changes to this effect:
1. `InvalidationProcessor` has an additional lifetime that separates matching context from
invalidations. This enables storing encountered dependencies (Since we may be in a deep recursion
during the invalidation) to be relative selector invalidated, without requiring that the
matching context live that long.
2. There now exists a separate category for relative selector invalidation depenedencies,
which triggers relative selector invalidation. Dependencies now can be either normal or
relative, since any complex selector inside a relative selector would have normal
dependencies, but with its outer dependency being a relative dependency.
Differential Revision: https://phabricator.services.mozilla.com/D185675
Invalidating a relative selector requires traversal in the opposite direction of
the usual invalidation, i.e. In the directions of ancestor and/or earlier sibling.
However, when there are complex selectors within the relative selector, e.g.
`:has(:is(..) ..)`, we first need to perform invalidation in the usual direction to
reach the relative selector's search space, then perform the relative selector
invalidation.
There are two major changes to this effect:
1. `InvalidationProcessor` has an additional lifetime that separates matching context from
invalidations. This enables storing encountered dependencies (Since we may be in a deep recursion
during the invalidation) to be relative selector invalidated, without requiring that the
matching context live that long.
2. There now exists a separate category for relative selector invalidation depenedencies,
which triggers relative selector invalidation. Dependencies now can be either normal or
relative, since any complex selector inside a relative selector would have normal
dependencies, but with its outer dependency being a relative dependency.
Differential Revision: https://phabricator.services.mozilla.com/D185675
To increase the integration between color and calc it is nescessary to
vendor the current cssparser-color library into Gecko where all the calc
functionality lives.
Differential Revision: https://phabricator.services.mozilla.com/D188216
The root cause here is that percentages when mixed with lengths don't
compare / simplify, because the basis might be negative (bug 1709018),
so PartialOrd returns None for them.
When parsing a plain percentage / resolving to a percentage however, we
do want them to resolve. The regressing bug broke that because min > max
etc would effectively return false.
Differential Revision: https://phabricator.services.mozilla.com/D187974