[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:17:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit da73a565594fc5729ddb06eed1bb018ecc9c93ca
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 16 22:42:34 2010 +0000

    2010-07-16  Fady Samuel  <fsamuel at chromium.org>
    
            Reviewed by David Levin.
    
            Added layout test to show correct zero-width stroke.
    
            SVG - stroke-width:0 bug with stroke other than "none"
            https://bugs.webkit.org/show_bug.cgi?id=42387
    
            * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
            * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
            * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
            * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
            * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
            * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
            * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
            * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
            * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
            * svg/stroke/path-zero-strokewidth-test.svg: Added.
    2010-07-16  Fady Samuel  <fsamuel at chromium.org>
    
            Reviewed by David Levin.
    
            Avoids adding stroke when stroke-width is zero.
    
            SVG - stroke-width:0 bug with stroke other than "none"
            https://bugs.webkit.org/show_bug.cgi?id=42387
    
            Test: svg/stroke/path-zero-strokewidth-test.svg
    
            * platform/graphics/skia/GraphicsContextSkia.cpp:
            (WebCore::GraphicsContext::drawConvexPolygon):
            (WebCore::GraphicsContext::drawEllipse):
            (WebCore::GraphicsContext::drawLine):
            (WebCore::GraphicsContext::strokeArc):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::strokeRect):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63593 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4c5e1ed..4a36d77 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-16  Fady Samuel  <fsamuel at chromium.org>
+
+        Reviewed by David Levin.
+
+        Added layout test to show correct zero-width stroke.
+
+        SVG - stroke-width:0 bug with stroke other than "none"
+        https://bugs.webkit.org/show_bug.cgi?id=42387
+
+        * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
+        * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
+        * platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
+        * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
+        * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
+        * platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
+        * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum: Added.
+        * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png: Added.
+        * platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt: Added.
+        * svg/stroke/path-zero-strokewidth-test.svg: Added.
+
 2010-07-16  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum
