<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>175177</bug_id>
          
          <creation_ts>2017-08-03 23:46:10 -0700</creation_ts>
          <short_desc>ignore-previous-rules does not affect CSS rules with a generic URL filter</short_desc>
          <delta_ts>2017-08-03 23:46:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Safari 10</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Manish Jethani">manish</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1335157</commentid>
    <comment_count>0</comment_count>
    <who name="Manish Jethani">manish</who>
    <bug_when>2017-08-03 23:46:10 -0700</bug_when>
    <thetext>Use this rule set:

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

And go to the following page:

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

There is an element with the class &quot;sponsored-container-bottom&quot; 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:

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

This is not ideal because it would only work if walmart.com is the top URL, not if it&apos;s an iframe.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>