Changeset 116855 in webkit
- Timestamp:
- May 12, 2012 6:54:27 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116854 r116855 1 2012-05-12 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: move recording button state control out of addProfileHeader. 4 https://bugs.webkit.org/show_bug.cgi?id=86293 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/front-end/CSSSelectorProfileView.js: 9 (WebInspector.CSSSelectorProfileType.prototype.buttonClicked): 10 * inspector/front-end/HeapSnapshotView.js: 11 (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): 12 * inspector/front-end/ProfileView.js: 13 (WebInspector.CPUProfileType.prototype.buttonClicked): 14 * inspector/front-end/ProfilesPanel.js: 15 (WebInspector.ProfileType.prototype.buttonClicked): 16 (WebInspector.ProfilesPanel.prototype.toggleRecordButton): 17 (WebInspector.ProfilesPanel.prototype.addProfileHeader): 18 (WebInspector.ProfilesPanel.prototype.setRecordingProfile): 19 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot.done): 20 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): 21 1 22 2012-05-12 Eugene Klyuchnikov <eustas.bug@gmail.com> 2 23 -
trunk/Source/WebCore/inspector/front-end/CSSSelectorProfileView.js
r116764 r116855 284 284 }, 285 285 286 /** 287 * @override 288 * @return {boolean} 289 */ 286 290 buttonClicked: function() 287 291 { 288 if (this._recording) 292 if (this._recording) { 289 293 this.stopRecordingProfile(); 290 else 294 return false; 295 } else { 291 296 this.startRecordingProfile(); 297 return true; 298 } 292 299 }, 293 300 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r116764 r116855 728 728 }, 729 729 730 /** 731 * @override 732 * @return {boolean} 733 */ 730 734 buttonClicked: function() 731 735 { 732 736 WebInspector.panels.profiles.takeHeapSnapshot(); 737 return false; 733 738 }, 734 739 -
trunk/Source/WebCore/inspector/front-end/ProfileView.js
r116764 r116855 565 565 }, 566 566 567 /** 568 * @override 569 * @return {boolean} 570 */ 567 571 buttonClicked: function() 568 572 { … … 570 574 this.stopRecordingProfile(); 571 575 WebInspector.networkManager.enableResourceTracking(); 576 return false; 572 577 } else { 573 578 WebInspector.networkManager.disableResourceTracking(); 574 579 this.startRecordingProfile(); 580 return true; 575 581 } 576 582 }, -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r116850 r116855 58 58 }, 59 59 60 /** 61 * @return {boolean} 62 */ 60 63 buttonClicked: function() 61 64 { 65 return false; 62 66 }, 63 67 … … 281 285 toggleRecordButton: function() 282 286 { 283 this._selectedProfileType.buttonClicked(); 287 var isProfiling = this._selectedProfileType.buttonClicked(); 288 this.dispatchEventToListeners(isProfiling ? WebInspector.ProfilesPanel.EventTypes.ProfileStarted : WebInspector.ProfilesPanel.EventTypes.ProfileFinished); 284 289 }, 285 290 … … 492 497 this.showProfile(profile); 493 498 this.dispatchEventToListeners("profile added"); 494 this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileFinished); 495 this.recordButton.toggled = false; 496 } else { 497 this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileStarted); 498 this.recordButton.toggled = true; 499 } 500 501 this.recordButton.title = this._selectedProfileType.buttonTooltip; 499 } 502 500 }, 503 501 … … 1006 1004 else 1007 1005 this._removeTemporaryProfile(profileType); 1006 this.recordButton.toggled = isProfiling; 1007 this.recordButton.title = profileTypeObject.buttonTooltip; 1008 this.dispatchEventToListeners(isProfiling ? WebInspector.ProfilesPanel.EventTypes.ProfileStarted : WebInspector.ProfilesPanel.EventTypes.ProfileFinished); 1008 1009 }, 1009 1010 … … 1015 1016 this.addProfileHeader(profileTypeObject.createTemporaryProfile()); 1016 1017 } 1017 ProfilerAgent.takeHeapSnapshot(); 1018 this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileStarted); 1019 function done() { 1020 this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileFinished); 1021 } 1022 ProfilerAgent.takeHeapSnapshot(done.bind(this)); 1018 1023 WebInspector.userMetrics.ProfilesHeapProfileTaken.record(); 1019 1024 },
Note: See TracChangeset
for help on using the changeset viewer.