Title: [242061] trunk/Source/WebInspectorUI
- Revision
- 242061
- Author
- [email protected]
- Date
- 2019-02-25 17:06:40 -0800 (Mon, 25 Feb 2019)
Log Message
Web Inspector: REGRESSION(r242018): Timelines shows no results
https://bugs.webkit.org/show_bug.cgi?id=195017
Reviewed by Joseph Pecoraro.
`simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.prototype.regExpForString):
Add assertions that the provided search query is a valid non-empty string.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter):
If the search query is empty, don't attempt to create a `RegExp` for it.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (242060 => 242061)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-02-26 00:20:55 UTC (rev 242060)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-02-26 01:06:40 UTC (rev 242061)
@@ -1,3 +1,20 @@
+2019-02-25 Devin Rousso <[email protected]>
+
+ Web Inspector: REGRESSION(r242018): Timelines shows no results
+ https://bugs.webkit.org/show_bug.cgi?id=195017
+
+ Reviewed by Joseph Pecoraro.
+
+ `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
+
+ * UserInterface/Base/SearchUtilities.js:
+ (WI.SearchUtilities.prototype.regExpForString):
+ Add assertions that the provided search query is a valid non-empty string.
+
+ * UserInterface/Views/DataGrid.js:
+ (WI.DataGrid.prototype._updateFilter):
+ If the search query is empty, don't attempt to create a `RegExp` for it.
+
2019-02-25 Matt Baker <[email protected]>
Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js (242060 => 242061)
--- trunk/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js 2019-02-26 00:20:55 UTC (rev 242060)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js 2019-02-26 01:06:40 UTC (rev 242061)
@@ -54,9 +54,13 @@
return setting instanceof WI.Setting ? setting.value : !!setting;
}
+ console.assert((typeof query === "string" && query) || query instanceof RegExp);
+
if (!checkSetting(settings.regularExpression))
- query = simpleGlobStringToRegExp(query);
+ query = simpleGlobStringToRegExp(String(query));
+ console.assert((typeof query === "string" && query) || query instanceof RegExp);
+
let flags = "g";
if (!checkSetting(settings.caseSensitive))
flags += "i";
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (242060 => 242061)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2019-02-26 00:20:55 UTC (rev 242060)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2019-02-26 01:06:40 UTC (rev 242061)
@@ -1843,7 +1843,7 @@
if (!this._rows.length)
return;
- this._textFilterRegex = WI.SearchUtilities.regExpForString(this._filterText, WI.SearchUtilities.defaultSettings);
+ this._textFilterRegex = this._filterText ? WI.SearchUtilities.regExpForString(this._filterText, WI.SearchUtilities.defaultSettings) : null;
if (this._applyFilterToNodesTask && this._applyFilterToNodesTask.processing)
this._applyFilterToNodesTask.cancel();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes