diff options
-rw-r--r-- | components/style/gecko/conversions.rs | 13 | ||||
-rw-r--r-- | components/style/gecko/values.rs | 1 | ||||
-rw-r--r-- | components/style/gecko/wrapper.rs | 1 | ||||
-rw-r--r-- | components/style/rule_tree/mod.rs | 2 | ||||
-rw-r--r-- | components/style/stylesheet_set.rs | 2 | ||||
-rw-r--r-- | components/style/traversal.rs | 3 | ||||
-rw-r--r-- | components/style/values/generics/font.rs | 2 |
7 files changed, 4 insertions, 20 deletions
diff --git a/components/style/gecko/conversions.rs b/components/style/gecko/conversions.rs index e36ff141eae..43438438a40 100644 --- a/components/style/gecko/conversions.rs +++ b/components/style/gecko/conversions.rs @@ -418,10 +418,8 @@ impl nsStyleImage { use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE; use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER; use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE; - use crate::values::computed::image::LineDirection; use crate::values::computed::position::Position; - use crate::values::computed::Length; - use crate::values::generics::image::{Circle, ColorStop, CompatMode, Ellipse}; + use crate::values::generics::image::{Circle, ColorStop, Ellipse}; use crate::values::generics::image::{EndingShape, GradientKind, ShapeExtent}; let gecko_gradient = bindings::Gecko_GetGradientImageValue(self) @@ -834,8 +832,7 @@ impl TrackSize<LengthPercentage> { /// Return TrackSize from given two nsStyleCoord pub fn from_gecko_style_coords<T: CoordData>(gecko_min: &T, gecko_max: &T) -> Self { use crate::gecko_bindings::structs::root::nsStyleUnit; - use crate::values::computed::length::LengthPercentage; - use crate::values::generics::grid::{TrackBreadth, TrackSize}; + use crate::values::generics::grid::TrackBreadth; if gecko_min.unit() == nsStyleUnit::eStyleUnit_None { debug_assert!( @@ -862,8 +859,6 @@ impl TrackSize<LengthPercentage> { /// Save TrackSize to given gecko fields. pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) { - use crate::values::generics::grid::TrackSize; - match *self { TrackSize::FitContent(ref lop) => { // Gecko sets min value to None and max value to the actual value in fit-content @@ -893,8 +888,6 @@ impl TrackListValue<LengthPercentage, Integer> { /// Save TrackSize to given gecko fields. pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) { - use crate::values::generics::grid::TrackListValue; - match *self { TrackListValue::TrackSize(ref size) => size.to_gecko_style_coords(gecko_min, gecko_max), _ => unreachable!("Should only transform from track-size computed values"), @@ -918,8 +911,6 @@ where pub fn from_gecko_rect( sides: &crate::gecko_bindings::structs::nsStyleSides, ) -> Option<crate::values::generics::rect::Rect<T>> { - use crate::values::generics::rect::Rect; - Some(Rect::new( T::from_gecko_style_coord(&sides.data_at(0)).expect("coord[0] cound not convert"), T::from_gecko_style_coord(&sides.data_at(1)).expect("coord[1] cound not convert"), diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs index 6b3e7a676e0..946fa437d64 100644 --- a/components/style/gecko/values.rs +++ b/components/style/gecko/values.rs @@ -317,7 +317,6 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint<LengthPercentage> { fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> { use crate::gecko_bindings::structs::root::nsStyleUnit; - use crate::values::generics::gecko::ScrollSnapPoint; Some(match coord.unit() { nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None, diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index a3c1ebeec0b..bab4b1e2113 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -986,7 +986,6 @@ fn get_animation_rule( element: &GeckoElement, cascade_level: CascadeLevel, ) -> Option<Arc<Locked<PropertyDeclarationBlock>>> { - use crate::gecko_bindings::sugar::ownership::HasSimpleFFI; use crate::properties::longhands::ANIMATABLE_PROPERTY_COUNT; // There's a very rough correlation between the number of effects diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index f165e1f455f..3e2696fff9b 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -1239,7 +1239,7 @@ impl StrongRuleNode { use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_BACKGROUND; use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_BORDER; use crate::gecko_bindings::structs::NS_AUTHOR_SPECIFIED_PADDING; - use crate::properties::{CSSWideKeyword, LonghandId, LonghandIdSet}; + use crate::properties::{CSSWideKeyword, LonghandId}; use crate::properties::{PropertyDeclaration, PropertyDeclarationId}; use crate::values::specified::Color; use std::borrow::Cow; diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index 35060a959d6..409978c3a9e 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -211,8 +211,6 @@ where type Item = (&'a S, SheetRebuildKind); fn next(&mut self) -> Option<Self::Item> { - use std::mem; - loop { let potential_sheet = self.iter.next()?; diff --git a/components/style/traversal.rs b/components/style/traversal.rs index d5a9a5c5033..5ed2388ca5d 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -307,8 +307,6 @@ pub fn resolve_style<E>( where E: TElement, { - use crate::style_resolver::StyleResolverForElement; - debug_assert!( rule_inclusion == RuleInclusion::DefaultOnly || pseudo.map_or(false, |p| p.is_before_or_after()) || @@ -406,7 +404,6 @@ pub fn recalc_style_at<E, D, F>( D: DomTraversal<E>, F: FnMut(E::ConcreteNode), { - use crate::traversal_flags::TraversalFlags; use std::cmp; let flags = context.shared.traversal_flags; diff --git a/components/style/values/generics/font.rs b/components/style/values/generics/font.rs index cb1ec77e781..36c15172490 100644 --- a/components/style/values/generics/font.rs +++ b/components/style/values/generics/font.rs @@ -118,7 +118,7 @@ impl ToCss for FontTag { where W: Write, { - use byteorder::{BigEndian, ByteOrder}; + use byteorder::ByteOrder; use std::str; let mut raw = [0u8; 4]; |