Left: | ||
Right: |
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 final String[] referrerChainArray = referrerChain.toArray(new String[refer rerChain.size()]); | 286 final String[] referrerChainArray = referrerChain.toArray(new String[refer rerChain.size()]); |
287 final List<String> selectors = this.abpEngine.getElementHidingSelectors(ur l, referrerChainArray); | 287 final List<String> selectors = this.abpEngine.getElementHidingSelectors(ur l, referrerChainArray); |
288 // We're returning 'null' when no selectors are available to be consistent | 288 // We're returning 'null' when no selectors are available to be consistent |
289 // with the previous implementation | 289 // with the previous implementation |
290 return selectors.isEmpty() ? null : selectors.toArray(new String[selectors .size()]); | 290 return selectors.isEmpty() ? null : selectors.toArray(new String[selectors .size()]); |
291 } | 291 } |
292 else | 292 else |
293 { | 293 { |
294 /* | 294 /* |
295 * This case is still the default for Adblock Plus for Android, as we did not yet | 295 * This case is still the default for Adblock Plus for Android, as we did not yet |
296 * re-enabled element hiding but only enhanced/fixed the current implement ation. | 296 * re-enable element hiding but only enhanced/fixed the current implementa tion. |
Felix Dahlke
2015/12/04 17:03:37
Typo, should be: "[...] as we did not yet re-enabl
René Jeschke
2015/12/04 17:44:25
Done.
| |
297 * See: https://issues.adblockplus.org/ticket/3364 | 297 * See: https://issues.adblockplus.org/ticket/3364 |
298 */ | 298 */ |
299 /* We need to ignore element hiding rules here to work around two bugs: | 299 /* We need to ignore element hiding rules here to work around two bugs: |
300 * 1. CSS is being injected even when there's an exception rule with $elem hide | 300 * 1. CSS is being injected even when there's an exception rule with $elem hide |
301 * 2. The injected CSS causes blank pages in Chrome for Android | 301 * 2. The injected CSS causes blank pages in Chrome for Android |
302 * | 302 * |
303 * Starting with 1.1.2, we ignored element hiding rules after download any way, to keep the | 303 * Starting with 1.1.2, we ignored element hiding rules after download any way, to keep the |
304 * memory usage down. Doing this with libadblockplus is trickier, but woul d be the clean | 304 * memory usage down. Doing this with libadblockplus is trickier, but woul d be the clean |
305 * solution. */ | 305 * solution. */ |
306 return null; | 306 return null; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
449 } | 449 } |
450 catch (final IOException e) | 450 catch (final IOException e) |
451 { | 451 { |
452 Log.e(TAG, e.getMessage(), e); | 452 Log.e(TAG, e.getMessage(), e); |
453 } | 453 } |
454 | 454 |
455 // Set crash handler | 455 // Set crash handler |
456 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); | 456 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); |
457 } | 457 } |
458 } | 458 } |
LEFT | RIGHT |