From 82d104f1f6e87f83ba2d2c73ce1f0b77e851bb89 Mon Sep 17 00:00:00 2001 From: "pfeldman@chromium.org" Date: Fri, 24 Feb 2012 07:37:34 +0000 Subject: [PATCH] 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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108735 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 13 +++++++++++++ Source/WebCore/inspector/front-end/ElementsPanel.js | 5 +++++ Source/WebCore/inspector/front-end/StylesSidebarPane.js | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e2c94e5..51769cb 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,5 +1,18 @@ 2012-02-23 Pavel Feldman + 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 + Web Inspector: make color review larger in the color picker. https://bugs.webkit.org/show_bug.cgi?id=79339 diff --git a/Source/WebCore/inspector/front-end/ElementsPanel.js b/Source/WebCore/inspector/front-end/ElementsPanel.js index cc54f07..535e705 100644 --- a/Source/WebCore/inspector/front-end/ElementsPanel.js +++ b/Source/WebCore/inspector/front-end/ElementsPanel.js @@ -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); }, diff --git a/Source/WebCore/inspector/front-end/StylesSidebarPane.js b/Source/WebCore/inspector/front-end/StylesSidebarPane.js index b2acac0..dd273ae 100644 --- a/Source/WebCore/inspector/front-end/StylesSidebarPane.js +++ b/Source/WebCore/inspector/front-end/StylesSidebarPane.js @@ -864,6 +864,12 @@ WebInspector.StylesSidebarPane.prototype = { _showUserAgentStylesSettingChanged: function() { this._rebuildUpdate(); + }, + + willHide: function() + { + if (this._spectrum.visible) + this._spectrum.hide(); } } -- 2.7.4