Bug 191466 - CSS @imports in HTML missing quote marks are mistakenly hidden from the Preload Scanner
Summary: CSS @imports in HTML missing quote marks are mistakenly hidden from the Prelo...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-09 05:25 PST by Harry Roberts
Modified: 2018-11-29 09:29 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Roberts 2018-11-09 05:25:20 PST
**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 `<link rel="stylesheet" />` and/or synchronous `<script src="">` 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("style.css")` (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
Comment 1 Radar WebKit Bug Importer 2018-11-13 09:34:06 PST
<rdar://problem/46031271>
Comment 2 Yoav Weiss 2018-11-19 04:44:35 PST
I'm currently fixing a similar (identical?) issue in Chromium'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.