[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:10:04 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit db7c5603fe0d0a27651f8bd62091252bd95bdcc6
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 5 05:31:02 2010 +0000

    2010-10-04  Renata Hodovan  <reni at inf.u-szeged.hu>
    
            Reviewed by Dirk Schulze.
    
            SVGFEFloodElement doesn't support dynamic invalidation, when attributes change.
            https://bugs.webkit.org/show_bug.cgi?id=47077
    
            Adding layout tests for feFlood dynamic changes. Since the attributes are CSS attributes,
            their changes are captured by the CSS support sub-system, and invalidated when needed.
            Thus, no need to add a new handler for SVGFEFloodElement.
    
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.checksum: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.checksum: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.checksum: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.checksum: Added.
            * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png: Added.
            * svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.txt: Added.
            * svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html: Added.
            * svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.txt: Added.
            * svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html: Added.
            * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.txt: Added.
            * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html: Added.
            * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.txt: Added.
            * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html: Added.
            * svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-color-attr.js: Added.
            (executeTest):
            * svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-opacity-attr.js: Added.
            (executeTest):
            * svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-color-prop.js: Added.
            (executeTest):
            * svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-opacity-prop.js: Added.
            (executeTest):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0f528ae..5138a56 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,39 @@
+2010-10-04  Renata Hodovan  <reni at inf.u-szeged.hu>
+
+        Reviewed by Dirk Schulze.
+
+        SVGFEFloodElement doesn't support dynamic invalidation, when attributes change.
+        https://bugs.webkit.org/show_bug.cgi?id=47077
+
+        Adding layout tests for feFlood dynamic changes. Since the attributes are CSS attributes,
+        their changes are captured by the CSS support sub-system, and invalidated when needed.
+        Thus, no need to add a new handler for SVGFEFloodElement.
+
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html: Added.
+        * svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-color-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-opacity-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-color-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-opacity-prop.js: Added.
+        (executeTest):
+
 2010-10-04  Robert Hogan  <robert at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.checksum
new file mode 100644
index 0000000..bb5d95c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.checksum
@@ -0,0 +1 @@
+d4338f4d7004b2e6c627cdbde72f52dd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png
new file mode 100644
index 0000000..a80ce1c
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.checksum
new file mode 100644
index 0000000..bcfed8f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.checksum
@@ -0,0 +1 @@
+1bef17812059c0f713385a90b32857f1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png
new file mode 100644
index 0000000..05807c5
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.checksum
new file mode 100644
index 0000000..d1802ab
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.checksum
@@ -0,0 +1 @@
+8ebeddc697676aab4f0f6a9cdeac9a5b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png
new file mode 100644
index 0000000..3d963c3
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.checksum
new file mode 100644
index 0000000..e212c58
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.checksum
@@ -0,0 +1 @@
+8acba92759f60a6fa9d7be3e08e12b73
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png
new file mode 100644
index 0000000..c2a499d
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.txt
new file mode 100644
index 0000000..81f5190
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-color' attribute of the SVGFEFloodElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS floodElement.getAttribute('flood-color') is "rgb(145, 32, 103)"
+PASS floodElement.getAttribute('flood-color') is "rgb(64, 128, 103)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html
new file mode 100644
index 0000000..59e6939
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.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/SVGFEFloodElement-dom-flood-color-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.txt
new file mode 100644
index 0000000..03a908b
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-opacity' attribute of the SVGFEFloodElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS floodElement.getAttribute('flood-opacity') is ".1"
+PASS floodElement.getAttribute('flood-opacity') is ".8"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html
new file mode 100644
index 0000000..6dde5fb
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.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/SVGFEFloodElement-dom-flood-opacity-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.txt
new file mode 100644
index 0000000..792a503
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-color' property of the SVGFEFloodElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-color') is "rgb(145, 32, 103)"
+PASS document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-color') is "rgb(64, 128, 103)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html
new file mode 100644
index 0000000..16cc6ab
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-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/SVGFEFloodElement-svgdom-flood-color-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.txt
new file mode 100644
index 0000000..7d8c59a
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-opacity' property of the SVGFEFloodElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-opacity') is "0.1"
+PASS document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-opacity') is "0.8"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html
new file mode 100644
index 0000000..526dbdb
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-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/SVGFEFloodElement-svgdom-flood-opacity-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-color-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-color-attr.js
new file mode 100644
index 0000000..fb3da03
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-color-attr.js
@@ -0,0 +1,48 @@
+// [Name] SVGFEFLoodElement-dom-flood-color-attr.js
+// [Expected rendering result] A simple rect with feFlood filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-color' attribute of the SVGFEFloodElement object")
+createSVGTestCase();
+
+var floodElement = createSVGElement("feFlood");
+floodElement.setAttribute("flood-color", "rgb(145, 32, 103)");
+floodElement.setAttribute("flood-opacity", ".8");
+
+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(floodElement);
+
+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", 100);
+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("floodElement.getAttribute('flood-color')", "rgb(145, 32, 103)");
+
+function executeTest() {
+    floodElement.setAttribute("flood-color", "rgb(64, 128, 103)");
+    shouldBeEqualToString("floodElement.getAttribute('flood-color')", "rgb(64, 128, 103)");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-opacity-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-opacity-attr.js
new file mode 100644
index 0000000..a5610e9
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-dom-flood-opacity-attr.js
@@ -0,0 +1,48 @@
+// [Name] SVGFEFLoodElement-dom-flood-opacity-attr.js
+// [Expected rendering result] A simple rect with feFlood filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-opacity' attribute of the SVGFEFloodElement object")
+createSVGTestCase();
+
+var floodElement = createSVGElement("feFlood");
+floodElement.setAttribute("flood-color", "rgb(64, 128, 103)");
+floodElement.setAttribute("flood-opacity", ".1");
+
+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(floodElement);
+
+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", 100);
+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("floodElement.getAttribute('flood-opacity')", ".1");
+
+function executeTest() {
+    floodElement.setAttribute("flood-opacity", ".8");
+    shouldBeEqualToString("floodElement.getAttribute('flood-opacity')", ".8");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-color-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-color-prop.js
new file mode 100644
index 0000000..7df49c3
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-color-prop.js
@@ -0,0 +1,48 @@
+// [Name] SVGFEFLoodElement-svgdom-flood-color-prop.js
+// [Expected rendering result] A simple rect with feFlood filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-color' property of the SVGFEFloodElement object")
+createSVGTestCase();
+
+var floodElement = createSVGElement("feFlood");
+floodElement.setAttribute("flood-color", "#912067");
+floodElement.setAttribute("flood-opacity", ".8");
+
+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(floodElement);
+
+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", 100);
+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("document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-color')", "rgb(145, 32, 103)");
+
+function executeTest() {
+    floodElement.style.setProperty("flood-color", "rgb(64, 128, 103)", "");
+    shouldBeEqualToString("document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-color')", "rgb(64, 128, 103)");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-opacity-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-opacity-prop.js
new file mode 100644
index 0000000..3c39f64
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEFloodElement-svgdom-flood-opacity-prop.js
@@ -0,0 +1,48 @@
+// [Name] SVGFEFLoodElement-svgdom-flood-opacity-prop.js
+// [Expected rendering result] A simple rect with feFlood filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-opacity' property of the SVGFEFloodElement object")
+createSVGTestCase();
+
+var floodElement = createSVGElement("feFlood");
+floodElement.setAttribute("flood-color", "rgb(64, 128, 103)");
+floodElement.setAttribute("flood-opacity", ".1");
+
+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(floodElement);
+
+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", 100);
+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("document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-opacity')", "0.1");
+
+function executeTest() {
+    floodElement.style.setProperty("flood-opacity", ".8", "");
+    shouldBeEqualToString("document.defaultView.getComputedStyle(floodElement).getPropertyValue('flood-opacity')", "0.8");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list