mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +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
|
@ -422,11 +422,6 @@ impl<'le> GeckoElement<'le> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn may_have_animations(&self) -> bool {
|
||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn has_id(&self) -> bool {
|
||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasID)
|
||||
|
@ -777,6 +772,11 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
(self.flags() & node_flags) == node_flags
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn may_have_animations(&self) -> bool {
|
||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
|
||||
}
|
||||
|
||||
fn update_animations(&self,
|
||||
before_change_style: Option<Arc<ComputedValues>>,
|
||||
tasks: UpdateAnimationsTasks) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue