<?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>191466</bug_id>
          
          <creation_ts>2018-11-09 05:25:20 -0800</creation_ts>
          <short_desc>CSS @imports in HTML missing quote marks are mistakenly hidden from the Preload Scanner</short_desc>
          <delta_ts>2023-03-05 21:50:29 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>Safari 12</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harry Roberts">csswizardry</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>beidson</cc>
    
    <cc>colin</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yoav</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1476861</commentid>
    <comment_count>0</comment_count>
    <who name="Harry Roberts">csswizardry</who>
    <bug_when>2018-11-09 05:25:20 -0800</bug_when>
    <thetext>**Example URL:**

https://csswizardry.com/demos/2018/11/import/blocked-by-css.html OR https://csswizardry.com/demos/2018/11/import/blocked-by-js.html

**Steps to reproduce the problem:**

1. Have a page with a synchronous `&lt;link rel=&quot;stylesheet&quot; /&gt;` and/or synchronous `&lt;script src=&quot;&quot;&gt;` BEFORE an in-page `@import url(style.css)` that omits the optional quote marks.
2. Reload page with Network panel open
3. Note lack of parallelisation: files are serialised
4. Edit `@import url(style.css)` to be `@import url(&quot;style.css&quot;)` (note addition of quote marks)
5. Refresh and observe waterfall
6. Parallelisation!

**What is the expected behaviour?**

I would expect the Preload Scanner to identify the IMPORT regardless of the presence of quote marks

**What went wrong?**

The Preload Scanner isn’t noticing @import URLs that omit OPTIONAL quotes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1478030</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-11-13 09:34:06 -0800</bug_when>
    <thetext>&lt;rdar://problem/46031271&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480199</commentid>
    <comment_count>2</comment_count>
    <who name="Yoav Weiss">yoav</who>
    <bug_when>2018-11-19 04:44:35 -0800</bug_when>
    <thetext>I&apos;m currently fixing a similar (identical?) issue in Chromium&apos;s CSSPreloadScanner. Patch is up at https://chromium-review.googlesource.com/c/chromium/src/+/1331042/3

At the very least, the tests can be reused here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934143</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-16 05:41:19 -0800</bug_when>
    <thetext>Changes here - https://searchfox.org/wubkat/source/Source/WebCore/html/parser/CSSPreloadScanner.cpp#110

&amp; 

Comments here - https://searchfox.org/wubkat/source/Source/WebCore/html/parser/CSSPreloadScanner.cpp#166 (No need to add {} here)

Comment here - https://chromium-review.googlesource.com/c/chromium/src/+/1331042/3/third_party/blink/renderer/core/html/parser/css_preload_scanner.cc#188

and then from here onward - change and just return String():

https://searchfox.org/wubkat/source/Source/WebCore/html/parser/CSSPreloadScanner.cpp#183-193

Add here remaining - https://searchfox.org/wubkat/source/Source/WebCore/html/parser/CSSPreloadScanner.cpp#201</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934145</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-16 05:44:23 -0800</bug_when>
    <thetext>https://wpt.fyi/results/loading?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=preloader-css-import</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934967</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-19 07:41:04 -0800</bug_when>
    <thetext>PR - https://github.com/WebKit/WebKit/pull/10346</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1939027</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-03-05 21:50:26 -0800</bug_when>
    <thetext>Committed 261254@main (6851ca14bf62): &lt;https://commits.webkit.org/261254@main&gt;

Reviewed commits have been landed. Closing PR #10346 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>