OLD | NEW |
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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 if (cell.hasStyleClass("total-column")) | 534 if (cell.hasStyleClass("total-column")) |
535 this.showTotalTimeAsPercent.set(!this.showTotalTimeAsPercent.get()); | 535 this.showTotalTimeAsPercent.set(!this.showTotalTimeAsPercent.get()); |
536 else if (cell.hasStyleClass("self-column")) | 536 else if (cell.hasStyleClass("self-column")) |
537 this.showSelfTimeAsPercent.set(!this.showSelfTimeAsPercent.get()); | 537 this.showSelfTimeAsPercent.set(!this.showSelfTimeAsPercent.get()); |
538 else if (cell.hasStyleClass("average-column")) | 538 else if (cell.hasStyleClass("average-column")) |
539 this.showAverageTimeAsPercent.set(!this.showAverageTimeAsPercent.get
()); | 539 this.showAverageTimeAsPercent.set(!this.showAverageTimeAsPercent.get
()); |
540 | 540 |
541 this.refreshShowAsPercents(); | 541 this.refreshShowAsPercents(); |
542 | 542 |
543 event.consume(); | 543 event.consume(true); |
544 }, | 544 }, |
545 | 545 |
546 _assignParentsInProfile: function() | 546 _assignParentsInProfile: function() |
547 { | 547 { |
548 var head = this.profile.head; | 548 var head = this.profile.head; |
549 head.parent = null; | 549 head.parent = null; |
550 head.head = null; | 550 head.head = null; |
551 var nodesToTraverse = [ { parent: head, children: head.children } ]; | 551 var nodesToTraverse = [ { parent: head, children: head.children } ]; |
552 while (nodesToTraverse.length > 0) { | 552 while (nodesToTraverse.length > 0) { |
553 var pair = nodesToTraverse.shift(); | 553 var pair = nodesToTraverse.shift(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector.
UIString("Profile %d"), "profile-sidebar-tree-item"); | 629 return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector.
UIString("Profile %d"), "profile-sidebar-tree-item"); |
630 }, | 630 }, |
631 | 631 |
632 createView: function(profile) | 632 createView: function(profile) |
633 { | 633 { |
634 return new WebInspector.CPUProfileView(profile); | 634 return new WebInspector.CPUProfileView(profile); |
635 } | 635 } |
636 } | 636 } |
637 | 637 |
638 WebInspector.CPUProfileType.prototype.__proto__ = WebInspector.ProfileType.proto
type; | 638 WebInspector.CPUProfileType.prototype.__proto__ = WebInspector.ProfileType.proto
type; |
OLD | NEW |