mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
sorted the extern crate, mod & use declarations
This commit is contained in:
parent
705ad72aee
commit
889eec364b
194 changed files with 804 additions and 870 deletions
|
@ -4,17 +4,17 @@
|
|||
|
||||
//! Base classes to work with IDL callbacks.
|
||||
|
||||
use dom::bindings::error::{Fallible, Error};
|
||||
use dom::bindings::error::{Error, Fallible};
|
||||
use dom::bindings::global::global_object_for_js_object;
|
||||
use dom::bindings::utils::Reflectable;
|
||||
use js::jsapi::GetGlobalForObjectCrossCompartment;
|
||||
use js::jsapi::{Heap, MutableHandleObject, RootedObject, RootedValue};
|
||||
use js::jsapi::{IsCallable, JSContext, JSObject, JS_WrapObject};
|
||||
use js::jsapi::{JSAutoCompartment};
|
||||
use js::jsapi::{JSContext, JSObject, JS_WrapObject, IsCallable};
|
||||
use js::jsapi::{JSCompartment, JS_EnterCompartment, JS_LeaveCompartment};
|
||||
use js::jsapi::{JS_BeginRequest, JS_EndRequest};
|
||||
use js::jsapi::{JS_EnterCompartment, JS_LeaveCompartment, JSCompartment};
|
||||
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::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use js::jsapi::{JSTracer};
|
||||
use std::cell::{BorrowState, RefCell, Ref, RefMut};
|
||||
use std::cell::{BorrowState, Ref, RefCell, RefMut};
|
||||
use util::task_state;
|
||||
use util::task_state::SCRIPT;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ use dom::bindings::error::throw_type_error;
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::num::Finite;
|
||||
use dom::bindings::str::{ByteString, USVString};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, DOMClass};
|
||||
use dom::bindings::utils::{DOMClass, Reflectable, Reflector};
|
||||
use js;
|
||||
use js::glue::{GetProxyPrivate, IsWrapper, RUST_JS_NumberValue};
|
||||
use js::glue::{RUST_JSID_IS_STRING, RUST_JSID_TO_STRING, UnwrapObject};
|
||||
|
@ -47,20 +47,17 @@ 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::jsval::JSVal;
|
||||
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 js::jsval::{BooleanValue, Int32Value, NullValue, UInt32Value, UndefinedValue};
|
||||
use js::jsval::{JSVal, ObjectOrNullValue, ObjectValue, StringValue};
|
||||
use js::rust::{ToBoolean, ToNumber, ToString, ToUint16};
|
||||
use js::rust::{ToInt32, ToUint32};
|
||||
use js::rust::{ToInt64, ToUint64};
|
||||
use libc;
|
||||
use num::Float;
|
||||
use num::traits::{Bounded, Zero};
|
||||
use std::borrow::ToOwned;
|
||||
use std::char;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::slice;
|
||||
use std::{char, ptr, slice};
|
||||
use util::str::DOMString;
|
||||
|
||||
trait As<O>: Copy {
|
||||
|
|
|
@ -7,17 +7,16 @@
|
|||
use dom::bindings::codegen::PrototypeList::proto_id_to_name;
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::domexception::{DOMException, DOMErrorName};
|
||||
use dom::domexception::{DOMErrorName, DOMException};
|
||||
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::{JSErrorFormatString, JSExnType, JS_ReportErrorNumber1};
|
||||
use js::jsapi::{JS_IsExceptionPending, JS_ReportPendingException, JS_SetPendingException};
|
||||
use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
|
||||
use js::jsval::UndefinedValue;
|
||||
use libc;
|
||||
use std::ffi::CString;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::{mem, ptr};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ use dom::workerglobalscope::WorkerGlobalScope;
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::{GetGlobalForObjectCrossCompartment};
|
||||
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
|
||||
use js::{JSCLASS_IS_GLOBAL, JSCLASS_IS_DOMJSCLASS};
|
||||
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::ResourceTask;
|
||||
use profile_traits::mem;
|
||||
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
|
||||
use script_task::{CommonScriptMsg, ScriptChan, ScriptPort, ScriptTask};
|
||||
use url::Url;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
use core::nonzero::NonZero;
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use dom::node::Node;
|
||||
use js::jsapi::{JSObject, Heap, JSTracer};
|
||||
use js::jsapi::{Heap, JSObject, JSTracer};
|
||||
use js::jsval::JSVal;
|
||||
use layout_interface::TrustedNodeAddress;
|
||||
use script_task::STACK_ROOTS;
|
||||
|
|
|
@ -132,9 +132,6 @@
|
|||
//! return `Err()` from the method with the appropriate [error value]
|
||||
//! (error/enum.Error.html).
|
||||
|
||||
#![allow(unsafe_code)]
|
||||
#![deny(missing_docs, non_snake_case)]
|
||||
|
||||
pub mod callback;
|
||||
pub mod cell;
|
||||
pub mod conversions;
|
||||
|
|
|
@ -10,19 +10,18 @@ use dom::bindings::conversions::is_dom_proxy;
|
|||
use dom::bindings::utils::delete_property_by_id;
|
||||
use js::glue::GetProxyExtra;
|
||||
use js::glue::InvokeGetOwnPropertyDescriptor;
|
||||
use js::glue::{SetProxyExtra, GetProxyHandler};
|
||||
use js::glue::{GetProxyHandler, SetProxyExtra};
|
||||
use js::jsapi::GetObjectProto;
|
||||
use js::jsapi::{Handle, HandleObject, HandleId, MutableHandle, RootedObject, ObjectOpResult};
|
||||
use js::jsapi::{JSContext, JSPropertyDescriptor, JSObject};
|
||||
use js::jsapi::{Handle, HandleId, HandleObject, MutableHandle, ObjectOpResult, RootedObject};
|
||||
use js::jsapi::{JSContext, JSObject, JSPropertyDescriptor};
|
||||
use js::jsapi::{JSErrNum, JS_StrictPropertyStub};
|
||||
use js::jsapi::{JS_DefinePropertyById6, JS_NewObjectWithGivenProto};
|
||||
use js::jsapi::{JS_GetPropertyDescriptorById};
|
||||
use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
||||
use js::jsval::ObjectValue;
|
||||
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY};
|
||||
use js::{JSTrue, JSFalse};
|
||||
use js::{JSFalse, JSTrue};
|
||||
use js::{JSPROP_ENUMERATE, JSPROP_GETTER, JSPROP_READONLY};
|
||||
use libc;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::{mem, ptr};
|
||||
|
||||
static JSPROXYSLOT_EXPANDO: u32 = 0;
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
use core::nonzero::NonZero;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use js::jsapi::{JSContext, JSTracer};
|
||||
use libc;
|
||||
use script_task::{ScriptChan, CommonScriptMsg};
|
||||
use script_task::{CommonScriptMsg, ScriptChan};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::Entry::{Vacant, Occupied};
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use std::collections::hash_map::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
|
|
@ -9,10 +9,9 @@ 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_ReadStructuredClone;
|
||||
use js::jsapi::{HandleValue, MutableHandleValue};
|
||||
use js::jsapi::{JS_WriteStructuredClone, JS_ClearPendingException};
|
||||
use js::jsapi::{JSContext, JS_ReadStructuredClone};
|
||||
use js::jsapi::{JS_ClearPendingException, JS_WriteStructuredClone};
|
||||
use libc::size_t;
|
||||
use std::ptr;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
use canvas_traits::WebGLError;
|
||||
use canvas_traits::{CanvasGradientStop, LinearGradientStyle, RadialGradientStyle};
|
||||
use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending, RepetitionStyle};
|
||||
use canvas_traits::{CompositionOrBlending, LineCapStyle, LineJoinStyle, RepetitionStyle};
|
||||
use cssparser::RGBA;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::refcounted::Trusted;
|
||||
|
@ -45,10 +45,10 @@ use hyper::header::Headers;
|
|||
use hyper::method::Method;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use js::jsapi::JS_CallUnbarrieredObjectTracer;
|
||||
use js::jsapi::{JSObject, JSTracer, JSGCTraceKind, JS_CallValueTracer, JS_CallObjectTracer, GCTraceKindToAscii, Heap};
|
||||
use js::jsapi::{GCTraceKindToAscii, Heap, JSGCTraceKind, JSObject, JSTracer, JS_CallObjectTracer, JS_CallValueTracer};
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::Runtime;
|
||||
use layout_interface::{LayoutRPC, LayoutChan};
|
||||
use layout_interface::{LayoutChan, LayoutRPC};
|
||||
use libc;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData, WorkerId};
|
||||
|
@ -60,10 +60,10 @@ use profile_traits::time::ProfilerChan as TimeProfilerChan;
|
|||
use script_task::ScriptChan;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::parser::PseudoElement;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smallvec::SmallVec;
|
||||
use std::boxed::FnBox;
|
||||
use std::cell::{Cell, UnsafeCell, RefCell};
|
||||
use std::cell::{Cell, RefCell, UnsafeCell};
|
||||
use std::collections::hash_state::HashState;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::ffi::CString;
|
||||
|
|
|
@ -18,10 +18,10 @@ use dom::browsercontext;
|
|||
use dom::eventtarget::EventTargetTypeId;
|
||||
use dom::window;
|
||||
use js;
|
||||
use js::glue::{CallJitMethodOp, CallJitGetterOp, CallJitSetterOp, IsWrapper};
|
||||
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
|
||||
use js::glue::{GetCrossCompartmentWrapper, WrapperNew};
|
||||
use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT};
|
||||
use js::glue::{RUST_JSID_TO_INT, UnwrapObject};
|
||||
use js::glue::{WrapperNew, GetCrossCompartmentWrapper};
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsapi::JS_DeletePropertyById1;
|
||||
use js::jsapi::JS_GetFunctionObject;
|
||||
|
@ -30,28 +30,27 @@ use js::jsapi::JS_NewObjectWithUniqueType;
|
|||
use js::jsapi::JS_ObjectToOuterObject;
|
||||
use js::jsapi::PropertyDefinitionBehavior;
|
||||
use js::jsapi::{CallArgs, GetGlobalForObjectCrossCompartment, JSJitInfo};
|
||||
use js::jsapi::{CompartmentOptions, OnNewGlobalHookOption};
|
||||
use js::jsapi::{DOMCallbacks, JSWrapObjectCallbacks};
|
||||
use js::jsapi::{HandleObject, HandleId, HandleValue, MutableHandleValue};
|
||||
use js::jsapi::{JSContext, JSObject, JSClass, JSTracer};
|
||||
use js::jsapi::{HandleId, HandleObject, HandleValue, MutableHandleValue};
|
||||
use js::jsapi::{Heap, MutableHandleObject, ObjectOpResult, RootedObject, RootedValue};
|
||||
use js::jsapi::{JSClass, JSContext, JSObject, JSTracer};
|
||||
use js::jsapi::{JSFunctionSpec, JSPropertySpec};
|
||||
use js::jsapi::{JS_AlreadyHasOwnProperty, JS_NewFunction, JSTraceOp};
|
||||
use js::jsapi::{JSTraceOp, JS_AlreadyHasOwnProperty, JS_NewFunction};
|
||||
use js::jsapi::{JSVersion, JS_FireOnNewGlobalObject};
|
||||
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_GetClass, JS_LinkConstructorAndPrototype};
|
||||
use js::jsapi::{JS_GetProperty, JS_HasProperty, JS_SetProperty};
|
||||
use js::jsapi::{JS_GetPrototype, JS_HasPropertyById};
|
||||
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::{OnNewGlobalHookOption, CompartmentOptions};
|
||||
use js::jsapi::{JS_InitStandardClasses, JS_NewGlobalObject};
|
||||
use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, NullValue};
|
||||
use js::jsval::{PrivateValue, UInt32Value, UndefinedValue};
|
||||
use js::rust::{GCMethods, ToString};
|
||||
use js::{JSFUN_CONSTRUCTOR, JSPROP_ENUMERATE, JS_CALLEE};
|
||||
use js::{JSPROP_PERMANENT, JSPROP_READONLY};
|
||||
use js::{JS_CALLEE, JSFUN_CONSTRUCTOR, JSPROP_ENUMERATE};
|
||||
use libc;
|
||||
use libc::c_uint;
|
||||
use libc::{self, c_uint};
|
||||
use std::cell::UnsafeCell;
|
||||
use std::cmp::PartialEq;
|
||||
use std::default::Default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue