Title: [89374] trunk
Revision
89374
Author
commit-qu...@webkit.org
Date
2011-06-21 13:30:04 -0700 (Tue, 21 Jun 2011)

Log Message

2011-06-21  Martin Robinson  <mrobin...@igalia.com>

        Reviewed by Dirk Schulze.

        [GTK] r89314 caused several shadow tests to start failing
        https://bugs.webkit.org/show_bug.cgi?id=63045

        * platform/gtk/Skipped: Unskip tests that are now passing.
2011-06-21  Martin Robinson  <mrobin...@igalia.com>

        Reviewed by Dirk Schulze.

        [GTK] r89314 caused several shadow tests to start failing
        https://bugs.webkit.org/show_bug.cgi?id=63045

        Use prepareForFilling and prepareForStroking when rendering the shadowed
        image of a path. This ensures that the shadowed image has the proper alpha.

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::drawPathShadow): Properly prepare the shadow image.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89373 => 89374)


--- trunk/LayoutTests/ChangeLog	2011-06-21 19:58:38 UTC (rev 89373)
+++ trunk/LayoutTests/ChangeLog	2011-06-21 20:30:04 UTC (rev 89374)
@@ -1,3 +1,12 @@
+2011-06-21  Martin Robinson  <mrobin...@igalia.com>
+
+        Reviewed by Dirk Schulze.
+
+        [GTK] r89314 caused several shadow tests to start failing
+        https://bugs.webkit.org/show_bug.cgi?id=63045
+
+        * platform/gtk/Skipped: Unskip tests that are now passing.
+
 2011-06-21  Mikhail Naganov  <mnaga...@chromium.org>
 
         Reviewed by Pavel Feldman.

Modified: trunk/LayoutTests/platform/gtk/Skipped (89373 => 89374)


--- trunk/LayoutTests/platform/gtk/Skipped	2011-06-21 19:58:38 UTC (rev 89373)
+++ trunk/LayoutTests/platform/gtk/Skipped	2011-06-21 20:30:04 UTC (rev 89374)
@@ -1542,20 +1542,3 @@
 # [GTK] DumpRenderTree doesn't block external requests
 # https://bugs.webkit.org/show_bug.cgi?id=62585
 fast/workers/worker-crash-with-invalid-location.html
-
-# [GTK] r89314 caused several shadow tests to start failing
-# https://bugs.webkit.org/show_bug.cgi?id=63045
-canvas/philip/tests/2d.shadow.alpha.3.html
-canvas/philip/tests/2d.shadow.alpha.4.html
-canvas/philip/tests/2d.shadow.alpha.5.html
-canvas/philip/tests/2d.shadow.gradient.alpha.html
-canvas/philip/tests/2d.shadow.gradient.transparent.1.html
-canvas/philip/tests/2d.shadow.pattern.alpha.html
-canvas/philip/tests/2d.shadow.pattern.transparent.1.html
-fast/canvas/canvas-fillPath-alpha-shadow.html
-fast/canvas/canvas-fillPath-gradient-shadow.html
-fast/canvas/canvas-fillPath-pattern-shadow.html
-fast/canvas/canvas-strokePath-alpha-shadow.html
-fast/canvas/canvas-strokePath-gradient-shadow.html
-fast/canvas/canvas-strokeRect-alpha-shadow.html
-fast/canvas/canvas-strokeRect-gradient-shadow.html

Modified: trunk/Source/WebCore/ChangeLog (89373 => 89374)


--- trunk/Source/WebCore/ChangeLog	2011-06-21 19:58:38 UTC (rev 89373)
+++ trunk/Source/WebCore/ChangeLog	2011-06-21 20:30:04 UTC (rev 89374)
@@ -1,3 +1,16 @@
+2011-06-21  Martin Robinson  <mrobin...@igalia.com>
+
+        Reviewed by Dirk Schulze.
+
+        [GTK] r89314 caused several shadow tests to start failing
+        https://bugs.webkit.org/show_bug.cgi?id=63045
+
+        Use prepareForFilling and prepareForStroking when rendering the shadowed
+        image of a path. This ensures that the shadowed image has the proper alpha.
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::drawPathShadow): Properly prepare the shadow image.
+
 2011-06-21  Mikhail Naganov  <mnaga...@chromium.org>
 
         Reviewed by Pavel Feldman.

Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (89373 => 89374)


--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2011-06-21 19:58:38 UTC (rev 89373)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2011-06-21 20:30:04 UTC (rev 89374)
@@ -129,14 +129,20 @@
     // context to preserve things such as the fill rule and stroke width.
     copyContextProperties(cairoContext, shadowContext);
 
-    cairo_append_path(shadowContext, path.get());
+    PlatformContextCairo platformShadowContext(shadowContext);
+    if (drawingStyle & Fill) {
+        cairo_append_path(shadowContext, path.get());
+        platformShadowContext.prepareForFilling(context->state(), PlatformContextCairo::NoAdjustment);
+        cairo_clip_preserve(shadowContext);
+        cairo_paint_with_alpha(shadowContext, context->platformContext()->globalAlpha());
+    }
 
-    // The color of the shadow doesn't matter, since it's simply used as a mask.
-    cairo_set_source_rgb(shadowContext, 1, 0, 0);
-    if (drawingStyle & Fill)
-        cairo_fill_preserve(shadowContext);
-    if (drawingStyle & Stroke)
-        cairo_stroke_preserve(shadowContext);
+    if (drawingStyle & Stroke) {
+        cairo_append_path(shadowContext, path.get());
+        platformShadowContext.prepareForStroking(context->state());
+        cairo_stroke(shadowContext);
+    }
+
     shadow->endShadowLayer(context);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to