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

Unified Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Address esprehn's comments Created 4 years 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
Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index 8e46d3dcbe026f9a26ed270f24ef6521456dc4b5..36f26a6f4b521a603af8da9c5399744e08274ed9 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -1297,6 +1297,23 @@ void ContainerNode::recalcDescendantStyles(StyleRecalcChange change) {
}
}
+void ContainerNode::rebuildChildrenLayoutTrees() {
+ DCHECK(!needsStyleRecalc());
+ DCHECK(!needsReattachLayoutTree());
+
+ for (Node* child = firstChild(); child; child = child->nextSibling()) {
+ if (child->needsReattachLayoutTree() ||
+ child->childNeedsReattachLayoutTree()) {
+ if (child->isTextNode())
+ toText(child)->rebuildTextLayoutTree();
+ else if (child->isElementNode())
+ toElement(child)->rebuildLayoutTree();
+ }
+ }
+ clearChildNeedsStyleRecalc();
esprehn 2016/12/14 04:30:47 I don't think you need to clear this bit, it shoul
nainar 2016/12/14 22:21:54 Done.
+ clearChildNeedsReattachLayoutTree();
+}
+
void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType,
Element* changedElement,
Node* nodeBeforeChange,

Powered by Google App Engine
This is Rietveld 408576698