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

Side by Side Diff: Source/devtools/front_end/CPUProfileView.js

Issue 182113004: DevTools: Get rid of Element.prototype.enableStyleClass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 9 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/CanvasProfileView.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 { 409 {
410 if (!this.profile) 410 if (!this.profile)
411 return; 411 return;
412 412
413 switch (this.viewSelectComboBox.selectedOption().value) { 413 switch (this.viewSelectComboBox.selectedOption().value) {
414 case WebInspector.CPUProfileView._TypeFlame: 414 case WebInspector.CPUProfileView._TypeFlame:
415 this._ensureFlameChartCreated(); 415 this._ensureFlameChartCreated();
416 this.dataGrid.detach(); 416 this.dataGrid.detach();
417 this._flameChart.show(this.element); 417 this._flameChart.show(this.element);
418 this._viewType.set(WebInspector.CPUProfileView._TypeFlame); 418 this._viewType.set(WebInspector.CPUProfileView._TypeFlame);
419 this._statusBarButtonsElement.enableStyleClass("hidden", true); 419 this._statusBarButtonsElement.classList.toggle("hidden", true);
420 return; 420 return;
421 case WebInspector.CPUProfileView._TypeTree: 421 case WebInspector.CPUProfileView._TypeTree:
422 this.profileDataGridTree = this._getTopDownProfileDataGridTree(); 422 this.profileDataGridTree = this._getTopDownProfileDataGridTree();
423 this._sortProfile(); 423 this._sortProfile();
424 this._viewType.set(WebInspector.CPUProfileView._TypeTree); 424 this._viewType.set(WebInspector.CPUProfileView._TypeTree);
425 break; 425 break;
426 case WebInspector.CPUProfileView._TypeHeavy: 426 case WebInspector.CPUProfileView._TypeHeavy:
427 this.profileDataGridTree = this._getBottomUpProfileDataGridTree(); 427 this.profileDataGridTree = this._getBottomUpProfileDataGridTree();
428 this._sortProfile(); 428 this._sortProfile();
429 this._viewType.set(WebInspector.CPUProfileView._TypeHeavy); 429 this._viewType.set(WebInspector.CPUProfileView._TypeHeavy);
430 break; 430 break;
431 } 431 }
432 432
433 this._statusBarButtonsElement.enableStyleClass("hidden", false); 433 this._statusBarButtonsElement.classList.toggle("hidden", false);
434 434
435 if (this._flameChart) 435 if (this._flameChart)
436 this._flameChart.detach(); 436 this._flameChart.detach();
437 this.dataGrid.show(this.element); 437 this.dataGrid.show(this.element);
438 438
439 if (!this.currentQuery || !this._searchFinishedCallback || !this._search Results) 439 if (!this.currentQuery || !this._searchFinishedCallback || !this._search Results)
440 return; 440 return;
441 441
442 // The current search needs to be performed again. First negate out prev ious match 442 // The current search needs to be performed again. First negate out prev ious match
443 // count by calling the search finished callback with a negative number of matches. 443 // count by calling the search finished callback with a negative number of matches.
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 /** 1323 /**
1324 * @param {number} entryIndex 1324 * @param {number} entryIndex
1325 * @return {!string} 1325 * @return {!string}
1326 */ 1326 */
1327 entryColor: function(entryIndex) 1327 entryColor: function(entryIndex)
1328 { 1328 {
1329 var node = this._entryNodes[entryIndex]; 1329 var node = this._entryNodes[entryIndex];
1330 return this._colorGenerator.colorForID(node.functionName + ":" + node.ur l + ":" + node.lineNumber);; 1330 return this._colorGenerator.colorForID(node.functionName + ":" + node.ur l + ":" + node.lineNumber);;
1331 }, 1331 },
1332 } 1332 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/CanvasProfileView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698