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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp

Issue 1645043002: Don't give 'order' semantic errors special treatment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698