[webkit-reviews] review granted: [Bug 232313] error event should be fired at <style> element when @import rule fails parsing due to MIME type : [Attachment 442512] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 26 13:27:21 PDT 2021
Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 232313: error event should be fired at <style> element when @import rule
fails parsing due to MIME type
https://bugs.webkit.org/show_bug.cgi?id=232313
Attachment 442512: Patch
https://bugs.webkit.org/attachment.cgi?id=442512&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 442512
--> https://bugs.webkit.org/attachment.cgi?id=442512
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();
...
More information about the webkit-reviews
mailing list