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

Unified Diff: Source/core/layout/LayoutInline.cpp

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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: Source/core/layout/LayoutInline.cpp
diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp
index 7e1293466b783915cfffa841b35a60e79fd3c5d2..821af2badc34caefd10082270194a3da7848e71f 100644
--- a/Source/core/layout/LayoutInline.cpp
+++ b/Source/core/layout/LayoutInline.cpp
@@ -215,7 +215,7 @@ void LayoutInline::styleDidChange(StyleDifference diff, const LayoutStyle* oldSt
bool alwaysCreateLineBoxesNew = hasSelfPaintingLayer() || hasBoxDecorationBackground() || newStyle.hasPadding() || newStyle.hasMargin() || newStyle.hasOutline();
if (oldStyle && alwaysCreateLineBoxesNew) {
dirtyLineBoxes(false);
- setNeedsLayoutAndFullPaintInvalidation();
+ setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::StyleChange);
}
setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew);
}
@@ -353,7 +353,7 @@ void LayoutInline::addChildIgnoringContinuation(LayoutObject* newChild, LayoutOb
LayoutBoxModelObject::addChild(newChild, beforeChild);
- newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::ChildChanged);
}
LayoutInline* LayoutInline::clone() const
@@ -493,7 +493,7 @@ void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox
LayoutObject* no = o;
o = no->nextSibling();
pre->children()->appendChildNode(pre, block->children()->removeChildNode(block, no));
- no->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ no->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::AnonymousBlockChange);
}
}
@@ -508,9 +508,9 @@ void LayoutInline::splitFlow(LayoutObject* beforeChild, LayoutBlock* newBlockBox
// Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
// get deleted properly. Because objects moves from the pre block into the post block, we want to
// make new line boxes instead of leaving the old line boxes around.
- pre->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
- block->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
- post->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ pre->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::AnonymousBlockChange);
+ block->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::AnonymousBlockChange);
+ post->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::AnonymousBlockChange);
}
void LayoutInline::addChildToContinuation(LayoutObject* newChild, LayoutObject* beforeChild)

Powered by Google App Engine
This is Rietveld 408576698