mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove string_cache dependency from util.
Move `namespace::from_domstring` from util to script::dom, because it is used only in that crate.
This commit is contained in:
parent
efa60d3a24
commit
13072c7b0c
11 changed files with 21 additions and 42 deletions
|
@ -8,10 +8,9 @@ use dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods;
|
|||
use dom::bindings::error::{Error, Fallible};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::utils::{namespace_from_domstring, Reflector, reflect_dom_object};
|
||||
use dom::element::{AttributeHandlers, Element, ElementHelpers};
|
||||
use dom::window::Window;
|
||||
use util::namespace;
|
||||
use util::str::DOMString;
|
||||
|
||||
use string_cache::Atom;
|
||||
|
@ -69,7 +68,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
let ns = namespace::from_domstring(namespace);
|
||||
let ns = namespace_from_domstring(namespace);
|
||||
owner.get_attribute(&ns, &Atom::from_slice(&local_name))
|
||||
}
|
||||
|
||||
|
@ -88,7 +87,7 @@ impl<'a> NamedNodeMapMethods for &'a NamedNodeMap {
|
|||
let owner = self.owner.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let owner = owner.r();
|
||||
let ns = namespace::from_domstring(namespace);
|
||||
let ns = namespace_from_domstring(namespace);
|
||||
owner.remove_attribute(&ns, &Atom::from_slice(&local_name)).ok_or(Error::NotFound)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue