Skip to content

Cosmetic filtering issue with Shadow DOM/tree/root #803

Closed
@ghost

Description

Details

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

  1. Generic cosmetic filters don't hide nodes in Shadow DOM. Probably not injected to the page because nodes "in shadow" are not detected.
  2. Specific filters works, but are not logged.
    • This does not work in ABP/AdBlock.

A specific URL where the issue occurs

https://www.virustotal.com/gui/home/upload

Steps to Reproduce

"Generic" case:

  1. Add ###euConsent to My filters
  2. Open linked VirusTotal page

"Specific" case:

  1. Add virustotal.com###euConsent to My filters
  2. Open linked VirusTotal page

Expected behavior:

Cookie notice on the bottom should be hidden with generic filter. Filter should be logged.

Actual behavior:

Notice is hidden only by specific filter. No DOM filters are logged.

Your environment

  • uBlock Origin version: 1.23 on Chrome, 1.24.3b1 on Nightly, 1.24 on 70.0.1 Fx
  • Browser Name and version:
  • Operating System and version: Manjaro KDE

@krystian3w, it's side effect of uBO performance/memory optimizations. ABP injects all cosmetic filters unconditionally (AFAIK). uBO injects only specific filters. For generic filters, DOM is scanned and only matching ones are injected. Here Shadow DOM is interfering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfixedissue has been addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions