mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Introduce UpdateAnimationTasks to perform a bunch of animation's tasks in a SequentialTask.
The UpdateAnimationsTasks is a bitflags and each bit is generated from Gecko's UpdateAnimationsTasks (enum class) values for matching values between C++ and Rust. For this reason, the bitflags is annotated as (feature = "gecko"), as a result update_animations() which uses this bitflags also became gecko-only function.
This commit is contained in:
parent
0c843d4b7d
commit
4183b0dff2
9 changed files with 82 additions and 21 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
use {Atom, Namespace, LocalName};
|
||||
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
||||
#[cfg(feature = "gecko")] use context::UpdateAnimationsTasks;
|
||||
use data::ElementData;
|
||||
use element_state::ElementState;
|
||||
use properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
|
@ -366,9 +367,10 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
|
|||
/// Returns true if the element has all the specified selector flags.
|
||||
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
|
||||
|
||||
/// Creates a task to update CSS Animations on a given (pseudo-)element.
|
||||
/// Note: Gecko only.
|
||||
fn update_animations(&self, _pseudo: Option<&PseudoElement>);
|
||||
/// Creates a task to update various animation state on a given (pseudo-)element.
|
||||
#[cfg(feature = "gecko")]
|
||||
fn update_animations(&self, _pseudo: Option<&PseudoElement>,
|
||||
tasks: UpdateAnimationsTasks);
|
||||
|
||||
/// Returns true if the element has relevant animations. Relevant
|
||||
/// animations are those animations that are affecting the element's style
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue