Bug 232313

Summary: error event should be fired at <style> element when @import rule fails parsing due to MIME type
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, koivisto, macpherson, menard, sam, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2021-10-26 09:50:07 PDT
error event should be fired at <style> element when @import rule fails parsing due to MIME type.
Attachments
Patch (5.57 KB, patch)
2021-10-26 09:53 PDT, Chris Dumez
no flags
Patch (13.82 KB, patch)
2021-10-26 11:19 PDT, Chris Dumez
no flags
Patch (13.98 KB, patch)
2021-10-26 13:31 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-10-26 09:53:44 PDT
Chris Dumez
Comment 2 2021-10-26 11:19:04 PDT
Darin Adler
Comment 3 2021-10-26 13:27:21 PDT
Comment on attachment 442512 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442512&action=review > Source/WebCore/css/StyleRuleImport.cpp:78 > + if (!m_styleSheet->parseAuthorStyleSheet(cachedStyleSheet, document ? &document->securityOrigin() : nullptr)) { These are so similar I think a boolean for success would be better: bool parseSucceeded = m_styleSheet->parseAuthorStyleSheet(cachedStyleSheet, document ? &document->securityOrigin() : nullptr); ... if (m_parentStyleSheet) { if (parseSucceeded) m_parentStyleSheet->notifyLoadedSheet(cachedStyleSheet); else m_parentStyleSheet->setLoadErrorOccured(); ...
Chris Dumez
Comment 4 2021-10-26 13:31:29 PDT
EWS
Comment 5 2021-10-26 14:36:18 PDT
Committed r284898 (243575@main): <https://commits.webkit.org/243575@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442523 [details].
Radar WebKit Bug Importer
Comment 6 2021-10-26 14:37:19 PDT
Note You need to log in before you can comment on or make changes to this bug.