sorted the extern crate, mod & use declarations

This commit is contained in:
Ravi Shankar 2015-09-24 02:12:45 +05:30
parent 705ad72aee
commit 889eec364b
194 changed files with 804 additions and 870 deletions

View file

@ -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 cssparser::{RGBA, Color};
use cssparser::{Color, RGBA};
use euclid::point::Point2D;
use properties::ComputedValues;
use properties::longhands::background_position::computed_value::T as BackgroundPosition;
@ -28,7 +28,7 @@ use util::bezier::Bezier;
use util::geometry::Au;
use values::CSSFloat;
use values::computed::{Angle, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use values::computed::{LengthOrPercentage, Length, Time, Calc};
use values::computed::{Calc, Length, LengthOrPercentage, Time};
#[derive(Clone, Debug)]
pub struct PropertyAnimation {

View file

@ -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 cssparser::{Parser, Token, SourcePosition, Delimiter, TokenSerializationType, ToCss};
use cssparser::{Delimiter, Parser, SourcePosition, ToCss, Token, TokenSerializationType};
use properties::DeclaredValue;
use std::ascii::AsciiExt;
use std::collections::{HashMap, HashSet};

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use computed_values::font_family::FontFamily;
use cssparser::{Token, Parser, DeclarationListParser, AtRuleParser, DeclarationParser};
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, Token};
use parser::{ParserContext, log_css_error};
use properties::longhands::font_family::parse_one_family;
use std::ascii::AsciiExt;

View file

@ -16,40 +16,43 @@
#![plugin(serde_macros)]
#![plugin(plugins)]
#[macro_use] extern crate log;
#[macro_use] extern crate bitflags;
extern crate fnv;
extern crate euclid;
extern crate serde;
extern crate smallvec;
extern crate url;
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate cssparser;
#[macro_use]
extern crate matches;
extern crate encoding;
extern crate rustc_serialize;
extern crate string_cache;
extern crate selectors;
#[macro_use]
extern crate lazy_static;
extern crate num;
extern crate util;
#[macro_use]
extern crate log;
#[macro_use]
extern crate matches;
#[macro_use]
extern crate style_traits;
extern crate encoding;
extern crate euclid;
extern crate fnv;
extern crate num;
extern crate rustc_serialize;
extern crate selectors;
extern crate serde;
extern crate smallvec;
extern crate string_cache;
extern crate url;
extern crate util;
pub mod animation;
mod custom_properties;
pub mod font_face;
pub mod legacy;
pub mod media_queries;
pub mod node;
pub mod parser;
pub mod selector_matching;
pub mod stylesheets;
#[macro_use] pub mod values;
#[macro_use]
#[allow(non_camel_case_types)]
pub mod values;
pub mod viewport;
// Generated from the properties.mako.rs template by build.rs
#[macro_use]
@ -57,13 +60,6 @@ pub mod properties {
include!(concat!(env!("OUT_DIR"), "/properties.rs"));
}
pub mod animation;
pub mod font_face;
pub mod legacy;
pub mod media_queries;
pub mod node;
pub mod viewport;
macro_rules! reexport_computed_values {
( $( $name: ident )+ ) => {
pub mod computed_values {

View file

@ -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 cssparser::{Token, Parser, Delimiter};
use cssparser::{Delimiter, Parser, Token};
use euclid::size::{Size2D, TypedSize2D};
use properties::longhands;
use std::ascii::AsciiExt;

View file

@ -9,12 +9,12 @@ use properties::{PropertyDeclaration, PropertyDeclarationBlock};
use selectors::Element;
use selectors::bloom::BloomFilter;
use selectors::matching::DeclarationBlock as GenericDeclarationBlock;
use selectors::matching::{SelectorMap, Rule};
use selectors::matching::{Rule, SelectorMap};
use selectors::parser::PseudoElement;
use smallvec::VecLike;
use std::process;
use style_traits::viewport::ViewportConstraints;
use stylesheets::{Stylesheet, CSSRuleIteratorExt, Origin};
use stylesheets::{CSSRuleIteratorExt, Origin, Stylesheet};
use url::Url;
use util::opts;
use util::resource_files::read_resource_file;

View file

@ -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 cssparser::{Parser, decode_stylesheet_bytes, QualifiedRuleParser, AtRuleParser};
use cssparser::{RuleListParser, AtRuleType};
use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, decode_stylesheet_bytes};
use cssparser::{AtRuleType, RuleListParser};
use encoding::EncodingRef;
use font_face::{FontFaceRule, parse_font_face_block};
use media_queries::{Device, MediaQueryList, parse_media_query_list};
@ -19,7 +19,6 @@ use string_cache::{Atom, Namespace};
use url::Url;
use viewport::ViewportRule;
/// Each style rule has an origin, which determines where it enters the cascade.
///
/// http://dev.w3.org/csswg/css-cascade/#cascading-origins

View file

@ -2,11 +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/. */
#![allow(non_camel_case_types)]
pub use cssparser::RGBA;
macro_rules! define_numbered_css_keyword_enum {
($name: ident: $( $css: expr => $variant: ident = $value: expr ),+,) => {
define_numbered_css_keyword_enum!($name: $( $css => $variant = $value ),+);
@ -43,14 +40,13 @@ pub type CSSFloat = f32;
pub mod specified {
use cssparser::{self, Token, Parser, ToCss, CssStringWriter};
use cssparser::{self, CssStringWriter, Parser, ToCss, Token};
use euclid::size::Size2D;
use parser::ParserContext;
use std::ascii::AsciiExt;
use std::cmp;
use std::f32::consts::PI;
use std::fmt;
use std::fmt::Write;
use std::fmt::{self, Write};
use std::ops::Mul;
use style_traits::values::specified::AllowedNumericType;
use super::CSSFloat;
@ -1213,15 +1209,15 @@ pub mod specified {
}
pub mod computed {
pub use super::specified::{Angle, BorderStyle, Time};
use euclid::size::Size2D;
pub use cssparser::Color as CSSColor;
use properties::longhands;
use std::fmt;
use super::specified::AngleOrCorner;
use super::{specified, CSSFloat};
use super::{CSSFloat, specified};
use url::Url;
use util::geometry::Au;
pub use cssparser::Color as CSSColor;
pub use super::specified::{Angle, BorderStyle, Time};
pub struct Context {
pub inherited_font_weight: longhands::font_weight::computed_value::T,

View file

@ -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 cssparser::{Parser, DeclarationListParser, AtRuleParser, DeclarationParser, parse_important};
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, parse_important};
use euclid::scale_factor::ScaleFactor;
use euclid::size::{Size2D, TypedSize2D};
use parser::{ParserContext, log_css_error};
@ -10,7 +10,7 @@ use properties::longhands;
use std::ascii::AsciiExt;
use std::collections::hash_map::{Entry, HashMap};
use std::intrinsics;
use style_traits::viewport::{UserZoom, Zoom, Orientation, ViewportConstraints};
use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom};
use stylesheets::Origin;
use util::geometry::{Au, ViewportPx};
use values::computed::{Context, ToComputedValue};