mirror of
https://github.com/servo/servo.git
synced 2025-10-02 01:29:15 +01:00
Reorder use
statements
This commit is contained in:
parent
875981ece5
commit
93a103ba73
135 changed files with 401 additions and 400 deletions
|
@ -9,8 +9,8 @@ use num_cpus;
|
|||
use std::cmp;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
use style::animation::Animation;
|
||||
use style::context::SharedStyleContext;
|
||||
use style::dom::OpaqueNode;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
use bindings::Gecko_AddRefCSSShadowArrayArbitraryThread;
|
||||
use bindings::Gecko_NewCSSShadowArray;
|
||||
use bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::{ptr, slice};
|
||||
use structs::{nsCSSShadowArray, nsCSSShadowItem, RefPtr};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use structs::{RefPtr, nsCSSShadowArray, nsCSSShadowItem};
|
||||
|
||||
impl RefPtr<nsCSSShadowArray> {
|
||||
pub fn replace_with_new(&mut self, len: u32) {
|
||||
|
|
|
@ -8,7 +8,6 @@ use app_units::Au;
|
|||
use data::{NUM_THREADS, PerDocumentStyleData};
|
||||
use env_logger;
|
||||
use euclid::Size2D;
|
||||
use gecko_bindings::bindings::RawGeckoDocumentBorrowed;
|
||||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSet, RawServoStyleSetBorrowedMut};
|
||||
|
@ -18,20 +17,21 @@ use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStro
|
|||
use gecko_bindings::bindings::{ServoComputedValuesBorrowedOrNull, ServoDeclarationBlock};
|
||||
use gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
|
||||
use gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder, nsHTMLCSSStyleSheet};
|
||||
use gecko_bindings::bindings::RawGeckoDocumentBorrowed;
|
||||
use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
|
||||
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::nsRestyleHint;
|
||||
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI};
|
||||
use gecko_bindings::sugar::ownership::{HasSimpleFFI, HasFFI, Strong};
|
||||
use gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI, Strong};
|
||||
use gecko_string_cache::Atom;
|
||||
use snapshot::GeckoElementSnapshot;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
use std::str::from_utf8_unchecked;
|
||||
use std::sync::atomic::{AtomicBool, AtomicPtr, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::atomic::{AtomicBool, AtomicPtr, Ordering};
|
||||
use style::arc_ptr_eq;
|
||||
use style::context::{LocalStyleContextCreationInfo, ReflowGoal, SharedStyleContext};
|
||||
use style::dom::{TDocument, TElement, TNode};
|
||||
|
@ -42,7 +42,7 @@ use style::parser::ParserContextExtraData;
|
|||
use style::properties::{ComputedValues, PropertyDeclarationBlock, parse_one_declaration};
|
||||
use style::selector_impl::PseudoElementCascadeType;
|
||||
use style::sequential;
|
||||
use style::stylesheets::{Stylesheet, Origin};
|
||||
use style::stylesheets::{Origin, Stylesheet};
|
||||
use style::timer::Timer;
|
||||
use traversal::RecalcStyleOnly;
|
||||
use url::Url;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* 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 {Atom, WeakAtom};
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use selectors::bloom::BloomHash;
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
use {Atom, WeakAtom};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ns {
|
||||
|
|
|
@ -6,8 +6,8 @@ use context::StandaloneStyleContext;
|
|||
use std::mem;
|
||||
use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
|
||||
use style::dom::OpaqueNode;
|
||||
use style::traversal::RestyleResult;
|
||||
use style::traversal::{DomTraversalContext, recalc_style_at};
|
||||
use style::traversal::RestyleResult;
|
||||
use wrapper::GeckoNode;
|
||||
|
||||
pub struct RecalcStyleOnly<'lc> {
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_GetNodeData;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||
use gecko_bindings::bindings::ServoNodeData;
|
||||
use gecko_bindings::bindings::{Gecko_CalcStyleDifference, Gecko_StoreStyleDifference};
|
||||
use gecko_bindings::bindings::{Gecko_DropStyleChildrenIterator, Gecko_MaybeCreateStyleChildrenIterator};
|
||||
use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentElement};
|
||||
|
@ -24,10 +20,14 @@ use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink};
|
|||
use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData};
|
||||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_GetNodeData;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||
use gecko_bindings::bindings::ServoNodeData;
|
||||
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
|
||||
use gecko_bindings::structs::{nsIAtom, nsChangeHint, nsStyleContext};
|
||||
use gecko_bindings::structs::{nsChangeHint, nsIAtom, nsStyleContext};
|
||||
use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||
use gecko_bindings::sugar::ownership::Borrowed;
|
||||
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI, FFIArcHelpers};
|
||||
use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use glue::GeckoDeclarationBlock;
|
||||
use libc::uintptr_t;
|
||||
|
@ -47,8 +47,8 @@ use style::element_state::ElementState;
|
|||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::properties::{ComputedValues, parse_style_attribute};
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::refcell::{Ref, RefCell, RefMut};
|
||||
use style::selector_impl::ElementExt;
|
||||
use style::selector_matching::ApplicableDeclarationBlock;
|
||||
|
|
|
@ -8,37 +8,40 @@ use NestedEventLoopListener;
|
|||
use compositing::compositor_thread::{self, CompositorProxy, CompositorReceiver};
|
||||
use compositing::windowing::{MouseWindowEvent, WindowNavigateMsg};
|
||||
use compositing::windowing::{WindowEvent, WindowMethods};
|
||||
use euclid::{Point2D, Size2D, TypedPoint2D};
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::TypedSize2D;
|
||||
use euclid::{Size2D, Point2D, TypedPoint2D};
|
||||
#[cfg(target_os = "windows")] use gdi32;
|
||||
#[cfg(target_os = "windows")]
|
||||
use gdi32;
|
||||
use gleam::gl;
|
||||
use glutin;
|
||||
use glutin::{Api, ElementState, Event, GlRequest, MouseButton, MouseScrollDelta, VirtualKeyCode};
|
||||
use glutin::{ScanCode, TouchPhase};
|
||||
#[cfg(target_os = "macos")]
|
||||
use glutin::os::macos::{ActivationPolicy, WindowBuilderExt};
|
||||
use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta};
|
||||
use glutin::{ScanCode, TouchPhase};
|
||||
use layers::geometry::DevicePixel;
|
||||
use layers::platform::surface::NativeDisplay;
|
||||
use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER};
|
||||
use msg::constellation_msg::{self, Key};
|
||||
use msg::constellation_msg::{ALT, CONTROL, KeyState, NONE, SHIFT, SUPER};
|
||||
use net_traits::net_error_list::NetError;
|
||||
use script_traits::{TouchEventType, TouchpadPressurePhase};
|
||||
use std::cell::{Cell, RefCell};
|
||||
#[cfg(not(target_os = "android"))]
|
||||
use std::os::raw::c_void;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use style_traits::cursor::Cursor;
|
||||
use url::Url;
|
||||
#[cfg(target_os = "windows")] use user32;
|
||||
#[cfg(target_os = "windows")]
|
||||
use user32;
|
||||
use util::geometry::ScreenPx;
|
||||
use util::opts;
|
||||
#[cfg(not(target_os = "android"))]
|
||||
use util::opts::RenderApi;
|
||||
use util::prefs::PREFS;
|
||||
use util::resource_files;
|
||||
#[cfg(target_os = "windows")] use winapi;
|
||||
#[cfg(target_os = "windows")]
|
||||
use winapi;
|
||||
|
||||
static mut g_nested_event_loop_listener: Option<*mut (NestedEventLoopListener + 'static)> = None;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue