mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Skip update_animations if we have no running animations and the element becomes display:none.
This commit is contained in:
parent
9ff99d4608
commit
c32ba98031
5 changed files with 22 additions and 4 deletions
|
@ -29,6 +29,7 @@ use gecko_bindings::bindings::{Gecko_IsLink, Gecko_IsRootElement, Gecko_MatchesE
|
|||
use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink, Gecko_Namespace};
|
||||
use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_ElementHasCSSAnimations;
|
||||
use gecko_bindings::bindings::Gecko_GetAnimationRule;
|
||||
use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
|
||||
|
@ -526,6 +527,11 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
parent_values_opt);
|
||||
}
|
||||
}
|
||||
|
||||
fn has_css_animations(&self, pseudo: Option<&PseudoElement>) -> bool {
|
||||
let atom_ptr = PseudoElement::ns_atom_or_null_from_opt(pseudo);
|
||||
unsafe { Gecko_ElementHasCSSAnimations(self.0, atom_ptr) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'le> PartialEq for GeckoElement<'le> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue