Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2180743002: [Devtools] Fixed regex filtering in the Network panel for Negative lookaheads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made function name shorter Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 3e8c48459315aeac5e765d59755ca51643fb8c3e..1c69ba0b0e42dc47e9de0b25c10361302400deea 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -995,7 +995,9 @@ WebInspector.NetworkLogView.prototype = {
var re = this._searchRegex;
if (!re)
return false;
- return re.test(request.name()) || (this._networkLogLargeRowsSetting.get() && re.test(request.path()));
+
+ var text = this._networkLogLargeRowsSetting.get() ? request.path() + "/" + request.name() : request.name();
+ return re.test(text);
},
_clearSearchMatchedList: function()
@@ -1190,7 +1192,7 @@ WebInspector.NetworkLogView.prototype = {
regex = this._textFilterUI.regex();
}
- var filter = WebInspector.NetworkLogView._requestNameOrPathFilter.bind(null, regex);
+ var filter = WebInspector.NetworkLogView._requestPathFilter.bind(null, regex);
if (negative)
filter = WebInspector.NetworkLogView._negativeFilter.bind(null, filter);
return filter;
@@ -1473,11 +1475,12 @@ WebInspector.NetworkLogView._negativeFilter = function(filter, request)
* @param {!WebInspector.NetworkRequest} request
* @return {boolean}
*/
-WebInspector.NetworkLogView._requestNameOrPathFilter = function(regex, request)
+WebInspector.NetworkLogView._requestPathFilter = function(regex, request)
{
if (!regex)
return false;
- return regex.test(request.name()) || regex.test(request.path());
+
+ return regex.test(request.path() + "/" + request.name());
}
/**
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698