Title: [91902] trunk/Source/WebCore
- Revision
- 91902
- Author
- [email protected]
- Date
- 2011-07-27 21:57:15 -0700 (Wed, 27 Jul 2011)
Log Message
Web Inspector: Network panel sidebar should have width saved in preferences when resource is selected.
https://bugs.webkit.org/show_bug.cgi?id=65256
Reviewed by Pavel Feldman.
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._toggleViewingResourceMode):
(WebInspector.NetworkPanel.prototype.restoreSidebarWidth):
(WebInspector.NetworkPanel.prototype._showResource):
(WebInspector.NetworkPanel.prototype._closeVisibleResource):
(WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.show):
(WebInspector.Panel.prototype.preferredSidebarWidth):
(WebInspector.Panel.prototype.get restoreSidebarWidth):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91901 => 91902)
--- trunk/Source/WebCore/ChangeLog 2011-07-28 04:34:10 UTC (rev 91901)
+++ trunk/Source/WebCore/ChangeLog 2011-07-28 04:57:15 UTC (rev 91902)
@@ -1,5 +1,23 @@
2011-07-27 Vsevolod Vlasov <[email protected]>
+ Web Inspector: Network panel sidebar should have width saved in preferences when resource is selected.
+ https://bugs.webkit.org/show_bug.cgi?id=65256
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkLogView.prototype._toggleViewingResourceMode):
+ (WebInspector.NetworkPanel.prototype.restoreSidebarWidth):
+ (WebInspector.NetworkPanel.prototype._showResource):
+ (WebInspector.NetworkPanel.prototype._closeVisibleResource):
+ (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.show):
+ (WebInspector.Panel.prototype.preferredSidebarWidth):
+ (WebInspector.Panel.prototype.get restoreSidebarWidth):
+
+2011-07-27 Vsevolod Vlasov <[email protected]>
+
Web Inspector: [REGRESSION] [Chromium] Opening link in new tab does not work properly.
https://bugs.webkit.org/show_bug.cgi?id=65279
Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (91901 => 91902)
--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-07-28 04:34:10 UTC (rev 91901)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js 2011-07-28 04:57:15 UTC (rev 91902)
@@ -923,7 +923,7 @@
this._dataGrid.hideColumn("timeline");
this._viewsContainerElement.removeStyleClass("hidden");
- this.updateSidebarWidth(200);
+ this.restoreSidebarWidth();
var widths = {};
widths.name = 100;
@@ -1257,11 +1257,15 @@
this._networkLogView._reset();
},
- updateSidebarWidth: function(width)
+ restoreSidebarWidth: function()
{
if (!this._viewingResourceMode)
return;
- WebInspector.Panel.prototype.updateSidebarWidth.call(this, width);
+
+ var preferredWidth = WebInspector.Panel.prototype.preferredSidebarWidth.call(this);
+ if (typeof(preferredWidth) === "undefined")
+ preferredWidth = 200;
+ WebInspector.Panel.prototype.updateSidebarWidth.call(this, preferredWidth);
},
updateMainViewWidth: function(width)
@@ -1357,7 +1361,7 @@
view.show(this._viewsContainerElement);
this.visibleView = view;
- this.updateSidebarWidth();
+ this.restoreSidebarWidth();
},
_closeVisibleResource: function()
@@ -1369,7 +1373,7 @@
delete this.visibleView;
}
- this.updateSidebarWidth();
+ this.restoreSidebarWidth();
},
_toggleGridMode: function()
@@ -1395,7 +1399,7 @@
this.element.addStyleClass("viewing-resource");
this._viewsContainerElement.removeStyleClass("hidden");
- this.updateSidebarWidth(200);
+ this.restoreSidebarWidth();
this._networkLogView.allowPopover = false;
this._networkLogView.allowResourceSelection = true;
this._networkLogView.switchToBriefView();
Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (91901 => 91902)
--- trunk/Source/WebCore/inspector/front-end/Panel.js 2011-07-28 04:34:10 UTC (rev 91901)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js 2011-07-28 04:57:15 UTC (rev 91902)
@@ -74,7 +74,7 @@
WebInspector.currentFocusElement = this.defaultFocusedElement;
- this._restoreSidebarWidth();
+ this.restoreSidebarWidth();
this._restoreScrollPositions();
WebInspector.extensionServer.notifyPanelShown(this.name);
},
@@ -366,12 +366,16 @@
this.sidebarResizeElement.style.left = (width - 3) + "px";
},
- _restoreSidebarWidth: function()
+ preferredSidebarWidth: function()
{
- var sidebarWidth = WebInspector.settings[this._sidebarWidthSettingName()].get();
- this.updateSidebarWidth(sidebarWidth);
+ return WebInspector.settings[this._sidebarWidthSettingName()].get();
},
+ restoreSidebarWidth: function()
+ {
+ this.updateSidebarWidth(this.preferredSidebarWidth());
+ },
+
saveSidebarWidth: function()
{
if (!this.sidebarElement)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes