Log Message
Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default https://bugs.webkit.org/show_bug.cgi?id=178142 <rdar://problem/34918233>
Patch by Joseph Pecoraro <pecor...@apple.com> on 2017-10-10 Reviewed by Brian Burg. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.initialLayout): Provide initial widths for many columns where the max could fit but we'd prefer a smaller than max initial width in wide cases. * UserInterface/Views/Table.js: (WI.Table.prototype._resizeColumnsAndFiller): When auto sizing all columns use the preferred initial widths. * UserInterface/Views/TableColumn.js: (WI.TableColumn.prototype.get preferredInitialWidth): Save the initial width.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (223146 => 223147)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-10-10 21:32:52 UTC (rev 223146)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-10-10 21:40:31 UTC (rev 223147)
@@ -1,3 +1,24 @@
+2017-10-10 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default
+ https://bugs.webkit.org/show_bug.cgi?id=178142
+ <rdar://problem/34918233>
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/NetworkTableContentView.js:
+ (WI.NetworkTableContentView.prototype.initialLayout):
+ Provide initial widths for many columns where the max could fit
+ but we'd prefer a smaller than max initial width in wide cases.
+
+ * UserInterface/Views/Table.js:
+ (WI.Table.prototype._resizeColumnsAndFiller):
+ When auto sizing all columns use the preferred initial widths.
+
+ * UserInterface/Views/TableColumn.js:
+ (WI.TableColumn.prototype.get preferredInitialWidth):
+ Save the initial width.
+
2017-10-10 Ross Kirsling <ross.kirsl...@sony.com>
Web Inspector: Views should explicitly remove event listeners from managers/Frame
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (223146 => 223147)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2017-10-10 21:32:52 UTC (rev 223146)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2017-10-10 21:40:31 UTC (rev 223147)
@@ -477,9 +477,9 @@
initialLayout()
{
this._nameColumn = new WI.TableColumn("name", WI.UIString("Name"), {
- initialWidth: this._nameColumnWidthSetting.value,
minWidth: WI.Sidebar.AbsoluteMinimumWidth,
maxWidth: 500,
+ initialWidth: this._nameColumnWidthSetting.value,
resizeType: WI.TableColumn.ResizeType.Locked,
});
@@ -488,11 +488,13 @@
this._domainColumn = new WI.TableColumn("domain", WI.UIString("Domain"), {
minWidth: 120,
maxWidth: 200,
+ initialWidth: 150,
});
this._typeColumn = new WI.TableColumn("type", WI.UIString("Type"), {
minWidth: 70,
maxWidth: 120,
+ initialWidth: 90,
});
this._mimeTypeColumn = new WI.TableColumn("mimeType", WI.UIString("MIME Type"), {
@@ -499,6 +501,7 @@
hidden: true,
minWidth: 100,
maxWidth: 150,
+ initialWidth: 120,
});
this._methodColumn = new WI.TableColumn("method", WI.UIString("Method"), {
@@ -505,6 +508,7 @@
hidden: true,
minWidth: 55,
maxWidth: 80,
+ initialWidth: 65,
});
this._schemeColumn = new WI.TableColumn("scheme", WI.UIString("Scheme"), {
@@ -511,6 +515,7 @@
hidden: true,
minWidth: 55,
maxWidth: 80,
+ initialWidth: 65,
});
this._statusColumn = new WI.TableColumn("status", WI.UIString("Status"), {
@@ -524,6 +529,7 @@
hidden: true,
minWidth: 65,
maxWidth: 80,
+ initialWidth: 75,
});
this._priorityColumn = new WI.TableColumn("priority", WI.UIString("Priority"), {
@@ -530,6 +536,7 @@
hidden: true,
minWidth: 65,
maxWidth: 80,
+ initialWidth: 70,
});
this._remoteAddressColumn = new WI.TableColumn("remoteAddress", WI.UIString("IP Address"), {
@@ -541,6 +548,7 @@
hidden: true,
minWidth: 50,
maxWidth: 120,
+ initialWidth: 80,
align: "right",
});
@@ -548,6 +556,7 @@
hidden: true,
minWidth: 80,
maxWidth: 100,
+ initialWidth: 80,
align: "right",
});
@@ -554,6 +563,7 @@
this._transferSizeColumn = new WI.TableColumn("transferSize", WI.UIString("Transfer Size"), {
minWidth: 100,
maxWidth: 150,
+ initialWidth: 100,
align: "right",
});
@@ -560,6 +570,7 @@
this._timeColumn = new WI.TableColumn("time", WI.UIString("Time"), {
minWidth: 65,
maxWidth: 90,
+ initialWidth: 65,
align: "right",
});
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Table.js (223146 => 223147)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2017-10-10 21:32:52 UTC (rev 223146)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2017-10-10 21:40:31 UTC (rev 223147)
@@ -820,6 +820,13 @@
this._columnWidths[i] = column.width;
}
+ // Best fit with the preferred initial width for flexible columns.
+ bestFit.call(this, (column, width) => {
+ if (!column.preferredInitialWidth || width <= column.preferredInitialWidth)
+ return -1;
+ return column.preferredInitialWidth;
+ });
+
// Best fit max size flexible columns. May make more pixels available for other columns.
bestFit.call(this, (column, width) => {
if (!column.maxWidth || width <= column.maxWidth)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TableColumn.js (223146 => 223147)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TableColumn.js 2017-10-10 21:32:52 UTC (rev 223146)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TableColumn.js 2017-10-10 21:40:31 UTC (rev 223147)
@@ -41,6 +41,7 @@
this._width = initialWidth || NaN;
this._minWidth = minWidth || 50;
this._maxWidth = maxWidth || 0;
+ this._initialWidth = initialWidth || NaN;
this._hidden = hidden || false;
this._defaultHidden = hidden || false;
this._sortable = typeof sortable === "boolean" ? sortable : true;
@@ -59,6 +60,7 @@
get name() { return this._name; }
get minWidth() { return this._minWidth; }
get maxWidth() { return this._maxWidth; }
+ get preferredInitialWidth() { return this._initialWidth; }
get defaultHidden() { return this._defaultHidden; }
get sortable() { return this._sortable; }
get hideable() { return this._hideable; }
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes