aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-11-10 21:06:08 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-11-10 21:11:47 +0100
commit155caba59512cf284d6c2b1c118ed3afeb8fdf49 (patch)
tree627402a062bc7bc76604fa4723336e47b5915828
parent48ce20b6fe283452993af86bbc1269946290896a (diff)
downloadservo-155caba59512cf284d6c2b1c118ed3afeb8fdf49.tar.gz
servo-155caba59512cf284d6c2b1c118ed3afeb8fdf49.zip
style: Cargo fix + ./mach fmt.
-rw-r--r--components/style/gecko/pseudo_element.rs4
-rw-r--r--components/style/rule_collector.rs18
-rw-r--r--components/style/stylist.rs3
-rw-r--r--components/style/values/computed/mod.rs2
-rw-r--r--components/style/values/computed/text.rs2
-rw-r--r--components/style/values/generics/background.rs2
-rw-r--r--components/style/values/specified/length.rs2
-rw-r--r--components/style/values/specified/mod.rs2
-rw-r--r--components/style/values/specified/transform.rs5
9 files changed, 21 insertions, 19 deletions
diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs
index 0b527e623e5..32b7db63a20 100644
--- a/components/style/gecko/pseudo_element.rs
+++ b/components/style/gecko/pseudo_element.rs
@@ -33,9 +33,7 @@ impl ::selectors::parser::PseudoElement for PseudoElement {
fn valid_after_slotted(&self) -> bool {
matches!(
*self,
- PseudoElement::Before |
- PseudoElement::After |
- PseudoElement::Placeholder
+ PseudoElement::Before | PseudoElement::After | PseudoElement::Placeholder
)
}
diff --git a/components/style/rule_collector.rs b/components/style/rule_collector.rs
index b975beca652..f39dc0e6acb 100644
--- a/components/style/rule_collector.rs
+++ b/components/style/rule_collector.rs
@@ -4,18 +4,18 @@
//! Collects a series of applicable rules for a given element.
-use applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
-use dom::{TElement, TShadowRoot};
-use properties::{AnimationRules, PropertyDeclarationBlock};
-use rule_tree::{CascadeLevel, ShadowCascadeOrder};
-use selector_map::SelectorMap;
-use selector_parser::PseudoElement;
+use crate::applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
+use crate::dom::{TElement, TShadowRoot};
+use crate::properties::{AnimationRules, PropertyDeclarationBlock};
+use crate::rule_tree::{CascadeLevel, ShadowCascadeOrder};
+use crate::selector_map::SelectorMap;
+use crate::selector_parser::PseudoElement;
+use crate::shared_lock::Locked;
+use crate::stylesheets::Origin;
+use crate::stylist::{AuthorStylesEnabled, Rule, RuleInclusion, Stylist};
use selectors::matching::{ElementSelectorFlags, MatchingContext};
use servo_arc::ArcBorrow;
-use shared_lock::Locked;
use smallvec::SmallVec;
-use stylesheets::Origin;
-use stylist::{AuthorStylesEnabled, Rule, RuleInclusion, Stylist};
/// An object that we use with all the intermediate state needed for the
/// cascade.
diff --git a/components/style/stylist.rs b/components/style/stylist.rs
index 7698eebe21a..7a4bbedab52 100644
--- a/components/style/stylist.rs
+++ b/components/style/stylist.rs
@@ -1133,7 +1133,8 @@ impl Stylist {
applicable_declarations,
context,
flags_setter,
- ).collect_all();
+ )
+ .collect_all();
}
/// Given an id, returns whether there might be any rules for that id in any
diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs
index 045c7489472..e24472a8068 100644
--- a/components/style/values/computed/mod.rs
+++ b/components/style/values/computed/mod.rs
@@ -77,8 +77,8 @@ pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
pub use self::table::XSpan;
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize};
+pub use self::text::{OverflowWrap, TextOverflow, WordSpacing};
pub use self::text::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
-pub use self::text::{TextOverflow, WordSpacing, OverflowWrap};
pub use self::time::Time;
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
diff --git a/components/style/values/computed/text.rs b/components/style/values/computed/text.rs
index 88e458cbd3e..77bc6980f98 100644
--- a/components/style/values/computed/text.rs
+++ b/components/style/values/computed/text.rs
@@ -19,9 +19,9 @@ use crate::values::{CSSFloat, CSSInteger};
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss};
+pub use crate::values::specified::OverflowWrap;
pub use crate::values::specified::TextAlignKeyword as TextAlign;
pub use crate::values::specified::TextEmphasisPosition;
-pub use crate::values::specified::OverflowWrap;
/// A computed value for the `initial-letter` property.
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
diff --git a/components/style/values/generics/background.rs b/components/style/values/generics/background.rs
index e1514959837..35130836991 100644
--- a/components/style/values/generics/background.rs
+++ b/components/style/values/generics/background.rs
@@ -4,9 +4,9 @@
//! Generic types for CSS values related to backgrounds.
+use crate::values::IsAuto;
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss};
-use values::IsAuto;
/// A generic value for the `background-size` property.
#[derive(
diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs
index 429d06a1e54..e3c04d47959 100644
--- a/components/style/values/specified/length.rs
+++ b/components/style/values/specified/length.rs
@@ -14,7 +14,7 @@ use crate::values::computed::{self, CSSPixelLength, Context, ExtremumLength};
use crate::values::generics::length::{
MaxLength as GenericMaxLength, MozLength as GenericMozLength,
};
-use values::generics::transform::IsZeroLength;
+use crate::values::generics::transform::IsZeroLength;
use crate::values::generics::NonNegative;
use crate::values::specified::calc::CalcNode;
use crate::values::{Auto, CSSFloat, Either, IsAuto, Normal};
diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs
index bb9bca07b0f..d416be80197 100644
--- a/components/style/values/specified/mod.rs
+++ b/components/style/values/specified/mod.rs
@@ -75,8 +75,8 @@ pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
pub use self::svg_path::SVGPathData;
pub use self::table::XSpan;
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign};
+pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle};
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
-pub use self::text::{TextEmphasisPosition, TextEmphasisStyle, OverflowWrap};
pub use self::time::Time;
pub use self::transform::{Rotate, Scale, Transform};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
diff --git a/components/style/values/specified/transform.rs b/components/style/values/specified/transform.rs
index 661f105e555..2a45e1c6e61 100644
--- a/components/style/values/specified/transform.rs
+++ b/components/style/values/specified/transform.rs
@@ -395,7 +395,10 @@ impl Parse for Translate {
}
// 'translate: <length-percentage> '
- Ok(generic::Translate::Translate(tx, specified::LengthOrPercentage::zero()))
+ Ok(generic::Translate::Translate(
+ tx,
+ specified::LengthOrPercentage::zero(),
+ ))
}
}