| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2006 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 93 } |
| 94 | 94 |
| 95 void SVGStyleElement::setTitle(const AtomicString& title) | 95 void SVGStyleElement::setTitle(const AtomicString& title) |
| 96 { | 96 { |
| 97 setAttribute(SVGNames::titleAttr, title); | 97 setAttribute(SVGNames::titleAttr, title); |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool SVGStyleElement::isSupportedAttribute(const QualifiedName& attrName) | 100 bool SVGStyleElement::isSupportedAttribute(const QualifiedName& attrName) |
| 101 { | 101 { |
| 102 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 102 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 103 if (supportedAttributes.isEmpty()) { | 103 if (supportedAttributes.isEmpty()) |
| 104 SVGLangSpace::addSupportedAttributes(supportedAttributes); | |
| 105 supportedAttributes.add(SVGNames::titleAttr); | 104 supportedAttributes.add(SVGNames::titleAttr); |
| 106 } | |
| 107 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 105 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 108 } | 106 } |
| 109 | 107 |
| 110 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) | 108 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) |
| 111 { | 109 { |
| 112 if (!isSupportedAttribute(name)) { | 110 if (!isSupportedAttribute(name)) { |
| 113 SVGElement::parseAttribute(name, value); | 111 SVGElement::parseAttribute(name, value); |
| 114 return; | 112 return; |
| 115 } | 113 } |
| 116 | 114 |
| 117 if (name == SVGNames::titleAttr) { | 115 if (name == SVGNames::titleAttr) { |
| 118 if (m_sheet) | 116 if (m_sheet) |
| 119 m_sheet->setTitle(value); | 117 m_sheet->setTitle(value); |
| 120 return; | 118 return; |
| 121 } | 119 } |
| 122 | 120 |
| 123 if (SVGLangSpace::parseAttribute(name, value)) | |
| 124 return; | |
| 125 | |
| 126 ASSERT_NOT_REACHED(); | 121 ASSERT_NOT_REACHED(); |
| 127 } | 122 } |
| 128 | 123 |
| 129 void SVGStyleElement::finishParsingChildren() | 124 void SVGStyleElement::finishParsingChildren() |
| 130 { | 125 { |
| 131 StyleElement::finishParsingChildren(this); | 126 StyleElement::finishParsingChildren(this); |
| 132 SVGElement::finishParsingChildren(); | 127 SVGElement::finishParsingChildren(); |
| 133 } | 128 } |
| 134 | 129 |
| 135 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode*
rootParent) | 130 Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode*
rootParent) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 152 StyleElement::removedFromDocument(document(), this); | 147 StyleElement::removedFromDocument(document(), this); |
| 153 } | 148 } |
| 154 | 149 |
| 155 void SVGStyleElement::childrenChanged(bool changedByParser, Node* beforeChange,
Node* afterChange, int childCountDelta) | 150 void SVGStyleElement::childrenChanged(bool changedByParser, Node* beforeChange,
Node* afterChange, int childCountDelta) |
| 156 { | 151 { |
| 157 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); | 152 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil
dCountDelta); |
| 158 StyleElement::childrenChanged(this); | 153 StyleElement::childrenChanged(this); |
| 159 } | 154 } |
| 160 | 155 |
| 161 } | 156 } |
| OLD | NEW |