[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:21:54 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 5ca7c050766d79ad95cebf5c6eeaedef4aefe08a
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 03:05:44 2010 +0000

    2010-02-16  Bryan Yeung  <bryeung at chromium.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add a new layout test for large stroke widths in SVG.
            This regression tests a bug in the Skia platform where the width was
            limited to 512.
    
            https://bugs.webkit.org/show_bug.cgi?id=34954
    
            * platform/mac/svg/custom/stroke-width-large-expected.checksum: Added.
            * platform/mac/svg/custom/stroke-width-large-expected.png: Added.
            * platform/mac/svg/custom/stroke-width-large-expected.txt: Added.
            * svg/custom/stroke-width-large.svg: Added.
    2010-02-16  Bryan Yeung  <bryeung at chromium.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Remove the bounds on stroke width and miter for the skia platform.
            https://bugs.webkit.org/show_bug.cgi?id=34954
    
            Test: svg/custom/stroke-width-large.svg
    
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (PlatformContextSkia::setupPaintForStroking):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 128f1d7..2348845 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-16  Bryan Yeung  <bryeung at chromium.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add a new layout test for large stroke widths in SVG.
+        This regression tests a bug in the Skia platform where the width was
+        limited to 512.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34954
+
+        * platform/mac/svg/custom/stroke-width-large-expected.checksum: Added.
+        * platform/mac/svg/custom/stroke-width-large-expected.png: Added.
+        * platform/mac/svg/custom/stroke-width-large-expected.txt: Added.
+        * svg/custom/stroke-width-large.svg: Added.
+
 2010-02-16  MORITA Hajime  <morrita at gmail.com>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.checksum b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.checksum
new file mode 100644
index 0000000..0b6eff6
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.checksum
@@ -0,0 +1 @@
+f088cf7e925b76ac3006f0759ac49901
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.png b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.png
new file mode 100644
index 0000000..cadd3a0
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.txt b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.txt
new file mode 100644
index 0000000..5dc6e67
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 9x7
+    RenderPath {path} at (316,209) size 150x133 [stroke={[type=SOLID] [color=#FF0000] [stroke width=256.00] [line join=ROUND]}] [data="M28600.00,19000.00 L41800.00,19000.00 L41800.00,30600.00 L28600.00,30600.00 Z"]
+    RenderPath {path} at (156,50) size 470x452 [stroke={[type=SOLID] [color=#000000] [stroke width=15000.00] [line join=ROUND]}] [data="M21600.00,12000.00 L48800.00,12000.00 L48800.00,37600.00 L21600.00,37600.00 Z"]
+    RenderSVGText {text} at (8000,49500) size 16044x1840 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,-1440) size 16044x1840
+        chunk 1 text run 1 at (8000.00,49500.00) startOffset 0 endOffset 25 width 16044.00: "No red should be visible."
diff --git a/LayoutTests/svg/custom/stroke-width-large.svg b/LayoutTests/svg/custom/stroke-width-large.svg
new file mode 100644
index 0000000..56f1d78
--- /dev/null
+++ b/LayoutTests/svg/custom/stroke-width-large.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="yes"?>
+<!-- The viewbox is set such that a large number may be used for the stroke. -->
+<svg version="1.1" fill="none" viewBox="0.0 0.0 72000.0 54000.0" xmlns="http://www.w3.org/2000/svg">
+    <path d="M28600 19000L41800 19000L41800 30600L28600 30600Z" fill-rule="nonzero" stroke="#FF0000" stroke-width="256" stroke-linejoin="round" stroke-linecap="butt"></path>
+    <path d="M21600 12000L48800 12000L48800 37600L21600 37600Z" fill-rule="nonzero" stroke="#000000" stroke-width="15000" stroke-linejoin="round" stroke-linecap="butt"></path>
+    <text fill="#000000" font-size="1600" x="8000.0" y="49500.0">No red should be visible.</text>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d98c7b4..dbd8133 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-16  Bryan Yeung  <bryeung at chromium.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Remove the bounds on stroke width and miter for the skia platform.
+        https://bugs.webkit.org/show_bug.cgi?id=34954
+
+        Test: svg/custom/stroke-width-large.svg
+
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (PlatformContextSkia::setupPaintForStroking):
+
 2010-02-16  MORITA Hajime  <morrita at gmail.com>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 92a1870..e0f6f5d 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -344,15 +344,6 @@ void PlatformContextSkia::setupPaintForFilling(SkPaint* paint) const
     paint->setShader(m_state->m_fillShader);
 }
 
-static SkScalar scalarBound(SkScalar v, SkScalar min, SkScalar max)
-{
-    if (v < min)
-        return min;
-    if (v > max)
-        return max;
-    return v;
-}
-
 float PlatformContextSkia::setupPaintForStroking(SkPaint* paint, SkRect* rect, int length) const
 {
     setupPaintCommon(paint);
@@ -361,13 +352,10 @@ float PlatformContextSkia::setupPaintForStroking(SkPaint* paint, SkRect* rect, i
     paint->setColor(m_state->applyAlpha(m_state->m_strokeColor));
     paint->setShader(m_state->m_strokeShader);
     paint->setStyle(SkPaint::kStroke_Style);
-    // The limits here (512 and 256) were made up but are hopefully large
-    // enough to be reasonable. They are, empirically, small enough not to
-    // cause overflows in Skia.
-    paint->setStrokeWidth(scalarBound(SkFloatToScalar(width), 0, 512));
+    paint->setStrokeWidth(SkFloatToScalar(width));
     paint->setStrokeCap(m_state->m_lineCap);
     paint->setStrokeJoin(m_state->m_lineJoin);
-    paint->setStrokeMiter(scalarBound(SkFloatToScalar(m_state->m_miterLimit), 0, 256));
+    paint->setStrokeMiter(SkFloatToScalar(m_state->m_miterLimit));
 
     if (m_state->m_dash)
         paint->setPathEffect(m_state->m_dash);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list