mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
remove extern crate
(#30311)
* remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
a0cff6a085
commit
711dbbd4af
274 changed files with 415 additions and 429 deletions
|
@ -7,6 +7,7 @@
|
|||
//! A timeline module, used to specify an `AnimationTimeline` which determines
|
||||
//! the time used for synchronizing animations in the script thread.
|
||||
|
||||
use jstraceable_derive::JSTraceable;
|
||||
use time;
|
||||
|
||||
/// A `AnimationTimeline` which is used to synchronize animations during the script
|
||||
|
|
|
@ -23,6 +23,7 @@ use fxhash::{FxHashMap, FxHashSet};
|
|||
use libc::c_void;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_traits::{AnimationState as AnimationsPresentState, ScriptMsg, UntrustedNodeAddress};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cell::Cell;
|
||||
use style::animation::{
|
||||
Animation, AnimationSetKey, AnimationState, DocumentAnimationSet, ElementAnimationSet,
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::workerglobalscope::WorkerGlobalScope;
|
|||
use crate::realms::enter_realm;
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use crate::task_queue::{QueuedTaskConversion, TaskQueue};
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use crossbeam_channel::{select, Receiver, Sender};
|
||||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
|
||||
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::virtualmethods::vtable_for;
|
|||
use crate::script_thread::ScriptThread;
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Namespace, Prefix};
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
use servo_atoms::Atom;
|
||||
use std::borrow::ToOwned;
|
||||
use std::mem;
|
||||
|
|
|
@ -8040,7 +8040,7 @@ class GlobalGenRoots():
|
|||
CGGeneric("const %s = %#x;" % args)
|
||||
for args in flags
|
||||
], "\n")), pre="#[derive(Clone, Copy)]\npub struct Globals: u8 {\n", post="\n}")
|
||||
globals_ = CGWrapper(CGIndenter(global_flags), pre="bitflags! {\n", post="\n}")
|
||||
globals_ = CGWrapper(CGIndenter(global_flags), pre="bitflags::bitflags! {\n", post="\n}")
|
||||
|
||||
phf = CGGeneric("include!(concat!(env!(\"OUT_DIR\"), \"/InterfaceObjectMapPhf.rs\"));")
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ use crate::dom::window::Window;
|
|||
use crate::script_runtime::JSContext;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use html5ever::interface::QualName;
|
||||
use html5ever::LocalName;
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName};
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::glue::{UnwrapObjectDynamic, UnwrapObjectStatic};
|
||||
use js::jsapi::{CallArgs, CurrentGlobalOrNull};
|
||||
|
|
|
@ -7,6 +7,7 @@ use chrono::prelude::{Utc, Weekday};
|
|||
use chrono::{Datelike, TimeZone};
|
||||
use cssparser::CowRcStr;
|
||||
use html5ever::{LocalName, Namespace};
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use servo_atoms::Atom;
|
||||
use std::borrow::{Borrow, Cow, ToOwned};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use html5ever::{LocalName, Namespace, Prefix};
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
|
||||
/// Validate a qualified name. See https://dom.spec.whatwg.org/#validate for details.
|
||||
pub fn validate_qualified_name(qualified_name: &str) -> ErrorResult {
|
||||
|
|
|
@ -84,7 +84,7 @@ use crate::dom::svgelement::SVGElement;
|
|||
use crate::dom::svgsvgelement::SVGSVGElement;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::script_thread::ScriptThread;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix, QualName};
|
||||
use js::rust::HandleObject;
|
||||
use servo_config::pref;
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@ use crate::dom::cssrule::CSSRule;
|
|||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::window::Window;
|
||||
use crate::style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
|
||||
use crate::stylesheet_loader::StylesheetLoader;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::Locked;
|
||||
use style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
|
||||
use style::stylesheets::{
|
||||
AllowImportRules, CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError,
|
||||
};
|
||||
|
|
|
@ -14,6 +14,7 @@ use crate::dom::element::Element;
|
|||
use crate::dom::node::{document_from_node, stylesheets_owner_from_node, window_from_node, Node};
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::local_name;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
|
@ -475,5 +476,5 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-_camel_cased_attribute
|
||||
css_properties_accessors!(css_properties);
|
||||
style::css_properties_accessors!(css_properties);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ use crate::realms::{enter_realm, InRealm};
|
|||
use crate::script_runtime::JSContext;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Namespace, Prefix};
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace, Prefix};
|
||||
use js::conversions::ToJSValConvertible;
|
||||
use js::glue::UnwrapObjectStatic;
|
||||
use js::jsapi::{HandleValueArray, Heap, IsCallable, IsConstructor};
|
||||
|
|
|
@ -114,17 +114,19 @@ use crate::timers::OneshotTimerCallback;
|
|||
use canvas_traits::webgl::{self, WebGLContextId, WebGLMsg};
|
||||
use content_security_policy::{self as csp, CspList};
|
||||
use cookie::Cookie;
|
||||
use cssparser::{_cssparser_internal_to_lowercase, match_ignore_ascii_case};
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use html5ever::{LocalName, Namespace, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Namespace, QualName};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::JSObject;
|
||||
use js::rust::HandleObject;
|
||||
use keyboard_types::{Code, Key, KeyState};
|
||||
use lazy_static::lazy_static;
|
||||
use metrics::{
|
||||
InteractiveFlag, InteractiveMetrics, InteractiveWindow, ProfilerMetadataFactory,
|
||||
ProgressiveWebMetric,
|
||||
|
|
|
@ -26,6 +26,7 @@ use crate::dom::node::Node;
|
|||
use crate::dom::text::Text;
|
||||
use crate::dom::xmldocument::XMLDocument;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use script_traits::DocumentActivity;
|
||||
|
||||
// https://dom.spec.whatwg.org/#domimplementation
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::dom::bindings::str::DOMString;
|
|||
use crate::dom::element::Element;
|
||||
use crate::dom::node::window_from_node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::LocalName;
|
||||
use html5ever::{namespace_url, ns, LocalName};
|
||||
use servo_atoms::Atom;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ use crate::dom::window::ReflowReason;
|
|||
use crate::script_thread::ScriptThread;
|
||||
use crate::stylesheet_loader::StylesheetOwner;
|
||||
use crate::task::TaskOnce;
|
||||
use cssparser::{_cssparser_internal_to_lowercase, match_ignore_ascii_case};
|
||||
use devtools_traits::AttrInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::Rect;
|
||||
|
@ -92,7 +93,9 @@ use html5ever::serialize;
|
|||
use html5ever::serialize::SerializeOpts;
|
||||
use html5ever::serialize::TraversalScope;
|
||||
use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode};
|
||||
use html5ever::{LocalName, Namespace, Prefix, QualName};
|
||||
use html5ever::{
|
||||
local_name, namespace_prefix, namespace_url, ns, LocalName, Namespace, Prefix, QualName,
|
||||
};
|
||||
use js::jsapi::Heap;
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::HandleObject;
|
||||
|
|
|
@ -34,6 +34,7 @@ use crate::dom::virtualmethods::VirtualMethods;
|
|||
use crate::dom::window::Window;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use deny_public_fields::DenyPublicFields;
|
||||
use dom_struct::dom_struct;
|
||||
use fnv::FnvHasher;
|
||||
use js::jsapi::JS_GetFunctionObject;
|
||||
|
|
|
@ -28,7 +28,7 @@ use crate::dom::urlhelper::UrlHelper;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use net_traits::request::Referrer;
|
||||
use num_traits::ToPrimitive;
|
||||
|
|
|
@ -16,9 +16,10 @@ use crate::dom::htmlanchorelement::follow_hyperlink;
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::{_cssparser_internal_to_lowercase, match_ignore_ascii_case};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::Point2D;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use servo_atoms::Atom;
|
||||
use std::default::Default;
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::dom::htmlmediaelement::HTMLMediaElement;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix, QualName};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::{document_from_node, BindContext, Node, UnbindContext};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::virtualmethods::VirtualMethods;
|
|||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
|
|
|
@ -23,7 +23,7 @@ use crate::dom::validation::{is_barred_by_datalist_ancestor, Validatable};
|
|||
use crate::dom::validitystate::{ValidationFlags, ValidityState};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
|
|
|
@ -35,7 +35,7 @@ use canvas_traits::canvas::{CanvasId, CanvasMsg, FromScriptMsg};
|
|||
use canvas_traits::webgl::{GLContextAttributes, WebGLVersion};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use image::codecs::png::PngEncoder;
|
||||
use image::{ColorType, ImageEncoder};
|
||||
use ipc_channel::ipc::{self as ipcchan, IpcSharedMemory};
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::element::Element;
|
|||
use crate::dom::node::{document_from_node, Node};
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, QualName};
|
||||
use servo_atoms::Atom;
|
||||
use std::cell::Cell;
|
||||
use style::str::split_html_space_chars;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::dom::node::{window_from_node, Node, NodeDamage};
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use std::cell::Cell;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::node::{window_from_node, Node};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -35,7 +35,7 @@ use crate::dom::node::{Node, ShadowIncluding};
|
|||
use crate::dom::text::Text;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use script_layout_interface::message::QueryMsg;
|
||||
use std::collections::HashSet;
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::validation::Validatable;
|
|||
use crate::dom::validitystate::ValidityState;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use std::default::Default;
|
||||
use style::element_state::ElementState;
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::dom::node::Node;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use servo_atoms::Atom;
|
||||
use style::attr::AttrValue;
|
||||
|
|
|
@ -60,7 +60,7 @@ use crate::task_source::TaskSource;
|
|||
use dom_struct::dom_struct;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use headers::{ContentType, HeaderMapExt};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use http::Method;
|
||||
use js::rust::HandleObject;
|
||||
use mime::{self, Mime};
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::node::{document_from_node, BindContext, Node, ShadowIncluding};
|
|||
use crate::dom::userscripts::load_script;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::node::Node;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ use crate::dom::virtualmethods::VirtualMethods;
|
|||
use crate::dom::window::ReflowReason;
|
||||
use crate::dom::windowproxy::WindowProxy;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use bitflags::bitflags;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use js::rust::HandleObject;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
|
|
|
@ -53,7 +53,7 @@ use app_units::{Au, AU_PER_PX};
|
|||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Point2D;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix, QualName};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
|
|
@ -54,7 +54,7 @@ use chrono::{Datelike, Weekday};
|
|||
use dom_struct::dom_struct;
|
||||
use embedder_traits::FilterPattern;
|
||||
use encoding_rs::Encoding;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::jsapi::{
|
||||
ClippedTime, DateGetMsecSinceEpoch, Handle, JSObject, JS_ClearPendingException, NewDateObject,
|
||||
NewUCRegExpObject, ObjectIsDate, RegExpFlag_Unicode, RegExpFlags,
|
||||
|
|
|
@ -21,7 +21,7 @@ use crate::dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFo
|
|||
use crate::dom::node::{Node, ShadowIncluding};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ use crate::stylesheet_loader::{StylesheetContextSource, StylesheetLoader, Styles
|
|||
use cssparser::{Parser as CssParser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use net_traits::ReferrerPolicy;
|
||||
use servo_arc::Arc;
|
||||
|
|
|
@ -70,7 +70,7 @@ use embedder_traits::resources::{self, Resource as EmbedderResource};
|
|||
use embedder_traits::{MediaPositionState, MediaSessionEvent, MediaSessionPlaybackState};
|
||||
use euclid::default::Size2D;
|
||||
use headers::{ContentLength, ContentRange, HeaderMapExt};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use http::header::{self, HeaderMap, HeaderValue};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::validation::Validatable;
|
|||
use crate::dom::validitystate::ValidityState;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use net_traits::image::base::Image;
|
||||
use servo_arc::Arc;
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::validation::Validatable;
|
|||
use crate::dom::validitystate::ValidationFlags;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::element_state::ElementState;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ use crate::dom::validitystate::ValidationFlags;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix, QualName};
|
||||
use js::rust::HandleObject;
|
||||
use std::cell::Cell;
|
||||
use std::convert::TryInto;
|
||||
|
|
|
@ -22,6 +22,7 @@ use crate::dom::htmlselectelement::HTMLSelectElement;
|
|||
use crate::dom::node::{document_from_node, Node};
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::local_name;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLOptionsCollection {
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::validation::Validatable;
|
|||
use crate::dom::validitystate::ValidityState;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::nodelist::NodeList;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -40,7 +40,7 @@ use content_security_policy as csp;
|
|||
use core::ffi::c_void;
|
||||
use dom_struct::dom_struct;
|
||||
use encoding_rs::Encoding;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::{CanCompileOffThread, CompileToStencilOffThread1, OffThreadToken};
|
||||
|
|
|
@ -30,7 +30,7 @@ use crate::dom::validation::{is_barred_by_datalist_ancestor, Validatable};
|
|||
use crate::dom::validitystate::{ValidationFlags, ValidityState};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use std::default::Default;
|
||||
use std::iter;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::htmlmediaelement::HTMLMediaElement;
|
|||
use crate::dom::node::{BindContext, Node, UnbindContext};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::dom::virtualmethods::VirtualMethods;
|
|||
use crate::stylesheet_loader::{StylesheetLoader, StylesheetOwner};
|
||||
use cssparser::{Parser as CssParser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use net_traits::ReferrerPolicy;
|
||||
use servo_arc::Arc;
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::node::Node;
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::context::QuirksMode;
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::dom::node::{document_from_node, window_from_node, Node};
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use std::cell::Cell;
|
||||
use style::attr::{parse_unsigned_integer, AttrValue, LengthOrPercentageOrAuto};
|
||||
|
|
|
@ -21,7 +21,7 @@ use crate::dom::node::{window_from_node, Node};
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::node::{window_from_node, Node};
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use cssparser::RGBA;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ use crate::textinput::{
|
|||
Direction, KeyReaction, Lines, SelectionDirection, TextInput, UTF16CodeUnits, UTF8Bytes,
|
||||
};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use script_traits::ScriptToConstellationChan;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::texttrack::TextTrack;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
|
||||
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
|
||||
|
|
|
@ -23,7 +23,7 @@ use crate::image_listener::{generate_cache_listener_for_element, ImageCacheListe
|
|||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::Size2D;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::rust::HandleObject;
|
||||
|
|
|
@ -9,7 +9,7 @@ macro_rules! make_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.get_string_attribute(&local_name!($htmlname))
|
||||
element.get_string_attribute(&html5ever::local_name!($htmlname))
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -21,7 +21,7 @@ macro_rules! make_bool_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.has_attribute(&local_name!($htmlname))
|
||||
element.has_attribute(&html5ever::local_name!($htmlname))
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -40,7 +40,7 @@ macro_rules! make_limited_int_setter(
|
|||
};
|
||||
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_int_attribute(&local_name!($htmlname), value);
|
||||
element.set_int_attribute(&html5ever::local_name!($htmlname), value);
|
||||
Ok(())
|
||||
}
|
||||
);
|
||||
|
@ -54,7 +54,7 @@ macro_rules! make_int_setter(
|
|||
use crate::dom::element::Element;
|
||||
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_int_attribute(&local_name!($htmlname), value)
|
||||
element.set_int_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
($attr:ident, $htmlname:tt) => {
|
||||
|
@ -69,7 +69,7 @@ macro_rules! make_int_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.get_int_attribute(&local_name!($htmlname), $default)
|
||||
element.get_int_attribute(&html5ever::local_name!($htmlname), $default)
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -85,7 +85,7 @@ macro_rules! make_uint_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.get_uint_attribute(&local_name!($htmlname), $default)
|
||||
element.get_uint_attribute(&html5ever::local_name!($htmlname), $default)
|
||||
}
|
||||
);
|
||||
($attr:ident, $htmlname:tt) => {
|
||||
|
@ -100,7 +100,7 @@ macro_rules! make_url_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.get_url_attribute(&local_name!($htmlname))
|
||||
element.get_url_attribute(&html5ever::local_name!($htmlname))
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -112,7 +112,7 @@ macro_rules! make_url_setter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_url_attribute(&local_name!($htmlname),
|
||||
element.set_url_attribute(&html5ever::local_name!($htmlname),
|
||||
value);
|
||||
}
|
||||
);
|
||||
|
@ -126,7 +126,7 @@ macro_rules! make_form_action_getter(
|
|||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
let doc = crate::dom::node::document_from_node(self);
|
||||
let attr = element.get_attribute(&ns!(), &local_name!($htmlname));
|
||||
let attr = element.get_attribute(&html5ever::ns!(), &html5ever::local_name!($htmlname));
|
||||
let value = attr.as_ref().map(|attr| attr.value());
|
||||
let value = match value {
|
||||
Some(ref value) if !value.is_empty() => &***value,
|
||||
|
@ -162,7 +162,7 @@ macro_rules! make_enumerated_getter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
let mut val = element.get_string_attribute(&local_name!($htmlname));
|
||||
let mut val = element.get_string_attribute(&html5ever::local_name!($htmlname));
|
||||
val.make_ascii_lowercase();
|
||||
// https://html.spec.whatwg.org/multipage/#attr-fs-method
|
||||
match &*val {
|
||||
|
@ -182,7 +182,7 @@ macro_rules! make_setter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_string_attribute(&local_name!($htmlname), value)
|
||||
element.set_string_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -194,7 +194,7 @@ macro_rules! make_bool_setter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_bool_attribute(&local_name!($htmlname), value)
|
||||
element.set_bool_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -212,7 +212,7 @@ macro_rules! make_uint_setter(
|
|||
value
|
||||
};
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_uint_attribute(&local_name!($htmlname), value)
|
||||
element.set_uint_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
($attr:ident, $htmlname:tt) => {
|
||||
|
@ -235,7 +235,7 @@ macro_rules! make_limited_uint_setter(
|
|||
value
|
||||
};
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_uint_attribute(&local_name!($htmlname), value);
|
||||
element.set_uint_attribute(&html5ever::local_name!($htmlname), value);
|
||||
Ok(())
|
||||
}
|
||||
);
|
||||
|
@ -251,7 +251,7 @@ macro_rules! make_atomic_setter(
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
element.set_atomic_attribute(&local_name!($htmlname), value)
|
||||
element.set_atomic_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -265,7 +265,7 @@ macro_rules! make_legacy_color_setter(
|
|||
use style::attr::AttrValue;
|
||||
let element = self.upcast::<Element>();
|
||||
let value = AttrValue::from_legacy_color(value.into());
|
||||
element.set_attribute(&local_name!($htmlname), value)
|
||||
element.set_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -278,7 +278,7 @@ macro_rules! make_dimension_setter(
|
|||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
let value = AttrValue::from_dimension(value.into());
|
||||
element.set_attribute(&local_name!($htmlname), value)
|
||||
element.set_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -291,7 +291,7 @@ macro_rules! make_nonzero_dimension_setter(
|
|||
use crate::dom::element::Element;
|
||||
let element = self.upcast::<Element>();
|
||||
let value = AttrValue::from_nonzero_dimension(value.into());
|
||||
element.set_attribute(&local_name!($htmlname), value)
|
||||
element.set_attribute(&html5ever::local_name!($htmlname), value)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::dom::window::Window;
|
|||
use crate::microtask::Microtask;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Namespace};
|
||||
use html5ever::{namespace_url, ns, LocalName, Namespace};
|
||||
use js::rust::HandleObject;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
|
|
@ -64,11 +64,13 @@ use crate::dom::virtualmethods::{vtable_for, VirtualMethods};
|
|||
use crate::dom::window::Window;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use app_units::Au;
|
||||
use bitflags::bitflags;
|
||||
use devtools_traits::NodeInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use html5ever::{Namespace, Prefix, QualName};
|
||||
use html5ever::{namespace_url, ns, Namespace, Prefix, QualName};
|
||||
use js::jsapi::JSObject;
|
||||
|
||||
use js::rust::HandleObject;
|
||||
use libc::{self, c_void, uintptr_t};
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
|
|
|
@ -28,6 +28,7 @@ use crate::dom::node::{Node, ShadowIncluding, UnbindContext};
|
|||
use crate::dom::selection::Selection;
|
||||
use crate::dom::text::Text;
|
||||
use crate::dom::window::Window;
|
||||
use deny_public_fields::DenyPublicFields;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::JSTracer;
|
||||
use js::rust::HandleObject;
|
||||
|
|
|
@ -25,6 +25,7 @@ use crate::dom::headers::{Guard, Headers};
|
|||
use crate::dom::promise::Promise;
|
||||
use crate::dom::readablestream::ReadableStream;
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
use cssparser::{_cssparser_internal_to_lowercase, match_ignore_ascii_case};
|
||||
use dom_struct::dom_struct;
|
||||
use http::header::{HeaderName, HeaderValue};
|
||||
use http::method::InvalidMethod;
|
||||
|
|
|
@ -29,7 +29,9 @@ use html5ever::tree_builder::{
|
|||
ElementFlags, NextParserState, NodeOrText as HtmlNodeOrText, QuirksMode, TreeSink,
|
||||
};
|
||||
use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts};
|
||||
use html5ever::{Attribute as HtmlAttribute, ExpandedName, QualName};
|
||||
use html5ever::{
|
||||
local_name, namespace_url, ns, Attribute as HtmlAttribute, ExpandedName, QualName,
|
||||
};
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::Cow;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -46,7 +46,7 @@ use html5ever::tendril::fmt::UTF8;
|
|||
use html5ever::tendril::{ByteTendril, StrTendril, TendrilSink};
|
||||
use html5ever::tokenizer::TokenizerResult;
|
||||
use html5ever::tree_builder::{ElementFlags, NextParserState, NodeOrText, QuirksMode, TreeSink};
|
||||
use html5ever::{Attribute, ExpandedName, LocalName, QualName};
|
||||
use html5ever::{local_name, namespace_url, ns, Attribute, ExpandedName, LocalName, QualName};
|
||||
use hyper_serde::Serde;
|
||||
use mime::{self, Mime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
|
|
@ -19,7 +19,7 @@ use html5ever::tokenizer::TokenSinkResult;
|
|||
use html5ever::tokenizer::Tokenizer as HtmlTokenizer;
|
||||
use html5ever::tokenizer::TokenizerResult;
|
||||
use html5ever::Attribute;
|
||||
use html5ever::LocalName;
|
||||
use html5ever::{local_name, LocalName};
|
||||
use js::jsapi::JSTracer;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::CorsSettings;
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::node::window_from_node;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use style::element_state::ElementState;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::node::Node;
|
|||
use crate::dom::svggraphicselement::SVGGraphicsElement;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
||||
use js::rust::HandleObject;
|
||||
use script_layout_interface::SVGSVGData;
|
||||
use style::attr::AttrValue;
|
||||
|
|
|
@ -13,6 +13,7 @@ use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
|
|||
use crate::dom::htmlformelement::FormControlElementHelpers;
|
||||
use crate::dom::node::Node;
|
||||
use crate::dom::window::Window;
|
||||
use bitflags::bitflags;
|
||||
use dom_struct::dom_struct;
|
||||
use itertools::Itertools;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants;
|
||||
use canvas_traits::gl_enums;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
gl_enums! {
|
||||
pub enum TexImageTarget {
|
||||
|
|
|
@ -54,6 +54,7 @@ use crate::dom::window::Window;
|
|||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
#[cfg(feature = "webgl_backtrace")]
|
||||
use backtrace::Backtrace;
|
||||
use bitflags::bitflags;
|
||||
use canvas_traits::webgl::WebGLError::*;
|
||||
use canvas_traits::webgl::{
|
||||
webgl_channel, AlphaTreatment, GLContextAttributes, GLLimits, GlType, Parameter, SizedDataType,
|
||||
|
|
|
@ -62,7 +62,6 @@ use crate::dom::worklet::Worklet;
|
|||
use crate::dom::workletglobalscope::WorkletGlobalScopeType;
|
||||
use crate::fetch;
|
||||
use crate::layout_image::fetch_image_for_layout;
|
||||
use crate::malloc_size_of::MallocSizeOf;
|
||||
use crate::microtask::MicrotaskQueue;
|
||||
use crate::realms::InRealm;
|
||||
use crate::script_runtime::{
|
||||
|
@ -101,6 +100,7 @@ use js::rust::wrappers::JS_DefineProperty;
|
|||
use js::rust::{
|
||||
CustomAutoRooter, CustomAutoRooterGuard, HandleObject, HandleValue, MutableHandleObject,
|
||||
};
|
||||
use malloc_size_of::MallocSizeOf;
|
||||
use media::WindowGLContext;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image_cache::{ImageCache, ImageResponder, ImageResponse};
|
||||
|
|
|
@ -22,6 +22,7 @@ use crate::script_runtime::JSContext as SafeJSContext;
|
|||
use crate::script_thread::ScriptThread;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use html5ever::local_name;
|
||||
use indexmap::map::IndexMap;
|
||||
use ipc_channel::ipc;
|
||||
use js::glue::{CreateWrapperProxyHandler, ProxyTraps};
|
||||
|
@ -52,6 +53,7 @@ use script_traits::{
|
|||
AuxiliaryBrowsingContextLoadInfo, HistoryEntryReplacement, LoadData, LoadOrigin,
|
||||
};
|
||||
use script_traits::{NewLayoutInfo, ScriptMsg};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use std::cell::Cell;
|
||||
use std::ptr;
|
||||
|
|
|
@ -46,6 +46,7 @@ use js::jsapi::JSGCParamKey;
|
|||
use js::jsapi::JSTracer;
|
||||
use js::jsapi::JS_GetGCParameter;
|
||||
use js::jsapi::{GCReason, JS_GC};
|
||||
use malloc_size_of::malloc_size_of_is_0;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::Destination;
|
||||
use net_traits::request::RequestBuilder;
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::characterdata::LayoutCharacterDataHelpers;
|
|||
use crate::dom::element::{Element, LayoutElementHelpers};
|
||||
use crate::dom::node::{LayoutNodeHelpers, NodeFlags};
|
||||
use atomic_refcell::{AtomicRef, AtomicRefMut};
|
||||
use html5ever::{LocalName, Namespace};
|
||||
use html5ever::{local_name, namespace_url, ns, LocalName, Namespace};
|
||||
use script_layout_interface::wrapper_traits::{
|
||||
GetStyleAndOpaqueLayoutData, LayoutDataTrait, LayoutNode, PseudoElementType,
|
||||
ThreadSafeLayoutElement, ThreadSafeLayoutNode,
|
||||
|
|
|
@ -17,6 +17,7 @@ use crate::dom::node::{LayoutNodeHelpers, Node, NodeFlags};
|
|||
use crate::dom::text::Text;
|
||||
use atomic_refcell::AtomicRefCell;
|
||||
use gfx_traits::ByteIndex;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use range::Range;
|
||||
|
|
|
@ -21,38 +21,17 @@
|
|||
#![register_tool(unrooted_must_root_lint)]
|
||||
#![register_tool(trace_in_no_trace_lint)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
extern crate crossbeam_channel;
|
||||
#[macro_use]
|
||||
extern crate cssparser;
|
||||
#[macro_use]
|
||||
extern crate deny_public_fields;
|
||||
#[macro_use]
|
||||
extern crate domobject_derive;
|
||||
#[macro_use]
|
||||
extern crate html5ever;
|
||||
// These are used a lot so let's keep them for now
|
||||
#[macro_use]
|
||||
extern crate js;
|
||||
#[macro_use]
|
||||
extern crate jstraceable_derive;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of;
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate profile_traits;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate servo_atoms;
|
||||
#[macro_use]
|
||||
extern crate style;
|
||||
|
||||
mod animation_timeline;
|
||||
mod animations;
|
||||
|
|
|
@ -37,6 +37,7 @@ use crate::script_runtime::JSContext as SafeJSContext;
|
|||
use crate::task::TaskBox;
|
||||
use crate::task_source::TaskSourceName;
|
||||
use encoding_rs::UTF_8;
|
||||
use html5ever::local_name;
|
||||
use hyper_serde::Serde;
|
||||
use indexmap::IndexSet;
|
||||
use ipc_channel::ipc;
|
||||
|
|
|
@ -73,9 +73,11 @@ use js::rust::IntoHandle;
|
|||
use js::rust::ParentRuntime;
|
||||
use js::rust::Runtime as RustRuntime;
|
||||
use js::rust::{JSEngine, JSEngineHandle};
|
||||
use lazy_static::lazy_static;
|
||||
use malloc_size_of::MallocSizeOfOps;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use profile_traits::mem::{Report, ReportKind, ReportsChan};
|
||||
use profile_traits::path;
|
||||
use servo_config::opts;
|
||||
use servo_config::pref;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -85,7 +85,7 @@ use crate::task_source::TaskSourceName;
|
|||
use crate::webdriver_handlers;
|
||||
use bluetooth_traits::BluetoothRequest;
|
||||
use canvas_traits::webgl::WebGLPipeline;
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use crossbeam_channel::{select, unbounded, Receiver, Sender};
|
||||
use devtools_traits::CSSError;
|
||||
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo};
|
||||
use devtools_traits::{NavigationState, ScriptToDevtoolsControlMsg, WorkerId};
|
||||
|
@ -94,6 +94,7 @@ use euclid::default::{Point2D, Rect};
|
|||
use euclid::Vector2D;
|
||||
use headers::ReferrerPolicy as ReferrerPolicyHeader;
|
||||
use headers::{HeaderMapExt, LastModified};
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::serviceworkerglobalscope::{
|
|||
};
|
||||
use crate::dom::serviceworkerregistration::longest_prefix_match;
|
||||
use crate::script_runtime::ContextForRequestInterrupt;
|
||||
use crossbeam_channel::{unbounded, Receiver, RecvError, Sender};
|
||||
use crossbeam_channel::{select, unbounded, Receiver, RecvError, Sender};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use msg::constellation_msg::PipelineNamespace;
|
||||
|
|
|
@ -14,6 +14,7 @@ use crate::dom::testbinding::TestBindingCallback;
|
|||
use crate::dom::xmlhttprequest::XHRTimeoutCallback;
|
||||
use crate::script_module::ScriptFetchOptions;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use deny_public_fields::DenyPublicFields;
|
||||
use euclid::Length;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::Heap;
|
||||
|
|
|
@ -34,7 +34,7 @@ struct SyncWrapper(*const libc::c_void);
|
|||
#[allow(unsafe_code)]
|
||||
unsafe impl Sync for SyncWrapper {}
|
||||
|
||||
lazy_static! {
|
||||
lazy_static::lazy_static! {
|
||||
static ref HANDLER: SyncWrapper = {
|
||||
let traps = ProxyTraps {
|
||||
enter: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue