Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2836753002: Rebuild layout tree in flat tree order. (Closed)
Patch Set: Rebased Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
index beb514fe4849554b3b0eb6c31fa82de33399386d..12eec94cb5b617d39bc22179f0aaa73672cff0c4 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -200,6 +200,18 @@ void HTMLSlotElement::DetachLayoutTree(const AttachContext& context) {
HTMLElement::DetachLayoutTree(context);
}
+void HTMLSlotElement::RebuildDistributedChildrenLayoutTrees() {
+ if (!SupportsDistribution())
+ return;
+ 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 (auto it = distributed_nodes_.rbegin(); it != distributed_nodes_.rend();
+ ++it) {
+ RebuildLayoutTreeForChild(*it, next_text_sibling);
+ }
+}
+
void HTMLSlotElement::AttributeChanged(
const AttributeModificationParams& params) {
if (params.name == nameAttr) {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698