[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:00:55 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 462c784e656501904ecc4061f5292ae080ceddbb
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 11 23:41:09 2010 +0000

    2010-01-11  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG radialGradient example radial-gradient-with-outstanding-focalPoint.svg fails
            https://bugs.webkit.org/show_bug.cgi?id=32201
    
            * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
            * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum:
            * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png:
    2010-01-11  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG radialGradient example radial-gradient-with-outstanding-focalPoint.svg fails
            https://bugs.webkit.org/show_bug.cgi?id=32201
    
            This patch moves every focalPoint that lies outside the circle defined by the radial
            gradients central point and its radius to stay inside this circle, as demanded by the
            SVG 1.1 specification.
            We use r * 0.99 as maximum radius for the aforementioned circle, when determining where
            the focalPoint is lying, to achieve compatibility with Firefox.
    
            * svg/SVGRadialGradientElement.cpp:
            (WebCore::SVGRadialGradientElement::buildGradient):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53106 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 965127b..7e07490 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-11  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG radialGradient example radial-gradient-with-outstanding-focalPoint.svg fails
+        https://bugs.webkit.org/show_bug.cgi?id=32201
+
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
+        * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum:
+        * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png:
+
 2010-01-11  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum
index 2d088a8..d72a59a 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum
@@ -1 +1 @@
-5f90d76df993155a4cfdc3cda448dcba
\ No newline at end of file
+93d1daf5da7a945311c797368c278538
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png
index 02569a2..96b581a 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum b/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum
index c1f89bd..924538d 100644
--- a/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum
@@ -1 +1 @@
-fd20552b05d94c5d9cad2f5a8861c981
\ No newline at end of file
+561b441502095e222ff563fb80372abd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png b/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png
index adb6a27..623d5e3 100644
Binary files a/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png and b/LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2efc07b..b2a8d40 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-11  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG radialGradient example radial-gradient-with-outstanding-focalPoint.svg fails
+        https://bugs.webkit.org/show_bug.cgi?id=32201
+
+        This patch moves every focalPoint that lies outside the circle defined by the radial
+        gradients central point and its radius to stay inside this circle, as demanded by the
+        SVG 1.1 specification.
+        We use r * 0.99 as maximum radius for the aforementioned circle, when determining where
+        the focalPoint is lying, to achieve compatibility with Firefox.
+
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::buildGradient):
+
 2010-01-11  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/WebCore/svg/SVGRadialGradientElement.cpp b/WebCore/svg/SVGRadialGradientElement.cpp
index 270de6f..1367c90 100644
--- a/WebCore/svg/SVGRadialGradientElement.cpp
+++ b/WebCore/svg/SVGRadialGradientElement.cpp
@@ -108,29 +108,17 @@ void SVGRadialGradientElement::buildGradient() const
     FloatPoint adjustedFocalPoint = focalPoint;
     float dfx = focalPoint.x() - centerPoint.x();
     float dfy = focalPoint.y() - centerPoint.y();
+    float rMax = 0.99f * radius;
 
     // Spec: If (fx, fy) lies outside the circle defined by (cx, cy) and
     // r, set (fx, fy) to the point of intersection of the line through
     // (fx, fy) and the circle.
-    if (sqrt(dfx * dfx + dfy * dfy) >= radius) {
-        float angle = atan2f(dfx, dfy);
-
-        // The maximum deviation of 0.2% is needed on Cairo, since Cairo
-        // is working with fixed point numbers.
-#if PLATFORM(CAIRO)
-        if (focalPoint.x() < centerPoint.x())
-            dfx = cosf(angle) * radius + 0.002f;
-        else
-            dfx = cosf(angle) * radius - 0.002f;
-        if (focalPoint.y() < centerPoint.y())
-            dfy = sinf(angle) * radius + 0.002f;
-        else
-            dfy = sinf(angle) * radius - 0.002f;
-#else
-        dfx = cosf(angle) * radius;
-        dfy = sinf(angle) * radius;
-#endif
+    // We scale the radius by 0.99 to match the behavior of FireFox.
+    if (sqrt(dfx * dfx + dfy * dfy) > rMax) {
+        float angle = atan2f(dfy, dfx);
 
+        dfx = cosf(angle) * rMax;
+        dfy = sinf(angle) * rMax;
         adjustedFocalPoint = FloatPoint(dfx + centerPoint.x(), dfy + centerPoint.y());
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list