[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:18:41 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit daaca7ec53e38188a1fc903885859e7eb90e086d
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 6 17:09:48 2010 +0000
2010-10-06 Renata Hodovan <reni at inf.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
SVGFEMergeNodeElement doesn't support dynamic invalidation, when attributes change.
https://bugs.webkit.org/show_bug.cgi?id=47181
Adding layout tests for feMergeNode dynamic changes.
* platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.checksum: Added.
* platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png: Added.
* platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.checksum: Added.
* platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png: Added.
* svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.txt: Added.
* svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html: Added.
* svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.txt: Added.
* svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html: Added.
* svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-dom-in-attr.js: Added.
(executeTest):
* svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-svgdom-in-prop.js: Added.
(executeTest):
2010-10-06 Renata Hodovan <reni at inf.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
SVGFEMergeNodeElement doesn't support dynamic invalidation, when attributes change.
https://bugs.webkit.org/show_bug.cgi?id=47181
Since feMergeNode doesn't have own renderer, we have to call the invalidation via its parent.
Tests: svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html
svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
* svg/SVGFEMergeNodeElement.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 68081a9..3117274 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-06 Renata Hodovan <reni at inf.u-szeged.hu>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGFEMergeNodeElement doesn't support dynamic invalidation, when attributes change.
+ https://bugs.webkit.org/show_bug.cgi?id=47181
+
+ Adding layout tests for feMergeNode dynamic changes.
+
+ * platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.checksum: Added.
+ * platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png: Added.
+ * platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.checksum: Added.
+ * platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png: Added.
+ * svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.txt: Added.
+ * svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html: Added.
+ * svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.txt: Added.
+ * svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html: Added.
+ * svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-dom-in-attr.js: Added.
+ (executeTest):
+ * svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-svgdom-in-prop.js: Added.
+ (executeTest):
+
2010-10-06 Nikolas Zimmermann <nzimmermann at rim.com>
Rubber stamped by Dirk Schulze.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.checksum
new file mode 100644
index 0000000..76fef2e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.checksum
@@ -0,0 +1 @@
+4a0fa8992c408f8fb3ee1a34f3c442db
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png
new file mode 100644
index 0000000..05290c2
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.checksum
new file mode 100644
index 0000000..bd5549c
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.checksum
@@ -0,0 +1 @@
+22b3dbacc8d5363ee9b00b96f5ec9874
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png
new file mode 100644
index 0000000..34b7175
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.txt
new file mode 100644
index 0000000..ff038f5
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' attribute of the SVGFEMergeNodeElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mergeNode1.getAttribute('in') is "SourceGraphic"
+PASS mergeNode1.getAttribute('in') is "off"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html
new file mode 100644
index 0000000..e702ffc
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-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/SVGFEMergeNodeElement-dom-in-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.txt
new file mode 100644
index 0000000..8392dce
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' property of the SVGFEMergeNodeElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mergeNode1.in1.baseVal is "SourceGraphic"
+PASS mergeNode1.in1.baseVal is "off"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html
new file mode 100644
index 0000000..f53d6c9
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEMergeNodeElement-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/SVGFEMergeNodeElement-svgdom-in-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-dom-in-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-dom-in-attr.js
new file mode 100644
index 0000000..90b889e
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-dom-in-attr.js
@@ -0,0 +1,59 @@
+// [Name] SVGFEMergeNodeElement-dom-in-attr.js
+// [Expected rendering result] Two circle merged with feMerge filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' attribute of the SVGFEMergeNodeElement object")
+createSVGTestCase();
+
+var defsElement = createSVGElement("defs");
+rootSVGElement.appendChild(defsElement);
+
+var off = createSVGElement("feOffset");
+off.setAttribute("dx", "105");
+off.setAttribute("dy", "25");
+off.setAttribute("result", "off");
+
+var merge = createSVGElement("feMerge");
+
+var mergeNode1 = createSVGElement("feMergeNode");
+mergeNode1.setAttribute("in", "SourceGraphic");
+
+var mergeNode2 = createSVGElement("feMergeNode");
+mergeNode2.setAttribute("in", "SourceGraphic");
+
+merge.appendChild(mergeNode1);
+merge.appendChild(mergeNode2);
+
+var mergeFilter = createSVGElement("filter");
+mergeFilter.setAttribute("id", "myFilter");
+mergeFilter.setAttribute("filterUnits", "objectBoundingBox");
+mergeFilter.setAttribute("x", "0");
+mergeFilter.setAttribute("y", "0");
+mergeFilter.setAttribute("width", "3.5");
+mergeFilter.setAttribute("height", "4");
+mergeFilter.appendChild(off);
+mergeFilter.appendChild(merge);
+
+defsElement.appendChild(mergeFilter);
+
+var myCircle = createSVGElement("circle");
+myCircle.setAttribute("cx", "100");
+myCircle.setAttribute("cy", "50");
+myCircle.setAttribute("r", "50");
+myCircle.setAttribute("fill", "#408067");
+myCircle.setAttribute("filter", "url(#myFilter)");
+
+rootSVGElement.setAttribute("height", "200");
+rootSVGElement.appendChild(myCircle);
+
+shouldBeEqualToString("mergeNode1.getAttribute('in')", "SourceGraphic");
+
+function executeTest() {
+ mergeNode1.setAttribute("in", "off");
+ shouldBeEqualToString("mergeNode1.getAttribute('in')", "off");
+
+ completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-svgdom-in-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-svgdom-in-prop.js
new file mode 100644
index 0000000..4fc82a9
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEMergeNodeElement-svgdom-in-prop.js
@@ -0,0 +1,59 @@
+// [Name] SVGFEMergeNodeElement-svgdom-in-prop.js
+// [Expected rendering result] Two circle merged with feMerge filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' property of the SVGFEMergeNodeElement object")
+createSVGTestCase();
+
+var defsElement = createSVGElement("defs");
+rootSVGElement.appendChild(defsElement);
+
+var off = createSVGElement("feOffset");
+off.setAttribute("dx", "105");
+off.setAttribute("dy", "25");
+off.setAttribute("result", "off");
+
+var merge = createSVGElement("feMerge");
+
+var mergeNode1 = createSVGElement("feMergeNode");
+mergeNode1.setAttribute("in", "SourceGraphic");
+
+var mergeNode2 = createSVGElement("feMergeNode");
+mergeNode2.setAttribute("in", "SourceGraphic");
+
+merge.appendChild(mergeNode1);
+merge.appendChild(mergeNode2);
+
+var mergeFilter = createSVGElement("filter");
+mergeFilter.setAttribute("id", "myFilter");
+mergeFilter.setAttribute("filterUnits", "objectBoundingBox");
+mergeFilter.setAttribute("x", "0");
+mergeFilter.setAttribute("y", "0");
+mergeFilter.setAttribute("width", "3.5");
+mergeFilter.setAttribute("height", "4");
+mergeFilter.appendChild(off);
+mergeFilter.appendChild(merge);
+
+defsElement.appendChild(mergeFilter);
+
+var myCircle = createSVGElement("circle");
+myCircle.setAttribute("cx", "100");
+myCircle.setAttribute("cy", "50");
+myCircle.setAttribute("r", "50");
+myCircle.setAttribute("fill", "#408067");
+myCircle.setAttribute("filter", "url(#myFilter)");
+
+rootSVGElement.setAttribute("height", "200");
+rootSVGElement.appendChild(myCircle);
+
+shouldBeEqualToString("mergeNode1.in1.baseVal", "SourceGraphic");
+
+function executeTest() {
+ mergeNode1.in1.baseVal = "off";
+ shouldBeEqualToString("mergeNode1.in1.baseVal", "off");
+
+ completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8c8c110..f0b99e0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-06 Renata Hodovan <reni at inf.u-szeged.hu>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVGFEMergeNodeElement doesn't support dynamic invalidation, when attributes change.
+ https://bugs.webkit.org/show_bug.cgi?id=47181
+
+ Since feMergeNode doesn't have own renderer, we have to call the invalidation via its parent.
+
+ Tests: svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html
+ svg/dynamic-updates/SVGFEMergeNodeElement-svgdom-in-prop.html
+
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
+ * svg/SVGFEMergeNodeElement.h:
+
2010-10-06 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/svg/SVGFEMergeNodeElement.cpp b/WebCore/svg/SVGFEMergeNodeElement.cpp
index 4bd5ac5..aeb05f4 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.cpp
+++ b/WebCore/svg/SVGFEMergeNodeElement.cpp
@@ -24,6 +24,8 @@
#include "SVGFEMergeNodeElement.h"
#include "Attribute.h"
+#include "RenderSVGResource.h"
+#include "SVGFilterElement.h"
namespace WebCore {
@@ -46,6 +48,24 @@ void SVGFEMergeNodeElement::parseMappedAttribute(Attribute* attr)
SVGElement::parseMappedAttribute(attr);
}
+void SVGFEMergeNodeElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGElement::svgAttributeChanged(attrName);
+
+ if (attrName != SVGNames::inAttr)
+ return;
+
+ Node* parentNode = parent();
+ if (!parentNode)
+ return;
+
+ RenderObject* renderer = parentNode->renderer();
+ if (!renderer || !renderer->isSVGResourceFilterPrimitive())
+ return;
+
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+}
+
void SVGFEMergeNodeElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGElement::synchronizeProperty(attrName);
diff --git a/WebCore/svg/SVGFEMergeNodeElement.h b/WebCore/svg/SVGFEMergeNodeElement.h
index 65c5d3d..89506dc 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.h
+++ b/WebCore/svg/SVGFEMergeNodeElement.h
@@ -35,6 +35,7 @@ namespace WebCore {
SVGFEMergeNodeElement(const QualifiedName&, Document*);
virtual void parseMappedAttribute(Attribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
DECLARE_ANIMATED_PROPERTY(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list