https://bugs.webkit.org/show_bug.cgi?id=109178
Patch by Alexei Filippov <alph@chromium.org> on 2013-02-08
Reviewed by Yury Semikhatsky.
Disables profile type selection controls when a profiling session
is in progress.
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
* inspector/front-end/ProfileLauncherView.js:
(WebInspector.ProfileLauncherView.prototype._updateControls):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.toggleRecordButton):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142243
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-02-08 Alexei Filippov <alph@chromium.org>
+
+ Web Inspector: disable profile type switching while profile in progress
+ https://bugs.webkit.org/show_bug.cgi?id=109178
+
+ Reviewed by Yury Semikhatsky.
+
+ Disables profile type selection controls when a profiling session
+ is in progress.
+
+ * inspector/front-end/HeapSnapshotView.js:
+ (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
+ * inspector/front-end/ProfileLauncherView.js:
+ (WebInspector.ProfileLauncherView.prototype._updateControls):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
+
2013-02-08 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
buttonClicked: function(profilesPanel)
{
profilesPanel.takeHeapSnapshot();
- return false;
+ return true;
},
get treeItemTitle()
_updateControls: function()
{
if (this._isProfiling) {
- this._profileTypeSelectorForm.disabled = true;
this._controlButton.addStyleClass("running");
this._controlButton.textContent = WebInspector.UIString("Stop");
} else {
- this._profileTypeSelectorForm.disabled = false;
this._controlButton.removeStyleClass("running");
this._controlButton.textContent = WebInspector.UIString("Start");
}
+ var items = this._profileTypeSelectorForm.elements;
+ for (var i = 0; i < items.length; ++i) {
+ if (items[i].type === "radio")
+ items[i].disabled = this._isProfiling;
+ }
},
/**
var isProfiling = this._selectedProfileType.buttonClicked(this);
this.recordButton.toggled = isProfiling;
this.recordButton.title = this._selectedProfileType.buttonTooltip;
- if (isProfiling)
- this._launcherView.profileStarted();
- else
- this._launcherView.profileFinished();
},
wasShown: function()