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

Delta Between Two Patch Sets: lib/filterClasses.js

Issue 29799602: Noissue - Avoid setting BlockingFilter instance properties (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created June 5, 2018, 2:13 p.m.
Right Patch Set: Avoid setting csp and rewrite properties as well Created June 5, 2018, 2:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 */ 902 */
903 function BlockingFilter(text, regexpSource, contentType, matchCase, domains, 903 function BlockingFilter(text, regexpSource, contentType, matchCase, domains,
904 thirdParty, sitekeys, collapse, csp, rewrite) 904 thirdParty, sitekeys, collapse, csp, rewrite)
905 { 905 {
906 RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains, 906 RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains,
907 thirdParty, sitekeys); 907 thirdParty, sitekeys);
908 908
909 if (collapse != null) 909 if (collapse != null)
910 this.collapse = collapse; 910 this.collapse = collapse;
911 911
912 this.csp = csp; 912 if (csp != null)
913 this.rewrite = rewrite; 913 this.csp = csp;
914
915 if (rewrite != null)
916 this.rewrite = rewrite;
914 } 917 }
915 exports.BlockingFilter = BlockingFilter; 918 exports.BlockingFilter = BlockingFilter;
916 919
917 BlockingFilter.prototype = extend(RegExpFilter, { 920 BlockingFilter.prototype = extend(RegExpFilter, {
918 type: "blocking", 921 type: "blocking",
919 922
920 /** 923 /**
921 * Defines whether the filter should collapse blocked content. 924 * Defines whether the filter should collapse blocked content.
922 * Can be null (use the global preference). 925 * Can be null (use the global preference).
923 * @type {?boolean} 926 * @type {?boolean}
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 */ 1099 */
1097 function ElemHideEmulationFilter(text, domains, selector) 1100 function ElemHideEmulationFilter(text, domains, selector)
1098 { 1101 {
1099 ElemHideBase.call(this, text, domains, selector); 1102 ElemHideBase.call(this, text, domains, selector);
1100 } 1103 }
1101 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; 1104 exports.ElemHideEmulationFilter = ElemHideEmulationFilter;
1102 1105
1103 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { 1106 ElemHideEmulationFilter.prototype = extend(ElemHideBase, {
1104 type: "elemhideemulation" 1107 type: "elemhideemulation"
1105 }); 1108 });
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld