This removes an extra layer of abstraction and allows Servo to share
more code with Gecko. In addition, we will need to handle raw
`AnimationValue` structs soon in order to fully implement "faster
reversing of interrupted transitions."
Depends on D78192
Differential Revision: https://phabricator.services.mozilla.com/D78193
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.
We still look for nodes not in the flow tree in the layout thread.
Depends on D78191
Differential Revision: https://phabricator.services.mozilla.com/D78192
This implementation is more-or-less on par with the one from layout_2013
and in some cases better. There are still some cases where we don't
return the correct "resolved value," but this is enough to test
animations and transitions.
Depends on D78190
Differential Revision: https://phabricator.services.mozilla.com/D78191
This change splits the list of animations and transitions, which are
almost always handled differently. It also renames
`ElementAnimationState` to `ElementAnimationSet` and establishes an
`AnimationState` for every transition and animation. This allows us to
stop continually reallocating lists every time a transition or animation
needs to be canceled.
Fixes#14419.
Depends on D78189
Differential Revision: https://phabricator.services.mozilla.com/D78190
This is a small step toward fixing #19242. The main idea is that the
clock for animations should advance as the event loop ticks. We
accomplish this by moving the clock from layout and naming it the
"animation timeline" which is the spec language. This should fix
flakiness with animations and transitions tests where a reflow could
move animations forward while script was running.
This change also starts to break out transition and animation events
into their own data structure, because it's quite likely that the next
step in fixing #19242 is to no longer send these events through a
channel.
Depends on D78188
Differential Revision: https://phabricator.services.mozilla.com/D78189
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.
While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.
Fixes#13865.
Depends on D78187
Differential Revision: https://phabricator.services.mozilla.com/D78188
This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.
This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and animationiteration` events.
Depends on D78186
Differential Revision: https://phabricator.services.mozilla.com/D78187
`update_style_for_animation` previously handled both canceling defunct
animations and also updating style to reflect current animation state.
This change splits those two concerns because we want to start handling
replaced or canceled animations and finished animations in two different
places.
This is a refactor, so ideally it shouldn't change any behavior.
Depends on D78185
Differential Revision: https://phabricator.services.mozilla.com/D78186
When doing a restyle, we should apply animations and transitions to the
new style so that it is reflected in `getComputedStyle()` and the new
style information properly cascades. This is the first part of properly
ticking animations and transitions.
This causes a couple new animations tests failures (along with many new
passes), but we currently don't have support for properly handling
animations after they have completed, so this isn't totally unexpected.
Depends on D78184
Differential Revision: https://phabricator.services.mozilla.com/D78185
This refactor is preparation for implementing a specification
compliant transitions and animations processing model.
These data structures hold all the animation information about a single
node. Since adding, updating, and modifying animations for a single node
are all interdependent, it makes sense to start encapsulating animation
data and functionality into a single data structure. This also opens up
the possibility for easier concurrency in the future by more easily
allowing per-node mutexes.
Differential Revision: https://phabricator.services.mozilla.com/D78184
The probes collect counts for:
- print preview open, and exit without print
- print dialog opened from print preview, and cancelled
- print dialog opened without print preview, and cancelled
- silent prints
- print target
- PDF file
- XPS file
- other (probably print to physical printer, but we can never be sure)
There is some overlap with the existing PRINT_* probes, but I think we should
keep those in place temporarily until we confirm that the new probes produce
numbers that are consistent with the old probes.
This patch only adds 'print target' probes for Windows and macOS.
I use nsDeviceContextSpec*::Init() to collect the 'print target' telemetry
because the way we initialize settings from prefs (and the way macOS works in
particular) make it difficult to reliably determine the target type earlier in
the print process for all possible entry points into the printing code.
Differential Revision: https://phabricator.services.mozilla.com/D78033
We don't send WebProgress location change events for remote subframe
navigations, so listen for a new WindowGlobalParent instead.
Differential Revision: https://phabricator.services.mozilla.com/D78107
WR font sanitization appears relatively stable now, and we passed the 79
cutoff, so let WR font sanitization ride the trains.
Differential Revision: https://phabricator.services.mozilla.com/D78147
This is should not be a functional change, just making the methods in SVGTests easier to use/understand.
There's a little dead code removal since we can go through the same code path for empty intl.accept_languages as we do when it has a value, and we'd almost always expect it to have a value.
Differential Revision: https://phabricator.services.mozilla.com/D77694
The reply argument that gets passed in is a stack reference which is move
assigned into, so it doesn't make sense as a unique pointer, although the
code could be restructured to return a freshly allocated object instead.
This mostly just eliminates a spurious round trip from UniquePtr to *
and back. The bulk of the patch is renaming uses of |msg| to |aMsg|.
Differential Revision: https://phabricator.services.mozilla.com/D77908
In nsSVGOuterSVGFrame::IsContainingWindowElementOfType, we now inspect
the embedder by asking the window for its browsing context, instead of
asking it directly for its frame element.
Differential Revision: https://phabricator.services.mozilla.com/D77518
Currently, MOZ_ALIGNED_DECL uses the order (_type, _align) for its
parameters. However, this order makes the code less readable when
_type is a larger object like a struct because the value for _align
would be at the end of the struct definition. By swapping the order
of _type and _align, the alignment value will always be next to
the type name, regardless how far the definition of _type extends.
Differential Revision: https://phabricator.services.mozilla.com/D77288