[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:51:32 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 21e6fb81f92bd0a5a69bb473979328a3b2264f8c
Author: reni at webkit.org <reni at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 15 16:10:35 2010 +0000

    WebCore: SVGFEImageElement doesn't support dynamic invalidation
    https://bugs.webkit.org/show_bug.cgi?id=49536
    
    Patch by Renata Hodovan <reni at webkit.org> on 2010-11-15
    Reviewed by Andreas Kling.
    
    The dynamic changes are captured by the svgAttributeChanged function. Invalidate the filter primitive if necessary.
    
    Tests: svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html
           svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html
    
    * svg/SVGFEImageElement.cpp:
    (WebCore::SVGFEImageElement::svgAttributeChanged):
    * svg/SVGFEImageElement.h:
    
    LayoutTests: SVGFEImageElement doesn't support dynamic invalidation, when attributes change.
    https://bugs.webkit.org/show_bug.cgi?id=49536
    
    Patch by Renata Hodovan <reni at webkit.org> on 2010-11-15
    Reviewed by Andreas Kling.
    
    Adding layout tests for feImage dynamic changes.
    
    * platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.checksum: Added.
    * platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png: Added.
    * platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.checksum: Added.
    * platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png: Added.
    * svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.txt: Added.
    * svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html: Added.
    * svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.txt: Added.
    * svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html: Added.
    * svg/dynamic-updates/script-tests/SVGFEImageElement-dom-preserveAspectRatio-attr.js: Added.
    (executeTest):
    * svg/dynamic-updates/script-tests/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js: Added.
    (executeTest):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 99d9fa2..0abcfef 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2010-11-15  Renata Hodovan  <reni at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        SVGFEImageElement doesn't support dynamic invalidation, when attributes change.
+        https://bugs.webkit.org/show_bug.cgi?id=49536
+
+        Adding layout tests for feImage dynamic changes.
+
+        * platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png: Added.
+        * svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html: Added.
+        * svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html: Added.
+        * svg/dynamic-updates/script-tests/SVGFEImageElement-dom-preserveAspectRatio-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js: Added.
+        (executeTest):
+
 2010-11-15  Csaba Osztrogonác  <ossy at webkit.org>
 
         Unreviewed. Add Qt specific expected results after r72003.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.checksum
new file mode 100644
index 0000000..6625982
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.checksum
@@ -0,0 +1 @@
+ae824aafc27b9ce49b1dab3de3beac67
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png
new file mode 100644
index 0000000..736db95
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.checksum
new file mode 100644
index 0000000..87d27fd
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.checksum
@@ -0,0 +1 @@
+f3f293c6785a92711e69bc1f47c2a527
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png
new file mode 100644
index 0000000..c46224a
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png differ
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.txt
new file mode 100644
index 0000000..39cac0b
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.txt
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'preserveAspectRatio' attribute of the SVGFEImageElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS image.getAttribute('preserveAspectRatio') is "xMinYMin slice"
+PASS image.getAttribute('preserveAspectRatio') is "xMinYMid slice"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html
new file mode 100644
index 0000000..eb66575
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-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/SVGFEImageElement-dom-preserveAspectRatio-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.txt
new file mode 100644
index 0000000..e0bf43a
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.txt
@@ -0,0 +1,15 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'preserveAspectRatio' property of the SVGFEImageElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS image.preserveAspectRatio.baseVal.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN
+PASS image.preserveAspectRatio.baseVal.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+PASS image.preserveAspectRatio.baseVal.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID
+PASS image.preserveAspectRatio.baseVal.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html
new file mode 100644
index 0000000..993451a
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-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/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-dom-preserveAspectRatio-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-dom-preserveAspectRatio-attr.js
new file mode 100644
index 0000000..461f0a6
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-dom-preserveAspectRatio-attr.js
@@ -0,0 +1,42 @@
+// [Name] SVGFEImageElement-dom-preserveAspectRatio-attr.js
+// [Expected rendering result] A rectangle with feImage filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'preserveAspectRatio' attribute of the SVGFEImageElement object")
+createSVGTestCase();
+
+var image = createSVGElement("feImage");
+image.setAttribute("width", "300");
+image.setAttribute("height", "200");
+image.setAttribute("preserveAspectRatio", "xMinYMin slice");
+image.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/image1.jpg");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.appendChild(image);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("width", "190");
+rectElement.setAttribute("height", "190");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+rootSVGElement.setAttribute("viewBox", "0 0 400 150");
+
+shouldBeEqualToString("image.getAttribute('preserveAspectRatio')", "xMinYMin slice");
+
+function executeTest() {
+    image.setAttribute("preserveAspectRatio", "xMinYMid slice");
+    shouldBeEqualToString("image.getAttribute('preserveAspectRatio')", "xMinYMid slice");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js
new file mode 100644
index 0000000..fce9c6e
--- /dev/null
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEImageElement-svgdom-preserveAspectRatio-prop.js
@@ -0,0 +1,45 @@
+// [Name] SVGFEImageElement-svgdom-preserveAspectRatio-prop.js
+// [Expected rendering result] A rectangle with feImage filter - and a series of PASS messages
+
+description("Tests dynamic updates of the 'preserveAspectRatio' property of the SVGFEImageElement object")
+createSVGTestCase();
+
+var image = createSVGElement("feImage");
+image.setAttribute("width", "300");
+image.setAttribute("height", "200");
+image.setAttribute("preserveAspectRatio", "xMinYMin slice");
+image.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/image1.jpg");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.appendChild(image);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+rootSVGElement.setAttribute("height", "200");
+
+var rectElement = createSVGElement("rect");
+rectElement.setAttribute("width", "190");
+rectElement.setAttribute("height", "190");
+rectElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(rectElement);
+
+rootSVGElement.setAttribute("viewBox", "0 0 400 150");
+
+shouldBe("image.preserveAspectRatio.baseVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN");
+shouldBe("image.preserveAspectRatio.baseVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+function executeTest() {
+    image.preserveAspectRatio.baseVal.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID;
+    image.preserveAspectRatio.baseVal.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE;
+    shouldBe("image.preserveAspectRatio.baseVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID");
+    shouldBe("image.preserveAspectRatio.baseVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 44b40ef..8d2f077 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-15  Renata Hodovan  <reni at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        SVGFEImageElement doesn't support dynamic invalidation
+        https://bugs.webkit.org/show_bug.cgi?id=49536
+
+        The dynamic changes are captured by the svgAttributeChanged function. Invalidate the filter primitive if necessary.
+
+        Tests: svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr.html
+               svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop.html
+
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::svgAttributeChanged):
+        * svg/SVGFEImageElement.h:
+
 2010-11-15  Yael Aharon  <yael.aharon at nokia.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebCore/svg/SVGFEImageElement.cpp b/WebCore/svg/SVGFEImageElement.cpp
index 0ea7933..1db8edb 100644
--- a/WebCore/svg/SVGFEImageElement.cpp
+++ b/WebCore/svg/SVGFEImageElement.cpp
@@ -90,6 +90,14 @@ void SVGFEImageElement::parseMappedAttribute(Attribute* attr)
     }
 }
 
+void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+    SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+
+    if (attrName == SVGNames::preserveAspectRatioAttr)
+        invalidate();
+}
+
 void SVGFEImageElement::synchronizeProperty(const QualifiedName& attrName)
 {
     SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index 0dcf2c8..0b9c5d8 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -48,6 +48,7 @@ private:
     SVGFEImageElement(const QualifiedName&, Document*);
 
     virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
     virtual void synchronizeProperty(const QualifiedName&);
     virtual void notifyFinished(CachedResource*);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list