-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Re-allow cosmetic filtering to override in-page !important
styles after regression
#22264
Comments
Verified with
|
1.38.115 Chromium: 101.0.4951.64 Example |
1.38.118 Chromium: 101.0.4951.67 Example |
---|---|
Shields disabled:
- Using
1.38.115 Chromium: 101.0.4951.64
-445s
,465s
,470s
,450s
,475s
- Using
1.38.118 Chromium: 101.0.4951.67
-394s
,414s
,380s
,426s
,384s
1.38.115 Chromium: 101.0.4951.64 Example |
1.38.118 Chromium: 101.0.4951.67 Example |
---|---|
Test Case #2
-https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846
1.38.115 Chromium: 101.0.4951.64 Example |
1.38.118 Chromium: 101.0.4951.67 Example |
---|---|
Verification
|
1.38.115 Chromium: 101.0.4951.64 |
1.38.118 Chromium: 101.0.4951.67 |
---|---|
Shields disabled:
*Using 1.38.115 Chromium: 101.0.4951.64
- 289ms
, 455ms
, 252ms
, 275ms
*Using 1.38.118 Chromium: 101.0.4951.67
- 217ms
, 250ms
, 229ms
, 287ms
1.38.115 Chromium: 101.0.4951.64 Example |
1.38.118 Chromium: 101.0.4951.67 |
---|---|
Test Case #2
-https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846
1.38.115 Chromium: 101.0.4951.64 Example |
1.38.118 Chromium: 101.0.4951.67 Example |
---|---|
Verification Completed using Test Case 1: https://news.ycombinator.com/item?id=30932095 Shields ON: 1.38.118 : 572s, 702s, 668s, 630s, 504s Shields OFF: 1.38.118: 474s, 622s, 664s, 576s, 404s Test Case 2: https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846
|
Verification Completed using Test Case 1: https://news.ycombinator.com/item?id=30932095 Shields ON: 1.38.118 : 731ms, 883ms, 789ms, 766ms, 847ms Shields OFF: 1.38.118: 678ms, 713ms, 681ms, 615ms, 627ms Test Case 2: https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846
|
Verification passed on
Test Case 1: https://news.ycombinator.com/item?id=30932095 Shields ON: 1.38.119 : 4.92s, 3.99s, 4.82s, 4.51s, 4.75s Shields OFF: 1.38.119: 6.05s, 5.41s, 5.89s, 5.38s, 6.01s Test Case 2: https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846
|
brave/brave-core#12038 originally provided a fix for #20177, allowing cosmetic filters returned by the adblock engine to be injected into pages with a higher precedence than the page's stylesheets.
Unfortunately, the new method used to inject those CSS rules involved creating a new stylesheet for each rule, rather than the previous method which would simply add rules to a single stylesheet. That turned out to have a significant performance impact, especially for some users and websites; it was reverted in brave/brave-core#12950.
There doesn't appear to be a way exposed by Chromium to inject a privileged stylesheet from JS that also works on Android, or from C++ that doesn't involve creating an entire new stylesheet. Fixing this will likely involve patching
StyleEngine
to support a new stylesheet specifically used for cosmetic filtering.The text was updated successfully, but these errors were encountered: