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

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: 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..dd0bd375671be13043b66a42298515057b6d7d77 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -257,6 +257,13 @@ WebInspector.TimelineUIUtils.buildDetailsTextForTraceEvent = function(event, tar
detailsText = linkifyTopCallFrameAsText() || eventData["id"];
break;
case recordType.ParseHTML:
+ var endLine = event.args["endLine"];
alph 2015/04/27 10:04:34 It should be placed into args["data"]["endLine"] ?
pfeldman 2015/04/27 11:52:51 Done.
+ var url = event.args["beginData"]["url"];
+ if (endLine)
+ detailsText = WebInspector.UIString("%s [%d:%d]", url, event.args["beginData"]["startLine"] + 1, endLine);
alph 2015/04/27 10:04:34 Use ?: please.
pfeldman 2015/04/27 11:52:51 Done.
+ else
+ detailsText = url;
+ break;
case recordType.RecalculateStyles:
detailsText = linkifyTopCallFrameAsText();
break;
@@ -373,6 +380,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 +405,6 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
details = linkifyTopCallFrame();
detailsText = eventData["id"];
break;
- case recordType.ParseHTML:
case recordType.RecalculateStyles:
details = linkifyTopCallFrame();
break;
@@ -633,6 +640,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;
alph 2015/04/27 10:04:34 Why startLine needs +1, but endLine does not? Coul
pfeldman 2015/04/27 11:52:51 Done.
+ var endLine = event.args["endLine"];
+ 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