new file mode 100644
index 0000000..c7a30dd
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.checksum
@@ -0,0 +1 @@
+45c309e75b17343570a34880dc8624b1
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png
new file mode 100644
index 0000000..ab1011e
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt
new file mode 100644
index 0000000..3ce8a5b
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/svg/stroke/path-zero-strokewidth-test-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 500x500
+  RenderSVGRoot {svg} at (40,10) size 285x75
+    RenderPath {polygon} at (40,10) size 100x60 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M100.00,10.00 L120.00,20.00 L130.00,15.00 L140.00,50.00 L130.00,60.00 L120.00,70.00 L90.00,60.00 L40.00,25.00 Z"]
+    RenderPath {rect} at (200,10) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M200.00,10.00 L250.00,10.00 L250.00,60.00 L200.00,60.00 Z"]
+    RenderPath {circle} at (275,35) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M325.00,60.00 L324.95,61.57 L324.80,63.13 L324.56,64.68 L324.21,66.22 L323.78,67.73 L323.24,69.20 L322.62,70.64 L321.91,72.04 L321.11,73.40 L320.23,74.69 L319.26,75.94 L318.22,77.11 L317.11,78.22 L315.94,79.26 L314.69,80.23 L313.40,81.11 L312.04,81.91 L310.64,82.62 L309.20,83.24 L307.73,83.78 L306.22,84.21 L304.68,84.56 L303.13,84.80 L301.57,84.95 L300.00,85.00 L298.43,84.95 L296.87,84.80 L295.32,84.56 L293.78,84.21 L292.27,83.78 L290.80,83.24 L289.36,82.62 L287.96,81.91 L286.60,81.11 L285.31,80.23 L284.06,79.26 L282.89,78.22 L281.78,77.11 L280.74,75.94 L279.77,74.69 L278.89,73.40 L278.09,72.04 L277.38,70.64 L276.76,69.20 L276.22,67.73 L275.79,66.22 L275.44,64.68 L275.20,63.13 L275.05,61.57 L275.00,60.00 L275.05,58.43 L275.20,56.87 L275.44,55.32 L275.79,53.78 L276.22,52.27 L276.76,50.80 L277.38,49.36 L278.09,47.96 L278.89,46.60 L279.77,45.31 L280.74,44.06 L281.78,42.89 L282.89,41.78 L284.06,40.74 L285.31,39.77 L286.60,38.89 L287.96,38.09 L289.36,37.38 L290.80,36.76 L292.27,36.22 L293.78,35.79 L295.32,35.44 L296.87,35.20 L298.43,35.05 L300.00,35.00 L301.57,35.05 L303.13,35.20 L304.68,35.44 L306.22,35.79 L307.73,36.22 L309.20,36.76 L310.64,37.38 L312.04,38.09 L313.40,38.89 L314.69,39.77 L315.94,40.74 L317.11,41.78 L318.22,42.89 L319.26,44.06 L320.23,45.31 L321.11,46.60 L321.91,47.96 L322.62,49.36 L323.24,50.80 L323.78,52.27 L324.21,53.78 L324.56,55.32 L324.80,56.87 L324.95,58.43 Z"]
diff --git a/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum
new file mode 100644
index 0000000..a20761e
--- /dev/null
+++ b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.checksum
@@ -0,0 +1 @@
+22998279d01102f1d51d87c163f7eb1b
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png
new file mode 100644
index 0000000..b07271a
Binary files /dev/null and b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.png differ
diff --git a/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt
new file mode 100644
index 0000000..d4cd0d4
--- /dev/null
+++ b/LayoutTests/platform/chromium-mac/svg/stroke/path-zero-strokewidth-test-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 500x500
+  RenderSVGRoot {svg} at (0,0) size 500x500
+    RenderPath {polygon} at (40,10) size 100x60 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M100.00,10.00 L120.00,20.00 L130.00,15.00 L140.00,50.00 L130.00,60.00 L120.00,70.00 L90.00,60.00 L40.00,25.00 Z"]
+    RenderPath {rect} at (200,10) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M200.00,10.00 L250.00,10.00 L250.00,60.00 L200.00,60.00 Z"]
+    RenderPath {circle} at (275,35) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M325.00,60.00 L324.95,61.57 L324.80,63.13 L324.56,64.68 L324.21,66.22 L323.78,67.73 L323.24,69.20 L322.62,70.64 L321.91,72.04 L321.11,73.40 L320.23,74.69 L319.26,75.94 L318.22,77.11 L317.11,78.22 L315.94,79.26 L314.69,80.23 L313.40,81.11 L312.04,81.91 L310.64,82.62 L309.20,83.24 L307.73,83.78 L306.22,84.21 L304.68,84.56 L303.13,84.80 L301.57,84.95 L300.00,85.00 L298.43,84.95 L296.87,84.80 L295.32,84.56 L293.78,84.21 L292.27,83.78 L290.80,83.24 L289.36,82.62 L287.96,81.91 L286.60,81.11 L285.31,80.23 L284.06,79.26 L282.89,78.22 L281.78,77.11 L280.74,75.94 L279.77,74.69 L278.89,73.40 L278.09,72.04 L277.38,70.64 L276.76,69.20 L276.22,67.73 L275.79,66.22 L275.44,64.68 L275.20,63.13 L275.05,61.57 L275.00,60.00 L275.05,58.43 L275.20,56.87 L275.44,55.32 L275.79,53.78 L276.22,52.27 L276.76,50.80 L277.38,49.36 L278.09,47.96 L278.89,46.60 L279.77,45.31 L280.74,44.06 L281.78,42.89 L282.89,41.78 L284.06,40.74 L285.31,39.77 L286.60,38.89 L287.96,38.09 L289.36,37.38 L290.80,36.76 L292.27,36.22 L293.78,35.79 L295.32,35.44 L296.87,35.20 L298.43,35.05 L300.00,35.00 L301.57,35.05 L303.13,35.20 L304.68,35.44 L306.22,35.79 L307.73,36.22 L309.20,36.76 L310.64,37.38 L312.04,38.09 L313.40,38.89 L314.69,39.77 L315.94,40.74 L317.11,41.78 L318.22,42.89 L319.26,44.06 L320.23,45.31 L321.11,46.60 L321.91,47.96 L322.62,49.36 L323.24,50.80 L323.78,52.27 L324.21,53.78 L324.56,55.32 L324.80,56.87 L324.95,58.43 Z"]
diff --git a/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum
new file mode 100644
index 0000000..a20761e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.checksum
@@ -0,0 +1 @@
+22998279d01102f1d51d87c163f7eb1b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png
new file mode 100644
index 0000000..54c5e83
Binary files /dev/null and b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt
new file mode 100644
index 0000000..3ce8a5b
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/stroke/path-zero-strokewidth-test-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 500x500
+  RenderSVGRoot {svg} at (40,10) size 285x75
+    RenderPath {polygon} at (40,10) size 100x60 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M100.00,10.00 L120.00,20.00 L130.00,15.00 L140.00,50.00 L130.00,60.00 L120.00,70.00 L90.00,60.00 L40.00,25.00 Z"]
+    RenderPath {rect} at (200,10) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M200.00,10.00 L250.00,10.00 L250.00,60.00 L200.00,60.00 Z"]
+    RenderPath {circle} at (275,35) size 50x50 [stroke={[type=SOLID] [color=#000088] [stroke width=0.00]}] [fill={[type=SOLID] [color=#DDEEFF]}] [data="M325.00,60.00 L324.95,61.57 L324.80,63.13 L324.56,64.68 L324.21,66.22 L323.78,67.73 L323.24,69.20 L322.62,70.64 L321.91,72.04 L321.11,73.40 L320.23,74.69 L319.26,75.94 L318.22,77.11 L317.11,78.22 L315.94,79.26 L314.69,80.23 L313.40,81.11 L312.04,81.91 L310.64,82.62 L309.20,83.24 L307.73,83.78 L306.22,84.21 L304.68,84.56 L303.13,84.80 L301.57,84.95 L300.00,85.00 L298.43,84.95 L296.87,84.80 L295.32,84.56 L293.78,84.21 L292.27,83.78 L290.80,83.24 L289.36,82.62 L287.96,81.91 L286.60,81.11 L285.31,80.23 L284.06,79.26 L282.89,78.22 L281.78,77.11 L280.74,75.94 L279.77,74.69 L278.89,73.40 L278.09,72.04 L277.38,70.64 L276.76,69.20 L276.22,67.73 L275.79,66.22 L275.44,64.68 L275.20,63.13 L275.05,61.57 L275.00,60.00 L275.05,58.43 L275.20,56.87 L275.44,55.32 L275.79,53.78 L276.22,52.27 L276.76,50.80 L277.38,49.36 L278.09,47.96 L278.89,46.60 L279.77,45.31 L280.74,44.06 L281.78,42.89 L282.89,41.78 L284.06,40.74 L285.31,39.77 L286.60,38.89 L287.96,38.09 L289.36,37.38 L290.80,36.76 L292.27,36.22 L293.78,35.79 L295.32,35.44 L296.87,35.20 L298.43,35.05 L300.00,35.00 L301.57,35.05 L303.13,35.20 L304.68,35.44 L306.22,35.79 L307.73,36.22 L309.20,36.76 L310.64,37.38 L312.04,38.09 L313.40,38.89 L314.69,39.77 L315.94,40.74 L317.11,41.78 L318.22,42.89 L319.26,44.06 L320.23,45.31 L321.11,46.60 L321.91,47.96 L322.62,49.36 L323.24,50.80 L323.78,52.27 L324.21,53.78 L324.56,55.32 L324.80,56.87 L324.95,58.43 Z"]
diff --git a/LayoutTests/svg/stroke/path-zero-strokewidth-test.svg b/LayoutTests/svg/stroke/path-zero-strokewidth-test.svg
new file mode 100644
index 0000000..94b4f2c
--- /dev/null
+++ b/LayoutTests/svg/stroke/path-zero-strokewidth-test.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="500" height="500">
+ <polygon points="100,10 120,20 130,15 140,50 130,60 120,70 90,60 40,25" />
+ <rect x="200" y="10" width="50" height="50"/>
+ <circle cx="300" cy="60" r="25"/>
+ <style type="text/css">
+   polygon, rect, circle { stroke:#008; stroke-width:0; fill:#DEF; }
+ </style>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f75860c..612b1e2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-07-16  Fady Samuel  <fsamuel at chromium.org>
+
+        Reviewed by David Levin.
+        
+        Avoids adding stroke when stroke-width is zero.
+
+        SVG - stroke-width:0 bug with stroke other than "none"
+        https://bugs.webkit.org/show_bug.cgi?id=42387
+
+        Test: svg/stroke/path-zero-strokewidth-test.svg
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::drawConvexPolygon):
+        (WebCore::GraphicsContext::drawEllipse):
+        (WebCore::GraphicsContext::drawLine):
+        (WebCore::GraphicsContext::strokeArc):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::strokeRect):
+
 2010-07-16  Kent Tamura  <tkent at chromium.org>
 
         Unreviewed, build fix.
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index 0c1898b..23c1526 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -473,7 +473,8 @@ void GraphicsContext::drawConvexPolygon(size_t numPoints,
 
     if (strokeStyle() != NoStroke) {
         paint.reset();
-        platformContext()->setupPaintForStroking(&paint, 0, 0);
+        if (!platformContext()->setupPaintForStroking(&paint, 0, 0))
+            return;
         platformContext()->canvas()->drawPath(path, paint);
     }
 }
@@ -505,7 +506,8 @@ void GraphicsContext::drawEllipse(const IntRect& elipseRect)
 
     if (strokeStyle() != NoStroke) {
         paint.reset();
-        platformContext()->setupPaintForStroking(&paint, &rect, 0);
+        if (!platformContext()->setupPaintForStroking(&paint, &rect, 0))
+            return;
         platformContext()->canvas()->drawOval(rect, paint);
     }
 }
@@ -568,7 +570,8 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
     // probably worth the speed up of no square root, which also won't be exact.
     FloatSize disp = p2 - p1;
     int length = SkScalarRound(disp.width() + disp.height());
-    platformContext()->setupPaintForStroking(&paint, 0, length);
+    if (!platformContext()->setupPaintForStroking(&paint, 0, length))
+        return;
 
     if (strokeStyle() == DottedStroke || strokeStyle() == DashedStroke) {
         // Do a rect fill of our endpoints.  This ensures we always have the
@@ -1110,8 +1113,10 @@ void GraphicsContext::strokeArc(const IntRect& r, int startAngle, int angleSpan)
         platformContext()->setupPaintForFilling(&paint);
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setStrokeWidth(WebCoreFloatToSkScalar(strokeThickness()));
-    } else
-        platformContext()->setupPaintForStroking(&paint, 0, 0);
+    } else {
+        if (!platformContext()->setupPaintForStroking(&paint, 0, 0))
+            return;
+    }
 
     // We do this before converting to scalar, so we don't overflow SkFixed.
     startAngle = fastMod(startAngle, 360);
@@ -1134,7 +1139,8 @@ void GraphicsContext::strokePath()
         return;
 
     SkPaint paint;
-    platformContext()->setupPaintForStroking(&paint, 0, 0);
+    if (!platformContext()->setupPaintForStroking(&paint, 0, 0))
+        return;
     platformContext()->canvas()->drawPath(path, paint);
 }
 
@@ -1147,7 +1153,8 @@ void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth)
         return;
 
     SkPaint paint;
-    platformContext()->setupPaintForStroking(&paint, 0, 0);
+    if (!platformContext()->setupPaintForStroking(&paint, 0, 0))
+        return;
     paint.setStrokeWidth(WebCoreFloatToSkScalar(lineWidth));
     platformContext()->canvas()->drawRect(rect, paint);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list