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

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: Rebase 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
« no previous file with comments | « Source/core/layout/LayoutImage.cpp ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutInline.cpp
diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp
index e7181fcb464e621052607e9be7e80fea40193c64..032d52b58e8192d6252e4442f4caefc781f801c5 100644
--- a/Source/core/layout/LayoutInline.cpp
+++ b/Source/core/layout/LayoutInline.cpp
@@ -215,7 +215,7 @@ void LayoutInline::styleDidChange(StyleDifference diff, const ComputedStyle* old
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)
« no previous file with comments | « Source/core/layout/LayoutImage.cpp ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698