| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 SVGElementRareData* SVGElement::ensureSVGRareData() | 151 SVGElementRareData* SVGElement::ensureSVGRareData() |
| 152 { | 152 { |
| 153 if (hasSVGRareData()) | 153 if (hasSVGRareData()) |
| 154 return svgRareData(); | 154 return svgRareData(); |
| 155 | 155 |
| 156 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); | 156 m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this)); |
| 157 return m_SVGRareData.get(); | 157 return m_SVGRareData.get(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool SVGElement::hasSVGRareData() const |
| 161 { |
| 162 return m_SVGRareData; |
| 163 } |
| 164 |
| 165 SVGElementRareData* SVGElement::svgRareData() const |
| 166 { |
| 167 ASSERT(m_SVGRareData); |
| 168 return m_SVGRareData.get(); |
| 169 } |
| 170 |
| 160 bool SVGElement::isOutermostSVGSVGElement() const | 171 bool SVGElement::isOutermostSVGSVGElement() const |
| 161 { | 172 { |
| 162 if (!isSVGSVGElement(*this)) | 173 if (!isSVGSVGElement(*this)) |
| 163 return false; | 174 return false; |
| 164 | 175 |
| 165 // Element may not be in the document, pretend we're outermost for viewport(
), getCTM(), etc. | 176 // Element may not be in the document, pretend we're outermost for viewport(
), getCTM(), etc. |
| 166 if (!parentNode()) | 177 if (!parentNode()) |
| 167 return true; | 178 return true; |
| 168 | 179 |
| 169 // We act like an outermost SVG element, if we're a direct child of a <forei
gnObject> element. | 180 // We act like an outermost SVG element, if we're a direct child of a <forei
gnObject> element. |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 return AnimatedUnknown; | 685 return AnimatedUnknown; |
| 675 } | 686 } |
| 676 | 687 |
| 677 void SVGElement::addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase
> passProperty) | 688 void SVGElement::addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase
> passProperty) |
| 678 { | 689 { |
| 679 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property(passProperty); | 690 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property(passProperty); |
| 680 QualifiedName attributeName = property->attributeName(); | 691 QualifiedName attributeName = property->attributeName(); |
| 681 m_attributeToPropertyMap.set(attributeName, property.release()); | 692 m_attributeToPropertyMap.set(attributeName, property.release()); |
| 682 } | 693 } |
| 683 | 694 |
| 695 SVGAnimatedString* SVGElement::className() |
| 696 { |
| 697 return m_className.get(); |
| 698 } |
| 699 |
| 684 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> SVGElement::propertyFromAttribut
e(const QualifiedName& attributeName) | 700 PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> SVGElement::propertyFromAttribut
e(const QualifiedName& attributeName) |
| 685 { | 701 { |
| 686 AttributeToPropertyMap::iterator it = m_attributeToPropertyMap.find<SVGAttri
buteHashTranslator>(attributeName); | 702 AttributeToPropertyMap::iterator it = m_attributeToPropertyMap.find<SVGAttri
buteHashTranslator>(attributeName); |
| 687 if (it == m_attributeToPropertyMap.end()) | 703 if (it == m_attributeToPropertyMap.end()) |
| 688 return nullptr; | 704 return nullptr; |
| 689 | 705 |
| 690 return it->value; | 706 return it->value; |
| 691 } | 707 } |
| 692 | 708 |
| 693 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName) | 709 bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName) |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 Element::trace(visitor); | 1175 Element::trace(visitor); |
| 1160 } | 1176 } |
| 1161 | 1177 |
| 1162 const AtomicString& SVGElement::eventParameterName() | 1178 const AtomicString& SVGElement::eventParameterName() |
| 1163 { | 1179 { |
| 1164 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1180 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
| 1165 return evtString; | 1181 return evtString; |
| 1166 } | 1182 } |
| 1167 | 1183 |
| 1168 } // namespace blink | 1184 } // namespace blink |
| OLD | NEW |