[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
reni at webkit.org
reni at webkit.org
Wed Dec 22 15:37:23 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6d41315a17f5f84d712edd1556a35634ba7b8f5d
Author: reni at webkit.org <reni at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 9 15:31:54 2010 +0000
SVGFETileElement doesn't support dynamic invalidation, when attributes change.
https://bugs.webkit.org/show_bug.cgi?id=49247
Patch by Renata Hodovan <reni at webkit.org> on 2010-11-09
Reviewed by Nikolas Zimmermann.
WebCore:
The dynamic changes are captured by the svgAttributeChanged function. Invalidate the filter primitive if necessary.
Tests: svg/dynamic-updates/SVGFETileElement-dom-in-attr.html
svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::svgAttributeChanged):
* svg/SVGFETileElement.h:
LayoutTests:
Adding layout tests for feTile dynamic changes.
* platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.checksum: Added.
* platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png: Added.
* platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.checksum: Added.
* platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png: Added.
* svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.txt: Added.
* svg/dynamic-updates/SVGFETileElement-dom-in-attr.html: Added.
* svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.txt: Added.
* svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html: Added.
* svg/dynamic-updates/script-tests/SVGFETileElement-dom-in-attr.js: Added.
(executeTest):
* svg/dynamic-updates/script-tests/SVGFETileElement-svgdom-in-prop.js: Added.
(executeTest):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8664b69..601ba12 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2010-11-09 Renata Hodovan <reni at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGFETileElement doesn't support dynamic invalidation, when attributes change.
+ https://bugs.webkit.org/show_bug.cgi?id=49247
+
+ Adding layout tests for feTile dynamic changes.
+
+ * platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.checksum: Added.
+ * platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png: Added.
+ * platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.checksum: Added.
+ * platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png: Added.
+ * svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.txt: Added.
+ * svg/dynamic-updates/SVGFETileElement-dom-in-attr.html: Added.
+ * svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.txt: Added.
+ * svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html: Added.
+ * svg/dynamic-updates/script-tests/SVGFETileElement-dom-in-attr.js: Added.
+ (executeTest):
+ * svg/dynamic-updates/script-tests/SVGFETileElement-svgdom-in-prop.js: Added.
+ (executeTest):
+
2010-11-09 Viatcheslav Ostapenko <ostapenko.viatcheslav at nokia.com>
Rubber-stamped by Antonio Gomes.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.checksum
new file mode 100644
index 0000000..a9246c8
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.checksum
@@ -0,0 +1 @@
+b0e4e619a40c36df55cd68723930cffe
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png
new file mode 100644
index 0000000..db4d6a5
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.checksum
new file mode 100644
index 0000000..eb139e6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.checksum
@@ -0,0 +1 @@
+e28b431ee19b5da3555d12ceba8c844f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png
new file mode 100644
index 0000000..dc675da
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.txt
new file mode 100644
index 0000000..bcb96b0
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' attribute of the SVGFETileElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS tile.getAttribute('in') is "SourceGraphic"
+PASS tile.getAttribute('in') is "offset"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-attr.html b/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-attr.html
new file mode 100644
index 0000000..0c665f6
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFETileElement-dom-in-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/SVGFETileElement-dom-in-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.txt
new file mode 100644
index 0000000..8a15220
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' property of the SVGFETileElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS tile.in1.baseVal is "SourceGraphic"
+PASS tile.in1.baseVal is "offset"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html b/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html
new file mode 100644
index 0000000..ba41df4
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFETileElement-svgdom-in-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/SVGFETileElement-svgdom-in-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-dom-in-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-dom-in-attr.js
new file mode 100644
index 0000000..150ff80
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-dom-in-attr.js
@@ -0,0 +1,70 @@
+// [Name] SVGFETileElement-dom-in-attr.js
+// [Expected rendering result] A rectangle tiled with green rectangles - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' attribute of the SVGFETileElement object")
+createSVGTestCase();
+
+var defsElement = createSVGElement("defs");
+rootSVGElement.appendChild(defsElement);
+
+var flood = createSVGElement("feFlood");
+flood.setAttribute("x", "115");
+flood.setAttribute("y", "40");
+flood.setAttribute("width", "54");
+flood.setAttribute("height", "19");
+flood.setAttribute("flood-color", "green");
+
+var offset = createSVGElement("feOffset");
+offset.setAttribute("x", "115");
+offset.setAttribute("y", "40");
+offset.setAttribute("width", "50");
+offset.setAttribute("height", "25");
+offset.setAttribute("dx", "6");
+offset.setAttribute("dy", "6");
+offset.setAttribute("result", "offset");
+
+var tile = createSVGElement("feTile");
+tile.setAttribute("in", "SourceGraphic");
+
+var tileFilter = createSVGElement("filter");
+tileFilter.setAttribute("id", "myFilter");
+tileFilter.setAttribute("filterUnits", "userSpaceOnUse");
+tileFilter.setAttribute("primitiveUnits", "userSpaceOnUse");
+tileFilter.setAttribute("x", "15");
+tileFilter.setAttribute("y", "40");
+tileFilter.setAttribute("width", "400");
+tileFilter.setAttribute("height", "250");
+tileFilter.appendChild(flood);
+tileFilter.appendChild(offset);
+tileFilter.appendChild(tile);
+
+defsElement.appendChild(tileFilter);
+
+var rect1 = createSVGElement("rect");
+rect1.setAttribute("x", "15");
+rect1.setAttribute("y", "40");
+rect1.setAttribute("width", "350");
+rect1.setAttribute("height", "250");
+rect1.setAttribute("fill", "none");
+rect1.setAttribute("stroke", "blue");
+rect1.setAttribute("stroke-width", "2");
+
+var gElement = createSVGElement("g");
+gElement.setAttribute("filter", "url(#myFilter)");
+gElement.appendChild(rect1);
+
+rootSVGElement.setAttribute("width", "370");
+rootSVGElement.appendChild(gElement);
+
+shouldBeEqualToString("tile.getAttribute('in')", "SourceGraphic");
+
+function executeTest() {
+ tile.setAttribute("in", "offset");
+ shouldBeEqualToString("tile.getAttribute('in')", "offset");
+
+ completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-svgdom-in-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-svgdom-in-prop.js
new file mode 100644
index 0000000..010dbf6
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFETileElement-svgdom-in-prop.js
@@ -0,0 +1,70 @@
+// [Name] SVGFETileElement-svgdom-in-prop.js
+// [Expected rendering result] A rectangle tiled with green rectangles - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' property of the SVGFETileElement object")
+createSVGTestCase();
+
+var defsElement = createSVGElement("defs");
+rootSVGElement.appendChild(defsElement);
+
+var flood = createSVGElement("feFlood");
+flood.setAttribute("x", "115");
+flood.setAttribute("y", "40");
+flood.setAttribute("width", "54");
+flood.setAttribute("height", "19");
+flood.setAttribute("flood-color", "green");
+
+var offset = createSVGElement("feOffset");
+offset.setAttribute("x", "115");
+offset.setAttribute("y", "40");
+offset.setAttribute("width", "50");
+offset.setAttribute("height", "25");
+offset.setAttribute("dx", "6");
+offset.setAttribute("dy", "6");
+offset.setAttribute("result", "offset");
+
+var tile = createSVGElement("feTile");
+tile.setAttribute("in", "SourceGraphic");
+
+var tileFilter = createSVGElement("filter");
+tileFilter.setAttribute("id", "myFilter");
+tileFilter.setAttribute("filterUnits", "userSpaceOnUse");
+tileFilter.setAttribute("primitiveUnits", "userSpaceOnUse");
+tileFilter.setAttribute("x", "15");
+tileFilter.setAttribute("y", "40");
+tileFilter.setAttribute("width", "400");
+tileFilter.setAttribute("height", "250");
+tileFilter.appendChild(flood);
+tileFilter.appendChild(offset);
+tileFilter.appendChild(tile);
+
+defsElement.appendChild(tileFilter);
+
+var rect1 = createSVGElement("rect");
+rect1.setAttribute("x", "15");
+rect1.setAttribute("y", "40");
+rect1.setAttribute("width", "350");
+rect1.setAttribute("height", "250");
+rect1.setAttribute("fill", "none");
+rect1.setAttribute("stroke", "blue");
+rect1.setAttribute("stroke-width", "2");
+
+var gElement = createSVGElement("g");
+gElement.setAttribute("filter", "url(#myFilter)");
+gElement.appendChild(rect1);
+
+rootSVGElement.setAttribute("width", "370");
+rootSVGElement.appendChild(gElement);
+
+shouldBeEqualToString("tile.in1.baseVal", "SourceGraphic");
+
+function executeTest() {
+ tile.in1.baseVal = "offset";
+ shouldBeEqualToString("tile.in1.baseVal", "offset");
+
+ completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 19c653d..30c7e58 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-09 Renata Hodovan <reni at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGFETileElement doesn't support dynamic invalidation, when attributes change.
+ https://bugs.webkit.org/show_bug.cgi?id=49247
+
+ The dynamic changes are captured by the svgAttributeChanged function. Invalidate the filter primitive if necessary.
+
+ Tests: svg/dynamic-updates/SVGFETileElement-dom-in-attr.html
+ svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html
+
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::svgAttributeChanged):
+ * svg/SVGFETileElement.h:
+
2010-11-09 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebCore/svg/SVGFETileElement.cpp b/WebCore/svg/SVGFETileElement.cpp
index 9664490..590b6b8 100644
--- a/WebCore/svg/SVGFETileElement.cpp
+++ b/WebCore/svg/SVGFETileElement.cpp
@@ -47,6 +47,14 @@ void SVGFETileElement::parseMappedAttribute(Attribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFETileElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+
+ if (attrName == SVGNames::inAttr)
+ invalidate();
+}
+
void SVGFETileElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
diff --git a/WebCore/svg/SVGFETileElement.h b/WebCore/svg/SVGFETileElement.h
index ffa9d81..b0c97d2 100644
--- a/WebCore/svg/SVGFETileElement.h
+++ b/WebCore/svg/SVGFETileElement.h
@@ -35,6 +35,7 @@ private:
SVGFETileElement(const QualifiedName&, Document*);
virtual void parseMappedAttribute(Attribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list