Index: Source/core/svg/SVGStyleElement.cpp |
diff --git a/Source/core/svg/SVGStyleElement.cpp b/Source/core/svg/SVGStyleElement.cpp |
index b4d0e79feef421c9f28cf4e95de8bf1778169d55..9437fa768cbecd5bbc8619611dbbc4368e9a372a 100644 |
--- a/Source/core/svg/SVGStyleElement.cpp |
+++ b/Source/core/svg/SVGStyleElement.cpp |
@@ -33,6 +33,7 @@ inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser |
: SVGElement(SVGNames::styleTag, document) |
, StyleElement(&document, createdByParser) |
, m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) |
+ , m_svgErrorEventTimer(this, &SVGElement::svgErrorEventTimerFired) |
{ |
} |
@@ -109,8 +110,10 @@ void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicStri |
void SVGStyleElement::finishParsingChildren() |
{ |
- StyleElement::finishParsingChildren(this); |
+ StyleElement::ProcessingResult result = StyleElement::finishParsingChildren(this); |
SVGElement::finishParsingChildren(); |
+ if (result == StyleElement::ProcessingFatalError) |
+ SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
} |
Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* insertionPoint) |
@@ -122,7 +125,8 @@ Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* |
void SVGStyleElement::didNotifySubtreeInsertionsToDocument() |
{ |
- StyleElement::processStyleSheet(document(), this); |
+ if (StyleElement::processStyleSheet(document(), this) == StyleElement::ProcessingFatalError) |
+ SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
} |
void SVGStyleElement::removedFrom(ContainerNode* insertionPoint) |
@@ -134,7 +138,8 @@ void SVGStyleElement::removedFrom(ContainerNode* insertionPoint) |
void SVGStyleElement::childrenChanged(const ChildrenChange& change) |
{ |
SVGElement::childrenChanged(change); |
- StyleElement::childrenChanged(this); |
+ if (StyleElement::childrenChanged(this) == StyleElement::ProcessingFatalError) |
+ SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
} |
DEFINE_TRACE(SVGStyleElement) |