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(); |
} |