Changeset 73254 in webkit
- Timestamp:
- Dec 3, 2010 1:44:21 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 75 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73250 r73254 1 2010-12-03 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 Reviewed by Dirk Schulze. 4 5 Finish splitting DECLARE_ANIMATED_PROPERTY* in DECLARE/DEFINE parts for the remaining SVGAnimated* types 6 https://bugs.webkit.org/show_bug.cgi?id=50440 7 8 Continuing the work on bug 42025: Introduce (DECLARE|DEFINE)_ANIMATED_(ANGLE|BOOLEAN|INTEGER|PRESERVEASPECTRATIO|RECT). 9 The animated property declaration lives in the header, the definition in the cpp file, to avoid the dependency on SVGNames.h in all headers. 10 11 No functional changes, thus no new tests. 12 13 * svg/SVGAElement.cpp: 14 * svg/SVGAElement.h: 15 * svg/SVGAnimatedAngle.h: 16 * svg/SVGAnimatedBoolean.h: 17 * svg/SVGAnimatedInteger.h: 18 * svg/SVGAnimatedPreserveAspectRatio.h: 19 * svg/SVGAnimatedRect.h: 20 * svg/SVGAnimationElement.cpp: 21 * svg/SVGAnimationElement.h: 22 (WebCore::SVGAnimationElement::calculateDistance): 23 (WebCore::SVGAnimationElement::animationPath): 24 * svg/SVGCircleElement.cpp: 25 * svg/SVGCircleElement.h: 26 * svg/SVGClipPathElement.cpp: 27 * svg/SVGClipPathElement.h: 28 * svg/SVGCursorElement.cpp: 29 * svg/SVGCursorElement.h: 30 * svg/SVGDefsElement.cpp: 31 * svg/SVGDefsElement.h: 32 * svg/SVGEllipseElement.cpp: 33 * svg/SVGEllipseElement.h: 34 * svg/SVGFEConvolveMatrixElement.cpp: 35 * svg/SVGFEConvolveMatrixElement.h: 36 * svg/SVGFEImageElement.cpp: 37 * svg/SVGFEImageElement.h: 38 * svg/SVGFETurbulenceElement.cpp: 39 * svg/SVGFETurbulenceElement.h: 40 * svg/SVGFilterElement.cpp: 41 * svg/SVGFilterElement.h: 42 * svg/SVGFilterPrimitiveStandardAttributes.h: 43 * svg/SVGFontElement.cpp: 44 (WebCore::SVGFontElement::firstMissingGlyphElement): 45 (WebCore::SVGFontElement::ensureGlyphCache): 46 * svg/SVGFontElement.h: 47 * svg/SVGForeignObjectElement.cpp: 48 * svg/SVGForeignObjectElement.h: 49 * svg/SVGGElement.cpp: 50 * svg/SVGGElement.h: 51 (WebCore::SVGGElement::isShadowTreeContainerElement): 52 (WebCore::SVGGElement::isValid): 53 * svg/SVGGradientElement.cpp: 54 * svg/SVGGradientElement.h: 55 * svg/SVGImageElement.cpp: 56 * svg/SVGImageElement.h: 57 * svg/SVGLineElement.cpp: 58 * svg/SVGLineElement.h: 59 * svg/SVGLinearGradientElement.h: 60 * svg/SVGMPathElement.cpp: 61 * svg/SVGMPathElement.h: 62 * svg/SVGMarkerElement.cpp: 63 * svg/SVGMarkerElement.h: 64 * svg/SVGMaskElement.cpp: 65 * svg/SVGMaskElement.h: 66 * svg/SVGPathElement.cpp: 67 * svg/SVGPathElement.h: 68 * svg/SVGPatternElement.cpp: 69 * svg/SVGPatternElement.h: 70 * svg/SVGPolyElement.cpp: 71 * svg/SVGPolyElement.h: 72 * svg/SVGRadialGradientElement.h: 73 * svg/SVGRectElement.cpp: 74 * svg/SVGRectElement.h: 75 * svg/SVGSVGElement.cpp: 76 (WebCore::SVGSVGElement::contentScriptType): 77 (WebCore::SVGSVGElement::contentStyleType): 78 (WebCore::SVGSVGElement::parseMappedAttribute): 79 * svg/SVGSVGElement.h: 80 * svg/SVGScriptElement.cpp: 81 * svg/SVGScriptElement.h: 82 * svg/SVGSwitchElement.cpp: 83 * svg/SVGSwitchElement.h: 84 (WebCore::SVGSwitchElement::isValid): 85 * svg/SVGSymbolElement.cpp: 86 * svg/SVGSymbolElement.h: 87 (WebCore::SVGSymbolElement::rendererIsNeeded): 88 * svg/SVGTextContentElement.cpp: 89 * svg/SVGTextContentElement.h: 90 * svg/SVGUseElement.cpp: 91 * svg/SVGUseElement.h: 92 * svg/SVGViewElement.cpp: 93 * svg/SVGViewElement.h: 94 (WebCore::SVGViewElement::viewTarget): 95 (WebCore::SVGViewElement::rendererIsNeeded): 96 * svg/SVGViewSpec.cpp: 97 * svg/SVGViewSpec.h: 98 (WebCore::SVGViewSpec::transform): 99 (WebCore::SVGViewSpec::viewTargetString): 100 (WebCore::SVGViewSpec::contextElement): 101 * svg/properties/SVGAnimatedPropertyMacros.h: 102 1 103 2010-12-03 Noel Gordon <noel.gordon@gmail.com> 2 104 -
trunk/WebCore/svg/SVGAElement.cpp
r73130 r73254 51 51 DEFINE_ANIMATED_STRING(SVGAElement, SVGNames::targetAttr, SVGTarget, svgTarget) 52 52 DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href) 53 DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 53 54 54 55 inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGAElement.h
r73130 r73254 24 24 25 25 #if ENABLE(SVG) 26 #include "SVGAnimatedBoolean.h" 26 27 #include "SVGExternalResourcesRequired.h" 27 28 #include "SVGLangSpace.h" … … 73 74 74 75 // SVGExternalResourcesRequired 75 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGAElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)76 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 76 77 }; 77 78 -
trunk/WebCore/svg/SVGAnimatedAngle.h
r70410 r73254 29 29 typedef SVGAnimatedPropertyTearOff<SVGAngle> SVGAnimatedAngle; 30 30 31 // Helper macros to declare/define a SVGAnimatedAngle object 32 #define DECLARE_ANIMATED_ANGLE(UpperProperty, LowerProperty) \ 33 DECLARE_ANIMATED_PROPERTY(SVGAnimatedAngle, SVGAngle, UpperProperty, LowerProperty) 34 35 #define DEFINE_ANIMATED_ANGLE_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \ 36 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, SVGAnimatedAngle, SVGAngle, UpperProperty, LowerProperty) 37 31 38 } // namespace WebCore 32 39 -
trunk/WebCore/svg/SVGAnimatedBoolean.h
r70857 r73254 28 28 typedef SVGAnimatedStaticPropertyTearOff<bool> SVGAnimatedBoolean; 29 29 30 // Helper macros to declare/define a SVGAnimatedBoolean object 31 #define DECLARE_ANIMATED_BOOLEAN(UpperProperty, LowerProperty) \ 32 DECLARE_ANIMATED_PROPERTY(SVGAnimatedBoolean, bool, UpperProperty, LowerProperty) 33 34 #define DEFINE_ANIMATED_BOOLEAN(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \ 35 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedBoolean, bool, UpperProperty, LowerProperty) 36 30 37 } // namespace WebCore 31 38 -
trunk/WebCore/svg/SVGAnimatedInteger.h
r70872 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include "SVGAnimatedPropertyMacros.h" 24 25 #include "SVGAnimatedStaticPropertyTearOff.h" 25 26 … … 28 29 typedef SVGAnimatedStaticPropertyTearOff<long> SVGAnimatedInteger; 29 30 31 // Helper macros to declare/define a SVGAnimatedInteger object 32 #define DECLARE_ANIMATED_INTEGER(UpperProperty, LowerProperty) \ 33 DECLARE_ANIMATED_PROPERTY(SVGAnimatedInteger, long, UpperProperty, LowerProperty) 34 35 #define DEFINE_ANIMATED_INTEGER(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \ 36 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedInteger, long, UpperProperty, LowerProperty) 37 38 #define DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \ 39 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, SVGAnimatedInteger, long, UpperProperty, LowerProperty) 40 30 41 } // namespace WebCore 31 42 -
trunk/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
r71103 r73254 29 29 typedef SVGAnimatedPropertyTearOff<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio; 30 30 31 // Helper macros to declare/define a SVGAnimatedPreserveAspectRatio object 32 #define DECLARE_ANIMATED_PRESERVEASPECTRATIO(UpperProperty, LowerProperty) \ 33 DECLARE_ANIMATED_PROPERTY(SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio, UpperProperty, LowerProperty) 34 35 #define DEFINE_ANIMATED_PRESERVEASPECTRATIO(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \ 36 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatio, UpperProperty, LowerProperty) 37 31 38 } // namespace WebCore 32 39 -
trunk/WebCore/svg/SVGAnimatedRect.h
r70631 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include " FloatRect.h"24 #include "SVGAnimatedPropertyMacros.h" 25 25 #include "SVGAnimatedPropertyTearOff.h" 26 #include "SVGRect.h" 26 27 27 28 namespace WebCore { … … 29 30 typedef SVGAnimatedPropertyTearOff<FloatRect> SVGAnimatedRect; 30 31 32 // Helper macros to declare/define a SVGAnimatedRect object 33 #define DECLARE_ANIMATED_RECT(UpperProperty, LowerProperty) \ 34 DECLARE_ANIMATED_PROPERTY(SVGAnimatedRect, FloatRect, UpperProperty, LowerProperty) 35 36 #define DEFINE_ANIMATED_RECT(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \ 37 DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedRect, FloatRect, UpperProperty, LowerProperty) 38 31 39 } // namespace WebCore 32 40 -
trunk/WebCore/svg/SVGAnimationElement.cpp
r72518 r73254 46 46 #include "SVGUseElement.h" 47 47 #include "XLinkNames.h" 48 #include <math.h>49 48 #include <wtf/StdLibExtras.h> 50 49 … … 52 51 53 52 namespace WebCore { 54 53 54 // Animated property definitions 55 DEFINE_ANIMATED_BOOLEAN(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 56 55 57 SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* document) 56 58 : SVGSMILElement(tagName, document) -
trunk/WebCore/svg/SVGAnimationElement.h
r71828 r73254 24 24 #ifndef SVGAnimationElement_h 25 25 #define SVGAnimationElement_h 26 26 27 #if ENABLE(SVG_ANIMATION) 27 28 #include "ElementTimeControl.h" 28 29 #include "Path.h" 29 30 #include "SMILTime.h" 30 #include "SVGAnimatedPropertyMacros.h" 31 #include "SVGAnimatedBoolean.h" 32 #include "SVGExternalResourcesRequired.h" 31 33 #include "SVGSMILElement.h" 32 #include "SVGExternalResourcesRequired.h"33 34 #include "SVGStringList.h" 34 35 #include "SVGTests.h" … … 37 38 namespace WebCore { 38 39 39 40 40 class ConditionEventListener; 41 class TimeContainer; 41 42 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 43 class SVGAnimationElement : public SVGSMILElement, 44 public SVGTests, 45 public SVGExternalResourcesRequired, 46 public ElementTimeControl { 47 public: 48 // SVGAnimationElement 49 float getStartTime() const; 50 float getCurrentTime() const; 51 float getSimpleDuration(ExceptionCode&) const; 52 53 // ElementTimeControl 54 virtual void beginElement(); 55 virtual void beginElementAt(float offset); 56 virtual void endElement(); 57 virtual void endElementAt(float offset); 58 59 static bool attributeIsCSS(const String& attributeName); 59 60 60 61 61 protected: 62 SVGAnimationElement(const QualifiedName&, Document*); 62 63 63 64 virtual void parseMappedAttribute(Attribute*); 64 65 65 66 67 68 69 70 71 72 73 74 75 76 66 enum CalcMode { CalcModeDiscrete, CalcModeLinear, CalcModePaced, CalcModeSpline }; 67 CalcMode calcMode() const; 68 69 enum AttributeType { AttributeTypeCSS, AttributeTypeXML, AttributeTypeAuto }; 70 AttributeType attributeType() const; 71 72 String toValue() const; 73 String byValue() const; 74 String fromValue() const; 75 76 enum AnimationMode { NoAnimation, ToAnimation, ByAnimation, ValuesAnimation, FromToAnimation, FromByAnimation, PathAnimation }; 77 AnimationMode animationMode() const; 77 78 78 virtual bool hasValidTarget() const; 79 80 String targetAttributeBaseValue() const; 81 void setTargetAttributeAnimatedValue(const String&); 82 bool targetAttributeIsCSS() const; 83 84 bool isAdditive() const; 85 bool isAccumulated() const; 79 virtual bool hasValidTarget() const; 86 80 87 // from SVGSMILElement 88 virtual void startedActiveInterval(); 89 virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement); 90 virtual void endedActiveInterval(); 91 92 private: 93 virtual void attributeChanged(Attribute*, bool preserveDecls); 94 virtual void synchronizeProperty(const QualifiedName&); 81 String targetAttributeBaseValue() const; 82 void setTargetAttributeAnimatedValue(const String&); 83 bool targetAttributeIsCSS() const; 84 85 bool isAdditive() const; 86 bool isAccumulated() const; 95 87 96 virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0; 97 virtual bool calculateFromAndByValues(const String& fromString, const String& byString) = 0; 98 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement) = 0; 99 virtual float calculateDistance(const String& /*fromString*/, const String& /*toString*/) { return -1.f; } 100 virtual Path animationPath() const { return Path(); } 101 102 void currentValuesForValuesAnimation(float percent, float& effectivePercent, String& from, String& to) const; 103 void calculateKeyTimesForCalcModePaced(); 104 float calculatePercentFromKeyPoints(float percent) const; 105 void currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const; 106 float calculatePercentForSpline(float percent, unsigned splineIndex) const; 107 unsigned calculateKeyTimesIndex(float percent) const; 108 109 // SVGExternalResourcesRequired 110 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 88 // from SVGSMILElement 89 virtual void startedActiveInterval(); 90 virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement); 91 virtual void endedActiveInterval(); 92 93 private: 94 virtual void attributeChanged(Attribute*, bool preserveDecls); 95 virtual void synchronizeProperty(const QualifiedName&); 111 96 112 bool m_animationValid; 97 virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0; 98 virtual bool calculateFromAndByValues(const String& fromString, const String& byString) = 0; 99 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement) = 0; 100 virtual float calculateDistance(const String& /*fromString*/, const String& /*toString*/) { return -1.f; } 101 virtual Path animationPath() const { return Path(); } 102 103 void currentValuesForValuesAnimation(float percent, float& effectivePercent, String& from, String& to) const; 104 void calculateKeyTimesForCalcModePaced(); 105 float calculatePercentFromKeyPoints(float percent) const; 106 void currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const; 107 float calculatePercentForSpline(float percent, unsigned splineIndex) const; 108 unsigned calculateKeyTimesIndex(float percent) const; 113 109 114 Vector<String> m_values; 115 Vector<float> m_keyTimes; 116 Vector<float> m_keyPoints; 117 Vector<UnitBezier> m_keySplines; 118 String m_lastValuesAnimationFrom; 119 String m_lastValuesAnimationTo; 120 }; 110 // Animated property declarations 111 112 // SVGExternalResourcesRequired 113 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 114 115 bool m_animationValid; 116 117 Vector<String> m_values; 118 Vector<float> m_keyTimes; 119 Vector<float> m_keyPoints; 120 Vector<UnitBezier> m_keySplines; 121 String m_lastValuesAnimationFrom; 122 String m_lastValuesAnimationTo; 123 }; 121 124 122 125 } // namespace WebCore -
trunk/WebCore/svg/SVGCircleElement.cpp
r73016 r73254 37 37 DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cyAttr, Cy, cy) 38 38 DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::rAttr, R, r) 39 DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 39 40 40 41 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGCircleElement.h
r73016 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" … … 58 58 59 59 // SVGExternalResourcesRequired 60 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)60 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 61 61 }; 62 62 -
trunk/WebCore/svg/SVGClipPathElement.cpp
r73130 r73254 37 37 // Animated property definitions 38 38 DEFINE_ANIMATED_ENUMERATION(SVGClipPathElement, SVGNames::clipPathUnitsAttr, ClipPathUnits, clipPathUnits) 39 DEFINE_ANIMATED_BOOLEAN(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 39 40 40 41 inline SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGClipPathElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedEnumeration.h" 26 27 #include "SVGExternalResourcesRequired.h" … … 57 58 58 59 // SVGExternalResourcesRequired 59 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)60 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 60 61 }; 61 62 -
trunk/WebCore/svg/SVGCursorElement.cpp
r73130 r73254 34 34 DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::yAttr, Y, y) 35 35 DEFINE_ANIMATED_STRING(SVGCursorElement, XLinkNames::hrefAttr, Href, href) 36 DEFINE_ANIMATED_BOOLEAN(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 36 37 37 38 inline SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGCursorElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 27 #include "SVGAnimatedString.h" … … 63 64 64 65 // SVGExternalResourcesRequired 65 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)66 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 66 67 67 68 HashSet<SVGElement*> m_clients; -
trunk/WebCore/svg/SVGDefsElement.cpp
r72518 r73254 27 27 28 28 namespace WebCore { 29 30 // Animated property definitions 31 DEFINE_ANIMATED_BOOLEAN(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 29 32 30 33 inline SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGDefsElement.h
r70857 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimated PropertyMacros.h"25 #include "SVGAnimatedBoolean.h" 26 26 #include "SVGExternalResourcesRequired.h" 27 27 #include "SVGLangSpace.h" … … 31 31 namespace WebCore { 32 32 33 34 35 36 37 38 33 class SVGDefsElement : public SVGStyledTransformableElement, 34 public SVGTests, 35 public SVGLangSpace, 36 public SVGExternalResourcesRequired { 37 public: 38 static PassRefPtr<SVGDefsElement> create(const QualifiedName&, Document*); 39 39 40 41 40 private: 41 SVGDefsElement(const QualifiedName&, Document*); 42 42 43 43 virtual bool isValid() const; 44 44 45 46 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 virtual void synchronizeProperty(const QualifiedName&); 47 47 48 // SVGExternalResourcesRequired 49 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 50 }; 48 // Animated property declarations 49 50 // SVGExternalResourcesRequired 51 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 52 }; 51 53 52 54 } // namespace WebCore -
trunk/WebCore/svg/SVGEllipseElement.cpp
r73016 r73254 38 38 DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::rxAttr, Rx, rx) 39 39 DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::ryAttr, Ry, ry) 40 DEFINE_ANIMATED_BOOLEAN(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 40 41 41 42 inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGEllipseElement.h
r73016 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" … … 59 59 60 60 // SVGExternalResourcesRequired 61 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)61 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 62 62 }; 63 63 -
trunk/WebCore/svg/SVGFEConvolveMatrixElement.cpp
r73130 r73254 34 34 // Animated property definitions 35 35 DEFINE_ANIMATED_STRING(SVGFEConvolveMatrixElement, SVGNames::inAttr, In1, in1) 36 DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderXIdentifier(), OrderX, orderX) 37 DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderYIdentifier(), OrderY, orderY) 36 38 DEFINE_ANIMATED_NUMBER_LIST(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, KernelMatrix, kernelMatrix) 37 39 DEFINE_ANIMATED_NUMBER(SVGFEConvolveMatrixElement, SVGNames::divisorAttr, Divisor, divisor) 38 40 DEFINE_ANIMATED_NUMBER(SVGFEConvolveMatrixElement, SVGNames::biasAttr, Bias, bias) 41 DEFINE_ANIMATED_INTEGER(SVGFEConvolveMatrixElement, SVGNames::targetXAttr, TargetX, targetX) 42 DEFINE_ANIMATED_INTEGER(SVGFEConvolveMatrixElement, SVGNames::targetYAttr, TargetY, targetY) 39 43 DEFINE_ANIMATED_ENUMERATION(SVGFEConvolveMatrixElement, SVGNames::operatorAttr, EdgeMode, edgeMode) 40 44 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), KernelUnitLengthX, kernelUnitLengthX) 41 45 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), KernelUnitLengthY, kernelUnitLengthY) 46 DEFINE_ANIMATED_BOOLEAN(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, PreserveAlpha, preserveAlpha) 42 47 43 48 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGFEConvolveMatrixElement.h
r73130 r73254 51 51 // Animated property declarations 52 52 DECLARE_ANIMATED_STRING(In1, in1) 53 DECLARE_ANIMATED_ STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderXIdentifier(), long,OrderX, orderX)54 DECLARE_ANIMATED_ STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderYIdentifier(), long,OrderY, orderY)53 DECLARE_ANIMATED_INTEGER(OrderX, orderX) 54 DECLARE_ANIMATED_INTEGER(OrderY, orderY) 55 55 DECLARE_ANIMATED_NUMBER_LIST(KernelMatrix, kernelMatrix) 56 56 DECLARE_ANIMATED_NUMBER(Divisor, divisor) 57 57 DECLARE_ANIMATED_NUMBER(Bias, bias) 58 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::targetXAttr, long,TargetX, targetX)59 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::targetYAttr, long,TargetY, targetY)58 DECLARE_ANIMATED_INTEGER(TargetX, targetX) 59 DECLARE_ANIMATED_INTEGER(TargetY, targetY) 60 60 DECLARE_ANIMATED_ENUMERATION(EdgeMode, edgeMode) 61 61 DECLARE_ANIMATED_NUMBER(KernelUnitLengthX, kernelUnitLengthX) 62 62 DECLARE_ANIMATED_NUMBER(KernelUnitLengthY, kernelUnitLengthY) 63 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, bool,PreserveAlpha, preserveAlpha)63 DECLARE_ANIMATED_BOOLEAN(PreserveAlpha, preserveAlpha) 64 64 }; 65 65 -
trunk/WebCore/svg/SVGFEImageElement.cpp
r73130 r73254 39 39 40 40 // Animated property definitions 41 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 41 42 DEFINE_ANIMATED_STRING(SVGFEImageElement, XLinkNames::hrefAttr, Href, href) 43 DEFINE_ANIMATED_BOOLEAN(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 42 44 43 45 inline SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGFEImageElement.h
r73130 r73254 26 26 #include "CachedResourceHandle.h" 27 27 #include "ImageBuffer.h" 28 #include "SVGAnimatedPreserveAspectRatio.h" 28 29 #include "SVGExternalResourcesRequired.h" 29 30 #include "SVGFEImage.h" 30 31 #include "SVGFilterPrimitiveStandardAttributes.h" 31 32 #include "SVGLangSpace.h" 32 #include "SVGPreserveAspectRatio.h"33 33 #include "SVGURIReference.h" 34 34 … … 59 59 60 60 // Animated property declarations 61 DECLARE_ANIMATED_PR OPERTY_NEW(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)61 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 62 62 63 63 // SVGURIReference … … 65 65 66 66 // SVGExternalResourcesRequired 67 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)67 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 68 68 69 69 CachedResourceHandle<CachedImage> m_cachedImage; -
trunk/WebCore/svg/SVGFETurbulenceElement.cpp
r73130 r73254 32 32 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyXIdentifier(), BaseFrequencyX, baseFrequencyX) 33 33 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyYIdentifier(), BaseFrequencyY, baseFrequencyY) 34 DEFINE_ANIMATED_INTEGER(SVGFETurbulenceElement, SVGNames::numOctavesAttr, NumOctaves, numOctaves) 34 35 DEFINE_ANIMATED_NUMBER(SVGFETurbulenceElement, SVGNames::seedAttr, Seed, seed) 35 36 DEFINE_ANIMATED_ENUMERATION(SVGFETurbulenceElement, SVGNames::stitchTilesAttr, StitchTiles, stitchTiles) -
trunk/WebCore/svg/SVGFETurbulenceElement.h
r73130 r73254 54 54 DECLARE_ANIMATED_NUMBER(BaseFrequencyX, baseFrequencyX) 55 55 DECLARE_ANIMATED_NUMBER(BaseFrequencyY, baseFrequencyY) 56 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFETurbulenceElement, SVGNames::numOctavesAttr, long,NumOctaves, numOctaves)56 DECLARE_ANIMATED_INTEGER(NumOctaves, numOctaves) 57 57 DECLARE_ANIMATED_NUMBER(Seed, seed) 58 58 DECLARE_ANIMATED_ENUMERATION(StitchTiles, stitchTiles) -
trunk/WebCore/svg/SVGFilterElement.cpp
r73130 r73254 44 44 DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::widthAttr, Width, width) 45 45 DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::heightAttr, Height, height) 46 DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFilterElement, SVGNames::filterResAttr, filterResXIdentifier(), FilterResX, filterResX) 47 DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFilterElement, SVGNames::filterResAttr, filterResYIdentifier(), FilterResY, filterResY) 46 48 DEFINE_ANIMATED_STRING(SVGFilterElement, XLinkNames::hrefAttr, Href, href) 49 DEFINE_ANIMATED_BOOLEAN(SVGFilterElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 47 50 48 51 inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGFilterElement.h
r73130 r73254 25 25 26 26 #if ENABLE(SVG) && ENABLE(FILTERS) 27 #include "SVGAnimatedBoolean.h" 27 28 #include "SVGAnimatedEnumeration.h" 29 #include "SVGAnimatedInteger.h" 28 30 #include "SVGAnimatedLength.h" 29 31 #include "SVGExternalResourcesRequired.h" … … 68 70 DECLARE_ANIMATED_LENGTH(Width, width) 69 71 DECLARE_ANIMATED_LENGTH(Height, height) 70 71 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFilterElement, SVGNames::filterResAttr, filterResXIdentifier(), long, FilterResX, filterResX) 72 DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFilterElement, SVGNames::filterResAttr, filterResYIdentifier(), long, FilterResY, filterResY) 72 DECLARE_ANIMATED_INTEGER(FilterResX, filterResX) 73 DECLARE_ANIMATED_INTEGER(FilterResY, filterResY) 73 74 74 75 // SVGURIReference … … 76 77 77 78 // SVGExternalResourcesRequired 78 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFilterElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)79 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 79 80 }; 80 81 -
trunk/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
r73130 r73254 28 28 #include "SVGFilterBuilder.h" 29 29 #include "SVGFilterElement.h" 30 #include "SVGNames.h"31 30 #include "SVGStyledElement.h" 32 31 -
trunk/WebCore/svg/SVGFontElement.cpp
r66498 r73254 35 35 #include <wtf/ASCIICType.h> 36 36 37 using namespace WTF;38 39 37 namespace WebCore { 40 38 41 using namespace SVGNames; 39 // Animated property declarations 40 DEFINE_ANIMATED_BOOLEAN(SVGFontElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 42 41 43 42 inline SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* document) … … 73 72 { 74 73 for (Node* child = firstChild(); child; child = child->nextSibling()) { 75 if (child->hasTagName( missing_glyphTag))74 if (child->hasTagName(SVGNames::missing_glyphTag)) 76 75 return static_cast<SVGMissingGlyphElement*>(child); 77 76 } … … 86 85 87 86 for (Node* child = firstChild(); child; child = child->nextSibling()) { 88 if (child->hasTagName( glyphTag)) {87 if (child->hasTagName(SVGNames::glyphTag)) { 89 88 SVGGlyphElement* glyph = static_cast<SVGGlyphElement*>(child); 90 String unicode = glyph->getAttribute( unicodeAttr);89 String unicode = glyph->getAttribute(SVGNames::unicodeAttr); 91 90 if (unicode.length()) 92 91 m_glyphMap.add(unicode, glyph->buildGlyphIdentifier()); 93 } else if (child->hasTagName( hkernTag)) {92 } else if (child->hasTagName(SVGNames::hkernTag)) { 94 93 SVGHKernElement* hkern = static_cast<SVGHKernElement*>(child); 95 94 hkern->buildHorizontalKerningPair(m_horizontalKerningPairs); 96 } else if (child->hasTagName( vkernTag)) {95 } else if (child->hasTagName(SVGNames::vkernTag)) { 97 96 SVGVKernElement* vkern = static_cast<SVGVKernElement*>(child); 98 97 vkern->buildVerticalKerningPair(m_verticalKerningPairs); -
trunk/WebCore/svg/SVGFontElement.h
r70857 r73254 24 24 25 25 #if ENABLE(SVG_FONTS) 26 #include "SVGAnimated PropertyMacros.h"26 #include "SVGAnimatedBoolean.h" 27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGGlyphElement.h" … … 75 75 void ensureGlyphCache() const; 76 76 77 // Animated property declarations 78 77 79 // SVGExternalResourcesRequired 78 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)80 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 79 81 80 82 mutable KerningPairVector m_horizontalKerningPairs; -
trunk/WebCore/svg/SVGForeignObjectElement.cpp
r73130 r73254 40 40 DEFINE_ANIMATED_LENGTH(SVGForeignObjectElement, SVGNames::heightAttr, Height, height) 41 41 DEFINE_ANIMATED_STRING(SVGForeignObjectElement, XLinkNames::hrefAttr, Href, href) 42 DEFINE_ANIMATED_BOOLEAN(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 42 43 43 44 inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGForeignObjectElement.h
r73130 r73254 22 22 23 23 #if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) 24 #include "SVGAnimatedBoolean.h" 24 25 #include "SVGAnimatedLength.h" 25 #include "SVGAnimatedPropertyMacros.h"26 26 #include "SVGTests.h" 27 27 #include "SVGLangSpace.h" … … 62 62 63 63 // SVGExternalResourcesRequired 64 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)64 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 65 65 }; 66 66 -
trunk/WebCore/svg/SVGGElement.cpp
r72518 r73254 29 29 30 30 namespace WebCore { 31 32 // Animated property declarations 33 DEFINE_ANIMATED_BOOLEAN(SVGGElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 31 34 32 35 SVGGElement::SVGGElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGGElement.h
r70857 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimated PropertyMacros.h"25 #include "SVGAnimatedBoolean.h" 26 26 #include "SVGExternalResourcesRequired.h" 27 27 #include "SVGLangSpace.h" … … 31 31 namespace WebCore { 32 32 33 34 35 36 37 38 33 class SVGGElement : public SVGStyledTransformableElement, 34 public SVGTests, 35 public SVGLangSpace, 36 public SVGExternalResourcesRequired { 37 public: 38 static PassRefPtr<SVGGElement> create(const QualifiedName&, Document*); 39 39 40 40 virtual bool isShadowTreeContainerElement() const { return false; } 41 41 42 43 42 protected: 43 SVGGElement(const QualifiedName&, Document*); 44 44 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 46 47 48 47 private: 48 virtual bool isValid() const { return SVGTests::isValid(); } 49 49 50 51 52 50 virtual void parseMappedAttribute(Attribute*); 51 virtual void svgAttributeChanged(const QualifiedName&); 52 virtual void synchronizeProperty(const QualifiedName&); 53 53 54 54 virtual bool rendererIsNeeded(RenderStyle*); 55 55 56 // SVGExternalResourcesRequired 57 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 58 }; 56 // Animated property declarations 57 58 // SVGExternalResourcesRequired 59 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 60 }; 59 61 60 62 } // namespace WebCore -
trunk/WebCore/svg/SVGGradientElement.cpp
r73130 r73254 44 44 DEFINE_ANIMATED_TRANSFORM_LIST(SVGGradientElement, SVGNames::gradientTransformAttr, GradientTransform, gradientTransform) 45 45 DEFINE_ANIMATED_STRING(SVGGradientElement, XLinkNames::hrefAttr, Href, href) 46 DEFINE_ANIMATED_BOOLEAN(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 46 47 47 48 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGGradientElement.h
r73130 r73254 24 24 #if ENABLE(SVG) 25 25 #include "Gradient.h" 26 #include "SVGAnimatedBoolean.h" 26 27 #include "SVGAnimatedEnumeration.h" 27 28 #include "SVGAnimatedTransformList.h" … … 59 60 60 61 // SVGExternalResourcesRequired 61 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)62 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 62 63 }; 63 64 -
trunk/WebCore/svg/SVGImageElement.cpp
r73130 r73254 43 43 DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::widthAttr, Width, width) 44 44 DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::heightAttr, Height, height) 45 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGImageElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 45 46 DEFINE_ANIMATED_STRING(SVGImageElement, XLinkNames::hrefAttr, Href, href) 47 DEFINE_ANIMATED_BOOLEAN(SVGImageElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 46 48 47 49 inline SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGImageElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPr opertyMacros.h"27 #include "SVGAnimatedPreserveAspectRatio.h" 27 28 #include "SVGExternalResourcesRequired.h" 28 29 #include "SVGLangSpace.h" … … 31 32 #include "SVGTests.h" 32 33 #include "SVGURIReference.h" 33 #include "SVGPreserveAspectRatio.h"34 34 35 35 namespace WebCore { … … 70 70 DECLARE_ANIMATED_LENGTH(Width, width) 71 71 DECLARE_ANIMATED_LENGTH(Height, height) 72 DECLARE_ANIMATED_PR OPERTY_NEW(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)72 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 73 73 74 74 // SVGURIReference … … 76 76 77 77 // SVGExternalResourcesRequired 78 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)78 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 79 79 80 80 SVGImageLoader m_imageLoader; -
trunk/WebCore/svg/SVGLineElement.cpp
r73016 r73254 38 38 DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::x2Attr, X2, x2) 39 39 DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::y2Attr, Y2, y2) 40 DEFINE_ANIMATED_BOOLEAN(SVGLineElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 40 41 41 42 inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGLineElement.h
r73016 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" … … 61 61 62 62 // SVGExternalResourcesRequired 63 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)63 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 64 64 }; 65 65 -
trunk/WebCore/svg/SVGLinearGradientElement.h
r73016 r73254 24 24 #if ENABLE(SVG) 25 25 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 26 #include "SVGGradientElement.h" 28 27 -
trunk/WebCore/svg/SVGMPathElement.cpp
r73130 r73254 30 30 // Animated property definitions 31 31 DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href) 32 DEFINE_ANIMATED_BOOLEAN(SVGMPathElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 32 33 33 34 inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGMPathElement.h
r73130 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include "SVGAnimatedBoolean.h" 24 25 #include "SVGAnimatedString.h" 25 26 #include "SVGExternalResourcesRequired.h" … … 50 51 51 52 // SVGExternalResourcesRequired 52 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGMPathElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)53 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 53 54 }; 54 55 -
trunk/WebCore/svg/SVGMarkerElement.cpp
r73130 r73254 26 26 27 27 #include "Attribute.h" 28 #include "PlatformString.h"29 28 #include "RenderSVGResourceMarker.h" 30 29 #include "SVGFitToViewBox.h" 31 #include "SVGLength.h"32 30 #include "SVGNames.h" 33 #include "SVGPreserveAspectRatio.h"34 31 #include "SVGSVGElement.h" 35 32 … … 43 40 DEFINE_ANIMATED_ENUMERATION(SVGMarkerElement, SVGNames::markerUnitsAttr, MarkerUnits, markerUnits) 44 41 DEFINE_ANIMATED_ENUMERATION_MULTIPLE_WRAPPERS(SVGMarkerElement, SVGNames::orientAttr, orientTypeIdentifier(), OrientType, orientType) 45 42 DEFINE_ANIMATED_ANGLE_MULTIPLE_WRAPPERS(SVGMarkerElement, SVGNames::orientAttr, orientAngleIdentifier(), OrientAngle, orientAngle) 43 DEFINE_ANIMATED_BOOLEAN(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 44 DEFINE_ANIMATED_RECT(SVGMarkerElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 45 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 46 46 47 inline SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document) 47 48 : SVGStyledElement(tagName, document) -
trunk/WebCore/svg/SVGMarkerElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include " RenderObject.h"26 #include "SVGAn gle.h"25 #include "SVGAnimatedAngle.h" 26 #include "SVGAnimatedBoolean.h" 27 27 #include "SVGAnimatedEnumeration.h" 28 28 #include "SVGAnimatedLength.h" 29 #include "SVGAnimatedPreserveAspectRatio.h" 30 #include "SVGAnimatedRect.h" 29 31 #include "SVGExternalResourcesRequired.h" 30 32 #include "SVGFitToViewBox.h" 31 33 #include "SVGLangSpace.h" 32 #include "SVGPreserveAspectRatio.h"33 #include "SVGRect.h"34 34 #include "SVGStyledElement.h" 35 35 36 36 namespace WebCore { 37 38 class Document;39 37 40 38 class SVGMarkerElement : public SVGStyledElement, … … 86 84 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits) 87 85 DECLARE_ANIMATED_ENUMERATION(OrientType, orientType) 88 DECLARE_ANIMATED_ PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGMarkerElement, SVGNames::orientAttr, orientAngleIdentifier(), SVGAngle,OrientAngle, orientAngle)86 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) 89 87 90 88 // SVGExternalResourcesRequired 91 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)89 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 92 90 93 91 // SVGFitToViewBox 94 DECLARE_ANIMATED_ PROPERTY_NEW(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect,ViewBox, viewBox)95 DECLARE_ANIMATED_PR OPERTY_NEW(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)92 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 93 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 96 94 }; 97 95 -
trunk/WebCore/svg/SVGMaskElement.cpp
r73130 r73254 43 43 DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::widthAttr, Width, width) 44 44 DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::heightAttr, Height, height) 45 DEFINE_ANIMATED_BOOLEAN(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 45 46 46 47 inline SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGMaskElement.h
r73130 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include " RenderObject.h"24 #include "SVGAnimatedBoolean.h" 25 25 #include "SVGAnimatedEnumeration.h" 26 26 #include "SVGAnimatedLength.h" … … 65 65 66 66 // SVGExternalResourcesRequired 67 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)67 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 68 68 }; 69 69 -
trunk/WebCore/svg/SVGPathElement.cpp
r73024 r73254 47 47 // Animated property definitions 48 48 DEFINE_ANIMATED_NUMBER(SVGPathElement, SVGNames::pathLengthAttr, PathLength, pathLength) 49 DEFINE_ANIMATED_BOOLEAN(SVGPathElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 49 50 50 51 inline SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGPathElement.h
r73024 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedNumber.h" 26 27 #include "SVGAnimatedPathSegListPropertyTearOff.h" … … 110 111 111 112 // SVGExternalResourcesRequired 112 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)113 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 113 114 114 115 void synchronizeD(); -
trunk/WebCore/svg/SVGPatternElement.cpp
r73130 r73254 52 52 DEFINE_ANIMATED_TRANSFORM_LIST(SVGPatternElement, SVGNames::patternTransformAttr, PatternTransform, patternTransform) 53 53 DEFINE_ANIMATED_STRING(SVGPatternElement, XLinkNames::hrefAttr, Href, href) 54 DEFINE_ANIMATED_BOOLEAN(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 55 DEFINE_ANIMATED_RECT(SVGPatternElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 56 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGPatternElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 54 57 55 58 inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGPatternElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedEnumeration.h" 26 27 #include "SVGAnimatedLength.h" 28 #include "SVGAnimatedPreserveAspectRatio.h" 29 #include "SVGAnimatedRect.h" 27 30 #include "SVGAnimatedTransformList.h" 28 31 #include "SVGExternalResourcesRequired.h" 29 32 #include "SVGFitToViewBox.h" 30 33 #include "SVGLangSpace.h" 31 #include "SVGPreserveAspectRatio.h"32 #include "SVGRect.h"33 34 #include "SVGStyledElement.h" 34 35 #include "SVGTests.h" … … 78 79 79 80 // SVGExternalResourcesRequired 80 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)81 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 81 82 82 83 // SVGPatternElement 83 DECLARE_ANIMATED_ PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect,ViewBox, viewBox)84 DECLARE_ANIMATED_PR OPERTY_NEW(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)84 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 85 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 85 86 }; 86 87 -
trunk/WebCore/svg/SVGPolyElement.cpp
r72518 r73254 34 34 35 35 namespace WebCore { 36 37 // Animated property definitions 38 DEFINE_ANIMATED_BOOLEAN(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 36 39 37 40 SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGPolyElement.h
r71512 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimated PropertyMacros.h"25 #include "SVGAnimatedBoolean.h" 26 26 #include "SVGExternalResourcesRequired.h" 27 27 #include "SVGLangSpace.h" … … 55 55 56 56 // SVGExternalResourcesRequired 57 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)57 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 58 58 59 59 void synchronizePoints(); -
trunk/WebCore/svg/SVGRadialGradientElement.h
r73016 r73254 24 24 #if ENABLE(SVG) 25 25 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 26 #include "SVGGradientElement.h" 28 27 -
trunk/WebCore/svg/SVGRectElement.cpp
r73016 r73254 39 39 DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::rxAttr, Rx, rx) 40 40 DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::ryAttr, Ry, ry) 41 DEFINE_ANIMATED_BOOLEAN(SVGRectElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 41 42 42 43 inline SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGRectElement.h
r73016 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" … … 61 61 62 62 // SVGExternalResourcesRequired 63 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)63 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 64 64 }; 65 65 -
trunk/WebCore/svg/SVGSVGElement.cpp
r73016 r73254 54 54 namespace WebCore { 55 55 56 using namespace HTMLNames;57 using namespace SVGNames;58 59 56 // Animated property definitions 60 57 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::xAttr, X, x) … … 62 59 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::widthAttr, Width, width) 63 60 DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::heightAttr, Height, height) 61 DEFINE_ANIMATED_BOOLEAN(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 62 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSVGElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 63 DEFINE_ANIMATED_RECT(SVGSVGElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 64 64 65 65 inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc) … … 107 107 { 108 108 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/ecmascript")); 109 const AtomicString& n = getAttribute( contentScriptTypeAttr);109 const AtomicString& n = getAttribute(SVGNames::contentScriptTypeAttr); 110 110 return n.isNull() ? defaultValue : n; 111 111 } … … 119 119 { 120 120 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); 121 const AtomicString& n = getAttribute( contentStyleTypeAttr);121 const AtomicString& n = getAttribute(SVGNames::contentStyleTypeAttr); 122 122 return n.isNull() ? defaultValue : n; 123 123 } … … 247 247 248 248 // Only handle events if we're the outermost <svg> element 249 if (attr->name() == onunloadAttr)249 if (attr->name() == HTMLNames::onunloadAttr) 250 250 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attr)); 251 else if (attr->name() == onresizeAttr)251 else if (attr->name() == HTMLNames::onresizeAttr) 252 252 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attr)); 253 else if (attr->name() == onscrollAttr)253 else if (attr->name() == HTMLNames::onscrollAttr) 254 254 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attr)); 255 255 else if (attr->name() == SVGNames::onzoomAttr) … … 262 262 } 263 263 264 if (attr->name() == onabortAttr)264 if (attr->name() == HTMLNames::onabortAttr) 265 265 document()->setWindowAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(document()->frame(), attr)); 266 else if (attr->name() == onerrorAttr)266 else if (attr->name() == HTMLNames::onerrorAttr) 267 267 document()->setWindowAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(document()->frame(), attr)); 268 268 else if (attr->name() == SVGNames::xAttr) -
trunk/WebCore/svg/SVGSVGElement.h
r73016 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include " IntSize.h"25 #include "SVGAnimatedBoolean.h" 26 26 #include "SVGAnimatedLength.h" 27 #include "SVGAnimatedPropertyMacros.h" 27 #include "SVGAnimatedPreserveAspectRatio.h" 28 #include "SVGAnimatedRect.h" 28 29 #include "SVGExternalResourcesRequired.h" 29 30 #include "SVGFitToViewBox.h" 30 31 #include "SVGLangSpace.h" 31 #include "SVGPreserveAspectRatio.h"32 #include "SVGRect.h"33 32 #include "SVGStyledLocatableElement.h" 34 33 #include "SVGTests.h" … … 156 155 157 156 // SVGExternalResourcesRequired 158 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)157 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 159 158 160 159 // SVGFitToViewBox 161 DECLARE_ANIMATED_ PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect,ViewBox, viewBox)162 DECLARE_ANIMATED_PR OPERTY_NEW(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)160 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 161 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 163 162 164 163 virtual void documentWillBecomeInactive(); -
trunk/WebCore/svg/SVGScriptElement.cpp
r73130 r73254 34 34 // Animated property definitions 35 35 DEFINE_ANIMATED_STRING(SVGScriptElement, XLinkNames::hrefAttr, Href, href) 36 DEFINE_ANIMATED_BOOLEAN(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 36 37 37 38 inline SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* document, bool wasInsertedByParser, bool wasAlreadyStarted) -
trunk/WebCore/svg/SVGScriptElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedString.h" 26 27 #include "SVGElement.h" … … 78 79 79 80 // SVGExternalResourcesRequired 80 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)81 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 81 82 82 83 String m_type; -
trunk/WebCore/svg/SVGSwitchElement.cpp
r72518 r73254 20 20 21 21 #include "config.h" 22 22 23 #if ENABLE(SVG) 23 24 #include "SVGSwitchElement.h" … … 27 28 28 29 namespace WebCore { 30 31 // Animated property definitions 32 DEFINE_ANIMATED_BOOLEAN(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 29 33 30 34 inline SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGSwitchElement.h
r70857 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimated PropertyMacros.h"25 #include "SVGAnimatedBoolean.h" 26 26 #include "SVGExternalResourcesRequired.h" 27 27 #include "SVGLangSpace.h" … … 30 30 31 31 namespace WebCore { 32 class SVGSwitchElement : public SVGStyledTransformableElement,33 public SVGTests,34 public SVGLangSpace,35 public SVGExternalResourcesRequired {36 public:37 static PassRefPtr<SVGSwitchElement> create(const QualifiedName&, Document*);38 32 39 private: 40 SVGSwitchElement(const QualifiedName&, Document*); 41 42 virtual bool isValid() const { return SVGTests::isValid(); } 33 class SVGSwitchElement : public SVGStyledTransformableElement, 34 public SVGTests, 35 public SVGLangSpace, 36 public SVGExternalResourcesRequired { 37 public: 38 static PassRefPtr<SVGSwitchElement> create(const QualifiedName&, Document*); 43 39 44 virtual bool childShouldCreateRenderer(Node*) const; 40 private: 41 SVGSwitchElement(const QualifiedName&, Document*); 42 43 virtual bool isValid() const { return SVGTests::isValid(); } 45 44 46 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 47 virtual void synchronizeProperty(const QualifiedName&); 45 virtual bool childShouldCreateRenderer(Node*) const; 48 46 49 // SVGExternalResourcesRequired 50 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 51 }; 47 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 48 virtual void synchronizeProperty(const QualifiedName&); 49 50 // Animated property declarations 51 52 // SVGExternalResourcesRequired 53 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 54 }; 52 55 53 56 } // namespace WebCore -
trunk/WebCore/svg/SVGSymbolElement.cpp
r66498 r73254 20 20 21 21 #include "config.h" 22 22 23 #if ENABLE(SVG) 23 24 #include "SVGSymbolElement.h" 24 25 25 #include "PlatformString.h"26 26 #include "SVGFitToViewBox.h" 27 27 28 28 namespace WebCore { 29 30 // Animated property definitions 31 DEFINE_ANIMATED_BOOLEAN(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 32 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 33 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 29 34 30 35 inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGSymbolElement.h
r73011 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedPropertyMacros.h" 25 #include "SVGAnimatedBoolean.h" 26 #include "SVGAnimatedPreserveAspectRatio.h" 27 #include "SVGAnimatedRect.h" 26 28 #include "SVGExternalResourcesRequired.h" 27 29 #include "SVGFitToViewBox.h" 28 30 #include "SVGLangSpace.h" 29 #include "SVGPreserveAspectRatio.h"30 #include "SVGRect.h"31 31 #include "SVGStyledElement.h" 32 32 33 33 namespace WebCore { 34 34 35 36 37 38 39 40 35 class SVGSymbolElement : public SVGStyledElement, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired, 38 public SVGFitToViewBox { 39 public: 40 static PassRefPtr<SVGSymbolElement> create(const QualifiedName&, Document*); 41 41 42 43 42 private: 43 SVGSymbolElement(const QualifiedName&, Document*); 44 44 45 46 47 48 45 virtual void parseMappedAttribute(Attribute*); 46 virtual void svgAttributeChanged(const QualifiedName&); 47 virtual void synchronizeProperty(const QualifiedName&); 48 virtual bool rendererIsNeeded(RenderStyle*) { return false; } 49 49 50 50 virtual bool selfHasRelativeLengths() const; 51 51 52 // SVGExternalResourcesRequired 53 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 52 // Animated property declarations 53 54 // SVGExternalResourcesRequired 55 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 54 56 55 56 DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect,ViewBox, viewBox)57 DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)58 57 // SVGFitToViewBox 58 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 59 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 60 }; 59 61 60 62 } // namespace WebCore -
trunk/WebCore/svg/SVGTextContentElement.cpp
r73130 r73254 37 37 DEFINE_ANIMATED_LENGTH(SVGTextContentElement, SVGNames::textLengthAttr, TextLength, textLength) 38 38 DEFINE_ANIMATED_ENUMERATION(SVGTextContentElement, SVGNames::lengthAdjustAttr, LengthAdjust, lengthAdjust) 39 DEFINE_ANIMATED_BOOLEAN(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 39 40 40 41 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGTextContentElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedEnumeration.h" 26 27 #include "SVGAnimatedLength.h" … … 76 77 77 78 // SVGExternalResourcesRequired 78 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)79 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 79 80 }; 80 81 -
trunk/WebCore/svg/SVGUseElement.cpp
r73130 r73254 64 64 DEFINE_ANIMATED_LENGTH(SVGUseElement, SVGNames::heightAttr, Height, height) 65 65 DEFINE_ANIMATED_STRING(SVGUseElement, XLinkNames::hrefAttr, Href, href) 66 DEFINE_ANIMATED_BOOLEAN(SVGUseElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 66 67 67 68 inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGUseElement.h
r73130 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedBoolean.h" 25 26 #include "SVGAnimatedLength.h" 26 #include "SVGAnimatedPropertyMacros.h"27 27 #include "SVGExternalResourcesRequired.h" 28 28 #include "SVGLangSpace.h" … … 113 113 114 114 // SVGExternalResourcesRequired 115 DECLARE_ANIMATED_ STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool,ExternalResourcesRequired, externalResourcesRequired)115 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 116 116 117 117 bool m_updatesBlocked; -
trunk/WebCore/svg/SVGViewElement.cpp
r71227 r73254 24 24 #include "SVGViewElement.h" 25 25 26 #include "Attr.h" 27 #include "PlatformString.h" 26 #include "Attribute.h" 28 27 #include "SVGFitToViewBox.h" 29 28 #include "SVGNames.h" … … 32 31 33 32 namespace WebCore { 33 34 // Animated property definitions 35 DEFINE_ANIMATED_BOOLEAN(SVGViewElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) 36 DEFINE_ANIMATED_RECT(SVGViewElement, SVGNames::viewBoxAttr, ViewBox, viewBox) 37 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGViewElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 34 38 35 39 inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* document) -
trunk/WebCore/svg/SVGViewElement.h
r73011 r73254 23 23 24 24 #if ENABLE(SVG) 25 #include "SVGAnimatedPropertyMacros.h" 25 #include "SVGAnimatedBoolean.h" 26 #include "SVGAnimatedPreserveAspectRatio.h" 27 #include "SVGAnimatedRect.h" 26 28 #include "SVGExternalResourcesRequired.h" 27 29 #include "SVGFitToViewBox.h" 28 #include "SVGPreserveAspectRatio.h"29 #include "SVGRect.h"30 30 #include "SVGStringList.h" 31 31 #include "SVGStyledElement.h" … … 34 34 namespace WebCore { 35 35 36 37 38 39 40 41 36 class SVGViewElement : public SVGStyledElement, 37 public SVGExternalResourcesRequired, 38 public SVGFitToViewBox, 39 public SVGZoomAndPan { 40 public: 41 static PassRefPtr<SVGViewElement> create(const QualifiedName&, Document*); 42 42 43 43 SVGStringList& viewTarget() { return m_viewTarget; } 44 44 45 46 45 private: 46 SVGViewElement(const QualifiedName&, Document*); 47 47 48 49 48 virtual void parseMappedAttribute(Attribute*); 49 virtual void synchronizeProperty(const QualifiedName&); 50 50 51 51 virtual bool rendererIsNeeded(RenderStyle*) { return false; } 52 52 53 // SVGExternalResourcesRequired 54 DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 53 // Animated property declarations 54 55 // SVGExternalResourcesRequired 56 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 55 57 56 57 DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::viewBoxAttr, FloatRect,ViewBox, viewBox)58 DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio,PreserveAspectRatio, preserveAspectRatio)58 // SVGFitToViewBox 59 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 60 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 59 61 60 61 62 SVGStringList m_viewTarget; 63 }; 62 64 63 65 } // namespace WebCore -
trunk/WebCore/svg/SVGViewSpec.cpp
r72500 r73254 19 19 20 20 #include "config.h" 21 21 22 #if ENABLE(SVG) 22 23 #include "SVGViewSpec.h" 23 24 24 25 #include "Document.h" 25 #include "PlatformString.h"26 26 #include "SVGParserUtilities.h" 27 27 #include "SVGPreserveAspectRatio.h" 28 28 #include "SVGSVGElement.h" 29 #include "SVGTransformList.h"30 29 #include "SVGTransformable.h" 31 30 32 31 namespace WebCore { 32 33 // Animated property definitions 34 DEFINE_ANIMATED_RECT(SVGViewSpec, SVGNames::viewBoxAttr, ViewBox, viewBox) 35 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGViewSpec, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio) 33 36 34 37 SVGViewSpec::SVGViewSpec(SVGElement* contextElement) -
trunk/WebCore/svg/SVGViewSpec.h
r73011 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include "SVGAnimatedPr opertyMacros.h"25 #include "SVG Element.h"24 #include "SVGAnimatedPreserveAspectRatio.h" 25 #include "SVGAnimatedRect.h" 26 26 #include "SVGFitToViewBox.h" 27 #include "SVGPreserveAspectRatio.h" 28 #include "SVGRect.h" 27 #include "SVGTransformList.h" 29 28 #include "SVGZoomAndPan.h" 30 31 #include <wtf/RefPtr.h>32 29 33 30 namespace WebCore { 34 31 35 class SVGElement; 36 class SVGTransformList; 32 class SVGElement; 37 33 38 39 40 41 42 34 class SVGViewSpec : public SVGFitToViewBox, 35 public SVGZoomAndPan, 36 public Noncopyable { 37 public: 38 SVGViewSpec(SVGElement*); 43 39 44 40 bool parseViewSpec(const String&); 45 41 46 47 42 void setTransform(const String&); 43 SVGTransformList transform() const { return m_transform; } 48 44 49 45 void setViewBoxString(const String&); 50 46 51 47 void setPreserveAspectRatioString(const String&); 52 48 53 54 55 49 void setViewTargetString(const String&); 50 String viewTargetString() const { return m_viewTargetString; } 51 SVGElement* viewTarget() const; 56 52 57 53 SVGElement* contextElement() const { return const_cast<SVGElement*>(m_contextElement); } 58 54 59 60 55 private: 56 SVGElement* m_contextElement; 61 57 62 // SVGFitToViewBox 63 DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox) 64 DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 58 // Animated property declarations 65 59 66 SVGTransformList m_transform; 67 String m_viewTargetString; 68 }; 60 // SVGFitToViewBox 61 DECLARE_ANIMATED_RECT(ViewBox, viewBox) 62 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio) 63 64 SVGTransformList m_transform; 65 String m_viewTargetString; 66 }; 69 67 70 68 } // namespace WebCore -
trunk/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
r73020 r73254 24 24 25 25 #if ENABLE(SVG) 26 #include "SVGAnimatedListPropertyTearOff.h"27 #include "SVGAnimatedStaticPropertyTearOff.h"28 26 #include "SVGAnimatedPropertySynchronizer.h" 29 #include "SVGAnimatedPropertyTearOff.h"30 #include "SVGAnimatedTransformListPropertyTearOff.h"31 27 #include "SVGNames.h" // FIXME: Temporary hack, until we expand the macros in all files, so we don't need a global SVGNames.h include 32 28 #include "SVGPropertyTraits.h" 33 29 34 30 namespace WebCore { 35 36 class SVGElement;37 31 38 32 // GetOwnerElementForType implementation … … 70 64 }; 71 65 66 // SVGSynchronizableAnimatedProperty implementation 72 67 template<typename PropertyType> 73 68 struct SVGSynchronizableAnimatedProperty { … … 95 90 bool shouldSynchronize : 1; 96 91 }; 97 98 // FIXME: These macros should be removed, after the transition to the new SVGAnimatedProperty concept is finished.99 #define DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, TearOffType, PropertyType, UpperProperty, LowerProperty) \100 public: \101 PropertyType& LowerProperty() const \102 { \103 return m_##LowerProperty.value; \104 } \105 \106 PropertyType& LowerProperty##BaseValue() const \107 { \108 return m_##LowerProperty.value; \109 } \110 \111 void set##UpperProperty##BaseValue(const PropertyType& type) \112 { \113 m_##LowerProperty.value = type; \114 } \115 \116 void synchronize##UpperProperty() \117 { \118 if (!m_##LowerProperty.shouldSynchronize) \119 return; \120 AtomicString value(SVGPropertyTraits<PropertyType>::toString(LowerProperty##BaseValue())); \121 SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \122 SVGAnimatedPropertySynchronizer<IsDerivedFromSVGElement<OwnerType>::value>::synchronize(contextElement, DOMAttribute, value); \123 } \124 \125 PassRefPtr<TearOffType> LowerProperty##Animated() \126 { \127 m_##LowerProperty.shouldSynchronize = true; \128 SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \129 return SVGAnimatedProperty::lookupOrCreateWrapper<TearOffType, PropertyType>(contextElement, DOMAttribute, SVGDOMAttributeIdentifier, m_##LowerProperty.value); \130 } \131 private: \132 mutable SVGSynchronizableAnimatedProperty<PropertyType> m_##LowerProperty;133 134 #define DECLARE_ANIMATED_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \135 DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)136 137 #define DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS_NEW(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, PropertyType, UpperProperty, LowerProperty) \138 DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, SVGAnimatedPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)139 140 #define DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, PropertyType, UpperProperty, LowerProperty) \141 DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, SVGAnimatedStaticPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)142 143 #define DECLARE_ANIMATED_STATIC_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \144 DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedStaticPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)145 146 // FIXME: Remove all macros above, once these two below are deployed everywhere.147 92 148 93 #define DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, TearOffType, PropertyType, UpperProperty, LowerProperty) \ -
trunk/WebCore/svg/properties/SVGAnimatedPropertySynchronizer.h
r71227 r73254 22 22 23 23 #if ENABLE(SVG) 24 #include "SVGElement.h" 25 24 26 namespace WebCore { 25 27
Note: See TracChangeset
for help on using the changeset viewer.