[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 14:58:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cd6262cc14ebf3bbf47e18b37fda7102445e836b
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 26 20:56:47 2010 +0000

    2010-10-26  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Rob Buis.
    
            Convert SVGRect to the new SVGPropertyTearOff concept
            https://bugs.webkit.org/show_bug.cgi?id=48204
    
            Convert the next SVG primitive type to use the SVGPropertyTearOff concept: SVGRect.
            Added new test verifying that StrictTypeChecking is enabled for SVGRect. Refactor and share code between JSC/V8/ObjC generators.
    
            Test: svg/dom/SVGRect.html
    
            * GNUmakefile.am: Add SVGAnimatedRect.h to build.
            * WebCore.gypi: Ditto.
            * WebCore.pro: Ditto.
            * WebCore.vcproj/WebCore.vcproj: Ditto.
            * WebCore.xcodeproj/project.pbxproj: Ditto.
            * bindings/scripts/CodeGenerator.pm: Refactor SVGPropertyTearOff handling, and share code between JSC/V8/ObjC generators.
            * bindings/scripts/CodeGeneratorJS.pm: Ditto.
            * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
            * bindings/scripts/CodeGeneratorV8.pm: Ditto.
            * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedRect handling.
            * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
            * svg/SVGAngle.idl: Remove [SVGProperty] flag.
            * svg/SVGAnimatedAngle.idl: Remove [SVGAnimatedProperty] flag.
            * svg/SVGAnimatedLength.idl: Ditto.
            * svg/SVGAnimatedLengthList.idl: Ditto.
            * svg/SVGAnimatedRect.h: Added.
            * svg/SVGFitToViewBox.h: SVGRect now uses the new tear off concept, adapt code.
            * svg/SVGLength.idl: Remove [SVGProperty] flag.
            * svg/SVGMarkerElement.h:
            * svg/SVGPatternElement.h:
            * svg/SVGRect.idl: Remove [PODType] flag, add StrictTypeChecking to all attributes.
            * svg/SVGSVGElement.cpp: s/setViewBox/setViewBoxBaseValue/.
            (WebCore::SVGSVGElement::currentView):
            (WebCore::SVGSVGElement::inheritViewAttributes):
            * svg/SVGSVGElement.h:
            * svg/SVGSVGElement.idl: Remove [Immutable] flags for SVGRect types, no longer needed.
            * svg/SVGSymbolElement.h:
            * svg/SVGViewElement.h:
            * svg/SVGViewSpec.cpp: Take a SVGElement as context element.
            (WebCore::SVGViewSpec::SVGViewSpec):
            * svg/SVGViewSpec.h: Ditto.
            (WebCore::SVGViewSpec::contextElement):
            * svg/SVGZoomEvent.idl: Remove [Immutable] flags for SVGRect types, no longer needed.
            * svg/properties/SVGAnimatedPropertyMacros.h: Support declaring animated properties on non-SVGElement types (here: SVGViewSpec), just like the old macros handled it.
    
    2010-10-26  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Rob Buis.
    
            Convert SVGRect to the new SVGPropertyTearOff concept
            https://bugs.webkit.org/show_bug.cgi?id=48204
    
            Added new test verifying that StrictTypeChecking is enabled for SVGRect.
    
            * svg/dom/SVGRect-expected.txt: Added.
            * svg/dom/SVGRect.html: Added.
            * svg/dom/script-tests/SVGRect.js: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 407e2c8..459f99d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-26  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Rob Buis.
+
+        Convert SVGRect to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=48204
+
+        Added new test verifying that StrictTypeChecking is enabled for SVGRect.
+
+        * svg/dom/SVGRect-expected.txt: Added.
+        * svg/dom/SVGRect.html: Added.
+        * svg/dom/script-tests/SVGRect.js: Added.
+
 2010-10-26  Dimitri Glazkov  <dglazkov at chromium.org>
 
         [Chromium] Indicate that the test only passes on Chromium/DRT.
diff --git a/LayoutTests/svg/dom/SVGRect-expected.txt b/LayoutTests/svg/dom/SVGRect-expected.txt
new file mode 100644
index 0000000..fa01a66
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGRect-expected.txt
@@ -0,0 +1,33 @@
+This test checks the SVGRect API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial rect values
+PASS rect.x is 0
+PASS rect.y is 0
+PASS rect.width is 0
+PASS rect.height is 0
+
+Check assigning rects
+PASS rect.x = 100 is 100
+PASS rect.y = 200 is 200
+PASS rect.width = 300 is 300
+PASS rect.height = 400 is 400
+
+Check assigning invalid rects
+PASS rect.x = rect threw exception TypeError: Type error.
+PASS rect.y = null is null
+PASS rect.width = 'aString' threw exception TypeError: Type error.
+PASS rect.height = svgElement threw exception TypeError: Type error.
+
+Check that the rect is still containing the correct values
+PASS rect.x is 100
+PASS rect.y is 0
+PASS rect.width is 300
+PASS rect.height is 400
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGRect.html b/LayoutTests/svg/dom/SVGRect.html
new file mode 100644
index 0000000..da56932
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGRect.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/SVGRect.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/SVGRect.js b/LayoutTests/svg/dom/script-tests/SVGRect.js
new file mode 100644
index 0000000..511e308
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/SVGRect.js
@@ -0,0 +1,34 @@
+description("This test checks the SVGRect API");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var rect = svgElement.createSVGRect();
+
+debug("");
+debug("Check initial rect values");
+shouldBe("rect.x", "0");
+shouldBe("rect.y", "0");
+shouldBe("rect.width", "0");
+shouldBe("rect.height", "0");
+
+debug("");
+debug("Check assigning rects");
+shouldBe("rect.x = 100", "100");
+shouldBe("rect.y = 200", "200");
+shouldBe("rect.width = 300", "300");
+shouldBe("rect.height = 400", "400");
+
+debug("");
+debug("Check assigning invalid rects");
+shouldThrow("rect.x = rect");
+shouldBeNull("rect.y = null");
+shouldThrow("rect.width = 'aString'");
+shouldThrow("rect.height = svgElement");
+
+debug("");
+debug("Check that the rect is still containing the correct values");
+shouldBe("rect.x", "100");
+shouldBe("rect.y", "0");
+shouldBe("rect.width", "300");
+shouldBe("rect.height", "400");
+
+successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 44a3e4d..75979be 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,50 @@
+2010-10-26  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Rob Buis.
+
+        Convert SVGRect to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=48204
+
+        Convert the next SVG primitive type to use the SVGPropertyTearOff concept: SVGRect.
+        Added new test verifying that StrictTypeChecking is enabled for SVGRect. Refactor and share code between JSC/V8/ObjC generators.
+
+        Test: svg/dom/SVGRect.html
+
+        * GNUmakefile.am: Add SVGAnimatedRect.h to build.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/scripts/CodeGenerator.pm: Refactor SVGPropertyTearOff handling, and share code between JSC/V8/ObjC generators.
+        * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedRect handling.
+        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
+        * svg/SVGAngle.idl: Remove [SVGProperty] flag.
+        * svg/SVGAnimatedAngle.idl: Remove [SVGAnimatedProperty] flag.
+        * svg/SVGAnimatedLength.idl: Ditto.
+        * svg/SVGAnimatedLengthList.idl: Ditto.
+        * svg/SVGAnimatedRect.h: Added.
+        * svg/SVGFitToViewBox.h: SVGRect now uses the new tear off concept, adapt code.
+        * svg/SVGLength.idl: Remove [SVGProperty] flag.
+        * svg/SVGMarkerElement.h:
+        * svg/SVGPatternElement.h:
+        * svg/SVGRect.idl: Remove [PODType] flag, add StrictTypeChecking to all attributes.
+        * svg/SVGSVGElement.cpp: s/setViewBox/setViewBoxBaseValue/.
+        (WebCore::SVGSVGElement::currentView):
+        (WebCore::SVGSVGElement::inheritViewAttributes):
+        * svg/SVGSVGElement.h:
+        * svg/SVGSVGElement.idl: Remove [Immutable] flags for SVGRect types, no longer needed.
+        * svg/SVGSymbolElement.h:
+        * svg/SVGViewElement.h:
+        * svg/SVGViewSpec.cpp: Take a SVGElement as context element.
+        (WebCore::SVGViewSpec::SVGViewSpec):
+        * svg/SVGViewSpec.h: Ditto.
+        (WebCore::SVGViewSpec::contextElement):
+        * svg/SVGZoomEvent.idl: Remove [Immutable] flags for SVGRect types, no longer needed.
+        * svg/properties/SVGAnimatedPropertyMacros.h: Support declaring animated properties on non-SVGElement types (here: SVGViewSpec), just like the old macros handled it.
+
 2010-10-26  takano takumi  <takano1 at asia.apple.com>
 
         Reviewed by Dave Hyatt.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 8c204aa..6f16a0f 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3041,6 +3041,7 @@ webcore_sources += \
 	WebCore/svg/SVGAnimatedPathData.h \
 	WebCore/svg/SVGAnimatedPoints.cpp \
 	WebCore/svg/SVGAnimatedPoints.h \
+	WebCore/svg/SVGAnimatedRect.h \
 	WebCore/svg/SVGAnimateElement.cpp \
 	WebCore/svg/SVGAnimateElement.h \
 	WebCore/svg/SVGAnimateMotionElement.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index f526d07..3bf8524 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3973,6 +3973,7 @@
             'svg/SVGAnimatedPathData.h',
             'svg/SVGAnimatedPoints.cpp',
             'svg/SVGAnimatedPoints.h',
+            'svg/SVGAnimatedRect.h',
             'svg/SVGAnimationElement.cpp',
             'svg/SVGAnimationElement.h',
             'svg/SVGCircleElement.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 9fb2fdd..ee3b9d4 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2365,6 +2365,7 @@ HEADERS += \
     svg/SVGAnimatedLengthList.h \
     svg/SVGAnimatedPathData.h \
     svg/SVGAnimatedPoints.h \
+    svg/SVGAnimatedRect.h \
     svg/SVGAnimateElement.h \
     svg/SVGAnimateMotionElement.h \
     svg/SVGAnimateTransformElement.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index dc7d2d0..eb9e78c 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -61207,6 +61207,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\svg\SVGAnimatedRect.h"
+				>
+			</File>
+			<File
 				RelativePath="..\svg\SVGAnimateElement.h"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 336c786..d61c7ea 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -225,6 +225,7 @@
 		08C6A7AB117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */; };
 		08C6A7AC117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */; };
 		08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
+		08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C859BF1274575300A5728D /* SVGAnimatedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */; };
 		08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; };
 		08CD61BC0ED3929C002DDF51 /* WMLTaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */; };
@@ -6218,6 +6219,7 @@
 		08C4C5170EF19A4000E4840F /* WMLImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLImageLoader.h; sourceTree = "<group>"; };
 		08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceSolidColor.cpp; sourceTree = "<group>"; };
 		08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceSolidColor.h; sourceTree = "<group>"; };
+		08C859BF1274575300A5728D /* SVGAnimatedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedRect.h; sourceTree = "<group>"; };
 		08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FilterEffect.cpp; path = filters/FilterEffect.cpp; sourceTree = "<group>"; };
 		08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterEffect.h; path = filters/FilterEffect.h; sourceTree = "<group>"; };
 		08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTaskElement.cpp; sourceTree = "<group>"; };
@@ -15979,6 +15981,7 @@
 				B22277F20D00BF1F0071B782 /* SVGAnimatedPoints.h */,
 				B22277F30D00BF1F0071B782 /* SVGAnimatedPoints.idl */,
 				B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */,
+				08C859BF1274575300A5728D /* SVGAnimatedRect.h */,
 				B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
 				B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
 				B22277F80D00BF1F0071B782 /* SVGAnimatedTransformList.idl */,
@@ -21175,6 +21178,7 @@
 				089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */,
 				8AB4BC77126FDB7100DEB727 /* IgnoreDestructiveWriteCountIncrementer.h in Headers */,
 				087B84961272CEC800A14417 /* SVGAnimatedAngle.h in Headers */,
