diff options
author | Nico Burns <nico@nicoburns.com> | 2025-04-19 12:49:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-19 11:49:37 +0000 |
commit | c792e6db7c3f72b5294a2041311d71aab207357d (patch) | |
tree | 09a37231c0744fc21e6b61f07d9ff6a9f53139aa | |
parent | 7787cab521ccc6b4d8533ebe9b45563046e0463d (diff) | |
download | servo-main.tar.gz servo-main.zip |
Upgrades `markup5ever` and fixes "unnecessary import" lints.
See https://github.com/servo/html5ever/pull/599
And https://github.com/servo/stylo/pull/173
Signed-off-by: Nico Burns <nico@nicoburns.com>
55 files changed, 69 insertions, 64 deletions
diff --git a/Cargo.lock b/Cargo.lock index 915f2330c33..e0fc94965d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4451,16 +4451,13 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba2225413ed418d540a2c8247d794f4b0527a021da36f69c05344d716dc44c1" +checksum = "d0a8096766c229e8c88a3900c9b44b7e06aa7f7343cc229158c3e58ef8f9973a" dependencies = [ "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", "tendril", + "web_atoms", ] [[package]] @@ -8405,6 +8402,18 @@ dependencies = [ ] [[package]] +name = "web_atoms" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "954c5a41f2bcb7314344079d0891505458cc2f4b422bdea1d5bfbe6d1a04903b" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] name = "webdriver" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/Cargo.toml b/Cargo.toml index c556bc2f246..eb83cd3dfa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ log = "0.4" mach2 = "0.4" malloc_size_of = { package = "servo_malloc_size_of", path = "components/malloc_size_of" } malloc_size_of_derive = "0.1" -markup5ever = "0.16" +markup5ever = "0.16.1" memmap2 = "0.9.5" mime = "0.3.13" mime_guess = "2.0.5" diff --git a/components/layout/dom.rs b/components/layout/dom.rs index 39cd74293c8..6db4dbccd41 100644 --- a/components/layout/dom.rs +++ b/components/layout/dom.rs @@ -7,7 +7,7 @@ use std::sync::Arc; use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut}; use base::id::{BrowsingContextId, PipelineId}; -use html5ever::{local_name, namespace_url, ns}; +use html5ever::{local_name, ns}; use pixels::Image; use script_layout_interface::wrapper_traits::{ LayoutDataTrait, LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode, diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index 9b33213335e..52d0ca7e20c 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -8,7 +8,7 @@ use std::mem; use devtools_traits::AttrInfo; use dom_struct::dom_struct; -use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns}; +use html5ever::{LocalName, Namespace, Prefix, ns}; use style::attr::{AttrIdentifier, AttrValue}; use style::values::GenericAtomIdent; use stylo_atoms::Atom; diff --git a/components/script/dom/bindings/constructor.rs b/components/script/dom/bindings/constructor.rs index 138dd4520d0..141fb8c1391 100644 --- a/components/script/dom/bindings/constructor.rs +++ b/components/script/dom/bindings/constructor.rs @@ -5,7 +5,7 @@ use std::ptr; use html5ever::interface::QualName; -use html5ever::{LocalName, local_name, namespace_url, ns}; +use html5ever::{LocalName, local_name, ns}; use js::conversions::ToJSValConvertible; use js::glue::{UnwrapObjectDynamic, UnwrapObjectStatic}; use js::jsapi::{CallArgs, CurrentGlobalOrNull, JSAutoRealm, JSObject}; diff --git a/components/script/dom/bindings/xmlname.rs b/components/script/dom/bindings/xmlname.rs index 31436278c12..af02569d9c4 100644 --- a/components/script/dom/bindings/xmlname.rs +++ b/components/script/dom/bindings/xmlname.rs @@ -4,7 +4,7 @@ //! Functions for validating and extracting qualified XML names. -use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns}; +use html5ever::{LocalName, Namespace, Prefix, ns}; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::str::DOMString; diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs index c2e038eb66b..5722dc4f6ac 100644 --- a/components/script/dom/create.rs +++ b/components/script/dom/create.rs @@ -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::{LocalName, Prefix, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, QualName, local_name, ns}; use js::rust::HandleObject; use servo_config::pref; diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs index 049e3c482a1..be672585529 100644 --- a/components/script/dom/customelementregistry.rs +++ b/components/script/dom/customelementregistry.rs @@ -9,7 +9,7 @@ use std::rc::Rc; use std::{mem, ptr}; use dom_struct::dom_struct; -use html5ever::{LocalName, Namespace, Prefix, namespace_url, ns}; +use html5ever::{LocalName, Namespace, Prefix, ns}; use js::conversions::ToJSValConvertible; use js::glue::UnwrapObjectStatic; use js::jsapi::{HandleValueArray, Heap, IsCallable, IsConstructor, JSAutoRealm, JSObject}; diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 0d39a12c15e..852a12fc7c5 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -37,7 +37,7 @@ use embedder_traits::{ }; use encoding_rs::{Encoding, UTF_8}; use euclid::default::{Point2D, Rect, Size2D}; -use html5ever::{LocalName, Namespace, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Namespace, QualName, local_name, ns}; use hyper_serde::Serde; use ipc_channel::ipc; use js::rust::{HandleObject, HandleValue}; diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs index 521febc17fc..a6c95fad820 100644 --- a/components/script/dom/domimplementation.rs +++ b/components/script/dom/domimplementation.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{local_name, namespace_url, ns}; +use html5ever::{local_name, ns}; use script_traits::DocumentActivity; use crate::document_loader::DocumentLoader; diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs index 8d479aba80d..83c3d09be23 100644 --- a/components/script/dom/domtokenlist.rs +++ b/components/script/dom/domtokenlist.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, namespace_url, ns}; +use html5ever::{LocalName, ns}; use style::str::HTML_SPACE_CHARACTERS; use stylo_atoms::Atom; diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 4aebe893bef..cf2c998e298 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -19,9 +19,7 @@ use embedder_traits::InputMethodType; use euclid::default::{Rect, Size2D}; use html5ever::serialize::TraversalScope; use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode}; -use html5ever::{ - LocalName, Namespace, Prefix, QualName, local_name, namespace_prefix, namespace_url, ns, -}; +use html5ever::{LocalName, Namespace, Prefix, QualName, local_name, namespace_prefix, ns}; use js::jsapi::Heap; use js::jsval::JSVal; use js::rust::HandleObject; diff --git a/components/script/dom/htmlaudioelement.rs b/components/script/dom/htmlaudioelement.rs index dbf0a88eb2a..938c2e7ccd6 100644 --- a/components/script/dom/htmlaudioelement.rs +++ b/components/script/dom/htmlaudioelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, QualName, local_name, ns}; use js::rust::HandleObject; use crate::dom::bindings::codegen::Bindings::ElementBinding::Element_Binding::ElementMethods; diff --git a/components/script/dom/htmlbaseelement.rs b/components/script/dom/htmlbaseelement.rs index 45a13f83772..9f263e1056c 100644 --- a/components/script/dom/htmlbaseelement.rs +++ b/components/script/dom/htmlbaseelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use servo_url::ServoUrl; diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index 5cd877cdf82..b4efba9bed9 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -4,7 +4,7 @@ use dom_struct::dom_struct; use embedder_traits::{EmbedderMsg, LoadStatus}; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use servo_url::ServoUrl; use style::attr::AttrValue; diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index 09d0ae6e73f..6f83360e187 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -6,7 +6,7 @@ use std::cell::Cell; use std::default::Default; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url}; +use html5ever::{LocalName, Prefix, local_name}; use js::rust::HandleObject; use stylo_dom::ElementState; diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index 77e8b412146..9e20539ceca 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -12,7 +12,7 @@ use constellation_traits::BlobImpl; use constellation_traits::ScriptToConstellationMessage; use dom_struct::dom_struct; use euclid::default::Size2D; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use image::codecs::jpeg::JpegEncoder; use image::codecs::png::PngEncoder; use image::codecs::webp::WebPEncoder; diff --git a/components/script/dom/htmldialogelement.rs b/components/script/dom/htmldialogelement.rs index 3872932049d..fbd84e4efd3 100644 --- a/components/script/dom/htmldialogelement.rs +++ b/components/script/dom/htmldialogelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use crate::dom::bindings::cell::DomRefCell; diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index 0cdfebf5342..9505d5182c7 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -7,7 +7,7 @@ use std::default::Default; use std::rc::Rc; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use script_layout_interface::QueryMsg; use style::attr::AttrValue; diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs index ee7015fb66d..fb02a10a4e4 100644 --- a/components/script/dom/htmlfontelement.rs +++ b/components/script/dom/htmlfontelement.rs @@ -4,7 +4,7 @@ use cssparser::match_ignore_ascii_case; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::AttrValue; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 1294e11043a..ce6dcca66f3 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -9,7 +9,7 @@ use constellation_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior}; use dom_struct::dom_struct; use encoding_rs::{Encoding, UTF_8}; use headers::{ContentType, HeaderMapExt}; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use http::Method; use js::rust::HandleObject; use mime::{self, Mime}; diff --git a/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs index b4845fc949c..7b2d715318f 100644 --- a/components/script/dom/htmlheadelement.rs +++ b/components/script/dom/htmlheadelement.rs @@ -4,7 +4,7 @@ use content_security_policy::{CspList, PolicyDisposition, PolicySource}; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index 5754b2f3dd3..c88a0fcf184 100644 --- a/components/script/dom/htmlhrelement.rs +++ b/components/script/dom/htmlhrelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmlhyperlinkelementutils.rs b/components/script/dom/htmlhyperlinkelementutils.rs index 52b16f796e5..699db4d62f4 100644 --- a/components/script/dom/htmlhyperlinkelementutils.rs +++ b/components/script/dom/htmlhyperlinkelementutils.rs @@ -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}; +use html5ever::{local_name, ns}; use servo_url::ServoUrl; use crate::dom::bindings::cell::DomRefCell; diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 33457cb29d4..c5194c4527f 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -13,7 +13,7 @@ use constellation_traits::{ }; use dom_struct::dom_struct; use embedder_traits::ViewportDetails; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use net_traits::ReferrerPolicy; use profile_traits::ipc as ProfiledIpc; diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index e6b4336fe54..adff445ae1c 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -14,7 +14,7 @@ use content_security_policy as csp; use cssparser::{Parser, ParserInput}; use dom_struct::dom_struct; use euclid::Point2D; -use html5ever::{LocalName, Prefix, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, QualName, local_name, ns}; use js::jsapi::JSAutoRealm; use js::rust::HandleObject; use mime::{self, Mime}; diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 42165499032..1999c7193ff 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -14,7 +14,7 @@ use std::{f64, ptr}; use dom_struct::dom_struct; use embedder_traits::{FilterPattern, InputMethodType}; use encoding_rs::Encoding; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::jsapi::{ ClippedTime, DateGetMsecSinceEpoch, Handle, JS_ClearPendingException, JSObject, NewDateObject, NewUCRegExpObject, ObjectIsDate, RegExpFlag_UnicodeSets, RegExpFlags, diff --git a/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs index efa386c7cdd..9733c3b7c6e 100644 --- a/components/script/dom/htmllabelelement.rs +++ b/components/script/dom/htmllabelelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::AttrValue; diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 969551f98c8..db5c14af450 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -10,7 +10,7 @@ use base::id::WebViewId; use content_security_policy as csp; use dom_struct::dom_struct; use embedder_traits::EmbedderMsg; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use net_traits::policy_container::PolicyContainer; use net_traits::request::{ diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index 8ddef6d33cb..c07f866ab41 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -16,7 +16,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, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use http::StatusCode; use http::header::{self, HeaderMap, HeaderValue}; use ipc_channel::ipc::{self, IpcSharedMemory, channel}; diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index 74b79fadad3..e94a5e1ff33 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::str::HTML_SPACE_CHARACTERS; diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index a6941461e5d..276bddca986 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -5,7 +5,7 @@ use std::default::Default; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use pixels::Image; use servo_arc::Arc; diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index d6e8be04b64..b573388c73a 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -6,7 +6,7 @@ use std::cell::Cell; use std::convert::TryInto; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, QualName, local_name, ns}; use js::rust::HandleObject; use style::str::{split_html_space_chars, str_join}; use stylo_dom::ElementState; diff --git a/components/script/dom/htmlslotelement.rs b/components/script/dom/htmlslotelement.rs index 022cbbf388a..68fa105e64d 100644 --- a/components/script/dom/htmlslotelement.rs +++ b/components/script/dom/htmlslotelement.rs @@ -5,7 +5,7 @@ use std::cell::{Cell, Ref, RefCell}; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::gc::RootedVec; use js::rust::HandleObject; use script_bindings::codegen::InheritTypes::{CharacterDataTypeId, NodeTypeId}; diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index 623dfdea54b..4f312e928c4 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmltablecolelement.rs b/components/script/dom/htmltablecolelement.rs index b2821fd38e2..c7ad4afd944 100644 --- a/components/script/dom/htmltablecolelement.rs +++ b/components/script/dom/htmltablecolelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index 6783da6e97d..c24ec5490c5 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -5,7 +5,7 @@ use std::cell::Cell; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto, parse_unsigned_integer}; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index a13238ca2e4..6c2d502ce88 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs index d97e7445590..60978c64fc1 100644 --- a/components/script/dom/htmltablesectionelement.rs +++ b/components/script/dom/htmltablesectionelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::color::AbsoluteColor; diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs index 2c98035736e..128309b816b 100644 --- a/components/script/dom/htmltemplateelement.rs +++ b/components/script/dom/htmltemplateelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, namespace_url}; +use html5ever::{LocalName, Prefix}; use js::rust::HandleObject; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs index 7f47ee5a90a..a7435b40fdd 100644 --- a/components/script/dom/htmltextareaelement.rs +++ b/components/script/dom/htmltextareaelement.rs @@ -7,7 +7,7 @@ use std::default::Default; use std::ops::Range; use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use style::attr::AttrValue; use stylo_dom::ElementState; diff --git a/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs index a6f9103200b..b707d9c93a1 100644 --- a/components/script/dom/htmlvideoelement.rs +++ b/components/script/dom/htmlvideoelement.rs @@ -8,7 +8,7 @@ use std::sync::Arc; use content_security_policy as csp; use dom_struct::dom_struct; use euclid::default::Size2D; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use ipc_channel::ipc; use js::rust::HandleObject; use net_traits::image_cache::{ diff --git a/components/script/dom/mutationobserver.rs b/components/script/dom/mutationobserver.rs index 558453f9235..473698d5df1 100644 --- a/components/script/dom/mutationobserver.rs +++ b/components/script/dom/mutationobserver.rs @@ -6,7 +6,7 @@ use std::cell::LazyCell; use std::rc::Rc; use dom_struct::dom_struct; -use html5ever::{LocalName, Namespace, namespace_url, ns}; +use html5ever::{LocalName, Namespace, ns}; use js::rust::HandleObject; use crate::dom::bindings::callback::ExceptionHandling; diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index bcaff69adb9..2a01370085a 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -21,7 +21,7 @@ use dom_struct::dom_struct; use embedder_traits::UntrustedNodeAddress; use euclid::default::{Rect, Size2D, Vector2D}; use html5ever::serialize::HtmlSerializer; -use html5ever::{Namespace, Prefix, QualName, namespace_url, ns, serialize as html_serialize}; +use html5ever::{Namespace, Prefix, QualName, ns, serialize as html_serialize}; use js::jsapi::JSObject; use js::rust::HandleObject; use libc::{self, c_void, uintptr_t}; diff --git a/components/script/dom/servoparser/async_html.rs b/components/script/dom/servoparser/async_html.rs index 7ddc425678e..1d6f4af0b01 100644 --- a/components/script/dom/servoparser/async_html.rs +++ b/components/script/dom/servoparser/async_html.rs @@ -18,9 +18,7 @@ use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts}; use html5ever::tree_builder::{ ElementFlags, NodeOrText as HtmlNodeOrText, QuirksMode, TreeBuilder, TreeBuilderOpts, TreeSink, }; -use html5ever::{ - Attribute as HtmlAttribute, ExpandedName, QualName, local_name, namespace_url, ns, -}; +use html5ever::{Attribute as HtmlAttribute, ExpandedName, QualName, local_name, ns}; use markup5ever::TokenizerResult; use servo_url::ServoUrl; use style::context::QuirksMode as ServoQuirksMode; diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs index 3bd486b5cb7..97856256268 100644 --- a/components/script/dom/servoparser/html.rs +++ b/components/script/dom/servoparser/html.rs @@ -12,7 +12,7 @@ use html5ever::serialize::TraversalScope::IncludeNode; use html5ever::serialize::{AttrRef, Serialize, Serializer, TraversalScope}; use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts}; use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts}; -use html5ever::{QualName, local_name, namespace_url, ns}; +use html5ever::{QualName, local_name, ns}; use markup5ever::TokenizerResult; use script_bindings::trace::CustomTraceable; use servo_url::ServoUrl; diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs index 970c1543d09..976c1c6eb79 100644 --- a/components/script/dom/servoparser/mod.rs +++ b/components/script/dom/servoparser/mod.rs @@ -17,7 +17,7 @@ use html5ever::buffer_queue::BufferQueue; use html5ever::tendril::fmt::UTF8; use html5ever::tendril::{ByteTendril, StrTendril, TendrilSink}; use html5ever::tree_builder::{ElementFlags, NodeOrText, QuirksMode, TreeSink}; -use html5ever::{Attribute, ExpandedName, LocalName, QualName, local_name, namespace_url, ns}; +use html5ever::{Attribute, ExpandedName, LocalName, QualName, local_name, ns}; use hyper_serde::Serde; use markup5ever::TokenizerResult; use mime::{self, Mime}; diff --git a/components/script/dom/svgelement.rs b/components/script/dom/svgelement.rs index 9a48653b768..9c8b990826d 100644 --- a/components/script/dom/svgelement.rs +++ b/components/script/dom/svgelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use script_bindings::str::DOMString; use stylo_dom::ElementState; diff --git a/components/script/dom/svgsvgelement.rs b/components/script/dom/svgsvgelement.rs index 61b90a5ef39..12b7fa6bc71 100644 --- a/components/script/dom/svgsvgelement.rs +++ b/components/script/dom/svgsvgelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use dom_struct::dom_struct; -use html5ever::{LocalName, Prefix, local_name, namespace_url, ns}; +use html5ever::{LocalName, Prefix, local_name, ns}; use js::rust::HandleObject; use script_layout_interface::SVGSVGData; use style::attr::AttrValue; diff --git a/components/script/dom/trustedtypepolicyfactory.rs b/components/script/dom/trustedtypepolicyfactory.rs index 64ae1f8ab11..7735b4b4aaa 100644 --- a/components/script/dom/trustedtypepolicyfactory.rs +++ b/components/script/dom/trustedtypepolicyfactory.rs @@ -5,7 +5,7 @@ use std::cell::RefCell; use content_security_policy::CheckResult; use dom_struct::dom_struct; -use html5ever::{LocalName, Namespace, QualName, local_name, namespace_url, ns}; +use html5ever::{LocalName, Namespace, QualName, local_name, ns}; use js::rust::HandleValue; use crate::dom::bindings::codegen::Bindings::TrustedTypePolicyFactoryBinding::{ diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs index ce7ca96f464..9b50c9f3a2b 100644 --- a/components/script/layout_dom/element.rs +++ b/components/script/layout_dom/element.rs @@ -8,7 +8,7 @@ use std::{fmt, slice}; use atomic_refcell::{AtomicRef, AtomicRefMut}; use embedder_traits::UntrustedNodeAddress; -use html5ever::{LocalName, Namespace, local_name, namespace_url, ns}; +use html5ever::{LocalName, Namespace, local_name, ns}; use js::jsapi::JSObject; use script_layout_interface::wrapper_traits::{ LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode, diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs index 213070181ef..9d36f73bbc0 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -10,7 +10,7 @@ use std::sync::Arc as StdArc; use base::id::{BrowsingContextId, PipelineId}; use fonts_traits::ByteIndex; -use html5ever::{local_name, namespace_url, ns}; +use html5ever::{local_name, ns}; use pixels::{Image, ImageMetadata}; use range::Range; use script_layout_interface::wrapper_traits::{LayoutDataTrait, LayoutNode, ThreadSafeLayoutNode}; diff --git a/components/script/links.rs b/components/script/links.rs index f7094adbfde..f38ba6f7767 100644 --- a/components/script/links.rs +++ b/components/script/links.rs @@ -5,7 +5,7 @@ //! Defines shared hyperlink behaviour for `<link>`, `<a>`, `<area>` and `<form>` elements. use constellation_traits::{LoadData, LoadOrigin, NavigationHistoryBehavior}; -use html5ever::{local_name, namespace_url, ns}; +use html5ever::{local_name, ns}; use malloc_size_of::malloc_size_of_is_0; use net_traits::request::Referrer; use style::str::HTML_SPACE_CHARACTERS; diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index bec4d59be0f..57660ad96fb 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -57,7 +57,7 @@ use euclid::Point2D; use euclid::default::Rect; use fonts::{FontContext, SystemFontServiceProxy}; use headers::{HeaderMapExt, LastModified, ReferrerPolicy as ReferrerPolicyHeader}; -use html5ever::{local_name, namespace_url, ns}; +use html5ever::{local_name, ns}; use http::header::REFRESH; use hyper_serde::Serde; use ipc_channel::ipc; diff --git a/components/script/xpath/eval.rs b/components/script/xpath/eval.rs index 9c95c3d8699..75d7ac5849c 100644 --- a/components/script/xpath/eval.rs +++ b/components/script/xpath/eval.rs @@ -4,7 +4,7 @@ use std::fmt; -use html5ever::{QualName, local_name, namespace_prefix, namespace_url, ns}; +use html5ever::{QualName, local_name, namespace_prefix, ns}; use super::parser::{ AdditiveOp, Axis, EqualityOp, Expr, FilterExpr, KindTest, Literal, MultiplicativeOp, NodeTest, |