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

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

Issue 306123009: Remove TimelinePresentationModel.Record.childHasWarning (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 | « no previous file | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 context.clip(); 334 context.clip();
335 context.fillStyle = category.borderColor; 335 context.fillStyle = category.borderColor;
336 context.shadowColor = "rgba(0, 0, 0, 0.1)"; 336 context.shadowColor = "rgba(0, 0, 0, 0.1)";
337 context.shadowOffsetX = 1; 337 context.shadowOffsetX = 1;
338 context.shadowOffsetY = 1; 338 context.shadowOffsetY = 1;
339 context.fillText(text, barX + this.textPadding(), barY + barHeig ht - this.textBaseline()); 339 context.fillText(text, barX + this.textPadding(), barY + barHeig ht - this.textBaseline());
340 context.restore(); 340 context.restore();
341 } 341 }
342 } 342 }
343 343
344 if (record.warnings() || record.childHasWarnings()) { 344 if (record.warnings()) {
345 context.save(); 345 context.save();
346 346
347 context.rect(barX, barY, barWidth, this.barHeight()); 347 context.rect(barX, barY, barWidth, this.barHeight());
348 context.clip(); 348 context.clip();
349 349
350 context.beginPath(); 350 context.beginPath();
351 context.fillStyle = record.warnings() ? "red" : "rgba(255, 0, 0, 0.5 )"; 351 context.fillStyle = record.warnings() ? "red" : "rgba(255, 0, 0, 0.5 )";
352 context.moveTo(barX + barWidth - 15, barY + 1); 352 context.moveTo(barX + barWidth - 15, barY + 1);
353 context.lineTo(barX + barWidth - 1, barY + 1); 353 context.lineTo(barX + barWidth - 1, barY + 1);
354 context.lineTo(barX + barWidth - 1, barY + 15); 354 context.lineTo(barX + barWidth - 1, barY + 15);
355 context.fill(); 355 context.fill();
356 356
357 context.restore(); 357 context.restore();
358 } 358 }
359 359
360 return true; 360 return true;
361 }, 361 },
362 362
363 /** 363 /**
364 * @param {number} entryIndex 364 * @param {number} entryIndex
365 * @return {boolean} 365 * @return {boolean}
366 */ 366 */
367 forceDecoration: function(entryIndex) 367 forceDecoration: function(entryIndex)
368 { 368 {
369 var record = this._records[entryIndex]; 369 var record = this._records[entryIndex];
370 return record.childHasWarnings() || !!record.warnings(); 370 return !!record.warnings();
371 }, 371 },
372 372
373 /** 373 /**
374 * @param {number} entryIndex 374 * @param {number} entryIndex
375 * @return {?{startTime: number, endTime: number}} 375 * @return {?{startTime: number, endTime: number}}
376 */ 376 */
377 highlightTimeRange: function(entryIndex) 377 highlightTimeRange: function(entryIndex)
378 { 378 {
379 var record = this._records[entryIndex]; 379 var record = this._records[entryIndex];
380 if (record === this._cpuThreadRecord || record === this._gpuThreadRecord ) 380 if (record === this._cpuThreadRecord || record === this._gpuThreadRecord )
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 * @param {number} entryIndex 983 * @param {number} entryIndex
984 * @return {?WebInspector.TimelineSelection} 984 * @return {?WebInspector.TimelineSelection}
985 */ 985 */
986 createSelection: function(entryIndex) { }, 986 createSelection: function(entryIndex) { },
987 /** 987 /**
988 * @param {?WebInspector.TimelineSelection} selection 988 * @param {?WebInspector.TimelineSelection} selection
989 * @return {number} 989 * @return {number}
990 */ 990 */
991 entryIndexForSelection: function(selection) { } 991 entryIndexForSelection: function(selection) { }
992 } 992 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698