summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2009-04-27 16:43:03 -0400
committerCary Clark <cary@android.com>2009-04-27 16:43:03 -0400
commit0296aca4034b6c5c6509ad09d0144405f44c4ba1 (patch)
treeb64f4dd0fac1b469fc39d053648472b60c09f97a
parent2759fd77680ed2b2226098913bf008eb1ab69c8c (diff)
downloadexternal_webkit-0296aca4034b6c5c6509ad09d0144405f44c4ba1.zip
external_webkit-0296aca4034b6c5c6509ad09d0144405f44c4ba1.tar.gz
external_webkit-0296aca4034b6c5c6509ad09d0144405f44c4ba1.tar.bz2
fix svg radial gradients
Webkit has two radial gradients; the one describing the focus length isn't used by SVG, so if it's zero, use the other one. http://b/issue?id=1794403
-rw-r--r--WebCore/platform/graphics/android/GradientAndroid.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/GradientAndroid.cpp b/WebCore/platform/graphics/android/GradientAndroid.cpp
index c76b08d..b98c4a9 100644
--- a/WebCore/platform/graphics/android/GradientAndroid.cpp
+++ b/WebCore/platform/graphics/android/GradientAndroid.cpp
@@ -92,8 +92,9 @@ SkShader* Gradient::getShader(SkShader::TileMode mode)
SkShader* s;
if (m_radial)
- s = SkGradientShader::CreateRadial(pts[0], SkFloatToScalar(m_r0),
- colors, pos, count, mode);
+ // FIXME: SVG always passes 0 for m_r0
+ s = SkGradientShader::CreateRadial(pts[0],
+ SkFloatToScalar(m_r0 ? m_r0 : m_r1), colors, pos, count, mode);
else
s = SkGradientShader::CreateLinear(pts, colors, pos, count, mode);