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

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

Issue 2398293003: Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: Clear nextTextSibling pointer where there is a LayoutObject between the element and text node Created 4 years, 2 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
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 083ed51d91f4be61eec1603eeb3ac754d5ea3198..58ad8477e42112a140c1458b53eaf47fff7d2dcc 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1779,6 +1779,8 @@ static void assertLayoutTreeUpdated(Node& root) {
continue;
DCHECK(!node.needsStyleRecalc());
DCHECK(!node.childNeedsStyleRecalc());
+ DCHECK(!node.needsReattachLayoutTree());
+ DCHECK(!node.childNeedsReattachLayoutTree());
DCHECK(!node.childNeedsDistributionRecalc());
DCHECK(!node.needsStyleInvalidation());
DCHECK(!node.childNeedsStyleInvalidation());
@@ -1912,6 +1914,7 @@ void Document::updateStyle() {
}
clearNeedsStyleRecalc();
+ clearNeedsReattachLayoutTree();
StyleResolver& resolver = ensureStyleResolver();
@@ -1934,6 +1937,7 @@ void Document::updateStyle() {
// LayoutTreeConstruction.
m_nonAttachedStyle.clear();
clearChildNeedsStyleRecalc();
+ clearChildNeedsReattachLayoutTree();
resolver.clearStyleSharingList();
@@ -1941,6 +1945,8 @@ void Document::updateStyle() {
DCHECK(!needsStyleRecalc());
DCHECK(!childNeedsStyleRecalc());
+ DCHECK(!needsReattachLayoutTree());
+ DCHECK(!childNeedsReattachLayoutTree());
DCHECK(inStyleRecalc());
DCHECK_EQ(styleResolver(), &resolver);
DCHECK(m_nonAttachedStyle.isEmpty());

Powered by Google App Engine
This is Rietveld 408576698