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

ExtendedCss recursively calls MutationObserver #1317

Closed
maximtop opened this issue Mar 7, 2019 · 0 comments
Closed

ExtendedCss recursively calls MutationObserver #1317

maximtop opened this issue Mar 7, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@maximtop
Copy link
Contributor

maximtop commented Mar 7, 2019

@maximtop commented on Thu Mar 07 2019

This link https://4pda.ru/2017/03/19/338134/ causes over 100% load in the chrome task manager

This happens because of Sizzle, which changes id attribute while executes the querySelectorAll request.


@maximtop commented on Thu Mar 07 2019

These 3 rules

  1. 4pda.ru##body > * > * > div > * > * > * > * > div > a[target="_blank"]:has(> img)
  2. 4pda.ru#$#.slider-nav > ul > li:has(> a[href="//4pda.ru/devdb/"]) { display: block!important; }
  3. 4pda.ru#$#body > *:not(div) > * > div:has(> *) > *:not(div):not(iframe):not(a):not(b):not(table):not(img):not(textarea):not(input):not(br):not(h3):not(p) { background-image: none!important; background: #e6e7e9!important }

sizzle changes id in this part of code
if (nid = context.getAttribute("id")) { nid = nid.replace(rcssescape, fcssescape); } else { context.setAttribute("id", nid = expando); }


@ameshkov commented on Thu Mar 07 2019

2 issues:

  1. Why does loop protection not work?
  2. You should disconnect observer before applying rules and connect it again afterwards.

@maximtop commented on Thu Mar 07 2019

Because loop protection filters only mutations with style attributes

    var protectionObserverOption = {
        attributes: true,
        attributeOldValue: true,
        attributeFilter: ['style']
    };
@maximtop maximtop self-assigned this Mar 7, 2019
@maximtop maximtop added the Bug label Mar 7, 2019
@maximtop maximtop added this to the 3.0 milestone Mar 7, 2019
@zzebrum zzebrum closed this as completed Mar 26, 2019
adguard pushed a commit that referenced this issue Aug 8, 2022
Merge in EXTENSIONS/browser-extension to master

Squashed commit of the following:

commit 48d032d
Author: Anton <a.kaprielov@adguard.com>
Date:   Mon Aug 8 16:47:03 2022 +0300

    AG-15726 change icon

commit b4690a4
Author: Anton <a.kaprielov@adguard.com>
Date:   Mon Aug 8 14:16:57 2022 +0300

    AG-15726 Unequal update filters button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants