| 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, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2009, 2014 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 class SVGFitToViewBox; | 45 class SVGFitToViewBox; |
| 46 class SVGSVGElement; | 46 class SVGSVGElement; |
| 47 class SVGUseElement; | 47 class SVGUseElement; |
| 48 | 48 |
| 49 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; | 49 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; |
| 50 | 50 |
| 51 class SVGElement : public Element { | 51 class SVGElement : public Element { |
| 52 DEFINE_WRAPPERTYPEINFO(); | 52 DEFINE_WRAPPERTYPEINFO(); |
| 53 public: | 53 public: |
| 54 virtual ~SVGElement(); | 54 virtual ~SVGElement(); |
| 55 virtual void attach(const AttachContext&) OVERRIDE; | 55 virtual void attach(const AttachContext&) override; |
| 56 virtual void detach(const AttachContext&) OVERRIDE; | 56 virtual void detach(const AttachContext&) override; |
| 57 | 57 |
| 58 virtual short tabIndex() const OVERRIDE; | 58 virtual short tabIndex() const override; |
| 59 virtual bool supportsFocus() const OVERRIDE { return false; } | 59 virtual bool supportsFocus() const override { return false; } |
| 60 | 60 |
| 61 bool isOutermostSVGSVGElement() const; | 61 bool isOutermostSVGSVGElement() const; |
| 62 | 62 |
| 63 bool hasTagName(const SVGQualifiedName& name) const { return hasLocalName(na
me.localName()); } | 63 bool hasTagName(const SVGQualifiedName& name) const { return hasLocalName(na
me.localName()); } |
| 64 | 64 |
| 65 virtual String title() const OVERRIDE; | 65 virtual String title() const override; |
| 66 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm
pty(); } | 66 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm
pty(); } |
| 67 static bool isAnimatableCSSProperty(const QualifiedName&); | 67 static bool isAnimatableCSSProperty(const QualifiedName&); |
| 68 enum CTMScope { | 68 enum CTMScope { |
| 69 NearestViewportScope, // Used by SVGGraphicsElement::getCTM() | 69 NearestViewportScope, // Used by SVGGraphicsElement::getCTM() |
| 70 ScreenScope, // Used by SVGGraphicsElement::getScreenCTM() | 70 ScreenScope, // Used by SVGGraphicsElement::getScreenCTM() |
| 71 AncestorScope // Used by SVGSVGElement::get{Enclosure|Intersection}List(
) | 71 AncestorScope // Used by SVGSVGElement::get{Enclosure|Intersection}List(
) |
| 72 }; | 72 }; |
| 73 virtual AffineTransform localCoordinateSpaceTransform(CTMScope) const; | 73 virtual AffineTransform localCoordinateSpaceTransform(CTMScope) const; |
| 74 virtual bool needsPendingResourceHandling() const { return true; } | 74 virtual bool needsPendingResourceHandling() const { return true; } |
| 75 | 75 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void cursorElementRemoved(); | 119 void cursorElementRemoved(); |
| 120 void cursorImageValueRemoved(); | 120 void cursorImageValueRemoved(); |
| 121 #endif | 121 #endif |
| 122 | 122 |
| 123 SVGElement* correspondingElement(); | 123 SVGElement* correspondingElement(); |
| 124 void setCorrespondingElement(SVGElement*); | 124 void setCorrespondingElement(SVGElement*); |
| 125 SVGUseElement* correspondingUseElement() const; | 125 SVGUseElement* correspondingUseElement() const; |
| 126 | 126 |
| 127 void synchronizeAnimatedSVGAttribute(const QualifiedName&) const; | 127 void synchronizeAnimatedSVGAttribute(const QualifiedName&) const; |
| 128 | 128 |
| 129 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE FINAL; | 129 virtual PassRefPtr<RenderStyle> customStyleForRenderer() override final; |
| 130 | 130 |
| 131 virtual void synchronizeRequiredFeatures() { } | 131 virtual void synchronizeRequiredFeatures() { } |
| 132 virtual void synchronizeRequiredExtensions() { } | 132 virtual void synchronizeRequiredExtensions() { } |
| 133 virtual void synchronizeSystemLanguage() { } | 133 virtual void synchronizeSystemLanguage() { } |
| 134 | 134 |
| 135 #if ENABLE(ASSERT) | 135 #if ENABLE(ASSERT) |
| 136 virtual bool isAnimatableAttribute(const QualifiedName&) const; | 136 virtual bool isAnimatableAttribute(const QualifiedName&) const; |
| 137 #endif | 137 #endif |
| 138 | 138 |
| 139 MutableStylePropertySet* animatedSMILStyleProperties() const; | 139 MutableStylePropertySet* animatedSMILStyleProperties() const; |
| 140 MutableStylePropertySet* ensureAnimatedSMILStyleProperties(); | 140 MutableStylePropertySet* ensureAnimatedSMILStyleProperties(); |
| 141 void setUseOverrideComputedStyle(bool); | 141 void setUseOverrideComputedStyle(bool); |
| 142 | 142 |
| 143 virtual bool haveLoadedRequiredResources(); | 143 virtual bool haveLoadedRequiredResources(); |
| 144 | 144 |
| 145 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE FINAL; | 145 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) override final; |
| 146 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture = false) OVERRIDE FINAL; | 146 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture = false) override final; |
| 147 | 147 |
| 148 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0); | 148 void invalidateRelativeLengthClients(SubtreeLayoutScope* = 0); |
| 149 | 149 |
| 150 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); | 150 void addToPropertyMap(PassRefPtr<SVGAnimatedPropertyBase>); |
| 151 | 151 |
| 152 SVGAnimatedString* className() { return m_className.get(); } | 152 SVGAnimatedString* className() { return m_className.get(); } |
| 153 | 153 |
| 154 bool inUseShadowTree() const; | 154 bool inUseShadowTree() const; |
| 155 | 155 |
| 156 SVGElementSet* setOfIncomingReferences() const; | 156 SVGElementSet* setOfIncomingReferences() const; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 176 public: | 176 public: |
| 177 InstanceUpdateBlocker(SVGElement* targetElement); | 177 InstanceUpdateBlocker(SVGElement* targetElement); |
| 178 ~InstanceUpdateBlocker(); | 178 ~InstanceUpdateBlocker(); |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 RawPtrWillBeMember<SVGElement> m_targetElement; | 181 RawPtrWillBeMember<SVGElement> m_targetElement; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 void invalidateInstances(); | 184 void invalidateInstances(); |
| 185 | 185 |
| 186 virtual void trace(Visitor*) OVERRIDE; | 186 virtual void trace(Visitor*) override; |
| 187 | 187 |
| 188 static const AtomicString& eventParameterName(); | 188 static const AtomicString& eventParameterName(); |
| 189 | 189 |
| 190 protected: | 190 protected: |
| 191 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem
ent); | 191 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem
ent); |
| 192 | 192 |
| 193 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 193 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
| 194 | 194 |
| 195 // FIXME: |parseAttributeNew| is a new implementation of parseAttribute | 195 // FIXME: |parseAttributeNew| is a new implementation of parseAttribute |
| 196 // which maps attribute using |m_attributeToPropertyMap|. | 196 // which maps attribute using |m_attributeToPropertyMap|. |
| 197 // This is to replace |parseAttribute()| after all derived class switch to c
all this. | 197 // This is to replace |parseAttribute()| after all derived class switch to c
all this. |
| 198 void parseAttributeNew(const QualifiedName&, const AtomicString&); | 198 void parseAttributeNew(const QualifiedName&, const AtomicString&); |
| 199 | 199 |
| 200 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly) OVERRIDE; | 200 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly) override; |
| 201 | 201 |
| 202 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 202 virtual bool isPresentationAttribute(const QualifiedName&) const override; |
| 203 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 203 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override; |
| 204 | 204 |
| 205 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 205 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 206 virtual void removedFrom(ContainerNode*) OVERRIDE; | 206 virtual void removedFrom(ContainerNode*) override; |
| 207 virtual void childrenChanged(const ChildrenChange&) OVERRIDE; | 207 virtual void childrenChanged(const ChildrenChange&) override; |
| 208 | 208 |
| 209 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); | 209 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); |
| 210 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s
elfHasRelativeLengths(), this); } | 210 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s
elfHasRelativeLengths(), this); } |
| 211 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); | 211 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); |
| 212 | 212 |
| 213 virtual bool selfHasRelativeLengths() const { return false; } | 213 virtual bool selfHasRelativeLengths() const { return false; } |
| 214 | 214 |
| 215 SVGElementRareData* ensureSVGRareData(); | 215 SVGElementRareData* ensureSVGRareData(); |
| 216 inline bool hasSVGRareData() const { return m_SVGRareData; } | 216 inline bool hasSVGRareData() const { return m_SVGRareData; } |
| 217 inline SVGElementRareData* svgRareData() const | 217 inline SVGElementRareData* svgRareData() const |
| 218 { | 218 { |
| 219 ASSERT(m_SVGRareData); | 219 ASSERT(m_SVGRareData); |
| 220 return m_SVGRareData.get(); | 220 return m_SVGRareData.get(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. | 223 // SVGFitToViewBox::parseAttribute uses reportAttributeParsingError. |
| 224 friend class SVGFitToViewBox; | 224 friend class SVGFitToViewBox; |
| 225 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons
t AtomicString&); | 225 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, cons
t AtomicString&); |
| 226 bool hasFocusEventListeners() const; | 226 bool hasFocusEventListeners() const; |
| 227 | 227 |
| 228 private: | 228 private: |
| 229 // FIXME: Author shadows should be allowed | 229 // FIXME: Author shadows should be allowed |
| 230 // https://bugs.webkit.org/show_bug.cgi?id=77938 | 230 // https://bugs.webkit.org/show_bug.cgi?id=77938 |
| 231 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false;
} | 231 virtual bool areAuthorShadowsAllowed() const override final { return false;
} |
| 232 | 232 |
| 233 bool isSVGElement() const WTF_DELETED_FUNCTION; // This will catch anyone do
ing an unnecessary check. | 233 bool isSVGElement() const WTF_DELETED_FUNCTION; // This will catch anyone do
ing an unnecessary check. |
| 234 bool isStyledElement() const WTF_DELETED_FUNCTION; // This will catch anyone
doing an unnecessary check. | 234 bool isStyledElement() const WTF_DELETED_FUNCTION; // This will catch anyone
doing an unnecessary check. |
| 235 | 235 |
| 236 RenderStyle* computedStyle(PseudoId = NOPSEUDO); | 236 RenderStyle* computedStyle(PseudoId = NOPSEUDO); |
| 237 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } | 237 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) override final { return computedStyle(pseudoElementSpecifier); } |
| 238 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; | 238 virtual void willRecalcStyle(StyleRecalcChange) override; |
| 239 | 239 |
| 240 void buildPendingResourcesIfNeeded(); | 240 void buildPendingResourcesIfNeeded(); |
| 241 | 241 |
| 242 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementsWithRelativ
eLengths; | 242 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementsWithRelativ
eLengths; |
| 243 | 243 |
| 244 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo
PropertyMap; | 244 typedef HashMap<QualifiedName, RefPtr<SVGAnimatedPropertyBase> > AttributeTo
PropertyMap; |
| 245 AttributeToPropertyMap m_attributeToPropertyMap; | 245 AttributeToPropertyMap m_attributeToPropertyMap; |
| 246 | 246 |
| 247 #if ENABLE(ASSERT) | 247 #if ENABLE(ASSERT) |
| 248 bool m_inRelativeLengthClientsInvalidation; | 248 bool m_inRelativeLengthClientsInvalidation; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ | 284 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ |
| 285 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ | 285 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ |
| 286 template <> inline bool isElementOfType<const thisType>(const SVGElement& el
ement) { return is##thisType(element); } \ | 286 template <> inline bool isElementOfType<const thisType>(const SVGElement& el
ement) { return is##thisType(element); } \ |
| 287 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 287 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
| 288 | 288 |
| 289 } // namespace blink | 289 } // namespace blink |
| 290 | 290 |
| 291 #include "core/SVGElementTypeHelpers.h" | 291 #include "core/SVGElementTypeHelpers.h" |
| 292 | 292 |
| 293 #endif // SVGElement_h | 293 #endif // SVGElement_h |
| OLD | NEW |