aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorAnthony Ramine <nox@nox.paris>2020-03-31 22:06:26 +0200
committerAnthony Ramine <nox@nox.paris>2020-03-31 22:06:40 +0200
commitf014da9565a491455c8cf0570a4bde9ec6328c35 (patch)
tree988013ec46d959aa220ecdf3850a56c44cccc5d4 /components/script/dom/node.rs
parent9c8540af5c37c7df2d4c0dff27ca76e36a6e6c02 (diff)
downloadservo-f014da9565a491455c8cf0570a4bde9ec6328c35.tar.gz
servo-f014da9565a491455c8cf0570a4bde9ec6328c35.zip
Introduce LayoutDom::is
Just like Castable::is.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 5f8d518b514..eaceeb9ea2c 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1316,7 +1316,7 @@ pub trait LayoutNodeHelpers<'dom> {
unsafe fn owner_doc_for_layout(self) -> LayoutDom<'dom, Document>;
fn containing_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>>;
- unsafe fn is_element_for_layout(self) -> bool;
+ fn is_element_for_layout(self) -> bool;
unsafe fn get_flag(self, flag: NodeFlags) -> bool;
unsafe fn set_flag(self, flag: NodeFlags, value: bool);
@@ -1347,9 +1347,8 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> {
}
#[inline]
- #[allow(unsafe_code)]
- unsafe fn is_element_for_layout(self) -> bool {
- (*self.unsafe_get()).is::<Element>()
+ fn is_element_for_layout(self) -> bool {
+ self.is::<Element>()
}
#[inline]