Reviewed by Oliver.
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2008 23:09:47 +0000 (23:09 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2008 23:09:47 +0000 (23:09 +0000)
Fix dynamic updates of <circle> element's properties.

Added tests: svg/dynamic-updates/SVGCircleElement*

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
WebCore/ChangeLog
WebCore/svg/SVGCircleElement.cpp
WebCore/svg/SVGCircleElement.h

index 2330436..fd3a0b9 100644 (file)
@@ -1,5 +1,43 @@
 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
 
+        Reviewed by Oliver.
+
+        Next round of dynamic update tests, for SVGCircleElement.
+
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr.html: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js: Added.
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js: Added.
+        * svg/dynamic-updates/resources/SVGTestCase.js:
+
+2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
+
         Reviewed by Holger.
 
         Add first files of my new SVG 1.1 dynamic updates testsuite.
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum
new file mode 100644 (file)
index 0000000..e455423
--- /dev/null
@@ -0,0 +1 @@
+7020bf4ba458dad3b1e1d405dfc325b0
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png
new file mode 100644 (file)
index 0000000..250c24d
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt
new file mode 100644 (file)
index 0000000..34fb3a5
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'cx' attribute of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.getAttribute('cx') is "-150"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.getAttribute('cx') is "150"
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html
new file mode 100644 (file)
index 0000000..62717dc
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-dom-cx-attr.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum
new file mode 100644 (file)
index 0000000..fc5147d
--- /dev/null
@@ -0,0 +1 @@
+970b0312022848b5c17a1bfe92ae1d89
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png
new file mode 100644 (file)
index 0000000..36b266d
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt
new file mode 100644 (file)
index 0000000..0ce90c7
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'cy' attribute of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.getAttribute('cy') is "-150"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.getAttribute('cy') is "150"
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html
new file mode 100644 (file)
index 0000000..5cd9a1f
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-dom-cy-attr.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum
new file mode 100644 (file)
index 0000000..6d58a3c
--- /dev/null
@@ -0,0 +1 @@
+b32c7751bc22d2a234eaea49d2d7adcb
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png
new file mode 100644 (file)
index 0000000..6299f2c
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt
new file mode 100644 (file)
index 0000000..f75dbf4
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'r' attribute of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.getAttribute('r') is "0"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.getAttribute('r') is "150"
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr.html
new file mode 100644 (file)
index 0000000..15a4062
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-dom-r-attr.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum
new file mode 100644 (file)
index 0000000..1b87f84
--- /dev/null
@@ -0,0 +1 @@
+c59be70733665b02196328bbcb33b2e4
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png
new file mode 100644 (file)
index 0000000..a5619d7
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt
new file mode 100644 (file)
index 0000000..200d5ab
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'cx' property of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.cx.baseVal.value is -150
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.cx.baseVal.value is 150
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html
new file mode 100644 (file)
index 0000000..571ff7a
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-svgdom-cx-prop.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum
new file mode 100644 (file)
index 0000000..63c487b
--- /dev/null
@@ -0,0 +1 @@
+6e36d3419852ce34abc2d867cc7bc178
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png
new file mode 100644 (file)
index 0000000..5eb7be0
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt
new file mode 100644 (file)
index 0000000..3f665e8
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'cy' property of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.cy.baseVal.value is -150
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.cy.baseVal.value is 150
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html
new file mode 100644 (file)
index 0000000..aad94b5
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-svgdom-cy-prop.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum
new file mode 100644 (file)
index 0000000..bfd9c91
--- /dev/null
@@ -0,0 +1 @@
+8dc9a83d6884048b443173690cd6f639
\ No newline at end of file
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png
new file mode 100644 (file)
index 0000000..66126d5
Binary files /dev/null and b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt
new file mode 100644 (file)
index 0000000..159caeb
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'r' property of the SVGCircleElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS circleElement.r.baseVal.value is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS circleElement.r.baseVal.value is 150
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html b/LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html
new file mode 100644 (file)
index 0000000..fb95745
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="resources/SVGCircleElement-svgdom-r-prop.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js
new file mode 100644 (file)
index 0000000..6456d31
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-dom-cx-attr.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'cx' attribute of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "-150");
+circleElement.setAttribute("cy", "150");
+circleElement.setAttribute("r", "150");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBeEqualToString("circleElement.getAttribute('cx')", "-150");
+
+function executeTest() {
+    circleElement.setAttribute("cx", "150");
+    shouldBeEqualToString("circleElement.getAttribute('cx')", "150");
+
+    waitForClickEvent(circleElement);
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js
new file mode 100644 (file)
index 0000000..12928b2
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-dom-cy-attr.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'cy' attribute of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "150");
+circleElement.setAttribute("cy", "-150");
+circleElement.setAttribute("r", "150");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBeEqualToString("circleElement.getAttribute('cy')", "-150");
+
+function executeTest() {
+    circleElement.setAttribute("cy", "150");
+    shouldBeEqualToString("circleElement.getAttribute('cy')", "150");
+
+    waitForClickEvent(circleElement);
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js
new file mode 100644 (file)
index 0000000..b9b5a33
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-dom-r-attr.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'r' attribute of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "150");
+circleElement.setAttribute("cy", "150");
+circleElement.setAttribute("r", "0");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBeEqualToString("circleElement.getAttribute('r')", "0");
+
+function executeTest() {
+    circleElement.setAttribute("r", "150");
+    shouldBeEqualToString("circleElement.getAttribute('r')", "150");
+
+    waitForClickEvent(circleElement);
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js
new file mode 100644 (file)
index 0000000..385f30a
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-svgdom-cx-prop.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'cx' property of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "-150");
+circleElement.setAttribute("cy", "150");
+circleElement.setAttribute("r", "150");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBe("circleElement.cx.baseVal.value", "-150");
+
+function executeTest() {
+    circleElement.cx.baseVal.value = "150";
+    shouldBe("circleElement.cx.baseVal.value", "150");
+
+    waitForClickEvent(circleElement);
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js
new file mode 100644 (file)
index 0000000..ee7d3b5
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-svgdom-cy-prop.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'cy' property of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "150");
+circleElement.setAttribute("cy", "-150");
+circleElement.setAttribute("r", "150");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBe("circleElement.cy.baseVal.value", "-150");
+
+function executeTest() {
+    circleElement.cy.baseVal.value = "150";
+    shouldBe("circleElement.cy.baseVal.value", "150");
+
+    waitForClickEvent(circleElement);
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js b/LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js
new file mode 100644 (file)
index 0000000..afa4883
--- /dev/null
@@ -0,0 +1,25 @@
+// [Name] SVGCircleElement-svgdom-r-prop.js
+// [Expected rendering result] green circle - and a series of PASS mesages
+
+description("Tests dynamic updates of the 'r' property of the SVGCircleElement object")
+createSVGTestCase();
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "150");
+circleElement.setAttribute("cy", "150");
+circleElement.setAttribute("r", "0");
+circleElement.setAttribute("fill", "green");
+
+rootSVGElement.appendChild(circleElement);
+shouldBe("circleElement.r.baseVal.value", "0");
+
+function executeTest() {
+    circleElement.r.baseVal.value = "150";
+    shouldBe("circleElement.r.baseVal.value", "150");
+
+    waitForClickEvent(circleElement); 
+    triggerUpdate();
+}
+
+window.setTimeout("executeTest()", 0);
+var successfullyParsed = true;
index 0af9436..4639295 100644 (file)
@@ -31,7 +31,7 @@ function triggerUpdate() {
     window.setTimeout("sendMouseEvent()", 0);
 }
 
-function testFinished() {
+function waitForClickEvent(obj) {
     if (window.layoutTestController)
-        layoutTestController.notifyDone();
+        obj.setAttribute("onclick", "layoutTestController.notifyDone()");
 }
index 3479805..651c5e5 100644 (file)
@@ -1,3 +1,15 @@
+2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Oliver.
+
+        Fix dynamic updates of <circle> element's properties.
+
+        Added tests: svg/dynamic-updates/SVGCircleElement*
+
+        * svg/SVGCircleElement.cpp:
+        (WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
+        * svg/SVGCircleElement.h:
+
 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
 
         Wx build fix.  Add WebCore/plugins to the include path.
index 3bcbdc1..9d82960 100644 (file)
@@ -78,8 +78,8 @@ void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName)
     if (!renderer())
         return;
 
-    if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
-        attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr ||
+    if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr ||
+        attrName == SVGNames::rAttr ||
         SVGTests::isKnownAttribute(attrName) ||
         SVGLangSpace::isKnownAttribute(attrName) ||
         SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
index e968bc4..2e0e8c8 100644 (file)
 #include "SVGStyledTransformableElement.h"
 #include "SVGTests.h"
 
-namespace WebCore
-{
+namespace WebCore {
+
     class SVGCircleElement : public SVGStyledTransformableElement,
                              public SVGTests,
                              public SVGLangSpace,
-                             public SVGExternalResourcesRequired
-    {
+                             public SVGExternalResourcesRequired {
     public:
         SVGCircleElement(const QualifiedName&, Document*);
         virtual ~SVGCircleElement();