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

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

Issue 1211613002: Timeline: check category presence in list, not string equality (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed tracing-session-id.html Created 5 years, 6 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/devtools/front_end/timeline/TimelineModel.js ('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 5ac398088a8acf91f731da3f5c085d12867759c1..b2bac63bc5cd43ccc92f4b9fe8004b312f469e7c 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -170,7 +170,7 @@ WebInspector.TimelineUIUtils.categoryForRecord = function(record)
WebInspector.TimelineUIUtils.eventStyle = function(event)
{
var eventStyles = WebInspector.TimelineUIUtils._initEventStyles();
- if (event.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
return { title: event.name, category: WebInspector.TimelineUIUtils.categories()["scripting"] };
var result = eventStyles[event.name];
@@ -188,7 +188,7 @@ WebInspector.TimelineUIUtils.eventStyle = function(event)
WebInspector.TimelineUIUtils.eventTitle = function(event)
{
var title = WebInspector.TimelineUIUtils.eventStyle(event).title;
- if (event.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
return title;
if (event.name === WebInspector.TimelineModel.RecordType.TimeStamp)
return WebInspector.UIString("%s: %s", title, event.args["data"]["message"]);
@@ -311,7 +311,7 @@ WebInspector.TimelineUIUtils.buildDetailsTextForTraceEvent = function(event, tar
break;
default:
- if (event.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
detailsText = null;
else
detailsText = linkifyTopCallFrameAsText();
@@ -422,7 +422,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
details = linkifyLocation("", url, eventData["lineNumber"], 0);
break;
default:
- if (event.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
detailsText = null;
else
details = linkifyTopCallFrame();
@@ -1678,7 +1678,7 @@ WebInspector.TimelineUIUtils.markerStyleForEvent = function(event)
var title = WebInspector.TimelineUIUtils.eventTitle(event)
- if (event.category === WebInspector.TracingModel.ConsoleEventCategory) {
+ if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory)) {
return {
title: title,
dashStyle: tallMarkerDashStyle,
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698