+				08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
 				758978ED127090D60076D5A9 /* SpeechInputResult.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -21235,7 +21239,6 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
 			compatibilityVersion = "Xcode 2.4";
-			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index f10908b..bffdd23 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -51,14 +51,12 @@ my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
 my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
 
 my %podTypeHash = ("SVGNumber" => 1, "SVGTransform" => 1);
-my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1, "SVGPreserveAspectRatio" => 1, "SVGRect" => 1);
+my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1, "SVGPreserveAspectRatio" => 1);
 my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
 
 my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
 
-my %svgTypeNeedingTearOffHash = ("SVGLength" => 1, "SVGAngle" => 1);
-
-my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1);
+my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1, "SVGAnimatedRect" => 1);
 
 my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
                            "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
@@ -74,6 +72,13 @@ my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick
                                "onmouseup" => 1, "onresize" => 1, "onscroll" => 1,
                                "onunload" => 1);
 
+my %svgNativeType = (
+    "SVGAngle" => "SVGPropertyTearOff<SVGAngle>",
+    "SVGLength" => "SVGPropertyTearOff<SVGLength>",
+    "SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>",
+    "SVGRect" => "SVGPropertyTearOff<FloatRect>"
+);
+
 # Cache of IDL file pathnames.
 my $idlFiles;
 
@@ -287,6 +292,16 @@ sub ParseInterface
 
 # Helpers for all CodeGenerator***.pm modules
 
+sub AvoidInclusionOfType
+{
+    my $object = shift;
+    my $type = shift;
+
+    # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h / SVGMatrix.h do not exist.
+    return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber" or $type eq "SVGMatrix";
+    return 0;
+}
+
 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
 sub IsPodType
 {
@@ -344,16 +359,41 @@ sub IsNonPointerType
     return 0;
 }
 
-
 sub IsSVGTypeNeedingTearOff
 {
     my $object = shift;
     my $type = shift;
 
-    return 1 if $svgTypeNeedingTearOffHash{$type};
+    return 1 if exists $svgNativeType{$type};
     return 0;
 }
 
+sub GetSVGTypeNeedingTearOff
+{
+    my $object = shift;
+    my $type = shift;
+
+    return $svgNativeType{$type} if exists $svgNativeType{$type};
+    return undef;
+}
+
+sub GetSVGWrappedTypeNeedingTearOff
+{
+    my $object = shift;
+    my $type = shift;
+
+    my $svgNativeType = $object->GetSVGTypeNeedingTearOff($type);
+    return $svgNativeType if not $svgNativeType;
+
+    if ($svgNativeType =~ /SVGPropertyTearOff/) {
+        $svgNativeType =~ s/SVGPropertyTearOff<//;
+    } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
+        $svgNativeType =~ s/SVGListPropertyTearOff<//;
+    }
+    $svgNativeType =~ s/>//;
+    return $svgNativeType;
+}
+
 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
 sub IsSVGNewStyleAnimatedType
 {
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 70c327e..719449a 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -227,15 +227,6 @@ sub GetCallbackClassName
     return "JS$className";
 }
 
-sub AvoidInclusionOfType
-{
-    my $type = shift;
-
-    # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h / SVGMatrix.h do not exist.
-    return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber" or $type eq "SVGMatrix";
-    return 0;
-}
-
 sub IndexGetterReturnsStrings
 {
     my $type = shift;
@@ -251,7 +242,7 @@ sub AddIncludesForType
 
     # When we're finished with the one-file-per-class
     # reorganization, we won't need these special cases.
-    if ($codeGenerator->IsPrimitiveType($type) or AvoidInclusionOfType($type)
+    if ($codeGenerator->IsPrimitiveType($type) or $codeGenerator->AvoidInclusionOfType($type)
         or $type eq "DOMString" or $type eq "DOMObject" or $type eq "Array") {
     } elsif ($type =~ /SVGPathSeg/) {
         $joinedName = $type;
@@ -284,6 +275,7 @@ sub AddIncludesForType
     }
 }
 
+# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
 sub AddIncludesForSVGAnimatedType
 {
     my $type = shift;
@@ -334,8 +326,9 @@ sub IsSVGTypeNeedingContextParameter
     return 0 unless $implClassName =~ /SVG/;
     return 0 if $implClassName =~ /Element/;
     return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
+    return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
 
-    my @noContextNeeded = ("SVGAngle", "SVGLength", "SVGLengthList", "SVGPaint", "SVGColor", "SVGDocument", "SVGZoomEvent");
+    my @noContextNeeded = ("SVGColor", "SVGDocument", "SVGPaint", "SVGZoomEvent");
     foreach (@noContextNeeded) {
         return 0 if $implClassName eq $_;
     }
@@ -673,27 +666,11 @@ sub GenerateHeader
     }
     
     $headerIncludes{"<runtime/JSObjectWithGlobalObject.h>"} = 1;
-
     $headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
 
-    # Get correct pass/store types respecting PODType flag
     my $implType = $implClassName;
-
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};    
-    if ($svgPropertyType) {
-        $implType = "SVGPropertyTearOff<$svgPropertyType> ";
-        $headerIncludes{"SVGAnimatedProperty.h"} = 1;
-        $headerIncludes{"SVGPropertyTearOff.h"} = 1;
-        $headerIncludes{"$svgPropertyType.h"} = 1 if $svgPropertyType ne "float";
-    }
-
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};    
-    if ($svgListPropertyType) {
-        $implType = "SVGListPropertyTearOff<$svgListPropertyType> ";
-        $headerIncludes{"SVGAnimatedProperty.h"} = 1;
-        $headerIncludes{"SVGListPropertyTearOff.h"} = 1;
-        $headerIncludes{"$svgListPropertyType.h"} = 1;
-    }
+    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
+    $implType = $svgNativeType if $svgNativeType;
 
     # FIXME: Old style SVG JS bindings, will vanish soon.
     my $podType = $dataNode->extendedAttributes->{"PODType"};
@@ -714,11 +691,13 @@ sub GenerateHeader
 
     push(@headerContent, "\nnamespace WebCore {\n\n");
 
-    my $svgAnimatedPropertyType = $dataNode->extendedAttributes->{"SVGAnimatedProperty"};   
-    $headerIncludes{"$implClassName.h"} = 1 if $svgAnimatedPropertyType;
+    if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+        $headerIncludes{"$implClassName.h"} = 1;
+    } else {
+        # Implementation class forward declaration
+        AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrPodType;
+    }
 
-    # Implementation class forward declaration
-    AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrPodType or $svgAnimatedPropertyType;
     AddClassForwardIfNeeded("JSDOMWindowShell") if $interfaceName eq "DOMWindow";
 
     # Class declaration
@@ -1447,16 +1426,12 @@ sub GenerateImplementation
     }
     push(@implContent, "};\n\n");
 
-    # Get correct pass/store types respecting PODType flag
     my $implType = $implClassName;
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};    
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};    
+    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
+    $implType = $svgNativeType if $svgNativeType;
+
     my $podType = $dataNode->extendedAttributes->{"PODType"};
-    if ($svgPropertyType) {
-        $implType = "SVGPropertyTearOff<$svgPropertyType> ";
-    } elsif ($svgListPropertyType) {
-        $implType = "SVGListPropertyTearOff<$svgListPropertyType> ";
-    } elsif ($podType) {
+    if ($podType) {
         $implType = "JSSVGPODTypeWrapper<$podType> ";
     }
 
@@ -1810,6 +1785,8 @@ sub GenerateImplementation
                             # For setters with "StrictTypeChecking", if an input parameter's type does not match the signature,
                             # a TypeError is thrown instead of casting to null.
                             if ($attribute->signature->extendedAttributes->{"StrictTypeChecking"}) {
+                                $implIncludes{"<runtime/Error.h>"} = 1;
+
                                 my $argType = $attribute->signature->type;
                                 if (!IsNativeType($argType)) {
                                     push(@implContent, "    if (!value.isUndefinedOrNull() && !value.inherits(&JS${argType}::s_info)) {\n");
@@ -2077,6 +2054,8 @@ sub GenerateImplementation
                             # For functions with "StrictTypeChecking", if an input parameter's type does not match the signature,
                             # a TypeError is thrown instead of casting to null.
                             if ($function->signature->extendedAttributes->{"StrictTypeChecking"}) {
+                                $implIncludes{"<runtime/Error.h>"} = 1;
+
                                 my $argValue = "exec->argument($argsIndex)";
                                 if (!IsNativeType($argType)) {
                                     push(@implContent, "    if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.inherits(&JS${argType}::s_info))\n");
@@ -2470,8 +2449,6 @@ my %nativeType = (
     "NodeFilter" => "RefPtr<NodeFilter>",
     "SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
     "IDBKey" => "RefPtr<IDBKey>",
-    "SVGAngle" => "SVGPropertyTearOff<SVGAngle>*",
-    "SVGLength" => "SVGPropertyTearOff<SVGLength>*",
     "SVGMatrix" => "AffineTransform",
     "SVGNumber" => "float",
     "SVGPaintType" => "SVGPaint::SVGPaintType",
@@ -2493,12 +2470,44 @@ sub GetNativeType
 {
     my $type = shift;
 
+    my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
+    return "${svgNativeType}*" if $svgNativeType;
     return $nativeType{$type} if exists $nativeType{$type};
 
     # For all other types, the native type is a pointer with same type name as the IDL type.
     return "${type}*";
 }
 
+sub GetSVGPropertyTypes
+{
+    my $implType = shift;
+
+    my $svgPropertyType;
+    my $svgListPropertyType;
+    my $svgNativeType;
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $implType =~ /SVG/;
+    
+    $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implType);
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $svgNativeType;
+
+    # Append space to avoid compilation errors when using  PassRefPtr<$svgNativeType>
+    $svgNativeType = "$svgNativeType ";
+
+    my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType);
+    if ($svgNativeType =~ /SVGPropertyTearOff/) {
+        $svgPropertyType = $svgWrappedNativeType;
+        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
+        $headerIncludes{"SVGPropertyTearOff.h"} = 1;
+    } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
+        $svgListPropertyType = $svgWrappedNativeType;
+        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
+        $headerIncludes{"SVGListPropertyTearOff.h"} = 1;
+    }
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
+}
+
 sub IsNativeType
 {
     my $type = shift;
@@ -2649,7 +2658,7 @@ sub NativeToJSValue
     } else {
         # Default, include header with same name.
         $implIncludes{"JS$type.h"} = 1;
-        $implIncludes{"$type.h"} = 1;
+        $implIncludes{"$type.h"} = 1 if not $codeGenerator->AvoidInclusionOfType($type);
     }
 
     return $value if $codeGenerator->IsSVGAnimatedType($type);
@@ -2665,13 +2674,9 @@ sub NativeToJSValue
 
     if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
-        if ($implClassName =~ /List$/) {
-            $value = "static_cast<SVGListPropertyTearOff<$type>*>($value)";
-        } else {
-            $value = "static_cast<SVGPropertyTearOff<$type>*>($value)";
-        }
+        $value = "static_cast<" . GetNativeType($type) . ">($value)";
     } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
-        $value = "SVGPropertyTearOff<$type>::create($value)";
+        $value = $codeGenerator->GetSVGTypeNeedingTearOff($type) . "::create($value)";
     }
 
     return "toJS(exec, $globalObject, WTF::getPtr($value))";
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index af3fb78..fce5935 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -600,12 +600,6 @@ sub AddIncludesForType
         return;
     }
 
-    if ($type eq "SVGRect") {
-        $implIncludes{"FloatRect.h"} = 1;
-        $implIncludes{"DOMSVGRectInternal.h"} = 1;
-        return;
-    }
-
     if ($type eq "SVGPoint") {
         $implIncludes{"FloatPoint.h"} = 1;
         $implIncludes{"DOMSVGPointInternal.h"} = 1;
@@ -658,10 +652,39 @@ sub AddIncludesForType
     $implIncludes{"NameNodeList.h"} = 1 if $type eq "NodeList";
 
     # Default, include the same named file (the implementation) and the same name prefixed with "DOM". 
-    $implIncludes{"$type.h"} = 1;
+    $implIncludes{"$type.h"} = 1 if not $codeGenerator->AvoidInclusionOfType($type);
     $implIncludes{"DOM${type}Internal.h"} = 1;
 }
 
+sub GetSVGPropertyTypes
+{
+    my $implType = shift;
+
+    my $svgPropertyType;
+    my $svgListPropertyType;
+    my $svgNativeType;
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $implType =~ /SVG/;
+
+    $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implType);
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $svgNativeType;
+
+    # Append space to avoid compilation errors when using PassRefPtr<$svgNativeType>
+    $svgNativeType = "WebCore::$svgNativeType ";
+    $svgNativeType =~ s/</\<WebCore::/;
+
+    my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType);
+    if ($svgNativeType =~ /SVGPropertyTearOff/) {
+        $svgPropertyType = "WebCore::$svgWrappedNativeType";
+        $svgPropertyType =~ s/</\<WebCore::/;
+    } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
+        $svgListPropertyType = "WebCore::$svgWrappedNativeType";
+        $svgListPropertyType =~ s/</\<WebCore::/;
+    }
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
+}
+
 sub GenerateHeader
 {
     my $object = shift;
@@ -974,23 +997,16 @@ sub GenerateHeader
     unless ($isProtocol) {
         # Generate internal interfaces
         my $podType = $dataNode->extendedAttributes->{"PODType"};
-        my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};
-        my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};
         my $podTypeWithNamespace;
-        my $svgPropertyTypeWithNamespace;
-        my $svgListPropertyTypeWithNamespace;
         my $implClassName = GetImplClassName($interfaceName);
         my $implClassNameWithNamespace = "WebCore::" . $implClassName;
 
         my $implType = $implClassNameWithNamespace;
+        my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
+        $implType = $svgNativeType if $svgNativeType;
+
         if ($podType) {
             $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
-        } elsif ($svgPropertyType) {
-            $implType = "WebCore::SVGPropertyTearOff<$implType>";
-            $svgPropertyTypeWithNamespace = ($svgPropertyType eq "float") ? "$svgPropertyType" : "WebCore::$svgPropertyType";
-        } elsif ($svgListPropertyType) {
-            $implType = "WebCore::SVGListPropertyTearOff<$implType>";
-            $svgListPropertyTypeWithNamespace = "WebCore::$svgListPropertyType";
         }
  
         # Generate interface definitions. 
@@ -1017,10 +1033,6 @@ sub GenerateHeader
             $startedNamespace = 1;
             if ($podType and $podType ne "float") {
                 push(@internalHeaderContent, "    class $podType;\n");
-            } elsif ($svgPropertyType and $svgPropertyType ne "float") {
-                push(@internalHeaderContent, "    class $svgPropertyType;\n");
-            } elsif ($svgListPropertyType) {
-                push(@internalHeaderContent, "    class $svgListPropertyType;\n");
             } elsif ($interfaceName eq "Node") {
                 push(@internalHeaderContent, "    class EventTarget;\n    class Node;\n");
             } else {
@@ -1072,21 +1084,14 @@ sub GenerateImplementation
     my $numFunctions = @{$dataNode->functions};
 
     my $podType = $dataNode->extendedAttributes->{"PODType"};
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};
     my $podTypeWithNamespace;
-    my $svgPropertyTypeWithNamespace;
-    my $svgListPropertyTypeWithNamespace;
     my $implType = $implClassNameWithNamespace;
 
+    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
+    $implType = $svgNativeType if $svgNativeType;
+
     if ($podType) {
         $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
-    } elsif ($svgPropertyType) {
-        $implType = "WebCore::SVGPropertyTearOff<$implType>";
-        $svgPropertyTypeWithNamespace = ($svgPropertyType eq "float") ? "$svgPropertyType" : "WebCore::$svgPropertyType";
-    } elsif ($svgListPropertyType) {
-        $implType = "WebCore::SVGListPropertyTearOff<$implType>";
-        $svgListPropertyTypeWithNamespace = "WebCore::$svgListPropertyType";
     }
 
     # - Add default header template.
@@ -1123,7 +1128,7 @@ sub GenerateImplementation
         $implIncludes{"$1.h"} = 1;
     } else {
         if (!$podType) {
-            $implIncludes{"$implClassName.h"} = 1;
+            $implIncludes{"$implClassName.h"} = 1 if not $codeGenerator->AvoidInclusionOfType($implClassName);
         } else {
             $implIncludes{"$podType.h"} = 1 unless $podType eq "float";
         }
@@ -1227,12 +1232,11 @@ sub GenerateImplementation
             my $getterContentHead = "IMPL->$getterExpressionPrefix";
             my $getterContentTail = ")";
 
-            my $svgAnimatedPropertyType = $dataNode->extendedAttributes->{"SVGAnimatedProperty"};
             if ($svgPropertyType) {
                 $getterContentHead = "$getterExpressionPrefix";
 
                 # TODO: Handle special case for DOMSVGLength. We do need Custom code support for this.
-                if ($svgPropertyType eq "SVGLength" and $attributeName eq "value") {
+                if ($svgPropertyType eq "WebCore::SVGLength" and $attributeName eq "value") {
                     $getterContentHead = "value(0 /* FIXME */";
                 }
             } else {
@@ -1285,12 +1289,10 @@ sub GenerateImplementation
                 $getterContentTail .= ")";
             } elsif ($svgPropertyType) {
                 $getterContentHead = "IMPL->propertyReference().$getterContentHead";
-            } elsif ($svgAnimatedPropertyType) {
-                if ($idlType =~ /List$/) {
-                    $getterContentHead = "kit(static_cast<WebCore::SVGListPropertyTearOff<WebCore::$idlType>*>($getterContentHead)";
-                } else {
-                    $getterContentHead = "kit(static_cast<WebCore::SVGPropertyTearOff<WebCore::$idlType>*>($getterContentHead)";
-                }
+            } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+                my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType);
+                $idlTypeWithNamespace =~ s/</\<WebCore::/;
+                $getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)";
                 $getterContentTail .= ")";
             } elsif (IsProtocolType($idlType) and $idlType ne "EventTarget") {
                 $getterContentHead = "kit($getterContentHead";
@@ -1302,8 +1304,16 @@ sub GenerateImplementation
                 $getterContentHead = "$getterContentHead";
                 $getterContentTail .= "->toString()";                
             } elsif (ConversionNeeded($attribute->signature->type)) {
-                $getterContentHead = "kit(WTF::getPtr($getterContentHead";
-                $getterContentTail .= "))";
+                if ($codeGenerator->IsSVGTypeNeedingTearOff($attribute->signature->type) and not $implClassName =~ /List$/) {
+                    my $idlType = $attribute->signature->type;
+                    my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType);
+                    $idlTypeWithNamespace =~ s/</\<WebCore::/;
+                    $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead";
+                    $getterContentTail .= ")))";
+                } else {
+                    $getterContentHead = "kit(WTF::getPtr($getterContentHead";
+                    $getterContentTail .= "))";
+                }
             }
 
             my $getterContent;
