During an animation restyle, two links might share the same rules while
not sharing the same link-ness.
This is a temporary state, but let's deal with it correctly.
Differential Revision: https://phabricator.services.mozilla.com/D203891
This was done using bindgen's "emit_diagnostics" feature, which shows
unused allowlist entries.
Enabling it by default would need extra dependencies so for now don't.
Differential Revision: https://phabricator.services.mozilla.com/D203533
Even if `mask-origin` is at its initial value `border-box`, we still have to
serialize it to avoid ambiguity iF the `mask-clip` longhand has some other
`<coord-box>` value (i.e. neither `border-box` nor `no-clip`).
Differential Revision: https://phabricator.services.mozilla.com/D203209
The regressing bug regressed some calc() expressions like the one in the
test-case:
max-width: calc(100% - <some-fixed-length>);
Where floating point precision basically made us lose a little bit of
precision here and there.
Before bug 1841612, this worked because we'd operate in fixed point for
such simple expressions at least. Things could easily go equally south
for more complex things including e.g. rem().
Rounding seems like the better default for calc() since we basically
have no idea of what the output is going to be, and makes the answer
more likely to be precise.
Note that this only affects actual mixed calc() expressions: If things
resolve to a percentage we keep existing behavior.
Differential Revision: https://phabricator.services.mozilla.com/D202746
In order to do it, expose the button padding to CSS via env(), and make
the buttons just use the regular drawing.
This slightly changes the padding to the end of the titlebar to match
one half of the inter-button spacing, rather that however much padding
the headerbar has.
We could improve on this slightly by also exposing the headerbar padding
and applying that to the last button, but that's not terribly easy to do
due to us supporting re-ordering of the titlebar buttons, and reversing
their placement, so it'd involve some rather hacky CSS. Not impossible,
but not trivial, and this looks good enough IMO.
Differential Revision: https://phabricator.services.mozilla.com/D202616
This will allow calling InspectorUtils.ColorTo("red", "lab") and
receive {color: "lab(54.3 80.8 69.9)", components: [54.3, 80.8, 69.9, 1.0], adjusted: false}.
The adjusted value is always "false", because gamut checking and mapping
is not supported at the moment. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=1823363
Depends on D192673
Differential Revision: https://phabricator.services.mozilla.com/D169942
This function allows writing colors as authored values so that it can
be used in the frontend (devtools) and diplayed to users.
Mostly this avoid serializing hsl/hwb to rgb format like it does for
specified/computed values. For lab/lch/etc. it uses percentages and
angles to make it more clear to authored.
Depends on D192672
Differential Revision: https://phabricator.services.mozilla.com/D192673
When transition-behavior is allow-discrete, the animation values are
transitionable even if they are not interpoltable, given that the
animation type of the CSS property is by computed value.
Also, we remove `animate()` check from `needs_transitions_update_per_property`.
This check was added for handling the transition between `auto` and
other values long time ago, but now it may be redundant (because we
still pass the tests without it) and we do the same things in
nsTransitionManager as well, so it should be fine to drop it, especially
after we support discrete transitions.
Differential Revision: https://phabricator.services.mozilla.com/D201865
The implementation is straight-forward. We have to check
if `transition-behavior` is `allow-discrete` when trying to create a new
transition and when checking if we have to cancel a running transition.
Also, the test case is out-of-date, so I tweak it a little bit and add
more general test cases for transtiion-behavior. Besides, I enable the
preference in the WPT folders which use `transition-behavior` (but
those tests may be passed already or failed due to reasons other than
`transition-behavior`).
Differential Revision: https://phabricator.services.mozilla.com/D201864
Was added in bug 1793012. No longer needed since `:has` is part of
reinvalidation selectors now. The new approach can be potentially-
pricey, but is a lot simpler.
Differential Revision: https://phabricator.services.mozilla.com/D200224
Would generate invalid results `:has()` selector if it's in the subject
compound but also uses a pseudo-selector (e.g. `.foo:has(.bar)::after`).
Also rename `Rightmost` to `SubjectOrPseudoElement` to more accurately
describe what it indicates.
Differential Revision: https://phabricator.services.mozilla.com/D200222
This speeds up custom variable substitution by avoiding re-tokenizing,
and variable reference parsing by avoiding doing duplicate work.
This is a very noticeable improvement in the NewsSite subtests of
speedometer 3 (see comparison posted in bug 1879318 and the #perf-sp3
matrix channel). But it also probably helps most websites using lots of
variables, and the browser UI itself.
Finally, it also avoids some duplication. Now regular substitution and
fallback substitution is handled uniformly, which causes a progression
in some properties-and-values tests.
Differential Revision: https://phabricator.services.mozilla.com/D201116
This is a preliminary patch to keep all references (even duplicates), in
order to speed up substitution by avoiding re-tokenizing.
The assumption is that referencing the same variable multiple times
on the declaration is not common, and thus it's not a big deal to
optimize for that.
Differential Revision: https://phabricator.services.mozilla.com/D201082
Inherited properties with universal syntax and unregistered properties should
behave basically the same.
This removes some redundant checks and guarantees that we have the same
code-paths in those two cases.
Differential Revision: https://phabricator.services.mozilla.com/D200995
Reduce the amount of times we need to manually call the custom property
registration code by handling values with and without references in the same
function.
Differential Revision: https://phabricator.services.mozilla.com/D200993
Older versions of the yaru theme had dark titlebars even in light mode
(like yaru-remix).
Instead of getting into the version-detection business, just don't
override with the Adwaita colors.
Differential Revision: https://phabricator.services.mozilla.com/D200362