[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

alex at webkit.org alex at webkit.org
Fri Jan 21 15:07:10 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 23c687cc080b26bc8de7d930baf242a4f4f37722
Author: alex at webkit.org <alex at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 7 10:25:29 2011 +0000

    2011-01-07  Alejandro G. Castro  <alex at igalia.com>
    
            Reviewed by Martin Robinson.
    
            Cairo's ContextShadow may mis-render some box shadows
            https://bugs.webkit.org/show_bug.cgi?id=51374
    
            The space required for the internal shadow of the corners was not
            correctly considered.
    
            * platform/graphics/cairo/ContextShadowCairo.cpp:
            (WebCore::ContextShadow::drawRectShadow):
    
    2011-01-07  Alejandro G. Castro  <alex at igalia.com>
    
            Reviewed by Martin Robinson.
    
            Cairo's ContextShadow may mis-render some box shadows
            https://bugs.webkit.org/show_bug.cgi?id=51374
    
            Added new test to check rectangular tiled shadows.
    
            * platform/gtk/fast/css/rect-shadow-tiled-expected.checksum: Added.
            * platform/gtk/fast/css/rect-shadow-tiled-expected.png: Added.
            * platform/gtk/fast/css/rect-shadow-tiled-expected.txt: Added.
            * platform/gtk/fast/css/rect-shadow-tiled.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75237 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8e35f06..cb523b6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-07  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        Cairo's ContextShadow may mis-render some box shadows
+        https://bugs.webkit.org/show_bug.cgi?id=51374
+
+        Added new test to check rectangular tiled shadows.
+
+        * platform/gtk/fast/css/rect-shadow-tiled-expected.checksum: Added.
+        * platform/gtk/fast/css/rect-shadow-tiled-expected.png: Added.
+        * platform/gtk/fast/css/rect-shadow-tiled-expected.txt: Added.
+        * platform/gtk/fast/css/rect-shadow-tiled.html: Added.
+
 2011-01-07  Kinuko Yasuda  <kinuko at chromium.org>
 
         Unreviewed; an attempt to fix chromium bot failures by removing failing test line (they must be failing due to modificationTime accuracy error).
diff --git a/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.checksum b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.checksum
new file mode 100644
index 0000000..2d68c14
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.checksum
@@ -0,0 +1 @@
+828eb8aaf7b505ca4be3acf42c94a297
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.png b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.png
new file mode 100644
index 0000000..6b9e91f
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.txt b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.txt
new file mode 100644
index 0000000..29e7a05
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (100,100) size 320x250
+  RenderBlock (positioned) {DIV} at (100,100) size 320x250
diff --git a/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled.html b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled.html
new file mode 100644
index 0000000..7bb4796
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/css/rect-shadow-tiled.html
@@ -0,0 +1,12 @@
+<style>
+    .roundedRect {
+        position: absolute;
+        left: 100px;
+        top: 100px;
+        width: 320px;
+        height: 250px;
+        -webkit-border-radius: 100px;
+        -webkit-box-shadow: 0 0 100px black;
+     }
+</style>
+<div class="roundedRect"></div>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 34a600f..70b0014 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-07  Alejandro G. Castro  <alex at igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        Cairo's ContextShadow may mis-render some box shadows
+        https://bugs.webkit.org/show_bug.cgi?id=51374
+
+        The space required for the internal shadow of the corners was not
+        correctly considered.
+
+        * platform/graphics/cairo/ContextShadowCairo.cpp:
+        (WebCore::ContextShadow::drawRectShadow):
+
 2011-01-06  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp b/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
index e8ef0c6..b0588d6 100644
--- a/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp
@@ -190,12 +190,20 @@ static inline FloatPoint getPhase(const FloatRect& dest, const FloatRect& tile)
 void ContextShadow::drawRectShadow(GraphicsContext* context, const IntRect& rect, const IntSize& topLeftRadius, const IntSize& topRightRadius, const IntSize& bottomLeftRadius, const IntSize& bottomRightRadius)
 {
 
-    // drawShadowedRect still does not work with rotations.
-    // https://bugs.webkit.org/show_bug.cgi?id=45042
     float radiusTwice = m_blurDistance * 2;
+
+    // Find the space the corners need inside the rect for its shadows.
+    int internalShadowWidth = radiusTwice + max(topLeftRadius.width(), bottomLeftRadius.width()) +
+        max(topRightRadius.width(), bottomRightRadius.width());
+    int internalShadowHeight = radiusTwice + max(topLeftRadius.height(), topRightRadius.height()) +
+        max(bottomLeftRadius.height(), bottomRightRadius.height());
+
     cairo_t* cr = context->platformContext();
-    if ((!context->getCTM().isIdentityOrTranslationOrFlipped()) || (radiusTwice > rect.width())
-        || (radiusTwice > rect.height()) || (m_type != BlurShadow)) {
+
+    // drawShadowedRect still does not work with rotations.
+    // https://bugs.webkit.org/show_bug.cgi?id=45042
+    if ((!context->getCTM().isIdentityOrTranslationOrFlipped()) || (internalShadowWidth > rect.width())
+        || (internalShadowHeight > rect.height()) || (m_type != BlurShadow)) {
         drawRectShadowWithoutTiling(context, rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, context->getAlpha());
         return;
     }
@@ -210,16 +218,10 @@ void ContextShadow::drawRectShadow(GraphicsContext* context, const IntRect& rect
     // Size of the tiling side.
     int sideTileWidth = 1;
 
-    // Find the extra space needed from the curve of the corners.
-    int extraWidthFromCornerRadii = radiusTwice + max(topLeftRadius.width(), bottomLeftRadius.width()) +
-        radiusTwice + max(topRightRadius.width(), bottomRightRadius.width());
-    int extraHeightFromCornerRadii = radiusTwice + max(topLeftRadius.height(), topRightRadius.height()) +
-        radiusTwice + max(bottomLeftRadius.height(), bottomRightRadius.height());
-
     // The length of a side of the buffer is the enough space for four blur radii,
     // the radii of the corners, and then 1 pixel to draw the side tiles.
-    IntSize shadowTemplateSize = IntSize(sideTileWidth + extraWidthFromCornerRadii,
-                                         sideTileWidth + extraHeightFromCornerRadii);
+    IntSize shadowTemplateSize = IntSize(sideTileWidth + radiusTwice + internalShadowWidth,
+                                         sideTileWidth + radiusTwice + internalShadowHeight);
 
     // Reduce the size of what we have to draw with the clip area.
     double x1, x2, y1, y2;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list