aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-04-06 15:16:39 -0500
committerbors-servo <metajack+bors@gmail.com>2015-04-06 15:16:39 -0500
commit3c5c2f416b6a0584758ac98c3d984288cad80aba (patch)
tree309119273d29a75b9877fa59196060cd8cd397e3 /components/script/dom/document.rs
parentc070ad61963963de2e0d2b35aedb1e187bbb7d4b (diff)
parente398725242b90ec9aef496d611ab7e64ada358e4 (diff)
downloadservo-3c5c2f416b6a0584758ac98c3d984288cad80aba.tar.gz
servo-3c5c2f416b6a0584758ac98c3d984288cad80aba.zip
Auto merge of #5529 - ehegnes:issue-5521, r=jdm
Fixes #5521
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index dcf96d66399..7e8a570960d 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -21,7 +21,7 @@ use dom::bindings::codegen::InheritTypes::{HTMLFormElementDerived, HTMLImageElem
use dom::bindings::codegen::InheritTypes::{HTMLScriptElementDerived};
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::error::Error::{NotSupported, InvalidCharacter, Security};
-use dom::bindings::error::Error::{HierarchyRequest, NamespaceError};
+use dom::bindings::error::Error::{HierarchyRequest, Namespace};
use dom::bindings::global::GlobalRef;
use dom::bindings::js::{MutNullableJS, JS, JSRef, LayoutJS, Temporary, TemporaryPushable};
use dom::bindings::js::{OptionalRootable, RootedReference};
@@ -983,7 +983,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
},
Name => {
debug!("Not a valid qualified element name");
- return Err(NamespaceError);
+ return Err(Namespace);
},
QName => {}
}
@@ -993,12 +993,12 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
// throw if prefix is not null and namespace is null
(&ns!(""), Some(_), _) => {
debug!("Namespace can't be null with a non-null prefix");
- return Err(NamespaceError);
+ return Err(Namespace);
},
// throw if prefix is "xml" and namespace is not the XML namespace
(_, Some(ref prefix), _) if "xml" == *prefix && ns != ns!(XML) => {
debug!("Namespace must be the xml namespace if the prefix is 'xml'");
- return Err(NamespaceError);
+ return Err(Namespace);
},
// throw if namespace is the XMLNS namespace and neither qualifiedName nor prefix is
// "xmlns"
@@ -1006,7 +1006,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
(&ns!(XMLNS), _, "xmlns") => {},
(&ns!(XMLNS), _, _) => {
debug!("The prefix or the qualified name must be 'xmlns' if namespace is the XMLNS namespace ");
- return Err(NamespaceError);
+ return Err(Namespace);
},
_ => {}
}