Bug 241676 - Resetting source on a long-loading <img> still prevents window "load" event
Summary: Resetting source on a long-loading <img> still prevents window "load" event
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-16 00:58 PDT by Antoine Quint
Modified: 2022-06-21 09:51 PDT (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 Antoine Quint 2022-06-16 00:58:51 PDT
If you have an <img> element pointing to a long-loading resource it should prevent the window "load" event from firing until that image is loaded. However, if you cancel the load by setting the "src" to the empty string, the window "load" event should trigger and not be delayed anymore. In WebKit, the original resource load will continue to block the window "load" event. This came up investigating the failure of a CSS Transition WPT test, see https://github.com/web-platform-tests/wpt/issues/34444.
Comment 1 Antoine Quint 2022-06-16 01:18:58 PDT
I'm adding a new WPT for this in https://github.com/web-platform-tests/wpt/pull/34463.
Comment 2 Radar WebKit Bug Importer 2022-06-16 01:31:34 PDT
<rdar://problem/95277912>
Comment 3 Antoine Quint 2022-06-16 11:49:51 PDT
The WPT PR has landed, so now we should import https://github.com/web-platform-tests/wpt/commit/644aba8746b83668d5d9033cda16ae3f8bba0b3d to have the new dedicated test for this, and rebase the result for the css/css-transitions test changed in that revision as well.
Comment 4 Antoine Quint 2022-06-16 12:53:50 PDT
The import is being done in https://bugs.webkit.org/show_bug.cgi?id=235131.