aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-11-08 01:03:45 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-11-08 15:22:31 +0100
commit8cb5b149eb5a847d4dcae5d4190b89015a5d599b (patch)
tree15aa9fcc0bf67b5122723f363a543f7734ace14f
parent2ea4af1171e50970760f9644af883fb50e192b02 (diff)
downloadservo-8cb5b149eb5a847d4dcae5d4190b89015a5d599b.tar.gz
servo-8cb5b149eb5a847d4dcae5d4190b89015a5d599b.zip
style: Some minor formatting nits.
-rw-r--r--components/style/gecko/data.rs5
-rw-r--r--components/style/gecko/non_ts_pseudo_class_list.rs45
-rw-r--r--components/style/gecko/values.rs9
-rw-r--r--components/style/gecko/wrapper.rs9
-rw-r--r--components/style/values/animated/length.rs5
-rw-r--r--components/style/values/computed/mod.rs25
-rw-r--r--components/style/values/computed/svg.rs5
-rw-r--r--components/style/values/mod.rs5
-rw-r--r--components/style/values/specified/box.rs5
-rw-r--r--components/style/values/specified/font.rs5
-rw-r--r--components/style/values/specified/mod.rs10
11 files changed, 54 insertions, 74 deletions
diff --git a/components/style/gecko/data.rs b/components/style/gecko/data.rs
index 7761d9c2655..aae0104c442 100644
--- a/components/style/gecko/data.rs
+++ b/components/style/gecko/data.rs
@@ -8,10 +8,9 @@ use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
use context::QuirksMode;
use dom::TElement;
use gecko_bindings::bindings::{self, RawServoStyleSet};
+use gecko_bindings::structs::StyleSheet as DomStyleSheet;
use gecko_bindings::structs::{nsIDocument, StyleSheetInfo};
-use gecko_bindings::structs::{
- RawGeckoPresContextBorrowed, ServoStyleSetSizes, StyleSheet as DomStyleSheet,
-};
+use gecko_bindings::structs::{RawGeckoPresContextBorrowed, ServoStyleSetSizes};
use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
use invalidation::media_queries::{MediaListKey, ToMediaListKey};
use malloc_size_of::MallocSizeOfOps;
diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs
index b37af9d71b6..f7d8be418de 100644
--- a/components/style/gecko/non_ts_pseudo_class_list.rs
+++ b/components/style/gecko/non_ts_pseudo_class_list.rs
@@ -3,29 +3,28 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
-* This file contains a helper macro includes all supported non-tree-structural
-* pseudo-classes.
-*
-
-* FIXME: Find a way to autogenerate this file.
-*
-* Expected usage is as follows:
-* ```
-* macro_rules! pseudo_class_macro{
-* ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
-* // do stuff
-* }
-* }
-* apply_non_ts_list!(pseudo_class_macro)
-* ```
-*
-* $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
-* $state can be either "_" or an expression of type ElementState. If present,
-* the semantics are that the pseudo-class matches if any of the bits in
-* $state are set on the element.
-* $flags can be either "_" or an expression of type NonTSPseudoClassFlag,
-* see selector_parser.rs for more details.
-*/
+ * This file contains a helper macro includes all supported non-tree-structural
+ * pseudo-classes.
+ *
+ * FIXME: Find a way to autogenerate this file.
+ *
+ * Expected usage is as follows:
+ * ```
+ * macro_rules! pseudo_class_macro{
+ * ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
+ * // do stuff
+ * }
+ * }
+ * apply_non_ts_list!(pseudo_class_macro)
+ * ```
+ *
+ * $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
+ * $state can be either "_" or an expression of type ElementState. If present,
+ * the semantics are that the pseudo-class matches if any of the bits in
+ * $state are set on the element.
+ * $flags can be either "_" or an expression of type NonTSPseudoClassFlag,
+ * see selector_parser.rs for more details.
+ */
macro_rules! apply_non_ts_list {
($apply_macro:ident) => {
diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs
index 9020888d9a8..7f323e9d019 100644
--- a/components/style/gecko/values.rs
+++ b/components/style/gecko/values.rs
@@ -17,13 +17,10 @@ use nsstring::{nsACString, nsCStr};
use std::cmp::max;
use values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
use values::computed::FlexBasis as ComputedFlexBasis;
-use values::computed::{
- Angle, ExtremumLength, Length, LengthOrPercentage, LengthOrPercentageOrAuto,
-};
+use values::computed::{Angle, ExtremumLength, Length, LengthOrPercentage};
+use values::computed::{LengthOrPercentageOrAuto, Percentage};
use values::computed::{LengthOrPercentageOrNone, Number, NumberOrPercentage};
-use values::computed::{
- MaxLength as ComputedMaxLength, MozLength as ComputedMozLength, Percentage,
-};
+use values::computed::{MaxLength as ComputedMaxLength, MozLength as ComputedMozLength};
use values::computed::{NonNegativeLength, NonNegativeLengthOrPercentage, NonNegativeNumber};
use values::generics::basic_shape::ShapeRadius;
use values::generics::box_::Perspective;
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index b67e69849d1..46206aee7b3 100644
--- a/components/style/gecko/wrapper.rs
+++ b/components/style/gecko/wrapper.rs
@@ -44,9 +44,6 @@ use gecko_bindings::bindings::Gecko_MatchLang;
use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
use gecko_bindings::bindings::Gecko_UpdateAnimations;
use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme};
-use gecko_bindings::bindings::{
- Gecko_GetLastChild, Gecko_GetNextStyleChild, Gecko_GetPreviousSibling,
-};
use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
use gecko_bindings::structs;
use gecko_bindings::structs::nsChangeHint;
@@ -384,12 +381,12 @@ impl<'ln> TNode for GeckoNode<'ln> {
#[inline]
fn last_child(&self) -> Option<Self> {
- unsafe { Gecko_GetLastChild(self.0).map(GeckoNode) }
+ unsafe { bindings::Gecko_GetLastChild(self.0).map(GeckoNode) }
}
#[inline]
fn prev_sibling(&self) -> Option<Self> {
- unsafe { Gecko_GetPreviousSibling(self.0).map(GeckoNode) }
+ unsafe { bindings::Gecko_GetPreviousSibling(self.0).map(GeckoNode) }
}
#[inline]
@@ -506,7 +503,7 @@ impl<'a> Iterator for GeckoChildrenIterator<'a> {
// however we can't express this easily with bindgen, and it would
// introduce functions with two input lifetimes into bindgen,
// which would be out of scope for elision.
- Gecko_GetNextStyleChild(&mut *(it as *mut _)).map(GeckoNode)
+ bindings::Gecko_GetNextStyleChild(&mut *(it as *mut _)).map(GeckoNode)
},
}
}
diff --git a/components/style/values/animated/length.rs b/components/style/values/animated/length.rs
index 5b47103f0ea..823b9ed84e9 100644
--- a/components/style/values/animated/length.rs
+++ b/components/style/values/animated/length.rs
@@ -5,9 +5,8 @@
//! Animation implementation for various length-related types.
use super::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
-use values::computed::length::{
- CalcLengthOrPercentage, Length, LengthOrPercentageOrAuto, LengthOrPercentageOrNone,
-};
+use values::computed::length::{CalcLengthOrPercentage, Length};
+use values::computed::length::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use values::computed::MaxLength as ComputedMaxLength;
use values::computed::MozLength as ComputedMozLength;
use values::computed::Percentage;
diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs
index 9039f2033f6..0cf1dac5686 100644
--- a/components/style/values/computed/mod.rs
+++ b/components/style/values/computed/mod.rs
@@ -37,13 +37,11 @@ pub use self::angle::Angle;
pub use self::background::{BackgroundRepeat, BackgroundSize};
pub use self::basic_shape::FillRule;
pub use self::border::{BorderCornerRadius, BorderRadius, BorderSpacing};
-pub use self::border::{
- BorderImageRepeat, BorderImageSideWidth, BorderImageSlice, BorderImageWidth,
-};
-pub use self::box_::{
- AnimationIterationCount, AnimationName, Contain, Display, TransitionProperty,
-};
+pub use self::border::{BorderImageRepeat, BorderImageSideWidth};
+pub use self::border::{BorderImageSlice, BorderImageWidth};
+pub use self::box_::{AnimationIterationCount, AnimationName, Contain};
pub use self::box_::{Appearance, Clear, Float};
+pub use self::box_::{Display, TransitionProperty};
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize};
pub use self::box_::{ScrollSnapType, TouchAction, VerticalAlign, WillChange};
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
@@ -52,13 +50,11 @@ pub use self::counters::{Content, ContentItem, CounterIncrement, CounterReset};
pub use self::easing::TimingFunction;
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
pub use self::flex::FlexBasis;
-pub use self::font::{
- FontFamily, FontLanguageOverride, FontStyle, FontVariantEastAsian, FontVariationSettings,
-};
+pub use self::font::{FontFamily, FontLanguageOverride, FontStyle};
pub use self::font::{FontFeatureSettings, FontVariantLigatures, FontVariantNumeric};
-pub use self::font::{
- FontSize, FontSizeAdjust, FontStretch, FontSynthesis, FontVariantAlternates, FontWeight,
-};
+pub use self::font::{FontSize, FontSizeAdjust, FontStretch, FontSynthesis};
+pub use self::font::{FontVariantAlternates, FontWeight};
+pub use self::font::{FontVariantEastAsian, FontVariationSettings};
pub use self::font::{MozScriptLevel, MozScriptMinSize, MozScriptSizeMultiplier, XLang, XTextZoom};
#[cfg(feature = "gecko")]
pub use self::gecko::ScrollSnapPoint;
@@ -81,9 +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::{
- TextAlign, TextEmphasisPosition, TextEmphasisStyle, TextOverflow, WordSpacing,
-};
+pub use self::text::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
+pub use self::text::{TextOverflow, WordSpacing};
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/svg.rs b/components/style/values/computed/svg.rs
index dd9cfb03b4b..9428ce60bae 100644
--- a/components/style/values/computed/svg.rs
+++ b/components/style/values/computed/svg.rs
@@ -6,9 +6,8 @@
use values::computed::color::Color;
use values::computed::url::ComputedUrl;
-use values::computed::{
- LengthOrPercentage, NonNegativeLengthOrPercentage, NonNegativeNumber, Number, Opacity,
-};
+use values::computed::{LengthOrPercentage, NonNegativeLengthOrPercentage};
+use values::computed::{NonNegativeNumber, Number, Opacity};
use values::generics::svg as generic;
use values::RGBA;
diff --git a/components/style/values/mod.rs b/components/style/values/mod.rs
index 079b579a988..6d2dd1c2b3a 100644
--- a/components/style/values/mod.rs
+++ b/components/style/values/mod.rs
@@ -8,9 +8,8 @@
#![deny(missing_docs)]
-pub use cssparser::{
- serialize_identifier, serialize_name, CowRcStr, Parser, SourceLocation, Token, RGBA,
-};
+pub use cssparser::{serialize_identifier, serialize_name, CowRcStr, Parser};
+pub use cssparser::{SourceLocation, Token, RGBA};
use parser::{Parse, ParserContext};
use selectors::parser::SelectorParseErrorKind;
use std::fmt::{self, Debug, Write};
diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs
index 589d0b13d0c..060cb093d8e 100644
--- a/components/style/values/specified/box.rs
+++ b/components/style/values/specified/box.rs
@@ -10,9 +10,8 @@ use parser::{Parse, ParserContext};
use properties::{LonghandId, PropertyDeclarationId, PropertyFlags, PropertyId, ShorthandId};
use selectors::parser::SelectorParseErrorKind;
use std::fmt::{self, Write};
-use style_traits::{
- CssWriter, KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind, ToCss,
-};
+use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
+use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
use values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount;
use values::generics::box_::Perspective as GenericPerspective;
use values::generics::box_::VerticalAlign as GenericVerticalAlign;
diff --git a/components/style/values/specified/font.rs b/components/style/values/specified/font.rs
index a2323c75c4b..45c9aa0e4e6 100644
--- a/components/style/values/specified/font.rs
+++ b/components/style/values/specified/font.rs
@@ -24,9 +24,8 @@ use values::generics::font::{self as generics, FeatureTagValue, FontSettings, Fo
use values::generics::font::{KeywordSize, VariationValue};
use values::generics::NonNegative;
use values::specified::length::{FontBaseSize, AU_PER_PT, AU_PER_PX};
-use values::specified::{
- AllowQuirks, Angle, Integer, LengthOrPercentage, NoCalcLength, Number, Percentage,
-};
+use values::specified::{AllowQuirks, Angle, Integer, LengthOrPercentage};
+use values::specified::{NoCalcLength, Number, Percentage};
use values::CustomIdent;
use Atom;
diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs
index d96094488f6..21fd4b86e94 100644
--- a/components/style/values/specified/mod.rs
+++ b/components/style/values/specified/mod.rs
@@ -43,13 +43,11 @@ pub use self::counters::{Content, ContentItem, CounterIncrement, CounterReset};
pub use self::easing::TimingFunction;
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
pub use self::flex::FlexBasis;
-pub use self::font::{
- FontFamily, FontLanguageOverride, FontStyle, FontVariantEastAsian, FontVariationSettings,
-};
+pub use self::font::{FontFamily, FontLanguageOverride, FontStyle};
pub use self::font::{FontFeatureSettings, FontVariantLigatures, FontVariantNumeric};
-pub use self::font::{
- FontSize, FontSizeAdjust, FontStretch, FontSynthesis, FontVariantAlternates, FontWeight,
-};
+pub use self::font::{FontSize, FontSizeAdjust, FontStretch, FontSynthesis};
+pub use self::font::{FontVariantAlternates, FontWeight};
+pub use self::font::{FontVariantEastAsian, FontVariationSettings};
pub use self::font::{MozScriptLevel, MozScriptMinSize, MozScriptSizeMultiplier, XLang, XTextZoom};
#[cfg(feature = "gecko")]
pub use self::gecko::ScrollSnapPoint;