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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 /** 989 /**
990 * @param {!WebInspector.NetworkRequest} request 990 * @param {!WebInspector.NetworkRequest} request
991 * @return {boolean} 991 * @return {boolean}
992 */ 992 */
993 _matchRequest: function(request) 993 _matchRequest: function(request)
994 { 994 {
995 var re = this._searchRegex; 995 var re = this._searchRegex;
996 if (!re) 996 if (!re)
997 return false; 997 return false;
998 return re.test(request.name()) || (this._networkLogLargeRowsSetting.get( ) && re.test(request.path())); 998
999 var text = (this._networkLogLargeRowsSetting.get() ? request.path() + "/ " + request.name() : request.name());
allada 2016/08/08 17:54:00 nit: remove parenthesis wrap.
1000 return re.test(text);
999 }, 1001 },
1000 1002
1001 _clearSearchMatchedList: function() 1003 _clearSearchMatchedList: function()
1002 { 1004 {
1003 this._matchedRequestCount = -1; 1005 this._matchedRequestCount = -1;
1004 this._currentMatchedRequestNode = null; 1006 this._currentMatchedRequestNode = null;
1005 this._removeAllHighlights(); 1007 this._removeAllHighlights();
1006 }, 1008 },
1007 1009
1008 _removeAllHighlights: function() 1010 _removeAllHighlights: function()
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 1472
1471 /** 1473 /**
1472 * @param {?RegExp} regex 1474 * @param {?RegExp} regex
1473 * @param {!WebInspector.NetworkRequest} request 1475 * @param {!WebInspector.NetworkRequest} request
1474 * @return {boolean} 1476 * @return {boolean}
1475 */ 1477 */
1476 WebInspector.NetworkLogView._requestNameOrPathFilter = function(regex, request) 1478 WebInspector.NetworkLogView._requestNameOrPathFilter = function(regex, request)
1477 { 1479 {
1478 if (!regex) 1480 if (!regex)
1479 return false; 1481 return false;
1480 return regex.test(request.name()) || regex.test(request.path()); 1482
1483 var text = request.path() + "/" + request.name();
allada 2016/08/08 17:54:00 nit: lets put this into the regex.test() method.
1484 return regex.test(text);
1481 } 1485 }
1482 1486
1483 /** 1487 /**
1484 * @param {string} domain 1488 * @param {string} domain
1485 * @return {!Array.<string>} 1489 * @return {!Array.<string>}
1486 */ 1490 */
1487 WebInspector.NetworkLogView._subdomains = function(domain) 1491 WebInspector.NetworkLogView._subdomains = function(domain)
1488 { 1492 {
1489 var result = [domain]; 1493 var result = [domain];
1490 var indexOfPeriod = domain.indexOf("."); 1494 var indexOfPeriod = domain.indexOf(".");
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 return false; 1692 return false;
1689 return true; 1693 return true;
1690 } 1694 }
1691 1695
1692 WebInspector.NetworkLogView.EventTypes = { 1696 WebInspector.NetworkLogView.EventTypes = {
1693 RequestSelected: "RequestSelected", 1697 RequestSelected: "RequestSelected",
1694 SearchCountUpdated: "SearchCountUpdated", 1698 SearchCountUpdated: "SearchCountUpdated",
1695 SearchIndexUpdated: "SearchIndexUpdated", 1699 SearchIndexUpdated: "SearchIndexUpdated",
1696 UpdateRequest: "UpdateRequest" 1700 UpdateRequest: "UpdateRequest"
1697 }; 1701 };
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698