From 6341ebf29a46e12bf7af6fdc1ac40bd65d2bc19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 23 Apr 2020 05:02:03 +0200 Subject: [PATCH] Bug 1632363 - Fix some warnings introduced by the previous patches. MANUAL PUSH: Avoid reviewer information from previous patches from getting lost. --- servo/components/style/animation.rs | 8 ++++++-- servo/ports/geckolib/glue.rs | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) 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]