OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements() | 113 void SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements() |
114 { | 114 { |
115 Vector<RefPtr<SVGSVGElement> > timeContainers; | 115 Vector<RefPtr<SVGSVGElement> > timeContainers; |
116 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; | 116 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; |
117 | 117 |
118 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); | 118 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); |
119 for (Vector<RefPtr<SVGSVGElement> >::iterator it = timeContainers.begin(); i
t != end; ++it) { | 119 for (Vector<RefPtr<SVGSVGElement> >::iterator it = timeContainers.begin(); i
t != end; ++it) { |
120 SVGSVGElement* outerSVG = (*it).get(); | 120 SVGSVGElement* outerSVG = (*it).get(); |
121 if (!outerSVG->isOutermostSVGSVGElement()) | 121 if (!outerSVG->isOutermostSVGSVGElement()) |
122 continue; | 122 continue; |
123 outerSVG->sendSVGLoadEventIfPossible(); | 123 |
| 124 // don't dispatch the load event document is not wellformed (for XML/sta
ndalone svg) |
| 125 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu
ment()) |
| 126 outerSVG->sendSVGLoadEventIfPossible(); |
124 } | 127 } |
125 } | 128 } |
126 | 129 |
127 static void reportMessage(Document* document, MessageLevel level, const String&
message) | 130 static void reportMessage(Document* document, MessageLevel level, const String&
message) |
128 { | 131 { |
129 if (document->frame()) | 132 if (document->frame()) |
130 document->addConsoleMessage(RenderingMessageSource, level, message); | 133 document->addConsoleMessage(RenderingMessageSource, level, message); |
131 } | 134 } |
132 | 135 |
133 void SVGDocumentExtensions::reportWarning(const String& message) | 136 void SVGDocumentExtensions::reportWarning(const String& message) |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 } | 410 } |
408 | 411 |
409 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) | 412 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) |
410 { | 413 { |
411 ASSERT(m_svgFontFaceElements.contains(element)); | 414 ASSERT(m_svgFontFaceElements.contains(element)); |
412 m_svgFontFaceElements.remove(element); | 415 m_svgFontFaceElements.remove(element); |
413 } | 416 } |
414 #endif | 417 #endif |
415 | 418 |
416 } | 419 } |
OLD | NEW |