diff --git a/servo/components/style/animation.rs b/servo/components/style/animation.rs index 68316f8ed5f7..69ccf4e04418 100644 --- a/servo/components/style/animation.rs +++ b/servo/components/style/animation.rs @@ -12,10 +12,12 @@ use crate::bezier::Bezier; use crate::context::SharedStyleContext; use crate::dom::{OpaqueNode, TElement}; use crate::font_metrics::FontMetricsProvider; -use crate::properties::animated_properties::{AnimatedProperty, TransitionPropertyIteration}; +use crate::properties::animated_properties::AnimatedProperty; use crate::properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection; use crate::properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState; -use crate::properties::{self, CascadeMode, ComputedValues, LonghandId, LonghandIdSet}; +use crate::properties::{self, CascadeMode, ComputedValues, LonghandId}; +#[cfg(feature = "servo")] +use crate::properties::LonghandIdSet; use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue}; use crate::stylesheets::Origin; use crate::timer::Timer; @@ -432,6 +434,8 @@ pub fn start_transitions_if_applicable( expired_transitions: &[PropertyAnimation], running_animations: &[Animation], ) -> LonghandIdSet { + use crate::properties::animated_properties::TransitionPropertyIteration; + // If the style of this element is display:none, then we don't start any transitions // and we cancel any currently running transitions by returning an empty LonghandIdSet. if new_style.get_box().clone_display().is_none() { diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index ec8ed2787a0d..044c87eb5dd6 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -349,9 +349,7 @@ pub extern "C" fn Servo_TraverseSubtree( #[no_mangle] pub extern "C" fn Servo_MaybeGCRuleTree(raw_data: &RawServoStyleSet) { let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); - unsafe { - per_doc_data.stylist.rule_tree().maybe_gc(); - } + per_doc_data.stylist.rule_tree().maybe_gc(); } #[no_mangle]