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

Avoid layout re-flow for cosmetic filtering #4585

Merged
merged 4 commits into from
Feb 14, 2020
Merged

Commits on Feb 14, 2020

  1. Cosmetic filtering rules are applied by default and "un-hidden" when …

    …they are found to be 1st-party
    
    Fixes layout re-flow
    
    Co-authored-by: Pete Miller <miller.pete@gmail.com>
    pes10k and petemill committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    c61ac2d View commit details
    Browse the repository at this point in the history
  2. Cosmetic filter rules are added and reset via CSSStyleSheet

    Since we do not have a chrome.tabs.removeCSS API, we need another method for restoring the page's original css `display` rule value. Adding and removing rule via a constructed CSSStyleSheet injected via document.adoptedStyleSheets serves this purpose.
    petemill committed Feb 14, 2020
    Configuration menu
    Copy the full SHA
    12ac902 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cde3d63 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    36c8577 View commit details
    Browse the repository at this point in the history