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
|
@ -32,7 +32,7 @@ use dom::bindings::error::Error::NoModificationAllowed;
|
|||
use dom::bindings::js::{JS, LayoutJS, MutNullableHeap};
|
||||
use dom::bindings::js::{Root, RootedReference};
|
||||
use dom::bindings::trace::RootedVec;
|
||||
use dom::bindings::utils::{xml_name_type, validate_and_extract};
|
||||
use dom::bindings::utils::{namespace_from_domstring, xml_name_type, validate_and_extract};
|
||||
use dom::bindings::utils::XMLName::InvalidXMLName;
|
||||
use dom::create::create_element;
|
||||
use dom::domrect::DOMRect;
|
||||
|
@ -67,7 +67,6 @@ use style::properties::longhands::{self, border_spacing, height};
|
|||
use style::values::CSSFloat;
|
||||
use style::values::specified::{self, CSSColor, CSSRGBA};
|
||||
use util::geometry::Au;
|
||||
use util::namespace;
|
||||
use util::str::{DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
use cssparser::Color;
|
||||
|
@ -1203,7 +1202,7 @@ impl<'a> ElementMethods for &'a Element {
|
|||
fn GetAttributeNS(self,
|
||||
namespace: Option<DOMString>,
|
||||
local_name: DOMString) -> Option<DOMString> {
|
||||
let namespace = &namespace::from_domstring(namespace);
|
||||
let namespace = &namespace_from_domstring(namespace);
|
||||
self.get_attribute(namespace, &Atom::from_slice(&local_name))
|
||||
.map(|attr| attr.r().Value())
|
||||
}
|
||||
|
@ -1255,7 +1254,7 @@ impl<'a> ElementMethods for &'a Element {
|
|||
fn RemoveAttributeNS(self,
|
||||
namespace: Option<DOMString>,
|
||||
local_name: DOMString) {
|
||||
let namespace = namespace::from_domstring(namespace);
|
||||
let namespace = namespace_from_domstring(namespace);
|
||||
let local_name = Atom::from_slice(&local_name);
|
||||
self.remove_attribute(&namespace, &local_name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue