mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Reorder imports
This commit is contained in:
parent
4a947dd719
commit
9e92eb205a
546 changed files with 1968 additions and 1536 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use metrics::{InteractiveMetrics, InteractiveFlag};
|
||||
use metrics::{InteractiveFlag, InteractiveMetrics};
|
||||
use metrics::{ProfilerMetadataFactory, ProgressiveWebMetric};
|
||||
use profile_traits::time::{ProfilerChan, TimerMetadata};
|
||||
use servo_url::ServoUrl;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use script::test::{ByteString, normalize_value};
|
||||
use script::test::{normalize_value, ByteString};
|
||||
|
||||
#[test]
|
||||
fn test_normalize_empty_bytestring() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use script::test::srcset::{Descriptor, ImageSource, parse_a_srcset_attribute};
|
||||
use script::test::srcset::{parse_a_srcset_attribute, Descriptor, ImageSource};
|
||||
|
||||
#[test]
|
||||
fn no_value() {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
use keyboard_types::{Key, Modifiers};
|
||||
use script::clipboard_provider::DummyClipboardContext;
|
||||
use script::test::DOMString;
|
||||
use script::textinput::{TextInput, TextPoint, Selection, Lines, Direction, SelectionDirection};
|
||||
use script::textinput::{Direction, Lines, Selection, SelectionDirection, TextInput, TextPoint};
|
||||
|
||||
fn text_input(lines: Lines, s: &str) -> TextInput<DummyClipboardContext> {
|
||||
TextInput::new(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto, parse_length};
|
||||
use style::attr::{parse_length, AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::values::computed::{CalcLengthOrPercentage, Percentage};
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use servo_arc::Arc;
|
||||
use style::custom_properties::{Name, SpecifiedValue, CustomPropertiesMap, CustomPropertiesBuilder, CssEnvironment};
|
||||
use style::custom_properties::{
|
||||
CssEnvironment, CustomPropertiesBuilder, CustomPropertiesMap, Name, SpecifiedValue,
|
||||
};
|
||||
use style::properties::CustomDeclarationValue;
|
||||
use test::{self, Bencher};
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{Size2D, Point2D, SideOffsets2D, Rect};
|
||||
use style::logical_geometry::{WritingMode, LogicalSize, LogicalPoint, LogicalMargin, LogicalRect};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use style::logical_geometry::{LogicalMargin, LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||
|
||||
#[cfg(test)]
|
||||
fn modes() -> [WritingMode; 13] {
|
||||
|
|
|
@ -6,8 +6,8 @@ use parsing::parse;
|
|||
use servo_atoms::Atom;
|
||||
use style::parser::Parse;
|
||||
use style::properties::longhands::animation_name;
|
||||
use style::values::{KeyframesName, CustomIdent};
|
||||
use style::values::specified::AnimationIterationCount;
|
||||
use style::values::{CustomIdent, KeyframesName};
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -3,9 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use parsing::parse;
|
||||
use style::properties::longhands::{background_attachment, background_clip, background_color, background_image};
|
||||
use style::properties::longhands::{background_origin, background_position_x, background_position_y, background_repeat};
|
||||
use style::properties::longhands::background_size;
|
||||
use style::properties::longhands::{
|
||||
background_attachment, background_clip, background_color, background_image,
|
||||
};
|
||||
use style::properties::longhands::{
|
||||
background_origin, background_position_x, background_position_y, background_repeat,
|
||||
};
|
||||
use style::properties::shorthands::background;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
use parsing::parse;
|
||||
use style::parser::Parse;
|
||||
use style::properties::MaybeBoxed;
|
||||
use style::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
|
||||
use style::properties::longhands::{border_image_source, border_image_width};
|
||||
use style::properties::shorthands::border_image;
|
||||
use style::properties::MaybeBoxed;
|
||||
use style::values::specified::BorderRadius;
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use style::values::generics::text::Spacing;
|
|||
#[test]
|
||||
fn negative_letter_spacing_should_parse_properly() {
|
||||
use style::properties::longhands::letter_spacing;
|
||||
use style::values::specified::length::{Length, NoCalcLength, FontRelativeLength};
|
||||
use style::values::specified::length::{FontRelativeLength, Length, NoCalcLength};
|
||||
|
||||
let negative_value = parse_longhand!(letter_spacing, "-0.5em");
|
||||
let expected = Spacing::Value(Length::NoCalc(NoCalcLength::FontRelative(
|
||||
|
@ -20,7 +20,7 @@ fn negative_letter_spacing_should_parse_properly() {
|
|||
#[test]
|
||||
fn negative_word_spacing_should_parse_properly() {
|
||||
use style::properties::longhands::word_spacing;
|
||||
use style::values::specified::length::{NoCalcLength, LengthOrPercentage, FontRelativeLength};
|
||||
use style::values::specified::length::{FontRelativeLength, LengthOrPercentage, NoCalcLength};
|
||||
|
||||
let negative_value = parse_longhand!(word_spacing, "-0.5em");
|
||||
let expected = Spacing::Value(LengthOrPercentage::Length(NoCalcLength::FontRelative(
|
||||
|
|
|
@ -8,7 +8,7 @@ use cssparser::{Parser, ParserInput};
|
|||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style_traits::{ParsingMode, ParseError};
|
||||
use style_traits::{ParseError, ParsingMode};
|
||||
|
||||
fn parse<T, F>(f: F, s: &'static str) -> Result<T, ParseError<'static>>
|
||||
where
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use cssparser::{Parser, ParserInput, ToCss};
|
||||
use selectors::parser::SelectorList;
|
||||
use style::selector_parser::{SelectorImpl, SelectorParser};
|
||||
use style::stylesheets::{Origin, Namespaces};
|
||||
use style::stylesheets::{Namespaces, Origin};
|
||||
use style_traits::ParseError;
|
||||
|
||||
fn parse_selector<'i, 't>(
|
||||
|
|
|
@ -6,7 +6,7 @@ use cssparser::{Parser, ParserInput};
|
|||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style_traits::{ParsingMode, ParseError};
|
||||
use style_traits::{ParseError, ParsingMode};
|
||||
|
||||
fn parse<T, F>(f: F, s: &'static str) -> Result<T, ParseError<'static>>
|
||||
where
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use serde_json::{self, Value};
|
||||
use std::env;
|
||||
use std::fs::{File, remove_file};
|
||||
use std::fs::{remove_file, File};
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
use properties::{parse, parse_input};
|
||||
use style::computed_values::display::T as Display;
|
||||
use style::properties::{PropertyDeclaration, Importance};
|
||||
use style::properties::declaration_block::PropertyDeclarationBlock;
|
||||
use style::properties::parse_property_declaration_list;
|
||||
use style::values::RGBA;
|
||||
use style::values::specified::{BorderStyle, BorderSideWidth, Color};
|
||||
use style::values::specified::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::values::specified::NoCalcLength;
|
||||
use style::properties::{Importance, PropertyDeclaration};
|
||||
use style::values::specified::url::SpecifiedUrl;
|
||||
use style::values::specified::NoCalcLength;
|
||||
use style::values::specified::{BorderSideWidth, BorderStyle, Color};
|
||||
use style::values::specified::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use style::values::RGBA;
|
||||
use style_traits::ToCss;
|
||||
use stylesheets::block_from;
|
||||
|
||||
|
@ -486,10 +486,10 @@ mod shorthand_serialization {
|
|||
}
|
||||
|
||||
mod list_style {
|
||||
use super::*;
|
||||
use style::properties::longhands::list_style_position::SpecifiedValue as ListStylePosition;
|
||||
use style::properties::longhands::list_style_type::SpecifiedValue as ListStyleType;
|
||||
use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn list_style_should_show_all_properties_when_values_are_set() {
|
||||
|
|
|
@ -7,12 +7,12 @@ use rayon;
|
|||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use style::context::QuirksMode;
|
||||
use style::error_reporting::{ParseErrorReporter, ContextualParseError};
|
||||
use style::error_reporting::{ContextualParseError, ParseErrorReporter};
|
||||
use style::media_queries::MediaList;
|
||||
use style::properties::{longhands, Importance, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::{Origin, Stylesheet, CssRule};
|
||||
use style::stylesheets::{CssRule, Origin, Stylesheet};
|
||||
use style::thread_state::{self, ThreadState};
|
||||
use test::{self, Bencher};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use style::str::{split_html_space_chars, str_join, starts_with_ignore_ascii_case};
|
||||
use style::str::{split_html_space_chars, starts_with_ignore_ascii_case, str_join};
|
||||
|
||||
#[test]
|
||||
pub fn split_html_space_chars_whitespace() {
|
||||
|
|
|
@ -3,32 +3,34 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{self, SourceLocation};
|
||||
use html5ever::{Namespace as NsAtom};
|
||||
use html5ever::Namespace as NsAtom;
|
||||
use parking_lot::RwLock;
|
||||
use selectors::attr::*;
|
||||
use selectors::parser::*;
|
||||
use servo_arc::Arc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_config::prefs::{PREFS, PrefValue};
|
||||
use servo_config::prefs::{PrefValue, PREFS};
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use style::context::QuirksMode;
|
||||
use style::error_reporting::{ParseErrorReporter, ContextualParseError};
|
||||
use style::error_reporting::{ContextualParseError, ParseErrorReporter};
|
||||
use style::media_queries::MediaList;
|
||||
use style::properties::longhands::{self, animation_timing_function};
|
||||
use style::properties::{CSSWideKeyword, CustomDeclaration};
|
||||
use style::properties::{CustomDeclarationValue, Importance};
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::properties::longhands::{self, animation_timing_function};
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::{Origin, Namespaces};
|
||||
use style::stylesheets::{Stylesheet, StylesheetContents, NamespaceRule, CssRule, CssRules, StyleRule, KeyframesRule};
|
||||
use style::stylesheets::keyframes_rule::{Keyframe, KeyframeSelector, KeyframePercentage};
|
||||
use style::values::{KeyframesName, CustomIdent};
|
||||
use style::stylesheets::keyframes_rule::{Keyframe, KeyframePercentage, KeyframeSelector};
|
||||
use style::stylesheets::{
|
||||
CssRule, CssRules, KeyframesRule, NamespaceRule, StyleRule, Stylesheet, StylesheetContents,
|
||||
};
|
||||
use style::stylesheets::{Namespaces, Origin};
|
||||
use style::values::computed::Percentage;
|
||||
use style::values::specified::{LengthOrPercentageOrAuto, PositionComponent};
|
||||
use style::values::specified::TimingFunction;
|
||||
use style::values::specified::{LengthOrPercentageOrAuto, PositionComponent};
|
||||
use style::values::{CustomIdent, KeyframesName};
|
||||
|
||||
pub fn block_from<I>(iterable: I) -> PropertyDeclarationBlock
|
||||
where
|
||||
|
|
|
@ -10,14 +10,14 @@ use servo_arc::Arc;
|
|||
use servo_atoms::Atom;
|
||||
use style::context::QuirksMode;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration};
|
||||
use style::properties::{longhands, Importance};
|
||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::selector_map::SelectorMap;
|
||||
use style::selector_parser::{SelectorImpl, SelectorParser};
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::StyleRule;
|
||||
use style::stylist::{Stylist, Rule};
|
||||
use style::stylist::needs_revalidation_for_testing;
|
||||
use style::stylist::{Rule, Stylist};
|
||||
use style::thread_state::{self, ThreadState};
|
||||
|
||||
/// Helper method to get some Rules from selector strings.
|
||||
|
|
|
@ -6,19 +6,19 @@ use cssparser::{Parser, ParserInput};
|
|||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use servo_arc::Arc;
|
||||
use servo_config::prefs::{PREFS, PrefValue};
|
||||
use servo_config::prefs::{PrefValue, PREFS};
|
||||
use servo_url::ServoUrl;
|
||||
use style::context::QuirksMode;
|
||||
use style::media_queries::{Device, MediaList, MediaType};
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{SharedRwLock, StylesheetGuards};
|
||||
use style::stylesheets::{CssRuleType, Stylesheet, StylesheetInDocument, Origin};
|
||||
use style::stylesheets::viewport_rule::*;
|
||||
use style::stylesheets::{CssRuleType, Origin, Stylesheet, StylesheetInDocument};
|
||||
use style::values::specified::LengthOrPercentageOrAuto::{self, Auto};
|
||||
use style::values::specified::NoCalcLength::{self, ViewportPercentage};
|
||||
use style::values::specified::ViewportPercentageLength::Vw;
|
||||
use style_traits::{ParsingMode, PinchZoomFactor};
|
||||
use style_traits::viewport::*;
|
||||
use style_traits::{ParsingMode, PinchZoomFactor};
|
||||
|
||||
macro_rules! stylesheet {
|
||||
($css:expr, $origin:ident) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue