Title: [227652] trunk/Source/WebInspectorUI
- Revision
- 227652
- Author
- [email protected]
- Date
- 2018-01-25 20:58:33 -0800 (Thu, 25 Jan 2018)
Log Message
Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
https://bugs.webkit.org/show_bug.cgi?id=182162
<rdar://problem/36893758>
Patch by Joseph Pecoraro <[email protected]> on 2018-01-25
Reviewed by Matt Baker.
* UserInterface/Views/Table.js:
(WI.Table.prototype._handleHeaderContextMenu):
Only add the header column when we know there are hideable columns.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (227651 => 227652)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-01-26 03:42:41 UTC (rev 227651)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-01-26 04:58:33 UTC (rev 227652)
@@ -1,3 +1,15 @@
+2018-01-25 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
+ https://bugs.webkit.org/show_bug.cgi?id=182162
+ <rdar://problem/36893758>
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Views/Table.js:
+ (WI.Table.prototype._handleHeaderContextMenu):
+ Only add the header column when we know there are hideable columns.
+
2018-01-24 Joseph Pecoraro <[email protected]>
Web Inspector: Simplify update-LegacyInspectorBackendCommands.rb
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Table.js (227651 => 227652)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2018-01-26 03:42:41 UTC (rev 227651)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2018-01-26 04:58:33 UTC (rev 227652)
@@ -1250,8 +1250,7 @@
contextMenu.appendSeparator();
- const disabled = true;
- contextMenu.appendItem(WI.UIString("Displayed Columns"), () => {}, disabled);
+ let didAppendHeaderItem = false;
for (let [columnIdentifier, column] of this._columnSpecs) {
if (column.locked)
@@ -1259,6 +1258,13 @@
if (!column.hideable)
continue;
+ // Add a header item before the list of toggleable columns.
+ if (!didAppendHeaderItem) {
+ const disabled = true;
+ contextMenu.appendItem(WI.UIString("Displayed Columns"), () => {}, disabled);
+ didAppendHeaderItem = true;
+ }
+
let checked = !column.hidden;
contextMenu.appendCheckboxItem(column.name, () => {
if (column.hidden)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes