[Webkit-unassigned] [Bug 175177] New: ignore-previous-rules does not affect CSS rules with a generic URL filter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 3 23:46:10 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=175177

            Bug ID: 175177
           Summary: ignore-previous-rules does not affect CSS rules with a
                    generic URL filter
           Product: WebKit
           Version: Safari 10
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: manish at adblockplus.org

Use this rule set:

  [
    {
      "trigger": {
        "url-filter": "^https?://"
      },
      "action": {
        "type": "css-display-none",
        "selector": ".sponsored-container-bottom"
      }
    },
    {
      "trigger": {
        "url-filter": "^https?://([^/]+\\.)?walmart\\.com"
      },
      "action": {
        "type": "ignore-previous-rules"
      }
    }
  ]

And go to the following page:

https://www.walmart.com/search/?query=car%20rental%20cologne

There is an element with the class "sponsored-container-bottom" that is hidden.

Since this is walmart.com, the CSS rule should be ignored and the element should not be hidden.

The current workaround is to change the rule set to the following:

 [
    {
      "trigger": {
        "url-filter": "^https?://"
        "unless-domain": ["*walmart.com"]
      },
      "action": {
        "type": "css-display-none",
        "selector": ".sponsored-container-bottom"
      }
    }
  ]

This is not ideal because it would only work if walmart.com is the top URL, not if it's an iframe.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170804/89150dec/attachment-0001.html>


More information about the webkit-unassigned mailing list