Title: [237817] trunk
- Revision
- 237817
- Author
- [email protected]
- Date
- 2018-11-05 11:01:30 -0800 (Mon, 05 Nov 2018)
Log Message
Web Inspector: Table selection should not require that rows be in the cache
https://bugs.webkit.org/show_bug.cgi?id=190993
<rdar://problem/45613812>
Reviewed by Devin Rousso.
Source/WebInspectorUI:
Deselecting a table row shouldn't depend on it being in the cache. This
allows us to implement select all, and other kinds of bulk selection
actions that affect rows that haven't been revealed.
* UserInterface/Views/Table.js:
(WI.Table.prototype.deselectRow):
LayoutTests:
Add a test that a table row that is not in the cache can be selected/deselected.
* inspector/table/table-selection-expected.txt:
* inspector/table/table-selection.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (237816 => 237817)
--- trunk/LayoutTests/ChangeLog 2018-11-05 18:37:43 UTC (rev 237816)
+++ trunk/LayoutTests/ChangeLog 2018-11-05 19:01:30 UTC (rev 237817)
@@ -1,3 +1,16 @@
+2018-11-05 Matt Baker <[email protected]>
+
+ Web Inspector: Table selection should not require that rows be in the cache
+ https://bugs.webkit.org/show_bug.cgi?id=190993
+ <rdar://problem/45613812>
+
+ Reviewed by Devin Rousso.
+
+ Add a test that a table row that is not in the cache can be selected/deselected.
+
+ * inspector/table/table-selection-expected.txt:
+ * inspector/table/table-selection.html:
+
2018-11-05 Devin Rousso <[email protected]>
Web Inspector: show save/restore stack for recorded 2D Canvases
Modified: trunk/LayoutTests/inspector/table/table-selection-expected.txt (237816 => 237817)
--- trunk/LayoutTests/inspector/table/table-selection-expected.txt 2018-11-05 18:37:43 UTC (rev 237816)
+++ trunk/LayoutTests/inspector/table/table-selection-expected.txt 2018-11-05 19:01:30 UTC (rev 237817)
@@ -1,4 +1,4 @@
-Tests for WI.Table.
+Tests for WI.Table selection.
== Running test suite: Table.RowSelection
@@ -66,3 +66,11 @@
PASS: selectedRow should be 1.
PASS: selectedRows should be [1].
+-- Running test case: Table.SelectAndDeselectRow.NotCached
+Selecting row 999.
+PASS: Table selection changed.
+PASS: selectedRow should be 999.
+Deselecting row 999.
+PASS: Table selection changed.
+PASS: selectedRows should not include 999.
+
Modified: trunk/LayoutTests/inspector/table/table-selection.html (237816 => 237817)
--- trunk/LayoutTests/inspector/table/table-selection.html 2018-11-05 18:37:43 UTC (rev 237816)
+++ trunk/LayoutTests/inspector/table/table-selection.html 2018-11-05 19:01:30 UTC (rev 237817)
@@ -133,11 +133,24 @@
}
});
+ suite.addTestCase({
+ name: "Table.SelectAndDeselectRow.NotCached",
+ description: "Select and deselect a row that is not in the table cache.",
+ test() {
+ let table = InspectorTest.createTable(1000);
+
+ triggerSelectRow(table, 999);
+ triggerDeselectRow(table, 999);
+
+ return true;
+ }
+ });
+
suite.runTestCasesAndFinish();
}
</script>
</head>
<body _onLoad_="runTest()">
- <p>Tests for WI.Table.</p>
+ <p>Tests for WI.Table selection.</p>
</body>
</html>
Modified: trunk/Source/WebInspectorUI/ChangeLog (237816 => 237817)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-11-05 18:37:43 UTC (rev 237816)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-11-05 19:01:30 UTC (rev 237817)
@@ -1,3 +1,18 @@
+2018-11-05 Matt Baker <[email protected]>
+
+ Web Inspector: Table selection should not require that rows be in the cache
+ https://bugs.webkit.org/show_bug.cgi?id=190993
+ <rdar://problem/45613812>
+
+ Reviewed by Devin Rousso.
+
+ Deselecting a table row shouldn't depend on it being in the cache. This
+ allows us to implement select all, and other kinds of bulk selection
+ actions that affect rows that haven't been revealed.
+
+ * UserInterface/Views/Table.js:
+ (WI.Table.prototype.deselectRow):
+
2018-11-05 Devin Rousso <[email protected]>
Web Inspector: show save/restore stack for recorded 2D Canvases
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Table.js (237816 => 237817)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2018-11-05 18:37:43 UTC (rev 237816)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Table.js 2018-11-05 19:01:30 UTC (rev 237817)
@@ -355,11 +355,9 @@
return;
let oldSelectedRow = this._cachedRows.get(rowIndex);
- if (!oldSelectedRow)
- return;
+ if (oldSelectedRow)
+ oldSelectedRow.classList.remove("selected");
- oldSelectedRow.classList.remove("selected");
-
this._selectedRows.delete(rowIndex);
if (this._selectedRowIndex === rowIndex) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes