Skip to content

Commit

Permalink
style: Fix formatting of recent changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Aug 15, 2019
1 parent cea6966 commit 4d8fc4b
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 160 deletions.
5 changes: 3 additions & 2 deletions components/style/gecko/pseudo_element.rs
Expand Up @@ -187,8 +187,9 @@ impl PseudoElement {
PseudoElement::FirstLine => PropertyFlags::APPLIES_TO_FIRST_LINE,
PseudoElement::Placeholder => PropertyFlags::APPLIES_TO_PLACEHOLDER,
PseudoElement::Cue => PropertyFlags::APPLIES_TO_CUE,
PseudoElement::Marker if static_prefs::pref!("layout.css.marker.restricted") =>
PropertyFlags::APPLIES_TO_MARKER,
PseudoElement::Marker if static_prefs::pref!("layout.css.marker.restricted") => {
PropertyFlags::APPLIES_TO_MARKER
},
_ => return None,
})
}
Expand Down
10 changes: 6 additions & 4 deletions components/style/style_adjuster.rs
Expand Up @@ -8,12 +8,12 @@
use crate::dom::TElement;
use crate::properties::computed_value_flags::ComputedValueFlags;
use crate::properties::longhands::display::computed_value::T as Display;
#[cfg(feature = "gecko")]
use crate::values::specified::box_::DisplayInside;
use crate::properties::longhands::float::computed_value::T as Float;
use crate::properties::longhands::overflow_x::computed_value::T as Overflow;
use crate::properties::longhands::position::computed_value::T as Position;
use crate::properties::{self, ComputedValues, StyleBuilder};
#[cfg(feature = "gecko")]
use crate::values::specified::box_::DisplayInside;
use app_units::Au;

/// A struct that implements all the adjustment methods.
Expand Down Expand Up @@ -209,8 +209,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
#[cfg(feature = "gecko")]
blockify_if!(
self.style.pseudo.map_or(false, |p| p.is_marker()) &&
self.style.get_parent_list().clone_list_style_position() == ListStylePosition::Outside &&
layout_parent_style.get_box().clone_display().inside() != DisplayInside::Inline);
self.style.get_parent_list().clone_list_style_position() ==
ListStylePosition::Outside &&
layout_parent_style.get_box().clone_display().inside() != DisplayInside::Inline
);

if !blockify {
return;
Expand Down
2 changes: 1 addition & 1 deletion components/style/values/computed/mod.rs
Expand Up @@ -76,10 +76,10 @@ pub use self::svg::MozContextProperties;
pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
pub use self::table::XSpan;
pub use self::text::{TextDecorationLength, TextDecorationSkipInk};
pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight};
pub use self::text::{OverflowWrap, TextOverflow, WordBreak, WordSpacing};
pub use self::text::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
pub use self::text::{TextDecorationLength, TextDecorationSkipInk};
pub use self::time::Time;
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
Expand Down
2 changes: 1 addition & 1 deletion components/style/values/computed/text.rs
Expand Up @@ -10,7 +10,7 @@ use crate::values::computed::length::{Length, LengthPercentage};
use crate::values::computed::{Context, NonNegativeLength, NonNegativeNumber, ToComputedValue};
use crate::values::generics::text::InitialLetter as GenericInitialLetter;
use crate::values::generics::text::LineHeight as GenericLineHeight;
use crate::values::generics::text::{Spacing, GenericTextDecorationLength};
use crate::values::generics::text::{GenericTextDecorationLength, Spacing};
use crate::values::specified::text::{self as specified, TextOverflowSide};
use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
use crate::values::{CSSFloat, CSSInteger};
Expand Down
13 changes: 11 additions & 2 deletions components/style/values/generics/grid.rs
Expand Up @@ -419,7 +419,7 @@ impl Parse for RepeatCount<specified::Integer> {
if i.value() > MAX_GRID_LINE {
i = specified::Integer::new(MAX_GRID_LINE);
}
return Ok(RepeatCount::Number(i))
return Ok(RepeatCount::Number(i));
}
try_match_ident_ignore_ascii_case! { input,
"auto-fill" => Ok(RepeatCount::AutoFill),
Expand Down Expand Up @@ -527,7 +527,16 @@ impl<L, I> TrackListValue<L, I> {
/// A grid `<track-list>` type.
///
/// <https://drafts.csswg.org/css-grid/#typedef-track-list>
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
#[derive(
Clone,
Debug,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
ToComputedValue,
ToResolvedValue,
ToShmem,
)]
#[repr(C)]
pub struct GenericTrackList<LengthPercentage, Integer> {
/// The index in `values` where our `<auto-repeat>` value is, if in bounds.
Expand Down

0 comments on commit 4d8fc4b

Please sign in to comment.