Title: [141883] trunk/Source/WebCore
Revision
141883
Author
[email protected]
Date
2013-02-05 04:04:39 -0800 (Tue, 05 Feb 2013)

Log Message

Web Inspector: [Canvas] UI is not restored properly when deleting a live recording profile
https://bugs.webkit.org/show_bug.cgi?id=108602

Reviewed by Pavel Feldman.

Cancel recording profile of canvas-type when deleting an alive trace log.
Drive-by: rename ProfileHeader.reset to ProfileHeader.dispose since it's called on header's destruction.

* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileHeader.prototype.dispose):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileHeader.prototype.dispose):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._removeProfileHeader):
(WebInspector.ProfilesPanel.prototype.setRecordingProfile):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141882 => 141883)


--- trunk/Source/WebCore/ChangeLog	2013-02-05 10:58:41 UTC (rev 141882)
+++ trunk/Source/WebCore/ChangeLog	2013-02-05 12:04:39 UTC (rev 141883)
@@ -1,3 +1,21 @@
+2013-02-05  Andrey Adaikin  <[email protected]>
+
+        Web Inspector: [Canvas] UI is not restored properly when deleting a live recording profile
+        https://bugs.webkit.org/show_bug.cgi?id=108602
+
+        Reviewed by Pavel Feldman.
+
+        Cancel recording profile of canvas-type when deleting an alive trace log.
+        Drive-by: rename ProfileHeader.reset to ProfileHeader.dispose since it's called on header's destruction.
+
+        * inspector/front-end/CanvasProfileView.js:
+        (WebInspector.CanvasProfileHeader.prototype.dispose):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfileHeader.prototype.dispose):
+        (WebInspector.ProfilesPanel.prototype._reset):
+        (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
+        (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
+
 2013-02-05  Julien Brianceau  <[email protected]>
 
         Build is broken since r141543 for platforms without OpenGL

Modified: trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js (141882 => 141883)


--- trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js	2013-02-05 10:58:41 UTC (rev 141882)
+++ trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js	2013-02-05 12:04:39 UTC (rev 141883)
@@ -767,11 +767,17 @@
 
     /**
      * @override
+     * @param {!WebInspector.ProfilesPanel} profilesPanel
      */
-    reset: function()
+    dispose: function(profilesPanel)
     {
-        if (this._traceLogId)
+        if (this._traceLogId) {
             CanvasAgent.dropTraceLog(this._traceLogId);
+            clearTimeout(this._requestStatusTimer);
+            if (this._alive)
+                profilesPanel.setRecordingProfile(WebInspector.CanvasProfileType.TypeId, false);
+            this._alive = false;
+        }
     },
 
     /**

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


--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js	2013-02-05 10:58:41 UTC (rev 141882)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js	2013-02-05 12:04:39 UTC (rev 141883)
@@ -184,7 +184,10 @@
         throw new Error("Not implemented.");
     },
 
-    reset: function()
+    /**
+     * @param {!WebInspector.ProfilesPanel} profilesPanel
+     */
+    dispose: function(profilesPanel)
     {
     },
 
@@ -419,7 +422,7 @@
                 if ("dispose" in view)
                     view.dispose();
             }
-            this._profiles[i].reset();
+            this._profiles[i].dispose(this);
         }
         delete this.visibleView;
 
@@ -614,7 +617,7 @@
             if (this._profiles[i].uid === profile.uid) {
                 profile = ""
                 this._profiles.splice(i, 1);
-                profile.reset();
+                profile.dispose(this);
                 break;
             }
         }
@@ -1141,21 +1144,16 @@
     {
         var profileTypeObject = this.getProfileType(profileType);
         profileTypeObject.setRecordingProfile(isProfiling);
-        var temporaryProfile = this.findTemporaryProfile(profileType);
-        if (!!temporaryProfile === isProfiling)
-            return;
-        if (!temporaryProfile)
-            temporaryProfile = profileTypeObject.createTemporaryProfile();
-        if (isProfiling)
-            this.addProfileHeader(temporaryProfile);
-        else
-            this._removeTemporaryProfile(profileType);
         this.recordButton.toggled = isProfiling;
         this.recordButton.title = profileTypeObject.buttonTooltip;
-        if (isProfiling)
+        if (isProfiling) {
             this._launcherView.profileStarted();
-        else
+            if (!this.findTemporaryProfile(profileType))
+                this.addProfileHeader(profileTypeObject.createTemporaryProfile());
+        } else {
             this._launcherView.profileFinished();
+            this._removeTemporaryProfile(profileType);
+        }
     },
 
     takeHeapSnapshot: function()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to