Title: [91361] trunk/Source/WebCore
- Revision
- 91361
- Author
- yu...@chromium.org
- Date
- 2011-07-20 07:11:23 -0700 (Wed, 20 Jul 2011)
Log Message
Web Inspector: sidebar width sometimes is not restored
https://bugs.webkit.org/show_bug.cgi?id=64869
Make sure sidebar width is restored even if window initial size has not been set yet.
Reviewed by Pavel Feldman.
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.show):
(WebInspector.Panel.prototype.updateSidebarWidth):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91360 => 91361)
--- trunk/Source/WebCore/ChangeLog 2011-07-20 14:03:14 UTC (rev 91360)
+++ trunk/Source/WebCore/ChangeLog 2011-07-20 14:11:23 UTC (rev 91361)
@@ -1,3 +1,16 @@
+2011-07-20 Yury Semikhatsky <yu...@chromium.org>
+
+ Web Inspector: sidebar width sometimes is not restored
+ https://bugs.webkit.org/show_bug.cgi?id=64869
+
+ Make sure sidebar width is restored even if window initial size has not been set yet.
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.show):
+ (WebInspector.Panel.prototype.updateSidebarWidth):
+
2011-07-20 Andrey Kosyakov <ca...@chromium.org>
Web Inspector: remove dead code (WebInspector.drawLoadingPieChart)
Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (91360 => 91361)
--- trunk/Source/WebCore/inspector/front-end/Panel.js 2011-07-20 14:03:14 UTC (rev 91360)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js 2011-07-20 14:11:23 UTC (rev 91361)
@@ -74,7 +74,7 @@
WebInspector.currentFocusElement = this.defaultFocusedElement;
- this.restoreSidebarWidth();
+ this._restoreSidebarWidth();
this._restoreScrollPositions();
WebInspector.extensionServer.notifyPanelShown(this.name);
},
@@ -349,7 +349,10 @@
if (typeof width === "undefined")
width = this._currentSidebarWidth;
- width = Number.constrain(width, Preferences.minSidebarWidth, window.innerWidth / 2);
+ var maxWidth = window.innerWidth / 2;
+ if (!maxWidth)
+ maxWidth = width;
+ width = Number.constrain(width, Preferences.minSidebarWidth, maxWidth);
this._currentSidebarWidth = width;
this.setSidebarWidth(width);
@@ -363,7 +366,7 @@
this.sidebarResizeElement.style.left = (width - 3) + "px";
},
- restoreSidebarWidth: function()
+ _restoreSidebarWidth: function()
{
var sidebarWidth = WebInspector.settings[this._sidebarWidthSettingName()].get();
this.updateSidebarWidth(sidebarWidth);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes