diff options
Diffstat (limited to 'components/style')
-rw-r--r-- | components/style/gecko/generated/bindings.rs | 13 | ||||
-rw-r--r-- | components/style/rule_tree/mod.rs | 19 |
2 files changed, 32 insertions, 0 deletions
diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 404e072b04e..3ffab7ccf56 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -3005,6 +3005,19 @@ extern "C" { -> ServoStyleContextStrong; } extern "C" { + pub fn Servo_StyleSet_GetComputedValuesByAddingAnimation(set: + RawServoStyleSetBorrowed, + element: + RawGeckoElementBorrowed, + existing_style: + ServoStyleContextBorrowed, + snapshots: + *const ServoElementSnapshotTable, + animation: + RawServoAnimationValueBorrowed) + -> ServoStyleContextStrong; +} +extern "C" { pub fn Servo_SerializeFontValueForCanvas(declarations: RawServoDeclarationBlockBorrowed, buffer: *mut nsAString); diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index 49c42a7f223..02c329257ac 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -446,6 +446,25 @@ impl RuleTree { let rule = self.insert_ordered_rules_from(last.parent().unwrap().clone(), children.drain().rev()); rule } + + /// Returns new rule node by adding animation rules at transition level. + /// The additional rules must be appropriate for the transition + /// level of the cascade, which is the highest level of the cascade. + /// (This is the case for one current caller, the cover rule used + /// for CSS transitions.) + pub fn add_animation_rules_at_transition_level( + &self, + path: &StrongRuleNode, + pdb: Arc<Locked<PropertyDeclarationBlock>>, + guards: &StylesheetGuards, + ) -> StrongRuleNode { + let mut dummy = false; + self.update_rule_at_level(CascadeLevel::Transitions, + Some(pdb.borrow_arc()), + path, + guards, + &mut dummy).expect("Should return a valid rule node") + } } /// The number of RuleNodes added to the free list before we will consider |