mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Update rustfmt to the 2024 style edition (#35764)
* Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
6300e820b4
commit
3d320fa96a
603 changed files with 1739 additions and 1648 deletions
|
@ -7,7 +7,7 @@ use js::jsapi::Value;
|
|||
use js::rust::{Handle, HandleObject};
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::AbortControllerBinding::AbortControllerMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
|
|
@ -10,7 +10,7 @@ use dom_struct::dom_struct;
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::AbstractRangeBinding::AbstractRangeMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::NodeBinding::{NodeConstants, NodeMethods};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutDom};
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::node::{Node, ShadowIncluding};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crossbeam_channel::{select, Receiver};
|
||||
use crossbeam_channel::{Receiver, select};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
|
||||
use crate::dom::bindings::conversions::DerivedFrom;
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::mem;
|
|||
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns};
|
||||
use servo_atoms::Atom;
|
||||
use style::attr::{AttrIdentifier, AttrValue};
|
||||
use style::values::GenericAtomIdent;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::bindings::codegen::Bindings::AudioBufferBinding::{
|
|||
};
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::dom::bindings::error::{Error, Fallible};
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::htmlmediaelement::HTMLMediaElement;
|
||||
use crate::dom::mediaelementaudiosourcenode::MediaElementAudioSourceNode;
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{
|
|||
};
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{
|
|||
};
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -9,7 +9,7 @@ use dom_struct::dom_struct;
|
|||
use crate::dom::audiotracklist::AudioTrackList;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::AudioTrackBinding::AudioTrackMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::dom::bindings::cell::DomRefCell;
|
|||
use crate::dom::bindings::codegen::Bindings::AudioTrackListBinding::AudioTrackListMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
|
|
|
@ -16,9 +16,8 @@ use std::sync::Arc;
|
|||
#[cfg(feature = "webgpu")]
|
||||
use js::jsapi::NewExternalArrayBuffer;
|
||||
use js::jsapi::{
|
||||
GetArrayBufferByteLength, Heap, IsDetachedArrayBufferObject, JSObject,
|
||||
JS_GetArrayBufferViewBuffer, JS_GetArrayBufferViewByteLength, JS_IsArrayBufferViewObject,
|
||||
JS_IsTypedArrayObject,
|
||||
GetArrayBufferByteLength, Heap, IsDetachedArrayBufferObject, JS_GetArrayBufferViewBuffer,
|
||||
JS_GetArrayBufferViewByteLength, JS_IsArrayBufferViewObject, JS_IsTypedArrayObject, JSObject,
|
||||
};
|
||||
use js::rust::wrappers::DetachArrayBuffer;
|
||||
use js::rust::{CustomAutoRooterGuard, Handle, MutableHandleObject};
|
||||
|
|
|
@ -16,17 +16,17 @@ use js::jsval::{JSVal, ObjectValue, UndefinedValue};
|
|||
use js::rust::wrappers::{JS_GetProperty, JS_WrapObject};
|
||||
use js::rust::{MutableHandleValue, Runtime};
|
||||
|
||||
use crate::DomTypes;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::Window_Binding::WindowMethods;
|
||||
use crate::dom::bindings::error::{report_pending_exception, Error, Fallible};
|
||||
use crate::dom::bindings::error::{Error, Fallible, report_pending_exception};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::settings_stack::{GenericAutoEntryScript, GenericAutoIncumbentScript};
|
||||
use crate::dom::bindings::utils::AsCCharPtrPtr;
|
||||
use crate::dom::document::DocumentHelpers;
|
||||
use crate::dom::globalscope::GlobalScopeHelpers;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::realms::{InRealm, enter_realm};
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
use crate::DomTypes;
|
||||
|
||||
/// The exception handling used for a call.
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::cell::{BorrowError, BorrowMutError};
|
|||
pub(crate) use std::cell::{Ref, RefCell, RefMut};
|
||||
|
||||
#[cfg(feature = "refcell_backtrace")]
|
||||
pub(crate) use accountable_refcell::{ref_filter_map, Ref, RefCell, RefMut};
|
||||
pub(crate) use accountable_refcell::{Ref, RefCell, RefMut, ref_filter_map};
|
||||
#[cfg(not(feature = "refcell_backtrace"))]
|
||||
pub(crate) use ref_filter_map::ref_filter_map;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use std::ptr;
|
||||
|
||||
use html5ever::interface::QualName;
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName};
|
||||
use html5ever::{LocalName, local_name, namespace_url, ns};
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::glue::{UnwrapObjectDynamic, UnwrapObjectStatic};
|
||||
use js::jsapi::{CallArgs, CurrentGlobalOrNull, JSAutoRealm, JSObject};
|
||||
|
@ -40,7 +40,7 @@ use crate::dom::bindings::codegen::Bindings::{
|
|||
};
|
||||
use crate::dom::bindings::codegen::PrototypeList;
|
||||
use crate::dom::bindings::conversions::DerivedFrom;
|
||||
use crate::dom::bindings::error::{throw_constructor_without_new, throw_dom_exception, Error};
|
||||
use crate::dom::bindings::error::{Error, throw_constructor_without_new, throw_dom_exception};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::interface::get_desired_proto;
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
|
|
|
@ -39,7 +39,7 @@ pub(crate) use js::conversions::{
|
|||
};
|
||||
use js::error::throw_type_error;
|
||||
use js::glue::GetProxyReservedSlot;
|
||||
use js::jsapi::{Heap, IsWindowProxy, JSContext, JSObject, JS_IsExceptionPending};
|
||||
use js::jsapi::{Heap, IsWindowProxy, JS_IsExceptionPending, JSContext, JSObject};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::wrappers::{IsArrayObject, JS_GetProperty, JS_HasProperty};
|
||||
use js::rust::{HandleId, HandleObject, HandleValue, MutableHandleValue};
|
||||
|
|
|
@ -22,7 +22,7 @@ pub(crate) use script_bindings::error::*;
|
|||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name;
|
||||
use crate::dom::bindings::conversions::{
|
||||
root_from_object, ConversionResult, FromJSValConvertible, ToJSValConvertible,
|
||||
ConversionResult, FromJSValConvertible, ToJSValConvertible, root_from_object,
|
||||
};
|
||||
use crate::dom::bindings::str::USVString;
|
||||
use crate::dom::domexception::{DOMErrorName, DOMException};
|
||||
|
|
|
@ -12,7 +12,7 @@ use js::jsapi::JSObject;
|
|||
use js::jsval::UndefinedValue;
|
||||
|
||||
use crate::dom::bindings::utils::finalize_global as do_finalize_global;
|
||||
use crate::dom::bindings::weakref::{WeakBox, WeakReferenceable, DOM_WEAK_SLOT};
|
||||
use crate::dom::bindings::weakref::{DOM_WEAK_SLOT, WeakBox, WeakReferenceable};
|
||||
|
||||
pub(crate) unsafe fn finalize_common<T>(this: *const T) {
|
||||
if !this.is_null() {
|
||||
|
|
|
@ -10,7 +10,7 @@ pub(crate) mod base {
|
|||
pub(crate) use js::error::throw_type_error;
|
||||
pub(crate) use js::jsapi::{
|
||||
CurrentGlobalOrNull, HandleValue as RawHandleValue, HandleValueArray, Heap, IsCallable,
|
||||
JSContext, JSObject, JS_NewObject,
|
||||
JS_NewObject, JSContext, JSObject,
|
||||
};
|
||||
pub(crate) use js::jsval::{JSVal, NullValue, ObjectOrNullValue, ObjectValue, UndefinedValue};
|
||||
pub(crate) use js::panic::maybe_resume_unwind;
|
||||
|
@ -18,8 +18,8 @@ pub(crate) mod base {
|
|||
pub(crate) use js::rust::{HandleObject, HandleValue, MutableHandleObject, MutableHandleValue};
|
||||
|
||||
pub(crate) use crate::dom::bindings::callback::{
|
||||
wrap_call_this_value, CallSetup, CallbackContainer, CallbackFunction, CallbackInterface,
|
||||
CallbackObject, ExceptionHandling, ThisReflector,
|
||||
CallSetup, CallbackContainer, CallbackFunction, CallbackInterface, CallbackObject,
|
||||
ExceptionHandling, ThisReflector, wrap_call_this_value,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{
|
||||
ChannelCountMode, ChannelCountModeValues, ChannelInterpretation,
|
||||
|
@ -28,11 +28,11 @@ pub(crate) mod base {
|
|||
pub(crate) use crate::dom::bindings::codegen::DomTypes::DomTypes;
|
||||
pub(crate) use crate::dom::bindings::codegen::{GenericUnionTypes, UnionTypes};
|
||||
pub(crate) use crate::dom::bindings::conversions::{
|
||||
root_from_handlevalue, ConversionBehavior, ConversionResult, FromJSValConvertible,
|
||||
StringificationBehavior, ToJSValConvertible,
|
||||
ConversionBehavior, ConversionResult, FromJSValConvertible, StringificationBehavior,
|
||||
ToJSValConvertible, root_from_handlevalue,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::error::Error::JSFailed;
|
||||
pub(crate) use crate::dom::bindings::error::{throw_dom_exception, Fallible};
|
||||
pub(crate) use crate::dom::bindings::error::{Fallible, throw_dom_exception};
|
||||
pub(crate) use crate::dom::bindings::num::Finite;
|
||||
pub(crate) use crate::dom::bindings::proxyhandler::CrossOriginProperties;
|
||||
pub(crate) use crate::dom::bindings::reflector::{DomGlobalGeneric, DomObject};
|
||||
|
@ -40,7 +40,7 @@ pub(crate) mod base {
|
|||
pub(crate) use crate::dom::bindings::str::{ByteString, DOMString, USVString};
|
||||
pub(crate) use crate::dom::bindings::trace::RootedTraceableBox;
|
||||
pub(crate) use crate::dom::bindings::utils::{
|
||||
get_dictionary_property, set_dictionary_property, DomHelpers, ThreadUnsafeOnceLock,
|
||||
DomHelpers, ThreadUnsafeOnceLock, get_dictionary_property, set_dictionary_property,
|
||||
};
|
||||
pub(crate) use crate::dom::globalscope::{GlobalScope, GlobalScopeHelpers};
|
||||
pub(crate) use crate::dom::promise::PromiseHelpers;
|
||||
|
@ -58,44 +58,45 @@ pub(crate) mod module {
|
|||
SetProxyReservedSlot,
|
||||
};
|
||||
pub(crate) use js::jsapi::{
|
||||
JSJitInfo_OpType, JSJitInfo__bindgen_ty_1, JSJitInfo__bindgen_ty_2,
|
||||
JSJitInfo__bindgen_ty_3, JSJitMethodCallArgs, JSJitSetterCallArgs, JSNativeWrapper,
|
||||
JSPropertySpec, JSPropertySpec_Accessor, JSPropertySpec_AccessorsOrValue,
|
||||
JSPropertySpec_AccessorsOrValue_Accessors, JSPropertySpec_Kind, JSPropertySpec_Name,
|
||||
JSPropertySpec_ValueWrapper, JSPropertySpec_ValueWrapper_Type,
|
||||
JSPropertySpec_ValueWrapper__bindgen_ty_1, JSTracer, JSTypedMethodJitInfo, JSValueType,
|
||||
JS_AtomizeAndPinString, JS_ForwardGetPropertyTo, JS_GetPropertyDescriptorById,
|
||||
JS_HasPropertyById, JS_NewPlainObject, JS_SetReservedSlot,
|
||||
MutableHandle as RawMutableHandle, MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, PropertyDescriptor, SymbolCode, UndefinedHandleValue,
|
||||
__BindgenBitfieldUnit, jsid, CallArgs, GCContext, GetRealmErrorPrototype,
|
||||
__BindgenBitfieldUnit, CallArgs, GCContext, GetRealmErrorPrototype,
|
||||
GetRealmFunctionPrototype, GetRealmIteratorPrototype, GetRealmObjectPrototype,
|
||||
GetWellKnownSymbol, Handle as RawHandle, HandleId as RawHandleId,
|
||||
HandleObject as RawHandleObject, JSAutoRealm, JSClass, JSClassOps, JSFunctionSpec,
|
||||
JSJitGetterCallArgs, JSJitInfo, JSJitInfo_AliasSet, JSJitInfo_ArgType,
|
||||
JSCLASS_FOREGROUND_FINALIZE, JSCLASS_RESERVED_SLOTS_SHIFT, JSITER_HIDDEN, JSITER_OWNONLY,
|
||||
JSITER_SYMBOLS, JSPROP_ENUMERATE, JSPROP_PERMANENT, JSPROP_READONLY,
|
||||
HandleObject as RawHandleObject, JS_AtomizeAndPinString, JS_ForwardGetPropertyTo,
|
||||
JS_GetPropertyDescriptorById, JS_HasPropertyById, JS_NewPlainObject, JS_SetReservedSlot,
|
||||
JSAutoRealm, JSCLASS_FOREGROUND_FINALIZE, JSCLASS_RESERVED_SLOTS_SHIFT, JSClass,
|
||||
JSClassOps, JSFunctionSpec, JSITER_HIDDEN, JSITER_OWNONLY, JSITER_SYMBOLS,
|
||||
JSJitGetterCallArgs, JSJitInfo, JSJitInfo__bindgen_ty_1, JSJitInfo__bindgen_ty_2,
|
||||
JSJitInfo__bindgen_ty_3, JSJitInfo_AliasSet, JSJitInfo_ArgType, JSJitInfo_OpType,
|
||||
JSJitMethodCallArgs, JSJitSetterCallArgs, JSNativeWrapper, JSPROP_ENUMERATE,
|
||||
JSPROP_PERMANENT, JSPROP_READONLY, JSPropertySpec, JSPropertySpec_Accessor,
|
||||
JSPropertySpec_AccessorsOrValue, JSPropertySpec_AccessorsOrValue_Accessors,
|
||||
JSPropertySpec_Kind, JSPropertySpec_Name, JSPropertySpec_ValueWrapper,
|
||||
JSPropertySpec_ValueWrapper__bindgen_ty_1, JSPropertySpec_ValueWrapper_Type, JSTracer,
|
||||
JSTypedMethodJitInfo, JSValueType, MutableHandle as RawMutableHandle,
|
||||
MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, PropertyDescriptor, SymbolCode, UndefinedHandleValue, jsid,
|
||||
};
|
||||
pub(crate) use js::jsval::PrivateValue;
|
||||
pub(crate) use js::panic::wrap_panic;
|
||||
pub(crate) use js::rust::wrappers::{
|
||||
int_to_jsid, AppendToIdVector, Call, GetPropertyKeys, JS_CopyOwnPropertiesAndPrivateFields,
|
||||
AppendToIdVector, Call, GetPropertyKeys, JS_CopyOwnPropertiesAndPrivateFields,
|
||||
JS_DefineProperty, JS_DefinePropertyById2, JS_GetProperty,
|
||||
JS_InitializePropertiesFromCompatibleNativeObject, JS_NewObjectWithGivenProto,
|
||||
JS_NewObjectWithoutMetadata, JS_SetImmutablePrototype, JS_SetProperty, JS_SetPrototype,
|
||||
JS_WrapObject, NewProxyObject, RUST_INTERNED_STRING_TO_JSID, RUST_SYMBOL_TO_JSID,
|
||||
int_to_jsid,
|
||||
};
|
||||
pub(crate) use js::rust::{
|
||||
get_context_realm, get_object_class, get_object_realm, CustomAutoRooterGuard, GCMethods,
|
||||
Handle, MutableHandle,
|
||||
CustomAutoRooterGuard, GCMethods, Handle, MutableHandle, get_context_realm,
|
||||
get_object_class, get_object_realm,
|
||||
};
|
||||
pub(crate) use js::typedarray::{
|
||||
ArrayBuffer, ArrayBufferView, Float32Array, Float64Array, Uint8Array, Uint8ClampedArray,
|
||||
};
|
||||
pub(crate) use js::{
|
||||
jsapi, typedarray, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL,
|
||||
JSCLASS_RESERVED_SLOTS_MASK, JS_CALLEE,
|
||||
JS_CALLEE, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL,
|
||||
JSCLASS_RESERVED_SLOTS_MASK, jsapi, typedarray,
|
||||
};
|
||||
pub(crate) use script_bindings::constant::{ConstantSpec, ConstantVal};
|
||||
pub(crate) use servo_config::pref;
|
||||
|
@ -115,11 +116,11 @@ pub(crate) mod module {
|
|||
push_new_element_queue,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::conversions::{
|
||||
is_array_like, jsid_to_string, native_from_handlevalue, native_from_object_static,
|
||||
IDLInterface, StringificationBehavior, ToJSValConvertible, DOM_OBJECT_SLOT,
|
||||
DOM_OBJECT_SLOT, IDLInterface, StringificationBehavior, ToJSValConvertible, is_array_like,
|
||||
jsid_to_string, native_from_handlevalue, native_from_object_static,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::error::{
|
||||
throw_constructor_without_new, Error, ErrorResult,
|
||||
Error, ErrorResult, throw_constructor_without_new,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::finalize::{
|
||||
finalize_common, finalize_global, finalize_weak_referenceable,
|
||||
|
@ -127,16 +128,17 @@ pub(crate) mod module {
|
|||
pub(crate) use crate::dom::bindings::guard::{Condition, Guard};
|
||||
pub(crate) use crate::dom::bindings::inheritance::Castable;
|
||||
pub(crate) use crate::dom::bindings::interface::{
|
||||
create_callback_interface_object, create_global_object, create_interface_prototype_object,
|
||||
create_named_constructors, create_noncallback_interface_object, define_dom_interface,
|
||||
define_guarded_methods, define_guarded_properties, get_desired_proto,
|
||||
get_per_interface_object_handle, is_exposed_in, ConstructorClassHook,
|
||||
InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass, ProtoOrIfaceIndex,
|
||||
ConstructorClassHook, InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass,
|
||||
ProtoOrIfaceIndex, create_callback_interface_object, create_global_object,
|
||||
create_interface_prototype_object, create_named_constructors,
|
||||
create_noncallback_interface_object, define_dom_interface, define_guarded_methods,
|
||||
define_guarded_properties, get_desired_proto, get_per_interface_object_handle,
|
||||
is_exposed_in,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::iterable::{Iterable, IteratorType};
|
||||
pub(crate) use crate::dom::bindings::like::{Maplike, Setlike};
|
||||
pub(crate) use crate::dom::bindings::namespace::{
|
||||
create_namespace_object, NamespaceObjectClass,
|
||||
NamespaceObjectClass, create_namespace_object,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::proxyhandler;
|
||||
pub(crate) use crate::dom::bindings::proxyhandler::{
|
||||
|
@ -149,13 +151,13 @@ pub(crate) mod module {
|
|||
pub(crate) use crate::dom::bindings::root::{Dom, DomSlice, MaybeUnreflectedDom, Root};
|
||||
pub(crate) use crate::dom::bindings::trace::JSTraceable;
|
||||
pub(crate) use crate::dom::bindings::utils::{
|
||||
enumerate_global, exception_to_promise, generic_getter, generic_lenient_getter,
|
||||
generic_lenient_setter, generic_method, generic_setter, generic_static_promise_method,
|
||||
get_array_index_from_id, get_property_on_prototype, has_property_on_prototype,
|
||||
resolve_global, trace_global, AsVoidPtr, DOMClass, DOMJSClass, ProtoOrIfaceArray,
|
||||
DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, JSCLASS_DOM_GLOBAL,
|
||||
AsVoidPtr, DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, DOMClass, DOMJSClass, JSCLASS_DOM_GLOBAL,
|
||||
ProtoOrIfaceArray, enumerate_global, exception_to_promise, generic_getter,
|
||||
generic_lenient_getter, generic_lenient_setter, generic_method, generic_setter,
|
||||
generic_static_promise_method, get_array_index_from_id, get_property_on_prototype,
|
||||
has_property_on_prototype, resolve_global, trace_global,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::weakref::{WeakReferenceable, DOM_WEAK_SLOT};
|
||||
pub(crate) use crate::dom::bindings::weakref::{DOM_WEAK_SLOT, WeakReferenceable};
|
||||
pub(crate) use crate::dom::types::{AnalyserNode, AudioNode, BaseAudioContext, EventTarget};
|
||||
pub(crate) use crate::mem::malloc_size_of_including_raw_self;
|
||||
pub(crate) use crate::realms::{AlreadyInRealm, InRealm};
|
||||
|
|
|
@ -12,14 +12,15 @@ use js::error::throw_type_error;
|
|||
use js::glue::UncheckedUnwrapObject;
|
||||
use js::jsapi::JS::CompartmentIterResult;
|
||||
use js::jsapi::{
|
||||
jsid, CallArgs, CheckedUnwrapStatic, Compartment, CompartmentSpecifier, CurrentGlobalOrNull,
|
||||
CallArgs, CheckedUnwrapStatic, Compartment, CompartmentSpecifier, CurrentGlobalOrNull,
|
||||
GetFunctionRealm, GetNonCCWObjectGlobal, GetRealmGlobalOrNull, GetWellKnownSymbol,
|
||||
HandleObject as RawHandleObject, IsSharableCompartment, IsSystemCompartment, JSAutoRealm,
|
||||
JSClass, JSClassOps, JSContext, JSFunctionSpec, JSObject, JSPropertySpec, JSString, JSTracer,
|
||||
HandleObject as RawHandleObject, IsSharableCompartment, IsSystemCompartment,
|
||||
JS_AtomizeAndPinString, JS_GetFunctionObject, JS_GetProperty, JS_IterateCompartments,
|
||||
JS_NewFunction, JS_NewGlobalObject, JS_NewObject, JS_NewPlainObject, JS_NewStringCopyN,
|
||||
JS_SetReservedSlot, JS_WrapObject, ObjectOps, OnNewGlobalHookOption, SymbolCode,
|
||||
TrueHandleValue, Value, JSFUN_CONSTRUCTOR, JSPROP_PERMANENT, JSPROP_READONLY, JSPROP_RESOLVING,
|
||||
JS_SetReservedSlot, JS_WrapObject, JSAutoRealm, JSClass, JSClassOps, JSContext,
|
||||
JSFUN_CONSTRUCTOR, JSFunctionSpec, JSObject, JSPROP_PERMANENT, JSPROP_READONLY,
|
||||
JSPROP_RESOLVING, JSPropertySpec, JSString, JSTracer, ObjectOps, OnNewGlobalHookOption,
|
||||
SymbolCode, TrueHandleValue, Value, jsid,
|
||||
};
|
||||
use js::jsval::{JSVal, NullValue, PrivateValue};
|
||||
use js::rust::wrappers::{
|
||||
|
@ -28,19 +29,19 @@ use js::rust::wrappers::{
|
|||
JS_NewObjectWithGivenProto, RUST_SYMBOL_TO_JSID,
|
||||
};
|
||||
use js::rust::{
|
||||
define_methods, define_properties, get_object_class, is_dom_class, maybe_wrap_object,
|
||||
HandleObject, HandleValue, MutableHandleObject, RealmOptions,
|
||||
HandleObject, HandleValue, MutableHandleObject, RealmOptions, define_methods,
|
||||
define_properties, get_object_class, is_dom_class, maybe_wrap_object,
|
||||
};
|
||||
use script_bindings::constant::{define_constants, ConstantSpec};
|
||||
use script_bindings::constant::{ConstantSpec, define_constants};
|
||||
use servo_url::MutableOrigin;
|
||||
|
||||
use crate::dom::bindings::codegen::InterfaceObjectMap::Globals;
|
||||
use crate::dom::bindings::codegen::PrototypeList;
|
||||
use crate::dom::bindings::conversions::{get_dom_class, DOM_OBJECT_SLOT};
|
||||
use crate::dom::bindings::conversions::{DOM_OBJECT_SLOT, get_dom_class};
|
||||
use crate::dom::bindings::guard::Guard;
|
||||
use crate::dom::bindings::principals::ServoJSPrincipals;
|
||||
use crate::dom::bindings::utils::{
|
||||
get_proto_or_iface_array, DOMJSClass, ProtoOrIfaceArray, DOM_PROTOTYPE_SLOT, JSCLASS_DOM_GLOBAL,
|
||||
DOM_PROTOTYPE_SLOT, DOMJSClass, JSCLASS_DOM_GLOBAL, ProtoOrIfaceArray, get_proto_or_iface_array,
|
||||
};
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
|
||||
|
|
|
@ -20,17 +20,17 @@ use script_bindings::conversions::IDLInterface;
|
|||
pub(crate) use script_bindings::iterable::*;
|
||||
use script_bindings::utils::DOMClass;
|
||||
|
||||
use crate::DomTypes;
|
||||
use crate::dom::bindings::codegen::Bindings::IterableIteratorBinding::{
|
||||
IterableKeyAndValueResult, IterableKeyOrValueResult,
|
||||
};
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{
|
||||
reflect_dom_object, DomGlobalGeneric, DomObjectIteratorWrap, DomObjectWrap, Reflector,
|
||||
DomGlobalGeneric, DomObjectIteratorWrap, DomObjectWrap, Reflector, reflect_dom_object,
|
||||
};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, Root};
|
||||
use crate::dom::bindings::trace::{JSTraceable, NoTrace, RootedTraceableBox};
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
use crate::DomTypes;
|
||||
|
||||
/// An iterator over the iterable entries of a given DOM interface.
|
||||
#[dom_struct]
|
||||
|
@ -52,14 +52,14 @@ impl<D: DomTypes, T: DomObjectIteratorWrap<D> + JSTraceable + Iterable> Iterable
|
|||
}
|
||||
|
||||
impl<
|
||||
D: DomTypes,
|
||||
T: DomObjectIteratorWrap<D>
|
||||
+ JSTraceable
|
||||
+ Iterable
|
||||
+ DomGlobalGeneric<D>
|
||||
+ IDLInterface
|
||||
+ IteratorDerives,
|
||||
> IDLInterface for IterableIterator<D, T>
|
||||
D: DomTypes,
|
||||
T: DomObjectIteratorWrap<D>
|
||||
+ JSTraceable
|
||||
+ Iterable
|
||||
+ DomGlobalGeneric<D>
|
||||
+ IDLInterface
|
||||
+ IteratorDerives,
|
||||
> IDLInterface for IterableIterator<D, T>
|
||||
{
|
||||
fn derives(class: &'static DOMClass) -> bool {
|
||||
<T as IteratorDerives>::derives(class)
|
||||
|
|
|
@ -12,8 +12,8 @@ use js::glue::{
|
|||
JSPrincipalsCallbacks,
|
||||
};
|
||||
use js::jsapi::{
|
||||
JSContext, JSPrincipals, JSStructuredCloneReader, JSStructuredCloneWriter, JS_DropPrincipals,
|
||||
JS_HoldPrincipals, JS_ReadUint32Pair,
|
||||
JS_DropPrincipals, JS_HoldPrincipals, JS_ReadUint32Pair, JSContext, JSPrincipals,
|
||||
JSStructuredCloneReader, JSStructuredCloneWriter,
|
||||
};
|
||||
use js::rust::Runtime;
|
||||
use servo_url::MutableOrigin;
|
||||
|
@ -111,7 +111,7 @@ impl ServoJSPrincipalsRef<'_> {
|
|||
impl Clone for ServoJSPrincipalsRef<'_> {
|
||||
#[inline]
|
||||
fn clone(&self) -> Self {
|
||||
Self(ManuallyDrop::new(ServoJSPrincipals(self.0 .0)), PhantomData)
|
||||
Self(ManuallyDrop::new(ServoJSPrincipals(self.0.0)), PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,27 +17,27 @@ use js::glue::{
|
|||
};
|
||||
use js::jsapi;
|
||||
use js::jsapi::{
|
||||
jsid, DOMProxyShadowsResult, GetObjectRealmOrNull, GetRealmPrincipals, GetStaticPrototype,
|
||||
DOMProxyShadowsResult, GetObjectRealmOrNull, GetRealmPrincipals, GetStaticPrototype,
|
||||
GetWellKnownSymbol, Handle as RawHandle, HandleId as RawHandleId,
|
||||
HandleObject as RawHandleObject, HandleValue as RawHandleValue, JSAutoRealm, JSContext,
|
||||
JSErrNum, JSFunctionSpec, JSObject, JSPropertySpec, JS_AtomizeAndPinString,
|
||||
JS_DefinePropertyById, JS_GetOwnPropertyDescriptorById, JS_IsExceptionPending,
|
||||
HandleObject as RawHandleObject, HandleValue as RawHandleValue, JS_AtomizeAndPinString,
|
||||
JS_DefinePropertyById, JS_GetOwnPropertyDescriptorById, JS_IsExceptionPending, JSAutoRealm,
|
||||
JSContext, JSErrNum, JSFunctionSpec, JSObject, JSPropertySpec,
|
||||
MutableHandle as RawMutableHandle, MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, PropertyDescriptor, SetDOMProxyInformation, SymbolCode,
|
||||
ObjectOpResult, PropertyDescriptor, SetDOMProxyInformation, SymbolCode, jsid,
|
||||
};
|
||||
use js::jsid::SymbolId;
|
||||
use js::jsval::{ObjectValue, UndefinedValue};
|
||||
use js::rust::wrappers::{
|
||||
AppendToIdVector, JS_AlreadyHasOwnPropertyById, JS_NewObjectWithGivenProto,
|
||||
SetDataPropertyDescriptor, RUST_INTERNED_STRING_TO_JSID,
|
||||
RUST_INTERNED_STRING_TO_JSID, SetDataPropertyDescriptor,
|
||||
};
|
||||
use js::rust::{
|
||||
get_context_realm, Handle, HandleObject, HandleValue, MutableHandle, MutableHandleObject,
|
||||
Handle, HandleObject, HandleValue, MutableHandle, MutableHandleObject, get_context_realm,
|
||||
};
|
||||
|
||||
use crate::dom::bindings::conversions::{is_dom_proxy, jsid_to_string, jsstring_to_str};
|
||||
use crate::dom::bindings::error::{throw_dom_exception, Error};
|
||||
use crate::dom::bindings::error::{Error, throw_dom_exception};
|
||||
use crate::dom::bindings::principals::ServoJSPrincipalsRef;
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
|
|
@ -13,8 +13,8 @@ use indexmap::IndexMap;
|
|||
use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
|
||||
use js::jsapi::glue::JS_GetOwnPropertyDescriptorById;
|
||||
use js::jsapi::{
|
||||
HandleId as RawHandleId, JSContext, JS_NewPlainObject, PropertyDescriptor, JSITER_HIDDEN,
|
||||
JSITER_OWNONLY, JSITER_SYMBOLS, JSPROP_ENUMERATE,
|
||||
HandleId as RawHandleId, JS_NewPlainObject, JSContext, JSITER_HIDDEN, JSITER_OWNONLY,
|
||||
JSITER_SYMBOLS, JSPROP_ENUMERATE, PropertyDescriptor,
|
||||
};
|
||||
use js::jsval::{ObjectValue, UndefinedValue};
|
||||
use js::rust::wrappers::{GetPropertyKeys, JS_DefineUCProperty2, JS_GetPropertyById, JS_IdToValue};
|
||||
|
@ -145,7 +145,7 @@ where
|
|||
let key = match K::from_id(cx, id.handle())? {
|
||||
ConversionResult::Success(key) => key,
|
||||
ConversionResult::Failure(message) => {
|
||||
return Ok(ConversionResult::Failure(message))
|
||||
return Ok(ConversionResult::Failure(message));
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -157,7 +157,7 @@ where
|
|||
let property = match V::from_jsval(cx, property.handle(), config.clone())? {
|
||||
ConversionResult::Success(property) => property,
|
||||
ConversionResult::Failure(message) => {
|
||||
return Ok(ConversionResult::Failure(message))
|
||||
return Ok(ConversionResult::Failure(message));
|
||||
},
|
||||
};
|
||||
map.insert(key, property);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
use js::rust::HandleObject;
|
||||
|
||||
use crate::DomTypes;
|
||||
use crate::dom::bindings::conversions::DerivedFrom;
|
||||
use crate::dom::bindings::iterable::{Iterable, IterableIterator};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, Root};
|
||||
|
@ -13,7 +14,6 @@ use crate::dom::bindings::trace::JSTraceable;
|
|||
use crate::dom::globalscope::{GlobalScope, GlobalScopeHelpers};
|
||||
use crate::realms::AlreadyInRealm;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
use crate::DomTypes;
|
||||
|
||||
/// Create the reflector for a new DOM object and yield ownership to the
|
||||
/// reflector.
|
||||
|
|
|
@ -9,12 +9,12 @@ use std::thread;
|
|||
use js::jsapi::{GetScriptedCallerGlobal, HideScriptedCaller, JSTracer, UnhideScriptedCaller};
|
||||
use js::rust::Runtime;
|
||||
|
||||
use crate::DomTypes;
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::trace::JSTraceable;
|
||||
use crate::dom::bindings::utils::DomHelpers;
|
||||
use crate::dom::globalscope::{GlobalScope, GlobalScopeHelpers};
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::DomTypes;
|
||||
|
||||
thread_local!(pub(super) static STACK: RefCell<Vec<StackEntry<crate::DomTypeHolder>>> = const {
|
||||
RefCell::new(Vec::new())
|
||||
|
|
|
@ -420,13 +420,8 @@ impl FromInputValueString for &str {
|
|||
Done,
|
||||
Error,
|
||||
}
|
||||
let next_state = |valid: bool, next: State| -> State {
|
||||
if valid {
|
||||
next
|
||||
} else {
|
||||
State::Error
|
||||
}
|
||||
};
|
||||
let next_state =
|
||||
|valid: bool, next: State| -> State { if valid { next } else { State::Error } };
|
||||
|
||||
let state = self.chars().fold(State::HourHigh, |state, c| {
|
||||
match state {
|
||||
|
|
|
@ -14,20 +14,19 @@ use js::glue::{
|
|||
NewJSAutoStructuredCloneBuffer, WriteBytesToJSStructuredCloneData,
|
||||
};
|
||||
use js::jsapi::{
|
||||
CloneDataPolicy, HandleObject as RawHandleObject, JSContext, JSObject,
|
||||
CloneDataPolicy, HandleObject as RawHandleObject, JS_ClearPendingException, JS_ReadUint32Pair,
|
||||
JS_STRUCTURED_CLONE_VERSION, JS_WriteUint32Pair, JSContext, JSObject,
|
||||
JSStructuredCloneCallbacks, JSStructuredCloneReader, JSStructuredCloneWriter,
|
||||
JS_ClearPendingException, JS_ReadUint32Pair, JS_WriteUint32Pair,
|
||||
MutableHandleObject as RawMutableHandleObject, StructuredCloneScope, TransferableOwnership,
|
||||
JS_STRUCTURED_CLONE_VERSION,
|
||||
};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::wrappers::{JS_ReadStructuredClone, JS_WriteStructuredClone};
|
||||
use js::rust::{CustomAutoRooterGuard, HandleValue, MutableHandleValue};
|
||||
use script_traits::StructuredSerializedData;
|
||||
use script_traits::serializable::BlobImpl;
|
||||
use script_traits::transferable::MessagePortImpl;
|
||||
use script_traits::StructuredSerializedData;
|
||||
|
||||
use crate::dom::bindings::conversions::{root_from_object, ToJSValConvertible};
|
||||
use crate::dom::bindings::conversions::{ToJSValConvertible, root_from_object};
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
|
@ -36,7 +35,7 @@ use crate::dom::bindings::transferable::Transferable;
|
|||
use crate::dom::blob::Blob;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::messageport::MessagePort;
|
||||
use crate::realms::{enter_realm, AlreadyInRealm, InRealm};
|
||||
use crate::realms::{AlreadyInRealm, InRealm, enter_realm};
|
||||
use crate::script_runtime::{CanGc, JSContext as SafeJSContext};
|
||||
|
||||
// TODO: Should we add Min and Max const to https://github.com/servo/rust-mozjs/blob/master/src/consts.rs?
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
//! `JSTraceable` to a datatype.
|
||||
|
||||
use std::cell::OnceCell;
|
||||
use std::collections::hash_map::RandomState;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::RandomState;
|
||||
use std::fmt::Display;
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use std::mem;
|
||||
|
@ -53,9 +53,9 @@ use servo_arc::Arc as ServoArc;
|
|||
use smallvec::SmallVec;
|
||||
use style::author_styles::AuthorStyles;
|
||||
use style::stylesheet_set::{AuthorStylesheetSet, DocumentStylesheetSet};
|
||||
use tendril::TendrilSink;
|
||||
use tendril::fmt::UTF8;
|
||||
use tendril::stream::LossyDecoder;
|
||||
use tendril::TendrilSink;
|
||||
#[cfg(feature = "webxr")]
|
||||
use webxr_api::{Finger, Hand};
|
||||
|
||||
|
|
|
@ -12,19 +12,21 @@ use std::sync::OnceLock;
|
|||
use std::thread::LocalKey;
|
||||
use std::{ptr, slice, str};
|
||||
|
||||
use js::JS_CALLEE;
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::glue::{
|
||||
CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper, JS_GetReservedSlot,
|
||||
UnwrapObjectDynamic, UnwrapObjectStatic, RUST_FUNCTION_VALUE_TO_JITINFO,
|
||||
RUST_FUNCTION_VALUE_TO_JITINFO, UnwrapObjectDynamic, UnwrapObjectStatic,
|
||||
};
|
||||
use js::jsapi::{
|
||||
AtomToLinearString, CallArgs, DOMCallbacks, ExceptionStackBehavior, GetLinearStringCharAt,
|
||||
GetLinearStringLength, GetNonCCWObjectGlobal, HandleId as RawHandleId,
|
||||
HandleObject as RawHandleObject, Heap, JSAtom, JSContext, JSJitInfo, JSObject, JSTracer,
|
||||
JS_ClearPendingException, JS_DeprecatedStringHasLatin1Chars, JS_EnumerateStandardClasses,
|
||||
JS_FreezeObject, JS_GetLatin1StringCharsAndLength, JS_IsExceptionPending, JS_IsGlobalObject,
|
||||
JS_ResolveStandardClass, MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleValue as RawMutableHandleValue, ObjectOpResult, StringIsArrayIndex,
|
||||
HandleObject as RawHandleObject, Heap, JS_ClearPendingException,
|
||||
JS_DeprecatedStringHasLatin1Chars, JS_EnumerateStandardClasses, JS_FreezeObject,
|
||||
JS_GetLatin1StringCharsAndLength, JS_IsExceptionPending, JS_IsGlobalObject,
|
||||
JS_ResolveStandardClass, JSAtom, JSContext, JSJitInfo, JSObject, JSTracer,
|
||||
MutableHandleIdVector as RawMutableHandleIdVector, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, StringIsArrayIndex,
|
||||
};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
use js::rust::wrappers::{
|
||||
|
@ -33,25 +35,24 @@ use js::rust::wrappers::{
|
|||
JS_SetPendingException, JS_SetProperty,
|
||||
};
|
||||
use js::rust::{
|
||||
get_object_class, is_dom_class, GCMethods, Handle, HandleId, HandleObject, HandleValue,
|
||||
MutableHandleValue, ToString,
|
||||
GCMethods, Handle, HandleId, HandleObject, HandleValue, MutableHandleValue, ToString,
|
||||
get_object_class, is_dom_class,
|
||||
};
|
||||
use js::JS_CALLEE;
|
||||
|
||||
use crate::DomTypes;
|
||||
use crate::dom::bindings::codegen::InterfaceObjectMap;
|
||||
use crate::dom::bindings::codegen::PrototypeList::{self, PROTO_OR_IFACE_LENGTH};
|
||||
use crate::dom::bindings::constructor::call_html_constructor;
|
||||
use crate::dom::bindings::conversions::{
|
||||
jsstring_to_str, private_from_proto_check, DerivedFrom, PrototypeCheck,
|
||||
DerivedFrom, PrototypeCheck, jsstring_to_str, private_from_proto_check,
|
||||
};
|
||||
use crate::dom::bindings::error::{throw_dom_exception, throw_invalid_this, Error};
|
||||
use crate::dom::bindings::error::{Error, throw_dom_exception, throw_invalid_this};
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::dom::bindings::settings_stack::{self, StackEntry};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::trace::trace_object;
|
||||
use crate::dom::windowproxy::WindowProxyHandler;
|
||||
use crate::script_runtime::{CanGc, JSContext as SafeJSContext};
|
||||
use crate::DomTypes;
|
||||
|
||||
/// A OnceLock wrapping a type that is not considered threadsafe by the Rust compiler, but
|
||||
/// will be used in a threadsafe manner (it will not be mutated, after being initialized).
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! Functions for validating and extracting qualified XML names.
|
||||
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns};
|
||||
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
|
|
@ -17,13 +17,13 @@ use net_traits::filemanager_thread::RelativePos;
|
|||
use script_traits::serializable::BlobImpl;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::body::{run_array_buffer_data_algorithm, FetchedData};
|
||||
use crate::body::{FetchedData, run_array_buffer_data_algorithm};
|
||||
use crate::dom::bindings::buffer_source::create_buffer_source;
|
||||
use crate::dom::bindings::codegen::Bindings::BlobBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::serializable::{Serializable, StorageKey};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::BluetoothCharacteristicPropertiesMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -20,10 +20,10 @@ use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDe
|
|||
use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bluetooth::{response_async, AsyncBluetoothListener, Bluetooth};
|
||||
use crate::dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
|
||||
use crate::dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
|
||||
use crate::dom::bluetoothremotegattcharacteristic::BluetoothRemoteGATTCharacteristic;
|
||||
use crate::dom::bluetoothremotegattdescriptor::BluetoothRemoteGATTDescriptor;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{
|
|||
};
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::Window_Binding::WindowMethods;
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bluetooth::{AllowedBluetoothDevice, AsyncBluetoothListener, Bluetooth};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse, GATTType};
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
|
@ -19,10 +19,10 @@ use crate::dom::bindings::error::Error::{
|
|||
self, InvalidModification, Network, NotSupported, Security,
|
||||
};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::{ByteString, DOMString};
|
||||
use crate::dom::bluetooth::{get_gatt_children, response_async, AsyncBluetoothListener};
|
||||
use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
|
||||
use crate::dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
|
||||
use crate::dom::bluetoothremotegattservice::BluetoothRemoteGATTService;
|
||||
use crate::dom::bluetoothuuid::{BluetoothDescriptorUUID, BluetoothUUID};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
use bluetooth_traits::blocklist::{uuid_is_blocklisted, Blocklist};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
|
@ -16,10 +16,10 @@ use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::B
|
|||
use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
|
||||
use crate::dom::bindings::error::Error::{self, InvalidModification, Network, Security};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::{ByteString, DOMString};
|
||||
use crate::dom::bluetooth::{response_async, AsyncBluetoothListener};
|
||||
use crate::dom::bluetooth::{AsyncBluetoothListener, response_async};
|
||||
use crate::dom::bluetoothremotegattcharacteristic::{
|
||||
BluetoothRemoteGATTCharacteristic, MAXIMUM_ATTRIBUTE_LENGTH,
|
||||
};
|
||||
|
|
|
@ -12,9 +12,9 @@ use ipc_channel::ipc::IpcSender;
|
|||
use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bluetooth::{get_gatt_children, response_async, AsyncBluetoothListener};
|
||||
use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
|
||||
use crate::dom::bluetoothdevice::BluetoothDevice;
|
||||
use crate::dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::bindings::error::Error;
|
|||
use crate::dom::bindings::reflector::reflect_dom_object;
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bluetooth::{get_gatt_children, AsyncBluetoothListener};
|
||||
use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children};
|
||||
use crate::dom::bluetoothdevice::BluetoothDevice;
|
||||
use crate::dom::bluetoothuuid::{BluetoothCharacteristicUUID, BluetoothServiceUUID, BluetoothUUID};
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
|
|
|
@ -573,12 +573,10 @@ const VALID_UUID_REGEX: &str = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}
|
|||
const UUID_ERROR_MESSAGE: &str = "It must be a valid UUID alias (e.g. 0x1234), \
|
||||
UUID (lowercase hex characters e.g. '00001234-0000-1000-8000-00805f9b34fb'),\nor recognized standard name from";
|
||||
// https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp?l=321
|
||||
const SERVICES_ERROR_MESSAGE: &str =
|
||||
"https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx\
|
||||
const SERVICES_ERROR_MESSAGE: &str = "https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx\
|
||||
\ne.g. 'alert_notification'.";
|
||||
// https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp?l=327
|
||||
const CHARACTERISTIC_ERROR_MESSAGE: &str =
|
||||
"https://developer.bluetooth.org/gatt/characteristics/Pages/\
|
||||
const CHARACTERISTIC_ERROR_MESSAGE: &str = "https://developer.bluetooth.org/gatt/characteristics/Pages/\
|
||||
CharacteristicsHome.aspx\ne.g. 'aerobic_heart_rate_lower_limit'.";
|
||||
// https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp?l=333
|
||||
const DESCRIPTOR_ERROR_MESSAGE: &str = "https://developer.bluetooth.org/gatt/descriptors/Pages/\
|
||||
|
|
|
@ -10,7 +10,7 @@ use profile_traits::ipc;
|
|||
use crate::conversions::Convert;
|
||||
use crate::dom::bindings::codegen::Bindings::TestRunnerBinding::TestRunnerMethods;
|
||||
use crate::dom::bindings::error::ErrorResult;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -11,7 +11,7 @@ use uuid::Uuid;
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::BroadcastChannelMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::structuredclone;
|
||||
|
|
|
@ -15,7 +15,7 @@ use super::bindings::codegen::Bindings::QueuingStrategyBinding::{
|
|||
ByteLengthQueuingStrategyMethods, QueuingStrategyInit,
|
||||
};
|
||||
use super::bindings::error::Fallible;
|
||||
use super::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use super::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use super::bindings::root::DomRoot;
|
||||
use super::types::GlobalScope;
|
||||
use crate::dom::bindings::import::module::get_dictionary_property;
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::bindings::cell::DomRefCell;
|
|||
use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasGradientMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -6,7 +6,7 @@ use canvas_traits::canvas::{FillOrStrokeStyle, RepetitionStyle, SurfaceStyle};
|
|||
use dom_struct::dom_struct;
|
||||
use euclid::default::Size2D;
|
||||
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::canvasgradient::ToFillOrStrokeStyle;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::dom::bindings::codegen::UnionTypes::{
|
|||
};
|
||||
use crate::dom::bindings::error::{ErrorResult, Fallible};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, LayoutDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::canvasgradient::CanvasGradient;
|
||||
|
|
|
@ -9,7 +9,7 @@ use servo_url::ServoUrl;
|
|||
use uuid::Uuid;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, FrameType};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::serviceworker::ServiceWorker;
|
||||
|
|
|
@ -17,7 +17,7 @@ use js::rust::wrappers::{
|
|||
JS_IdToValue, JS_Stringify, JS_ValueToSource,
|
||||
};
|
||||
use js::rust::{
|
||||
describe_scripted_caller, CapturedJSStack, HandleObject, HandleValue, IdVector, ToString,
|
||||
CapturedJSStack, HandleObject, HandleValue, IdVector, ToString, describe_scripted_caller,
|
||||
};
|
||||
use script_bindings::conversions::get_dom_class;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use super::bindings::codegen::Bindings::QueuingStrategyBinding::{
|
|||
CountQueuingStrategyMethods, QueuingStrategy, QueuingStrategyInit, QueuingStrategySize,
|
||||
};
|
||||
use super::bindings::error::{Error, Fallible};
|
||||
use super::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use super::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use super::bindings::root::DomRoot;
|
||||
use super::types::GlobalScope;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix, QualName};
|
||||
use html5ever::{LocalName, Prefix, QualName, local_name, namespace_url, ns};
|
||||
use js::rust::HandleObject;
|
||||
use servo_config::pref;
|
||||
|
||||
|
@ -10,7 +10,7 @@ use crate::dom::bindings::error::{report_pending_exception, throw_dom_exception}
|
|||
use crate::dom::bindings::reflector::DomGlobal;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::customelementregistry::{
|
||||
is_valid_custom_element_name, upgrade_element, CustomElementState,
|
||||
CustomElementState, is_valid_custom_element_name, upgrade_element,
|
||||
};
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::element::{CustomElementCreationMode, Element, ElementCreator};
|
||||
|
@ -86,7 +86,7 @@ use crate::dom::htmlunknownelement::HTMLUnknownElement;
|
|||
use crate::dom::htmlvideoelement::HTMLVideoElement;
|
||||
use crate::dom::svgelement::SVGElement;
|
||||
use crate::dom::svgsvgelement::SVGSVGElement;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::realms::{InRealm, enter_realm};
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::script_thread::ScriptThread;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use uuid::Uuid;
|
|||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::CryptoBinding::CryptoMethods;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -12,7 +12,7 @@ use js::rust::HandleObject;
|
|||
use crate::dom::bindings::codegen::Bindings::CryptoKeyBinding::{
|
||||
CryptoKeyMethods, KeyType, KeyUsage,
|
||||
};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::{serialize_identifier, Parser, ParserInput};
|
||||
use cssparser::{Parser, ParserInput, serialize_identifier};
|
||||
use dom_struct::dom_struct;
|
||||
use style::context::QuirksMode;
|
||||
use style::parser::ParserContext;
|
||||
use style::stylesheets::supports_rule::{parse_condition_or_declaration, Declaration};
|
||||
use style::stylesheets::supports_rule::{Declaration, parse_condition_or_declaration};
|
||||
use style::stylesheets::{CssRuleType, Origin, UrlExtraData};
|
||||
use style_traits::ParsingMode;
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylesheets::keyframes_rule::Keyframe;
|
||||
use style::stylesheets::CssRuleType;
|
||||
use style::stylesheets::keyframes_rule::Keyframe;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::CSSKeyframeRuleMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
|
|
|
@ -6,14 +6,14 @@ use cssparser::{Parser, ParserInput};
|
|||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylesheets::keyframes_rule::{Keyframe, KeyframeSelector, KeyframesRule};
|
||||
use style::stylesheets::CssRuleType;
|
||||
use style::stylesheets::keyframes_rule::{Keyframe, KeyframeSelector, KeyframesRule};
|
||||
use style::values::KeyframesName;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods;
|
||||
use crate::dom::bindings::error::ErrorResult;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::csskeyframerule::CSSKeyframeRule;
|
||||
|
|
|
@ -9,7 +9,7 @@ use style::stylesheets::{CssRuleType, MediaRule};
|
|||
use style_traits::ToCss;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssconditionrule::CSSConditionRule;
|
||||
|
|
|
@ -159,11 +159,7 @@ impl CSSRuleMethods<crate::DomTypeHolder> for CSSRule {
|
|||
let rule_type = self.as_specific().ty() as u16;
|
||||
// Per https://drafts.csswg.org/cssom/#dom-cssrule-type for constants > 15
|
||||
// we return 0.
|
||||
if rule_type > 15 {
|
||||
0
|
||||
} else {
|
||||
rule_type
|
||||
}
|
||||
if rule_type > 15 { 0 } else { rule_type }
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-cssrule-parentstylesheet
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::conversions::Convert;
|
|||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::csskeyframerule::CSSKeyframeRule;
|
||||
use crate::dom::cssrule::CSSRule;
|
||||
|
|
|
@ -11,8 +11,8 @@ use servo_arc::Arc;
|
|||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
use style::properties::{
|
||||
parse_one_declaration_into, parse_style_attribute, Importance, LonghandId,
|
||||
PropertyDeclarationBlock, PropertyId, ShorthandId, SourcePropertyDeclaration,
|
||||
Importance, LonghandId, PropertyDeclarationBlock, PropertyId, ShorthandId,
|
||||
SourcePropertyDeclaration, parse_one_declaration_into, parse_style_attribute,
|
||||
};
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style::shared_lock::Locked;
|
||||
|
@ -23,7 +23,7 @@ use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyl
|
|||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssrule::CSSRule;
|
||||
|
|
|
@ -14,7 +14,7 @@ use style::stylesheets::{CssRuleType, Origin, StyleRule};
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::CSSStyleRuleMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
|
|
|
@ -11,7 +11,7 @@ use style::stylesheets::{CssRuleTypes, Stylesheet as StyleStyleSheet};
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
|
|
|
@ -7,7 +7,7 @@ use dom_struct::dom_struct;
|
|||
use servo_url::ServoUrl;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::rc::Rc;
|
|||
use std::{mem, ptr};
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns};
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::glue::UnwrapObjectStatic;
|
||||
use js::jsapi::{HandleValueArray, Heap, IsCallable, IsConstructor, JSAutoRealm, JSObject};
|
||||
|
@ -30,10 +30,10 @@ use crate::dom::bindings::conversions::{
|
|||
ConversionResult, FromJSValConvertible, StringificationBehavior,
|
||||
};
|
||||
use crate::dom::bindings::error::{
|
||||
report_pending_exception, throw_dom_exception, Error, ErrorResult, Fallible,
|
||||
Error, ErrorResult, Fallible, report_pending_exception, throw_dom_exception,
|
||||
};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, DomObject, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, DomObject, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::settings_stack::is_execution_stack_empty;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
@ -47,7 +47,7 @@ use crate::dom::node::{Node, NodeTraits, ShadowIncluding};
|
|||
use crate::dom::promise::Promise;
|
||||
use crate::dom::window::Window;
|
||||
use crate::microtask::Microtask;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::realms::{InRealm, enter_realm};
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
use crate::script_thread::ScriptThread;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use js::rust::{HandleObject, MutableHandleValue};
|
|||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::DataTransferBinding::DataTransferMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::datatransferitemlist::DataTransferItemList;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::bindings::codegen::Bindings::DataTransferItemBinding::{
|
|||
DataTransferItemMethods, FunctionStringCallback,
|
||||
};
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::file::File;
|
||||
|
|
|
@ -11,7 +11,7 @@ use js::rust::MutableHandleValue;
|
|||
use crate::dom::bindings::codegen::Bindings::DataTransferItemListBinding::DataTransferItemListMethods;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::frozenarray::CachedFrozenArray;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::datatransferitem::DataTransferItem;
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::thread::{self, JoinHandle};
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId, WebViewId};
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use crossbeam_channel::{Receiver, Sender, unbounded};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc::IpcReceiver;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::{Heap, JSContext, JSObject, JS_AddInterruptCallback};
|
||||
use js::jsapi::{Heap, JS_AddInterruptCallback, JSContext, JSObject};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::{CustomAutoRooter, CustomAutoRooterGuard, HandleValue};
|
||||
use net_traits::IpcSend;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::request::{
|
||||
CredentialsMode, Destination, InsecureRequestsPolicy, ParserMetadata, Referrer, RequestBuilder,
|
||||
RequestMode,
|
||||
};
|
||||
use net_traits::IpcSend;
|
||||
use script_traits::{WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
||||
use servo_rand::random;
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
|
@ -28,7 +28,7 @@ use style::thread_state::{self, ThreadState};
|
|||
|
||||
use crate::devtools;
|
||||
use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
|
||||
use crate::dom::abstractworkerglobalscope::{run_worker_event_loop, WorkerEventLoopMethods};
|
||||
use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods;
|
||||
|
@ -52,7 +52,7 @@ use crate::dom::worker::{TrustedWorkerAddress, Worker};
|
|||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::fetch::load_whole_resource;
|
||||
use crate::messaging::{CommonScriptMsg, ScriptEventLoopReceiver, ScriptEventLoopSender};
|
||||
use crate::realms::{enter_realm, AlreadyInRealm, InRealm};
|
||||
use crate::realms::{AlreadyInRealm, InRealm, enter_realm};
|
||||
use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
|
||||
use crate::script_runtime::{CanGc, JSContext as SafeJSContext, Runtime, ThreadSafeJSContext};
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
|
|
|
@ -13,7 +13,7 @@ use js::rust::HandleValue as SafeHandleValue;
|
|||
use super::bindings::root::{DomRoot, MutNullableDom};
|
||||
use super::types::{ReadableStream, ReadableStreamDefaultReader};
|
||||
use crate::dom::bindings::import::module::Error;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::Dom;
|
||||
use crate::dom::defaultteereadrequest::DefaultTeeReadRequest;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -6,7 +6,7 @@ use dom_struct::dom_struct;
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding::DissimilarOriginLocationMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
|
||||
|
|
|
@ -31,7 +31,7 @@ use embedder_traits::{
|
|||
};
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Namespace, QualName};
|
||||
use html5ever::{LocalName, Namespace, QualName, local_name, namespace_url, ns};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc;
|
||||
use js::rust::{HandleObject, HandleValue};
|
||||
|
@ -41,12 +41,12 @@ use metrics::{
|
|||
ProgressiveWebMetric,
|
||||
};
|
||||
use mime::{self, Mime};
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
use net_traits::policy_container::PolicyContainer;
|
||||
use net_traits::pub_domains::is_pub_domain;
|
||||
use net_traits::request::{InsecureRequestsPolicy, RequestBuilder};
|
||||
use net_traits::response::HttpsState;
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
use net_traits::{FetchResponseListener, IpcSend, ReferrerPolicy};
|
||||
use num_traits::ToPrimitive;
|
||||
use percent_encoding::percent_decode;
|
||||
|
@ -78,6 +78,7 @@ use webrender_traits::CompositorHitTestResult;
|
|||
|
||||
use super::bindings::codegen::Bindings::XPathEvaluatorBinding::XPathEvaluatorMethods;
|
||||
use super::clipboardevent::ClipboardEventType;
|
||||
use crate::DomTypes;
|
||||
use crate::animation_timeline::AnimationTimeline;
|
||||
use crate::animations::Animations;
|
||||
use crate::canvas_context::CanvasContext as _;
|
||||
|
@ -110,7 +111,7 @@ use crate::dom::bindings::error::{Error, ErrorInfo, ErrorResult, Fallible};
|
|||
use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, DomSlice, LayoutDom, MutNullableDom, ToLayout};
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::bindings::trace::{HashMapTracedValues, NoTrace};
|
||||
|
@ -199,14 +200,13 @@ use crate::fetch::FetchCanceller;
|
|||
use crate::iframe_collection::IFrameCollection;
|
||||
use crate::messaging::{CommonScriptMsg, MainThreadScriptMsg};
|
||||
use crate::network_listener::{NetworkListener, PreInvoke};
|
||||
use crate::realms::{enter_realm, AlreadyInRealm, InRealm};
|
||||
use crate::realms::{AlreadyInRealm, InRealm, enter_realm};
|
||||
use crate::script_runtime::{CanGc, ScriptThreadEventCategory};
|
||||
use crate::script_thread::{with_script_thread, ScriptThread};
|
||||
use crate::script_thread::{ScriptThread, with_script_thread};
|
||||
use crate::stylesheet_set::StylesheetSetRef;
|
||||
use crate::task::TaskBox;
|
||||
use crate::task_source::TaskSourceName;
|
||||
use crate::timers::OneshotTimerCallback;
|
||||
use crate::DomTypes;
|
||||
|
||||
/// The number of times we are allowed to see spurious `requestAnimationFrame()` calls before
|
||||
/// falling back to fake ones.
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::{
|
|||
};
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::reflector::{
|
||||
reflect_dom_object, reflect_dom_object_with_proto, Reflector,
|
||||
Reflector, reflect_dom_object, reflect_dom_object_with_proto,
|
||||
};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
|||
use crate::dom::bindings::codegen::UnionTypes::StringOrElementCreationOptions;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::xmlname::{
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::bindings::inheritance::Castable;
|
|||
use crate::dom::bindings::reflector::reflect_dom_object_with_proto;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::dommatrixreadonly::{
|
||||
dommatrixinit_to_matrix, entries_to_matrix, transform_to_matrix, DOMMatrixReadOnly,
|
||||
DOMMatrixReadOnly, dommatrixinit_to_matrix, entries_to_matrix, transform_to_matrix,
|
||||
};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -7,8 +7,8 @@ use std::{f64, ptr};
|
|||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::Transform3D;
|
||||
use euclid::Angle;
|
||||
use euclid::default::Transform3D;
|
||||
use js::jsapi::JSObject;
|
||||
use js::jsval;
|
||||
use js::rust::{CustomAutoRooterGuard, HandleObject, ToString};
|
||||
|
@ -26,7 +26,7 @@ use crate::dom::bindings::conversions::jsstring_to_str;
|
|||
use crate::dom::bindings::error;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::dommatrix::DOMMatrix;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::{
|
|||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
|
||||
|
|
|
@ -10,7 +10,7 @@ use js::rust::HandleObject;
|
|||
use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOM
|
|||
use crate::dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods};
|
||||
use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::dompoint::DOMPoint;
|
||||
use crate::dom::domrect::DOMRect;
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{
|
|||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::domrectreadonly::{create_a_domrectreadonly_from_the_dictionary, DOMRectReadOnly};
|
||||
use crate::dom::domrectreadonly::{DOMRectReadOnly, create_a_domrectreadonly_from_the_dictionary};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use dom_struct::dom_struct;
|
|||
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMRectListBinding::DOMRectListMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::domrect::DOMRect;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{
|
|||
};
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::reflector::{
|
||||
reflect_dom_object, reflect_dom_object_with_proto, Reflector,
|
||||
Reflector, reflect_dom_object, reflect_dom_object_with_proto,
|
||||
};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::DOMStringListBinding::DOMStringListMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -6,7 +6,7 @@ use dom_struct::dom_struct;
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::DOMStringMapBinding::DOMStringMapMethods;
|
||||
use crate::dom::bindings::error::ErrorResult;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{namespace_url, ns, LocalName};
|
||||
use html5ever::{LocalName, namespace_url, ns};
|
||||
use servo_atoms::Atom;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
|
||||
use crate::dom::attr::Attr;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::element::Element;
|
||||
|
|
|
@ -8,7 +8,7 @@ use dom_struct::dom_struct;
|
|||
use uuid::Uuid;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::DynamicModuleOwnerBinding::DynamicModuleOwnerMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::promise::Promise;
|
||||
|
|
|
@ -19,18 +19,18 @@ use embedder_traits::InputMethodType;
|
|||
use euclid::default::{Rect, Size2D};
|
||||
use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode};
|
||||
use html5ever::{
|
||||
local_name, namespace_prefix, namespace_url, ns, LocalName, Namespace, Prefix, QualName,
|
||||
LocalName, Namespace, Prefix, QualName, local_name, namespace_prefix, namespace_url, ns,
|
||||
};
|
||||
use js::jsapi::Heap;
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::HandleObject;
|
||||
use net_traits::request::CorsSettings;
|
||||
use net_traits::ReferrerPolicy;
|
||||
use net_traits::request::CorsSettings;
|
||||
use selectors::Element as SelectorsElement;
|
||||
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
|
||||
use selectors::bloom::{BloomFilter, BLOOM_HASH_MASK};
|
||||
use selectors::bloom::{BLOOM_HASH_MASK, BloomFilter};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext};
|
||||
use selectors::sink::Push;
|
||||
use selectors::Element as SelectorsElement;
|
||||
use servo_arc::Arc;
|
||||
use servo_atoms::Atom;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
|
@ -41,22 +41,22 @@ use style::properties::longhands::{
|
|||
self, background_image, border_spacing, font_family, font_size,
|
||||
};
|
||||
use style::properties::{
|
||||
parse_style_attribute, ComputedValues, Importance, PropertyDeclaration,
|
||||
PropertyDeclarationBlock,
|
||||
ComputedValues, Importance, PropertyDeclaration, PropertyDeclarationBlock,
|
||||
parse_style_attribute,
|
||||
};
|
||||
use style::rule_tree::CascadeLevel;
|
||||
use style::selector_parser::{
|
||||
extended_filtering, NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl,
|
||||
SelectorParser,
|
||||
NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl, SelectorParser,
|
||||
extended_filtering,
|
||||
};
|
||||
use style::shared_lock::{Locked, SharedRwLock};
|
||||
use style::stylesheets::layer_rule::LayerOrder;
|
||||
use style::stylesheets::{CssRuleType, UrlExtraData};
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::generics::position::PreferredRatio;
|
||||
use style::values::generics::ratio::Ratio;
|
||||
use style::values::generics::NonNegative;
|
||||
use style::values::{computed, specified, AtomIdent, AtomString, CSSFloat};
|
||||
use style::{dom_apis, thread_state, ArcSlice, CaseSensitivityExt};
|
||||
use style::values::{AtomIdent, AtomString, CSSFloat, computed, specified};
|
||||
use style::{ArcSlice, CaseSensitivityExt, dom_apis, thread_state};
|
||||
use style_dom::ElementState;
|
||||
use xml5ever::serialize::TraversalScope::{
|
||||
ChildrenOnly as XmlChildrenOnly, IncludeNode as XmlIncludeNode,
|
||||
|
@ -64,7 +64,7 @@ use xml5ever::serialize::TraversalScope::{
|
|||
|
||||
use crate::dom::activation::Activatable;
|
||||
use crate::dom::attr::{Attr, AttrHelpersForLayout};
|
||||
use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref, RefMut};
|
||||
use crate::dom::bindings::cell::{DomRefCell, Ref, RefMut, ref_filter_map};
|
||||
use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::ElementBinding::{ElementMethods, ShadowRootInit};
|
||||
|
@ -91,11 +91,11 @@ use crate::dom::bindings::xmlname::{
|
|||
use crate::dom::characterdata::CharacterData;
|
||||
use crate::dom::create::create_element;
|
||||
use crate::dom::customelementregistry::{
|
||||
is_valid_custom_element_name, CallbackReaction, CustomElementDefinition, CustomElementReaction,
|
||||
CustomElementState,
|
||||
CallbackReaction, CustomElementDefinition, CustomElementReaction, CustomElementState,
|
||||
is_valid_custom_element_name,
|
||||
};
|
||||
use crate::dom::document::{
|
||||
determine_policy_for_token, Document, LayoutDocumentHelpers, ReflowTriggerCondition,
|
||||
Document, LayoutDocumentHelpers, ReflowTriggerCondition, determine_policy_for_token,
|
||||
};
|
||||
use crate::dom::documentfragment::DocumentFragment;
|
||||
use crate::dom::domrect::DOMRect;
|
||||
|
@ -150,7 +150,7 @@ use crate::dom::shadowroot::{IsUserAgentWidget, ShadowRoot};
|
|||
use crate::dom::text::Text;
|
||||
use crate::dom::validation::Validatable;
|
||||
use crate::dom::validitystate::ValidationFlags;
|
||||
use crate::dom::virtualmethods::{vtable_for, VirtualMethods};
|
||||
use crate::dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use crate::stylesheet_loader::StylesheetOwner;
|
||||
|
@ -1914,9 +1914,11 @@ impl Element {
|
|||
|
||||
pub(crate) fn get_int_attribute(&self, local_name: &LocalName, default: i32) -> i32 {
|
||||
// TODO: Is this assert necessary?
|
||||
assert!(local_name
|
||||
.chars()
|
||||
.all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch));
|
||||
assert!(
|
||||
local_name
|
||||
.chars()
|
||||
.all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch)
|
||||
);
|
||||
let attribute = self.get_attribute(&ns!(), local_name);
|
||||
|
||||
match attribute {
|
||||
|
@ -1937,9 +1939,11 @@ impl Element {
|
|||
}
|
||||
|
||||
pub(crate) fn get_uint_attribute(&self, local_name: &LocalName, default: u32) -> u32 {
|
||||
assert!(local_name
|
||||
.chars()
|
||||
.all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch));
|
||||
assert!(
|
||||
local_name
|
||||
.chars()
|
||||
.all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch)
|
||||
);
|
||||
let attribute = self.get_attribute(&ns!(), local_name);
|
||||
match attribute {
|
||||
Some(ref attribute) => match *attribute.value() {
|
||||
|
@ -3103,7 +3107,7 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
|
|||
AdjacentPosition::BeforeBegin | AdjacentPosition::AfterEnd => {
|
||||
match self.upcast::<Node>().GetParentNode() {
|
||||
Some(ref node) if node.is::<Document>() => {
|
||||
return Err(Error::NoModificationAllowed)
|
||||
return Err(Error::NoModificationAllowed);
|
||||
},
|
||||
None => return Err(Error::NoModificationAllowed),
|
||||
Some(node) => node,
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::dom::bindings::codegen::Bindings::ElementInternalsBinding::{
|
|||
use crate::dom::bindings::codegen::UnionTypes::FileOrUSVStringOrFormData;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::element::Element;
|
||||
|
@ -23,7 +23,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::htmlformelement::{FormDatum, FormDatumValue, HTMLFormElement};
|
||||
use crate::dom::node::{Node, NodeTraits};
|
||||
use crate::dom::nodelist::NodeList;
|
||||
use crate::dom::validation::{is_barred_by_datalist_ancestor, Validatable};
|
||||
use crate::dom::validation::{Validatable, is_barred_by_datalist_ancestor};
|
||||
use crate::dom::validitystate::{ValidationFlags, ValidityState};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
|||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::element::Element;
|
||||
|
|
|
@ -32,7 +32,7 @@ use crate::dom::bindings::codegen::Bindings::EventSourceBinding::{
|
|||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::event::Event;
|
||||
|
@ -40,7 +40,7 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::messageevent::MessageEvent;
|
||||
use crate::dom::performanceresourcetiming::InitiatorType;
|
||||
use crate::fetch::{create_a_potential_cors_request, FetchCanceller};
|
||||
use crate::fetch::{FetchCanceller, create_a_potential_cors_request};
|
||||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||
use crate::realms::enter_realm;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
@ -343,7 +343,7 @@ impl FetchResponseListener for EventSourceContext {
|
|||
FetchMetadata::Unfiltered(m) => m,
|
||||
FetchMetadata::Filtered { unsafe_, filtered } => match filtered {
|
||||
FilteredMetadata::Opaque | FilteredMetadata::OpaqueRedirect(_) => {
|
||||
return self.fail_the_connection()
|
||||
return self.fail_the_connection();
|
||||
},
|
||||
_ => unsafe_,
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@ use js::jsapi::JS_GetFunctionObject;
|
|||
use js::jsval::JSVal;
|
||||
use js::rust::wrappers::CompileFunction;
|
||||
use js::rust::{
|
||||
transform_u16_to_source_text, CompileOptionsWrapper, HandleObject, RootedObjectVectorWrapper,
|
||||
CompileOptionsWrapper, HandleObject, RootedObjectVectorWrapper, transform_u16_to_source_text,
|
||||
};
|
||||
use libc::c_char;
|
||||
use servo_atoms::Atom;
|
||||
|
@ -44,10 +44,10 @@ use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
|||
use crate::dom::bindings::codegen::UnionTypes::{
|
||||
AddEventListenerOptionsOrBoolean, EventListenerOptionsOrBoolean, EventOrString,
|
||||
};
|
||||
use crate::dom::bindings::error::{report_pending_exception, Error, Fallible};
|
||||
use crate::dom::bindings::error::{Error, Fallible, report_pending_exception};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{
|
||||
reflect_dom_object_with_proto, DomGlobal, DomObject, Reflector,
|
||||
DomGlobal, DomObject, Reflector, reflect_dom_object_with_proto,
|
||||
};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
|
@ -63,7 +63,7 @@ use crate::dom::shadowroot::ShadowRoot;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::window::Window;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::realms::{InRealm, enter_realm};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[derive(Clone, JSTraceable, MallocSizeOf, PartialEq)]
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::bindings::inheritance::Castable;
|
|||
use crate::dom::bindings::reflector::reflect_dom_object_with_proto;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::blob::{blob_parts_to_bytes, normalize_type_string, Blob};
|
||||
use crate::dom::blob::{Blob, blob_parts_to_bytes, normalize_type_string};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::slice::Iter;
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::FileListBinding::FileListMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::file::File;
|
||||
use crate::dom::window::Window;
|
||||
|
|
|
@ -24,7 +24,7 @@ use crate::dom::bindings::codegen::UnionTypes::StringOrObject;
|
|||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::Trusted;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::trace::RootedTraceableBox;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::bindings::buffer_source::create_buffer_source;
|
|||
use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::FileReaderSyncBinding::FileReaderSyncMethods;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::blob::Blob;
|
||||
|
|
|
@ -27,7 +27,7 @@ use crate::dom::bindings::codegen::Bindings::FontFaceBinding::{
|
|||
};
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::dom::bindings::codegen::UnionTypes::FileOrUSVString;
|
|||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::iterable::Iterable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::blob::Blob;
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::dom::bindings::codegen::Bindings::FormDataEventBinding;
|
|||
use crate::dom::bindings::codegen::Bindings::FormDataEventBinding::FormDataEventMethods;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::event::{Event, EventBubbles, EventCancelable};
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::bindings::codegen::Bindings::GamepadBinding::{GamepadHand, Gamep
|
|||
use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding::GamepadButtonListMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::event::Event;
|
||||
|
|
|
@ -8,7 +8,7 @@ use dom_struct::dom_struct;
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::GamepadButtonBinding::GamepadButtonMethods;
|
||||
use crate::dom::bindings::num::Finite;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use dom_struct::dom_struct;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding::GamepadButtonListMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, DomSlice};
|
||||
use crate::dom::gamepadbutton::GamepadButton;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::dom::bindings::codegen::Bindings::GamepadEventBinding;
|
|||
use crate::dom::bindings::codegen::Bindings::GamepadEventBinding::GamepadEventMethods;
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::event::Event;
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::bindings::codegen::Bindings::GamepadHapticActuatorBinding::{
|
|||
use crate::dom::bindings::codegen::Bindings::WindowBinding::Window_Binding::WindowMethods;
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object_with_proto, DomGlobal, Reflector};
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object_with_proto};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::utils::to_frozen_array;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue