Bug 1506391 - Manually extinguish multi-line use statements.

This commit is contained in:
Emilio Cobos Álvarez 2018-11-10 21:26:46 +01:00
Родитель e9e41c8b89
Коммит e8ce491b80
19 изменённых файлов: 46 добавлений и 67 удалений

Просмотреть файл

@ -14,12 +14,12 @@ use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
use crate::str::CssStringWriter;
use crate::values::computed::font::FamilyName;
use crate::values::generics::font::FontStyle as GenericFontStyle;
use crate::values::specified::font::SpecifiedFontStyle;
use crate::values::specified::font::{AbsoluteFontWeight, FontStretch};
#[cfg(feature = "gecko")]
use crate::values::specified::font::{
SpecifiedFontFeatureSettings, SpecifiedFontVariationSettings,
};
use crate::values::specified::font::SpecifiedFontFeatureSettings;
use crate::values::specified::font::SpecifiedFontStyle;
#[cfg(feature = "gecko")]
use crate::values::specified::font::SpecifiedFontVariationSettings;
use crate::values::specified::font::{AbsoluteFontWeight, FontStretch};
use crate::values::specified::url::SpecifiedUrl;
use crate::values::specified::Angle;
#[cfg(feature = "gecko")]

Просмотреть файл

@ -38,9 +38,8 @@ use crate::rule_tree::StrongRuleNode;
use crate::shared_lock::Locked;
use crate::stylesheets::keyframes_rule::Keyframe;
use crate::stylesheets::{CounterStyleRule, CssRules, FontFaceRule, FontFeatureValuesRule};
use crate::stylesheets::{
DocumentRule, ImportRule, KeyframesRule, MediaRule, NamespaceRule, PageRule,
};
use crate::stylesheets::{DocumentRule, ImportRule, KeyframesRule, MediaRule};
use crate::stylesheets::{NamespaceRule, PageRule};
use crate::stylesheets::{StyleRule, StylesheetContents, SupportsRule};
use servo_arc::{Arc, ArcBorrow};
use std::{mem, ptr};

Просмотреть файл

@ -18,9 +18,8 @@ use crate::stylesheets::{Origin, RulesMutateError};
use crate::values::computed::image::LineDirection;
use crate::values::computed::url::ComputedImageUrl;
use crate::values::computed::{Angle, CalcLengthOrPercentage, Gradient, Image};
use crate::values::computed::{
Integer, LengthOrPercentage, LengthOrPercentageOrAuto, NonNegativeLengthOrPercentageOrAuto,
};
use crate::values::computed::{Integer, LengthOrPercentage};
use crate::values::computed::{LengthOrPercentageOrAuto, NonNegativeLengthOrPercentageOrAuto};
use crate::values::computed::{Percentage, TextAlign};
use crate::values::generics::box_::VerticalAlign;
use crate::values::generics::grid::{TrackListValue, TrackSize};

Просмотреть файл

@ -5,10 +5,7 @@
//! Global style data
use crate::context::StyleSystemOptions;
use crate::gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
use crate::gecko_bindings::bindings::{
Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread,
};
use crate::gecko_bindings::bindings;
use crate::parallel::STYLE_THREAD_STACK_SIZE_KB;
use crate::shared_lock::SharedRwLock;
use crate::thread_state;
@ -43,20 +40,20 @@ fn thread_name(index: usize) -> String {
fn thread_startup(index: usize) {
thread_state::initialize_layout_worker_thread();
unsafe {
Gecko_SetJemallocThreadLocalArena(true);
bindings::Gecko_SetJemallocThreadLocalArena(true);
}
let name = thread_name(index);
let name = CString::new(name).unwrap();
unsafe {
// Gecko_RegisterProfilerThread copies the passed name here.
Gecko_RegisterProfilerThread(name.as_ptr());
bindings::Gecko_RegisterProfilerThread(name.as_ptr());
}
}
fn thread_shutdown(_: usize) {
unsafe {
Gecko_UnregisterProfilerThread();
Gecko_SetJemallocThreadLocalArena(false);
bindings::Gecko_UnregisterProfilerThread();
bindings::Gecko_SetJemallocThreadLocalArena(false);
}
}

Просмотреть файл

@ -14,13 +14,12 @@ use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, Coor
use crate::media_queries::Device;
use crate::values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
use crate::values::computed::FlexBasis as ComputedFlexBasis;
use crate::values::computed::NonNegativeNumber;
use crate::values::computed::{Angle, ExtremumLength, Length, LengthOrPercentage};
use crate::values::computed::{LengthOrPercentageOrAuto, Percentage};
use crate::values::computed::{LengthOrPercentageOrNone, Number, NumberOrPercentage};
use crate::values::computed::{MaxLength as ComputedMaxLength, MozLength as ComputedMozLength};
use crate::values::computed::{
NonNegativeLength, NonNegativeLengthOrPercentage, NonNegativeNumber,
};
use crate::values::computed::{NonNegativeLength, NonNegativeLengthOrPercentage};
use crate::values::generics::basic_shape::ShapeRadius;
use crate::values::generics::box_::Perspective;
use crate::values::generics::flex::FlexBasis;

Просмотреть файл

@ -6,9 +6,8 @@
use crate::gecko_bindings::bindings;
use crate::gecko_bindings::structs::{nsStyleCoord, nsStyleCoord_Calc, nsStyleCoord_CalcValue};
use crate::gecko_bindings::structs::{
nsStyleCorners, nsStyleSides, nsStyleUnion, nsStyleUnit, nscoord,
};
use crate::gecko_bindings::structs::{nsStyleCorners, nsStyleSides};
use crate::gecko_bindings::structs::{nsStyleUnion, nsStyleUnit, nscoord};
use std::mem;
impl nsStyleCoord {

Просмотреть файл

@ -13,9 +13,8 @@ use crate::invalidation::element::document_state::InvalidationMatchingData;
use crate::invalidation::element::element_wrapper::ElementSnapshot;
use crate::properties::longhands::display::computed_value::T as Display;
use crate::properties::{ComputedValues, PropertyFlags};
use crate::selector_parser::{
AttrValue as SelectorAttrValue, PseudoElementCascadeType, SelectorParser,
};
use crate::selector_parser::AttrValue as SelectorAttrValue;
use crate::selector_parser::{PseudoElementCascadeType, SelectorParser};
use crate::{Atom, CaseSensitivityExt, LocalName, Namespace, Prefix};
use cssparser::{serialize_identifier, CowRcStr, Parser as CssParser, SourceLocation, ToCss};
use fxhash::FxHashMap;

Просмотреть файл

@ -15,9 +15,8 @@ use crate::rule_tree::StrongRuleNode;
use crate::selector_parser::{PseudoElement, SelectorImpl};
use crate::stylist::RuleInclusion;
use log::Level::Trace;
use selectors::matching::{
ElementSelectorFlags, MatchingContext, MatchingMode, VisitedHandlingMode,
};
use selectors::matching::{ElementSelectorFlags, MatchingContext};
use selectors::matching::{MatchingMode, VisitedHandlingMode};
use servo_arc::Arc;
/// Whether pseudo-elements should be resolved or not.

Просмотреть файл

@ -7,9 +7,8 @@ use crate::error_reporting::{ContextualParseError, ParseErrorReporter};
use crate::invalidation::media_queries::{MediaListKey, ToMediaListKey};
use crate::media_queries::{Device, MediaList};
use crate::parser::ParserContext;
use crate::shared_lock::{
DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard,
};
use crate::shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked};
use crate::shared_lock::{SharedRwLock, SharedRwLockReadGuard};
use crate::stylesheets::loader::StylesheetLoader;
use crate::stylesheets::rule_parser::{State, TopLevelRuleParser};
use crate::stylesheets::rules_iterator::{EffectiveRules, EffectiveRulesIterator};

Просмотреть файл

@ -13,9 +13,8 @@ use crate::gecko_bindings::{bindings, structs};
use crate::values::animated::{ToAnimatedValue, ToAnimatedZero};
use crate::values::computed::{Angle, Context, Integer, NonNegativeLength, NonNegativePercentage};
use crate::values::computed::{Number, Percentage, ToComputedValue};
use crate::values::generics::font::{
self as generics, FeatureTagValue, FontSettings, VariationValue,
};
use crate::values::generics::font as generics;
use crate::values::generics::font::{FeatureTagValue, FontSettings, VariationValue};
use crate::values::specified::font::{self as specified, MAX_FONT_WEIGHT, MIN_FONT_WEIGHT};
use crate::values::specified::length::{FontBaseSize, NoCalcLength};
use crate::values::CSSFloat;
@ -30,9 +29,8 @@ use std::slice;
use style_traits::{CssWriter, ParseError, ToCss};
pub use crate::values::computed::Length as MozScriptMinSize;
pub use crate::values::specified::font::{
FontSynthesis, MozScriptSizeMultiplier, XLang, XTextZoom,
};
pub use crate::values::specified::font::{FontSynthesis, MozScriptSizeMultiplier};
pub use crate::values::specified::font::{XLang, XTextZoom};
/// A value for the font-weight property per:
///

Просмотреть файл

@ -8,9 +8,8 @@ use super::{Context, Number, Percentage, ToComputedValue};
use app_units::Au;
use crate::values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
use crate::values::distance::{ComputeSquaredDistance, SquaredDistance};
use crate::values::generics::length::{
MaxLength as GenericMaxLength, MozLength as GenericMozLength,
};
use crate::values::generics::length::MaxLength as GenericMaxLength;
use crate::values::generics::length::MozLength as GenericMozLength;
use crate::values::generics::transform::IsZeroLength;
use crate::values::generics::NonNegative;
use crate::values::specified::length::ViewportPercentageLength;

Просмотреть файл

@ -12,9 +12,8 @@ use crate::values::generics::text::InitialLetter as GenericInitialLetter;
use crate::values::generics::text::LineHeight as GenericLineHeight;
use crate::values::generics::text::MozTabSize as GenericMozTabSize;
use crate::values::generics::text::Spacing;
use crate::values::specified::text::{
TextEmphasisFillMode, TextEmphasisShapeKeyword, TextOverflowSide,
};
use crate::values::specified::text::TextOverflowSide;
use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
use crate::values::{CSSFloat, CSSInteger};
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss};

