| LEFT | RIGHT |
| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Just in case the getSelectors() generator above had to run some heavy | 217 // Just in case the getSelectors() generator above had to run some heavy |
| 218 // document.querySelectorAll() call which didn't produce any results, make | 218 // document.querySelectorAll() call which didn't produce any results, make |
| 219 // sure there is at least one point where execution can pause. | 219 // sure there is at least one point where execution can pause. |
| 220 yield null; | 220 yield null; |
| 221 } | 221 } |
| 222 | 222 |
| 223 function PlainSelector(selector) | 223 function PlainSelector(selector) |
| 224 { | 224 { |
| 225 this._selector = selector; | 225 this._selector = selector; |
| 226 this.maybeDependsOnAttributes = /[#.]|\[.+\]/.test(selector); | 226 this.maybeDependsOnAttributes = /[#.]|\[.+\]/.test(selector); |
| 227 this.dependsOnDOM = this.maybeDependsOnAttributes; |
| 227 } | 228 } |
| 228 | 229 |
| 229 PlainSelector.prototype = { | 230 PlainSelector.prototype = { |
| 230 /** | 231 /** |
| 231 * Generator function returning a pair of selector | 232 * Generator function returning a pair of selector |
| 232 * string and subtree. | 233 * string and subtree. |
| 233 * @param {string} prefix the prefix for the selector. | 234 * @param {string} prefix the prefix for the selector. |
| 234 * @param {Node} subtree the subtree we work on. | 235 * @param {Node} subtree the subtree we work on. |
| 235 * @param {StringifiedStyle[]} styles the stringified style objects. | 236 * @param {StringifiedStyle[]} styles the stringified style objects. |
| 236 */ | 237 */ |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 characterData: shouldObserveCharacterData(this.patterns), | 878 characterData: shouldObserveCharacterData(this.patterns), |
| 878 subtree: true | 879 subtree: true |
| 879 } | 880 } |
| 880 ); | 881 ); |
| 881 this.document.addEventListener("load", this.onLoad.bind(this), true); | 882 this.document.addEventListener("load", this.onLoad.bind(this), true); |
| 882 } | 883 } |
| 883 } | 884 } |
| 884 }; | 885 }; |
| 885 | 886 |
| 886 exports.ElemHideEmulation = ElemHideEmulation; | 887 exports.ElemHideEmulation = ElemHideEmulation; |
| LEFT | RIGHT |