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

Unified Diff: Source/core/layout/LayoutObject.h

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/LayoutObject.h
diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h
index 89bc6dcc4e991f9e3f987381e63c16546707dc03..54e1cba8f41a2123c4c506d03d938979ee77a2e2 100644
--- a/Source/core/layout/LayoutObject.h
+++ b/Source/core/layout/LayoutObject.h
@@ -441,7 +441,7 @@ public:
{
m_bitfields.setAncestorLineBoxDirty(value);
if (value)
- setNeedsLayoutAndFullPaintInvalidation();
+ setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::LineBoxesChanged);
}
enum FlowThreadState {
@@ -660,8 +660,8 @@ public:
Element* offsetParent() const;
void markContainerChainForLayout(bool scheduleRelayout = true, LayoutObject* newRoot = 0, SubtreeLayoutScope* = 0);
- void setNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0);
- void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0);
+ void setNeedsLayout(LayoutInvalidationReasonForTracing, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0);
+ void setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTracing, MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0);
void clearNeedsLayout();
void setChildNeedsLayout(MarkingBehavior = MarkContainerChain, SubtreeLayoutScope* = 0);
void setNeedsPositionedMovementLayout();
@@ -669,14 +669,14 @@ public:
void clearPreferredLogicalWidthsDirty();
void invalidateContainerPreferredLogicalWidths();
- void setNeedsLayoutAndPrefWidthsRecalc()
+ void setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReasonForTracing reason)
{
- setNeedsLayout();
+ setNeedsLayout(reason);
setPreferredLogicalWidthsDirty();
}
- void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation()
+ void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReasonForTracing reason)
{
- setNeedsLayoutAndFullPaintInvalidation();
+ setNeedsLayoutAndFullPaintInvalidation(reason);
setPreferredLogicalWidthsDirty();
}
@@ -1496,13 +1496,13 @@ inline bool LayoutObject::isBeforeOrAfterContent() const
// setNeedsLayout() won't cause full paint invalidations as
// setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are identical.
-inline void LayoutObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
+inline void LayoutObject::setNeedsLayout(LayoutInvalidationReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* layouter)
{
TRACE_EVENT_INSTANT1(
TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
"LayoutInvalidationTracking",
"data",
- InspectorLayoutInvalidationTrackingEvent::data(this));
+ InspectorLayoutInvalidationTrackingEvent::data(this, reason));
ASSERT(!isSetNeedsLayoutForbidden());
bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
setSelfNeedsLayout(true);
@@ -1512,9 +1512,9 @@ inline void LayoutObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
}
}
-inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
+inline void LayoutObject::setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReasonForTracing reason, MarkingBehavior markParents, SubtreeLayoutScope* layouter)
{
- setNeedsLayout(markParents, layouter);
+ setNeedsLayout(reason, markParents, layouter);
setShouldDoFullPaintInvalidation();
}

Powered by Google App Engine
This is Rietveld 408576698