2010-10-04 Renata Hodovan <reni@inf.u-szeged.hu>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 05:32:41 +0000 (05:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 05:32:41 +0000 (05:32 +0000)
        Reviewed by Andreas Kling.

        SVGFEGaussianBlurElement doesn't support dynamic invalidation, when attributes change.
        https://bugs.webkit.org/show_bug.cgi?id=47074
        Adding layout tests for feGaussianBlur dynamic changes.

        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.txt: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html: Added.
        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-in-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-in-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js: Added.
        (executeTest):
2010-10-04  Renata Hodovan  <reni@inf.u-szeged.hu>

        Reviewed by Andreas Kling.

        SVGFEGaussianBlurElement doesn't support dynamic invalidation, when attributes change.
        https://bugs.webkit.org/show_bug.cgi?id=47074
        The patch also implements the simple setStdDeviation method.

        Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html
               svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html
               svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html
               svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html

        * svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
        (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
        * svg/SVGFEGaussianBlurElement.h:

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

24 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-in-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-in-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/svg/SVGFEGaussianBlurElement.cpp
WebCore/svg/SVGFEGaussianBlurElement.h

index 5138a56..dbec655 100644 (file)
@@ -1,5 +1,38 @@
 2010-10-04  Renata Hodovan  <reni@inf.u-szeged.hu>
 
+        Reviewed by Andreas Kling.
+
+        SVGFEGaussianBlurElement doesn't support dynamic invalidation, when attributes change.
+        https://bugs.webkit.org/show_bug.cgi?id=47074
+        Adding layout tests for feGaussianBlur dynamic changes.
+
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html: Added.
+        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-in-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-in-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js: Added.
+        (executeTest):
+
+2010-10-04  Renata Hodovan  <reni@inf.u-szeged.hu>
+
         Reviewed by Dirk Schulze.
 
         SVGFEFloodElement doesn't support dynamic invalidation, when attributes change.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.checksum
new file mode 100644 (file)
index 0000000..8ef38b8
--- /dev/null
@@ -0,0 +1 @@
+0b5690ebce39ff0147246227284e51e2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png
new file mode 100644 (file)
index 0000000..aaaea14
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.checksum
new file mode 100644 (file)
index 0000000..b3ca1f1
--- /dev/null
@@ -0,0 +1 @@
+6eecbb18d03a8a9d00c33dd9c4e591a0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png
new file mode 100644 (file)
index 0000000..bf5b5f7
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.checksum
new file mode 100644 (file)
index 0000000..2c29288
--- /dev/null
@@ -0,0 +1 @@
+29bd658305438b07144980389fc2a782
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png
new file mode 100644 (file)
index 0000000..7755762
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.checksum
new file mode 100644 (file)
index 0000000..7b72cf1
--- /dev/null
@@ -0,0 +1 @@
+8597a329c3939d6cb24292fe1ee7b944
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png
new file mode 100644 (file)
index 0000000..9c3169c
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr-expected.txt
new file mode 100644 (file)
index 0000000..d59af57
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' attribute of the SVGFEGaussianBlurElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS blurElement.getAttribute('in') is "SourceAlpha"
+PASS blurElement.getAttribute('in') is "SourceGraphic"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html
new file mode 100644 (file)
index 0000000..6a87831
--- /dev/null
@@ -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/SVGFEGaussianBlurElement-dom-in-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr-expected.txt
new file mode 100644 (file)
index 0000000..c046692
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'stdDeviation' attribute of the SVGFEGaussianBlurElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS blurElement.getAttribute('stdDeviation') is "5"
+PASS blurElement.getAttribute('stdDeviation') is "10"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html
new file mode 100644 (file)
index 0000000..08403ed
--- /dev/null
@@ -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/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call-expected.txt
new file mode 100644 (file)
index 0000000..c0f1295
--- /dev/null
@@ -0,0 +1,15 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'stdDeviation' property of the SVGFEGaussianBlurElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS blurElement.stdDeviationX.baseVal is 5
+PASS blurElement.stdDeviationY.baseVal is 5
+PASS blurElement.stdDeviationX.baseVal is 10
+PASS blurElement.stdDeviationY.baseVal is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html
new file mode 100644 (file)
index 0000000..97c2b29
--- /dev/null
@@ -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/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop-expected.txt
new file mode 100644 (file)
index 0000000..80d37e5
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' property of the SVGFEGaussianBlurElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS blurElement.in1.baseVal is "SourceAlpha"
+PASS blurElement.in1.baseVal is "SourceGraphic"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html
new file mode 100644 (file)
index 0000000..63f0177
--- /dev/null
@@ -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/SVGFEGaussianBlurElement-svgdom-in-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-in-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-in-attr.js
new file mode 100644 (file)
index 0000000..7355d72
--- /dev/null
@@ -0,0 +1,48 @@
+// [Name] SVGFEGaussianBlurElement-dom-in-attr.js
+// [Expected rendering result] A simple rectangle with feGaussianBlur filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' attribute of the SVGFEGaussianBlurElement object")
+createSVGTestCase();
+
+var blurElement = createSVGElement("feGaussianBlur");
+blurElement.setAttribute("in", "SourceAlpha");
+blurElement.setAttribute("stdDeviation", "10");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(blurElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("width", "700");
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("x", 60);
+rectElement.setAttribute("y", 20);
+rectElement.setAttribute("width", 100);
+rectElement.setAttribute("height", 100);
+rectElement.setAttribute("stroke", "#AF1E9D");
+rectElement.setAttribute("stroke-width", "8");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+shouldBeEqualToString("blurElement.getAttribute('in')", "SourceAlpha");
+
+function executeTest() {
+    blurElement.setAttribute("in", "SourceGraphic");
+    shouldBeEqualToString("blurElement.getAttribute('in')", "SourceGraphic");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-stdDeviation-attr.js
new file mode 100644 (file)
index 0000000..bef0f5f
--- /dev/null
@@ -0,0 +1,47 @@
+// [Name] SVGFEGaussianBlurElement-dom-stdDeviation-attr.js
+// [Expected rendering result] A simple rectangle with feGaussianBlur filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'stdDeviation' attribute of the SVGFEGaussianBlurElement object")
+createSVGTestCase();
+
+var blurElement = createSVGElement("feGaussianBlur");
+blurElement.setAttribute("stdDeviation", "5");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(blurElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("width", "700");
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("x", 60);
+rectElement.setAttribute("y", 20);
+rectElement.setAttribute("width", 100);
+rectElement.setAttribute("height", 100);
+rectElement.setAttribute("stroke", "#AF1E9D");
+rectElement.setAttribute("stroke-width", "8");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+shouldBeEqualToString("blurElement.getAttribute('stdDeviation')", "5");
+
+function executeTest() {
+    blurElement.setAttribute("stdDeviation", "10");
+    shouldBeEqualToString("blurElement.getAttribute('stdDeviation')", "10");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-in-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-in-prop.js
new file mode 100644 (file)
index 0000000..8ed7cc1
--- /dev/null
@@ -0,0 +1,48 @@
+// [Name] SVGFEGaussianBlurElement-svgdom-in-prop.js
+// [Expected rendering result] A simple rectangle with feGaussianBlur filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' property of the SVGFEGaussianBlurElement object")
+createSVGTestCase();
+
+var blurElement = createSVGElement("feGaussianBlur");
+blurElement.setAttribute("in", "SourceAlpha");
+blurElement.setAttribute("stdDeviation", "10");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(blurElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("width", "700");
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("x", 60);
+rectElement.setAttribute("y", 20);
+rectElement.setAttribute("width", 100);
+rectElement.setAttribute("height", 100);
+rectElement.setAttribute("stroke", "#AF1E9D");
+rectElement.setAttribute("stroke-width", "8");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+shouldBeEqualToString("blurElement.in1.baseVal", "SourceAlpha");
+
+function executeTest() {
+    blurElement.in1.baseVal = "SourceGraphic";
+    shouldBeEqualToString("blurElement.in1.baseVal", "SourceGraphic");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js
new file mode 100644 (file)
index 0000000..25f5092
--- /dev/null
@@ -0,0 +1,49 @@
+// [Name] SVGFEGaussianBlurElement-dom-stdDeviation-prop.js
+// [Expected rendering result] A simple rectangle with feGaussianBlur filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'stdDeviation' property of the SVGFEGaussianBlurElement object")
+createSVGTestCase();
+
+var blurElement = createSVGElement("feGaussianBlur");
+blurElement.setAttribute("stdDeviation", "5");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(blurElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("width", "700");
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("x", 60);
+rectElement.setAttribute("y", 20);
+rectElement.setAttribute("width", 100);
+rectElement.setAttribute("height", 100);
+rectElement.setAttribute("stroke", "#AF1E9D");
+rectElement.setAttribute("stroke-width", "8");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+shouldBe("blurElement.stdDeviationX.baseVal", "5");
+shouldBe("blurElement.stdDeviationY.baseVal", "5");
+
+function executeTest() {
+    blurElement.setStdDeviation(10, 10);
+    shouldBe("blurElement.stdDeviationX.baseVal", "10");
+    shouldBe("blurElement.stdDeviationY.baseVal", "10");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
index 381e5be..d3b7879 100644 (file)
@@ -1,3 +1,21 @@
+2010-10-04  Renata Hodovan  <reni@inf.u-szeged.hu>
+
+        Reviewed by Andreas Kling.
+
+        SVGFEGaussianBlurElement doesn't support dynamic invalidation, when attributes change.
+        https://bugs.webkit.org/show_bug.cgi?id=47074
+        The patch also implements the simple setStdDeviation method.
+
+        Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-in-attr.html
+               svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-attr.html
+               svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html
+               svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-in-prop.html
+
+        * svg/SVGFEGaussianBlurElement.cpp:
+        (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
+        (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
+        * svg/SVGFEGaussianBlurElement.h:
+
 2010-10-04  Patrick Gansterer  <paroga@paroga.com>
 
         Reviewed by Darin Adler.
index 3dfd51c..a9fef61 100644 (file)
@@ -42,9 +42,11 @@ PassRefPtr<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(const Qual
     return adoptRef(new SVGFEGaussianBlurElement(tagName, document));
 }
 
-void SVGFEGaussianBlurElement::setStdDeviation(float, float)
+void SVGFEGaussianBlurElement::setStdDeviation(float x, float y)
 {
-    // FIXME: Needs an implementation.
+    setStdDeviationXBaseValue(x);
+    setStdDeviationYBaseValue(y);
+    invalidate();
 }
 
 void SVGFEGaussianBlurElement::parseMappedAttribute(Attribute* attr)
@@ -62,6 +64,15 @@ void SVGFEGaussianBlurElement::parseMappedAttribute(Attribute* attr)
         SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
 }
 
+void SVGFEGaussianBlurElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+    SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+
+    if (attrName == SVGNames::inAttr
+        || attrName == SVGNames::stdDeviationAttr)
+        invalidate();
+}
+
 void SVGFEGaussianBlurElement::synchronizeProperty(const QualifiedName& attrName)
 {
     SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
index 36b7383..90f956c 100644 (file)
@@ -40,6 +40,7 @@ private:
     SVGFEGaussianBlurElement(const QualifiedName&, Document*);
 
     virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
     virtual void synchronizeProperty(const QualifiedName&);
     virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);