Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: Source/core/html/HTMLStyleElement.cpp

Issue 1032033002: Fire error events for a variety of script and style failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed processing result to an enum rather than a bool Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLStyleElement.cpp
diff --git a/Source/core/html/HTMLStyleElement.cpp b/Source/core/html/HTMLStyleElement.cpp
index 55434df8e545cae9d56ccba1edb8d19f5a580c37..c0f78337400a7496ea15cc7366efd531f0a689e5 100644
--- a/Source/core/html/HTMLStyleElement.cpp
+++ b/Source/core/html/HTMLStyleElement.cpp
@@ -77,8 +77,10 @@ void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr
void HTMLStyleElement::finishParsingChildren()
{
- StyleElement::finishParsingChildren(this);
+ StyleElement::ProcessingResult result = StyleElement::finishParsingChildren(this);
HTMLElement::finishParsingChildren();
+ if (result == StyleElement::ProcessingFatalError)
+ notifyLoadedSheetAndAllCriticalSubresources(true);
}
Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
@@ -96,13 +98,15 @@ void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
void HTMLStyleElement::didNotifySubtreeInsertionsToDocument()
{
- StyleElement::processStyleSheet(document(), this);
+ if (StyleElement::processStyleSheet(document(), this) == StyleElement::ProcessingFatalError)
+ notifyLoadedSheetAndAllCriticalSubresources(true);
}
void HTMLStyleElement::childrenChanged(const ChildrenChange& change)
{
HTMLElement::childrenChanged(change);
- StyleElement::childrenChanged(this);
+ if (StyleElement::childrenChanged(this) == StyleElement::ProcessingFatalError)
+ notifyLoadedSheetAndAllCriticalSubresources(true);
}
const AtomicString& HTMLStyleElement::media() const
« Source/core/html/HTMLLinkElement.cpp ('K') | « Source/core/html/HTMLLinkElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698