Opened on 04/03/2017 at 01:42:03 PM
Closed on 06/19/2017 at 03:10:34 PM
Last modified on 07/07/2017 at 01:33:54 PM
#5094 closed change (fixed)
Hide elements with :has() filter in adblockpluschrome
Reported by: | hfiguiere | Assignee: | hfiguiere |
---|---|---|---|
Priority: | Unknown | Milestone: | Adblock-Plus-1.13.3-for-Chrome-Opera |
Module: | Platform | Keywords: | |
Cc: | fhd, sebastian, kzar, arthur | Blocked By: | #3143, #5220 |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by hfiguiere)
Background
With issue #3143 we added a callback to hide elements for handling the :has() pseudo class selector filter. So this need to be implemented in the addon side.
What to change
- Update dependencies to have the patch for issue #3143. The following changes will be brought in:
- Issue #4796 - Use a modern JS engine in the browser tests and convert all files to ECMAScript 6
- Noissue - Updated list of recommended subscriptions
- Issue #5287 - Change syntax for element hiding emulation filters and remove simplified element hiding syntax
- Issue #5314 - Allow using element hiding emulation filters to hide elements with plain selectors
- Add the callback when constructing ElemHideEmulation
- Make sure the filter validation doesn't reject these filters. It currently does since it do a querySelector() and that triggers a DOM exception.
Note
It is not certain we'd need a callback, we could possibly perform hiding the elements directly in the content script. I assumed we do since we do the same thing to add the selectors.
Hints for testers
Things to look out for testing:
- old domain.com##[-abp-properties="..."] filters must still work. We convert them on the fly. Checking that the equivalent with the new syntax works is a good idea.
- Adding the new type of filters with the options page in the add-on work: they should not be rejected. Use the new selector with ## should be rejected.
- Checking that filters with syntax error get rejected when the page is loaded: the JavaScript console display the error.
- Checking that a #?# filter with a regular selector work and that the actual element have an inline style to hide it.
Attachments (0)
Change History (17)
comment:1 Changed on 04/03/2017 at 01:44:07 PM by fhd
- Cc fhd added
comment:3 Changed on 04/03/2017 at 02:13:58 PM by hfiguiere
- Blocked By 3143 added
comment:5 Changed on 04/04/2017 at 09:01:54 AM by hfiguiere
- Owner set to hfiguiere
comment:6 Changed on 04/04/2017 at 09:02:14 AM by hfiguiere
- Status changed from new to reviewing
comment:7 Changed on 04/04/2017 at 09:05:08 AM by fhd
- Cc sebastian kzar added
- Component changed from Unknown to Platform
comment:8 Changed on 05/08/2017 at 02:06:26 PM by hfiguiere
- Blocked By 5220 added
comment:10 Changed on 06/14/2017 at 04:45:20 PM by kzar
- Description modified (diff)
comment:11 Changed on 06/19/2017 at 02:10:36 PM by hfiguiere
- Description modified (diff)
comment:12 Changed on 06/19/2017 at 02:51:46 PM by abpbot
comment:13 Changed on 06/19/2017 at 03:10:34 PM by hfiguiere
- Milestone set to Adblock-Plus-for-Chrome-Opera-next
- Resolution set to fixed
- Status changed from reviewing to closed
comment:14 Changed on 06/19/2017 at 03:44:28 PM by arthur
- Cc arthur added
comment:15 Changed on 06/19/2017 at 04:40:30 PM by hfiguiere
- Description modified (diff)
comment:16 Changed on 06/20/2017 at 04:41:10 PM by abpbot
A commit referencing this issue has landed:
Issue 5094 - The MutationObserver callback was wrong
comment:17 Changed on 07/07/2017 at 01:33:54 PM by Ross
- Tester changed from Unknown to Ross
- Verified working set
Done. The old format is converted on the fly. Can be added to the options page. Invalid selectors are reported in the log. Regular selectors work for hiding. The filters I was given on IRC using :has() had the desired effect.
ABP 1.13.2.1785
Chrome 49 / 59 / Windows 7
Opera 36 / 45 / Windows 7
A commit referencing this issue has landed:
Issue 5094 - Implement support for :-abp-has() in chrome extension