diff options
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/layout_wrapper.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index ea22a85c5c5..19e6c7c4e79 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -734,9 +734,14 @@ impl<'ln> NodeInfo for ServoThreadSafeLayoutNode<'ln> { fn is_element(&self) -> bool { if let Some(LayoutNodeType::Element(_)) = self.type_id() { true } else { false } } + fn is_text_node(&self) -> bool { if let Some(LayoutNodeType::Text) = self.type_id() { true } else { false } } + + fn needs_layout(&self) -> bool { + self.pseudo != PseudoElementType::Normal || self.is_element() || self.is_text_node() + } } impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> { |