Brave-browser: Implement cosmetic blocking [tracking]

Created on 25 Jul 2019  路  7Comments  路  Source: brave/brave-browser

Notes for QA (edit by @bsclifton)

Test Plan

In 1.5:
First, enable cosmetic filtering via brave://flags/#brave-adblock-cosmetic-filtering

Then, in both 1.5 and 1.6:
Navigate to https://enpt.dict.cc in a new tab
Ensure there is no large square whitespace under the word "Advertisement" in the center of the page (by the "dict.cc Dicion谩rio Ingl锚s-Portugu锚s: Portuguese-English and Multilingual Dictionary" header)

Description

Would be great to support EasyList and similar cosmetic filter rules. Much of this work has already been done in https://github.com/brave/adblock-rust. This issue is a tracking issue to keep track of all the branches and changes needed across multiple projects to land this in brave-browser.

QA Pass-Linux QA Pass-Win64 QA Pass-macOS QYes featurCSS-element-block featurshields featurshieldadblock release-noteexclude

Most helpful comment

@szaimen crashes on Windows should be fixed as of https://github.com/brave/brave-core/pull/4540.

Currently there are no additional settings regarding cosmetic filtering; this work supports the cosmetic filters that will soon be shipped from our filter lists.

The feature flag will be on by default with https://github.com/brave/brave-core/pull/4511.

All 7 comments

Relevant tracking issue in adblock-rust: https://github.com/brave/adblock-rust/issues/38

Relevant tracking issue in adblock-rust-ffi: https://github.com/brave/adblock-rust-ffi/issues/3

When another fix is attempted, we'll want to link to test plan if manual QA is required. If not and everything is covered by automation, we can change label to QA/No

So I have enabled the cosmetic filtering option over brave://flags. But as soon as I visit a website, brave nightly crashes on Windows 10. I also cannot find any additional option concerning cosmetic filtering in the brave settings after a relaunch after I enabled the flag.

Is there something I have missed to enable this option?

@szaimen crashes on Windows should be fixed as of https://github.com/brave/brave-core/pull/4540.

Currently there are no additional settings regarding cosmetic filtering; this work supports the cosmetic filters that will soon be shipped from our filter lists.

The feature flag will be on by default with https://github.com/brave/brave-core/pull/4511.

Adding QA/Blocked label for now.

Per discussion with @rebron not all PRs needed for this are currently in 1.5.x so this needs some sorting before QA can test.

Verified passed with

Brave | 1.5.109 Chromium: 80.0.3987.132聽(Official Build)聽beta聽(64-bit)
-- | --
Revision | fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS | macOS Version 10.14.6 (Build 18G3020)

  • Verified test plan from description

https://enpt.dict.cc/ without cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 36 03 PM

https://enpt.dict.cc/ after cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 37 03 PM

  • Also did a spot check of some other sites, no majorly noticeable issues. Display of some sites, such as buzzfeed.com improved.

buzzfeed.com without cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 36 33 PM

buzzfeed.com with cosmetic blocking flag enabled:
Screen Shot 2020-03-11 at 4 37 23 PM

Verification passed on

Brave | 1.5.109 Chromium: 80.0.3987.132聽(Official Build)聽beta聽(64-bit)
-- | --
Revision | fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS | Windows聽10 OS Version 1803 (Build 17134.1006)

https://enpt.dict.cc/ after cosmetic blocking flag enabled:
image

buzzfeed.com without cosmetic blocking flag enabled:
image

buzzfeed.com with cosmetic blocking flag enabled:
image

Verification passed on

Brave | 1.5.111 Chromium: 80.0.3987.132聽(Official Build)聽(64-bit)
-- | --
Revision | fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS | Ubuntu 18.04 LTS

disabled
image

enabled
image

Was this page helpful?
0 / 5 - 0 ratings