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

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

Issue 2738233002: Fold SVGDocumentExtensions::reportError into only user (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 23 matching lines...) Expand all
34 #include "core/animation/InterpolationEnvironment.h" 34 #include "core/animation/InterpolationEnvironment.h"
35 #include "core/animation/InvalidatableInterpolation.h" 35 #include "core/animation/InvalidatableInterpolation.h"
36 #include "core/animation/SVGInterpolationTypesMap.h" 36 #include "core/animation/SVGInterpolationTypesMap.h"
37 #include "core/css/resolver/StyleResolver.h" 37 #include "core/css/resolver/StyleResolver.h"
38 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
39 #include "core/dom/ElementTraversal.h" 39 #include "core/dom/ElementTraversal.h"
40 #include "core/dom/shadow/ShadowRoot.h" 40 #include "core/dom/shadow/ShadowRoot.h"
41 #include "core/events/Event.h" 41 #include "core/events/Event.h"
42 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
43 #include "core/html/HTMLElement.h" 43 #include "core/html/HTMLElement.h"
44 #include "core/inspector/ConsoleMessage.h"
44 #include "core/layout/LayoutObject.h" 45 #include "core/layout/LayoutObject.h"
45 #include "core/layout/svg/LayoutSVGResourceContainer.h" 46 #include "core/layout/svg/LayoutSVGResourceContainer.h"
46 #include "core/svg/SVGDocumentExtensions.h" 47 #include "core/svg/SVGDocumentExtensions.h"
47 #include "core/svg/SVGElementRareData.h" 48 #include "core/svg/SVGElementRareData.h"
48 #include "core/svg/SVGGraphicsElement.h" 49 #include "core/svg/SVGGraphicsElement.h"
49 #include "core/svg/SVGSVGElement.h" 50 #include "core/svg/SVGSVGElement.h"
50 #include "core/svg/SVGTitleElement.h" 51 #include "core/svg/SVGTitleElement.h"
51 #include "core/svg/SVGTreeScopeResources.h" 52 #include "core/svg/SVGTreeScopeResources.h"
52 #include "core/svg/SVGUseElement.h" 53 #include "core/svg/SVGUseElement.h"
53 #include "core/svg/properties/SVGProperty.h" 54 #include "core/svg/properties/SVGProperty.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 151 }
151 152
152 void SVGElement::reportAttributeParsingError(SVGParsingError error, 153 void SVGElement::reportAttributeParsingError(SVGParsingError error,
153 const QualifiedName& name, 154 const QualifiedName& name,
154 const AtomicString& value) { 155 const AtomicString& value) {
155 if (error == SVGParseStatus::NoError) 156 if (error == SVGParseStatus::NoError)
156 return; 157 return;
157 // Don't report any errors on attribute removal. 158 // Don't report any errors on attribute removal.
158 if (value.isNull()) 159 if (value.isNull())
159 return; 160 return;
160 document().accessSVGExtensions().reportError( 161 document().addConsoleMessage(
161 error.format(tagName(), name, value)); 162 ConsoleMessage::create(RenderingMessageSource, ErrorMessageLevel,
163 "Error: " + error.format(tagName(), name, value)));
162 } 164 }
163 165
164 String SVGElement::title() const { 166 String SVGElement::title() const {
165 // According to spec, we should not return titles when hovering over root 167 // According to spec, we should not return titles when hovering over root
166 // <svg> elements (those <title> elements are the title of the document, not a 168 // <svg> elements (those <title> elements are the title of the document, not a
167 // tooltip) so we instantly return. 169 // tooltip) so we instantly return.
168 if (isOutermostSVGSVGElement()) 170 if (isOutermostSVGSVGElement())
169 return String(); 171 return String();
170 172
171 if (inUseShadowTree()) { 173 if (inUseShadowTree()) {
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 visitor->trace(m_className); 1299 visitor->trace(m_className);
1298 Element::trace(visitor); 1300 Element::trace(visitor);
1299 } 1301 }
1300 1302
1301 const AtomicString& SVGElement::eventParameterName() { 1303 const AtomicString& SVGElement::eventParameterName() {
1302 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); 1304 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt"));
1303 return evtString; 1305 return evtString;
1304 } 1306 }
1305 1307
1306 } // namespace blink 1308 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698