| Index: Source/core/svg/SVGElement.h
|
| diff --git a/Source/core/svg/SVGElement.h b/Source/core/svg/SVGElement.h
|
| index 8699a92b5b548a3bc98928d0706cf1a983b73943..2eeb2c69241b703691a8da87f440bcad30fcddaa 100644
|
| --- a/Source/core/svg/SVGElement.h
|
| +++ b/Source/core/svg/SVGElement.h
|
| @@ -24,9 +24,11 @@
|
|
|
| #include "core/dom/Element.h"
|
| #include "core/platform/Timer.h"
|
| +#include "core/svg/SVGAnimatedString.h"
|
| #include "core/svg/SVGLangSpace.h"
|
| #include "core/svg/SVGLocatable.h"
|
| #include "core/svg/SVGParsingError.h"
|
| +#include "core/svg/properties/SVGAnimatedPropertyMacros.h"
|
| #include "core/svg/properties/SVGPropertyInfo.h"
|
| #include "wtf/HashMap.h"
|
|
|
| @@ -42,6 +44,8 @@ class SVGElementInstance;
|
| class SVGElementRareData;
|
| class SVGSVGElement;
|
|
|
| +void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
|
| +
|
| class SVGElement : public Element, public SVGLangSpace {
|
| public:
|
| static PassRefPtr<SVGElement> create(const QualifiedName&, Document*);
|
| @@ -49,6 +53,18 @@ public:
|
|
|
| bool isOutermostSVGSVGElement() const;
|
|
|
| + virtual String title() const;
|
| + bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
|
| + virtual bool supportsMarkers() const { return false; }
|
| + PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
|
| + bool isKnownAttribute(const QualifiedName&);
|
| + static bool isAnimatableCSSProperty(const QualifiedName&);
|
| + virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
|
| + virtual bool needsPendingResourceHandling() const { return true; }
|
| +
|
| + bool instanceUpdatesBlocked() const;
|
| + void setInstanceUpdatesBlocked(bool);
|
| +
|
| String xmlbase() const;
|
| void setXmlbase(const String&);
|
|
|
| @@ -57,7 +73,6 @@ public:
|
|
|
| SVGDocumentExtensions* accessDocumentSVGExtensions();
|
|
|
| - virtual bool isSVGStyledElement() const { return false; }
|
| virtual bool isSVGGraphicsElement() const { return false; }
|
| virtual bool isSVGSVGElement() const { return false; }
|
| virtual bool isFilterEffect() const { return false; }
|
| @@ -67,7 +82,7 @@ public:
|
| // For SVGTests
|
| virtual bool isValid() const { return true; }
|
|
|
| - virtual void svgAttributeChanged(const QualifiedName&) { }
|
| + virtual void svgAttributeChanged(const QualifiedName&);
|
|
|
| virtual void animatedPropertyTypeForAttribute(const QualifiedName&, Vector<AnimatedPropertyType>&);
|
|
|
| @@ -104,8 +119,6 @@ public:
|
| virtual void synchronizeRequiredExtensions() { }
|
| virtual void synchronizeSystemLanguage() { }
|
|
|
| - virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const;
|
| -
|
| #ifndef NDEBUG
|
| bool isAnimatableAttribute(const QualifiedName&) const;
|
| #endif
|
| @@ -130,7 +143,20 @@ protected:
|
| virtual void attributeChanged(const QualifiedName&, const AtomicString&, AttributeModificationReason = ModifiedDirectly) OVERRIDE;
|
| virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
|
|
|
| + virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
|
| + virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
|
| + virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
|
| + bool rendererIsNeededInternal(const NodeRenderingContext&);
|
| +
|
| + virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
|
| virtual void removedFrom(ContainerNode*) OVERRIDE;
|
| + virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
|
| +
|
| + static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
|
| + void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
|
| + void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
|
| +
|
| + virtual bool selfHasRelativeLengths() const { return false; }
|
|
|
| SVGElementRareData* svgRareData() const;
|
| SVGElementRareData* ensureSVGRareData();
|
| @@ -149,13 +175,19 @@ private:
|
| virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return computedStyle(pseudoElementSpecifier); }
|
| virtual void willRecalcStyle(StyleChange) OVERRIDE;
|
| virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
|
| - virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
|
| +
|
| + void buildPendingResourcesIfNeeded();
|
|
|
| virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
|
|
|
| void mapInstanceToElement(SVGElementInstance*);
|
| void removeInstanceMapping(SVGElementInstance*);
|
|
|
| + HashSet<SVGElement*> m_elementsWithRelativeLengths;
|
| +
|
| + BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGElement)
|
| + DECLARE_ANIMATED_STRING(ClassName, className)
|
| + END_DECLARE_ANIMATED_PROPERTIES
|
| };
|
|
|
| struct SVGAttributeHashTranslator {
|
|
|