[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zimmermann at webkit.org
zimmermann at webkit.org
Wed Dec 22 15:14:29 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 34a2d91f2ca4eb3ae310c92554c602bdaf273bb8
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 09:54:16 2010 +0000
2010-10-27 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convert SVGAnimatedBoolean to the new SVGAnimatedPropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=48469
Convert the next SVG animated primitive type to use the SVGAnimatedPropertyTearOff concept: SVGAnimatedBoolean.
Added new test verifying that StrictTypeChecking is enabled for SVGAnimatedBooleans. It also tests that this type is "static", see LayoutTests/ChangeLog for details.
Add support for StrictTypeChecking for boolean types.
Test: svg/dom/SVGExternalResourcesRequired.html
* GNUmakefile.am: Add SVGAnimatedBoolean.h and SVGAnimatedStaticPropertyTearOff.h to build.
* WebCore.gypi: Ditto.
* WebCore.pro: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/scripts/CodeGenerator.pm: Add SVGAnimatedBoolean to the new style svg animated bindings list.
* bindings/scripts/CodeGeneratorJS.pm: Add StrictTypeChecking support for boolean types.
* bindings/scripts/CodeGeneratorObjC.pm: Ditto. Only generate kit() usage for new style animated types, if the wrapped type needs a tear off.
* bindings/scripts/CodeGeneratorV8.pm: Ditto.
* svg/DeprecatedSVGAnimatedTemplate.h: Remove SVGAnimatedBoolean handling.
* svg/SVGAElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_STATIC_PROPERTY_NEW/ for boolean types everywhere. Include SVGAnimatedPropertyMacros.h where needed.
* svg/SVGAnimatedBoolean.h: Added.
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimationElement.h:
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.h:
* svg/SVGCursorElement.h:
* svg/SVGDefsElement.h:
* svg/SVGEllipseElement.h:
* svg/SVGExternalResourcesRequired.cpp:
* svg/SVGExternalResourcesRequired.h:
(WebCore::SVGExternalResourcesRequired::~SVGExternalResourcesRequired):
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEImageElement.h:
* svg/SVGFilterElement.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.h:
* svg/SVGGradientElement.h:
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.h:
* svg/SVGPathElement.h:
* svg/SVGPatternElement.h:
* svg/SVGPolyElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.h:
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.h:
* svg/SVGTextContentElement.h:
* svg/SVGUseElement.h:
* svg/SVGViewElement.h:
* svg/properties/SVGAnimatedListPropertyTearOff.h: Moved RefPtr<SVGProperty> m_baseVal/m_animVal from SVGAnimatedProperty, as SVGAnimatedStaticPropertyTearOff doesn't need them.
* svg/properties/SVGAnimatedProperty.h: Remove m_baseVal/m_animVal.
(WebCore::SVGAnimatedProperty::commitChange): New method to share code between the SVGAnimated*PropertyTearOff classes.
* svg/properties/SVGAnimatedPropertyMacros.h: Add new DECLARE_ANIMATED_STATIC_PROPERTY_NEW macro which creates SVGAnimatedStaticPropertyTearOff types.
* svg/properties/SVGAnimatedPropertyTearOff.h: Moved RefPtr<SVGProperty> m_baseVal/m_animVal from SVGAnimatedProperty, as SVGAnimatedStaticPropertyTearOff doesn't need them.
* svg/properties/SVGAnimatedStaticPropertyTearOff.h: Added.
(WebCore::SVGAnimatedStaticPropertyTearOff::baseVal): Directly returns the stored m_property as reference, no tear off is created.
(WebCore::SVGAnimatedStaticPropertyTearOff::animVal): Ditto.
(WebCore::SVGAnimatedStaticPropertyTearOff::setBaseVal): Directly updates the stored m_property reference, and invalidates the SVG attributes.
(WebCore::SVGAnimatedStaticPropertyTearOff::setAnimVal): Not implemented.
(WebCore::SVGAnimatedStaticPropertyTearOff::create):
(WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
* svg/properties/SVGListPropertyTearOff.h:
(WebCore::SVGListPropertyTearOff::commitChange): Share code, use SVGAnimatedProperty::commitChange.
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::commitChange): Ditto.
2010-10-27 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convert SVGAnimatedBoolean to the new SVGAnimatedPropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=48469
Add simple test that SVGAnimatedBooleans aren't creating tear off when accessing baseVal/animVal.
For example with SVGLength you can do:
var foo = rect.x.baseVal; // SVGRectElement -> SVGAnimatedLength -> SVGLength
foo.value = 50; // affects the SVGRectElement
For SVGExternalResourcesRequired (one of the two SVGAnimatedBoolean types), this is not possible, as baseVal returns a POD type (boolean).
var bar = rect.externalResourcesRequired.baseVal; // bar is a boolean
bar = false; // does NOT effect the rect.externalResourcesRequired object
* svg/dom/SVGExternalResourcesRequired-expected.txt: Added.
* svg/dom/SVGExternalResourcesRequired.html: Added.
* svg/dom/script-tests/SVGExternalResourcesRequired.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 25fd79f..c2e570f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-27 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Convert SVGAnimatedBoolean to the new SVGAnimatedPropertyTearOff concept
+ https://bugs.webkit.org/show_bug.cgi?id=48469
+
+ Add simple test that SVGAnimatedBooleans aren't creating tear off when accessing baseVal/animVal.
+ For example with SVGLength you can do:
+ var foo = rect.x.baseVal; // SVGRectElement -> SVGAnimatedLength -> SVGLength
+ foo.value = 50; // affects the SVGRectElement
+
+ For SVGExternalResourcesRequired (one of the two SVGAnimatedBoolean types), this is not possible, as baseVal returns a POD type (boolean).
+ var bar = rect.externalResourcesRequired.baseVal; // bar is a boolean
+ bar = false; // does NOT effect the rect.externalResourcesRequired object
+
+ * svg/dom/SVGExternalResourcesRequired-expected.txt: Added.
+ * svg/dom/SVGExternalResourcesRequired.html: Added.
+ * svg/dom/script-tests/SVGExternalResourcesRequired.js: Added.
+
2010-10-28 MORITA Hajime <morrita at google.com>
Reviewed by Kent Tamura.
diff --git a/LayoutTests/svg/dom/SVGExternalResourcesRequired-expected.txt b/LayoutTests/svg/dom/SVGExternalResourcesRequired-expected.txt
new file mode 100644
index 0000000..844e7cd
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGExternalResourcesRequired-expected.txt
@@ -0,0 +1,34 @@
+This test checks the SVGExternalResourcesRequired API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial SVGExternalResourcesRequired value
+PASS rectElement.externalResourcesRequired.baseVal is false
+
+Set value to true
+PASS rectElement.externalResourcesRequired.baseVal = true is true
+
+Caching baseVal in local variable
+PASS baseVal is true
+
+Modify local baseVal variable to true
+PASS baseVal = false is false
+
+Assure that rectElement.externalResourcesRequired has not been changed, but the local baseVal variable
+PASS baseVal is false
+PASS rectElement.externalResourcesRequired.baseVal is true
+
+Check assigning invalid values
+PASS rectElement.externalResourcesRequired.baseVal = rectElement.externalResourcesRequired threw exception TypeError: Type error.
+PASS rectElement.externalResourcesRequired.baseVal = null is null
+PASS rectElement.externalResourcesRequired.baseVal = 'aString' threw exception TypeError: Type error.
+PASS rectElement.externalResourcesRequired.baseVal = rectElement threw exception TypeError: Type error.
+
+Check that the value is now false
+PASS rectElement.externalResourcesRequired.baseVal is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGExternalResourcesRequired.html b/LayoutTests/svg/dom/SVGExternalResourcesRequired.html
new file mode 100644
index 0000000..610acd7
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGExternalResourcesRequired.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGExternalResourcesRequired.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/SVGScriptElement/resources/script-load4.js b/LayoutTests/svg/dom/SVGScriptElement/resources/script-load4.js
index c5ba54b..ac77f2e 100644
--- a/LayoutTests/svg/dom/SVGScriptElement/resources/script-load4.js
+++ b/LayoutTests/svg/dom/SVGScriptElement/resources/script-load4.js
@@ -1 +1,2 @@
+alert('i am 4');
resourceLoaded = true;
diff --git a/LayoutTests/svg/dom/script-tests/SVGExternalResourcesRequired.js b/LayoutTests/svg/dom/script-tests/SVGExternalResourcesRequired.js
new file mode 100644
index 0000000..cafb775
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/SVGExternalResourcesRequired.js
@@ -0,0 +1,37 @@
+description("This test checks the SVGExternalResourcesRequired API");
+
+var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+debug("");
+debug("Check initial SVGExternalResourcesRequired value");
+shouldBe("rectElement.externalResourcesRequired.baseVal", "false");
+
+debug("");
+debug("Set value to true");
+shouldBe("rectElement.externalResourcesRequired.baseVal = true", "true");
+
+debug("");
+debug("Caching baseVal in local variable");
+var baseVal = rectElement.externalResourcesRequired.baseVal;
+shouldBe("baseVal", "true");
+
+debug("");
+debug("Modify local baseVal variable to true");
+shouldBeFalse("baseVal = false");
+
+debug("");
+debug("Assure that rectElement.externalResourcesRequired has not been changed, but the local baseVal variable");
+shouldBe("baseVal", "false");
+shouldBe("rectElement.externalResourcesRequired.baseVal", "true");
+
+debug("");
+debug("Check assigning invalid values");
+shouldThrow("rectElement.externalResourcesRequired.baseVal = rectElement.externalResourcesRequired");
+shouldBeNull("rectElement.externalResourcesRequired.baseVal = null");
+shouldThrow("rectElement.externalResourcesRequired.baseVal = 'aString'");
+shouldThrow("rectElement.externalResourcesRequired.baseVal = rectElement");
+
+debug("");
+debug("Check that the value is now false");
+shouldBe("rectElement.externalResourcesRequired.baseVal", "false");
+
+successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0ba2be4..d90122d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,79 @@
+2010-10-27 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Convert SVGAnimatedBoolean to the new SVGAnimatedPropertyTearOff concept
+ https://bugs.webkit.org/show_bug.cgi?id=48469
+
+ Convert the next SVG animated primitive type to use the SVGAnimatedPropertyTearOff concept: SVGAnimatedBoolean.
+ Added new test verifying that StrictTypeChecking is enabled for SVGAnimatedBooleans. It also tests that this type is "static", see LayoutTests/ChangeLog for details.
+
+ Add support for StrictTypeChecking for boolean types.
+
+ Test: svg/dom/SVGExternalResourcesRequired.html
+
+ * GNUmakefile.am: Add SVGAnimatedBoolean.h and SVGAnimatedStaticPropertyTearOff.h to build.
+ * WebCore.gypi: Ditto.
+ * WebCore.pro: Ditto.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/scripts/CodeGenerator.pm: Add SVGAnimatedBoolean to the new style svg animated bindings list.
+ * bindings/scripts/CodeGeneratorJS.pm: Add StrictTypeChecking support for boolean types.
+ * bindings/scripts/CodeGeneratorObjC.pm: Ditto. Only generate kit() usage for new style animated types, if the wrapped type needs a tear off.
+ * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+ * svg/DeprecatedSVGAnimatedTemplate.h: Remove SVGAnimatedBoolean handling.
+ * svg/SVGAElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_STATIC_PROPERTY_NEW/ for boolean types everywhere. Include SVGAnimatedPropertyMacros.h where needed.
+ * svg/SVGAnimatedBoolean.h: Added.
+ * svg/SVGAnimatedBoolean.idl:
+ * svg/SVGAnimationElement.h:
+ * svg/SVGCircleElement.h:
+ * svg/SVGClipPathElement.h:
+ * svg/SVGCursorElement.h:
+ * svg/SVGDefsElement.h:
+ * svg/SVGEllipseElement.h:
+ * svg/SVGExternalResourcesRequired.cpp:
+ * svg/SVGExternalResourcesRequired.h:
+ (WebCore::SVGExternalResourcesRequired::~SVGExternalResourcesRequired):
+ * svg/SVGFEConvolveMatrixElement.h:
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFilterElement.h:
+ * svg/SVGFontElement.h:
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGElement.h:
+ * svg/SVGGradientElement.h:
+ * svg/SVGImageElement.h:
+ * svg/SVGLineElement.h:
+ * svg/SVGMPathElement.h:
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.h:
+ * svg/SVGPathElement.h:
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolyElement.h:
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.h:
+ * svg/SVGSwitchElement.h:
+ * svg/SVGSymbolElement.h:
+ * svg/SVGTextContentElement.h:
+ * svg/SVGUseElement.h:
+ * svg/SVGViewElement.h:
+ * svg/properties/SVGAnimatedListPropertyTearOff.h: Moved RefPtr<SVGProperty> m_baseVal/m_animVal from SVGAnimatedProperty, as SVGAnimatedStaticPropertyTearOff doesn't need them.
+ * svg/properties/SVGAnimatedProperty.h: Remove m_baseVal/m_animVal.
+ (WebCore::SVGAnimatedProperty::commitChange): New method to share code between the SVGAnimated*PropertyTearOff classes.
+ * svg/properties/SVGAnimatedPropertyMacros.h: Add new DECLARE_ANIMATED_STATIC_PROPERTY_NEW macro which creates SVGAnimatedStaticPropertyTearOff types.
+ * svg/properties/SVGAnimatedPropertyTearOff.h: Moved RefPtr<SVGProperty> m_baseVal/m_animVal from SVGAnimatedProperty, as SVGAnimatedStaticPropertyTearOff doesn't need them.
+ * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Added.
+ (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal): Directly returns the stored m_property as reference, no tear off is created.
+ (WebCore::SVGAnimatedStaticPropertyTearOff::animVal): Ditto.
+ (WebCore::SVGAnimatedStaticPropertyTearOff::setBaseVal): Directly updates the stored m_property reference, and invalidates the SVG attributes.
+ (WebCore::SVGAnimatedStaticPropertyTearOff::setAnimVal): Not implemented.
+ (WebCore::SVGAnimatedStaticPropertyTearOff::create):
+ (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
+ * svg/properties/SVGListPropertyTearOff.h:
+ (WebCore::SVGListPropertyTearOff::commitChange): Share code, use SVGAnimatedProperty::commitChange.
+ * svg/properties/SVGPropertyTearOff.h:
+ (WebCore::SVGPropertyTearOff::commitChange): Ditto.
+
2010-10-28 MORITA Hajime <morrita at google.com>
Reviewed by Kent Tamura.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 4e59a0f..f206a88 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3030,6 +3030,7 @@ webcore_sources += \
WebCore/svg/properties/SVGAnimatedPropertyMacros.h \
WebCore/svg/properties/SVGAnimatedPropertySynchronizer.h \
WebCore/svg/properties/SVGAnimatedPropertyTearOff.h \
+ WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h \
WebCore/svg/properties/SVGListPropertyTearOff.h \
WebCore/svg/properties/SVGProperty.h \
WebCore/svg/properties/SVGPropertyTearOff.h \
@@ -3044,6 +3045,7 @@ webcore_sources += \
WebCore/svg/SVGAnimateColorElement.cpp \
WebCore/svg/SVGAnimateColorElement.h \
WebCore/svg/SVGAnimatedAngle.h \
+ WebCore/svg/SVGAnimatedBoolean.h \
WebCore/svg/SVGAnimatedLength.h \
WebCore/svg/SVGAnimatedLengthList.h \
WebCore/svg/SVGAnimatedPathData.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 81e69f0..40a3aa8 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3947,6 +3947,7 @@
'svg/properties/SVGAnimatedPropertyMacros.h',
'svg/properties/SVGAnimatedPropertySynchronizer.h',
'svg/properties/SVGAnimatedPropertyTearOff.h',
+ 'svg/properties/SVGAnimatedStaticPropertyTearOff.h',
'svg/properties/SVGListPropertyTearOff.h',
'svg/properties/SVGProperty.h',
'svg/properties/SVGPropertyTearOff.h',
@@ -3977,6 +3978,7 @@
'svg/SVGAnimateTransformElement.cpp',
'svg/SVGAnimateTransformElement.h',
'svg/SVGAnimatedAngle.h',
+ 'svg/SVGAnimatedBoolean.h',
'svg/SVGAnimatedLength.h',
'svg/SVGAnimatedLengthList.h',
'svg/SVGAnimatedPathData.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index d517974..05422e4 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2358,6 +2358,7 @@ HEADERS += \
svg/properties/SVGAnimatedPropertyMacros.h \
svg/properties/SVGAnimatedPropertySynchronizer.h \
svg/properties/SVGAnimatedPropertyTearOff.h \
+ svg/properties/SVGAnimatedStaticPropertyTearOff.h \
svg/properties/SVGListPropertyTearOff.h \
svg/properties/SVGProperty.h \
svg/properties/SVGPropertyTearOff.h \
@@ -2367,6 +2368,7 @@ HEADERS += \
svg/SVGAngle.h \
svg/SVGAnimateColorElement.h \
svg/SVGAnimatedAngle.h \
+ svg/SVGAnimatedBoolean.h \
svg/SVGAnimatedLength.h \
svg/SVGAnimatedLengthList.h \
svg/SVGAnimatedPathData.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index ba8af5f..dcd9f30 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -61612,6 +61612,10 @@
>
</File>
<File
+ RelativePath="..\svg\SVGAnimatedBoolean.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGAnimatedLength.h"
>
</File>
@@ -62675,6 +62679,10 @@
>
</File>
<File
+ RelativePath="..\svg\properties\SVGAnimatedStaticPropertyTearOff.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\properties\SVGListPropertyTearOff.h"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 44f1652..a4fc994 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -114,6 +114,7 @@
084D0E3F11F5816100081E1A /* SVGResourcesCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 084D0E3B11F5816100081E1A /* SVGResourcesCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
084DBAA10ED39D360038C226 /* WMLVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 084DBA9D0ED39D350038C226 /* WMLVariables.cpp */; };
084DBAA20ED39D360038C226 /* WMLVariables.h in Headers */ = {isa = PBXBuildFile; fileRef = 084DBA9E0ED39D360038C226 /* WMLVariables.h */; };
+ 08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
0854B0141255E4E600B9CDD0 /* RenderSVGInline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0854B0021255E4E600B9CDD0 /* RenderSVGInline.cpp */; };
0854B0151255E4E600B9CDD0 /* RenderSVGInline.h in Headers */ = {isa = PBXBuildFile; fileRef = 0854B0031255E4E600B9CDD0 /* RenderSVGInline.h */; };
0854B0161255E4E600B9CDD0 /* RenderSVGInlineText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0854B0041255E4E600B9CDD0 /* RenderSVGInlineText.cpp */; };
@@ -135,6 +136,7 @@
08563BB4117861780012B578 /* RenderSVGResourcePattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08563BB2117861770012B578 /* RenderSVGResourcePattern.cpp */; };
08563BB5117861780012B578 /* RenderSVGResourcePattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 08563BB3117861770012B578 /* RenderSVGResourcePattern.h */; };
08563BD0117865F50012B578 /* RenderSVGResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08563BCF117865F50012B578 /* RenderSVGResource.cpp */; };
+ 085797091278394C00A8EC5F /* SVGAnimatedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = 085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */; settings = {ATTRIBUTES = (Private, ); }; };
08591AA50F085C4E009BACB1 /* InputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08591AA40F085C4E009BACB1 /* InputElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
085AFDC80F2977350061F2B3 /* WMLFormControlElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */; };
085AFDC90F2977350061F2B3 /* WMLFormControlElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */; settings = {ATTRIBUTES = (); }; };
@@ -6130,6 +6132,7 @@
084D0E3B11F5816100081E1A /* SVGResourcesCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGResourcesCache.h; sourceTree = "<group>"; };
084DBA9D0ED39D350038C226 /* WMLVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLVariables.cpp; sourceTree = "<group>"; };
084DBA9E0ED39D360038C226 /* WMLVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLVariables.h; sourceTree = "<group>"; };
+ 08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedStaticPropertyTearOff.h; sourceTree = "<group>"; };
0854B0021255E4E600B9CDD0 /* RenderSVGInline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGInline.cpp; sourceTree = "<group>"; };
0854B0031255E4E600B9CDD0 /* RenderSVGInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGInline.h; sourceTree = "<group>"; };
0854B0041255E4E600B9CDD0 /* RenderSVGInlineText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGInlineText.cpp; sourceTree = "<group>"; };
@@ -6151,6 +6154,7 @@
08563BB2117861770012B578 /* RenderSVGResourcePattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourcePattern.cpp; sourceTree = "<group>"; };
08563BB3117861770012B578 /* RenderSVGResourcePattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourcePattern.h; sourceTree = "<group>"; };
08563BCF117865F50012B578 /* RenderSVGResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResource.cpp; sourceTree = "<group>"; };
+ 085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedBoolean.h; sourceTree = "<group>"; };
08591AA40F085C4E009BACB1 /* InputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputElement.h; sourceTree = "<group>"; };
085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLFormControlElement.cpp; sourceTree = "<group>"; };
085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLFormControlElement.h; sourceTree = "<group>"; };
@@ -11734,6 +11738,7 @@
088A0DFE126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h */,
081CDFBE126ECFE800D215CA /* SVGAnimatedPropertySynchronizer.h */,
088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
+ 08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */,
088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
088A0E01126EF1DB00978F7A /* SVGProperty.h */,
088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
@@ -15994,6 +15999,7 @@
B22277E50D00BF1F0071B782 /* SVGAnimateColorElement.idl */,
087B84951272CEC700A14417 /* SVGAnimatedAngle.h */,
B22277E60D00BF1F0071B782 /* SVGAnimatedAngle.idl */,
+ 085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */,
B22277E70D00BF1F0071B782 /* SVGAnimatedBoolean.idl */,
B22277E80D00BF1F0071B782 /* SVGAnimatedEnumeration.idl */,
B22277E90D00BF1F0071B782 /* SVGAnimatedInteger.idl */,
@@ -21213,6 +21219,8 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
+ 085797091278394C00A8EC5F /* SVGAnimatedBoolean.h in Headers */,
+ 08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index bffdd23..92fea87 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -56,7 +56,7 @@ my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
-my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1, "SVGAnimatedRect" => 1);
+my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1, "SVGAnimatedRect" => 1);
my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
"SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 3ec61a4..baf96f8 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1803,6 +1803,11 @@ sub GenerateImplementation
push(@implContent, " throwVMTypeError(exec);\n");
push(@implContent, " return;\n");
push(@implContent, " };\n");
+ } elsif ($argType eq "boolean") {
+ push(@implContent, " if (!value.isUndefinedOrNull() && !value.isBoolean()) {\n");
+ push(@implContent, " throwVMTypeError(exec);\n");
+ push(@implContent, " return;\n");
+ push(@implContent, " };\n");
}
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index c3373e4..51992ed 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -1289,7 +1289,7 @@ sub GenerateImplementation
$getterContentTail .= ")";
} elsif ($svgPropertyType) {
$getterContentHead = "IMPL->propertyReference().$getterContentHead";
- } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+ } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType);
$idlTypeWithNamespace =~ s/</\<WebCore::/;
$getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)";
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index cb4ca43..78992d1 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -919,7 +919,7 @@ END
}
}
- if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+ if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($attrType)) {
$implIncludes{"V8$attrType.h"} = 1;
my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
# Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
@@ -975,6 +975,11 @@ sub GenerateNormalAttrSetter
push(@implContentDecls, " V8Proxy::throwTypeError();\n");
push(@implContentDecls, " return;\n");
push(@implContentDecls, " }\n");
+ } elsif ($argType eq "boolean") {
+ push(@implContentDecls, " if (!isUndefinedOrNull(value) && !value->IsBoolean()) {\n");
+ push(@implContentDecls, " V8Proxy::throwTypeError();\n");
+ push(@implContentDecls, " return;\n");
+ push(@implContentDecls, " }\n");
}
}
diff --git a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
index 99abca7..3a98c2e 100644
--- a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
+++ b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
@@ -154,7 +154,6 @@ namespace WebCore {
}
// Common type definitions, to ease IDL generation.
- typedef DeprecatedSVGAnimatedTemplate<bool> SVGAnimatedBoolean;
typedef DeprecatedSVGAnimatedTemplate<int> SVGAnimatedEnumeration;
typedef DeprecatedSVGAnimatedTemplate<long> SVGAnimatedInteger;
typedef DeprecatedSVGAnimatedTemplate<float> SVGAnimatedNumber;
diff --git a/WebCore/svg/SVGAElement.h b/WebCore/svg/SVGAElement.h
index b43f192..0effda2 100644
--- a/WebCore/svg/SVGAElement.h
+++ b/WebCore/svg/SVGAElement.h
@@ -23,7 +23,7 @@
#define SVGAElement_h
#if ENABLE(SVG)
-
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -68,7 +68,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGAElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAnimatedBoolean.h b/WebCore/svg/SVGAnimatedBoolean.h
new file mode 100644
index 0000000..b316e21
--- /dev/null
+++ b/WebCore/svg/SVGAnimatedBoolean.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SVGAnimatedBoolean_h
+#define SVGAnimatedBoolean_h
+
+#if ENABLE(SVG)
+#include "SVGAnimatedStaticPropertyTearOff.h"
+
+namespace WebCore {
+
+typedef SVGAnimatedStaticPropertyTearOff<bool> SVGAnimatedBoolean;
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/svg/SVGAnimatedBoolean.idl b/WebCore/svg/SVGAnimatedBoolean.idl
index e4b831e..2591c50 100644
--- a/WebCore/svg/SVGAnimatedBoolean.idl
+++ b/WebCore/svg/SVGAnimatedBoolean.idl
@@ -26,9 +26,8 @@
module svg {
interface [Conditional=SVG] SVGAnimatedBoolean {
- attribute boolean baseVal
- /*setter raises(DOMException)*/;
- readonly attribute boolean animVal;
+ attribute [StrictTypeChecking] boolean baseVal;
+ readonly attribute [StrictTypeChecking] boolean animVal;
};
}
diff --git a/WebCore/svg/SVGAnimationElement.h b/WebCore/svg/SVGAnimationElement.h
index da48dd6..2e11fe6 100644
--- a/WebCore/svg/SVGAnimationElement.h
+++ b/WebCore/svg/SVGAnimationElement.h
@@ -24,10 +24,10 @@
#ifndef SVGAnimationElement_h
#define SVGAnimationElement_h
#if ENABLE(SVG_ANIMATION)
-
#include "ElementTimeControl.h"
#include "Path.h"
#include "SMILTime.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGSMILElement.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGStringList.h"
@@ -106,7 +106,7 @@ namespace WebCore {
float calculatePercentForSpline(float percent, unsigned splineIndex) const;
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
bool m_animationValid;
diff --git a/WebCore/svg/SVGCircleElement.h b/WebCore/svg/SVGCircleElement.h
index 1e80ab6..5c3a62f 100644
--- a/WebCore/svg/SVGCircleElement.h
+++ b/WebCore/svg/SVGCircleElement.h
@@ -56,7 +56,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGCircleElement, SVGNames::rAttr, SVGLength, R, r)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGClipPathElement.h b/WebCore/svg/SVGClipPathElement.h
index 7d8ada2..2f9e77c 100644
--- a/WebCore/svg/SVGClipPathElement.h
+++ b/WebCore/svg/SVGClipPathElement.h
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "RenderObject.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -53,7 +54,7 @@ private:
DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
}
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index c52e7f1..e09739a 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -61,7 +61,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
HashSet<SVGElement*> m_clients;
};
diff --git a/WebCore/svg/SVGDefsElement.h b/WebCore/svg/SVGDefsElement.h
index 4a60bb5..ecf2d69 100644
--- a/WebCore/svg/SVGDefsElement.h
+++ b/WebCore/svg/SVGDefsElement.h
@@ -22,6 +22,7 @@
#define SVGDefsElement_h
#if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -45,7 +46,7 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGEllipseElement.h b/WebCore/svg/SVGEllipseElement.h
index 1d72f75..3bd7a50 100644
--- a/WebCore/svg/SVGEllipseElement.h
+++ b/WebCore/svg/SVGEllipseElement.h
@@ -57,7 +57,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGEllipseElement, SVGNames::ryAttr, SVGLength, Ry, ry)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGExternalResourcesRequired.cpp b/WebCore/svg/SVGExternalResourcesRequired.cpp
index c976b0f..beae203 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.cpp
+++ b/WebCore/svg/SVGExternalResourcesRequired.cpp
@@ -24,6 +24,7 @@
#include "SVGExternalResourcesRequired.h"
#include "Attr.h"
+#include "SVGNames.h"
namespace WebCore {
diff --git a/WebCore/svg/SVGExternalResourcesRequired.h b/WebCore/svg/SVGExternalResourcesRequired.h
index 5f0d8e9..7a37267 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.h
+++ b/WebCore/svg/SVGExternalResourcesRequired.h
@@ -22,28 +22,26 @@
#define SVGExternalResourcesRequired_h
#if ENABLE(SVG)
-#include "SVGElement.h"
-#include "SVGNames.h"
-
namespace WebCore {
- class Attribute;
+class Attribute;
+class QualifiedName;
- // Notes on a SVG 1.1 spec discrepancy:
- // The SVG DOM defines the attribute externalResourcesRequired as being of type SVGAnimatedBoolean, whereas the
- // SVG language definition says that externalResourcesRequired is not animated. Because the SVG language definition
- // states that externalResourcesRequired cannot be animated, the animVal will always be the same as the baseVal.
- // FIXME: When implementing animVal support, make sure that animVal==baseVal for externalResourcesRequired
- class SVGExternalResourcesRequired {
- public:
- virtual ~SVGExternalResourcesRequired() { }
+// Notes on a SVG 1.1 spec discrepancy:
+// The SVG DOM defines the attribute externalResourcesRequired as being of type SVGAnimatedBoolean, whereas the
+// SVG language definition says that externalResourcesRequired is not animated. Because the SVG language definition
+// states that externalResourcesRequired cannot be animated, the animVal will always be the same as the baseVal.
+// FIXME: When implementing animVal support, make sure that animVal==baseVal for externalResourcesRequired
+class SVGExternalResourcesRequired {
+public:
+ virtual ~SVGExternalResourcesRequired() { }
- bool parseMappedAttribute(Attribute*);
- bool isKnownAttribute(const QualifiedName&);
+ bool parseMappedAttribute(Attribute*);
+ bool isKnownAttribute(const QualifiedName&);
- protected:
- virtual void setExternalResourcesRequiredBaseValue(DeprecatedSVGAnimatedPropertyTraits<bool>::PassType) = 0;
- };
+protected:
+ virtual void setExternalResourcesRequiredBaseValue(const bool&) = 0;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.h b/WebCore/svg/SVGFEConvolveMatrixElement.h
index 5c4e8c4..72a96ff 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.h
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.h
@@ -52,7 +52,7 @@ private:
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::operatorAttr, int, EdgeMode, edgeMode)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthXIdentifier, float, KernelUnitLengthX, kernelUnitLengthX)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, SVGKernelUnitLengthYIdentifier, float, KernelUnitLengthY, kernelUnitLengthY)
- DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, bool, PreserveAlpha, preserveAlpha)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, bool, PreserveAlpha, preserveAlpha)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index b5fad48..901cb19 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -62,7 +62,7 @@ private:
DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
CachedResourceHandle<CachedImage> m_cachedImage;
OwnPtr<ImageBuffer> m_targetImage;
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index 57e5ff8..9a0d2f8 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -74,7 +74,7 @@ private:
DECLARE_ANIMATED_PROPERTY(SVGFilterElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
}
diff --git a/WebCore/svg/SVGFontElement.h b/WebCore/svg/SVGFontElement.h
index 98bf766..e81ac61 100644
--- a/WebCore/svg/SVGFontElement.h
+++ b/WebCore/svg/SVGFontElement.h
@@ -23,6 +23,7 @@
#define SVGFontElement_h
#if ENABLE(SVG_FONTS)
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGGlyphElement.h"
#include "SVGGlyphMap.h"
@@ -74,7 +75,7 @@ private:
void ensureGlyphCache() const;
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
mutable KerningPairVector m_horizontalKerningPairs;
mutable KerningPairVector m_verticalKerningPairs;
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index 872ed18..55ddb3c 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -61,7 +61,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGGElement.h b/WebCore/svg/SVGGElement.h
index b47eaba..b0003d1 100644
--- a/WebCore/svg/SVGGElement.h
+++ b/WebCore/svg/SVGGElement.h
@@ -22,6 +22,7 @@
#define SVGGElement_h
#if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -53,7 +54,7 @@ namespace WebCore {
virtual bool rendererIsNeeded(RenderStyle*);
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGGradientElement.h b/WebCore/svg/SVGGradientElement.h
index d1e7914..d6fbf8c 100644
--- a/WebCore/svg/SVGGradientElement.h
+++ b/WebCore/svg/SVGGradientElement.h
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "Gradient.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGStyledElement.h"
#include "SVGTransformList.h"
@@ -56,7 +57,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index ac93529..ee105d2 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -76,7 +76,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
SVGImageLoader m_imageLoader;
};
diff --git a/WebCore/svg/SVGLineElement.h b/WebCore/svg/SVGLineElement.h
index f10deb2..4e876e1 100644
--- a/WebCore/svg/SVGLineElement.h
+++ b/WebCore/svg/SVGLineElement.h
@@ -61,7 +61,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGLineElement, SVGNames::y2Attr, SVGLength, Y2, y2)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMPathElement.h b/WebCore/svg/SVGMPathElement.h
index 1bbe7d3..c025cf9 100644
--- a/WebCore/svg/SVGMPathElement.h
+++ b/WebCore/svg/SVGMPathElement.h
@@ -21,8 +21,9 @@
#define SVGMPathElement_h
#if ENABLE(SVG)
-#include "SVGURIReference.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
+#include "SVGURIReference.h"
namespace WebCore {
@@ -46,7 +47,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGMPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 12f52bd..5952b2b 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -85,7 +85,7 @@ private:
DECLARE_ANIMATED_PROPERTY_NEW_MULTIPLE_WRAPPERS(SVGMarkerElement, SVGNames::orientAttr, SVGOrientAngleAttrIdentifier, SVGAngle, OrientAngle, orientAngle)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h
index de77696..88bdf88 100644
--- a/WebCore/svg/SVGMaskElement.h
+++ b/WebCore/svg/SVGMaskElement.h
@@ -65,7 +65,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGMaskElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
}
diff --git a/WebCore/svg/SVGPathElement.h b/WebCore/svg/SVGPathElement.h
index 394983d..f4e2b8a 100644
--- a/WebCore/svg/SVGPathElement.h
+++ b/WebCore/svg/SVGPathElement.h
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "SVGAnimatedPathData.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -107,7 +108,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 7bcee75..6b4d367 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -76,7 +76,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGPatternElement
DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
diff --git a/WebCore/svg/SVGPolyElement.h b/WebCore/svg/SVGPolyElement.h
index 6d36f4b..64d4abb 100644
--- a/WebCore/svg/SVGPolyElement.h
+++ b/WebCore/svg/SVGPolyElement.h
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "SVGAnimatedPoints.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -52,7 +53,7 @@ namespace WebCore {
virtual bool supportsMarkers() const { return true; }
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
mutable RefPtr<SVGPointList> m_points;
};
diff --git a/WebCore/svg/SVGRectElement.h b/WebCore/svg/SVGRectElement.h
index ba448c5..8cc262f 100644
--- a/WebCore/svg/SVGRectElement.h
+++ b/WebCore/svg/SVGRectElement.h
@@ -59,7 +59,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::ryAttr, SVGLength, Ry, ry)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index 224d516..b2a5812 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -143,7 +143,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::heightAttr, SVGLength, Height, height)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
diff --git a/WebCore/svg/SVGScriptElement.h b/WebCore/svg/SVGScriptElement.h
index 6dffea6..d4eb61d 100644
--- a/WebCore/svg/SVGScriptElement.h
+++ b/WebCore/svg/SVGScriptElement.h
@@ -22,10 +22,11 @@
#define SVGScriptElement_h
#if ENABLE(SVG)
-#include "ScriptElement.h"
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGElement.h"
-#include "SVGURIReference.h"
#include "SVGExternalResourcesRequired.h"
+#include "SVGURIReference.h"
+#include "ScriptElement.h"
namespace WebCore {
@@ -78,7 +79,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
ScriptElementData m_data;
String m_type;
diff --git a/WebCore/svg/SVGSwitchElement.h b/WebCore/svg/SVGSwitchElement.h
index 970cc1f..1b006ec 100644
--- a/WebCore/svg/SVGSwitchElement.h
+++ b/WebCore/svg/SVGSwitchElement.h
@@ -22,6 +22,7 @@
#define SVGSwitchElement_h
#if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -46,7 +47,7 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 404e50e..6c561f2 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -48,7 +48,7 @@ namespace WebCore {
virtual bool selfHasRelativeLengths() const;
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
diff --git a/WebCore/svg/SVGTextContentElement.h b/WebCore/svg/SVGTextContentElement.h
index 015b857..45d85b3 100644
--- a/WebCore/svg/SVGTextContentElement.h
+++ b/WebCore/svg/SVGTextContentElement.h
@@ -75,7 +75,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h
index fea8034..bb7e6d0 100644
--- a/WebCore/svg/SVGUseElement.h
+++ b/WebCore/svg/SVGUseElement.h
@@ -90,7 +90,7 @@ namespace WebCore {
DECLARE_ANIMATED_PROPERTY(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// Instance tree handling
void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle);
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index 329ea78..f0e756f 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -49,7 +49,7 @@ namespace WebCore {
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
// SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
// SVGFitToViewBox
DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
diff --git a/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h b/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
index f4ae3e4..31617da 100644
--- a/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
@@ -22,7 +22,6 @@
#if ENABLE(SVG)
#include "SVGAnimatedProperty.h"
-#include "SVGAnimatedPropertyDescription.h"
#include "SVGListPropertyTearOff.h"
namespace WebCore {
@@ -47,10 +46,6 @@ public:
return m_animVal.get();
}
- // FIXME: No animVal support.
- void setBaseVal(const PropertyType& property) { m_property = property; }
- void setAnimVal(const PropertyType&) { }
-
virtual int removeItemFromList(SVGProperty* property, bool shouldSynchronizeWrappers)
{
// FIXME: No animVal support.
@@ -86,6 +81,9 @@ private:
private:
PropertyType& m_property;
+
+ RefPtr<SVGProperty> m_baseVal;
+ RefPtr<SVGProperty> m_animVal;
};
}
diff --git a/WebCore/svg/properties/SVGAnimatedProperty.h b/WebCore/svg/properties/SVGAnimatedProperty.h
index a532667..c2186cb 100644
--- a/WebCore/svg/properties/SVGAnimatedProperty.h
+++ b/WebCore/svg/properties/SVGAnimatedProperty.h
@@ -23,6 +23,7 @@
#if ENABLE(SVG)
#include "QualifiedName.h"
#include "SVGAnimatedPropertyDescription.h"
+#include "SVGElement.h"
#include <wtf/RefCounted.h>
namespace WebCore {
@@ -35,6 +36,13 @@ public:
SVGElement* contextElement() const { return m_contextElement.get(); }
const QualifiedName& attributeName() const { return m_attributeName; }
+ void commitChange()
+ {
+ ASSERT(m_contextElement);
+ m_contextElement->invalidateSVGAttributes();
+ m_contextElement->svgAttributeChanged(m_attributeName);
+ }
+
virtual int removeItemFromList(SVGProperty*, bool)
{
ASSERT_NOT_REACHED();
@@ -84,9 +92,6 @@ protected:
{
}
- RefPtr<SVGProperty> m_baseVal;
- RefPtr<SVGProperty> m_animVal;
-
private:
static Cache* animatedPropertyCache()
{
diff --git a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
index b3258c8..b652ea1 100644
--- a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
@@ -24,6 +24,7 @@
#if ENABLE(SVG)
#include "SVGAnimatedListPropertyTearOff.h"
+#include "SVGAnimatedStaticPropertyTearOff.h"
#include "SVGAnimatedPropertySynchronizer.h"
#include "SVGAnimatedPropertyTearOff.h"
#include "SVGNames.h" // FIXME: Temporary hack, until we expand the macros in all files, so we don't need a global SVGNames.h include
@@ -101,6 +102,9 @@ DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.local
#define DECLARE_ANIMATED_PROPERTY_NEW_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, PropertyType, UpperProperty, LowerProperty) \
DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, SVGAnimatedPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)
+#define DECLARE_ANIMATED_STATIC_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedStaticPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)
+
#define DECLARE_ANIMATED_LIST_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedListPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty) \
\
diff --git a/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h b/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h
index 02ce371..252a4b4 100644
--- a/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h
@@ -22,7 +22,6 @@
#if ENABLE(SVG)
#include "SVGAnimatedProperty.h"
-#include "SVGAnimatedPropertyDescription.h"
#include "SVGPropertyTearOff.h"
namespace WebCore {
@@ -44,10 +43,6 @@ public:
return m_animVal.get();
}
- // FIXME: No animVal support.
- void setBaseVal(const PropertyType& property) { m_property = property; }
- void setAnimVal(const PropertyType&) { }
-
private:
friend class SVGAnimatedProperty;
@@ -65,6 +60,9 @@ private:
private:
PropertyType& m_property;
+
+ RefPtr<SVGProperty> m_baseVal;
+ RefPtr<SVGProperty> m_animVal;
};
}
diff --git a/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h b/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h
new file mode 100644
index 0000000..930569e
--- /dev/null
+++ b/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SVGAnimatedStaticPropertyTearOff_h
+#define SVGAnimatedStaticPropertyTearOff_h
+
+#if ENABLE(SVG)
+#include "SVGAnimatedProperty.h"
+
+namespace WebCore {
+
+template<typename PropertyType>
+class SVGAnimatedStaticPropertyTearOff : public SVGAnimatedProperty {
+public:
+ PropertyType& baseVal()
+ {
+ return m_property;
+ }
+
+ PropertyType& animVal()
+ {
+ // FIXME: No animVal support.
+ return m_property;
+ }
+
+ void setBaseVal(const PropertyType& property)
+ {
+ m_property = property;
+ commitChange();
+ }
+
+ // FIXME: No animVal support.
+ void setAnimVal(const PropertyType&) { }
+
+private:
+ friend class SVGAnimatedProperty;
+
+ static PassRefPtr<SVGAnimatedStaticPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
+ {
+ ASSERT(contextElement);
+ return adoptRef(new SVGAnimatedStaticPropertyTearOff<PropertyType>(contextElement, attributeName, property));
+ }
+
+ SVGAnimatedStaticPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
+ : SVGAnimatedProperty(contextElement, attributeName)
+ , m_property(property)
+ {
+ }
+
+private:
+ PropertyType& m_property;
+};
+
+}
+
+#endif // ENABLE(SVG)
+#endif // SVGAnimatedStaticPropertyTearOff_h
diff --git a/WebCore/svg/properties/SVGListPropertyTearOff.h b/WebCore/svg/properties/SVGListPropertyTearOff.h
index 5835c97..bc01eb6 100644
--- a/WebCore/svg/properties/SVGListPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGListPropertyTearOff.h
@@ -331,11 +331,9 @@ private:
item->setValue(m_values->at(i));
}
+ ASSERT(!m_valuesIsCopy);
ASSERT(m_animatedProperty);
- SVGElement* contextElement = m_animatedProperty->contextElement();
- ASSERT(contextElement);
- contextElement->invalidateSVGAttributes();
- contextElement->svgAttributeChanged(m_animatedProperty->attributeName());
+ m_animatedProperty->commitChange();
}
void removeItemFromListIfNeeded(ListItemTearOff* newItem, unsigned* indexToModify)
diff --git a/WebCore/svg/properties/SVGPropertyTearOff.h b/WebCore/svg/properties/SVGPropertyTearOff.h
index c548bbf..17588b4 100644
--- a/WebCore/svg/properties/SVGPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGPropertyTearOff.h
@@ -62,16 +62,6 @@ public:
void setAnimatedProperty(SVGAnimatedProperty* animatedProperty) { m_animatedProperty = animatedProperty; }
- void commitChange()
- {
- if (!m_animatedProperty || m_valueIsCopy)
- return;
- SVGElement* contextElement = m_animatedProperty->contextElement();
- ASSERT(contextElement);
- contextElement->invalidateSVGAttributes();
- contextElement->svgAttributeChanged(m_animatedProperty->attributeName());
- }
-
SVGElement* contextElement() const
{
if (!m_animatedProperty || m_valueIsCopy)
@@ -93,6 +83,13 @@ public:
m_valueIsCopy = true;
}
+ void commitChange()
+ {
+ if (!m_animatedProperty || m_valueIsCopy)
+ return;
+ m_animatedProperty->commitChange();
+ }
+
private:
SVGPropertyTearOff(SVGAnimatedProperty* animatedProperty, PropertyType& value)
: m_animatedProperty(animatedProperty)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list