| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // If we aren't an instance in a <use> or the <use> title was not found, the
n find the first | 249 // If we aren't an instance in a <use> or the <use> title was not found, the
n find the first |
| 250 // <title> child of this element. | 250 // <title> child of this element. |
| 251 // If a title child was found, return the text contents. | 251 // If a title child was found, return the text contents. |
| 252 if (Element* titleElement = Traversal<SVGTitleElement>::firstChild(*this)) | 252 if (Element* titleElement = Traversal<SVGTitleElement>::firstChild(*this)) |
| 253 return titleElement->innerText(); | 253 return titleElement->innerText(); |
| 254 | 254 |
| 255 // Otherwise return a null/empty string. | 255 // Otherwise return a null/empty string. |
| 256 return String(); | 256 return String(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 PassRefPtrWillBeRawPtr<CSSValue> SVGElement::getPresentationAttribute(const Atom
icString& name) | |
| 260 { | |
| 261 if (!hasAttributesWithoutUpdate()) | |
| 262 return nullptr; | |
| 263 | |
| 264 QualifiedName attributeName(nullAtom, name, nullAtom); | |
| 265 const Attribute* attr = getAttributeItem(attributeName); | |
| 266 if (!attr) | |
| 267 return nullptr; | |
| 268 | |
| 269 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(SVGAttributeMode); | |
| 270 CSSPropertyID propertyID = SVGElement::cssPropertyIdForSVGAttributeName(attr
->name()); | |
| 271 style->setProperty(propertyID, attr->value()); | |
| 272 RefPtrWillBeRawPtr<CSSValue> cssValue = style->getPropertyCSSValue(propertyI
D); | |
| 273 return cssValue ? cssValue->cloneForCSSOM() : nullptr; | |
| 274 } | |
| 275 | |
| 276 | |
| 277 bool SVGElement::instanceUpdatesBlocked() const | 259 bool SVGElement::instanceUpdatesBlocked() const |
| 278 { | 260 { |
| 279 return hasSVGRareData() && svgRareData()->instanceUpdatesBlocked(); | 261 return hasSVGRareData() && svgRareData()->instanceUpdatesBlocked(); |
| 280 } | 262 } |
| 281 | 263 |
| 282 void SVGElement::setInstanceUpdatesBlocked(bool value) | 264 void SVGElement::setInstanceUpdatesBlocked(bool value) |
| 283 { | 265 { |
| 284 if (hasSVGRareData()) | 266 if (hasSVGRareData()) |
| 285 svgRareData()->setInstanceUpdatesBlocked(value); | 267 svgRareData()->setInstanceUpdatesBlocked(value); |
| 286 } | 268 } |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 animatableAttributes.add(SVGNames::zAttr); | 1109 animatableAttributes.add(SVGNames::zAttr); |
| 1128 } | 1110 } |
| 1129 | 1111 |
| 1130 if (name == classAttr) | 1112 if (name == classAttr) |
| 1131 return true; | 1113 return true; |
| 1132 | 1114 |
| 1133 return animatableAttributes.contains(name); | 1115 return animatableAttributes.contains(name); |
| 1134 } | 1116 } |
| 1135 #endif | 1117 #endif |
| 1136 } | 1118 } |
| OLD | NEW |