diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-11-30 13:45:10 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-12-01 11:55:12 +0100 |
commit | a377caa7e9d68a97156b968964bb7bc18444d13d (patch) | |
tree | 641565a14fcfa891e2052797b8af32f0495305b0 /components/script/dom/node.rs | |
parent | 2fcb908daa694c31d5851f03b8d52c938a9c1304 (diff) | |
download | servo-a377caa7e9d68a97156b968964bb7bc18444d13d.tar.gz servo-a377caa7e9d68a97156b968964bb7bc18444d13d.zip |
Make Element::prefix return an Option<&DOMString>
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 2985ad80cb3..f47d2583ae5 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1738,7 +1738,7 @@ impl Node { local: element.local_name().clone() }; let element = Element::create(name, - element.prefix().as_ref().map(|p| Prefix::from(&**p)), + element.prefix().map(|p| Prefix::from(&**p)), &document, ElementCreator::ScriptCreated); Root::upcast::<Node>(element) }, @@ -1827,7 +1827,7 @@ impl Node { NodeTypeId::Element(_) => { let element = node.downcast::<Element>().unwrap(); // Step 1. - if *element.namespace() != ns!() && *element.prefix() == prefix { + if *element.namespace() != ns!() && element.prefix() == prefix.as_ref() { return element.namespace().clone() } @@ -2236,7 +2236,7 @@ impl NodeMethods for Node { let element = node.downcast::<Element>().unwrap(); let other_element = other.downcast::<Element>().unwrap(); (*element.namespace() == *other_element.namespace()) && - (*element.prefix() == *other_element.prefix()) && + (element.prefix() == other_element.prefix()) && (*element.local_name() == *other_element.local_name()) && (element.attrs().len() == other_element.attrs().len()) } |