Title: [142243] trunk/Source/WebCore
Revision
142243
Author
[email protected]
Date
2013-02-08 00:25:21 -0800 (Fri, 08 Feb 2013)

Log Message

Web Inspector: disable profile type switching while profile in progress
https://bugs.webkit.org/show_bug.cgi?id=109178

Patch by Alexei Filippov <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142242 => 142243)


--- trunk/Source/WebCore/ChangeLog	2013-02-08 08:24:16 UTC (rev 142242)
+++ trunk/Source/WebCore/ChangeLog	2013-02-08 08:25:21 UTC (rev 142243)
@@ -1,3 +1,20 @@
+2013-02-08  Alexei Filippov  <[email protected]>
+
+        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  <[email protected]>
 
         Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js (142242 => 142243)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2013-02-08 08:24:16 UTC (rev 142242)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2013-02-08 08:25:21 UTC (rev 142243)
@@ -775,7 +775,7 @@
     buttonClicked: function(profilesPanel)
     {
         profilesPanel.takeHeapSnapshot();
-        return false;
+        return true;
     },
 
     get treeItemTitle()

Modified: trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js (142242 => 142243)


--- trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js	2013-02-08 08:24:16 UTC (rev 142242)
+++ trunk/Source/WebCore/inspector/front-end/ProfileLauncherView.js	2013-02-08 08:25:21 UTC (rev 142243)
@@ -99,14 +99,17 @@
     _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;
+        }
     },
 
     /**

Modified: trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js (142242 => 142243)


--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js	2013-02-08 08:24:16 UTC (rev 142242)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js	2013-02-08 08:25:21 UTC (rev 142243)
@@ -357,10 +357,6 @@
         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()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to