Bug 308801

Summary: Dispatch load event to detached SVG image and script elements
Product: WebKit Reporter: Fujii Hironori <fujii>
Component: SVGAssignee: Fujii Hironori <fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/58222
Attachments:
Description Flags
test patch
none
test2.patch none

Fujii Hironori
Reported 2026-02-26 22:33:25 PST
Created attachment 478509 [details] test patch 1. Apply the attached patch 2. run-webkit-httpd ./Tools/Scripts/run-webkit-httpd --gtk 3. http://127.0.0.1:8000/svg/load-error-event.html WebKit: PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror PASS attached use /svg/resources/symbol-defs.svg#icon-rocket onload PASS attached use non-existent-file#dummy onerror PASS detached image square20.jpg onload PASS detached image non-existent-file onerror FAIL detached script dummy.js timeout PASS detached script non-existent-file onerror FAIL detached use /svg/resources/symbol-defs.svg#icon-rocket timeout FAIL detached use non-existent-file#dummy timeout PASS successfullyParsed is true Chrome: PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror PASS attached use /svg/resources/symbol-defs.svg#icon-rocket onload PASS attached use non-existent-file#dummy onerror PASS detached image square20.jpg onload PASS detached image non-existent-file onerror PASS detached script dummy.js onload PASS detached script non-existent-file onerror PASS detached use /svg/resources/symbol-defs.svg#icon-rocket onload FAIL detached use non-existent-file#dummy timeout PASS successfullyParsed is true Firefox: PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror FAIL attached use /svg/resources/symbol-defs.svg#icon-rocket timeout FAIL attached use non-existent-file#dummy timeout PASS detached image square20.jpg onload PASS detached image non-existent-file onerror PASS detached script dummy.js onload PASS detached script non-existent-file onerror FAIL detached use /svg/resources/symbol-defs.svg#icon-rocket timeout FAIL detached use non-existent-file#dummy timeout PASS successfullyParsed is true Chrome and Firefox dispatch load event to detached SVG script element. Firefox doesn't dispatch load and error event to SVG use element. Chrome dispatches load event to detached SVG use element.
Attachments
test patch (2.67 KB, patch)
2026-02-26 22:33 PST, Fujii Hironori
no flags
test2.patch (2.84 KB, patch)
2026-03-01 17:21 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2026-03-01 17:21:23 PST
Created attachment 478534 [details] test2.patch The previous test.patch has a problem. I fixed the problem, and tested again. WebKit doesn't dispatch load event to detached SVG image element. WebKit PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror PASS attached use /svg/resources/symbol-defs.svg onload PASS attached use non-existent-file onerror FAIL detached image square20.jpg timeout PASS detached image non-existent-file onerror FAIL detached script dummy.js timeout PASS detached script non-existent-file onerror FAIL detached use /svg/resources/symbol-defs.svg timeout FAIL detached use non-existent-file timeout PASS successfullyParsed is true Some tests failed. Chrome PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror PASS attached use /svg/resources/symbol-defs.svg onload PASS attached use non-existent-file onerror PASS detached image square20.jpg onload PASS detached image non-existent-file onerror PASS detached script dummy.js onload PASS detached script non-existent-file onerror FAIL detached use /svg/resources/symbol-defs.svg timeout FAIL detached use non-existent-file timeout PASS successfullyParsed is true Some tests failed. Firefox PASS attached image square20.jpg onload PASS attached image non-existent-file onerror PASS attached script dummy.js onload PASS attached script non-existent-file onerror FAIL attached use /svg/resources/symbol-defs.svg timeout FAIL attached use non-existent-file timeout PASS detached image square20.jpg onload PASS detached image non-existent-file onerror PASS detached script dummy.js onload PASS detached script non-existent-file onerror FAIL detached use /svg/resources/symbol-defs.svg timeout FAIL detached use non-existent-file timeout PASS successfullyParsed is true Some tests failed.
Fujii Hironori
Comment 2 2026-03-01 19:29:07 PST
EWS
Comment 3 2026-03-03 01:26:43 PST
Committed 308532@main (38271b8fa0c2): <https://commits.webkit.org/308532@main> Reviewed commits have been landed. Closing PR #59687 and removing active labels.
Radar WebKit Bug Importer
Comment 4 2026-03-03 01:27:11 PST
Note You need to log in before you can comment on or make changes to this bug.