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

Unified Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 1106623003: DevTools: render ParseHTML details in timeline: url, start and end lines. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed. Created 5 years, 8 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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TimelineUIUtils.js b/Source/devtools/front_end/timeline/TimelineUIUtils.js
index fd503e7fd49d7e9497321dae469f7056e5fc7ff5..cc970ac820b13402961f2a71bfb501e015b8fbc9 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -257,6 +257,10 @@ WebInspector.TimelineUIUtils.buildDetailsTextForTraceEvent = function(event, tar
detailsText = linkifyTopCallFrameAsText() || eventData["id"];
break;
case recordType.ParseHTML:
+ var endLine = event.args["endData"]["endLine"];
+ var url = event.args["beginData"]["url"];
+ detailsText = endLine ? WebInspector.UIString("%s [%d:%d]", url, event.args["beginData"]["startLine"] + 1, endLine + 1) : url;
+ break;
case recordType.RecalculateStyles:
detailsText = linkifyTopCallFrameAsText();
break;
@@ -373,6 +377,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
case recordType.ResourceReceiveResponse:
case recordType.ResourceFinish:
case recordType.EmbedderCallback:
+ case recordType.ParseHTML:
detailsText = WebInspector.TimelineUIUtils.buildDetailsTextForTraceEvent(event, target);
break;
case recordType.FunctionCall:
@@ -397,7 +402,6 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
details = linkifyTopCallFrame();
detailsText = eventData["id"];
break;
- case recordType.ParseHTML:
case recordType.RecalculateStyles:
details = linkifyTopCallFrame();
break;
@@ -633,6 +637,16 @@ WebInspector.TimelineUIUtils._buildTraceEventDetailsSynchronously = function(eve
if (event.phase === WebInspector.TracingModel.Phase.NestableAsyncInstant)
contentHelper.appendTextRow(WebInspector.UIString("State"), eventData["state"]);
break;
+ case recordTypes.ParseHTML:
+ var beginData = event.args["beginData"];
+ var url = beginData["url"];
+ if (url)
+ contentHelper.appendTextRow(WebInspector.UIString("URL"), url);
+ var startLine = beginData["startLine"] + 1;
+ var endLine = event.args["endData"]["endLine"] + 1;
+ if (endLine)
+ contentHelper.appendTextRow(WebInspector.UIString("Range"), WebInspector.UIString("%d \u2014 %d", startLine, endLine));
+ break;
default:
var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent(event, model.target(), linkifier);
if (detailsNode)
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698