| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 bool hasSVGRareData() const { return m_hasSVGRareData; } | 179 bool hasSVGRareData() const { return m_hasSVGRareData; } |
| 180 void setHasSVGRareData() { m_hasSVGRareData = true; } | 180 void setHasSVGRareData() { m_hasSVGRareData = true; } |
| 181 void clearHasSVGRareData() { m_hasSVGRareData = false; } | 181 void clearHasSVGRareData() { m_hasSVGRareData = false; } |
| 182 | 182 |
| 183 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. | 183 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. |
| 184 friend class SVGFitToViewBox; | 184 friend class SVGFitToViewBox; |
| 185 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons
t AtomicString&); | 185 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons
t AtomicString&); |
| 186 bool hasFocusEventListeners() const; | 186 bool hasFocusEventListeners() const; |
| 187 | 187 |
| 188 class CleanUpAnimatedPropertiesCaller { | |
| 189 public: | |
| 190 CleanUpAnimatedPropertiesCaller() | |
| 191 : m_owner(0) | |
| 192 { | |
| 193 } | |
| 194 | |
| 195 ~CleanUpAnimatedPropertiesCaller() | |
| 196 { | |
| 197 ASSERT(m_owner); | |
| 198 m_owner->cleanupAnimatedProperties(); | |
| 199 } | |
| 200 | |
| 201 void setOwner(SVGElement* owner) { m_owner = owner; } | |
| 202 | |
| 203 private: | |
| 204 SVGElement* m_owner; | |
| 205 }; | |
| 206 | |
| 207 private: | 188 private: |
| 208 friend class SVGElementInstance; | 189 friend class SVGElementInstance; |
| 209 | 190 |
| 210 // FIXME: Author shadows should be allowed | 191 // FIXME: Author shadows should be allowed |
| 211 // https://bugs.webkit.org/show_bug.cgi?id=77938 | 192 // https://bugs.webkit.org/show_bug.cgi?id=77938 |
| 212 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false;
} | 193 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false;
} |
| 213 | 194 |
| 214 RenderStyle* computedStyle(PseudoId = NOPSEUDO); | 195 RenderStyle* computedStyle(PseudoId = NOPSEUDO); |
| 215 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } | 196 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } |
| 216 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; | 197 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; |
| 217 virtual bool isKeyboardFocusable() const OVERRIDE; | 198 virtual bool isKeyboardFocusable() const OVERRIDE; |
| 218 | 199 |
| 219 void buildPendingResourcesIfNeeded(); | 200 void buildPendingResourcesIfNeeded(); |
| 220 | 201 |
| 221 void mapInstanceToElement(SVGElementInstance*); | 202 void mapInstanceToElement(SVGElementInstance*); |
| 222 void removeInstanceMapping(SVGElementInstance*); | 203 void removeInstanceMapping(SVGElementInstance*); |
| 223 | 204 |
| 224 void cleanupAnimatedProperties(); | 205 void cleanupAnimatedProperties(); |
| 225 friend class CleanUpAnimatedPropertiesCaller; | 206 friend class CleanUpAnimatedPropertiesCaller; |
| 226 | 207 |
| 227 HashSet<SVGElement*> m_elementsWithRelativeLengths; | 208 HashSet<SVGElement*> m_elementsWithRelativeLengths; |
| 228 | 209 |
| 229 typedef HashMap<QualifiedName, RefPtr<NewSVGAnimatedPropertyBase> > Attribut
eToPropertyMap; | 210 typedef HashMap<QualifiedName, RefPtr<NewSVGAnimatedPropertyBase> > Attribut
eToPropertyMap; |
| 230 AttributeToPropertyMap m_newAttributeToPropertyMap; | 211 AttributeToPropertyMap m_newAttributeToPropertyMap; |
| 231 | 212 |
| 232 #if !ASSERT_DISABLED | 213 #if !ASSERT_DISABLED |
| 233 bool m_inRelativeLengthClientsInvalidation; | 214 bool m_inRelativeLengthClientsInvalidation; |
| 234 #endif | 215 #endif |
| 235 unsigned m_animatedPropertiesDestructed : 1; | |
| 236 unsigned m_isContextElement : 1; | 216 unsigned m_isContextElement : 1; |
| 237 unsigned m_hasSVGRareData : 1; | 217 unsigned m_hasSVGRareData : 1; |
| 238 | 218 |
| 239 RefPtr<SVGAnimatedString> m_className; | 219 RefPtr<SVGAnimatedString> m_className; |
| 240 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGElement) | 220 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGElement) |
| 241 END_DECLARE_ANIMATED_PROPERTIES | 221 END_DECLARE_ANIMATED_PROPERTIES |
| 242 }; | 222 }; |
| 243 | 223 |
| 244 struct SVGAttributeHashTranslator { | 224 struct SVGAttributeHashTranslator { |
| 245 static unsigned hash(const QualifiedName& key) | 225 static unsigned hash(const QualifiedName& key) |
| 246 { | 226 { |
| 247 if (key.hasPrefix()) { | 227 if (key.hasPrefix()) { |
| 248 QualifiedNameComponents components = { nullAtom.impl(), key.localNam
e().impl(), key.namespaceURI().impl() }; | 228 QualifiedNameComponents components = { nullAtom.impl(), key.localNam
e().impl(), key.namespaceURI().impl() }; |
| 249 return hashComponents(components); | 229 return hashComponents(components); |
| 250 } | 230 } |
| 251 return DefaultHash<QualifiedName>::Hash::hash(key); | 231 return DefaultHash<QualifiedName>::Hash::hash(key); |
| 252 } | 232 } |
| 253 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } | 233 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a
.matches(b); } |
| 254 }; | 234 }; |
| 255 | 235 |
| 256 DEFINE_NODE_TYPE_CASTS(SVGElement, isSVGElement()); | 236 DEFINE_NODE_TYPE_CASTS(SVGElement, isSVGElement()); |
| 257 | 237 |
| 258 } | 238 } |
| 259 | 239 |
| 260 #endif | 240 #endif |
| OLD | NEW |