I think this should work for the animation throttling stuff.
Opacity works on the element tree, so I think this is sound.
Differential Revision: https://phabricator.services.mozilla.com/D64441
--HG--
extra : moz-landing-system : lando
Removing unused arguments and so on.
The origin can always be inferred from the stylesheet so it wasn't being used.
Differential Revision: https://phabricator.services.mozilla.com/D64150
--HG--
extra : moz-landing-system : lando
Removing unused arguments and so on.
The origin can always be inferred from the stylesheet so it wasn't being used.
Differential Revision: https://phabricator.services.mozilla.com/D64150
--HG--
extra : moz-landing-system : lando
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.
Depends on D63861
Differential Revision: https://phabricator.services.mozilla.com/D63863
--HG--
extra : moz-landing-system : lando
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.
This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.
Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.
Differential Revision: https://phabricator.services.mozilla.com/D63861
--HG--
extra : moz-landing-system : lando
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.
Depends on D63861
Differential Revision: https://phabricator.services.mozilla.com/D63863
--HG--
extra : moz-landing-system : lando
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.
This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.
Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.
Differential Revision: https://phabricator.services.mozilla.com/D63861
--HG--
extra : moz-landing-system : lando
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.
Depends on D63792
Differential Revision: https://phabricator.services.mozilla.com/D63793
--HG--
extra : moz-landing-system : lando
* Use debug_unreachable for really unreachable code (having a release
unreachable!() there gives us little to no benefit, as a borked union can
already confuse us into reading an arbitrary pointer as a CalcPercentage).
* Avoid a clone of the calc variant when clamping. We only need to mutate the
clamping mode. This was the only clamp_to_non_negative function that didn't
consume the value.
Differential Revision: https://phabricator.services.mozilla.com/D63584
--HG--
extra : moz-landing-system : lando
We never fast-reject numbers (because they could be part of a product). Without
this refactoring we'd accept stuff like calc(10) and crash during the evaluation
for obvious reasons.
Differential Revision: https://phabricator.services.mozilla.com/D63401
--HG--
extra : moz-landing-system : lando
So as to avoid allocating an intermediate tree in Rust to resolve
`<length-percentage>` values.
Differential Revision: https://phabricator.services.mozilla.com/D63399
--HG--
extra : moz-landing-system : lando
This is the meat of the patch. There are a couple improvements done in a couple
later patches which should hopefully be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D63397
--HG--
extra : moz-landing-system : lando
We'll have different leaf nodes as we progress in the value computation stage.
Differential Revision: https://phabricator.services.mozilla.com/D63396
--HG--
extra : moz-landing-system : lando
We'll use `CalcNode` as the specified value representation for <length> and
<length-percentage> values, so they'll have to implement ToCss.
There's one minor issue (two calls to to_css() instead of to_css_impl() which
are addressed later in the series).
Differential Revision: https://phabricator.services.mozilla.com/D63395
--HG--
extra : moz-landing-system : lando
This assert was wrong. The assert may fire if we resurrect the node from a
different thread and insert a kid fast enough.
We allow resurrecting nodes (bumping the nodes from zero to one) to avoid
allocation churn.
In particular, while the thread dropping the node gets to read the children (so
after the fetch_sub from the refcount, but before the read() of the children),
another thread could plausibly bumped the refcount back, and added a children.
This is a very big edge case of course, but I'm kinda sad I hadn't realized
before.
Differential Revision: https://phabricator.services.mozilla.com/D63286
--HG--
extra : moz-landing-system : lando
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.
Differential Revision: https://phabricator.services.mozilla.com/D62649
--HG--
extra : moz-landing-system : lando
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.
Differential Revision: https://phabricator.services.mozilla.com/D62649
--HG--
extra : moz-landing-system : lando
I suggested the compat_mode bit in D62923 but it was somehow only applied to one
of the branches.
Also rustfmt the code for consistency, and add a local alias.
Differential Revision: https://phabricator.services.mozilla.com/D63015
--HG--
extra : moz-landing-system : lando
So as to avoid serializing as identifiers font-families with spaces as part of
the identifier. This avoids serializing confusing escaped sequences if the
beginning of the stuff after the space happens to not be a valid ident start.
This is an slightly more restrictive version of the existing logic, which
happens to also match other browsers in my testing.
Differential Revision: https://phabricator.services.mozilla.com/D62376
--HG--
extra : moz-landing-system : lando
We don't actually share _that_ much code across them. This makes callers clearer
and code less confusing, IMHO.
This also has the benefit of not autocompleting path from devtools for
shape-outside.
Differential Revision: https://phabricator.services.mozilla.com/D62373
--HG--
extra : moz-landing-system : lando
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.
But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().
Differential Revision: https://phabricator.services.mozilla.com/D62164
--HG--
extra : moz-landing-system : lando
Tweak the ShapeSourceRepresentation so that it doesn't store Option<>s.
Some renames so that GeometryBox doesn't conflict with the Gecko type, and some
other usual bits / re-exports to deal with cbindgen and generics.
Also, drive-by derive parsing of GeometryBox as it's trivial.
Doing this unfortunately is not possible without removing nsStyleImage first, so
let's do that before.
This makes us serialize in the shortest form for shape-outside, but that's what
we should do anyway.
(aside: the shapes code is a bit too generic, maybe we should unify
ClippingShape and FloatAreaShape...)
Differential Revision: https://phabricator.services.mozilla.com/D62163
--HG--
extra : moz-landing-system : lando
We include it everywhere because it's included from gfxTypes.h.
This should avoid including all the generated bindings _everywhere_.
Differential Revision: https://phabricator.services.mozilla.com/D62174
--HG--
extra : moz-landing-system : lando