mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Remove the get_ prefix from get_smil_override, and other animation stuff.
This commit is contained in:
parent
c5bfc81b74
commit
607cf5aa3c
4 changed files with 15 additions and 22 deletions
|
@ -438,31 +438,28 @@ pub trait TElement
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get this element's SMIL override declarations.
|
/// Get this element's SMIL override declarations.
|
||||||
fn get_smil_override(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
|
fn smil_override(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the combined animation and transition rules.
|
/// Get the combined animation and transition rules.
|
||||||
fn get_animation_rules(&self) -> AnimationRules {
|
///
|
||||||
|
/// FIXME(emilio): Is this really useful?
|
||||||
|
fn animation_rules(&self) -> AnimationRules {
|
||||||
if !self.may_have_animations() {
|
if !self.may_have_animations() {
|
||||||
return AnimationRules(None, None)
|
return AnimationRules(None, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationRules(
|
AnimationRules(self.animation_rule(), self.transition_rule())
|
||||||
self.get_animation_rule(),
|
|
||||||
self.get_transition_rule(),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get this element's animation rule.
|
/// Get this element's animation rule.
|
||||||
fn get_animation_rule(&self)
|
fn animation_rule(&self) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||||
-> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get this element's transition rule.
|
/// Get this element's transition rule.
|
||||||
fn get_transition_rule(&self)
|
fn transition_rule(&self) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||||
-> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
unsafe { Gecko_UnsetDirtyStyleAttr(self.0) };
|
unsafe { Gecko_UnsetDirtyStyleAttr(self.0) };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_smil_override(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
|
fn smil_override(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let slots = self.get_extended_slots()?;
|
let slots = self.get_extended_slots()?;
|
||||||
|
|
||||||
|
@ -1084,15 +1084,11 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_animation_rule(
|
fn animation_rule(&self) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||||
&self,
|
|
||||||
) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
|
||||||
get_animation_rule(self, CascadeLevel::Animations)
|
get_animation_rule(self, CascadeLevel::Animations)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_transition_rule(
|
fn transition_rule(&self) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
||||||
&self,
|
|
||||||
) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
|
|
||||||
get_animation_rule(self, CascadeLevel::Transitions)
|
get_animation_rule(self, CascadeLevel::Transitions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -766,7 +766,7 @@ pub trait MatchMethods : TElement {
|
||||||
if replacements.contains(RestyleHint::RESTYLE_SMIL) {
|
if replacements.contains(RestyleHint::RESTYLE_SMIL) {
|
||||||
replace_rule_node(
|
replace_rule_node(
|
||||||
CascadeLevel::SMILOverride,
|
CascadeLevel::SMILOverride,
|
||||||
self.get_smil_override(),
|
self.smil_override(),
|
||||||
primary_rules,
|
primary_rules,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -774,7 +774,7 @@ pub trait MatchMethods : TElement {
|
||||||
if replacements.contains(RestyleHint::RESTYLE_CSS_TRANSITIONS) {
|
if replacements.contains(RestyleHint::RESTYLE_CSS_TRANSITIONS) {
|
||||||
replace_rule_node(
|
replace_rule_node(
|
||||||
CascadeLevel::Transitions,
|
CascadeLevel::Transitions,
|
||||||
self.get_transition_rule().as_ref().map(|a| a.borrow_arc()),
|
self.transition_rule().as_ref().map(|a| a.borrow_arc()),
|
||||||
primary_rules,
|
primary_rules,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -782,7 +782,7 @@ pub trait MatchMethods : TElement {
|
||||||
if replacements.contains(RestyleHint::RESTYLE_CSS_ANIMATIONS) {
|
if replacements.contains(RestyleHint::RESTYLE_CSS_ANIMATIONS) {
|
||||||
replace_rule_node(
|
replace_rule_node(
|
||||||
CascadeLevel::Animations,
|
CascadeLevel::Animations,
|
||||||
self.get_animation_rule().as_ref().map(|a| a.borrow_arc()),
|
self.animation_rule().as_ref().map(|a| a.borrow_arc()),
|
||||||
primary_rules,
|
primary_rules,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,8 +439,8 @@ where
|
||||||
self.element,
|
self.element,
|
||||||
implemented_pseudo.as_ref(),
|
implemented_pseudo.as_ref(),
|
||||||
self.element.style_attribute(),
|
self.element.style_attribute(),
|
||||||
self.element.get_smil_override(),
|
self.element.smil_override(),
|
||||||
self.element.get_animation_rules(),
|
self.element.animation_rules(),
|
||||||
self.rule_inclusion,
|
self.rule_inclusion,
|
||||||
&mut applicable_declarations,
|
&mut applicable_declarations,
|
||||||
&mut matching_context,
|
&mut matching_context,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue