Index: third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
diff --git a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
index 394bb2a334a381594ffe03ffe4559e235e8a900d..788db882618804cf93a6645389e8fd7fdeeafa24 100644 |
--- a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
+++ b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
@@ -121,6 +121,14 @@ void InsertionPoint::DetachLayoutTree(const AttachContext& context) { |
HTMLElement::DetachLayoutTree(context); |
} |
+void InsertionPoint::RebuildDistributedChildrenLayoutTrees() { |
+ Text* next_text_sibling = nullptr; |
+ // This loop traverses the nodes from right to left for the same reason as the |
+ // one described in ContainerNode::RebuildChildrenLayoutTrees(). |
+ for (size_t i = distributed_nodes_.size(); i > 0; --i) |
+ RebuildLayoutTreeForChild(distributed_nodes_.at(i - 1), next_text_sibling); |
+} |
+ |
void InsertionPoint::WillRecalcStyle(StyleRecalcChange change) { |
StyleChangeType style_change_type = kNoStyleChange; |