diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp index 72f70e66b..31f592030 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp @@ -2,6 +2,7 @@ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org> 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> Copyright (C) 2006 Apple Computer, Inc. + Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> This file is part of the KDE project @@ -29,31 +30,21 @@ #include "CSSStyleSheet.h" #include "Document.h" #include "ExceptionCode.h" -#include "HTMLNames.h" #include "MappedAttribute.h" -#include "XMLNames.h" +#include "SVGNames.h" #include <wtf/StdLibExtras.h> namespace WebCore { -using namespace HTMLNames; +using namespace SVGNames; SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc, bool createdByParser) : SVGElement(tagName, doc) + , SVGLangSpace() , m_createdByParser(createdByParser) { } -const AtomicString& SVGStyleElement::xmlspace() const -{ - return getAttribute(XMLNames::spaceAttr); -} - -void SVGStyleElement::setXmlspace(const AtomicString&, ExceptionCode& ec) -{ - ec = NO_MODIFICATION_ALLOWED_ERR; -} - const AtomicString& SVGStyleElement::type() const { DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); @@ -61,9 +52,9 @@ const AtomicString& SVGStyleElement::type() const return n.isNull() ? defaultValue : n; } -void SVGStyleElement::setType(const AtomicString&, ExceptionCode& ec) +void SVGStyleElement::setType(const AtomicString& type, ExceptionCode& ec) { - ec = NO_MODIFICATION_ALLOWED_ERR; + setAttribute(typeAttr, type, ec); } const AtomicString& SVGStyleElement::media() const @@ -73,9 +64,9 @@ const AtomicString& SVGStyleElement::media() const return n.isNull() ? defaultValue : n; } -void SVGStyleElement::setMedia(const AtomicString&, ExceptionCode& ec) +void SVGStyleElement::setMedia(const AtomicString& media, ExceptionCode& ec) { - ec = NO_MODIFICATION_ALLOWED_ERR; + setAttribute(mediaAttr, media, ec); } String SVGStyleElement::title() const @@ -83,17 +74,20 @@ String SVGStyleElement::title() const return getAttribute(titleAttr); } -void SVGStyleElement::setTitle(const AtomicString&, ExceptionCode& ec) +void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode& ec) { - ec = NO_MODIFICATION_ALLOWED_ERR; + setAttribute(titleAttr, title, ec); } void SVGStyleElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == titleAttr && m_sheet) m_sheet->setTitle(attr->value()); - else + else { + if (SVGLangSpace::parseMappedAttribute(attr)) + return; SVGElement::parseMappedAttribute(attr); + } } void SVGStyleElement::finishParsingChildren() |