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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js

Issue 2515693003: DevTools: bring violations and timeline warnings in sync. (Closed)
Patch Set: idle callback test fixed. Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */ 437 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */
438 this._paints = []; 438 this._paints = [];
439 /** @type {number|undefined} */ 439 /** @type {number|undefined} */
440 this._mainFrameId = undefined; 440 this._mainFrameId = undefined;
441 } 441 }
442 442
443 /** 443 /**
444 * @return {boolean} 444 * @return {boolean}
445 */ 445 */
446 hasWarnings() { 446 hasWarnings() {
447 var /** @const */ longFrameDurationThresholdMs = 22; 447 return false;
448 return !this.idle && this.duration > longFrameDurationThresholdMs;
449 } 448 }
450 449
451 /** 450 /**
452 * @param {number} endTime 451 * @param {number} endTime
453 */ 452 */
454 _setEndTime(endTime) { 453 _setEndTime(endTime) {
455 this.endTime = endTime; 454 this.endTime = endTime;
456 this.duration = this.endTime - this.startTime; 455 this.duration = this.endTime - this.startTime;
457 } 456 }
458 457
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 constructor(triggerTime, timeByCategory) { 545 constructor(triggerTime, timeByCategory) {
547 /** @type {!Object.<string, number>} */ 546 /** @type {!Object.<string, number>} */
548 this.timeByCategory = timeByCategory; 547 this.timeByCategory = timeByCategory;
549 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */ 548 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */
550 this.paints = []; 549 this.paints = [];
551 /** @type {number|undefined} */ 550 /** @type {number|undefined} */
552 this.mainFrameId = undefined; 551 this.mainFrameId = undefined;
553 this.triggerTime = triggerTime; 552 this.triggerTime = triggerTime;
554 } 553 }
555 }; 554 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698