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

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

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 years, 4 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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #include "config.h" 22 #include "config.h"
23 #include "core/svg/SVGDocumentExtensions.h" 23 #include "core/svg/SVGDocumentExtensions.h"
24 24
25 #include "core/XLinkNames.h" 25 #include "core/XLinkNames.h"
26 #include "core/dom/Document.h" 26 #include "core/dom/Document.h"
27 #include "core/inspector/ConsoleMessage.h"
27 #include "core/rendering/RenderView.h" 28 #include "core/rendering/RenderView.h"
28 #include "core/rendering/svg/SVGResourcesCache.h" 29 #include "core/rendering/svg/SVGResourcesCache.h"
29 #include "core/svg/SVGElementRareData.h" 30 #include "core/svg/SVGElementRareData.h"
30 #include "core/svg/SVGFontFaceElement.h" 31 #include "core/svg/SVGFontFaceElement.h"
31 #include "core/svg/SVGSVGElement.h" 32 #include "core/svg/SVGSVGElement.h"
32 #include "core/svg/SVGViewSpec.h" 33 #include "core/svg/SVGViewSpec.h"
33 #include "core/svg/SVGZoomAndPan.h" 34 #include "core/svg/SVGZoomAndPan.h"
34 #include "core/svg/animation/SMILTimeContainer.h" 35 #include "core/svg/animation/SMILTimeContainer.h"
35 #include "wtf/TemporaryChange.h" 36 #include "wtf/TemporaryChange.h"
36 #include "wtf/text/AtomicString.h" 37 #include "wtf/text/AtomicString.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 140
140 // don't dispatch the load event document is not wellformed (for XML/sta ndalone svg) 141 // don't dispatch the load event document is not wellformed (for XML/sta ndalone svg)
141 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu ment()) 142 if (outerSVG->document().wellFormed() || !outerSVG->document().isSVGDocu ment())
142 outerSVG->sendSVGLoadEventIfPossible(); 143 outerSVG->sendSVGLoadEventIfPossible();
143 } 144 }
144 } 145 }
145 146
146 static void reportMessage(Document* document, MessageLevel level, const String& message) 147 static void reportMessage(Document* document, MessageLevel level, const String& message)
147 { 148 {
148 if (document->frame()) 149 if (document->frame())
149 document->addConsoleMessage(RenderingMessageSource, level, message); 150 document->addConsoleMessage(ConsoleMessage::create(RenderingMessageSourc e, level, message));
150 } 151 }
151 152
152 void SVGDocumentExtensions::reportWarning(const String& message) 153 void SVGDocumentExtensions::reportWarning(const String& message)
153 { 154 {
154 reportMessage(m_document, WarningMessageLevel, "Warning: " + message); 155 reportMessage(m_document, WarningMessageLevel, "Warning: " + message);
155 } 156 }
156 157
157 void SVGDocumentExtensions::reportError(const String& message) 158 void SVGDocumentExtensions::reportError(const String& message)
158 { 159 {
159 reportMessage(m_document, ErrorMessageLevel, "Error: " + message); 160 reportMessage(m_document, ErrorMessageLevel, "Error: " + message);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 visitor->trace(m_svgFontFaceElements); 409 visitor->trace(m_svgFontFaceElements);
409 visitor->trace(m_pendingSVGFontFaceElementsForRemoval); 410 visitor->trace(m_pendingSVGFontFaceElementsForRemoval);
410 #endif 411 #endif
411 visitor->trace(m_relativeLengthSVGRoots); 412 visitor->trace(m_relativeLengthSVGRoots);
412 visitor->trace(m_pendingResources); 413 visitor->trace(m_pendingResources);
413 visitor->trace(m_pendingResourcesForRemoval); 414 visitor->trace(m_pendingResourcesForRemoval);
414 #endif 415 #endif
415 } 416 }
416 417
417 } 418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698