mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
sort all uses
This commit is contained in:
parent
d3c7e31722
commit
ec07178b6f
269 changed files with 903 additions and 931 deletions
|
@ -7,21 +7,21 @@
|
|||
use dom::bindings::error::{Fallible, Error};
|
||||
use dom::bindings::global::global_object_for_js_object;
|
||||
use dom::bindings::utils::Reflectable;
|
||||
use js::jsapi::{JSContext, JSObject, JS_WrapObject, IsCallable};
|
||||
use js::jsapi::{JS_GetProperty, JS_IsExceptionPending, JS_ReportPendingException};
|
||||
use js::jsapi::{RootedObject, RootedValue, MutableHandleObject, Heap};
|
||||
use js::jsapi::GetGlobalForObjectCrossCompartment;
|
||||
use js::jsapi::{JSAutoCompartment};
|
||||
use js::jsapi::{JSContext, JSObject, JS_WrapObject, IsCallable};
|
||||
use js::jsapi::{JS_BeginRequest, JS_EndRequest};
|
||||
use js::jsapi::{JS_EnterCompartment, JS_LeaveCompartment, JSCompartment};
|
||||
use js::jsapi::GetGlobalForObjectCrossCompartment;
|
||||
use js::jsapi::{JS_GetProperty, JS_IsExceptionPending, JS_ReportPendingException};
|
||||
use js::jsapi::{JS_SaveFrameChain, JS_RestoreFrameChain};
|
||||
use js::jsapi::{RootedObject, RootedValue, MutableHandleObject, Heap};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
use std::intrinsics::return_address;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::intrinsics::return_address;
|
||||
use std::default::Default;
|
||||
|
||||
/// The exception handling used for a call.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
|
|
|
@ -43,26 +43,26 @@ use util::str::DOMString;
|
|||
use js;
|
||||
use js::glue::{GetProxyPrivate, IsWrapper, RUST_JS_NumberValue};
|
||||
use js::glue::{RUST_JSID_IS_STRING, RUST_JSID_TO_STRING, UnwrapObject};
|
||||
use js::rust::{ToUint64, ToInt64};
|
||||
use js::rust::{ToUint32, ToInt32};
|
||||
use js::rust::{ToUint16, ToNumber, ToBoolean, ToString};
|
||||
use js::jsapi::{HandleId, HandleObject, HandleValue, JS_GetClass};
|
||||
use js::jsapi::{JSClass, JSContext, JSObject, JSString, MutableHandleValue};
|
||||
use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetReservedSlot};
|
||||
use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_NewStringCopyN};
|
||||
use js::jsapi::{JS_NewUCStringCopyN, JS_StringHasLatin1Chars, JS_WrapValue};
|
||||
use js::jsapi::{JSClass, JSContext, JSObject, JSString, MutableHandleValue};
|
||||
use js::jsval::JSVal;
|
||||
use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value};
|
||||
use js::jsval::{StringValue, ObjectValue, ObjectOrNullValue};
|
||||
use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value};
|
||||
use js::rust::{ToUint16, ToNumber, ToBoolean, ToString};
|
||||
use js::rust::{ToUint32, ToInt32};
|
||||
use js::rust::{ToUint64, ToInt64};
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use libc;
|
||||
use num::Float;
|
||||
use num::traits::{Bounded, Zero};
|
||||
use std::borrow::ToOwned;
|
||||
use std::slice;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use core::nonzero::NonZero;
|
||||
use std::slice;
|
||||
|
||||
trait As<O>: Copy {
|
||||
fn cast(self) -> O;
|
||||
|
|
|
@ -12,17 +12,17 @@ use dom::domexception::{DOMException, DOMErrorName};
|
|||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::{JSContext, JSObject, RootedValue};
|
||||
use js::jsapi::{JS_IsExceptionPending, JS_SetPendingException, JS_ReportPendingException};
|
||||
use js::jsapi::{JS_ReportErrorNumber1, JSErrorFormatString, JSExnType};
|
||||
use js::jsapi::{JS_SaveFrameChain, JS_RestoreFrameChain};
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsval::UndefinedValue;
|
||||
|
||||
use libc;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
#[derive(Debug, Clone, HeapSizeOf)]
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
//! This module contains smart pointers to global scopes, to simplify writing
|
||||
//! code that works in workers as well as window scopes.
|
||||
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::conversions::native_from_reflector_jsmanaged;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use dom::document::DocumentHelpers;
|
||||
use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
|
||||
use dom::window::{self, WindowHelpers, ScriptHelpers};
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
|
||||
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
|
||||
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
|
@ -22,9 +22,9 @@ use net_traits::ResourceTask;
|
|||
use profile_traits::mem;
|
||||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
|
||||
use js::jsapi::{GetGlobalForObjectCrossCompartment};
|
||||
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
|
||||
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
|
||||
use url::Url;
|
||||
|
||||
use util::mem::HeapSizeOf;
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
|
||||
use dom::bindings::conversions::is_dom_proxy;
|
||||
use dom::bindings::utils::delete_property_by_id;
|
||||
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
|
||||
use js::jsapi::{JS_GetPropertyDescriptorById};
|
||||
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
|
||||
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
||||
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
||||
use js::glue::GetProxyExtra;
|
||||
use js::glue::InvokeGetOwnPropertyDescriptor;
|
||||
use js::glue::{SetProxyExtra, GetProxyHandler};
|
||||
use js::jsapi::AutoIdVector;
|
||||
use js::jsapi::GetObjectProto;
|
||||
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
||||
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
|
||||
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
|
||||
use js::jsapi::{JS_GetPropertyDescriptorById};
|
||||
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
||||
use js::jsval::ObjectValue;
|
||||
use js::glue::GetProxyExtra;
|
||||
use js::glue::{SetProxyExtra, GetProxyHandler};
|
||||
use js::glue::InvokeGetOwnPropertyDescriptor;
|
||||
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY};
|
||||
use js::{JSTrue, JSFalse};
|
||||
|
||||
|
|
|
@ -23,25 +23,25 @@
|
|||
//! is removed.
|
||||
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use script_task::{ScriptChan, CommonScriptMsg};
|
||||
|
||||
use js::jsapi::{JSContext, JSTracer};
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use libc;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::HashMap;
|
||||
use std::collections::hash_map::Entry::{Vacant, Occupied};
|
||||
use std::collections::hash_map::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use core::nonzero::NonZero;
|
||||
|
||||
|
||||
#[allow(missing_docs)] // FIXME
|
||||
mod dummy { // Attributes don’t apply through the macro.
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use super::LiveDOMReferences;
|
||||
thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> =
|
||||
Rc::new(RefCell::new(None)));
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
//! This module implements structured cloning, as defined by [HTML]
|
||||
//! (https://html.spec.whatwg.org/multipage/#safe-passing-of-structured-data).
|
||||
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::error::Error::DataClone;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
|
||||
use js::glue::JS_STRUCTURED_CLONE_VERSION;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsapi::{JS_WriteStructuredClone, JS_ClearPendingException};
|
||||
use js::jsapi::JS_ReadStructuredClone;
|
||||
use js::jsapi::{HandleValue, MutableHandleValue};
|
||||
use js::jsapi::{JS_WriteStructuredClone, JS_ClearPendingException};
|
||||
|
||||
use libc::size_t;
|
||||
use std::ptr;
|
||||
|
|
|
@ -34,9 +34,9 @@ use dom::bindings::refcounted::Trusted;
|
|||
use dom::bindings::utils::{Reflectable, Reflector, WindowProxyHandler};
|
||||
use script_task::ScriptChan;
|
||||
|
||||
use canvas_traits::WebGLError;
|
||||
use canvas_traits::{CanvasGradientStop, LinearGradientStyle, RadialGradientStyle};
|
||||
use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending, RepetitionStyle};
|
||||
use canvas_traits::WebGLError;
|
||||
use cssparser::RGBA;
|
||||
use encoding::types::EncodingRef;
|
||||
use euclid::matrix2d::Matrix2D;
|
||||
|
@ -46,27 +46,26 @@ use html5ever::tree_builder::QuirksMode;
|
|||
use hyper::header::Headers;
|
||||
use hyper::method::Method;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use js::jsapi::{JSObject, JSTracer, JSGCTraceKind, JS_CallValueTracer, JS_CallObjectTracer, GCTraceKindToAscii, Heap};
|
||||
use js::jsapi::JS_CallUnbarrieredObjectTracer;
|
||||
use js::jsapi::{JSObject, JSTracer, JSGCTraceKind, JS_CallValueTracer, JS_CallObjectTracer, GCTraceKindToAscii, Heap};
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::Runtime;
|
||||
use layout_interface::{LayoutRPC, LayoutChan};
|
||||
use libc;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData, WorkerId};
|
||||
use net_traits::image::base::Image;
|
||||
use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
|
||||
use net_traits::storage_task::StorageType;
|
||||
use profile_traits::mem::ProfilerChan;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::parser::PseudoElement;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use smallvec::SmallVec;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use net_traits::image::base::Image;
|
||||
use profile_traits::mem::ProfilerChan;
|
||||
use util::str::{LengthOrPercentageOrAuto};
|
||||
use selectors::parser::PseudoElement;
|
||||
use std::boxed::FnBox;
|
||||
use std::cell::{Cell, UnsafeCell, RefCell};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::hash_state::HashState;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::ffi::CString;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::intrinsics::return_address;
|
||||
|
@ -78,6 +77,7 @@ use std::sync::mpsc::{Receiver, Sender};
|
|||
use string_cache::{Atom, Namespace};
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use url::Url;
|
||||
use util::str::{LengthOrPercentageOrAuto};
|
||||
|
||||
|
||||
/// A trait to allow tracing (only) DOM objects.
|
||||
|
@ -375,8 +375,8 @@ pub struct RootedTraceableSet {
|
|||
|
||||
#[allow(missing_docs)] // FIXME
|
||||
mod dummy { // Attributes don’t apply through the macro.
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use super::RootedTraceableSet;
|
||||
/// TLV Holds a set of JSTraceables that need to be rooted
|
||||
thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> =
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
use dom::bindings::codegen::PrototypeList;
|
||||
use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH;
|
||||
use dom::bindings::conversions::{is_dom_class, jsstring_to_str};
|
||||
use dom::bindings::conversions::native_from_handleobject;
|
||||
use dom::bindings::conversions::private_from_proto_chain;
|
||||
use dom::bindings::error::{Error, ErrorResult, Fallible, throw_invalid_this};
|
||||
use dom::bindings::conversions::{is_dom_class, jsstring_to_str};
|
||||
use dom::bindings::error::throw_type_error;
|
||||
use dom::bindings::error::{Error, ErrorResult, Fallible, throw_invalid_this};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::trace::trace_object;
|
||||
|
@ -19,46 +19,46 @@ use dom::window;
|
|||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
use libc;
|
||||
use libc::c_uint;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use std::cmp::PartialEq;
|
||||
use std::default::Default;
|
||||
use std::cell::UnsafeCell;
|
||||
use js;
|
||||
use js::glue::{CallJitMethodOp, CallJitGetterOp, CallJitSetterOp, IsWrapper};
|
||||
use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT};
|
||||
use js::glue::{RUST_JSID_TO_INT, UnwrapObject};
|
||||
use js::jsapi::{CallArgs, GetGlobalForObjectCrossCompartment, JSJitInfo};
|
||||
use js::jsapi::JS_IsExceptionPending;
|
||||
use js::jsapi::{JS_AlreadyHasOwnProperty, JS_NewFunction, JSTraceOp};
|
||||
use js::jsapi::{JS_DefineProperties, JS_ForwardGetPropertyTo};
|
||||
use js::jsapi::{JS_GetClass, JS_LinkConstructorAndPrototype};
|
||||
use js::jsapi::{HandleObject, HandleId, HandleValue, MutableHandleValue};
|
||||
use js::glue::{WrapperNew, GetCrossCompartmentWrapper};
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JS_DeletePropertyById1;
|
||||
use js::jsapi::JS_GetFunctionObject;
|
||||
use js::jsapi::{JS_HasPropertyById, JS_GetPrototype};
|
||||
use js::jsapi::{JS_GetProperty, JS_HasProperty, JS_SetProperty};
|
||||
use js::jsapi::{JS_DefineFunctions, JS_DefineProperty, JS_DefineProperty1};
|
||||
use js::jsapi::{JS_GetReservedSlot, JS_SetReservedSlot};
|
||||
use js::jsapi::JS_IsExceptionPending;
|
||||
use js::jsapi::JS_NewObjectWithUniqueType;
|
||||
use js::jsapi::JS_ObjectToOuterObject;
|
||||
use js::jsapi::PropertyDefinitionBehavior;
|
||||
use js::jsapi::{CallArgs, GetGlobalForObjectCrossCompartment, JSJitInfo};
|
||||
use js::jsapi::{DOMCallbacks, JSWrapObjectCallbacks};
|
||||
use js::jsapi::{HandleObject, HandleId, HandleValue, MutableHandleValue};
|
||||
use js::jsapi::{JSContext, JSObject, JSClass, JSTracer};
|
||||
use js::jsapi::{JSFunctionSpec, JSPropertySpec};
|
||||
use js::jsapi::{JS_NewGlobalObject, JS_InitStandardClasses};
|
||||
use js::jsapi::{OnNewGlobalHookOption, CompartmentOptions};
|
||||
use js::jsapi::{JS_AlreadyHasOwnProperty, JS_NewFunction, JSTraceOp};
|
||||
use js::jsapi::{JS_DefineFunctions, JS_DefineProperty, JS_DefineProperty1};
|
||||
use js::jsapi::{JS_DefineProperties, JS_ForwardGetPropertyTo};
|
||||
use js::jsapi::{JS_FireOnNewGlobalObject, JSVersion};
|
||||
use js::jsapi::JS_DeletePropertyById1;
|
||||
use js::jsapi::JS_ObjectToOuterObject;
|
||||
use js::jsapi::JS_NewObjectWithUniqueType;
|
||||
use js::jsapi::{JS_GetClass, JS_LinkConstructorAndPrototype};
|
||||
use js::jsapi::{JS_GetProperty, JS_HasProperty, JS_SetProperty};
|
||||
use js::jsapi::{JS_GetReservedSlot, JS_SetReservedSlot};
|
||||
use js::jsapi::{JS_HasPropertyById, JS_GetPrototype};
|
||||
use js::jsapi::{JS_NewGlobalObject, JS_InitStandardClasses};
|
||||
use js::jsapi::{ObjectOpResult, RootedObject, RootedValue, Heap, MutableHandleObject};
|
||||
use js::jsapi::PropertyDefinitionBehavior;
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::{DOMCallbacks, JSWrapObjectCallbacks};
|
||||
use js::jsapi::{OnNewGlobalHookOption, CompartmentOptions};
|
||||
use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, NullValue};
|
||||
use js::jsval::{PrivateValue, UInt32Value, UndefinedValue};
|
||||
use js::rust::{GCMethods, ToString};
|
||||
use js::glue::{WrapperNew, GetCrossCompartmentWrapper};
|
||||
use js::{JS_CALLEE, JSFUN_CONSTRUCTOR, JSPROP_ENUMERATE};
|
||||
use js::{JSPROP_PERMANENT, JSPROP_READONLY};
|
||||
use js;
|
||||
use js::{JS_CALLEE, JSFUN_CONSTRUCTOR, JSPROP_ENUMERATE};
|
||||
use libc;
|
||||
use libc::c_uint;
|
||||
use std::cell::UnsafeCell;
|
||||
use std::cmp::PartialEq;
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
||||
/// Proxy handler for a WindowProxy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue