mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
This commit is contained in:
parent
e924393be8
commit
de3547e401
213 changed files with 598 additions and 934 deletions
|
@ -9,7 +9,6 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::eventtarget::EventTarget;
|
||||
use dom::mouseevent::MouseEvent;
|
||||
use dom::node::window_from_node;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
/// Trait for elements with defined activation behavior
|
||||
|
|
|
@ -2,6 +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 devtools_traits::AttrInfo;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
|
||||
use dom::bindings::codegen::InheritTypes::NodeCast;
|
||||
|
@ -12,16 +13,12 @@ use dom::bindings::utils::{Reflector, reflect_dom_object};
|
|||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::virtualmethods::vtable_for;
|
||||
use dom::window::Window;
|
||||
|
||||
use devtools_traits::AttrInfo;
|
||||
use util::str::{DOMString, parse_unsigned_integer, split_html_space_chars, str_join};
|
||||
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Ref;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use util::str::{DOMString, parse_unsigned_integer, split_html_space_chars, str_join};
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Clone, HeapSizeOf)]
|
||||
pub enum AttrValue {
|
||||
|
|
|
@ -16,7 +16,6 @@ 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;
|
||||
|
|
|
@ -6,12 +6,10 @@
|
|||
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use js::jsapi::{JSTracer};
|
||||
|
||||
use std::cell::{BorrowState, RefCell, Ref, RefMut};
|
||||
use util::task_state;
|
||||
use util::task_state::SCRIPT;
|
||||
|
||||
use std::cell::{BorrowState, RefCell, Ref, RefMut};
|
||||
|
||||
/// A mutable field in the DOM.
|
||||
///
|
||||
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
|
||||
|
|
|
@ -32,14 +32,13 @@
|
|||
//! | sequences | `Vec<T>` |
|
||||
//! | union types | `T` |
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use dom::bindings::codegen::PrototypeList;
|
||||
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 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};
|
||||
|
@ -54,8 +53,6 @@ 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};
|
||||
|
@ -64,6 +61,7 @@ use std::char;
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::slice;
|
||||
use util::str::DOMString;
|
||||
|
||||
trait As<O>: Copy {
|
||||
fn cast(self) -> O;
|
||||
|
|
|
@ -8,21 +8,18 @@ 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 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::jsval::UndefinedValue;
|
||||
|
||||
use libc;
|
||||
use std::ffi::CString;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
#[derive(Debug, Clone, HeapSizeOf)]
|
||||
|
|
|
@ -14,18 +14,15 @@ use dom::bindings::js::{JS, Root};
|
|||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use dom::window::{self, ScriptHelpers};
|
||||
use dom::workerglobalscope::WorkerGlobalScope;
|
||||
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
|
||||
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::ResourceTask;
|
||||
use profile_traits::mem;
|
||||
|
||||
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 msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::ResourceTask;
|
||||
use profile_traits::mem;
|
||||
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
|
||||
use url::Url;
|
||||
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// A freely-copyable reference to a rooted global object.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
//! originating `Root<T>`.
|
||||
//!
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
|
@ -31,12 +32,10 @@ use js::jsapi::{JSObject, Heap, JSTracer};
|
|||
use js::jsval::JSVal;
|
||||
use layout_interface::TrustedNodeAddress;
|
||||
use script_task::STACK_ROOTS;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use std::cell::{Cell, UnsafeCell};
|
||||
use std::default::Default;
|
||||
use std::ops::Deref;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// A traced reference to a DOM object. Must only be used as a field in other
|
||||
/// DOM objects.
|
||||
|
|
|
@ -20,7 +20,6 @@ use js::jsapi::{JS_StrictPropertyStub, JSErrNum};
|
|||
use js::jsval::ObjectValue;
|
||||
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY};
|
||||
use js::{JSTrue, JSFalse};
|
||||
|
||||
use libc;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
|
|
@ -22,15 +22,13 @@
|
|||
//! is rooted when a hashmap entry is first created, and unrooted when the hashmap entry
|
||||
//! is removed.
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use dom::bindings::js::Root;
|
||||
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 script_task::{ScriptChan, CommonScriptMsg};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::Entry::{Vacant, Occupied};
|
||||
use std::collections::hash_map::HashMap;
|
||||
|
|
|
@ -10,7 +10,6 @@ use std::hash::{Hash, Hasher};
|
|||
use std::ops;
|
||||
use std::str;
|
||||
use std::str::FromStr;
|
||||
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// Encapsulates the IDL `ByteString` type.
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
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 libc::size_t;
|
||||
use std::ptr;
|
||||
|
||||
|
|
|
@ -29,15 +29,13 @@
|
|||
//! The `no_jsmanaged_fields!()` macro adds an empty implementation of `JSTraceable` to
|
||||
//! a datatype.
|
||||
|
||||
use dom::bindings::js::{JS, Root};
|
||||
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 cssparser::RGBA;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::refcounted::Trusted;
|
||||
use dom::bindings::utils::{Reflectable, Reflector, WindowProxyHandler};
|
||||
use encoding::types::EncodingRef;
|
||||
use euclid::matrix2d::Matrix2D;
|
||||
use euclid::rect::Rect;
|
||||
|
@ -59,6 +57,7 @@ use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
|
|||
use net_traits::storage_task::StorageType;
|
||||
use profile_traits::mem::ProfilerChan as MemProfilerChan;
|
||||
use profile_traits::time::ProfilerChan as TimeProfilerChan;
|
||||
use script_task::ScriptChan;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::parser::PseudoElement;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
|
|
@ -17,9 +17,6 @@ use dom::bindings::trace::trace_object;
|
|||
use dom::browsercontext;
|
||||
use dom::eventtarget::EventTargetTypeId;
|
||||
use dom::window;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
use js;
|
||||
use js::glue::{CallJitMethodOp, CallJitGetterOp, CallJitSetterOp, IsWrapper};
|
||||
use js::glue::{RUST_FUNCTION_VALUE_TO_JITINFO, RUST_JSID_IS_INT};
|
||||
|
@ -61,6 +58,8 @@ use std::default::Default;
|
|||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
/// Proxy handler for a WindowProxy.
|
||||
#[allow(raw_pointer_derive)]
|
||||
|
|
|
@ -11,7 +11,6 @@ use dom::bindings::utils::{Reflectable, WindowProxyHandler};
|
|||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::window::Window;
|
||||
|
||||
use js::glue::{GetProxyPrivate};
|
||||
use js::glue::{WrapperNew, CreateWrapperProxyHandler, ProxyTraps};
|
||||
use js::jsapi::{HandleObject, HandleId, MutableHandle, MutableHandleValue};
|
||||
|
@ -22,7 +21,6 @@ use js::jsapi::{JS_ForwardSetPropertyTo, ObjectOpResult, RootedObject, RootedVal
|
|||
use js::jsapi::{JS_GetPropertyDescriptorById, JS_DefinePropertyById6};
|
||||
use js::jsval::{ObjectValue, UndefinedValue};
|
||||
use js::{JSTrue, JSFalse};
|
||||
|
||||
use std::default::Default;
|
||||
use std::ptr;
|
||||
|
||||
|
|
|
@ -2,6 +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 canvas::canvas_paint_task::RectToi32;
|
||||
use canvas_traits::{CanvasMsg, Canvas2dMsg, CanvasCommonMsg};
|
||||
use canvas_traits::{FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle, RepetitionStyle};
|
||||
use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending};
|
||||
use cssparser::Color as CSSColor;
|
||||
use cssparser::{Parser, RGBA};
|
||||
use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding;
|
||||
use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods;
|
||||
use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasWindingRule;
|
||||
|
@ -22,24 +28,14 @@ use dom::htmlcanvaselement::utils as canvas_utils;
|
|||
use dom::htmlimageelement::HTMLImageElement;
|
||||
use dom::imagedata::ImageData;
|
||||
use dom::node::{window_from_node, NodeDamage};
|
||||
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use net_traits::image_cache_task::ImageResponse;
|
||||
|
||||
use cssparser::Color as CSSColor;
|
||||
use cssparser::{Parser, RGBA};
|
||||
use euclid::matrix2d::Matrix2D;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::Size2D;
|
||||
|
||||
use canvas::canvas_paint_task::RectToi32;
|
||||
use canvas_traits::{CanvasMsg, Canvas2dMsg, CanvasCommonMsg};
|
||||
use canvas_traits::{FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle, RepetitionStyle};
|
||||
use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending};
|
||||
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use net_traits::image_cache_task::ImageResponse;
|
||||
use num::{Float, ToPrimitive};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
|
@ -47,7 +43,6 @@ use std::cmp;
|
|||
use std::fmt;
|
||||
use std::str::FromStr;
|
||||
use std::sync::mpsc::channel;
|
||||
|
||||
use url::Url;
|
||||
use util::str::DOMString;
|
||||
use util::vec::byte_swap;
|
||||
|
|
|
@ -16,11 +16,9 @@ use dom::document::Document;
|
|||
use dom::element::Element;
|
||||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Ref;
|
||||
use util::str::DOMString;
|
||||
|
||||
// https://dom.spec.whatwg.org/#characterdata
|
||||
#[dom_struct]
|
||||
|
|
|
@ -12,7 +12,6 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::event::{Event, EventTypeId, EventBubbles, EventCancelable};
|
||||
use script_task::ScriptChan;
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -75,10 +75,8 @@ use dom::htmltrackelement::HTMLTrackElement;
|
|||
use dom::htmlulistelement::HTMLUListElement;
|
||||
use dom::htmlunknownelement::HTMLUnknownElement;
|
||||
use dom::htmlvideoelement::HTMLVideoElement;
|
||||
|
||||
use string_cache::{Atom, QualName};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use string_cache::{Atom, QualName};
|
||||
|
||||
pub fn create_element(name: QualName, prefix: Option<Atom>,
|
||||
document: &Document, creator: ElementCreator)
|
||||
|
|
|
@ -9,15 +9,12 @@ use dom::bindings::error::{Error, Fallible};
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
|
||||
use js::jsapi::{JSContext, JSObject};
|
||||
use js::jsapi::{JS_GetObjectAsArrayBufferView, JS_GetArrayBufferViewType, Type};
|
||||
|
||||
use rand::{Rng, OsRng};
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
|
||||
use rand::{Rng, OsRng};
|
||||
|
||||
no_jsmanaged_fields!(OsRng);
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Crypto
|
||||
|
|
|
@ -2,13 +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 cssparser::serialize_identifier;
|
||||
use dom::bindings::error::{Error, Fallible};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::utils::Reflector;
|
||||
use util::str::DOMString;
|
||||
|
||||
use cssparser::serialize_identifier;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSS {
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -12,15 +12,14 @@ use dom::element::{StylePriority, Element};
|
|||
use dom::node::{window_from_node, document_from_node, NodeDamage};
|
||||
use dom::window::Window;
|
||||
use selectors::parser::PseudoElement;
|
||||
use string_cache::Atom;
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::properties::{is_supported_property, longhands_from_shorthand, parse_one_declaration};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Ref;
|
||||
use std::slice::SliceConcatExt;
|
||||
use string_cache::Atom;
|
||||
use style::properties::PropertyDeclaration;
|
||||
use style::properties::{is_supported_property, longhands_from_shorthand, parse_one_declaration};
|
||||
use util::str::DOMString;
|
||||
|
||||
// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
||||
#[dom_struct]
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use devtools;
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding;
|
||||
use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods;
|
||||
|
@ -20,28 +21,24 @@ use dom::messageevent::MessageEvent;
|
|||
use dom::worker::{TrustedWorkerAddress, WorkerMessageHandler, SimpleWorkerErrorHandler};
|
||||
use dom::workerglobalscope::WorkerGlobalScope;
|
||||
use dom::workerglobalscope::{WorkerGlobalScopeTypeId, WorkerGlobalScopeInit};
|
||||
use script_task::ScriptTaskEventCategory::WorkerEvent;
|
||||
use script_task::{ScriptTask, ScriptChan, TimerSource, ScriptPort, StackRootTLS, CommonScriptMsg};
|
||||
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::load_whole_resource;
|
||||
use util::task::spawn_named;
|
||||
use util::task_state;
|
||||
use util::task_state::{SCRIPT, IN_WORKER};
|
||||
|
||||
use ipc_channel::ipc::IpcReceiver;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::{JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsapi::{JSContext, RootedValue, HandleValue};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::Runtime;
|
||||
use url::Url;
|
||||
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::load_whole_resource;
|
||||
use rand::random;
|
||||
use script_task::ScriptTaskEventCategory::WorkerEvent;
|
||||
use script_task::{ScriptTask, ScriptChan, TimerSource, ScriptPort, StackRootTLS, CommonScriptMsg};
|
||||
use std::mem::replace;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{Sender, Receiver, channel, Select, RecvError};
|
||||
use url::Url;
|
||||
use util::task::spawn_named;
|
||||
use util::task_state;
|
||||
use util::task_state::{SCRIPT, IN_WORKER};
|
||||
|
||||
/// Messages used to control the worker event loops
|
||||
pub enum WorkerScriptMsg {
|
||||
|
|
|
@ -66,8 +66,12 @@ use dom::text::Text;
|
|||
use dom::treewalker::TreeWalker;
|
||||
use dom::uievent::UIEvent;
|
||||
use dom::window::{Window, ReflowReason};
|
||||
|
||||
use euclid::point::Point2D;
|
||||
use html5ever::tree_builder::{QuirksMode, NoQuirks, LimitedQuirks, Quirks};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use layout_interface::{HitTestResponse, MouseOverResponse};
|
||||
use layout_interface::{LayoutChan, Msg};
|
||||
use layout_interface::{ReflowGoal, ReflowQueryType};
|
||||
use msg::compositor_msg::ScriptToCompositorMsg;
|
||||
use msg::constellation_msg::AnimationState;
|
||||
|
@ -77,19 +81,9 @@ use msg::constellation_msg::{SUPER, ALT, SHIFT, CONTROL};
|
|||
use net_traits::ControlMsg::{SetCookiesForUrl, GetCookiesForUrl};
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::{Metadata, PendingAsyncLoad, AsyncResponseTarget};
|
||||
use num::ToPrimitive;
|
||||
use script_task::Runnable;
|
||||
use script_traits::{MouseButton, UntrustedNodeAddress};
|
||||
use util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
use euclid::point::Point2D;
|
||||
use html5ever::tree_builder::{QuirksMode, NoQuirks, LimitedQuirks, Quirks};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use layout_interface::{LayoutChan, Msg};
|
||||
use string_cache::{Atom, QualName};
|
||||
use url::Url;
|
||||
|
||||
use num::ToPrimitive;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::boxed::FnBox;
|
||||
|
@ -101,7 +95,10 @@ use std::iter::FromIterator;
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::channel;
|
||||
use string_cache::{Atom, QualName};
|
||||
use time;
|
||||
use url::Url;
|
||||
use util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
#[derive(JSTraceable, PartialEq, HeapSizeOf)]
|
||||
pub enum IsHTMLDocument {
|
||||
|
|
|
@ -11,9 +11,8 @@ use dom::bindings::js::Root;
|
|||
use dom::document::Document;
|
||||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
// https://dom.spec.whatwg.org/#documenttype
|
||||
/// The `DOCTYPE` tag.
|
||||
|
|
|
@ -8,9 +8,8 @@ use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[repr(u16)]
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, HeapSizeOf)]
|
||||
|
|
|
@ -21,9 +21,8 @@ use dom::htmlheadelement::HTMLHeadElement;
|
|||
use dom::htmlhtmlelement::HTMLHtmlElement;
|
||||
use dom::htmltitleelement::HTMLTitleElement;
|
||||
use dom::text::Text;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
// https://dom.spec.whatwg.org/#domimplementation
|
||||
#[dom_struct]
|
||||
|
|
|
@ -16,9 +16,8 @@ use dom::document::DocumentSource;
|
|||
use dom::document::{Document, IsHTMLDocument};
|
||||
use dom::window::Window;
|
||||
use parse::html::{ParseContext, parse_html};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct DOMParser {
|
||||
|
|
|
@ -12,12 +12,10 @@ use dom::bindings::js::{JS, Root};
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::element::Element;
|
||||
use dom::node::window_from_node;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use string_cache::Atom;
|
||||
use util::str::{DOMString, HTML_SPACE_CHARACTERS, str_join};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct DOMTokenList {
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
//! Element nodes.
|
||||
|
||||
use cssparser::Color;
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom::activation::Activatable;
|
||||
use dom::attr::AttrValue;
|
||||
use dom::attr::{Attr, AttrHelpersForLayout};
|
||||
|
@ -57,19 +59,6 @@ use dom::node::{document_from_node, NodeDamage};
|
|||
use dom::node::{window_from_node};
|
||||
use dom::nodelist::NodeList;
|
||||
use dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
|
||||
use devtools_traits::AttrInfo;
|
||||
use smallvec::VecLike;
|
||||
use style::legacy::{UnsignedIntegerAttribute, from_declaration};
|
||||
use style::properties::DeclaredValue;
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family};
|
||||
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, parse_style_attribute};
|
||||
use style::values::CSSFloat;
|
||||
use style::values::specified::{self, CSSColor, CSSRGBA};
|
||||
use util::geometry::Au;
|
||||
use util::str::{DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
use cssparser::Color;
|
||||
use html5ever::serialize;
|
||||
use html5ever::serialize::SerializeOpts;
|
||||
use html5ever::serialize::TraversalScope;
|
||||
|
@ -78,15 +67,23 @@ use html5ever::tree_builder::{NoQuirks, LimitedQuirks, Quirks};
|
|||
use selectors::matching::{matches, DeclarationBlock};
|
||||
use selectors::parser::parse_author_origin_selector_list_from_str;
|
||||
use selectors::parser::{AttrSelector, NamespaceConstraint};
|
||||
use string_cache::{Atom, Namespace, QualName};
|
||||
use url::UrlParser;
|
||||
|
||||
use smallvec::VecLike;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::{Cow, ToOwned};
|
||||
use std::cell::{Ref, RefMut};
|
||||
use std::default::Default;
|
||||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace, QualName};
|
||||
use style::legacy::{UnsignedIntegerAttribute, from_declaration};
|
||||
use style::properties::DeclaredValue;
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family};
|
||||
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, parse_style_attribute};
|
||||
use style::values::CSSFloat;
|
||||
use style::values::specified::{self, CSSColor, CSSRGBA};
|
||||
use url::UrlParser;
|
||||
use util::geometry::Au;
|
||||
use util::str::{DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct Element {
|
||||
|
|
|
@ -2,6 +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 dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::ErrorEventBinding;
|
||||
use dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
|
@ -10,16 +11,13 @@ use dom::bindings::error::Fallible;
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Root, MutHeapJSVal};
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use js::jsapi::{JSContext, HandleValue};
|
||||
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::event::{Event, EventTypeId, EventBubbles, EventCancelable};
|
||||
use util::str::DOMString;
|
||||
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use js::jsapi::{JSContext, HandleValue};
|
||||
use js::jsval::JSVal;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct ErrorEvent {
|
||||
|
|
|
@ -11,13 +11,11 @@ use dom::bindings::js::{JS, MutNullableHeap, Root};
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::eventtarget::EventTarget;
|
||||
use dom::uievent::{UIEventTypeId};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
|
||||
use time;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[repr(u16)]
|
||||
|
|
|
@ -2,6 +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 devtools_traits::{StartedTimelineMarker, TimelineMarker, TimelineMarkerType};
|
||||
use dom::bindings::callback::ExceptionHandling::Report;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use dom::bindings::codegen::InheritTypes::{EventTargetCast, NodeCast};
|
||||
|
@ -14,8 +15,6 @@ use dom::node::Node;
|
|||
use dom::virtualmethods::vtable_for;
|
||||
use dom::window::Window;
|
||||
|
||||
use devtools_traits::{StartedTimelineMarker, TimelineMarker, TimelineMarkerType};
|
||||
|
||||
struct AutoDOMEventMarker {
|
||||
window: Root<Window>,
|
||||
marker: Option<StartedTimelineMarker>,
|
||||
|
|
|
@ -17,16 +17,14 @@ use dom::node::NodeTypeId;
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::workerglobalscope::WorkerGlobalScopeTypeId;
|
||||
use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTargetTypeId;
|
||||
use fnv::FnvHasher;
|
||||
use js::jsapi::{CompileFunction, JS_GetFunctionObject};
|
||||
use js::jsapi::{JSAutoCompartment, JSAutoRequest};
|
||||
use js::jsapi::{JSContext, RootedFunction, HandleObject};
|
||||
use js::rust::{AutoObjectVectorWrapper, CompileOptionsWrapper};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
use fnv::FnvHasher;
|
||||
use libc::{c_char, size_t};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use std::collections::hash_state::DefaultState;
|
||||
use std::default::Default;
|
||||
|
@ -35,8 +33,8 @@ use std::intrinsics;
|
|||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use url::Url;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
pub type EventHandler = EventHandlerNonNull;
|
||||
|
||||
|
|
|
@ -15,11 +15,10 @@ use dom::bindings::utils::{Reflector, reflect_dom_object};
|
|||
use dom::blob::Blob;
|
||||
use dom::file::File;
|
||||
use dom::htmlformelement::HTMLFormElement;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use util::str::DOMString;
|
||||
|
||||
#[derive(JSTraceable, Clone)]
|
||||
#[must_root]
|
||||
|
|
|
@ -22,14 +22,11 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use num::ToPrimitive;
|
||||
use std::default::Default;
|
||||
use string_cache::Atom;
|
||||
use url::UrlParser;
|
||||
|
||||
use std::default::Default;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLAnchorElement {
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
* 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 dom::attr::AttrValue;
|
||||
use dom::bindings::codegen::Bindings::HTMLAppletElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLAppletElementBinding::HTMLAppletElementMethods;
|
||||
|
||||
use dom::attr::AttrValue;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLAppletElementDerived;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLElementCast;
|
||||
use dom::bindings::js::Root;
|
||||
|
@ -15,7 +14,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use std::default::Default;
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
|
|
@ -14,9 +14,8 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId, document_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use util::str::DOMString;
|
||||
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLBaseElement {
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
|
@ -19,15 +20,12 @@ use dom::node::{Node, NodeTypeId, window_from_node, document_from_node};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
use time;
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
/// How long we should wait before performing the initial reflow after `<body>` is parsed, in
|
||||
/// nanoseconds.
|
||||
|
|
|
@ -19,7 +19,6 @@ use dom::htmlformelement::{SubmittedFrom};
|
|||
use dom::node::{Node, NodeTypeId, document_from_node, window_from_node};
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -2,6 +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 canvas_traits::CanvasMsg;
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::HTMLCanvasElementMethods;
|
||||
|
@ -20,17 +21,13 @@ use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
|||
use dom::node::{Node, NodeTypeId, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::webglrenderingcontext::{WebGLRenderingContext, LayoutCanvasWebGLRenderingContextHelpers};
|
||||
|
||||
use canvas_traits::CanvasMsg;
|
||||
use euclid::size::Size2D;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::{JSContext, HandleValue};
|
||||
use offscreen_gl_context::GLContextAttributes;
|
||||
use util::str::{DOMString, parse_unsigned_integer};
|
||||
|
||||
use euclid::size::Size2D;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use util::str::{DOMString, parse_unsigned_integer};
|
||||
|
||||
const DEFAULT_WIDTH: u32 = 300;
|
||||
const DEFAULT_HEIGHT: u32 = 150;
|
||||
|
|
|
@ -12,10 +12,9 @@ use dom::bindings::utils::{namespace_from_domstring, Reflector, reflect_dom_obje
|
|||
use dom::element::Element;
|
||||
use dom::node::{Node, TreeIterator};
|
||||
use dom::window::Window;
|
||||
use util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
pub trait CollectionFilter : JSTraceable {
|
||||
fn filter<'a>(&self, elem: &'a Element, root: &'a Node) -> bool;
|
||||
|
|
|
@ -12,10 +12,8 @@ use dom::element::ElementTypeId;
|
|||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDialogElement {
|
||||
|
|
|
@ -26,16 +26,13 @@ use dom::htmlmediaelement::HTMLMediaElementTypeId;
|
|||
use dom::htmltablecellelement::HTMLTableCellElementTypeId;
|
||||
use dom::node::{Node, NodeTypeId, document_from_node, window_from_node, SEQUENTIALLY_FOCUSABLE};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use msg::constellation_msg::FocusType;
|
||||
use util::str::DOMString;
|
||||
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::default::Default;
|
||||
use std::intrinsics;
|
||||
use std::rc::Rc;
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLElement {
|
||||
|
|
|
@ -16,7 +16,6 @@ use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
|||
use dom::node::{Node, NodeTypeId, window_from_node};
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::{DOMString, StaticStringVec};
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::{Attr, AttrValue};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::HTMLFontElementBinding;
|
||||
|
@ -14,12 +15,10 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
use cssparser::RGBA;
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLFontElement {
|
||||
htmlelement: HTMLElement,
|
||||
|
|
|
@ -32,14 +32,13 @@ use hyper::method::Method;
|
|||
use hyper::mime;
|
||||
use msg::constellation_msg::LoadData;
|
||||
use script_task::{ScriptChan, MainThreadScriptMsg};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use url::UrlParser;
|
||||
use url::form_urlencoded::serialize;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLFormElement {
|
||||
htmlelement: HTMLElement,
|
||||
|
|
|
@ -24,21 +24,19 @@ use dom::node::{Node, NodeTypeId, window_from_node};
|
|||
use dom::urlhelper::UrlHelper;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::Window;
|
||||
use page::IterablePage;
|
||||
|
||||
use js::jsapi::{RootedValue, JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsval::UndefinedValue;
|
||||
use msg::constellation_msg::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId, ConstellationChan, MozBrowserEvent, NavigationDirection};
|
||||
use string_cache::Atom;
|
||||
use util::prefs;
|
||||
use util::str::DOMString;
|
||||
|
||||
use js::jsapi::{RootedValue, JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsval::UndefinedValue;
|
||||
use page::IterablePage;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use url::{Url, UrlParser};
|
||||
use util::prefs;
|
||||
use util::str::DOMString;
|
||||
use util::str::{self, LengthOrPercentageOrAuto};
|
||||
|
||||
pub fn mozbrowser_enabled() -> bool {
|
||||
|
|
|
@ -21,19 +21,17 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{document_from_node, Node, NodeTypeId, NodeDamage, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use script_task::ScriptTaskEventCategory::UpdateReplacedElement;
|
||||
use script_task::{Runnable, ScriptChan, CommonScriptMsg};
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use net_traits::image::base::Image;
|
||||
use net_traits::image_cache_task::{ImageResponder, ImageResponse};
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
use script_task::ScriptTaskEventCategory::UpdateReplacedElement;
|
||||
use script_task::{Runnable, ScriptChan, CommonScriptMsg};
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLImageElement {
|
||||
|
|
|
@ -27,16 +27,14 @@ use dom::node::{Node, NodeDamage, NodeTypeId};
|
|||
use dom::node::{document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use textinput::KeyReaction::{TriggerDefaultAction, DispatchInput, Nothing, RedrawSelection};
|
||||
use textinput::Lines::Single;
|
||||
use textinput::{TextInput, TextPoint};
|
||||
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
|
||||
const DEFAULT_SUBMIT_VALUE: &'static str = "Submit";
|
||||
const DEFAULT_RESET_VALUE: &'static str = "Reset";
|
||||
|
||||
|
|
|
@ -26,14 +26,13 @@ use layout_interface::{LayoutChan, Msg};
|
|||
use msg::constellation_msg::ConstellationChan;
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use script_traits::StylesheetLoadResponder;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::default::Default;
|
||||
use string_cache::Atom;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use url::UrlParser;
|
||||
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLLinkElement {
|
||||
|
|
|
@ -16,7 +16,6 @@ use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
|||
use dom::node::{Node, NodeTypeId, window_from_node};
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use net_traits::image::base::Image;
|
||||
use std::sync::Arc;
|
||||
use util::str::DOMString;
|
||||
|
|
|
@ -14,7 +14,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -17,7 +17,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* 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 std::ascii::AsciiExt;
|
||||
|
||||
use document_loader::LoadType;
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
|
@ -29,19 +27,19 @@ use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
|
|||
use dom::node::{NodeTypeId, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::ScriptHelpers;
|
||||
use js::jsapi::RootedValue;
|
||||
use js::jsval::UndefinedValue;
|
||||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_task::ScriptTaskEventCategory::ScriptEvent;
|
||||
use script_task::{ScriptChan, Runnable, CommonScriptMsg};
|
||||
|
||||
use encoding::all::UTF_8;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{Encoding, EncodingRef, DecoderTrap};
|
||||
use html5ever::tree_builder::NextParserState;
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::RootedValue;
|
||||
use js::jsval::UndefinedValue;
|
||||
use net_traits::{Metadata, AsyncResponseListener, AsyncResponseTarget};
|
||||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_task::ScriptTaskEventCategory::ScriptEvent;
|
||||
use script_task::{ScriptChan, Runnable, CommonScriptMsg};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::cell::{RefCell, Cell};
|
||||
use std::mem;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
|
|
@ -17,12 +17,10 @@ use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
|||
use dom::node::{Node, NodeTypeId, window_from_node};
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLSelectElement {
|
||||
htmlelement: HTMLElement
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::{Attr, AttrValue};
|
||||
use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods;
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLTableCellElementDerived};
|
||||
|
@ -11,14 +12,10 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::NodeTypeId;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
use cssparser::RGBA;
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::cmp::max;
|
||||
use string_cache::Atom;
|
||||
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
const DEFAULT_COLSPAN: u32 = 1;
|
||||
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::{Attr, AttrValue};
|
||||
use dom::bindings::codegen::Bindings::HTMLTableElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods;
|
||||
|
@ -18,13 +19,9 @@ use dom::htmltablecaptionelement::HTMLTableCaptionElement;
|
|||
use dom::htmltablesectionelement::HTMLTableSectionElement;
|
||||
use dom::node::{Node, NodeTypeId, document_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
use cssparser::RGBA;
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTableElement {
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::codegen::Bindings::HTMLTableRowElementBinding;
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLTableRowElementDerived};
|
||||
|
@ -12,8 +13,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use std::cell::Cell;
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
|
|
|
@ -2,6 +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;
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding;
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLTableSectionElementDerived};
|
||||
|
@ -12,8 +13,6 @@ use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use std::cell::Cell;
|
||||
use util::str::{self, DOMString};
|
||||
|
||||
|
|
|
@ -27,13 +27,11 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use msg::constellation_msg::ConstellationChan;
|
||||
use script_task::ScriptTaskEventCategory::InputEvent;
|
||||
use script_task::{Runnable, CommonScriptMsg};
|
||||
use textinput::{TextInput, Lines, KeyReaction};
|
||||
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use string_cache::Atom;
|
||||
use textinput::{TextInput, Lines, KeyReaction};
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTextAreaElement {
|
||||
|
|
|
@ -16,10 +16,9 @@ use dom::window::Window;
|
|||
use msg::constellation_msg;
|
||||
use msg::constellation_msg::{Key, KeyModifiers};
|
||||
use msg::constellation_msg::{SHIFT, CONTROL, ALT, SUPER};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{RefCell, Cell};
|
||||
use util::str::DOMString;
|
||||
|
||||
no_jsmanaged_fields!(Key);
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ use dom::bindings::str::USVString;
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::urlhelper::UrlHelper;
|
||||
use dom::window::Window;
|
||||
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
|
|
|
@ -12,14 +12,11 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::event::{Event, EventTypeId};
|
||||
use dom::eventtarget::EventTarget;
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use js::jsapi::{JSContext, Heap, HandleValue};
|
||||
use js::jsval::JSVal;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::default::Default;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct MessageEvent {
|
||||
|
|
|
@ -11,9 +11,8 @@ use dom::bindings::js::{JS, Root};
|
|||
use dom::bindings::utils::{namespace_from_domstring, Reflector, reflect_dom_object};
|
||||
use dom::element::Element;
|
||||
use dom::window::Window;
|
||||
use util::str::DOMString;
|
||||
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct NamedNodeMap {
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
* 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 std::borrow::ToOwned;
|
||||
use util::opts;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
pub fn Product() -> DOMString {
|
||||
"Gecko".to_owned()
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
//! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements.
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use devtools_traits::NodeInfo;
|
||||
use document_loader::DocumentLoader;
|
||||
use dom::attr::Attr;
|
||||
|
@ -46,21 +47,15 @@ use dom::text::Text;
|
|||
use dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use dom::window::Window;
|
||||
use euclid::rect::Rect;
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use layout_interface::{LayoutChan, Msg};
|
||||
use libc;
|
||||
use libc::{uintptr_t, c_void};
|
||||
use parse::html::parse_html_fragment;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::matching::matches;
|
||||
use selectors::parser::Selector;
|
||||
use selectors::parser::parse_author_origin_selector_list_from_str;
|
||||
use style::properties::ComputedValues;
|
||||
use util::geometry::Au;
|
||||
use util::str::DOMString;
|
||||
use util::task_state;
|
||||
|
||||
use core::nonzero::NonZero;
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use libc;
|
||||
use libc::{uintptr_t, c_void};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, RefCell, Ref, RefMut};
|
||||
use std::default::Default;
|
||||
|
@ -69,6 +64,10 @@ use std::mem;
|
|||
use std::slice::ref_slice;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace, QualName};
|
||||
use style::properties::ComputedValues;
|
||||
use util::geometry::Au;
|
||||
use util::str::DOMString;
|
||||
use util::task_state;
|
||||
use uuid;
|
||||
|
||||
//
|
||||
|
|
|
@ -14,7 +14,6 @@ use dom::bindings::js::{JS, MutHeap, Root};
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::document::Document;
|
||||
use dom::node::Node;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ use dom::bindings::js::{JS, MutNullableHeap, Root};
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::node::{ChildrenMutation, Node};
|
||||
use dom::window::Window;
|
||||
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
|
|
|
@ -20,7 +20,6 @@ use dom::characterdata::CharacterDataTypeId;
|
|||
use dom::document::Document;
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::node::{Node, NodeTypeId};
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
||||
use std::rc::Rc;
|
||||
|
|
|
@ -18,13 +18,6 @@ use dom::document::Document;
|
|||
use dom::node::{window_from_node, Node};
|
||||
use dom::text::Text;
|
||||
use dom::window::Window;
|
||||
use network_listener::PreInvoke;
|
||||
use parse::Parser;
|
||||
use script_task::{ScriptTask, ScriptChan};
|
||||
|
||||
use msg::constellation_msg::{PipelineId, SubpageId};
|
||||
use net_traits::{Metadata, AsyncResponseListener};
|
||||
|
||||
use encoding::all::UTF_8;
|
||||
use encoding::types::{Encoding, DecoderTrap};
|
||||
use html5ever::tokenizer;
|
||||
|
@ -33,6 +26,11 @@ use html5ever::tree_builder::{NodeOrText, TreeBuilder, TreeBuilderOpts};
|
|||
use hyper::header::ContentType;
|
||||
use hyper::mime::{Mime, TopLevel, SubLevel};
|
||||
use js::jsapi::JSTracer;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId};
|
||||
use net_traits::{Metadata, AsyncResponseListener};
|
||||
use network_listener::PreInvoke;
|
||||
use parse::Parser;
|
||||
use script_task::{ScriptTask, ScriptChan};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::default::Default;
|
||||
use url::Url;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
use dom::bindings::codegen::Bindings::EventBinding::{EventMethods};
|
||||
use dom::bindings::codegen::Bindings::StorageEventBinding;
|
||||
use dom::bindings::codegen::Bindings::StorageEventBinding::{StorageEventMethods};
|
||||
|
||||
use dom::bindings::codegen::InheritTypes::{EventCast};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
|
|
|
@ -20,14 +20,12 @@ use dom::bindings::num::Finite;
|
|||
use dom::bindings::str::{ByteString, USVString};
|
||||
use dom::bindings::utils::Reflector;
|
||||
use dom::blob::Blob;
|
||||
use util::str::DOMString;
|
||||
|
||||
use js::jsapi::{JSContext, JSObject, HandleValue};
|
||||
use js::jsval::{JSVal, NullValue};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct TestBinding {
|
||||
|
|
|
@ -10,18 +10,15 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::str::USVString;
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use encoding::Encoding;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{EncodingRef, DecoderTrap};
|
||||
use js::jsapi::JS_GetObjectAsArrayBufferView;
|
||||
use js::jsapi::{JSContext, JSObject};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct TextDecoder {
|
||||
|
|
|
@ -10,19 +10,15 @@ use dom::bindings::global::GlobalRef;
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::USVString;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::ptr;
|
||||
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::EncodingRef;
|
||||
use encoding::{Encoding, EncoderTrap};
|
||||
|
||||
use js::jsapi::{JSContext, JSObject};
|
||||
use js::jsapi::{JS_NewUint8Array, JS_GetUint8ArrayData};
|
||||
use libc::uint8_t;
|
||||
use std::borrow::ToOwned;
|
||||
use std::ptr;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct TextEncoder {
|
||||
|
|
|
@ -10,14 +10,12 @@ use dom::bindings::error::Fallible;
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, RootedReference};
|
||||
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::event::{Event, EventTypeId, EventBubbles, EventCancelable};
|
||||
use dom::window::Window;
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[derive(JSTraceable, PartialEq, HeapSizeOf)]
|
||||
pub enum UIEventTypeId {
|
||||
|
|
|
@ -9,12 +9,10 @@ use dom::bindings::js::Root;
|
|||
use dom::bindings::str::USVString;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::urlhelper::UrlHelper;
|
||||
|
||||
use url::{Host, ParseResult, Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use url::{Host, ParseResult, Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
// https://url.spec.whatwg.org/#url
|
||||
#[dom_struct]
|
||||
|
|
|
@ -3,13 +3,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::str::USVString;
|
||||
|
||||
use url::{Url, UrlParser, SchemeData};
|
||||
|
||||
use url::urlutils::{UrlUtils, UrlUtilsWrapper};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::fmt::Write;
|
||||
use url::urlutils::{UrlUtils, UrlUtilsWrapper};
|
||||
use url::{Url, UrlParser, SchemeData};
|
||||
|
||||
#[derive(HeapSizeOf)]
|
||||
pub struct UrlHelper;
|
||||
|
|
|
@ -11,7 +11,6 @@ use dom::bindings::error::Fallible;
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
|
||||
use encoding::types::EncodingRef;
|
||||
use url::form_urlencoded::{parse, serialize_with_encoding};
|
||||
use util::str::DOMString;
|
||||
|
|
|
@ -39,10 +39,9 @@ use dom::event::Event;
|
|||
use dom::htmlelement::HTMLElementTypeId;
|
||||
use dom::node::NodeTypeId;
|
||||
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
|
||||
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
use string_cache::Atom;
|
||||
|
||||
/// Trait to allow DOM nodes to opt-in to overriding (or adding to) common
|
||||
/// behaviours. Replicates the effect of C++ virtual methods.
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult};
|
||||
use dom::bindings::codegen::Bindings::WebGLBufferBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLFramebufferBindingRequest};
|
||||
use dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLFramebufferBindingRequest};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -3,17 +3,15 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLResult, WebGLError};
|
||||
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
use dom::webglrenderingcontext::MAX_UNIFORM_AND_ATTRIBUTE_LEN;
|
||||
use dom::webglshader::WebGLShader;
|
||||
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLResult, WebGLError};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg};
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderbufferBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{WebGLRender
|
|||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
|
||||
use dom::bindings::codegen::InheritTypes::NodeCast;
|
||||
use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
|
||||
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::global::{GlobalRef, GlobalField};
|
||||
use dom::bindings::js::{JS, LayoutJS, Root};
|
||||
|
@ -30,11 +29,10 @@ use ipc_channel::ipc::{self, IpcSender};
|
|||
use js::jsapi::{JSContext, JSObject, RootedValue};
|
||||
use js::jsapi::{JS_GetFloat32ArrayData, JS_GetObjectAsArrayBufferView};
|
||||
use js::jsval::{JSVal, UndefinedValue, NullValue, Int32Value, BooleanValue};
|
||||
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use net_traits::image_cache_task::ImageResponse;
|
||||
|
||||
use offscreen_gl_context::GLContextAttributes;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
@ -43,8 +41,6 @@ use std::sync::mpsc::channel;
|
|||
use util::str::DOMString;
|
||||
use util::vec::byte_swap;
|
||||
|
||||
use offscreen_gl_context::GLContextAttributes;
|
||||
|
||||
pub const MAX_UNIFORM_AND_ATTRIBUTE_LEN: usize = 256;
|
||||
|
||||
macro_rules! handle_potential_webgl_error {
|
||||
|
|
|
@ -3,16 +3,14 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use angle::hl::{BuiltInResources, Output, ShaderValidator};
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLResult, WebGLError, WebGLShaderParameter};
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::codegen::Bindings::WebGLShaderBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
|
||||
use angle::hl::{BuiltInResources, Output, ShaderValidator};
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLResult, WebGLError, WebGLShaderParameter};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -3,14 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult};
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::codegen::Bindings::WebGLTextureBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
use canvas_traits::{CanvasMsg, CanvasWebGLMsg, WebGLError, WebGLResult};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -22,18 +22,20 @@ use dom::closeevent::CloseEvent;
|
|||
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||
use dom::eventtarget::EventTarget;
|
||||
use dom::messageevent::MessageEvent;
|
||||
use script_task::ScriptTaskEventCategory::WebSocketEvent;
|
||||
use script_task::{Runnable, CommonScriptMsg};
|
||||
|
||||
use net_traits::hosts::replace_hosts;
|
||||
use util::str::DOMString;
|
||||
use util::task::spawn_named;
|
||||
|
||||
use hyper::header::Host;
|
||||
use js::jsapi::{JS_NewArrayBuffer, JS_GetArrayBufferData};
|
||||
use js::jsapi::{RootedValue, JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsval::UndefinedValue;
|
||||
use libc::{uint8_t, uint32_t};
|
||||
use net_traits::hosts::replace_hosts;
|
||||
use script_task::ScriptTaskEventCategory::WebSocketEvent;
|
||||
use script_task::{Runnable, CommonScriptMsg};
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ptr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use util::str::DOMString;
|
||||
use util::task::spawn_named;
|
||||
use websocket::Client;
|
||||
use websocket::Message;
|
||||
use websocket::client::receiver::Receiver;
|
||||
|
@ -46,11 +48,6 @@ use websocket::ws::receiver::Receiver as WSReceiver;
|
|||
use websocket::ws::sender::Sender as Sender_Object;
|
||||
use websocket::ws::util::url::parse_url;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ptr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)]
|
||||
enum WebSocketRequestState {
|
||||
Connecting = 0,
|
||||
|
|
|
@ -2,6 +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 devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
|
||||
use dom::bindings::callback::ExceptionHandling;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
|
@ -31,28 +32,6 @@ use dom::node::{window_from_node, TrustedNodeAddress, from_untrusted_node_addres
|
|||
use dom::performance::Performance;
|
||||
use dom::screen::Screen;
|
||||
use dom::storage::Storage;
|
||||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleResponse, ScriptReflow};
|
||||
use layout_interface::{ReflowGoal, ReflowQueryType, LayoutRPC, LayoutChan, Reflow, Msg};
|
||||
use page::Page;
|
||||
use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan};
|
||||
use script_task::{TimerSource, ScriptChan, ScriptPort, MainThreadScriptMsg};
|
||||
use script_traits::ConstellationControlMsg;
|
||||
use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
|
||||
use webdriver_handlers::jsval_to_webdriver;
|
||||
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
|
||||
use msg::compositor_msg::{ScriptToCompositorMsg, LayerId};
|
||||
use msg::constellation_msg::{LoadData, PipelineId, SubpageId, ConstellationChan, WindowSizeData, WorkerId};
|
||||
use msg::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
use net_traits::ResourceTask;
|
||||
use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
|
||||
use net_traits::storage_task::{StorageTask, StorageType};
|
||||
use profile_traits::mem;
|
||||
use string_cache::Atom;
|
||||
use util::geometry::{self, Au, MAX_RECT};
|
||||
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
use util::{breakpoint, opts};
|
||||
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::{Evaluate2, MutableHandleValue};
|
||||
|
@ -60,12 +39,23 @@ use js::jsapi::{JSContext, HandleValue};
|
|||
use js::jsapi::{JS_GC, JS_GetRuntime, JSAutoCompartment, JSAutoRequest};
|
||||
use js::rust::CompileOptionsWrapper;
|
||||
use js::rust::Runtime;
|
||||
use selectors::parser::PseudoElement;
|
||||
use url::Url;
|
||||
|
||||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleResponse, ScriptReflow};
|
||||
use layout_interface::{ReflowGoal, ReflowQueryType, LayoutRPC, LayoutChan, Reflow, Msg};
|
||||
use libc;
|
||||
use msg::compositor_msg::{ScriptToCompositorMsg, LayerId};
|
||||
use msg::constellation_msg::{LoadData, PipelineId, SubpageId, ConstellationChan, WindowSizeData, WorkerId};
|
||||
use msg::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
use net_traits::ResourceTask;
|
||||
use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
|
||||
use net_traits::storage_task::{StorageTask, StorageType};
|
||||
use num::traits::ToPrimitive;
|
||||
use page::Page;
|
||||
use profile_traits::mem;
|
||||
use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD};
|
||||
use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan};
|
||||
use script_task::{TimerSource, ScriptChan, ScriptPort, MainThreadScriptMsg};
|
||||
use script_traits::ConstellationControlMsg;
|
||||
use selectors::parser::PseudoElement;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, Ref, RefCell};
|
||||
|
@ -78,7 +68,14 @@ use std::rc::Rc;
|
|||
use std::sync::Arc;
|
||||
use std::sync::mpsc::TryRecvError::{Empty, Disconnected};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
use string_cache::Atom;
|
||||
use time;
|
||||
use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
|
||||
use url::Url;
|
||||
use util::geometry::{self, Au, MAX_RECT};
|
||||
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
use util::{breakpoint, opts};
|
||||
use webdriver_handlers::jsval_to_webdriver;
|
||||
|
||||
/// Current state of the window object
|
||||
#[derive(JSTraceable, Copy, Clone, Debug, PartialEq, HeapSizeOf)]
|
||||
|
|
|
@ -2,6 +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 devtools_traits::{DevtoolsPageInfo, ScriptToDevtoolsControlMsg};
|
||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
use dom::bindings::codegen::Bindings::WorkerBinding;
|
||||
use dom::bindings::codegen::Bindings::WorkerBinding::WorkerMethods;
|
||||
|
@ -20,19 +21,15 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::eventtarget::EventTarget;
|
||||
use dom::messageevent::MessageEvent;
|
||||
use dom::workerglobalscope::WorkerGlobalScopeInit;
|
||||
|
||||
use devtools_traits::{DevtoolsPageInfo, ScriptToDevtoolsControlMsg};
|
||||
use script_task::{ScriptChan, Runnable};
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use js::jsapi::{JSAutoRequest, JSAutoCompartment};
|
||||
use js::jsapi::{JSContext, HandleValue, RootedValue};
|
||||
use js::jsval::UndefinedValue;
|
||||
use url::UrlParser;
|
||||
use util::str::DOMString;
|
||||
|
||||
use script_task::{ScriptChan, Runnable};
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use url::UrlParser;
|
||||
use util::str::DOMString;
|
||||
|
||||
pub type TrustedWorkerAddress = Trusted<Worker>;
|
||||
|
||||
|
|
|
@ -2,6 +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 devtools_traits::{ScriptToDevtoolsControlMsg, DevtoolScriptControlMsg};
|
||||
use dom::bindings::codegen::Bindings::FunctionBinding::Function;
|
||||
use dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
|
||||
use dom::bindings::codegen::InheritTypes::DedicatedWorkerGlobalScopeCast;
|
||||
|
@ -16,25 +17,20 @@ use dom::eventtarget::EventTarget;
|
|||
use dom::window::{base64_atob, base64_btoa};
|
||||
use dom::workerlocation::WorkerLocation;
|
||||
use dom::workernavigator::WorkerNavigator;
|
||||
use script_task::{CommonScriptMsg, ScriptChan, TimerSource, ScriptPort};
|
||||
use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
|
||||
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, DevtoolScriptControlMsg};
|
||||
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::{load_whole_resource, ResourceTask};
|
||||
use profile_traits::mem;
|
||||
use util::str::DOMString;
|
||||
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::{JSContext, HandleValue, JSAutoRequest};
|
||||
use js::rust::Runtime;
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::{load_whole_resource, ResourceTask};
|
||||
use profile_traits::mem;
|
||||
use script_task::{CommonScriptMsg, ScriptChan, TimerSource, ScriptPort};
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::Receiver;
|
||||
use timers::{IsInterval, TimerId, TimerManager, TimerCallback};
|
||||
use url::{Url, UrlParser};
|
||||
use util::str::DOMString;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum WorkerGlobalScopeTypeId {
|
||||
|
|
|
@ -10,7 +10,6 @@ use dom::bindings::str::USVString;
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::urlhelper::UrlHelper;
|
||||
use dom::workerglobalscope::WorkerGlobalScope;
|
||||
|
||||
use url::Url;
|
||||
use util::str::DOMString;
|
||||
|
||||
|
|
|
@ -2,6 +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 cors::CORSResponse;
|
||||
use cors::{allow_cross_origin_request, CORSRequest, RequestMode, AsyncCORSResponseListener};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding;
|
||||
|
@ -9,6 +11,8 @@ use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMetho
|
|||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType;
|
||||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType::{_empty, Json, Text};
|
||||
use dom::bindings::codegen::InheritTypes::{EventCast, EventTargetCast, XMLHttpRequestDerived};
|
||||
use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams;
|
||||
use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams::{eString, eURLSearchParams};
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::error::Error::{InvalidState, InvalidAccess};
|
||||
use dom::bindings::error::Error::{Network, Syntax, Security, Abort, Timeout};
|
||||
|
@ -26,35 +30,25 @@ use dom::progressevent::ProgressEvent;
|
|||
use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
|
||||
use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTargetTypeId;
|
||||
use dom::xmlhttprequestupload::XMLHttpRequestUpload;
|
||||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_task::ScriptTaskEventCategory::XhrEvent;
|
||||
use script_task::{ScriptChan, Runnable, ScriptPort, CommonScriptMsg};
|
||||
|
||||
use encoding::all::UTF_8;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{DecoderTrap, Encoding, EncodingRef, EncoderTrap};
|
||||
|
||||
use hyper::header::Headers;
|
||||
use hyper::header::{Accept, ContentLength, ContentType, qitem};
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::method::Method;
|
||||
use hyper::mime::{self, Mime};
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::JS_ClearPendingException;
|
||||
use js::jsapi::{JS_ParseJSON, JSContext, RootedValue};
|
||||
use js::jsval::{JSVal, NullValue, UndefinedValue};
|
||||
|
||||
use cors::CORSResponse;
|
||||
use cors::{allow_cross_origin_request, CORSRequest, RequestMode, AsyncCORSResponseListener};
|
||||
use net_traits::ControlMsg::Load;
|
||||
use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata};
|
||||
use net_traits::{ResourceTask, ResourceCORSData, LoadData, LoadConsumer};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
use util::task::spawn_named;
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_task::ScriptTaskEventCategory::XhrEvent;
|
||||
use script_task::{ScriptChan, Runnable, ScriptPort, CommonScriptMsg};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{RefCell, Cell};
|
||||
|
@ -64,9 +58,9 @@ use std::sync::{Mutex, Arc};
|
|||
use std::thread::sleep_ms;
|
||||
use time;
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams;
|
||||
use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams::{eString, eURLSearchParams};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
use util::task::spawn_named;
|
||||
|
||||
pub type SendParam = StringOrURLSearchParams;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue