Web Inspector: disable profile type switching while profile in progress
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 08:25:21 +0000 (08:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 08:25:21 +0000 (08:25 +0000)
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

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshotView.js
Source/WebCore/inspector/front-end/ProfileLauncherView.js
Source/WebCore/inspector/front-end/ProfilesPanel.js

index b377a7bfbb9c4e87166ae0398119dcedd47ccb41..f73eadb01ef758a1778a08e69e0a2f354373f944 100644 (file)
@@ -1,3 +1,20 @@
+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.
index ba0b94f2c3faf4a13efeec2266146461d5d8e0c8..df98db16d06e9e7d8472de56eeb91c422c8d6973 100644 (file)
@@ -775,7 +775,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
     buttonClicked: function(profilesPanel)
     {
         profilesPanel.takeHeapSnapshot();
-        return false;
+        return true;
     },
 
     get treeItemTitle()
index f43d5fd44ec279c4671183e9e25d3027f2d01000..c85c0b3ecacfd6a3ccec2fba54858759f2768b70 100644 (file)
@@ -99,14 +99,17 @@ WebInspector.ProfileLauncherView.prototype = {
     _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;
+        }
     },
 
     /**
index f71a2d24e08e5fa877d03603f8918b1b25012a98..5b418def3128306cf03a496b16bbeae0a8e0695b 100644 (file)
@@ -357,10 +357,6 @@ WebInspector.ProfilesPanel.prototype = {
         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()