mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Reorder use
statements
This commit is contained in:
parent
875981ece5
commit
93a103ba73
135 changed files with 401 additions and 400 deletions
|
@ -9,13 +9,13 @@ use context::SharedStyleContext;
|
|||
use dom::OpaqueNode;
|
||||
use euclid::point::Point2D;
|
||||
use keyframes::{KeyframesStep, KeyframesStepValue};
|
||||
use properties::{self, ComputedValues, Importance};
|
||||
use properties::animated_properties::{AnimatedProperty, TransitionProperty};
|
||||
use properties::longhands::animation_direction::computed_value::AnimationDirection;
|
||||
use properties::longhands::animation_iteration_count::computed_value::AnimationIterationCount;
|
||||
use properties::longhands::animation_play_state::computed_value::AnimationPlayState;
|
||||
use properties::longhands::transition_timing_function::computed_value::StartEnd;
|
||||
use properties::longhands::transition_timing_function::computed_value::TransitionTimingFunction;
|
||||
use properties::{self, ComputedValues, Importance};
|
||||
use selector_matching::ApplicableDeclarationBlock;
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::Sender;
|
||||
|
@ -686,4 +686,3 @@ pub fn complete_expired_transitions(node: OpaqueNode, style: &mut Arc<ComputedVa
|
|||
|
||||
had_animations_to_expire
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ use matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
|
|||
use selector_matching::Stylist;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
use std::sync::mpsc::Sender;
|
||||
use timer::Timer;
|
||||
|
||||
/// This structure is used to create a local style context from a shared one.
|
||||
|
|
|
@ -108,15 +108,15 @@ impl From<nsStyleCoord_CalcValue> for LengthOrPercentage {
|
|||
pub mod basic_shape {
|
||||
use euclid::size::Size2D;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleFillRule};
|
||||
use gecko_bindings::structs::{nsStyleCoord, nsStyleCorners};
|
||||
use gecko_bindings::structs::StyleClipPathGeometryBox;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
|
||||
use gecko_values::GeckoStyleCoordConvertible;
|
||||
use std::borrow::Borrow;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
use values::computed::basic_shape::*;
|
||||
use values::computed::position;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
|
||||
// using Borrow so that we can have a non-moving .into()
|
||||
impl<T: Borrow<StyleBasicShape>> From<T> for BasicShape {
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
use cssparser::ToCss;
|
||||
use element_state::ElementState;
|
||||
use selector_impl::{attr_equals_selector_is_shareable, attr_exists_selector_is_shareable};
|
||||
use selector_impl::PseudoElementCascadeType;
|
||||
use selector_impl::{attr_exists_selector_is_shareable, attr_equals_selector_is_shareable};
|
||||
use selectors::parser::{ParserContext, SelectorImpl, AttrSelector};
|
||||
use selectors::parser::{AttrSelector, ParserContext, SelectorImpl};
|
||||
use std::fmt;
|
||||
use string_cache::{Atom, WeakAtom, Namespace, WeakNamespace};
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct GeckoSelectorImpl;
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
use app_units::Au;
|
||||
use cssparser::RGBA;
|
||||
use gecko_bindings::structs::nsStyleCoord;
|
||||
use gecko_bindings::structs::{NS_RADIUS_CLOSEST_SIDE, NS_RADIUS_FARTHEST_SIDE};
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
|
||||
use gecko_bindings::structs::nsStyleCoord;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
|
||||
use std::cmp::max;
|
||||
use values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use values::computed::Angle;
|
||||
use values::computed::basic_shape::ShapeRadius;
|
||||
use values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
|
||||
pub trait StyleCoordHelpers {
|
||||
fn set<T: GeckoStyleCoordConvertible>(&mut self, val: T);
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, RuleListParser};
|
||||
use cssparser::{DeclarationListParser, DeclarationParser};
|
||||
use parser::{ParserContext, log_css_error};
|
||||
use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use properties::PropertyDeclarationParseResult;
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::{PropertyDeclaration, PropertyDeclarationBlock, Importance};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A number from 1 to 100, indicating the percentage of the animation where
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
//! Geometry in flow-relative space.
|
||||
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::num::Zero;
|
||||
use euclid::side_offsets::SideOffsets2D;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt::{self, Debug, Error, Formatter};
|
||||
use std::ops::{Add, Sub};
|
||||
|
|
|
@ -10,16 +10,16 @@ use animation;
|
|||
use arc_ptr_eq;
|
||||
use cache::{LRUCache, SimpleHashCache};
|
||||
use cascade_info::CascadeInfo;
|
||||
use context::{StyleContext, SharedStyleContext};
|
||||
use context::{SharedStyleContext, StyleContext};
|
||||
use data::PrivateStyleData;
|
||||
use dom::{TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use properties::{ComputedValues, PropertyDeclarationBlock, cascade};
|
||||
use properties::longhands::display::computed_value as display;
|
||||
use properties::{ComputedValues, cascade, PropertyDeclarationBlock};
|
||||
use selector_impl::{TheSelectorImpl, PseudoElement};
|
||||
use selector_impl::{PseudoElement, TheSelectorImpl};
|
||||
use selector_matching::{ApplicableDeclarationBlock, Stylist};
|
||||
use selectors::bloom::BloomFilter;
|
||||
use selectors::matching::{MatchingReason, StyleRelations, AFFECTED_BY_PSEUDO_ELEMENTS};
|
||||
use selectors::{Element, MatchAttr};
|
||||
use selectors::bloom::BloomFilter;
|
||||
use selectors::matching::{AFFECTED_BY_PSEUDO_ELEMENTS, MatchingReason, StyleRelations};
|
||||
use sink::ForgetfulSink;
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
use element_state::*;
|
||||
#[cfg(feature = "servo")]
|
||||
use heapsize::HeapSizeOf;
|
||||
use selector_impl::{ElementExt, TheSelectorImpl, NonTSPseudoClass, AttrValue};
|
||||
use selectors::matching::matches_complex_selector;
|
||||
use selectors::matching::{MatchingReason, StyleRelations};
|
||||
use selectors::parser::{AttrSelector, Combinator, ComplexSelector, SimpleSelector, SelectorImpl};
|
||||
use selector_impl::{AttrValue, ElementExt, NonTSPseudoClass, TheSelectorImpl};
|
||||
use selectors::{Element, MatchAttr};
|
||||
use selectors::matching::{MatchingReason, StyleRelations};
|
||||
use selectors::matching::matches_complex_selector;
|
||||
use selectors::parser::{AttrSelector, Combinator, ComplexSelector, SelectorImpl, SimpleSelector};
|
||||
use std::clone::Clone;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
|
|
|
@ -7,9 +7,9 @@ use cssparser::ToCss;
|
|||
use element_state::ElementState;
|
||||
use restyle_hints::ElementSnapshot;
|
||||
use selector_impl::{ElementExt, PseudoElementCascadeType, TheSelectorImpl};
|
||||
use selector_impl::{attr_exists_selector_is_shareable, attr_equals_selector_is_shareable};
|
||||
use selectors::parser::{AttrSelector, ParserContext, SelectorImpl};
|
||||
use selector_impl::{attr_equals_selector_is_shareable, attr_exists_selector_is_shareable};
|
||||
use selectors::{Element, MatchAttrGeneric};
|
||||
use selectors::parser::{AttrSelector, ParserContext, SelectorImpl};
|
||||
use std::fmt;
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
||||
|
|
|
@ -269,9 +269,9 @@ pub mod rule_filter {
|
|||
//! Specific `CSSRule` variant iterators.
|
||||
|
||||
use std::marker::PhantomData;
|
||||
use super::{CSSRule, KeyframesRule, MediaRule, StyleRule};
|
||||
use super::super::font_face::FontFaceRule;
|
||||
use super::super::viewport::ViewportRule;
|
||||
use super::{CSSRule, KeyframesRule, MediaRule, StyleRule};
|
||||
|
||||
macro_rules! rule_filter {
|
||||
($variant:ident -> $value:ty) => {
|
||||
|
|
|
@ -11,9 +11,9 @@ use cssparser::ToCss;
|
|||
use properties::shorthands::serialize_four_sides;
|
||||
use std::fmt;
|
||||
use url::Url;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
use values::computed::UrlExtraData;
|
||||
use values::computed::position::Position;
|
||||
use values::computed::{BorderRadiusSize, LengthOrPercentage};
|
||||
|
||||
pub use values::specified::basic_shape::{FillRule, GeometryBox, ShapeBox};
|
||||
|
||||
|
|
|
@ -7,10 +7,11 @@ use euclid::size::Size2D;
|
|||
use ordered_float::NotNaN;
|
||||
use properties::ComputedValues;
|
||||
use std::fmt;
|
||||
use super::{CSSFloat, specified};
|
||||
use super::LocalToCss;
|
||||
use super::specified::AngleOrCorner;
|
||||
use super::{CSSFloat, specified};
|
||||
use url::Url;
|
||||
|
||||
pub use cssparser::Color as CSSColor;
|
||||
pub use super::specified::{Angle, BorderStyle, Time, UrlExtraData};
|
||||
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
//! [basic-shape]: https://drafts.csswg.org/css-shapes/#typedef-basic-shape
|
||||
|
||||
use cssparser::{Parser, ToCss};
|
||||
use parser::{ParserContext, Parse};
|
||||
use parser::{Parse, ParserContext};
|
||||
use properties::shorthands::{parse_four_sides, serialize_four_sides};
|
||||
use std::fmt;
|
||||
use url::Url;
|
||||
use values::computed::{ComputedValueAsSpecified, Context, ToComputedValue};
|
||||
use values::computed::basic_shape as computed_basic_shape;
|
||||
use values::computed::{Context, ToComputedValue, ComputedValueAsSpecified};
|
||||
use values::specified::{BorderRadiusSize, LengthOrPercentage, Percentage};
|
||||
use values::specified::UrlExtraData;
|
||||
use values::specified::position::{Keyword, Position};
|
||||
use values::specified::{BorderRadiusSize, LengthOrPercentage, Percentage};
|
||||
|
||||
/// A shape source, for some reference box
|
||||
///
|
||||
|
|
|
@ -16,8 +16,8 @@ use std::f32::consts::PI;
|
|||
use std::fmt;
|
||||
use std::ops::Mul;
|
||||
use style_traits::values::specified::AllowedNumericType;
|
||||
use super::computed::{self, Context, ToComputedValue};
|
||||
use super::{CSSFloat, FONT_MEDIUM_PX, HasViewportPercentage, LocalToCss, NoViewportPercentage};
|
||||
use super::computed::{self, Context, ToComputedValue};
|
||||
use url::Url;
|
||||
|
||||
pub mod basic_shape;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
use cssparser::{Parser, ToCss, Token};
|
||||
use std::fmt;
|
||||
use values::HasViewportPercentage;
|
||||
use values::computed::position as computed_position;
|
||||
use values::computed::{CalcLengthOrPercentage, Context};
|
||||
use values::computed::{LengthOrPercentage as ComputedLengthOrPercentage, ToComputedValue};
|
||||
use values::computed::position as computed_position;
|
||||
use values::specified::{LengthOrPercentage, Percentage};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Copy)]
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
//! [meta]: https://drafts.csswg.org/css-device-adapt/#viewport-meta
|
||||
|
||||
use app_units::Au;
|
||||
use cssparser::ToCss;
|
||||
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, parse_important};
|
||||
use cssparser::ToCss;
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::{Size2D, TypedSize2D};
|
||||
use parser::{ParserContext, log_css_error};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue