[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

bdakin at apple.com bdakin at apple.com
Thu Apr 8 01:02:51 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit fe959510b2c06ba5395cfb9e8fadd322df02f001
Author: bdakin at apple.com <bdakin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 12 23:10:22 2010 +0000

    WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: -
    webkit-svg-shadow with opacity still over-clipped
    
    Reviewed by Sam Weinig.
    
    We need to call inflateForShadow() on the repaintRect before we
    clip for opacity or we will over-clip.
    * rendering/SVGRenderSupport.cpp:
    (WebCore::SVGRenderBase::prepareToRenderSVGContent):
    
    LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION:
    -webkit-svg-shadow with opacity still over-clipped
    
    Reviewed by Sam Weinig.
    
    * platform/mac/svg/css/shadow-and-opacity-expected.checksum: Added.
    * platform/mac/svg/css/shadow-and-opacity-expected.png: Added.
    * platform/mac/svg/css/shadow-and-opacity-expected.txt: Added.
    * svg/css/shadow-and-opacity.svg: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53166 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 92edb32..d0a8e9e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-12  Beth Dakin  <bdakin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Test for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: 
+        -webkit-svg-shadow with opacity still over-clipped
+
+        * platform/mac/svg/css/shadow-and-opacity-expected.checksum: Added.
+        * platform/mac/svg/css/shadow-and-opacity-expected.png: Added.
+        * platform/mac/svg/css/shadow-and-opacity-expected.txt: Added.
+        * svg/css/shadow-and-opacity.svg: Added.
+
 2010-01-11  Jon Honeycutt  <jhoneycutt at apple.com>
 
         MSAA: Accessibility role of <select multiple> elements is wrong
diff --git a/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.checksum b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.checksum
new file mode 100644
index 0000000..82d5b01
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.checksum
@@ -0,0 +1 @@
+0b9b24f247089d2c5ec510a922dde71b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.png b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.png
new file mode 100644
index 0000000..a27bce4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.txt b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.txt
new file mode 100644
index 0000000..825624e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/css/shadow-and-opacity-expected.txt
@@ -0,0 +1,5 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (100,100) size 200x200
+    RenderPath {rect} at (100,100) size 200x200 [opacity=0.50] [fill={[type=SOLID] [color=#008000]}] [data="M100.00,100.00 L300.00,100.00 L300.00,300.00 L100.00,300.00 Z"]
diff --git a/LayoutTests/svg/css/shadow-and-opacity.svg b/LayoutTests/svg/css/shadow-and-opacity.svg
new file mode 100644
index 0000000..ad7d8e0
--- /dev/null
+++ b/LayoutTests/svg/css/shadow-and-opacity.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<rect x="100" y="100" width="200" height="200" fill="green" style="opacity:0.5;-webkit-svg-shadow:-10px -10px 3px black;"/>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4afa023..977371c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-12  Beth Dakin  <bdakin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: -
+        webkit-svg-shadow with opacity still over-clipped
+
+        We need to call inflateForShadow() on the repaintRect before we 
+        clip for opacity or we will over-clip.
+        * rendering/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
 2010-01-12  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index a11ecef..49908d3 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -92,17 +92,20 @@ bool SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
     const SVGRenderStyle* svgStyle = style->svgStyle();
     ASSERT(svgStyle);
 
+    ShadowData* shadow = svgStyle->shadow();
+    IntRect repaintIntRectWithShadow = enclosingIntRect(repaintRect);
+    if (shadow)
+        svgStyle->inflateForShadow(repaintIntRectWithShadow);
+
     // Setup transparency layers before setting up filters!
     float opacity = style->opacity(); 
     if (opacity < 1.0f) {
-        paintInfo.context->clip(enclosingIntRect(repaintRect));
+        paintInfo.context->clip(repaintIntRectWithShadow);
         paintInfo.context->beginTransparencyLayer(opacity);
     }
 
-    if (ShadowData* shadow = svgStyle->shadow()) {
-        IntRect shadowRect = enclosingIntRect(repaintRect);
-        svgStyle->inflateForShadow(shadowRect);
-        paintInfo.context->clip(shadowRect);
+    if (shadow) {
+        paintInfo.context->clip(repaintIntRectWithShadow);
         paintInfo.context->setShadow(IntSize(shadow->x, shadow->y), shadow->blur, shadow->color, style->colorSpace());
         paintInfo.context->beginTransparencyLayer(1.0f);
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list