Web Inspector: hide color picker upon panel switch.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 07:37:34 +0000 (07:37 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 07:37:34 +0000 (07:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79355

Reviewed by Vsevolod Vlasov.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.willHide):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._showUserAgentStylesSettingChanged):
(WebInspector.StylesSidebarPane.prototype.willHide):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ElementsPanel.js
Source/WebCore/inspector/front-end/StylesSidebarPane.js

index e2c94e5..51769cb 100644 (file)
@@ -1,5 +1,18 @@
 2012-02-23  Pavel Feldman  <pfeldman@chromium.org>
 
+        Web Inspector: hide color picker upon panel switch.
+        https://bugs.webkit.org/show_bug.cgi?id=79355
+
+        Reviewed by Vsevolod Vlasov.
+
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.willHide):
+        * inspector/front-end/StylesSidebarPane.js:
+        (WebInspector.StylesSidebarPane.prototype._showUserAgentStylesSettingChanged):
+        (WebInspector.StylesSidebarPane.prototype.willHide):
+
+2012-02-23  Pavel Feldman  <pfeldman@chromium.org>
+
         Web Inspector: make color review larger in the color picker.
         https://bugs.webkit.org/show_bug.cgi?id=79339
 
index cc54f07..535e705 100644 (file)
@@ -154,6 +154,11 @@ WebInspector.ElementsPanel.prototype = {
         // Detach heavy component on hide
         this.contentElement.removeChild(this.treeOutline.element);
 
+        for (var pane in this.sidebarPanes) {
+            if (this.sidebarPanes[pane].willHide)
+                this.sidebarPanes[pane].willHide();
+        }
+
         WebInspector.Panel.prototype.willHide.call(this);
     },
 
index b2acac0..dd273ae 100644 (file)
@@ -864,6 +864,12 @@ WebInspector.StylesSidebarPane.prototype = {
     _showUserAgentStylesSettingChanged: function()
     {
         this._rebuildUpdate();
+    },
+
+    willHide: function()
+    {
+        if (this._spectrum.visible)
+            this._spectrum.hide();
     }
 }