| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "core/html/HTMLElement.h" | 41 #include "core/html/HTMLElement.h" |
| 42 #include "core/layout/LayoutObject.h" | 42 #include "core/layout/LayoutObject.h" |
| 43 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 43 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| 44 #include "core/svg/SVGCursorElement.h" | 44 #include "core/svg/SVGCursorElement.h" |
| 45 #include "core/svg/SVGDocumentExtensions.h" | 45 #include "core/svg/SVGDocumentExtensions.h" |
| 46 #include "core/svg/SVGElementRareData.h" | 46 #include "core/svg/SVGElementRareData.h" |
| 47 #include "core/svg/SVGGraphicsElement.h" | 47 #include "core/svg/SVGGraphicsElement.h" |
| 48 #include "core/svg/SVGSVGElement.h" | 48 #include "core/svg/SVGSVGElement.h" |
| 49 #include "core/svg/SVGTitleElement.h" | 49 #include "core/svg/SVGTitleElement.h" |
| 50 #include "core/svg/SVGUseElement.h" | 50 #include "core/svg/SVGUseElement.h" |
| 51 | 51 #include "platform/JSONValues.h" |
| 52 #include "wtf/TemporaryChange.h" | 52 #include "wtf/TemporaryChange.h" |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 using namespace HTMLNames; | 56 using namespace HTMLNames; |
| 57 using namespace SVGNames; | 57 using namespace SVGNames; |
| 58 | 58 |
| 59 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
ctionType constructionType) | 59 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
ctionType constructionType) |
| 60 : Element(tagName, &document, constructionType) | 60 : Element(tagName, &document, constructionType) |
| 61 #if ENABLE(ASSERT) | 61 #if ENABLE(ASSERT) |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 // This is true whenever this is the outermost SVG, even if there are HTML e
lements outside it | 180 // This is true whenever this is the outermost SVG, even if there are HTML e
lements outside it |
| 181 return !parentNode()->isSVGElement(); | 181 return !parentNode()->isSVGElement(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void SVGElement::reportAttributeParsingError(SVGParsingError error, const Qualif
iedName& name, const AtomicString& value) | 184 void SVGElement::reportAttributeParsingError(SVGParsingError error, const Qualif
iedName& name, const AtomicString& value) |
| 185 { | 185 { |
| 186 if (error == NoError) | 186 if (error == NoError) |
| 187 return; | 187 return; |
| 188 | 188 |
| 189 String errorString = "<" + tagName() + "> attribute " + name.toString() + "=
\"" + value + "\""; | 189 String errorString = "<" + tagName() + "> attribute " + name.toString() + "=
" + JSONValue::quoteString(value); |
| 190 SVGDocumentExtensions& extensions = document().accessSVGExtensions(); | 190 SVGDocumentExtensions& extensions = document().accessSVGExtensions(); |
| 191 | 191 |
| 192 if (error == NegativeValueForbiddenError) { | 192 if (error == NegativeValueForbiddenError) { |
| 193 extensions.reportError("Invalid negative value for " + errorString); | 193 extensions.reportError("Invalid negative value for " + errorString); |
| 194 return; | 194 return; |
| 195 } | 195 } |
| 196 | 196 |
| 197 if (error == ParsingAttributeFailedError) { | 197 if (error == ParsingAttributeFailedError) { |
| 198 extensions.reportError("Invalid value for " + errorString); | 198 extensions.reportError("Invalid value for " + errorString); |
| 199 return; | 199 return; |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 Element::trace(visitor); | 1165 Element::trace(visitor); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 const AtomicString& SVGElement::eventParameterName() | 1168 const AtomicString& SVGElement::eventParameterName() |
| 1169 { | 1169 { |
| 1170 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1170 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
| 1171 return evtString; | 1171 return evtString; |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 } // namespace blink | 1174 } // namespace blink |
| OLD | NEW |