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

Unified Diff: Source/core/inspector/InspectorTraceEvents.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/inspector/InspectorTraceEvents.h ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTraceEvents.cpp
diff --git a/Source/core/inspector/InspectorTraceEvents.cpp b/Source/core/inspector/InspectorTraceEvents.cpp
index 555e0b7359835dd7fc1886cd459e555ad24a8482..8ea63481dec91bdd5131778988a32478910caad7 100644
--- a/Source/core/inspector/InspectorTraceEvents.cpp
+++ b/Source/core/inspector/InspectorTraceEvents.cpp
@@ -321,12 +321,48 @@ PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutEvent::endData(L
return value.release();
}
-PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutInvalidationTrackingEvent::data(const LayoutObject* renderer)
+namespace LayoutInvalidationReason {
+const char Unknown[] = "Unknown";
+const char SizeChanged[] = "Size changed";
+const char AncestorMoved[] = "Ancestor moved";
+const char StyleChange[] = "Style changed";
+const char DomChanged[] = "DOM changed";
+const char TextChanged[] = "Text changed";
+const char PrintingChanged[] = "Printing changed";
+const char AttributeChanged[] = "Attribute changed";
+const char ColumnsChanged[] = "Attribute changed";
+const char ChildAnonymousBlockChanged[] = "Child anonymous block changed";
+const char AnonymousBlockChange[] = "Anonymous block change";
+const char Fullscreen[] = "Fullscreen change";
+const char ChildChanged[] = "Child changed";
+const char ListValueChange[] = "List value change";
+const char ImageChanged[] = "Image changed";
+const char LineBoxesChanged[] = "Line boxes changed";
+const char SliderValueChanged[] = "Slider value changed";
+const char AncestorMarginCollapsing[] = "Ancestor margin collapsing";
+const char FieldsetChanged[] = "Fieldset changed";
+const char TextAutosizing[] = "Text autosizing (font boosting)";
+const char SvgResourceInvalidated[] = "SVG resource invalidated";
+const char FloatDescendantChanged[] = "Floating descendant changed";
+const char CountersChanged[] = "Counters changed";
+const char GridChanged[] = "Grid changed";
+const char MenuWidthChanged[] = "Menu width changed";
+const char RemovedFromLayout[] = "Removed from layout";
+const char AddedToLayout[] = "Added to layout";
+const char TableChanged[] = "Table changed";
+const char PaddingChanged[] = "Padding changed";
+const char TextControlChanged[] = "Text control changed";
+const char SvgChanged[] = "SVG changed";
+const char ScrollbarChanged[] = "Scrollbar changed";
+} // namespace LayoutInvalidationReason
+
+PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutInvalidationTrackingEvent::data(const LayoutObject* renderer, LayoutInvalidationReasonForTracing reason)
{
ASSERT(renderer);
RefPtr<TracedValue> value = TracedValue::create();
value->setString("frame", toHexString(renderer->frame()));
setGeneratingNodeInfo(value.get(), renderer, "nodeId", "nodeName");
+ value->setString("reason", reason);
if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(maxInvalidationTrackingCallstackSize, true))
stackTrace->toTracedValue(value.get(), "stackTrace");
return value.release();
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.h ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698