mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
Call may_have_animations() for parent element in the case where the target is pseudo element.
In case of pseudo elements ElementHasAnimations is set on the parent element. updating-animation-on-pseudo-element.html fails without this patch, succeeds with this patch.
This commit is contained in:
parent
7d95fb8e49
commit
48851135e8
1 changed files with 10 additions and 0 deletions
|
@ -1089,6 +1089,16 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn may_have_animations(&self) -> bool {
|
fn may_have_animations(&self) -> bool {
|
||||||
|
if let Some(pseudo) = self.implemented_pseudo_element() {
|
||||||
|
if !pseudo.is_before_or_after() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return self.parent_element()
|
||||||
|
.map_or(false, |p| {
|
||||||
|
p.as_node()
|
||||||
|
.get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
|
||||||
|
});
|
||||||
|
}
|
||||||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
|
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue