Switch to eyeo's Web Extension Ad Blocking Toolkit (EWE)
Background / User story
In preparation for switching the extension to Manifest v3, we first need to replace the core ad blocking related code that we imported in #884 (closed) and instead use the new web extension SDK. Therefore we need to add it as a dependency and integrate it into the extension by using its API.
Integration feedback/progress: https://docs.google.com/spreadsheets/d/1nvfdc3tHwoCxT0hKrYgNpL7LclGWC5AtwxSz8UYYplU/edit?usp=sharing
Note that webext-sdk includes its own adblockpluscore dependency, which may be a later version of adblockpluscore than the one we're removing as part of this issue.
What to change
- Design: N/A
- Research: N/A
- Spec: N/A
- Legal: N/A
-
Development:
- Update webext-sdk dependency to TBD (verify that a tagged adblockpluscore version is used and that its CI pipeline succeeds).
- Integrate ewe-api.js and ewe-content.js webext-sdk bundles into the extension.
- Replace usage of adblockpluscore modules with EWE APIs.
- Remove adblockpluscore dependency.
- Remove unused/redundant adblockpluschrome files/bundles.
- Remove unused preferences.
- Check for integration changes that may be necessary, due to webext-sdk including an upgrade to the adblockpluscore dependency.
- Update README accordingly.
Hints for testers
Apart from verifying that building, testing and using the extension works as expected:
- Migration of user preferences and other user data when updating from an older version.
Due to the amount of changes, we may want to put additional focus on the following areas to ensure nothing broke:
- Allowlisting (incl. how allowlisting filters are reflected in the UI)
- Block element feature (incl. appropriate filters should be suggested, depending on whether/how the selected element/request/frame is allowlisted)
- Developer tools panel
- Recording filters and requests in issue reports
- "Show useful notifications" option
Known issues:
- #1057 (closed) - Snippet tests are skipped in webext child pipeline.
- #1058 (closed) - Issue reporter doesn't include optional browser information.
-
#1060 (closed)
- Requests may be counted or shown twice in issue reporter and in developer tools panel.
- Page-specific allowlisting is broken.
- Sitekey-based allowlisting is broken on Firefox.
- Block element feature suggests filters in subframe even if parent frame is allowlisted.
- "blockedTotalMin" and "blockedTotalMax" notification property may not work.
- Some testpages tests are failing:
- CSP Exception
- WebRTC
- WebSocket Exception
- subscribes to a link
- dir-string
- strip-fetch-query-parameter
Partially implemented:
- #1003 (closed) - Stopped reflecting filter updates in developer tools panel.
- #1031 (closed) - Already reused filter preview functionality instead of applying element hiding filter to page immediately.
Hints for translators
N/A
Related SDK issues
-
Estimated negative impact on product, if functionality is missing:
- low: regression is limited to edge cases or to small user groups, or requires hacks based on SDK-internal implementation details
- medium: regression breaks or reduces the reliability of a specific feature
- high: regression breaks or reduces the reliablity of multiple features
↩