mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Cargo fix + ./mach fmt.
This commit is contained in:
parent
48ce20b6fe
commit
155caba595
9 changed files with 21 additions and 19 deletions
|
@ -33,9 +33,7 @@ impl ::selectors::parser::PseudoElement for PseudoElement {
|
||||||
fn valid_after_slotted(&self) -> bool {
|
fn valid_after_slotted(&self) -> bool {
|
||||||
matches!(
|
matches!(
|
||||||
*self,
|
*self,
|
||||||
PseudoElement::Before |
|
PseudoElement::Before | PseudoElement::After | PseudoElement::Placeholder
|
||||||
PseudoElement::After |
|
|
||||||
PseudoElement::Placeholder
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,18 +4,18 @@
|
||||||
|
|
||||||
//! Collects a series of applicable rules for a given element.
|
//! Collects a series of applicable rules for a given element.
|
||||||
|
|
||||||
use applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
|
use crate::applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
|
||||||
use dom::{TElement, TShadowRoot};
|
use crate::dom::{TElement, TShadowRoot};
|
||||||
use properties::{AnimationRules, PropertyDeclarationBlock};
|
use crate::properties::{AnimationRules, PropertyDeclarationBlock};
|
||||||
use rule_tree::{CascadeLevel, ShadowCascadeOrder};
|
use crate::rule_tree::{CascadeLevel, ShadowCascadeOrder};
|
||||||
use selector_map::SelectorMap;
|
use crate::selector_map::SelectorMap;
|
||||||
use selector_parser::PseudoElement;
|
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 selectors::matching::{ElementSelectorFlags, MatchingContext};
|
||||||
use servo_arc::ArcBorrow;
|
use servo_arc::ArcBorrow;
|
||||||
use shared_lock::Locked;
|
|
||||||
use smallvec::SmallVec;
|
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
|
/// An object that we use with all the intermediate state needed for the
|
||||||
/// cascade.
|
/// cascade.
|
||||||
|
|
|
@ -1133,7 +1133,8 @@ impl Stylist {
|
||||||
applicable_declarations,
|
applicable_declarations,
|
||||||
context,
|
context,
|
||||||
flags_setter,
|
flags_setter,
|
||||||
).collect_all();
|
)
|
||||||
|
.collect_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given an id, returns whether there might be any rules for that id in any
|
/// Given an id, returns whether there might be any rules for that id in any
|
||||||
|
|
|
@ -77,8 +77,8 @@ pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
|
||||||
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
||||||
pub use self::table::XSpan;
|
pub use self::table::XSpan;
|
||||||
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize};
|
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::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
|
||||||
pub use self::text::{TextOverflow, WordSpacing, OverflowWrap};
|
|
||||||
pub use self::time::Time;
|
pub use self::time::Time;
|
||||||
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
||||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||||
|
|
|
@ -19,9 +19,9 @@ use crate::values::{CSSFloat, CSSInteger};
|
||||||
use std::fmt::{self, Write};
|
use std::fmt::{self, Write};
|
||||||
use style_traits::{CssWriter, ToCss};
|
use style_traits::{CssWriter, ToCss};
|
||||||
|
|
||||||
|
pub use crate::values::specified::OverflowWrap;
|
||||||
pub use crate::values::specified::TextAlignKeyword as TextAlign;
|
pub use crate::values::specified::TextAlignKeyword as TextAlign;
|
||||||
pub use crate::values::specified::TextEmphasisPosition;
|
pub use crate::values::specified::TextEmphasisPosition;
|
||||||
pub use crate::values::specified::OverflowWrap;
|
|
||||||
|
|
||||||
/// A computed value for the `initial-letter` property.
|
/// A computed value for the `initial-letter` property.
|
||||||
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
//! Generic types for CSS values related to backgrounds.
|
//! Generic types for CSS values related to backgrounds.
|
||||||
|
|
||||||
|
use crate::values::IsAuto;
|
||||||
use std::fmt::{self, Write};
|
use std::fmt::{self, Write};
|
||||||
use style_traits::{CssWriter, ToCss};
|
use style_traits::{CssWriter, ToCss};
|
||||||
use values::IsAuto;
|
|
||||||
|
|
||||||
/// A generic value for the `background-size` property.
|
/// A generic value for the `background-size` property.
|
||||||
#[derive(
|
#[derive(
|
||||||
|
|
|
@ -14,7 +14,7 @@ use crate::values::computed::{self, CSSPixelLength, Context, ExtremumLength};
|
||||||
use crate::values::generics::length::{
|
use crate::values::generics::length::{
|
||||||
MaxLength as GenericMaxLength, MozLength as GenericMozLength,
|
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::generics::NonNegative;
|
||||||
use crate::values::specified::calc::CalcNode;
|
use crate::values::specified::calc::CalcNode;
|
||||||
use crate::values::{Auto, CSSFloat, Either, IsAuto, Normal};
|
use crate::values::{Auto, CSSFloat, Either, IsAuto, Normal};
|
||||||
|
|
|
@ -75,8 +75,8 @@ pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
||||||
pub use self::svg_path::SVGPathData;
|
pub use self::svg_path::SVGPathData;
|
||||||
pub use self::table::XSpan;
|
pub use self::table::XSpan;
|
||||||
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign};
|
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::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||||
pub use self::text::{TextEmphasisPosition, TextEmphasisStyle, OverflowWrap};
|
|
||||||
pub use self::time::Time;
|
pub use self::time::Time;
|
||||||
pub use self::transform::{Rotate, Scale, Transform};
|
pub use self::transform::{Rotate, Scale, Transform};
|
||||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||||
|
|
|
@ -395,7 +395,10 @@ impl Parse for Translate {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'translate: <length-percentage> '
|
// 'translate: <length-percentage> '
|
||||||
Ok(generic::Translate::Translate(tx, specified::LengthOrPercentage::zero()))
|
Ok(generic::Translate::Translate(
|
||||||
|
tx,
|
||||||
|
specified::LengthOrPercentage::zero(),
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue