diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2016-10-25 13:52:27 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2016-10-27 09:15:33 -0700 |
commit | 97fd61f51260c273882e37cad76156d84ce909a3 (patch) | |
tree | 3705acdb89284cedf3b3820fbbef94588e2a3725 /components/script/layout_wrapper.rs | |
parent | 6b40f97289c4c5a20b539992c3d511b3bf470f28 (diff) | |
download | servo-97fd61f51260c273882e37cad76156d84ce909a3.tar.gz servo-97fd61f51260c273882e37cad76156d84ce909a3.zip |
Eliminate untraversed node types from LayoutNodeType.
MozReview-Commit-ID: 926ReI1BSsf
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r-- | components/script/layout_wrapper.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index 4d615d2a50e..cad48e36a64 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -783,15 +783,16 @@ impl<'ln> ServoThreadSafeLayoutNode<'ln> { impl<'ln> NodeInfo for ServoThreadSafeLayoutNode<'ln> { fn is_element(&self) -> bool { - if let Some(LayoutNodeType::Element(_)) = self.type_id() { true } else { false } + self.pseudo == PseudoElementType::Normal && self.node.is_element() } fn is_text_node(&self) -> bool { - if let Some(LayoutNodeType::Text) = self.type_id() { true } else { false } + self.pseudo == PseudoElementType::Normal && self.node.is_text_node() } fn needs_layout(&self) -> bool { - self.pseudo != PseudoElementType::Normal || self.is_element() || self.is_text_node() + self.pseudo != PseudoElementType::Normal || + self.node.is_element() || self.node.is_text_node() } } |