aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltableelement.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2019-03-10 13:20:07 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2019-03-10 17:51:35 +0100
commit5fe5e5d6debef5adf234b650ee1b758e683a5230 (patch)
treee4b761bb1bb074acbe6d580066ca54bd23a9c793 /components/script/dom/htmltableelement.rs
parent7bdfad92a5a2bf34fcabb38f99789b3f5d7989af (diff)
downloadservo-5fe5e5d6debef5adf234b650ee1b758e683a5230.tar.gz
servo-5fe5e5d6debef5adf234b650ee1b758e683a5230.zip
Remove most RootedReference uses
We can replace all uses of RootedReference for Option<T> by Option::deref calls.
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-rw-r--r--components/script/dom/htmltableelement.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index 98a0b8226cd..c27aa17d39e 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -9,7 +9,7 @@ use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableE
use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
use crate::dom::bindings::inheritance::Castable;
-use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -119,7 +119,7 @@ impl HTMLTableElement {
if let Some(section) = section {
let reference_element = node.child_elements().find(reference_predicate);
- let reference_node = reference_element.r().map(|e| e.upcast());
+ let reference_node = reference_element.as_ref().map(|e| e.upcast());
node.InsertBefore(section.upcast(), reference_node)?;
}
@@ -190,7 +190,7 @@ impl HTMLTableElementMethods for HTMLTableElement {
if let Some(caption) = new_caption {
let node = self.upcast::<Node>();
- node.InsertBefore(caption.upcast(), node.GetFirstChild().r())
+ node.InsertBefore(caption.upcast(), node.GetFirstChild().deref())
.expect("Insertion failed");
}
}
@@ -281,7 +281,7 @@ impl HTMLTableElementMethods for HTMLTableElement {
fn filter(&self, elem: &Element, root: &Node) -> bool {
elem.is::<HTMLTableSectionElement>() &&
elem.local_name() == &local_name!("tbody") &&
- elem.upcast::<Node>().GetParentNode().r() == Some(root)
+ elem.upcast::<Node>().GetParentNode().deref() == Some(root)
}
}
@@ -303,7 +303,7 @@ impl HTMLTableElementMethods for HTMLTableElement {
.find(|n| n.is::<HTMLTableSectionElement>() && n.local_name() == &local_name!("tbody"));
let reference_element = last_tbody.and_then(|t| t.upcast::<Node>().GetNextSibling());
- node.InsertBefore(tbody.upcast(), reference_element.r())
+ node.InsertBefore(tbody.upcast(), reference_element.deref())
.expect("Insertion failed");
tbody
}