Title: [215449] trunk/Source/WebInspectorUI
Revision
215449
Author
commit-qu...@webkit.org
Date
2017-04-17 21:55:40 -0700 (Mon, 17 Apr 2017)

Log Message

Web Inspector: Network columns don't get saved when Web Inspector is closed
https://bugs.webkit.org/show_bug.cgi?id=170373
<rdar://problem/31386336>

Patch by Joseph Pecoraro <pecor...@apple.com> on 2017-04-17
Reviewed by Matt Baker.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.setColumnVisible):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
The context menu was often passing `undefined` as the visible value
which would cause the setting to not be saved appropriately. Ensure
we always get an explicit boolean.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (215448 => 215449)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-04-18 04:48:18 UTC (rev 215448)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-04-18 04:55:40 UTC (rev 215449)
@@ -1,3 +1,18 @@
+2017-04-17  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Network columns don't get saved when Web Inspector is closed
+        https://bugs.webkit.org/show_bug.cgi?id=170373
+        <rdar://problem/31386336>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/DataGrid.js:
+        (WebInspector.DataGrid.prototype.setColumnVisible):
+        (WebInspector.DataGrid.prototype._contextMenuInHeader):
+        The context menu was often passing `undefined` as the visible value
+        which would cause the setting to not be saved appropriately. Ensure
+        we always get an explicit boolean.
+
 2017-04-17  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: Use `text-align: start` for DataGrid headers

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (215448 => 215449)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2017-04-18 04:48:18 UTC (rev 215448)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2017-04-18 04:55:40 UTC (rev 215449)
@@ -922,6 +922,7 @@
     {
         let column = this.columns.get(columnIdentifier);
         console.assert(column, "Missing column info for identifier: " + columnIdentifier);
+        console.assert(typeof visible === "boolean", "New visible state should be explicit boolean", typeof visible);
 
         if (!column || visible === !column.hidden)
             return;
@@ -1641,7 +1642,9 @@
                     didAddSeparator = true;
                 }
 
-                contextMenu.appendCheckboxItem(columnInfo.title, () => { this.setColumnVisible(identifier, columnInfo.hidden); }, !columnInfo.hidden);
+                contextMenu.appendCheckboxItem(columnInfo.title, () => {
+                    this.setColumnVisible(identifier, !!columnInfo.hidden);
+                }, !columnInfo.hidden);
             }
         }
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to