aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorPrabhjyot Singh Sodhi <prabhjyotsingh95@gmail.com>2015-09-02 14:44:39 +0530
committerPrabhjyot Singh Sodhi <prabhjyotsingh95@gmail.com>2015-09-02 22:20:33 +0530
commit105ea0d6906f72797cff930d2712e9230f051cc2 (patch)
tree6bad3aca168a39c89ef283d354fe6916d837ec21 /components/script/dom/document.rs
parenteaf90c0b1c14717fb580bb0bdb8f6c4db363ace6 (diff)
downloadservo-105ea0d6906f72797cff930d2712e9230f051cc2.tar.gz
servo-105ea0d6906f72797cff930d2712e9230f051cc2.zip
renaming tokens(), atom() and uint() and rewriting to return or panic
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 7441a14bcae..fb85cdb980b 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -1762,10 +1762,10 @@ impl DocumentMethods for Document {
match html_elem_type {
HTMLElementTypeId::HTMLAppletElement => {
match elem.get_attribute(&ns!(""), &atom!("name")) {
- Some(ref attr) if attr.r().value().atom() == Some(name) => true,
+ Some(ref attr) if attr.r().value().as_atom() == name => true,
_ => {
match elem.get_attribute(&ns!(""), &atom!("id")) {
- Some(ref attr) => attr.r().value().atom() == Some(name),
+ Some(ref attr) => attr.r().value().as_atom() == name,
None => false,
}
},
@@ -1773,18 +1773,18 @@ impl DocumentMethods for Document {
},
HTMLElementTypeId::HTMLFormElement => {
match elem.get_attribute(&ns!(""), &atom!("name")) {
- Some(ref attr) => attr.r().value().atom() == Some(name),
+ Some(ref attr) => attr.r().value().as_atom() == name,
None => false,
}
},
HTMLElementTypeId::HTMLImageElement => {
match elem.get_attribute(&ns!(""), &atom!("name")) {
Some(ref attr) => {
- if attr.r().value().atom() == Some(name) {
+ if attr.r().value().as_atom() == name {
true
} else {
match elem.get_attribute(&ns!(""), &atom!("id")) {
- Some(ref attr) => attr.r().value().atom() == Some(name),
+ Some(ref attr) => attr.r().value().as_atom() == name,
None => false,
}
}