Run the script from bug 235434: ```html You should see this text!!! <script> const style = document.createElement("style"); document.head.append(style); style.sheet.insertRule('@import url("nonexist.css")'); style.sheet.cssRules[0]; style.sheet.deleteRule(0); </script> ``` Actual: completely blank page Expected: page with "You should see this text!!!" Reason: the import rule is removed before it finishes loading, and the hasPendingSheet() flag is not cleared.
Created attachment 450478 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 450478 [details] Patch looks like the debug bot is hitting assert under StyleRuleImport::cancelLoad
in imported/w3c/web-platform-tests/css/cssom/cssimportrule-parent.html sonf inspector/css/stylesheet-events-imports.html
Created attachment 450515 [details] Patch
Should work now. It's just that cancelLoad() shouldn't do anything if it had already loaded.
Comment on attachment 450515 [details] Patch Good find, thanks!
<rdar://problem/88322836>
Committed r288879 (246631@main): <https://commits.webkit.org/246631@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450515 [details].