Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/devtools.js

Issue 29991594: Issue 7243 - Update adblockpluscore dependency to hg:e26e122e0702 (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Update dependency to hg:91cd83c4c272 Created Jan. 30, 2019, 7:19 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/devtools.js
===================================================================
--- a/lib/devtools.js
+++ b/lib/devtools.js
@@ -78,19 +78,21 @@
record.request.docDomain == request.docDomain &&
// Ignore partial (e.g. ELEMHIDE) whitelisting if there is already
// a DOCUMENT exception which disables all means of blocking.
(record.request.type == "DOCUMENT" ?
nonRequestTypes.includes(request.type) :
record.request.type == request.type) &&
- // Matched element hiding filters don't relate to a particular request,
- // so we have to compare the selector in order to avoid duplicates.
- (record.filter && record.filter.selector) == (filter && filter.selector)
+ // Matched element hiding and CSP filters don't relate to a particular
+ // request, so we have to compare the selector or the CSP value in order to
+ // avoid duplicates.
Sebastian Noack 2019/01/30 19:54:25 This comment is misleading. $csp filter relate to
+ (record.filter && record.filter.selector) == (filter && filter.selector) &&
+ (record.filter && record.filter.csp) == (filter && filter.csp)
);
}
function addRecord(panel, request, filter)
{
if (!hasRecord(panel, request, filter))
{
panel.port.postMessage({

Powered by Google App Engine
This is Rietveld