servo: Merge #13934 - Only traverse elements from style (from bholley:skip_text_nodes); r=emilio
This is part of the new incremental restyle architecture work. I have patches to element-ify things more, but want to get this in the tree first. Source-Repo: https://github.com/servo/servo Source-Revision: 87ef5487179a5b4c556361ad0c77c798b1edd4e1
This commit is contained in:
@@ -1472,13 +1472,6 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
|
||||
}
|
||||
Some(LayoutNodeType::Text) =>
|
||||
(display::T::inline, float::T::none, position::T::static_),
|
||||
Some(LayoutNodeType::Comment) |
|
||||
Some(LayoutNodeType::ProcessingInstruction) |
|
||||
Some(LayoutNodeType::DocumentType) |
|
||||
Some(LayoutNodeType::DocumentFragment) |
|
||||
Some(LayoutNodeType::Document) => {
|
||||
(display::T::none, float::T::none, position::T::static_)
|
||||
}
|
||||
};
|
||||
|
||||
debug!("building flow for node: {:?} {:?} {:?} {:?}", display, float, positioning, node.type_id());
|
||||
@@ -1615,12 +1608,7 @@ impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode
|
||||
where ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode {
|
||||
fn is_replaced_content(&self) -> bool {
|
||||
match self.type_id() {
|
||||
Some(LayoutNodeType::Comment) |
|
||||
Some(LayoutNodeType::ProcessingInstruction) |
|
||||
Some(LayoutNodeType::Text) |
|
||||
Some(LayoutNodeType::DocumentType) |
|
||||
Some(LayoutNodeType::DocumentFragment) |
|
||||
Some(LayoutNodeType::Document) |
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLImageElement)) |
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLIFrameElement)) |
|
||||
Some(LayoutNodeType::Element(LayoutElementType::HTMLCanvasElement)) |
|
||||
|
||||
Reference in New Issue
Block a user