Bug 209261

Summary: Deferred scripts should wait for stylesheets
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, changseok, chi187, david, emilio, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, jarek, kangil.han, koivisto, me, mike, nham, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test
none
Test
none
WIP ews-feeder: commit-queue-

Description Ryosuke Niwa 2020-03-18 17:48:15 PDT
See https://github.com/whatwg/html/issues/3890
Comment 1 Ahmad Saleem 2022-08-12 11:17:42 PDT
I took the test case from WHATWG and changed it into JSFiddle:

Link - https://jsfiddle.net/1hqr2spL/

These are results across all browsers:

*** Safari 15.6 on macOS 12.5 ***

before: rgb(255, 0, 0)
after: rgb(255, 0, 0)
load: rgb(255, 0, 0)

*** Firefox Nightly 105 ***

before:rgb(255, 0, 0)
after:rgb(255, 0, 0)
load:rgb(255, 0, 0)

*** Chrome Canary 106 ***

before:rgb(255, 0, 0)
after:rgb(255, 0, 0)
load:rgb(255, 0, 0)

_______

Is something else needed here? Thanks!
Comment 3 Ryosuke Niwa 2022-08-14 15:24:13 PDT
Created attachment 461624 [details]
Test

In a standalone file, WebKit logs:
before: rgb(0, 0, 0)
after: rgb(0, 0, 0)
load: rgb(255, 0, 0)

whereas other browsers log:
before: rgb(255, 0, 0)
after: rgb(255, 0, 0)
load: rgb(255, 0, 0)
Comment 4 Ryosuke Niwa 2022-08-14 15:24:49 PDT
Created attachment 461625 [details]
Test
Comment 5 Ryosuke Niwa 2022-08-14 15:53:14 PDT
Created attachment 461626 [details]
WIP
Comment 6 Ryosuke Niwa 2022-08-14 15:55:00 PDT
Blink has changed its behavior in https://chromium-review.googlesource.com/c/chromium/src/+/3274405
Comment 7 Alexey Proskuryakov 2022-08-20 16:09:17 PDT
Comment on attachment 461626 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=461626&action=review

> LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/106-defer-import-expected.txt:1
>  FAILED (This TC requires JavaScript enabled)

huh
Comment 10 Radar WebKit Bug Importer 2024-02-08 13:17:28 PST
<rdar://problem/122575084>