Bug 191061 - Parsing noscript tag with an img child element inside a figure tag fires wrongly a fetch
Summary: Parsing noscript tag with an img child element inside a figure tag fires wron...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-30 04:30 PDT by Dimitrios Grammatikogiannis
Modified: 2018-11-03 08:58 PDT (History)
7 users (show)

See Also:


Attachments
bug preview (743.76 KB, image/png)
2018-10-30 04:30 PDT, Dimitrios Grammatikogiannis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitrios Grammatikogiannis 2018-10-30 04:30:54 PDT
Created attachment 353359 [details]
bug preview

For the following snippet the image should be ignored if javascript is enabled but an extra fetch event is fired

```html
<figure>
  <noscript>
    <img src="https://webkit.org/wp-content/uploads/safari.png" alt=""/>
  </noscript>
</figure>
```

You can check it live also here: https://codepen.io/dgrammatiko/pen/xyNXjv

There shouldn't be an extra fetch in this case, respect the noscript tag
Comment 1 Simon Fraser (smfr) 2018-10-31 13:45:08 PDT
Is this the preload scanner?
Comment 2 Rob Buis 2018-11-02 02:12:54 PDT
(In reply to Dimitrios Grammatikogiannis from comment #0)
> Created attachment 353359 [details]
> bug preview
> 
> For the following snippet the image should be ignored if javascript is
> enabled but an extra fetch event is fired
> 
> ```html
> <figure>
>   <noscript>
>     <img src="https://webkit.org/wp-content/uploads/safari.png" alt=""/>
>   </noscript>
> </figure>
> ```
> 
> You can check it live also here: https://codepen.io/dgrammatiko/pen/xyNXjv
> 
> There shouldn't be an extra fetch in this case, respect the noscript tag

Hi Dimitrios, I can't repro this, the preload scanner does not preload this image, and the image element in the no script tag is not created as DOM node. Can you give some more detailed steps how you are seeing the extra fetch?
Comment 3 Dimitrios Grammatikogiannis 2018-11-03 08:58:35 PDT
> Can you give some more detailed steps how you are seeing the extra fetch?

I'm afraid this was a false report, the problem was not in Safari (I've been tricked by codepen auto reload) but in the intersection observer polyfill.