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

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

Issue 671913006: DevTools: Fix frontend compilation errors uncovered by r184188 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.TracingManager} tracingManager 7 * @param {!WebInspector.TracingManager} tracingManager
8 * @param {!WebInspector.TracingModel} tracingModel 8 * @param {!WebInspector.TracingModel} tracingModel
9 * @param {!WebInspector.TimelineModel.Filter} recordFilter 9 * @param {!WebInspector.TimelineModel.Filter} recordFilter
10 * @extends {WebInspector.TimelineModel} 10 * @extends {WebInspector.TimelineModel}
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 this._lastPaintWithLayer = paintEvent; 1210 this._lastPaintWithLayer = paintEvent;
1211 if (!this._lastPaintWithLayer) { 1211 if (!this._lastPaintWithLayer) {
1212 console.error("Failed to find the paint container for a paint event. "); 1212 console.error("Failed to find the paint container for a paint event. ");
1213 return; 1213 return;
1214 } 1214 }
1215 1215
1216 var effectivePaintId = this._lastPaintWithLayer.args["data"]["nodeId"]; 1216 var effectivePaintId = this._lastPaintWithLayer.args["data"]["nodeId"];
1217 var frameId = paintEvent.args["data"]["frame"]; 1217 var frameId = paintEvent.args["data"]["frame"];
1218 this._invalidationEvents.forEach(recordInvalidationForPaint.bind(this)); 1218 this._invalidationEvents.forEach(recordInvalidationForPaint.bind(this));
1219 1219
1220 /**
1221 * @param {!WebInspector.InvalidationTrackingEvent} invalidation
1222 * @this {WebInspector.InvalidationTracker}
1223 */
1220 function recordInvalidationForPaint(invalidation) 1224 function recordInvalidationForPaint(invalidation)
1221 { 1225 {
1222 if (invalidation.paintId === effectivePaintId && invalidation.frameI d === frameId) 1226 if (invalidation.paintId === effectivePaintId && invalidation.frameI d === frameId)
1223 this._addInvalidationTrackingEvent(paintEvent, invalidation); 1227 this._addInvalidationTrackingEvent(paintEvent, invalidation);
1224 } 1228 }
1225 }, 1229 },
1226 1230
1227 /** 1231 /**
1228 * @param {!WebInspector.TracingModel.Event} event 1232 * @param {!WebInspector.TracingModel.Event} event
1229 * @param {!WebInspector.InvalidationTrackingEvent} invalidation 1233 * @param {!WebInspector.InvalidationTrackingEvent} invalidation
1230 */ 1234 */
1231 _addInvalidationTrackingEvent: function(event, invalidation) 1235 _addInvalidationTrackingEvent: function(event, invalidation)
1232 { 1236 {
1233 if (!event.invalidationTrackingEvents) 1237 if (!event.invalidationTrackingEvents)
1234 event.invalidationTrackingEvents = [ invalidation ]; 1238 event.invalidationTrackingEvents = [ invalidation ];
1235 else 1239 else
1236 event.invalidationTrackingEvents.push(invalidation); 1240 event.invalidationTrackingEvents.push(invalidation);
1237 }, 1241 },
1238 1242
1239 _startNewFrameIfNeeded: function() 1243 _startNewFrameIfNeeded: function()
1240 { 1244 {
1241 if (!this._didPaint) 1245 if (!this._didPaint)
1242 return; 1246 return;
1243 1247
1244 this._initializePerFrameState(); 1248 this._initializePerFrameState();
1245 }, 1249 },
1246 1250
1247 _initializePerFrameState: function() 1251 _initializePerFrameState: function()
1248 { 1252 {
1253 /** @type {!Array.<!WebInspector.InvalidationTrackingEvent>} */
1249 this._invalidationEvents = []; 1254 this._invalidationEvents = [];
1250 this._lastStyleRecalcEventIndex = 0; 1255 this._lastStyleRecalcEventIndex = 0;
1251 this._lastPaintWithLayer = undefined; 1256 this._lastPaintWithLayer = undefined;
1252 this._didPaint = false; 1257 this._didPaint = false;
1253 } 1258 }
1254 } 1259 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/toolbox/ToolboxDelegate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698