From f2d16712645d7af553cf243d971c465efd665207 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 15 Jul 2020 15:52:11 -0400 Subject: [PATCH] Fix improper rejecting fitlers with `$all,~document` options Related commit: - https://github.com/gorhill/uBlock/commit/2eec28520f540440c57e9d5a465d8a61054295ea Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1134#issuecomment-657122472 Source commit was imported manually because cherry-pick didn't work properly dur to earlier changes in target file. --- src/js/static-filtering-parser.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 3be3cde4b..0f655bf3f 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1987,8 +1987,8 @@ const netOptionTokens = new Map([ [ 'css', OPTTokenCss | OPTCanNegate | OPTType | OPTNetworkType ], [ 'stylesheet', OPTTokenCss | OPTCanNegate | OPTType | OPTNetworkType ], [ 'denyallow', OPTTokenDenyAllow | OPTMustAssign | OPTDomainList ], - [ 'doc', OPTTokenDoc | OPTType | OPTNetworkType ], - [ 'document', OPTTokenDoc | OPTType | OPTNetworkType ], + [ 'doc', OPTTokenDoc | OPTType | OPTNetworkType | OPTCanNegate ], + [ 'document', OPTTokenDoc | OPTType | OPTNetworkType | OPTCanNegate ], [ 'domain', OPTTokenDomain | OPTMustAssign | OPTDomainList ], [ 'ehide', OPTTokenEhide | OPTType ], [ 'elemhide', OPTTokenEhide | OPTType ], @@ -2001,8 +2001,8 @@ const netOptionTokens = new Map([ [ 'generichide', OPTTokenGhide | OPTType ], [ 'image', OPTTokenImage | OPTCanNegate | OPTType | OPTNetworkType ], [ 'important', OPTTokenImportant | OPTBlockOnly ], - [ 'inline-font', OPTTokenInlineFont | OPTType ], - [ 'inline-script', OPTTokenInlineScript | OPTType ], + [ 'inline-font', OPTTokenInlineFont | OPTType | OPTCanNegate ], + [ 'inline-script', OPTTokenInlineScript | OPTType | OPTCanNegate ], [ 'media', OPTTokenMedia | OPTCanNegate | OPTType | OPTNetworkType ], [ 'mp4', OPTTokenMp4 | OPTType | OPTNetworkType | OPTBlockOnly | OPTRedirectType ], [ 'object', OPTTokenObject | OPTCanNegate | OPTType | OPTNetworkType ], @@ -2011,7 +2011,7 @@ const netOptionTokens = new Map([ [ 'ping', OPTTokenPing | OPTCanNegate | OPTType | OPTNetworkType ], [ 'beacon', OPTTokenPing | OPTCanNegate | OPTType | OPTNetworkType ], [ 'popunder', OPTTokenPopunder | OPTType ], - [ 'popup', OPTTokenPopup | OPTType ], + [ 'popup', OPTTokenPopup | OPTType | OPTCanNegate ], [ 'redirect', OPTTokenRedirect | OPTMustAssign | OPTBlockOnly | OPTRedirectType ], [ 'redirect-rule', OPTTokenRedirectRule | OPTMustAssign | OPTBlockOnly | OPTRedirectType ], [ 'script', OPTTokenScript | OPTCanNegate | OPTType | OPTNetworkType ],