Pixel difference in FEMorphology effect
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 14:38:13 +0000 (14:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Jul 2011 14:38:13 +0000 (14:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=63930

Source/WebCore:

Patch by Piroska András <Piroska.Andras@stud.u-szeged.hu> on 2011-07-15
Reviewed by Zoltan Herczeg.

Using short-circuit evaluation in the setFilterEffectAttribute function
was wrong. We should call both setRadius functions and evaluate the
changes separately.

* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):

LayoutTests:

Patch by Gabor Loki <loki@webkit.org> on 2011-07-15
Reviewed by Zoltan Herczeg.

Layout test is updated to follow the bugfix.

* platform/mac/svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr-expected.png:

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

LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr-expected.png
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGFEMorphologyElement.cpp

index c735b0c2fb16d2fc4a0c4527debc43fc210ee1b2..763050757c59513922ba1161f3481a9d449f463b 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-15  Gabor Loki  <loki@webkit.org>
+
+        Pixel difference in FEMorphology effect
+        https://bugs.webkit.org/show_bug.cgi?id=63930
+
+        Reviewed by Zoltan Herczeg.
+
+        Layout test is updated to follow the bugfix.
+
+        * platform/mac/svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr-expected.png:
+
 2011-07-15  Jeff Miller  <jeffm@apple.com>
 
         Fullscreen content doesn't use fullscreen controller on Windows
index 084af2092a4998bdc9919a6588d95611d6d9ffa3..5e0c372b9f83fd4369259dbded3b8c41029e2386 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr-expected.png differ
index 642b26174f76e6df796d0f867cd3d39e8a1a10f8..953f53cf72819f44a4bfb360f9171e03f48054f9 100644 (file)
@@ -1,3 +1,17 @@
+2011-07-15  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
+
+        Pixel difference in FEMorphology effect
+        https://bugs.webkit.org/show_bug.cgi?id=63930
+
+        Reviewed by Zoltan Herczeg.
+
+        Using short-circuit evaluation in the setFilterEffectAttribute function
+        was wrong. We should call both setRadius functions and evaluate the
+        changes separately.
+
+        * svg/SVGFEMorphologyElement.cpp:
+        (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
+
 2011-07-15  Jeff Miller  <jeffm@apple.com>
 
         Fullscreen content doesn't use fullscreen controller on Windows
index 31ec4b4cbd92e9e9b7006bfc9093627d977946f5..4549c1eebfb50539d29a6ddee024fdbc9e783836 100644 (file)
@@ -125,8 +125,12 @@ bool SVGFEMorphologyElement::setFilterEffectAttribute(FilterEffect* effect, cons
     FEMorphology* morphology = static_cast<FEMorphology*>(effect);
     if (attrName == SVGNames::operatorAttr)
         return morphology->setMorphologyOperator(_operator());
-    if (attrName == SVGNames::radiusAttr)
-        return (morphology->setRadiusX(radiusX()) || morphology->setRadiusY(radiusY()));
+    if (attrName == SVGNames::radiusAttr) {
+        // Both setRadius functions should be evaluated separately.
+        bool isRadiusXChanged = morphology->setRadiusX(radiusX());
+        bool isRadiusYChanged = morphology->setRadiusY(radiusY());
+        return isRadiusXChanged || isRadiusYChanged;
+    }
 
     ASSERT_NOT_REACHED();
     return false;