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

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: 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/LayoutMultiColumnFlowThread.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.h
diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h
index 50556d1239ee4bbb7565db4731578558832b5687..5d18533e533c15ba4cdd1d204800d978a415f0f8 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();
}
@@ -1500,25 +1500,25 @@ 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));
ASSERT(!isSetNeedsLayoutForbidden());
bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
setSelfNeedsLayout(true);
if (!alreadyNeededLayout) {
+ TRACE_EVENT_INSTANT1(
+ TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
+ "LayoutInvalidationTracking",
+ "data",
+ InspectorLayoutInvalidationTrackingEvent::data(this, reason));
if (markParents == MarkContainerChain && (!layouter || layouter->root() != this))
markContainerChainForLayout(true, 0, layouter);
}
}
-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();
}
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698