@@ -1369,7 +1379,7 @@ sub GenerateImplementation
 
                 if ($svgPropertyType) {
                     $getterContentHead = "$getterExpressionPrefix";
-                    push(@implContent, "    $svgPropertyTypeWithNamespace& podImpl = IMPL->propertyReference();\n");
+                    push(@implContent, "    $svgPropertyType& podImpl = IMPL->propertyReference();\n");
                     my $ec = $hasSetterException ? ", ec" : "";
                     push(@implContent, "    $exceptionInit\n") if $hasSetterException;
                     push(@implContent, "    podImpl.$coreSetterName($arg$ec);\n");
@@ -1508,7 +1518,7 @@ sub GenerateImplementation
             # FIXME! We need [Custom] support for ObjC, to move these hacks into DOMSVGLength/MatrixCustom.mm
             my $svgMatrixRotateFromVector = ($podType and $podType eq "AffineTransform" and $functionName eq "rotateFromVector");
             my $svgMatrixInverse = ($podType and $podType eq "AffineTransform" and $functionName eq "inverse");
-            my $svgLengthConvertToSpecifiedUnits = ($svgPropertyType and $svgPropertyType eq "SVGLength" and $functionName eq "convertToSpecifiedUnits");
+            my $svgLengthConvertToSpecifiedUnits = ($svgPropertyType and $svgPropertyType eq "WebCore::SVGLength" and $functionName eq "convertToSpecifiedUnits");
 
             push(@parameterNames, "ec") if $raisesExceptions and !($svgMatrixRotateFromVector || $svgMatrixInverse);
             push(@parameterNames, "0 /* FIXME */") if $svgLengthConvertToSpecifiedUnits; 
@@ -1524,9 +1534,10 @@ sub GenerateImplementation
                 next if not $codeGenerator->IsSVGTypeNeedingTearOff($idlType) or $implClassName =~ /List$/;
 
                 my $implGetter = GetObjCTypeGetter($paramName, $idlType);
-                my $idlTypeWithNamespace = ($idlType eq "float") ? "$idlType" : "WebCore::$idlType";
+                my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType);
+                $idlTypeWithNamespace =~ s/</\<WebCore::/;
 
-                push(@functionContent, "    WebCore::SVGPropertyTearOff<$idlTypeWithNamespace>* ${paramName}Core = $implGetter;\n");
+                push(@functionContent, "    $idlTypeWithNamespace* ${paramName}Core = $implGetter;\n");
                 push(@functionContent, "    if (!${paramName}Core) {\n");
                 push(@functionContent, "        WebCore::ExceptionCode ec = WebCore::TYPE_MISMATCH_ERR;\n");
                 push(@functionContent, "        $exceptionRaiseOnError\n");
@@ -1544,7 +1555,7 @@ sub GenerateImplementation
             my $content = $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")"; 
 
             if ($svgPropertyType) {
-                push(@functionContent, "    $svgPropertyTypeWithNamespace& podImpl = IMPL->propertyReference();\n");
+                push(@functionContent, "    $svgPropertyType& podImpl = IMPL->propertyReference();\n");
                 $content = "podImpl.$content;\n    IMPL->commitChange()"; 
             } else {
                 $content = $caller . "->$content";
@@ -1593,7 +1604,10 @@ sub GenerateImplementation
             } else {
                 if (ConversionNeeded($function->signature->type)) {
                     if ($codeGenerator->IsSVGTypeNeedingTearOff($function->signature->type) and not $implClassName =~ /List$/) {
-                        $content = "kit(WTF::getPtr(WebCore::SVGPropertyTearOff<WebCore::" . $function->signature->type . ">::create($content)))";
+                        my $idlType = $function->signature->type;
+                        my $idlTypeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($idlType);
+                        $idlTypeWithNamespace =~ s/</\<WebCore::/;
+                        $content = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($content)))";
                     } elsif ($codeGenerator->IsPodType($function->signature->type)) {
                         $content = "kit($content)";
                     } else {
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 423cc6b..7a8aa13 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -212,6 +212,34 @@ sub GenerateConditionalString
     }
 }
 
+sub GetSVGPropertyTypes
+{
+    my $implType = shift;
+
+    my $svgPropertyType;
+    my $svgListPropertyType;
+    my $svgNativeType;
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $implType =~ /SVG/;
+
+    $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implType);
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $svgNativeType;
+
+    # Append space to avoid compilation errors when using  PassRefPtr<$svgNativeType>
+    $svgNativeType = "$svgNativeType ";
+
+    my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType);
+    if ($svgNativeType =~ /SVGPropertyTearOff/) {
+        $svgPropertyType = $svgWrappedNativeType;
+        $implIncludes{"SVGPropertyTearOff.h"} = 1,
+    } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
+        $svgListPropertyType = $svgWrappedNativeType;
+        $implIncludes{"SVGListPropertyTearOff.h"} = 1,
+    }
+
+    return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
+}
+
 sub GenerateHeader
 {
     my $object = shift;
@@ -229,23 +257,19 @@ sub GenerateHeader
 
     # - Add default header template
     push(@headerContent, GenerateHeaderContentHeader($dataNode));
-
-    # Get correct pass/store types respecting PODType flag
     my $podType = $dataNode->extendedAttributes->{"PODType"};
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};
 
     my %headerInclues = ();
     $headerIncludes{"$podType.h"} = 1 if $podType and ($podType ne "double" and $podType ne "float" and $podType ne "RGBA32");
-    $headerIncludes{"$svgPropertyType.h"} = 1 if $svgPropertyType and $svgPropertyType ne "float";
-    $headerIncludes{"$svgListPropertyType.h"} = 1 if $svgListPropertyType;
-    $headerIncludes{"SVGAnimatedProperty.h"} = 1 if $svgPropertyType or $svgListPropertyType;
     $headerIncludes{"wtf/text/StringHash.h"} = 1;
     $headerIncludes{"WrapperTypeInfo.h"} = 1;
     $headerIncludes{"V8DOMWrapper.h"} = 1;
+
     my $headerClassInclude = GetHeaderClassInclude($implClassName);
     $headerIncludes{$headerClassInclude} = 1 if $headerClassInclude ne "";
 
+    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
+
     foreach my $headerInclude (sort keys(%headerIncludes)) {
         push(@headerContent, "#include \"${headerInclude}\"\n");
     }
@@ -685,8 +709,6 @@ sub GenerateNormalAttrGetter
 
     my $nativeType = GetNativeTypeFromSignature($attribute->signature, -1);
     my $isPodType = IsPodType($implClassName);
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};
     my $skipContext = 0;
 
     if ($isPodType) {
@@ -694,27 +716,19 @@ sub GenerateNormalAttrGetter
         $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
     }
 
-    $implIncludes{"SVGPropertyTearOff.h"} = 1 if $svgPropertyType;;
-    $implIncludes{"SVGListPropertyTearOff.h"} = 1 if $svgListPropertyType;
-
     # Special case: SVGZoomEvent's attributes are all read-only
     if ($implClassName eq "SVGZoomEvent") {
         $attrIsPodType = 0;
         $skipContext = 1;
     }
 
-    # Special case: SVGSVGEelement::viewport is read-only
-    if (($implClassName eq "SVGSVGElement") and ($attrName eq "viewport")) {
-        $attrIsPodType = 0;
-        $skipContext = 1;
-    }
-
     # Special case for SVGColor
     if (($implClassName eq "SVGColor") and ($attrName eq "rgbColor")) {
         $attrIsPodType = 0;
     }
 
     my $getterStringUsesImp = $implClassName ne "float";
+    my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName);
 
     # Getter
     my $conditionalString = GenerateConditionalString($attribute->signature);
@@ -736,18 +750,20 @@ END
     $implClassName* imp = &impInstance;
 END
         }
-
-    } elsif ($svgPropertyType) {
-        push(@implContentDecls, <<END);
-    SVGPropertyTearOff<$svgPropertyType>* wrapper = V8${implClassName}::toNative(info.Holder());
-    $svgPropertyType& impInstance = wrapper->propertyReference();
-    $svgPropertyType* imp = &impInstance;
+    } elsif ($svgNativeType) {
+        my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
+        if ($svgWrappedNativeType =~ /List$/) {
+            push(@implContentDecls, <<END);
+    $svgNativeType* imp = V8${implClassName}::toNative(info.Holder());
 END
-    } elsif ($svgListPropertyType) {
-        push(@implContentDecls, <<END);
-    SVGListPropertyTearOff<$svgListPropertyType>* imp = V8${implClassName}::toNative(info.Holder());
+        } else {
+            push(@implContentDecls, <<END);
+    $svgNativeType* wrapper = V8${implClassName}::toNative(info.Holder());
+    $svgWrappedNativeType& impInstance = wrapper->propertyReference();
+    $svgWrappedNativeType* imp = &impInstance;
 END
-    }  elsif ($attrExt->{"v8OnProto"} || $attrExt->{"V8DisallowShadowing"}) {
+        }
+    } elsif ($attrExt->{"v8OnProto"} || $attrExt->{"V8DisallowShadowing"}) {
         if ($interfaceName eq "DOMWindow") {
             push(@implContentDecls, <<END);
     v8::Handle<v8::Object> holder = info.Holder();
@@ -904,12 +920,14 @@ END
     }
 
     if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
-        $implIncludes{"V8${attrType}.h"} = 1;
-        if ($implClassName =~ /List$/) {
-            push(@implContentDecls, "    return toV8(static_cast<SVGListPropertyTearOff<$attrType>*>($result));\n");
-         } else {
-            push(@implContentDecls, "    return toV8(static_cast<SVGPropertyTearOff<$attrType>*>($result));\n");
-         }
+        $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.
+        push(@implContentDecls, "    return toV8(static_cast<$svgNativeType*>($result));\n");
+    } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($attrType) and not $implClassName =~ /List$/) {
+        $implIncludes{"V8$attrType.h"} = 1;
+        my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
+        push(@implContentDecls, "    return toV8(WTF::getPtr(${svgNativeType}::create($result)));\n");
     } elsif ($attrIsPodType) {
         $implIncludes{"V8${attrType}.h"} = 1;
         push(@implContentDecls, "    return toV8(wrapper.release().get());\n");
@@ -961,8 +979,7 @@ sub GenerateNormalAttrSetter
     }
 
     my $isPodType = IsPodType($implClassName);
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"};
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"};
+    my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName);
 
     if ($isPodType) {
         $implClassName = GetNativeType($implClassName);
@@ -970,16 +987,19 @@ sub GenerateNormalAttrSetter
         push(@implContentDecls, "    V8SVGPODTypeWrapper<$implClassName>* wrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());\n");
         push(@implContentDecls, "    $implClassName impInstance = *wrapper;\n");
         push(@implContentDecls, "    $implClassName* imp = &impInstance;\n");
-    } elsif ($svgPropertyType) {
-        push(@implContentDecls, <<END);
-    SVGPropertyTearOff<$svgPropertyType>* wrapper = V8${implClassName}::toNative(info.Holder());
-    $svgPropertyType& impInstance = wrapper->propertyReference();
-    $svgPropertyType* imp = &impInstance;
+    } elsif ($svgNativeType) {
+        my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
+        if ($svgWrappedNativeType =~ /List$/) {
+            push(@implContentDecls, <<END);
+    $svgNativeType* imp = V8${implClassName}::toNative(info.Holder());
 END
-    } elsif ($svgListPropertyType) {
-        push(@implContentDecls, <<END);
-    SVGListPropertyTearOff<$svgListPropertyType>* imp = V8${implClassName}::toNative(info.Holder());
+        } else {
+            push(@implContentDecls, <<END);
+    $svgNativeType* wrapper = V8${implClassName}::toNative(info.Holder());
+    $svgWrappedNativeType& impInstance = wrapper->propertyReference();
+    $svgWrappedNativeType* imp = &impInstance;
 END
+        }
     } elsif ($attrExt->{"v8OnProto"}) {
       if ($interfaceName eq "DOMWindow") {
         push(@implContentDecls, <<END);
@@ -1280,22 +1300,23 @@ END
         }
     }
 
-    my $svgPropertyType = $dataNode->extendedAttributes->{"SVGProperty"}; 
-    my $svgListPropertyType = $dataNode->extendedAttributes->{"SVGListProperty"}; 
+    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
 
     if (IsPodType($implClassName)) {
         my $nativeClassName = GetNativeType($implClassName);
         push(@implContentDecls, "    V8SVGPODTypeWrapper<$nativeClassName>* impWrapper = V8SVGPODTypeWrapper<$nativeClassName>::toNative(args.Holder());\n");
         push(@implContentDecls, "    $nativeClassName impInstance = *impWrapper;\n");
         push(@implContentDecls, "    $nativeClassName* imp = &impInstance;\n");
-    } elsif ($svgPropertyType) {
-        my $nativeClassName = GetNativeType($implClassName);
-        push(@implContentDecls, "    $nativeClassName wrapper = V8${svgPropertyType}::toNative(args.Holder());\n");
-        push(@implContentDecls, "    $svgPropertyType& impInstance = wrapper->propertyReference();\n");
-        push(@implContentDecls, "    $svgPropertyType* imp = &impInstance;\n");
-    } elsif ($svgListPropertyType) {
-        my $nativeClassName = GetNativeType($implClassName);
-        push(@implContentDecls, "    $nativeClassName imp = V8${svgListPropertyType}::toNative(args.Holder());\n");
+    } elsif ($svgNativeType) {
+        my $nativeClassName = GetNativeType($implClassName); 
+        if ($implClassName =~ /List$/) {
+            push(@implContentDecls, "    $nativeClassName imp = V8${svgListPropertyType}::toNative(args.Holder());\n");
+        } else {
+            my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
+            push(@implContentDecls, "    $nativeClassName wrapper = V8${svgPropertyType}::toNative(args.Holder());\n");
+            push(@implContentDecls, "    $svgWrappedNativeType& impInstance = wrapper->propertyReference();\n");
+            push(@implContentDecls, "    $svgWrappedNativeType* imp = &impInstance;\n");
+        }
     } elsif (!$function->signature->extendedAttributes->{"ClassMethod"}) {
         push(@implContentDecls, <<END);
     ${implClassName}* imp = V8${implClassName}::toNative(args.Holder());
@@ -2645,13 +2666,11 @@ sub GetNativeTypeForConversions
     my $dataNode = shift;
     my $type = shift;
 
-    $type = "FloatRect" if $type eq "SVGRect";
     $type = "FloatPoint" if $type eq "SVGPoint";
     $type = "AffineTransform" if $type eq "SVGMatrix";
     $type = "float" if $type eq "SVGNumber";
     $type = "V8SVGPODTypeWrapper<$type>" if $dataNode->extendedAttributes->{"PODType"};
-    $type = "SVGPropertyTearOff<$type>" if $dataNode->extendedAttributes->{"SVGProperty"};
-    $type = "SVGListPropertyTearOff<$type>" if $dataNode->extendedAttributes->{"SVGListProperty"};
+    $type = $codeGenerator->GetSVGTypeNeedingTearOff($type) if $codeGenerator->IsSVGTypeNeedingTearOff($type); 
     return $type;
 }
 
@@ -2669,6 +2688,9 @@ sub GenerateFunctionCallString()
     my $nativeReturnType = GetNativeType($returnType, 0);
     my $result = "";
 
+    my $isSVGTearOffType = ($codeGenerator->IsSVGTypeNeedingTearOff($returnType) and not $implClassName =~ /List$/);
+    $nativeReturnType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($returnType) if $isSVGTearOffType;
+
     # Special case: SVG matrix transform methods should not mutate
     # the matrix but return a copy
     my $copyFirst = 0;
@@ -2816,10 +2838,12 @@ sub GenerateFunctionCallString()
         $return = "wrapper";
     }
 
-    if ($codeGenerator->IsSVGTypeNeedingTearOff($returnType) and not $implClassName =~ /List$/) {
+    if ($isSVGTearOffType) {
         $implIncludes{"V8$returnType.h"} = 1;
         $implIncludes{"SVGPropertyTearOff.h"} = 1;
-        return $indent . "return toV8(WTF::getPtr(SVGPropertyTearOff<$returnType>::create($return)));\n";
+        my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($returnType);
+        $result .= $indent . "return toV8(WTF::getPtr(${svgNativeType}::create($return)));\n";
+        return $result;
     }
 
     my $generatedSVGContextRetrieval = 0;
@@ -2847,7 +2871,7 @@ sub GenerateFunctionCallString()
         }
 
         $result .= $indent . "impWrapper->commitChange(impInstance, context);\n";
-    } elsif ($dataNode->extendedAttributes->{"SVGProperty"}) {
+    } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName) and not $implClassName =~ /List$/) {
         $result .= $indent . "wrapper->commitChange();\n";
     }
 
@@ -2923,6 +2947,15 @@ sub GetNativeType
     my $type = shift;
     my $isParameter = shift;
 
+    my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
+    if ($svgNativeType) {
+        if ($svgNativeType =~ /List$/) {
+            return "${svgNativeType}*";
+        } else {
+            return "RefPtr<${svgNativeType} >";
+        }
+    }
+
     if ($type eq "float" or $type eq "double") {
         return $type;
     }
@@ -2937,13 +2970,9 @@ sub GetNativeType
     return "bool" if $type eq "boolean";
     return "String" if $type eq "DOMString";
     return "Range::CompareHow" if $type eq "CompareHow";
-    return "FloatRect" if $type eq "SVGRect";
     return "FloatPoint" if $type eq "SVGPoint";
     return "AffineTransform" if $type eq "SVGMatrix";
     return "SVGTransform" if $type eq "SVGTransform";
-    return "RefPtr<SVGPropertyTearOff<SVGAngle> >" if $type eq "SVGAngle";
-    return "RefPtr<SVGPropertyTearOff<SVGLength> >" if $type eq "SVGLength";
-    return "SVGListPropertyTearOff<SVGLengthList>*" if $type eq "SVGLengthList";
     return "float" if $type eq "SVGNumber";
     return "SVGPreserveAspectRatio" if $type eq "SVGPreserveAspectRatio";
     return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
@@ -2998,7 +3027,6 @@ sub BasicTypeCanFailConversion
     return 1 if $type eq "SVGMatrix";
     return 1 if $type eq "SVGPoint";
     return 1 if $type eq "SVGPreserveAspectRatio";
-    return 1 if $type eq "SVGRect";
     return 1 if $type eq "SVGTransform";
     return 0;
 }
@@ -3379,17 +3407,16 @@ sub IsSVGTypeNeedingContextParameter
 {
     my $implClassName = shift;
 
+    return 0 unless $implClassName =~ /SVG/;
+    return 0 if $implClassName =~ /Element/;
     return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
-    if ($implClassName =~ /SVG/ and not $implClassName =~ /Element/) {
-        return 1 unless $implClassName =~ /SVGAngle/
-                     or $implClassName =~ /SVGPaint/
-                     or $implClassName =~ /SVGColor/
-                     or $implClassName =~ /SVGDocument/
-                     or $implClassName =~ /SVGLength/
-                     or $implClassName =~ /SVGLengthList/;
-    }
+    return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
 
-    return 0;
+    my @noContextNeeded = ("SVGColor", "SVGDocument", "SVGPaintType", "SVGPaint", "SVGZoomEvent");
+    foreach (@noContextNeeded) {
+        return 0 if $implClassName eq $_;
+    }
+    return 1;
 }
 
 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
diff --git a/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h b/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
index 63a90cf..51bd496 100644
--- a/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
+++ b/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
@@ -105,18 +105,6 @@ struct DeprecatedSVGAnimatedPropertyTraits<SVGPreserveAspectRatio> : public Nonc
     static String toString(PassType type) { return type.valueAsString(); }
 };
 
-// SVGAnimatedRect
-template<>
-struct DeprecatedSVGAnimatedPropertyTraits<FloatRect> : public Noncopyable {
-    typedef const FloatRect& PassType;
-    typedef FloatRect ReturnType;
-    typedef FloatRect StoredType;
-
-    static ReturnType null() { return FloatRect(); }
-    static ReturnType toReturnType(const StoredType& type) { return type; }
-    static String toString(PassType type) { return String::format("%f %f %f %f", type.x(), type.y(), type.width(), type.height()); }
-};
-
 // SVGAnimatedString
 template<>
 struct DeprecatedSVGAnimatedPropertyTraits<String> : public Noncopyable {
diff --git a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
index 351ff5a..de24fe4 100644
--- a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
+++ b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
@@ -160,7 +160,6 @@ namespace WebCore {
     typedef DeprecatedSVGAnimatedTemplate<float> SVGAnimatedNumber;
     typedef DeprecatedSVGAnimatedTemplate<SVGNumberList*> SVGAnimatedNumberList; 
     typedef DeprecatedSVGAnimatedTemplate<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio;
-    typedef DeprecatedSVGAnimatedTemplate<FloatRect> SVGAnimatedRect;
     typedef DeprecatedSVGAnimatedTemplate<String> SVGAnimatedString;
     typedef DeprecatedSVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
 
diff --git a/WebCore/svg/SVGAngle.idl b/WebCore/svg/SVGAngle.idl
index 69959ad..b36670a 100644
--- a/WebCore/svg/SVGAngle.idl
+++ b/WebCore/svg/SVGAngle.idl
@@ -22,7 +22,7 @@
 
 module svg {
 
-    interface [Conditional=SVG, SVGProperty=SVGAngle] SVGAngle { 
+    interface [Conditional=SVG] SVGAngle { 
         // Angle Unit Types
         const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
         const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
diff --git a/WebCore/svg/SVGAnimatedAngle.idl b/WebCore/svg/SVGAnimatedAngle.idl
index 48159fd..76d4b71 100644
--- a/WebCore/svg/SVGAnimatedAngle.idl
+++ b/WebCore/svg/SVGAnimatedAngle.idl
@@ -25,7 +25,7 @@
 
 module svg {
 
-    interface [Conditional=SVG, SVGAnimatedProperty] SVGAnimatedAngle {
+    interface [Conditional=SVG] SVGAnimatedAngle {
         readonly attribute SVGAngle baseVal;
         readonly attribute SVGAngle animVal;
     };
diff --git a/WebCore/svg/SVGAnimatedLength.idl b/WebCore/svg/SVGAnimatedLength.idl
index a0e2182..7ace261 100644
--- a/WebCore/svg/SVGAnimatedLength.idl
+++ b/WebCore/svg/SVGAnimatedLength.idl
@@ -25,7 +25,7 @@
 
 module svg {
 
-    interface [Conditional=SVG, SVGAnimatedProperty] SVGAnimatedLength {
+    interface [Conditional=SVG] SVGAnimatedLength {
         readonly attribute SVGLength baseVal;
         readonly attribute SVGLength animVal;
     };
diff --git a/WebCore/svg/SVGAnimatedLengthList.idl b/WebCore/svg/SVGAnimatedLengthList.idl
index b94797e..a68724a 100644
--- a/WebCore/svg/SVGAnimatedLengthList.idl
+++ b/WebCore/svg/SVGAnimatedLengthList.idl
@@ -25,7 +25,7 @@
 
 module svg {
 
-    interface [Conditional=SVG, SVGAnimatedProperty] SVGAnimatedLengthList {
+    interface [Conditional=SVG] SVGAnimatedLengthList {
         readonly attribute SVGLengthList baseVal;
         readonly attribute SVGLengthList animVal;
     };
diff --git a/WebCore/svg/SVGAnimatedRect.h b/WebCore/svg/SVGAnimatedRect.h
new file mode 100644
index 0000000..ee94352
--- /dev/null
+++ b/WebCore/svg/SVGAnimatedRect.h
@@ -0,0 +1,34 @@
+/*
+ * 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 SVGAnimatedRect_h
+#define SVGAnimatedRect_h
+
+#if ENABLE(SVG)
+#include "FloatRect.h"
+#include "SVGAnimatedPropertyTearOff.h"
+
+namespace WebCore {
+
+typedef SVGAnimatedPropertyTearOff<FloatRect> SVGAnimatedRect;
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index ecc89bb..df41fce 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -39,7 +39,7 @@ public:
     bool parseMappedAttribute(Document*, Attribute*);
     bool isKnownAttribute(const QualifiedName&);
 
-    virtual void setViewBoxBaseValue(DeprecatedSVGAnimatedPropertyTraits<FloatRect>::PassType) = 0;
+    virtual void setViewBoxBaseValue(const FloatRect&) = 0;
     virtual void setPreserveAspectRatioBaseValue(DeprecatedSVGAnimatedPropertyTraits<SVGPreserveAspectRatio>::PassType) = 0;
 
 private:
diff --git a/WebCore/svg/SVGLength.idl b/WebCore/svg/SVGLength.idl
index ed0199b..166019e 100644
--- a/WebCore/svg/SVGLength.idl
+++ b/WebCore/svg/SVGLength.idl
@@ -22,7 +22,7 @@
 
 module svg {
 
-    interface [Conditional=SVG, SVGProperty=SVGLength] SVGLength { 
+    interface [Conditional=SVG] SVGLength { 
         // Length Unit Types
         const unsigned short SVG_LENGTHTYPE_UNKNOWN    = 0;
         const unsigned short SVG_LENGTHTYPE_NUMBER     = 1;
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index bc70524..12f52bd 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -88,7 +88,7 @@ private:
     DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
     // SVGFitToViewBox
-    DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
     DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 };
 
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 51352fc..7bcee75 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -79,7 +79,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         // SVGPatternElement
-        DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
         DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
     };
 
diff --git a/WebCore/svg/SVGRect.idl b/WebCore/svg/SVGRect.idl
index a4ece66..4231ac0 100644
--- a/WebCore/svg/SVGRect.idl
+++ b/WebCore/svg/SVGRect.idl
@@ -22,11 +22,11 @@
 
 module svg {
 
-    interface [Conditional=SVG, PODType=FloatRect] SVGRect {
-        attribute float x;
-        attribute float y;
-        attribute float width;
-        attribute float height;
+    interface [Conditional=SVG] SVGRect {
+        attribute [StrictTypeChecking] float x;
+        attribute [StrictTypeChecking] float y;
+        attribute [StrictTypeChecking] float width;
+        attribute [StrictTypeChecking] float height;
     };
 
 }
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index 7de880c..2354b27 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -186,7 +186,7 @@ void SVGSVGElement::setUseCurrentView(bool currentView)
 SVGViewSpec* SVGSVGElement::currentView() const
 {
     if (!m_viewSpec)
-        m_viewSpec = adoptPtr(new SVGViewSpec(this));
+        m_viewSpec = adoptPtr(new SVGViewSpec(const_cast<SVGSVGElement*>(this)));
     return m_viewSpec.get();
 }
 
@@ -580,9 +580,9 @@ void SVGSVGElement::inheritViewAttributes(SVGViewElement* viewElement)
 {
     setUseCurrentView(true);
     if (viewElement->hasAttribute(SVGNames::viewBoxAttr))
-        currentView()->setViewBox(viewElement->viewBox());
+        currentView()->setViewBoxBaseValue(viewElement->viewBox());
     else
-        currentView()->setViewBox(viewBox());
+        currentView()->setViewBoxBaseValue(viewBox());
 
     SVGPreserveAspectRatio aspectRatio;
     if (viewElement->hasAttribute(SVGNames::preserveAspectRatioAttr))
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index 8a9f653..224d516 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -146,7 +146,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         // SVGFitToViewBox
-        DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
         DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
  
         virtual void documentWillBecomeInactive();
diff --git a/WebCore/svg/SVGSVGElement.idl b/WebCore/svg/SVGSVGElement.idl
index bcf9236..39912ec 100644
--- a/WebCore/svg/SVGSVGElement.idl
+++ b/WebCore/svg/SVGSVGElement.idl
@@ -41,14 +41,14 @@ module svg {
                      /*setter raises(DOMException)*/;
                  attribute DOMString contentStyleType
                      /*setter raises(DOMException)*/;
-        readonly attribute [Immutable] SVGRect viewport;
+        readonly attribute SVGRect viewport;
         readonly attribute float pixelUnitToMillimeterX;
         readonly attribute float pixelUnitToMillimeterY;
         readonly attribute float screenPixelToMillimeterX;
         readonly attribute float screenPixelToMillimeterY;
                  attribute boolean useCurrentView
                      /*setter raises(DOMException)*/;
-        // TODO    readonly attribute [Immutable] SVGViewSpec currentView;
+        // TODO    readonly attribute SVGViewSpec currentView;
                  attribute float currentScale
                      /*setter raises(DOMException)*/;
         readonly attribute SVGPoint currentTranslate;
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 1f310f8..404e50e 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -22,6 +22,7 @@
 #define SVGSymbolElement_h
 
 #if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
 #include "SVGLangSpace.h"
@@ -50,7 +51,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         // SVGFitToViewBox
-        DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
         DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
     };
 
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index b483236..329ea78 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -22,6 +22,7 @@
 #define SVGViewElement_h
 
 #if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
 #include "SVGStyledElement.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
@@ -51,7 +52,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         // SVGFitToViewBox
-        DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
         DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
  
         mutable RefPtr<SVGStringList> m_viewTarget;
diff --git a/WebCore/svg/SVGViewSpec.cpp b/WebCore/svg/SVGViewSpec.cpp
index 20c58ac..2eafff1 100644
--- a/WebCore/svg/SVGViewSpec.cpp
+++ b/WebCore/svg/SVGViewSpec.cpp
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-SVGViewSpec::SVGViewSpec(const SVGSVGElement* contextElement)
+SVGViewSpec::SVGViewSpec(SVGElement* contextElement)
     : m_contextElement(contextElement)
     , m_transform(SVGTransformList::create(SVGNames::transformAttr))
 {
diff --git a/WebCore/svg/SVGViewSpec.h b/WebCore/svg/SVGViewSpec.h
index cf64bca..491b7b8 100644
--- a/WebCore/svg/SVGViewSpec.h
+++ b/WebCore/svg/SVGViewSpec.h
@@ -21,6 +21,8 @@
 #define SVGViewSpec_h
 
 #if ENABLE(SVG)
+#include "SVGAnimatedPropertyMacros.h"
+#include "SVGElement.h"
 #include "SVGFitToViewBox.h"
 #include "SVGZoomAndPan.h"
 
@@ -29,14 +31,13 @@
 namespace WebCore {
 
     class SVGElement;
-    class SVGSVGElement;
     class SVGTransformList;
 
     class SVGViewSpec : public SVGFitToViewBox,
                         public SVGZoomAndPan,
                         public Noncopyable {
     public:
-        SVGViewSpec(const SVGSVGElement*);
+        SVGViewSpec(SVGElement*);
 
         bool parseViewSpec(const String&);
 
@@ -51,13 +52,13 @@ namespace WebCore {
         String viewTargetString() const { return m_viewTargetString; }
         SVGElement* viewTarget() const;
 
-        SVGSVGElement* contextElement() const { return const_cast<SVGSVGElement*>(m_contextElement); }
+        SVGElement* contextElement() const { return m_contextElement; }
 
     private:
-        const SVGSVGElement* m_contextElement;
+        SVGElement* m_contextElement;
 
         // SVGFitToViewBox
-        DECLARE_ANIMATED_PROPERTY(SVGViewSpec, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
         DECLARE_ANIMATED_PROPERTY(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 
         mutable RefPtr<SVGTransformList> m_transform;
diff --git a/WebCore/svg/SVGZoomEvent.idl b/WebCore/svg/SVGZoomEvent.idl
index 520f202..7ddd08f 100644
--- a/WebCore/svg/SVGZoomEvent.idl
+++ b/WebCore/svg/SVGZoomEvent.idl
@@ -26,7 +26,7 @@
 module svg {
 
     interface [Conditional=SVG] SVGZoomEvent : UIEvent { 
-        readonly attribute [Immutable] SVGRect zoomRectScreen;
+        readonly attribute SVGRect zoomRectScreen;
         readonly attribute float previousScale;
         readonly attribute [Immutable] SVGPoint previousTranslate;
         readonly attribute float newScale;
diff --git a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
index ac7b54b..b3258c8 100644
--- a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
@@ -73,7 +73,8 @@ PropertyType& LowerProperty##BaseValue() const \
 void set##UpperProperty##BaseValue(const PropertyType& type) \
 { \
     m_##LowerProperty.value = type; \
-    invalidateSVGAttributes(); \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    contextElement->invalidateSVGAttributes(); \
 } \
 \
 void synchronize##UpperProperty() \
@@ -81,13 +82,15 @@ void synchronize##UpperProperty() \
     if (!m_##LowerProperty.shouldSynchronize) \
          return; \
     AtomicString value(SVGPropertyTraits<PropertyType>::toString(LowerProperty##BaseValue())); \
-    SVGAnimatedPropertySynchronizer<IsDerivedFromSVGElement<OwnerType>::value>::synchronize(this, DOMAttribute, value); \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    SVGAnimatedPropertySynchronizer<IsDerivedFromSVGElement<OwnerType>::value>::synchronize(contextElement, DOMAttribute, value); \
 } \
 \
 PassRefPtr<TearOffType> LowerProperty##Animated() \
 { \
     m_##LowerProperty.shouldSynchronize = true; \
-    return SVGAnimatedProperty::lookupOrCreateWrapper<TearOffType, PropertyType>(this, DOMAttribute, SVGDOMAttributeIdentifier, m_##LowerProperty.value); \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    return SVGAnimatedProperty::lookupOrCreateWrapper<TearOffType, PropertyType>(contextElement, DOMAttribute, SVGDOMAttributeIdentifier, m_##LowerProperty.value); \
 } \
 private: \
     mutable SVGSynchronizableAnimatedProperty<PropertyType> m_##LowerProperty;
@@ -103,7 +106,8 @@ DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.local
 \
 void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
 { \
-    SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGAnimatedListPropertyTearOff<PropertyType> >(this, DOMAttribute.localName()); \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGAnimatedListPropertyTearOff<PropertyType> >(contextElement, DOMAttribute.localName()); \
     if (!wrapper) \
         return; \
     static_cast<SVGAnimatedListPropertyTearOff<PropertyType>*>(wrapper)->detachListWrappers(newListSize); \

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list