OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2006 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006 Apple Inc. All rights reserved. |
5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "core/MediaTypeNames.h" | 26 #include "core/MediaTypeNames.h" |
27 #include "core/css/CSSStyleSheet.h" | 27 #include "core/css/CSSStyleSheet.h" |
28 #include "wtf/StdLibExtras.h" | 28 #include "wtf/StdLibExtras.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser
) | 32 inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser
) |
33 : SVGElement(SVGNames::styleTag, document) | 33 : SVGElement(SVGNames::styleTag, document) |
34 , StyleElement(&document, createdByParser) | 34 , StyleElement(&document, createdByParser) |
35 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) | 35 , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired) |
| 36 , m_svgErrorEventTimer(this, &SVGElement::svgErrorEventTimerFired) |
36 { | 37 { |
37 } | 38 } |
38 | 39 |
39 SVGStyleElement::~SVGStyleElement() | 40 SVGStyleElement::~SVGStyleElement() |
40 { | 41 { |
41 #if !ENABLE(OILPAN) | 42 #if !ENABLE(OILPAN) |
42 StyleElement::clearDocumentData(document(), this); | 43 StyleElement::clearDocumentData(document(), this); |
43 #endif | 44 #endif |
44 } | 45 } |
45 | 46 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 m_sheet->setTitle(value); | 103 m_sheet->setTitle(value); |
103 | 104 |
104 return; | 105 return; |
105 } | 106 } |
106 | 107 |
107 SVGElement::parseAttribute(name, value); | 108 SVGElement::parseAttribute(name, value); |
108 } | 109 } |
109 | 110 |
110 void SVGStyleElement::finishParsingChildren() | 111 void SVGStyleElement::finishParsingChildren() |
111 { | 112 { |
112 StyleElement::finishParsingChildren(this); | 113 StyleElement::ProcessingResult result = StyleElement::finishParsingChildren(
this); |
113 SVGElement::finishParsingChildren(); | 114 SVGElement::finishParsingChildren(); |
| 115 if (result == StyleElement::ProcessingFatalError) |
| 116 SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
114 } | 117 } |
115 | 118 |
116 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode*
insertionPoint) | 119 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode*
insertionPoint) |
117 { | 120 { |
118 SVGElement::insertedInto(insertionPoint); | 121 SVGElement::insertedInto(insertionPoint); |
119 StyleElement::insertedInto(this, insertionPoint); | 122 StyleElement::insertedInto(this, insertionPoint); |
120 return InsertionShouldCallDidNotifySubtreeInsertions; | 123 return InsertionShouldCallDidNotifySubtreeInsertions; |
121 } | 124 } |
122 | 125 |
123 void SVGStyleElement::didNotifySubtreeInsertionsToDocument() | 126 void SVGStyleElement::didNotifySubtreeInsertionsToDocument() |
124 { | 127 { |
125 StyleElement::processStyleSheet(document(), this); | 128 if (StyleElement::processStyleSheet(document(), this) == StyleElement::Proce
ssingFatalError) |
| 129 SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
126 } | 130 } |
127 | 131 |
128 void SVGStyleElement::removedFrom(ContainerNode* insertionPoint) | 132 void SVGStyleElement::removedFrom(ContainerNode* insertionPoint) |
129 { | 133 { |
130 SVGElement::removedFrom(insertionPoint); | 134 SVGElement::removedFrom(insertionPoint); |
131 StyleElement::removedFrom(this, insertionPoint); | 135 StyleElement::removedFrom(this, insertionPoint); |
132 } | 136 } |
133 | 137 |
134 void SVGStyleElement::childrenChanged(const ChildrenChange& change) | 138 void SVGStyleElement::childrenChanged(const ChildrenChange& change) |
135 { | 139 { |
136 SVGElement::childrenChanged(change); | 140 SVGElement::childrenChanged(change); |
137 StyleElement::childrenChanged(this); | 141 if (StyleElement::childrenChanged(this) == StyleElement::ProcessingFatalErro
r) |
| 142 SVGElement::sendSVGErrorEventIfPossibleAsynchronously(); |
138 } | 143 } |
139 | 144 |
140 DEFINE_TRACE(SVGStyleElement) | 145 DEFINE_TRACE(SVGStyleElement) |
141 { | 146 { |
142 StyleElement::trace(visitor); | 147 StyleElement::trace(visitor); |
143 SVGElement::trace(visitor); | 148 SVGElement::trace(visitor); |
144 } | 149 } |
145 | 150 |
146 } | 151 } |
OLD | NEW |