aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/layout_dom/node.rs')
-rw-r--r--components/script/layout_dom/node.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs
index fdbe615513c..f4e014a6a1b 100644
--- a/components/script/layout_dom/node.rs
+++ b/components/script/layout_dom/node.rs
@@ -313,6 +313,11 @@ impl<'dom> ThreadSafeLayoutNode<'dom> for ServoThreadSafeLayoutNode<'dom> {
})
}
+ fn as_html_element(&self) -> Option<ServoThreadSafeLayoutElement<'dom>> {
+ self.as_element()
+ .filter(|element| element.element.is_html_element())
+ }
+
fn style_data(&self) -> Option<&'dom StyleData> {
self.node.style_data()
}