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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 337283004: Inline usages of TimelineUIUtils.categoryForRecord (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (!result) { 135 if (!result) {
136 result = { 136 result = {
137 title: WebInspector.UIString("Unknown: %s", type), 137 title: WebInspector.UIString("Unknown: %s", type),
138 category: WebInspector.TimelineUIUtils.categories()["other"] 138 category: WebInspector.TimelineUIUtils.categories()["other"]
139 }; 139 };
140 recordStyles[type] = result; 140 recordStyles[type] = result;
141 } 141 }
142 return result; 142 return result;
143 } 143 }
144 144
145
146 /**
147 * @param {!WebInspector.TimelineModel.Record} record
148 * @return {!WebInspector.TimelineCategory}
149 */
150 WebInspector.TimelineUIUtils.categoryForRecord = function(record)
151 {
152 return WebInspector.TimelineUIUtils.recordStyle(record).category;
153 }
154
155 /** 145 /**
156 * @param {!WebInspector.TimelineModel.Record} record 146 * @param {!WebInspector.TimelineModel.Record} record
157 */ 147 */
158 WebInspector.TimelineUIUtils.isEventDivider = function(record) 148 WebInspector.TimelineUIUtils.isEventDivider = function(record)
159 { 149 {
160 var recordTypes = WebInspector.TimelineModel.RecordType; 150 var recordTypes = WebInspector.TimelineModel.RecordType;
161 if (record.type() === recordTypes.TimeStamp) 151 if (record.type() === recordTypes.TimeStamp)
162 return true; 152 return true;
163 if (record.type() === recordTypes.MarkFirstPaint) 153 if (record.type() === recordTypes.MarkFirstPaint)
164 return true; 154 return true;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 for (var i = 0; i < stackTrace.length; ++i) { 991 for (var i = 0; i < stackTrace.length; ++i) {
1002 var stackFrame = stackTrace[i]; 992 var stackFrame = stackTrace[i];
1003 var row = stackTraceElement.createChild("div"); 993 var row = stackTraceElement.createChild("div");
1004 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)")); 994 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)"));
1005 row.createTextChild(" @ "); 995 row.createTextChild(" @ ");
1006 var urlElement = this._linkifier.linkifyLocation(this._target, stack Frame.url, stackFrame.lineNumber - 1); 996 var urlElement = this._linkifier.linkifyLocation(this._target, stack Frame.url, stackFrame.lineNumber - 1);
1007 row.appendChild(urlElement); 997 row.appendChild(urlElement);
1008 } 998 }
1009 } 999 }
1010 } 1000 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698