Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge pull request #24688 from brave/procedural-filtering" #25640

Closed
wants to merge 1 commit into from

Conversation

cdesouza-chromium
Copy link
Collaborator

This PR unfortunately has broken gnrt runs on master.

This reverts commit 121a325, reversing changes made to c1da125.

Resolves

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

This PR unfortunately has broken `gnrt` runs on `master`.

This reverts commit 121a325, reversing
changes made to c1da125.
@cdesouza-chromium cdesouza-chromium self-assigned this Sep 18, 2024
@github-actions github-actions bot added CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) labels Sep 18, 2024
Copy link
Contributor

[puLL-Merge] - brave/brave-core@25640

Description

This PR removes support for procedural cosmetic filtering in Brave's ad-blocking system. It downgrades the adblock crate from version 0.9.0 to 0.8.12, which lacks procedural filtering capabilities. The change affects both the desktop and iOS versions of Brave.

Key changes include:

  • Removal of procedural filtering logic from cosmetic filtering scripts
  • Deletion of tests related to procedural filtering
  • Adjustments to ad-blocking service and related components to remove procedural filtering support
  • Downgrade of the adblock Rust crate

Possible Issues

  1. This change may reduce the effectiveness of ad-blocking in some scenarios where procedural filters were previously used.

  2. There may be some performance impact, either positive or negative, from removing the procedural filtering logic.

  3. Some users or filter list creators may have been relying on procedural filtering capabilities, which will no longer be available.

Changes

Changes

  1. browser/about_flags.cc: Removed the "brave-adblock-procedural-filtering" feature flag.

  2. browser/brave_shields/ad_block_service_browsertest.cc: Removed tests related to procedural filtering.

  3. components/brave_shields/adblock/rs/BUILD.gn: Updated dependency to use adblock v0.8 instead of v0.9.

  4. components/brave_shields/adblock/rs/Cargo.toml: Downgraded adblock crate to version 0.8.12.

  5. components/brave_shields/content/browser/ad_block_service.cc and .h: Removed procedural filtering logic and related methods.

  6. components/cosmetic_filters/browser/cosmetic_filters_resources.cc: Removed procedural actions handling.

  7. components/cosmetic_filters/renderer/cosmetic_filters_js_handler.cc: Removed procedural filtering logic and adjusted cosmetic filtering implementation.

  8. components/cosmetic_filters/resources/data/content_cosmetic.ts: Removed procedural filtering logic and simplified cosmetic filtering implementation.

  9. components/cosmetic_filters/resources/data/procedural_filters.ts: Deleted this file as it's no longer needed.

  10. iOS changes:

  • Removed procedural filtering support from various iOS-specific files
  • Updated tests to remove procedural filtering checks
  • Adjusted cosmetic filtering models and scripts for iOS
  1. test/data/cosmetic_filtering.html: Removed test cases for procedural filtering.

  2. Updated Rust crate from adblock-0.9.0 to adblock-0.8.12 in the third_party directory.

Overall, this PR significantly simplifies the ad-blocking implementation by removing procedural filtering capabilities, which may impact ad-blocking effectiveness but could potentially improve performance.

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) CI/storybook-url Deploy storybook and provide a unique URL for each build puLL-Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants