[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

zimmermann at webkit.org zimmermann at webkit.org
Thu Apr 8 01:00:02 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 47472fd767913d102d298ac8345f450fa3aa087c
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 11 19:23:53 2010 +0000

    2010-01-11  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Adam Roben & Dirk Schulze.
    
            svg <text> fails to update when setting x/y
            https://bugs.webkit.org/show_bug.cgi?id=22384
    
            Introduce JSSVGPODListCustom, refactoring the existing custom code for SVG POD type lists.
            (Currently SVGTransformList/SVGPointList was handled correctly, and SVGLengthList/SVGNumberList not)
    
            Remove the need for custom JSSVG*List.cpp implementations, but instead tweak CodeGeneratorJS.pm,
            to call into the new JSSVGPODListCustom methods. Fixes dynamic updates of the SVGTextElement
            'rotate' & 'x'/'y' SVG DOM properties.
    
            Tests: svg/custom/text-xy-updates-SVGList.xhtml
                   svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
    
            * Android.jscbindings.mk: Remove old files from build, add the new header.
            * GNUmakefile.am: Ditto.
            * WebCore.gypi: Ditto.
            * WebCore.pro: Ditto.
            * WebCore.vcproj/WebCore.vcproj: Ditto.
            * WebCore.xcodeproj/project.pbxproj: Ditto.
            * bindings/js/JSSVGPODListCustom.h: Copied from bindings/js/JSSVGTransformListCustom.cpp. Refactored code to be sharable between all JSSVG*List classes.
            (WebCore::JSSVGPODListCustom::finishGetter):
            (WebCore::JSSVGPODListCustom::finishSetter):
            (WebCore::JSSVGPODListCustom::finishSetterReadOnlyResult):
            (WebCore::JSSVGPODListCustom::clear):
            (WebCore::JSSVGPODListCustom::initialize):
            (WebCore::JSSVGPODListCustom::getItem):
            (WebCore::JSSVGPODListCustom::insertItemBefore):
            (WebCore::JSSVGPODListCustom::replaceItem):
            (WebCore::JSSVGPODListCustom::removeItem):
            (WebCore::JSSVGPODListCustom::appendItem):
            * bindings/js/JSSVGPointListCustom.cpp: Removed.
            * bindings/js/JSSVGTransformListCustom.cpp: Removed.
            * bindings/scripts/CodeGeneratorJS.pm: Forward any SVGList call on POD list types to the new JSSVGPODListCustom.
            * svg/SVGNumberList.cpp: Make SVGNumberList a SVGPODList, instead of a SVGList, to make dynamic updates work.
            (WebCore::SVGNumberList::SVGNumberList):
            * svg/SVGNumberList.h:
            * svg/SVGPointList.idl: Remove JSCCustom markers everywhere.
            * svg/SVGTransformList.idl: Ditto.
    2010-01-11  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Adam Roben & Dirk Schulze.
    
            svg <text> fails to update when setting x/y
            https://bugs.webkit.org/show_bug.cgi?id=22384
    
            Add simple tests covering SVGLengthList & SVGNumberList updates.
    
            * platform/mac/svg/custom/text-xy-updates-SVGList-expected.checksum: Added.
            * platform/mac/svg/custom/text-xy-updates-SVGList-expected.png: Added.
            * platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt: Added.
            * svg/custom/text-xy-updates-SVGList.xhtml: Added.
            * svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop-expected.txt: Added.
            * svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html: Added.
            * svg/dynamic-updates/script-tests/SVGTextElement-svgdom-rotate-prop.js: Added.
            (executeTest):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b172318..b1558ce 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-11  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Adam Roben & Dirk Schulze.
+
+        svg <text> fails to update when setting x/y
+        https://bugs.webkit.org/show_bug.cgi?id=22384
+
+        Add simple tests covering SVGLengthList & SVGNumberList updates.
+
+        * platform/mac/svg/custom/text-xy-updates-SVGList-expected.checksum: Added.
+        * platform/mac/svg/custom/text-xy-updates-SVGList-expected.png: Added.
+        * platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt: Added.
+        * svg/custom/text-xy-updates-SVGList.xhtml: Added.
+        * svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html: Added.
+        * svg/dynamic-updates/script-tests/SVGTextElement-svgdom-rotate-prop.js: Added.
+        (executeTest):
+
 2010-01-08  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.checksum b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.checksum
new file mode 100644
index 0000000..17baabb
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.checksum
@@ -0,0 +1 @@
+b3a470b3776cb6b6acd879d8d3738992
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.png b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.png
new file mode 100644
index 0000000..1b7cd5f
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt
new file mode 100644
index 0000000..68882bb
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/text-xy-updates-SVGList-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 808x620
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 808x620
+  RenderBlock {html} at (0,0) size 785x620
+    RenderBody {body} at (8,8) size 769x604
+      RenderSVGRoot {svg:svg} at (208,14) size 166x18
+        RenderSVGText {text} at (200,20) size 166x18 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,-14) size 166x18
+            chunk 1 text run 1 at (200.00,20.00) startOffset 0 endOffset 28 width 166.00: "Passes, if text is at 200x20"
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/svg/custom/text-xy-updates-SVGList.xhtml b/LayoutTests/svg/custom/text-xy-updates-SVGList.xhtml
new file mode 100644
index 0000000..d5b372f
--- /dev/null
+++ b/LayoutTests/svg/custom/text-xy-updates-SVGList.xhtml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+    <script type="text/javascript">
+        if (window.layoutTestController)
+            layoutTestController.waitUntilDone();
+
+        function createSVGLength(e, value) {
+            var result = e.ownerSVGElement.createSVGLength();
+            result.value = value;
+            return result;
+        };
+
+        function shifter() {
+            var e = document.getElementById("ttt");
+            e.x.baseVal.initialize(createSVGLength(e, 200));
+            e.y.baseVal.initialize(createSVGLength(e, 20));
+            if (window.layoutTestController)
+                layoutTestController.notifyDone();
+        };
+        
+        window.onload = function() {
+            window.setTimeout(shifter, 0);
+        };
+    </script>
+</head>
+<body>
+<svg:svg
+    xmlns="http://www.w3.org/2000/svg"
+    version="1.1" baseProfile="full" width="800" height="600">
+    <text id="ttt" x="10" y="200">Passes, if text is at 200x20</text>
+</svg:svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop-expected.txt
new file mode 100644
index 0000000..6efdd44
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop-expected.txt
@@ -0,0 +1,14 @@
+SVG 1.1 dynamic update tests
+
+Text content
+Tests dynamic updates of the 'rotate' property of the SVGTextElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textElement.rotate.baseVal.getItem(0).value is -90
+PASS textElement.rotate.baseVal.getItem(0).value is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html b/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
new file mode 100644
index 0000000..c24f9f2
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGTextElement-svgdom-rotate-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGTextElement-svgdom-rotate-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGTextElement-svgdom-rotate-prop.js
new file mode 100644
index 0000000..3c1aed3
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGTextElement-svgdom-rotate-prop.js
@@ -0,0 +1,24 @@
+// [Name] SVGTextElement-svgdom-rotate-prop.js
+// [Expected rendering result] 'Test passed' message - and a series of PASS messages
+description("Tests dynamic updates of the 'rotate' property of the SVGTextElement object")
+createSVGTestCase();
+
+var textElement = createSVGElement("text");
+textElement.setAttribute("x", "0");
+textElement.setAttribute("y", "215");
+textElement.setAttribute("rotate", "-90");
+textElement.textContent = "Text content";
+rootSVGElement.appendChild(textElement);
+
+shouldBe("textElement.rotate.baseVal.getItem(0).value", "-90");
+
+function executeTest() {
+    textElement.rotate.baseVal.getItem(0).value = 0;
+    shouldBe("textElement.rotate.baseVal.getItem(0).value", "0");
+
+    completeTest();
+}
+
+startTest(textElement, 10, 210);
+
+var successfullyParsed = true;
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk
index 7055b90..1ec3ab2 100644
--- a/WebCore/Android.jscbindings.mk
+++ b/WebCore/Android.jscbindings.mk
@@ -143,8 +143,6 @@ LOCAL_SRC_FILES += \
 	bindings/js/JSSVGMatrixCustom.cpp \
 	bindings/js/JSSVGPathSegCustom.cpp \
 	bindings/js/JSSVGPathSegListCustom.cpp \
-	bindings/js/JSSVGPointListCustom.cpp \
-	bindings/js/JSSVGTransformListCustom.cpp \
 	bindings/js/JSSharedWorkerConstructor.cpp \
 	bindings/js/JSSharedWorkerCustom.cpp \
 	bindings/js/JSStorageCustom.cpp \
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 72410e6..020fef7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,46 @@
+2010-01-11  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Adam Roben & Dirk Schulze.
+
+        svg <text> fails to update when setting x/y
+        https://bugs.webkit.org/show_bug.cgi?id=22384
+
+        Introduce JSSVGPODListCustom, refactoring the existing custom code for SVG POD type lists.
+        (Currently SVGTransformList/SVGPointList was handled correctly, and SVGLengthList/SVGNumberList not)
+
+        Remove the need for custom JSSVG*List.cpp implementations, but instead tweak CodeGeneratorJS.pm,
+        to call into the new JSSVGPODListCustom methods. Fixes dynamic updates of the SVGTextElement
+        'rotate' & 'x'/'y' SVG DOM properties.
+
+        Tests: svg/custom/text-xy-updates-SVGList.xhtml
+               svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
+  
+        * Android.jscbindings.mk: Remove old files from build, add the new header.
+        * GNUmakefile.am: Ditto.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/js/JSSVGPODListCustom.h: Copied from bindings/js/JSSVGTransformListCustom.cpp. Refactored code to be sharable between all JSSVG*List classes.
+        (WebCore::JSSVGPODListCustom::finishGetter):
+        (WebCore::JSSVGPODListCustom::finishSetter):
+        (WebCore::JSSVGPODListCustom::finishSetterReadOnlyResult):
+        (WebCore::JSSVGPODListCustom::clear):
+        (WebCore::JSSVGPODListCustom::initialize):
+        (WebCore::JSSVGPODListCustom::getItem):
+        (WebCore::JSSVGPODListCustom::insertItemBefore):
+        (WebCore::JSSVGPODListCustom::replaceItem):
+        (WebCore::JSSVGPODListCustom::removeItem):
+        (WebCore::JSSVGPODListCustom::appendItem):
+        * bindings/js/JSSVGPointListCustom.cpp: Removed.
+        * bindings/js/JSSVGTransformListCustom.cpp: Removed.
+        * bindings/scripts/CodeGeneratorJS.pm: Forward any SVGList call on POD list types to the new JSSVGPODListCustom.
+        * svg/SVGNumberList.cpp: Make SVGNumberList a SVGPODList, instead of a SVGList, to make dynamic updates work.
+        (WebCore::SVGNumberList::SVGNumberList):
+        * svg/SVGNumberList.h:
+        * svg/SVGPointList.idl: Remove JSCCustom markers everywhere.
+        * svg/SVGTransformList.idl: Ditto.
+
 2010-01-08  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index c1c8d45..9745fb7 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2915,11 +2915,10 @@ webcore_sources += \
 	WebCore/bindings/js/JSSVGElementInstanceCustom.cpp \
 	WebCore/bindings/js/JSSVGLengthCustom.cpp \
 	WebCore/bindings/js/JSSVGMatrixCustom.cpp \
+	WebCore/bindings/js/JSSVGPODListCustom.h \
 	WebCore/bindings/js/JSSVGPODTypeWrapper.h \
 	WebCore/bindings/js/JSSVGPathSegCustom.cpp \
 	WebCore/bindings/js/JSSVGPathSegListCustom.cpp \
-	WebCore/bindings/js/JSSVGPointListCustom.cpp \
-	WebCore/bindings/js/JSSVGTransformListCustom.cpp \
 	WebCore/css/SVGCSSComputedStyleDeclaration.cpp \
 	WebCore/css/SVGCSSParser.cpp \
 	WebCore/css/SVGCSSStyleSelector.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 4c1d15d..e763b4c 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -580,9 +580,8 @@
             'bindings/js/JSSVGMatrixCustom.cpp',
             'bindings/js/JSSVGPathSegCustom.cpp',
             'bindings/js/JSSVGPathSegListCustom.cpp',
+            'bindings/js/JSSVGPODListCustom.h',
             'bindings/js/JSSVGPODTypeWrapper.h',
-            'bindings/js/JSSVGPointListCustom.cpp',
-            'bindings/js/JSSVGTransformListCustom.cpp',
             'bindings/js/JSTextCustom.cpp',
             'bindings/js/JSTreeWalkerCustom.cpp',
             'bindings/js/JSWebKitCSSMatrixConstructor.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 6f03838..6b5dab7 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2938,8 +2938,6 @@ contains(DEFINES, ENABLE_SVG=1) {
         bindings/js/JSSVGMatrixCustom.cpp \
         bindings/js/JSSVGPathSegCustom.cpp \
         bindings/js/JSSVGPathSegListCustom.cpp \
-        bindings/js/JSSVGPointListCustom.cpp \
-        bindings/js/JSSVGTransformListCustom.cpp \
         css/SVGCSSComputedStyleDeclaration.cpp \
         css/SVGCSSParser.cpp \
         css/SVGCSSStyleSelector.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 4bc15f7..52b9a2a 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -39124,63 +39124,11 @@
 					</FileConfiguration>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSSVGPODTypeWrapper.h"
+					RelativePath="..\bindings\js\JSSVGPODListCustom.h"
 					>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSSVGPointListCustom.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_Internal|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_Cairo|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release_Cairo|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_All|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\bindings\js\JSSVGTransformListCustom.cpp"
+					RelativePath="..\bindings\js\JSSVGPODTypeWrapper.h"
 					>
 				</File>
 				<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 98033ff..ca971b1 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -97,6 +97,7 @@
 		0878B1FE10874E3F00A55097 /* SynchronizablePropertyController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0878B1FA10874E3F00A55097 /* SynchronizablePropertyController.cpp */; };
 		0878B1FF10874E3F00A55097 /* SynchronizablePropertyController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0878B1FB10874E3F00A55097 /* SynchronizablePropertyController.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0878B20010874E3F00A55097 /* SynchronizableTypeWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 0878B1FC10874E3F00A55097 /* SynchronizableTypeWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		087D97BF10FB8D7700C00874 /* JSSVGPODListCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */; };
 		087FFA0F0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 087FFA0D0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp */; };
 		087FFA100EFF3ED3009DBD88 /* WMLInsertedLegendElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 087FFA0E0EFF3ED3009DBD88 /* WMLInsertedLegendElement.h */; };
 		08807B760ED709AB003F6975 /* WMLGoElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08807B6A0ED709AB003F6975 /* WMLGoElement.cpp */; };
@@ -1033,7 +1034,6 @@
 		5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */; };
 		5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */; };
 		5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */; };
-		516BB7930CE91E6800512F79 /* JSSVGPointListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */; };
 		516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */; };
 		51741D0F0B07259A00ED442C /* BackForwardList.h in Headers */ = {isa = PBXBuildFile; fileRef = 51741D0B0B07259A00ED442C /* BackForwardList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51741D100B07259A00ED442C /* BackForwardList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51741D0C0B07259A00ED442C /* BackForwardList.cpp */; };
@@ -3825,7 +3825,6 @@
 		B2CB92640B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */; };
 		B2CCEC470C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2CCEC450C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp */; };
 		B2CCEC480C6CA9F1006A5424 /* RenderSVGViewportContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = B2CCEC460C6CA9F1006A5424 /* RenderSVGViewportContainer.h */; };
-		B2D3FC8A0C2212CB00CF3618 /* JSSVGTransformListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */; };
 		B2E27C9F0B0F2B0900F17C7B /* FloatPoint3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */; };
 		B2E27CA00B0F2B0900F17C7B /* FloatPoint3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2E4EC970D00C22B00432643 /* SVGZoomEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */; };
@@ -5326,6 +5325,7 @@
 		0878B1FA10874E3F00A55097 /* SynchronizablePropertyController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SynchronizablePropertyController.cpp; sourceTree = "<group>"; };
 		0878B1FB10874E3F00A55097 /* SynchronizablePropertyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronizablePropertyController.h; sourceTree = "<group>"; };
 		0878B1FC10874E3F00A55097 /* SynchronizableTypeWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronizableTypeWrapper.h; sourceTree = "<group>"; };
+		087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGPODListCustom.h; sourceTree = "<group>"; };
 		087FFA0D0EFF3ED3009DBD88 /* WMLInsertedLegendElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLInsertedLegendElement.cpp; sourceTree = "<group>"; };
 		087FFA0E0EFF3ED3009DBD88 /* WMLInsertedLegendElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLInsertedLegendElement.h; sourceTree = "<group>"; };
 		08807B6A0ED709AB003F6975 /* WMLGoElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLGoElement.cpp; sourceTree = "<group>"; };
@@ -6364,7 +6364,6 @@
 		5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemPOSIX.cpp; sourceTree = "<group>"; };
 		5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemCF.cpp; sourceTree = "<group>"; };
 		5160F4970B0AA75F00C1D2AF /* HistoryItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HistoryItemMac.mm; path = mac/HistoryItemMac.mm; sourceTree = "<group>"; };
-		516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGPointListCustom.cpp; sourceTree = "<group>"; };
 		516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTreeWalkerCustom.cpp; sourceTree = "<group>"; };
 		51741D0B0B07259A00ED442C /* BackForwardList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackForwardList.h; sourceTree = "<group>"; };
 		51741D0C0B07259A00ED442C /* BackForwardList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackForwardList.cpp; sourceTree = "<group>"; };
@@ -9006,7 +9005,6 @@
 		B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGElementInstanceList.mm; sourceTree = "<group>"; };
 		B2CCEC450C6CA9F1006A5424 /* RenderSVGViewportContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGViewportContainer.cpp; sourceTree = "<group>"; };
 		B2CCEC460C6CA9F1006A5424 /* RenderSVGViewportContainer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderSVGViewportContainer.h; sourceTree = "<group>"; };
-		B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGTransformListCustom.cpp; sourceTree = "<group>"; };
 		B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPoint3D.cpp; sourceTree = "<group>"; };
 		B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatPoint3D.h; sourceTree = "<group>"; };
 		B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGZoomEvent.cpp; sourceTree = "<group>"; };
@@ -14666,10 +14664,9 @@
 				08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */,
 				08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */,
 				B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */,
+				087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */,
 				B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
 				B297BC6F0B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp */,
-				516BB7910CE91E6800512F79 /* JSSVGPointListCustom.cpp */,
-				B2D3FC890C2212CB00CF3618 /* JSSVGTransformListCustom.cpp */,
 				1A2C40AA0DEB55AA005AF19E /* JSTextCustom.cpp */,
 				516BB7920CE91E6800512F79 /* JSTreeWalkerCustom.cpp */,
 				518A34C61026C8C9001B6896 /* JSWebSocketCustom.cpp */,
@@ -18327,6 +18324,7 @@
 				37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */,
 				0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */,
 				CE4C00E610F6F7C100CA38F5 /* HTMLNoScriptElement.h in Headers */,
+				087D97BF10FB8D7700C00874 /* JSSVGPODListCustom.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -19706,7 +19704,6 @@
 				B2FA3DE00AB75A6F000E5AC4 /* JSSVGPatternElement.cpp in Sources */,
 				8542A7960AE5C94200DF58DF /* JSSVGPoint.cpp in Sources */,
 				B2FA3DE20AB75A6F000E5AC4 /* JSSVGPointList.cpp in Sources */,
-				516BB7930CE91E6800512F79 /* JSSVGPointListCustom.cpp in Sources */,
 				B2FA3DE50AB75A6F000E5AC4 /* JSSVGPolygonElement.cpp in Sources */,
 				B2FA3DE70AB75A6F000E5AC4 /* JSSVGPolylineElement.cpp in Sources */,
 				B2FA3DE90AB75A6F000E5AC4 /* JSSVGPreserveAspectRatio.cpp in Sources */,
@@ -19729,7 +19726,6 @@
 				B2FA3E080AB75A6F000E5AC4 /* JSSVGTitleElement.cpp in Sources */,
 				B2FA3E0A0AB75A6F000E5AC4 /* JSSVGTransform.cpp in Sources */,
 				B2FA3E0C0AB75A6F000E5AC4 /* JSSVGTransformList.cpp in Sources */,
-				B2D3FC8A0C2212CB00CF3618 /* JSSVGTransformListCustom.cpp in Sources */,
 				B2FA3E0E0AB75A6F000E5AC4 /* JSSVGTRefElement.cpp in Sources */,
 				B2FA3E100AB75A6F000E5AC4 /* JSSVGTSpanElement.cpp in Sources */,
 				B2FA3E120AB75A6F000E5AC4 /* JSSVGUnitTypes.cpp in Sources */,
diff --git a/WebCore/bindings/js/JSSVGPODListCustom.h b/WebCore/bindings/js/JSSVGPODListCustom.h
new file mode 100644
index 0000000..3852505
--- /dev/null
+++ b/WebCore/bindings/js/JSSVGPODListCustom.h
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
+ * Copyright (C) 2008 Apple Inc. 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 JSSVGPODListCustom_h
+#define JSSVGPODListCustom_h
+
+#include "JSSVGPODTypeWrapper.h"
+#include "SVGList.h"
+
+namespace WebCore {
+
+namespace JSSVGPODListCustom {
+
+// Helper structure only containing public typedefs, as C++ does not allow templatized typedefs
+template<typename PODType>
+struct JSSVGPODListTraits { 
+    typedef SVGPODListItem<PODType> PODListItem;
+    typedef SVGList<RefPtr<PODListItem> > PODList;
+    typedef PODType (*ConversionCallback)(JSC::JSValue);
+};
+
+template<typename PODType>
+static JSC::JSValue finishGetter(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
+                                 typename JSSVGPODListTraits<PODType>::PODList* list,
+                                 PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+    if (ec) {
+        setDOMException(exec, ec);
+        return JSC::jsUndefined();
+    }
+
+    return toJS(exec, deprecatedGlobalObjectForPrototype(exec),
+                JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), list->associatedAttributeName()).get(), context);
+}
+
+template<typename PODType>
+static JSC::JSValue finishSetter(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
+                                 typename JSSVGPODListTraits<PODType>::PODList* list,
+                                 PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+    if (ec) {
+        setDOMException(exec, ec);
+        return JSC::jsUndefined();
+    }
+
+    const QualifiedName& attributeName = list->associatedAttributeName();
+    context->svgAttributeChanged(attributeName);
+
+    return toJS(exec, deprecatedGlobalObjectForPrototype(exec),
+                JSSVGPODTypeWrapperCreatorForList<PODType>::create(item.get(), attributeName).get(), context);
+}
+
+template<typename PODType>
+static JSC::JSValue finishSetterReadOnlyResult(JSC::ExecState* exec, ExceptionCode& ec, SVGElement* context,
+                                               typename JSSVGPODListTraits<PODType>::PODList* list,
+                                               PassRefPtr<typename JSSVGPODListTraits<PODType>::PODListItem> item)
+{
+    if (ec) {
+        setDOMException(exec, ec);
+        return JSC::jsUndefined();
+    }
+    context->svgAttributeChanged(list->associatedAttributeName());
+    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<PODType>::create(*item).get(), context);
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue clear(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList&,
+                          typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    listImp->clear(ec);
+
+    if (ec)
+        setDOMException(exec, ec);
+    else
+        wrapper->context()->svgAttributeChanged(listImp->associatedAttributeName());
+
+    return JSC::jsUndefined();
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue initialize(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                               typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishSetter<PODType>(exec, ec, wrapper->context(), listImp,
+                                 listImp->initialize(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), ec));
+
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue getItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                            typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+    bool indexOk = false;
+    unsigned index = args.at(0).toUInt32(exec, indexOk);
+    if (!indexOk) {
+        setDOMException(exec, TYPE_MISMATCH_ERR);
+        return JSC::jsUndefined();
+    }
+
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishGetter<PODType>(exec, ec, wrapper->context(), listImp,
+                                 listImp->getItem(index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue insertItemBefore(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                                     typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+    bool indexOk = false;
+    unsigned index = args.at(1).toUInt32(exec, indexOk);
+    if (!indexOk) {
+        setDOMException(exec, TYPE_MISMATCH_ERR);
+        return JSC::jsUndefined();
+    }
+
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishSetter<PODType>(exec, ec, wrapper->context(), listImp,
+                                 listImp->insertItemBefore(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue replaceItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                                typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+    bool indexOk = false;
+    unsigned index = args.at(1).toUInt32(exec, indexOk);
+    if (!indexOk) {
+        setDOMException(exec, TYPE_MISMATCH_ERR);
+        return JSC::jsUndefined();
+    }
+
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishSetter<PODType>(exec, ec, wrapper->context(), listImp,
+                                 listImp->replaceItem(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue removeItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                               typename JSSVGPODListTraits<PODType>::ConversionCallback)
+{
+    bool indexOk = false;
+    unsigned index = args.at(0).toUInt32(exec, indexOk);
+    if (!indexOk) {
+        setDOMException(exec, TYPE_MISMATCH_ERR);
+        return JSC::jsUndefined();
+    }
+
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishSetterReadOnlyResult<PODType>(exec, ec, wrapper->context(), listImp,
+                                               listImp->removeItem(index, ec));
+}
+
+template<typename JSPODListType, typename PODType>
+static JSC::JSValue appendItem(JSPODListType* wrapper, JSC::ExecState* exec, const JSC::ArgList& args,
+                               typename JSSVGPODListTraits<PODType>::ConversionCallback conversion)
+{
+    ExceptionCode ec = 0;
+    typename JSSVGPODListTraits<PODType>::PODList* listImp = wrapper->impl();
+    return finishSetter<PODType>(exec, ec, wrapper->context(), listImp,
+                                 listImp->appendItem(JSSVGPODListTraits<PODType>::PODListItem::copy(conversion(args.at(0))), ec));
+}
+
+}
+
+}
+
+#endif
diff --git a/WebCore/bindings/js/JSSVGPointListCustom.cpp b/WebCore/bindings/js/JSSVGPointListCustom.cpp
deleted file mode 100644
index 1969fe2..0000000
--- a/WebCore/bindings/js/JSSVGPointListCustom.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
- * Copyright (C) 2008 Apple Inc. 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.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "JSSVGPointList.h"
-
-#include "JSSVGPoint.h"
-#include "SVGPointList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-typedef SVGPODListItem<FloatPoint> PODListItem;
-typedef SVGList<RefPtr<PODListItem> > SVGPointListBase;
-
-static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem > item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), list->associatedAttributeName()).get(), context);
-}
-
-static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem > item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    const QualifiedName& attributeName = list->associatedAttributeName();
-    context->svgAttributeChanged(attributeName);
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<FloatPoint>::create(item.get(), attributeName).get(), context);
-}
-
-static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGPointList* list, PassRefPtr<PODListItem> item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    context->svgAttributeChanged(list->associatedAttributeName());
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<FloatPoint>::create(*item).get(), context);
-}
-
-JSValue JSSVGPointList::clear(ExecState* exec, const ArgList&)
-{
-    ExceptionCode ec = 0;
-    impl()->clear(ec);
-    setDOMException(exec, ec);
-    m_context->svgAttributeChanged(impl()->associatedAttributeName());
-    return jsUndefined();
-}
-
-JSValue JSSVGPointList::initialize(ExecState* exec, const ArgList& args)
-{
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->initialize(PODListItem::copy(toSVGPoint(args.at(0))), ec));
-}
-
-JSValue JSSVGPointList::getItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(0).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishGetter(exec, ec, context(), impl(),
-        listImp->getItem(index, ec));
-}
-
-JSValue JSSVGPointList::insertItemBefore(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(1).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->insertItemBefore(PODListItem::copy(toSVGPoint(args.at(0))), index, ec));
-}
-
-JSValue JSSVGPointList::replaceItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(1).toInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->replaceItem(PODListItem::copy(toSVGPoint(args.at(0))), index, ec));
-}
-
-JSValue JSSVGPointList::removeItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(0).toInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishSetterReadOnlyResult(exec, ec, context(), impl(),
-        listImp->removeItem(index, ec));
-}
-
-JSValue JSSVGPointList::appendItem(ExecState* exec, const ArgList& args)
-{
-    ExceptionCode ec = 0;
-    SVGPointListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->appendItem(PODListItem::copy(toSVGPoint(args.at(0))), ec));
-}
-
-}
-
-#endif // ENABLE(SVG)
diff --git a/WebCore/bindings/js/JSSVGTransformListCustom.cpp b/WebCore/bindings/js/JSSVGTransformListCustom.cpp
deleted file mode 100644
index 1a9110a..0000000
--- a/WebCore/bindings/js/JSSVGTransformListCustom.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
- * Copyright (C) 2008 Apple Inc. 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.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "JSSVGTransformList.h"
-
-#include "JSSVGTransform.h"
-#include "SVGTransformList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-typedef SVGPODListItem<SVGTransform> PODListItem;
-typedef SVGList<RefPtr<PODListItem> > SVGTransformListBase;
-
-static JSValue finishGetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), list->associatedAttributeName()).get(), context);
-}
-
-static JSValue finishSetter(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    const QualifiedName& attributeName = list->associatedAttributeName();
-    context->svgAttributeChanged(attributeName);
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGPODTypeWrapperCreatorForList<SVGTransform>::create(item.get(), attributeName).get(), context);
-}
-
-static JSValue finishSetterReadOnlyResult(ExecState* exec, ExceptionCode& ec, SVGElement* context, SVGTransformList* list, PassRefPtr<PODListItem> item)
-{
-    if (ec) {
-        setDOMException(exec, ec);
-        return jsUndefined();
-    }
-    context->svgAttributeChanged(list->associatedAttributeName());
-    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<SVGTransform>::create(*item).get(), context);
-}
-
-JSValue JSSVGTransformList::clear(ExecState* exec, const ArgList&)
-{
-    ExceptionCode ec = 0;
-    impl()->clear(ec);
-    setDOMException(exec, ec);
-    m_context->svgAttributeChanged(impl()->associatedAttributeName());
-    return jsUndefined();
-}
-
-JSValue JSSVGTransformList::initialize(ExecState* exec, const ArgList& args)
-{
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->initialize(PODListItem::copy(toSVGTransform(args.at(0))), ec));
-}
-
-JSValue JSSVGTransformList::getItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(0).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishGetter(exec, ec, context(), impl(),
-        listImp->getItem(index, ec));
-}
-
-JSValue JSSVGTransformList::insertItemBefore(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(1).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->insertItemBefore(PODListItem::copy(toSVGTransform(args.at(0))), index, ec));
-}
-
-JSValue JSSVGTransformList::replaceItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(1).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->replaceItem(PODListItem::copy(toSVGTransform(args.at(0))), index, ec));
-}
-
-JSValue JSSVGTransformList::removeItem(ExecState* exec, const ArgList& args)
-{
-    bool indexOk;
-    unsigned index = args.at(0).toUInt32(exec, indexOk);
-    if (!indexOk) {
-        setDOMException(exec, TYPE_MISMATCH_ERR);
-        return jsUndefined();
-    }
-
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishSetterReadOnlyResult(exec, ec, context(), impl(),
-        listImp->removeItem(index, ec));
-}
-
-JSValue JSSVGTransformList::appendItem(ExecState* exec, const ArgList& args)
-{
-    ExceptionCode ec = 0;
-    SVGTransformListBase* listImp = impl();
-    return finishSetter(exec, ec, context(), impl(),
-        listImp->appendItem(PODListItem::copy(toSVGTransform(args.at(0))), ec));
-}
-
-}
-
-#endif // ENABLE(SVG)
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 001c858..f7d0f09 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1588,8 +1588,28 @@ sub GenerateImplementation
                 push(@implContent, "        return jsUndefined();\n");
             }
 
+            # Special case for JSSVGLengthList / JSSVGTransformList / JSSVGPointList / JSSVGNumberList
+            # Instead of having JSSVG*Custom.cpp implementations for the SVGList interface for all of these
+            # classes, we directly forward the calls to JSSVGPODListCustom, which centralizes the otherwise
+            # duplicated code for the JSSVG*List classes mentioned above.
+            my $svgPODListType;
+            if ($implClassName =~ /SVG.*List/) {
+                $svgPODListType = $implClassName;
+                $svgPODListType =~ s/List$//;
+                $svgPODListType = "" unless $codeGenerator->IsPodType($svgPODListType);
+                
+                # Ignore additional (non-SVGList) SVGTransformList methods, that are not handled through JSSVGPODListCustom
+                $svgPODListType = "" if $functionImplementationName =~ /createSVGTransformFromMatrix/;
+                $svgPODListType = "" if $functionImplementationName =~ /consolidate/;
+            }
+
             if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
                 push(@implContent, "    return castedThisObj->" . $functionImplementationName . "(exec, args);\n");
+            } elsif ($svgPODListType) {
+                $implIncludes{"JS${svgPODListType}.h"} = 1;
+                $implIncludes{"JSSVGPODListCustom.h"} = 1;
+                push(@implContent, "    return JSSVGPODListCustom::$functionImplementationName<$className, " . GetNativeType($svgPODListType)
+                                 . ">(castedThisObj, exec, args, to" . $svgPODListType . ");\n");
             } else {
                 if ($podType) {
                     push(@implContent, "    JSSVGPODTypeWrapper<$podType>* wrapper = castedThisObj->impl();\n");
diff --git a/WebCore/svg/SVGNumberList.cpp b/WebCore/svg/SVGNumberList.cpp
index c73e397..11aebde 100644
--- a/WebCore/svg/SVGNumberList.cpp
+++ b/WebCore/svg/SVGNumberList.cpp
@@ -28,7 +28,7 @@
 namespace WebCore {
 
 SVGNumberList::SVGNumberList(const QualifiedName& attributeName)
-    : SVGList<float>(attributeName)
+    : SVGPODList<float>(attributeName)
 {
 }
 
diff --git a/WebCore/svg/SVGNumberList.h b/WebCore/svg/SVGNumberList.h
index 29de27e..329968b 100644
--- a/WebCore/svg/SVGNumberList.h
+++ b/WebCore/svg/SVGNumberList.h
@@ -29,7 +29,7 @@ namespace WebCore {
 
     class String;
 
-    class SVGNumberList : public SVGList<float> {
+    class SVGNumberList : public SVGPODList<float> {
     public:
         static PassRefPtr<SVGNumberList> create(const QualifiedName& attributeName) { return adoptRef(new SVGNumberList(attributeName)); }
         virtual ~SVGNumberList();
diff --git a/WebCore/svg/SVGPointList.idl b/WebCore/svg/SVGPointList.idl
index cf82dff..24b1042 100644
--- a/WebCore/svg/SVGPointList.idl
+++ b/WebCore/svg/SVGPointList.idl
@@ -28,19 +28,19 @@ module svg {
     interface [Conditional=SVG] SVGPointList {
         readonly attribute unsigned long numberOfItems;
 
-        [JSCCustom] void clear()
+        void clear()
             raises(DOMException);
-        [JSCCustom] SVGPoint initialize(in SVGPoint item)
+        SVGPoint initialize(in SVGPoint item)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGPoint getItem(in unsigned long index)
+        SVGPoint getItem(in unsigned long index)
             raises(DOMException);
-        [JSCCustom] SVGPoint insertItemBefore(in SVGPoint item, in unsigned long index)
+        SVGPoint insertItemBefore(in SVGPoint item, in unsigned long index)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGPoint replaceItem(in SVGPoint item, in unsigned long index)
+        SVGPoint replaceItem(in SVGPoint item, in unsigned long index)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGPoint removeItem(in unsigned long index)
+        SVGPoint removeItem(in unsigned long index)
             raises(DOMException);
-        [JSCCustom] SVGPoint appendItem(in SVGPoint item)
+        SVGPoint appendItem(in SVGPoint item)
             raises(DOMException, SVGException);
     };
 
diff --git a/WebCore/svg/SVGTransformList.idl b/WebCore/svg/SVGTransformList.idl
index 8c9c86e..d03351a 100644
--- a/WebCore/svg/SVGTransformList.idl
+++ b/WebCore/svg/SVGTransformList.idl
@@ -29,19 +29,19 @@ module svg {
     interface [Conditional=SVG] SVGTransformList {
         readonly attribute unsigned long numberOfItems;
 
-        [JSCCustom] void clear()
+        void clear()
             raises(DOMException);
-        [JSCCustom] SVGTransform initialize(in SVGTransform item)
+        SVGTransform initialize(in SVGTransform item)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGTransform getItem(in unsigned long index)
+        SVGTransform getItem(in unsigned long index)
             raises(DOMException);
-        [JSCCustom] SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
+        SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
+        SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
             raises(DOMException, SVGException);
-        [JSCCustom] SVGTransform removeItem(in unsigned long index)
+        SVGTransform removeItem(in unsigned long index)
             raises(DOMException);
-        [JSCCustom] SVGTransform appendItem(in SVGTransform item)
+        SVGTransform appendItem(in SVGTransform item)
             raises(DOMException, SVGException);
         SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix);
         SVGTransform consolidate();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list