mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Check ElementHasAnimations before trying to get animations rules.
In case of ::before and ::after element, the generated content has no ElementHasAnimations flag, their parent has the flag.
This commit is contained in:
parent
4935d972e5
commit
fce7c2d885
3 changed files with 24 additions and 12 deletions
|
@ -506,6 +506,11 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
|||
/// Returns true if the element has all the specified selector flags.
|
||||
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
|
||||
|
||||
/// In Gecko, element has a flag that represents the element may have
|
||||
/// any type of animations or not to bail out animation stuff early.
|
||||
/// Whereas Servo doesn't have such flag.
|
||||
fn may_have_animations(&self) -> bool { false }
|
||||
|
||||
/// Creates a task to update various animation state on a given (pseudo-)element.
|
||||
#[cfg(feature = "gecko")]
|
||||
fn update_animations(&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue