<?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>162057</bug_id>
          
          <creation_ts>2016-09-16 03:45:12 -0700</creation_ts>
          <short_desc>Content Blocker &apos;css-display-none&apos; rules aren&apos;t applied when you open a website first time (from the address bar)</short_desc>
          <delta_ts>2021-05-19 16:41:41 -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>Other</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>170707</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Meshkov">am</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>gsnedders</cc>
    
    <cc>krzysztof.modras</cc>
    
    <cc>mjs</cc>
    
    <cc>rx100</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1230374</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Meshkov">am</who>
    <bug_when>2016-09-16 03:45:12 -0700</bug_when>
    <thetext>#### My configuration:
Safari Version 10.0 (12602.1.50.0.10)
macOS Sierra 10.12 (16A323)

#### Steps to reproduce

1. Register a simple content blocker:
```
[{ &quot;trigger&quot;: { &quot;url-filter&quot;: &quot;.*&quot; }, &quot;action&quot;: { &quot;type&quot;: &quot;css-display-none&quot;, &quot;selector&quot;: &quot;body&quot; } }]
```

2. Open a new tab
3. Enter &quot;google.com&quot; (or any other website) and press Enter

#### Expected result
Page is empty

#### Actual result
Page is not empty. The rule will be applied after you refresh the page.


Relevant bug reports:
https://github.com/AdguardTeam/AdguardBrowserExtension/issues/153
https://github.com/AdguardTeam/AdguardBrowserExtension/issues/359

Also there was a similar issue with searching from the address bar:
https://bugs.webkit.org/show_bug.cgi?id=153743</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236384</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-10-04 15:15:22 -0700</bug_when>
    <thetext>rdar://27788755</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1249073</commentid>
    <comment_count>2</comment_count>
    <who name="Andrey Meshkov">am</who>
    <bug_when>2016-11-08 10:00:19 -0800</bug_when>
    <thetext>Hi Alex!

Is there any update on this issue?
Is there anything I can do/provide that might help you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1251423</commentid>
    <comment_count>3</comment_count>
    <who name="rx100">rx100</who>
    <bug_when>2016-11-15 04:01:43 -0800</bug_when>
    <thetext>I have the same problem = (</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253683</commentid>
    <comment_count>4</comment_count>
    <who name="Andrey Meshkov">am</who>
    <bug_when>2016-11-26 07:12:44 -0800</bug_when>
    <thetext>After all it appears that the bug is not that serious.

It exists only in case if &quot;trigger&quot; contains &quot;resource-type&quot; field:
```
[
    {
        &quot;trigger&quot;: {
            &quot;url-filter&quot;: &quot;.*&quot;,
            &quot;resource-type&quot;: [&quot;document&quot;]
        },
        &quot;action&quot;: {
            &quot;type&quot;: &quot;css-display-none&quot;,
            &quot;selector&quot;: &quot;any selector&quot;
        }
    }
]
```

Removing &quot;resource-type&quot; fixes the issue. This is still a bit weird, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1620598</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2020-02-19 02:39:44 -0800</bug_when>
    <thetext>This is indeed pretty weird.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1761771</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2021-05-19 16:41:41 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 170707 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>