Commit 214102ca authored by pdr@chromium.org's avatar pdr@chromium.org

Cleanup invalidation reason strings

This patch cleans up the reason strings to not have periods. Additionally,
a typo has been fixed in InspectorTraceEvents.

BUG=410701,424451

Review URL: https://codereview.chromium.org/650993004

git-svn-id: svn://svn.chromium.org/blink/trunk@184330 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a1d45918
......@@ -40,8 +40,10 @@ function test()
InspectorTest.assertEquals(invalidations.length, 3);
InspectorTest.assertEquals(invalidations[0].type, WebInspector.TracingTimelineModel.RecordType.StyleRecalcInvalidationTracking);
InspectorTest.assertEquals(invalidations[0].nodeName, "BODY");
InspectorTest.assertEquals(invalidations[0].reason, "StyleSheetChange");
InspectorTest.assertEquals(invalidations[1].type, WebInspector.TracingTimelineModel.RecordType.StyleRecalcInvalidationTracking);
InspectorTest.assertEquals(invalidations[1].nodeName, "DIV id='testElement'");
InspectorTest.assertEquals(invalidations[1].reason, "StyleSheetChange");
InspectorTest.assertEquals(invalidations[2].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
InspectorTest.assertEquals(invalidations[2].nodeName, "DIV id='testElement'");
InspectorTest.assertGreaterOrEqual(invalidations[2].stackTrace.length, 1);
......@@ -64,6 +66,7 @@ function test()
InspectorTest.assertEquals(secondInvalidations.length, 3);
InspectorTest.assertEquals(secondInvalidations[0].type, WebInspector.TracingTimelineModel.RecordType.StyleRecalcInvalidationTracking);
InspectorTest.assertEquals(secondInvalidations[0].nodeName, "DIV");
InspectorTest.assertEquals(secondInvalidations[0].reason, "StyleSheetChange");
InspectorTest.assertEquals(secondInvalidations[1].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
InspectorTest.assertEquals(secondInvalidations[1].nodeName, "DIV");
InspectorTest.assertGreaterOrEqual(secondInvalidations[1].stackTrace.length, 1);
......
......@@ -167,7 +167,7 @@ PassRefPtr<TracedValue> InspectorScheduleStyleInvalidationTrackingEvent::fillCom
value->setString("frame", toHexString(element.document().frame()));
setNodeInfo(value.get(), &element, "nodeId", "nodeName");
value->setString("invalidationSet", descendantInvalidationSetToIdString(invalidationSet));
value->setString("InvalidatedSelectorId", invalidatedSelector);
value->setString("invalidatedSelectorId", invalidatedSelector);
if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(maxInvalidationTrackingCallstackSize, true))
value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray());
return value.release();
......@@ -212,12 +212,12 @@ String descendantInvalidationSetToIdString(const DescendantInvalidationSet& set)
}
const char InspectorStyleInvalidatorInvalidateEvent::ElementHasPendingInvalidationList[] = "Element has pending invalidation list";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidateCustomPseudo[] = "Invalidate custom pseudo element.";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedAttribute[] = "Invalidation set matched attribute.";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedClass[] = "Invalidation set matched class.";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedId[] = "Invalidation set matched id.";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedTagName[] = "Invalidation set matched tagName.";
const char InspectorStyleInvalidatorInvalidateEvent::PreventStyleSharingForParent[] = "Prevent style sharing for parent.";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidateCustomPseudo[] = "Invalidate custom pseudo element";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedAttribute[] = "Invalidation set matched attribute";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedClass[] = "Invalidation set matched class";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedId[] = "Invalidation set matched id";
const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedTagName[] = "Invalidation set matched tagName";
const char InspectorStyleInvalidatorInvalidateEvent::PreventStyleSharingForParent[] = "Prevent style sharing for parent";
PassRefPtr<TracedValue> InspectorStyleInvalidatorInvalidateEvent::fillCommonPart(Element& element, const char* reason)
{
......@@ -488,12 +488,12 @@ static void localToPageQuad(const RenderObject& renderer, const LayoutRect& rect
quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4())));
}
const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpdated[] = "Squashing layer geometry was updated.";
const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "The layer may have been added to an already-existing squashing layer.";
const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[] = "Removed the layer from a squashing layer.";
const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = "Reflection layer change.";
const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assigned a new composited layer.";
const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] = "A new composited layer is needed based on the RenderLayer's compositing ancestor's properties.";
const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpdated[] = "Squashing layer geometry was updated";
const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "The layer may have been added to an already-existing squashing layer";
const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[] = "Removed the layer from a squashing layer";
const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = "Reflection layer change";
const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assigned a new composited layer";
const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] = "A new composited layer is needed based on the RenderLayer's compositing ancestor's properties";
PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayerInvalidationTrackingEvent::data(const RenderLayer* layer, const char* reason)
{
......
......@@ -817,10 +817,7 @@ WebInspector.TracingTimelineUIUtils._generateInvalidationsForType = function(typ
if (invalidation.reason) {
var reasonRow = row.createChild("div");
var reason = invalidation.reason;
// We should clean up invalidation strings so they are consistent: crbug.com/424451.
if (!invalidation.reason.endsWith("."))
reason += ".";
reasonRow.textContent = WebInspector.UIString("Reason: %s", reason);
reasonRow.textContent = WebInspector.UIString("Reason: %s.", reason);
}
if (invalidation.stackTrace)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment