WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191466
CSS @imports in HTML missing quote marks are mistakenly hidden from the Preload Scanner
https://bugs.webkit.org/show_bug.cgi?id=191466
Summary
CSS @imports in HTML missing quote marks are mistakenly hidden from the Prelo...
Harry Roberts
Reported
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
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-11-13 09:34:06 PST
<
rdar://problem/46031271
>
Yoav Weiss
Comment 2
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.
Ahmad Saleem
Comment 3
2023-02-16 05:41:19 PST
Changes here -
https://searchfox.org/wubkat/source/Source/WebCore/html/parser/CSSPreloadScanner.cpp#110
& 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
Ahmad Saleem
Comment 4
2023-02-16 05:44:23 PST
https://wpt.fyi/results/loading?label=master&label=experimental&aligned&view=subtest&q=preloader-css-import
Ahmad Saleem
Comment 5
2023-02-19 07:41:04 PST
PR -
https://github.com/WebKit/WebKit/pull/10346
EWS
Comment 6
2023-03-05 21:50:26 PST
Committed
261254@main
(6851ca14bf62): <
https://commits.webkit.org/261254@main
> Reviewed commits have been landed. Closing PR #10346 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug