| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 SVGSVGElement* outerSVG = container.get(); | 141 SVGSVGElement* outerSVG = container.get(); |
| 142 if (!outerSVG->isOutermostSVGSVGElement()) | 142 if (!outerSVG->isOutermostSVGSVGElement()) |
| 143 continue; | 143 continue; |
| 144 | 144 |
| 145 // don't dispatch the load event document is not wellformed (for XML/sta
ndalone svg) | 145 // don't dispatch the load event document is not wellformed (for XML/sta
ndalone svg) |
| 146 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu
ment()) | 146 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu
ment()) |
| 147 outerSVG->sendSVGLoadEventIfPossible(); | 147 outerSVG->sendSVGLoadEventIfPossible(); |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 static void reportMessage(Document* document, MessageLevel level, const String&
message) | |
| 152 { | |
| 153 if (document->frame()) | |
| 154 document->addConsoleMessage(ConsoleMessage::create(RenderingMessageSourc
e, level, message)); | |
| 155 } | |
| 156 | |
| 157 void SVGDocumentExtensions::reportWarning(const String& message) | |
| 158 { | |
| 159 reportMessage(m_document, WarningMessageLevel, "Warning: " + message); | |
| 160 } | |
| 161 | |
| 162 void SVGDocumentExtensions::reportError(const String& message) | 151 void SVGDocumentExtensions::reportError(const String& message) |
| 163 { | 152 { |
| 164 reportMessage(m_document, ErrorMessageLevel, "Error: " + message); | 153 m_document->addConsoleMessage(ConsoleMessage::create(RenderingMessageSource,
ErrorMessageLevel, "Error: " + message)); |
| 165 } | 154 } |
| 166 | 155 |
| 167 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element*
element) | 156 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element*
element) |
| 168 { | 157 { |
| 169 ASSERT(element); | 158 ASSERT(element); |
| 170 ASSERT(element->inDocument()); | 159 ASSERT(element->inDocument()); |
| 171 | 160 |
| 172 if (id.isEmpty()) | 161 if (id.isEmpty()) |
| 173 return; | 162 return; |
| 174 | 163 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 visitor->trace(m_document); | 362 visitor->trace(m_document); |
| 374 visitor->trace(m_timeContainers); | 363 visitor->trace(m_timeContainers); |
| 375 visitor->trace(m_webAnimationsPendingSVGElements); | 364 visitor->trace(m_webAnimationsPendingSVGElements); |
| 376 visitor->trace(m_relativeLengthSVGRoots); | 365 visitor->trace(m_relativeLengthSVGRoots); |
| 377 visitor->trace(m_pendingResources); | 366 visitor->trace(m_pendingResources); |
| 378 visitor->trace(m_pendingResourcesForRemoval); | 367 visitor->trace(m_pendingResourcesForRemoval); |
| 379 #endif | 368 #endif |
| 380 } | 369 } |
| 381 | 370 |
| 382 } // namespace blink | 371 } // namespace blink |
| OLD | NEW |