Просмотреть файл

@ -6,9 +6,8 @@
use crate::custom_properties::Name as CustomPropertyName;
use crate::parser::{Parse, ParserContext};
use crate::properties::{
LonghandId, PropertyDeclarationId, PropertyFlags, PropertyId, ShorthandId,
};
use crate::properties::{LonghandId, PropertyDeclarationId, PropertyFlags};
use crate::properties::{PropertyId, ShorthandId};
use crate::values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount;
use crate::values::generics::box_::Perspective as GenericPerspective;
use crate::values::generics::box_::VerticalAlign as GenericVerticalAlign;

Просмотреть файл

@ -7,9 +7,8 @@
use crate::parser::{Parse, ParserContext};
use crate::values::computed::effects::BoxShadow as ComputedBoxShadow;
use crate::values::computed::effects::SimpleShadow as ComputedSimpleShadow;
use crate::values::computed::{
Context, NonNegativeNumber as ComputedNonNegativeNumber, ToComputedValue,
};
use crate::values::computed::NonNegativeNumber as ComputedNonNegativeNumber;
use crate::values::computed::{Context, ToComputedValue};
use crate::values::generics::effects::BoxShadow as GenericBoxShadow;
use crate::values::generics::effects::Filter as GenericFilter;
use crate::values::generics::effects::SimpleShadow as GenericSimpleShadow;

Просмотреть файл

@ -11,10 +11,9 @@ use crate::gecko_bindings::bindings;
use crate::parser::{Parse, ParserContext};
use crate::properties::longhands::system_font::SystemFont;
use crate::values::computed::font::{FamilyName, FontFamilyList, FontStyleAngle, SingleFontFamily};
use crate::values::computed::{
font as computed, Context, Length, NonNegativeLength, ToComputedValue,
};
use crate::values::computed::{font as computed, Length, NonNegativeLength};
use crate::values::computed::{Angle as ComputedAngle, Percentage as ComputedPercentage};
use crate::values::computed::{Context, ToComputedValue};
use crate::values::generics::font::{self as generics, FeatureTagValue, FontSettings, FontTag};
use crate::values::generics::font::{KeywordSize, VariationValue};
use crate::values::generics::NonNegative;

Просмотреть файл

@ -11,9 +11,8 @@ use app_units::Au;
use crate::font_metrics::FontMetricsQueryResult;
use crate::parser::{Parse, ParserContext};
use crate::values::computed::{self, CSSPixelLength, Context, ExtremumLength};
use crate::values::generics::length::{
MaxLength as GenericMaxLength, MozLength as GenericMozLength,
};
use crate::values::generics::length::MaxLength as GenericMaxLength;
use crate::values::generics::length::MozLength as GenericMozLength;
use crate::values::generics::transform::IsZeroLength;
use crate::values::generics::NonNegative;
use crate::values::specified::calc::CalcNode;

Просмотреть файл

@ -10,9 +10,8 @@
use crate::hash::FxHashMap;
use crate::parser::{Parse, ParserContext};
use crate::str::HTML_SPACE_CHARACTERS;
use crate::values::computed::{
CalcLengthOrPercentage, LengthOrPercentage as ComputedLengthOrPercentage,
};
use crate::values::computed::CalcLengthOrPercentage;
use crate::values::computed::LengthOrPercentage as ComputedLengthOrPercentage;
use crate::values::computed::{Context, Percentage, ToComputedValue};
use crate::values::generics::position::Position as GenericPosition;
use crate::values::generics::position::ZIndex as GenericZIndex;

Просмотреть файл

@ -8,9 +8,8 @@ use crate::parser::{Parse, ParserContext};
use crate::values::generics::svg as generic;
use crate::values::specified::color::Color;
use crate::values::specified::url::SpecifiedUrl;
use crate::values::specified::{
LengthOrPercentage, NonNegativeLengthOrPercentage, NonNegativeNumber,
};
use crate::values::specified::LengthOrPercentage;
use crate::values::specified::{NonNegativeLengthOrPercentage, NonNegativeNumber};
use crate::values::specified::{Number, Opacity};
use crate::values::CustomIdent;
use cssparser::Parser;

Просмотреть файл

@ -15,9 +15,8 @@ use crate::values::generics::text::InitialLetter as GenericInitialLetter;
use crate::values::generics::text::LineHeight as GenericLineHeight;
use crate::values::generics::text::MozTabSize as GenericMozTabSize;
use crate::values::generics::text::Spacing;
use crate::values::specified::length::{
FontRelativeLength, Length, LengthOrPercentage, NoCalcLength,
};
use crate::values::specified::length::{FontRelativeLength, Length};
use crate::values::specified::length::{LengthOrPercentage, NoCalcLength};
use crate::values::specified::length::{NonNegativeLength, NonNegativeLengthOrPercentage};
use crate::values::specified::{AllowQuirks, Integer, NonNegativeNumber, Number};
use cssparser::{Parser, Token};