mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Reformat with rustfmt 1.4.36-nightly (7de6968 2021-02-07)
This commit is contained in:
parent
2dd3c05479
commit
479a42a980
6 changed files with 31 additions and 14 deletions
|
@ -467,7 +467,7 @@ impl<'a> Iterator for &'a TreeWalker {
|
||||||
// which cannot produce an Err result.
|
// which cannot produce an Err result.
|
||||||
{
|
{
|
||||||
unreachable!()
|
unreachable!()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,8 @@ impl NonTSPseudoClass {
|
||||||
/// revalidation.
|
/// revalidation.
|
||||||
pub fn needs_cache_revalidation(&self) -> bool {
|
pub fn needs_cache_revalidation(&self) -> bool {
|
||||||
self.state_flag().is_empty() &&
|
self.state_flag().is_empty() &&
|
||||||
!matches!(*self,
|
!matches!(
|
||||||
|
*self,
|
||||||
// :-moz-any is handled by the revalidation visitor walking
|
// :-moz-any is handled by the revalidation visitor walking
|
||||||
// the things inside it; it does not need to cause
|
// the things inside it; it does not need to cause
|
||||||
// revalidation on its own.
|
// revalidation on its own.
|
||||||
|
|
|
@ -29,7 +29,9 @@ use style_traits::{ParseError, StyleParseErrorKind};
|
||||||
/// A pseudo-element, both public and private.
|
/// A pseudo-element, both public and private.
|
||||||
///
|
///
|
||||||
/// NB: If you add to this list, be sure to update `each_simple_pseudo_element` too.
|
/// NB: If you add to this list, be sure to update `each_simple_pseudo_element` too.
|
||||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, ToShmem,
|
||||||
|
)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[repr(usize)]
|
#[repr(usize)]
|
||||||
pub enum PseudoElement {
|
pub enum PseudoElement {
|
||||||
|
|
|
@ -102,7 +102,9 @@ pub enum GenericGradient<
|
||||||
|
|
||||||
pub use self::GenericGradient as Gradient;
|
pub use self::GenericGradient as Gradient;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
|
||||||
|
)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
/// Whether we used the modern notation or the compatibility `-webkit`, `-moz` prefixes.
|
/// Whether we used the modern notation or the compatibility `-webkit`, `-moz` prefixes.
|
||||||
pub enum GradientCompatMode {
|
pub enum GradientCompatMode {
|
||||||
|
@ -129,7 +131,9 @@ pub enum GenericEndingShape<NonNegativeLength, NonNegativeLengthPercentage> {
|
||||||
pub use self::GenericEndingShape as EndingShape;
|
pub use self::GenericEndingShape as EndingShape;
|
||||||
|
|
||||||
/// A circle shape.
|
/// A circle shape.
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
|
||||||
|
)]
|
||||||
#[repr(C, u8)]
|
#[repr(C, u8)]
|
||||||
pub enum GenericCircle<NonNegativeLength> {
|
pub enum GenericCircle<NonNegativeLength> {
|
||||||
/// A circle radius.
|
/// A circle radius.
|
||||||
|
|
|
@ -79,7 +79,9 @@ pub const MAX_FONT_WEIGHT: f32 = 1000.;
|
||||||
/// A specified font-weight value.
|
/// A specified font-weight value.
|
||||||
///
|
///
|
||||||
/// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight
|
/// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
|
||||||
|
)]
|
||||||
pub enum FontWeight {
|
pub enum FontWeight {
|
||||||
/// `<font-weight-absolute>`
|
/// `<font-weight-absolute>`
|
||||||
Absolute(AbsoluteFontWeight),
|
Absolute(AbsoluteFontWeight),
|
||||||
|
@ -317,7 +319,9 @@ impl SpecifiedFontStyle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The specified value of the `font-style` property.
|
/// The specified value of the `font-style` property.
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
|
||||||
|
)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub enum FontStyle {
|
pub enum FontStyle {
|
||||||
Specified(SpecifiedFontStyle),
|
Specified(SpecifiedFontStyle),
|
||||||
|
@ -366,7 +370,9 @@ pub enum FontStretch {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A keyword value for `font-stretch`.
|
/// A keyword value for `font-stretch`.
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
|
||||||
|
)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub enum FontStretchKeyword {
|
pub enum FontStretchKeyword {
|
||||||
Normal,
|
Normal,
|
||||||
|
@ -727,7 +733,9 @@ impl Parse for FamilyName {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
|
||||||
|
)]
|
||||||
/// Preserve the readability of text when font fallback occurs
|
/// Preserve the readability of text when font fallback occurs
|
||||||
pub enum FontSizeAdjust {
|
pub enum FontSizeAdjust {
|
||||||
/// None variant
|
/// None variant
|
||||||
|
|
|
@ -102,7 +102,9 @@ impl Parse for OffsetPath {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The direction of offset-rotate.
|
/// The direction of offset-rotate.
|
||||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
#[derive(
|
||||||
|
Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
|
||||||
|
)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum OffsetRotateDirection {
|
pub enum OffsetRotateDirection {
|
||||||
/// Unspecified direction keyword.
|
/// Unspecified direction keyword.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue