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

Side by Side Diff: src/org/adblockplus/android/AdblockPlus.java

Issue 5763633376133120: Don't inject any element hiding rules (Closed)
Patch Set: Created Nov. 29, 2013, 1:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 /** 287 /**
288 * Returns ElemHide selectors for domain. 288 * Returns ElemHide selectors for domain.
289 * 289 *
290 * @param domain The domain 290 * @param domain The domain
291 * @return A list of CSS selectors 291 * @return A list of CSS selectors
292 */ 292 */
293 public String[] getSelectorsForDomain(final String domain) 293 public String[] getSelectorsForDomain(final String domain)
294 { 294 {
295 /* We need to ignore element hiding rules here to work around two bugs:
296 * 1. CSS is being injected even when there's an exception rule with $elemhi de
297 * 2. The injected CSS causes blank pages in Chrome for Android
298 *
299 * Starting with 1.1.2, we ignored element hiding rules after download anywa y, to keep the
300 * memory usage down. Doing this with libadblockplus is trickier, but would be the clean
301 * solution. */
302 return null;
303 /*
295 if (!filteringEnabled) 304 if (!filteringEnabled)
296 return null; 305 return null;
297 306
298 return abpEngine.getSelectorsForDomain(domain); 307 return abpEngine.getSelectorsForDomain(domain);
308 */
299 } 309 }
300 310
301 /** 311 /**
302 * Checks if filters match request parameters. 312 * Checks if filters match request parameters.
303 * 313 *
304 * @param url 314 * @param url
305 * Request URL 315 * Request URL
306 * @param query 316 * @param query
307 * Request query string 317 * Request query string
308 * @param referrer 318 * @param referrer
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 Log.e(TAG, e.getMessage(), e); 482 Log.e(TAG, e.getMessage(), e);
473 } 483 }
474 484
475 // Set crash handler 485 // Set crash handler
476 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); 486 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this));
477 487
478 // Initiate update check 488 // Initiate update check
479 scheduleUpdater(0); 489 scheduleUpdater(0);
480 } 490 }
481 } 491 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld