Opened 3 months ago

Closed 3 months ago

#7359 closed defect (duplicate)

:-abp-has() does not work with nested :-abp-properties() where the :-abp-properties() selector ends in a combinator

Reported by: agiammarchi Assignee:
Priority: Unknown Milestone:
Module: Core Keywords:
Cc: amr, hfiguiere, mjethani Blocked By: #7400, #7428
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/30035555/

Description (last modified by mjethani)

Environment

Adblock Plus 3.5
Unknown browser
Unknown OS

How to reproduce

Add the following filter:

#?#div:-abp-has(> a p > span:-abp-properties(content: "any"))

Load the following document in the browser:

<!DOCTYPE html>
<html>
  <head>
    <style>
      span::before {
        content: "any";
      }
    </style>
  </head>
  <body>
    <div>
      <a>
        <p>
          <span></span>
        </p>
      </a>
    </div>
  </body>
</html>

Observed behavior

The content is not hidden.

Expected behavior

The content is hidden.

Notes

This is a manifestation of #7428.

The original report said that the filter #?#div:-abp-has(> a p:-abp-has(> span:-abp-properties(content: "any"))) also did not work (#7400).

Resolution

Both #7400 and #7428 have been fixed, as a result this is now a duplicate issue.

Change History (19)

comment:1 Changed 3 months ago by amrmak

  • Cc amr added

comment:2 Changed 3 months ago by mjethani

  • Cc hfiguiere mjethani added

comment:3 Changed 3 months ago by hfiguiere

  • Summary changed from -apb-has shouldn't need nested -abp-has to -abp-has shouldn't need nested -abp-has

comment:4 follow-up: Changed 3 months ago by hfiguiere

I'm assuming you are saying that the second filter doesn't work.

comment:5 in reply to: ↑ 4 Changed 3 months ago by agiammarchi

Replying to hfiguiere:

I'm assuming you are saying that the second filter doesn't work.

Precisely

comment:6 Changed 3 months ago by hfiguiere

qualifySelector() returns something incorrect.

comment:7 Changed 3 months ago by mjethani

  • Description modified (diff)
  • Summary changed from -abp-has shouldn't need nested -abp-has to :-abp-has() shouldn't need nested :-abp-has()

comment:8 Changed 3 months ago by mjethani

  • Description modified (diff)

comment:9 Changed 3 months ago by mjethani

  • Description modified (diff)

comment:10 Changed 3 months ago by mjethani

Neither of the filters work for me. The problem appears not to be nesting but rather something else.

comment:11 Changed 3 months ago by mjethani

  • Description modified (diff)

comment:12 Changed 3 months ago by mjethani

  • Description modified (diff)

I have filed #7400 for a more specific issue.

Can somebody confirm that the second filter also does not work? I don't think the nesting is really the problem here, but I may be wrong.

comment:13 Changed 3 months ago by hfiguiere

I don't get the second filter to work either.

comment:14 Changed 3 months ago by mjethani

OK, let's address #7400 and it might fix this issue as well.

comment:15 Changed 3 months ago by hfiguiere

  • Blocking 7400 added

comment:16 Changed 3 months ago by hfiguiere

  • Blocked By 7400 added
  • Blocking 7400 removed

comment:17 Changed 3 months ago by hfiguiere

  • Blocked By 7428 added

This is fixed by issue #7428. I will add some regression tests to ensure this issue doesn't come back.

comment:18 Changed 3 months ago by hfiguiere

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:19 Changed 3 months ago by mjethani

  • Description modified (diff)
  • Resolution set to duplicate
  • Status changed from reviewing to closed
  • Summary changed from :-abp-has() shouldn't need nested :-abp-has() to :-abp-has() does not work with nested :-abp-properties() where the :-abp-properties() selector ends in a combinator
Note: See TracTickets for help on using tickets.