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

simon.fraser at apple.com simon.fraser at apple.com
Thu Apr 8 01:04:03 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit d12a8619fc33055361c417d56be0ff91479a0211
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 14 00:07:58 2010 +0000

    2010-01-13  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Fix shadow drawing to do the correct computations using the base coordinate space
            https://bugs.webkit.org/show_bug.cgi?id=33629
    
            Step 1: do some renames in setPlatformShadow():
                size -> offset
                width -> xOffset
                height -> yOffset
    
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::setPlatformShadow):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53211 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6393cd0..d163aab 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-13  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Fix shadow drawing to do the correct computations using the base coordinate space
+        https://bugs.webkit.org/show_bug.cgi?id=33629
+
+        Step 1: do some renames in setPlatformShadow():
+            size -> offset
+            width -> xOffset
+            height -> yOffset
+        
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setPlatformShadow):
+
 2010-01-13  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 19bc2c2..746d1f5 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -739,12 +739,12 @@ void GraphicsContext::endTransparencyLayer()
     m_data->m_userToDeviceTransformKnownToBeIdentity = false;
 }
 
-void GraphicsContext::setPlatformShadow(const IntSize& size, int blur, const Color& color, ColorSpace colorSpace)
+void GraphicsContext::setPlatformShadow(const IntSize& offset, int blur, const Color& color, ColorSpace colorSpace)
 {
     if (paintingDisabled())
         return;
-    CGFloat width = size.width();
-    CGFloat height = size.height();
+    CGFloat xOffset = offset.width();
+    CGFloat yOffset = offset.height();
     CGFloat blurRadius = blur;
     CGContextRef context = platformContext();
 
@@ -761,34 +761,34 @@ void GraphicsContext::setPlatformShadow(const IntSize& size, int blur, const Col
         // Extreme "blur" values can make text drawing crash or take crazy long times, so clamp
         blurRadius = min(blur * smallEigenvalue, narrowPrecisionToCGFloat(1000.0));
 
-        CGSize sizeInDeviceSpace = CGSizeApplyAffineTransform(size, transform);
+        CGSize offsetInDeviceSpace = CGSizeApplyAffineTransform(offset, transform);
 
-        width = sizeInDeviceSpace.width;
-        height = sizeInDeviceSpace.height;
+        xOffset = offsetInDeviceSpace.width;
+        yOffset = offsetInDeviceSpace.height;
 
     }
 
     // Work around <rdar://problem/5539388> by ensuring that the offsets will get truncated
     // to the desired integer.
     static const CGFloat extraShadowOffset = narrowPrecisionToCGFloat(1.0 / 128);
-    if (width > 0)
-        width += extraShadowOffset;
-    else if (width < 0)
-        width -= extraShadowOffset;
+    if (xOffset > 0)
+        xOffset += extraShadowOffset;
+    else if (xOffset < 0)
+        xOffset -= extraShadowOffset;
 
-    if (height > 0)
-        height += extraShadowOffset;
-    else if (height < 0)
-        height -= extraShadowOffset;
+    if (yOffset > 0)
+        yOffset += extraShadowOffset;
+    else if (yOffset < 0)
+        yOffset -= extraShadowOffset;
 
     // Check for an invalid color, as this means that the color was not set for the shadow
     // and we should therefore just use the default shadow color.
     if (!color.isValid())
-        CGContextSetShadow(context, CGSizeMake(width, height), blurRadius);
+        CGContextSetShadow(context, CGSizeMake(xOffset, yOffset), blurRadius);
     else {
         RetainPtr<CGColorRef> colorCG(AdoptCF, createCGColorWithColorSpace(color, colorSpace));
         CGContextSetShadowWithColor(context,
-                                    CGSizeMake(width, height),
+                                    CGSizeMake(xOffset, yOffset),
                                     blurRadius,
                                     colorCG.get());
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list