[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:54:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 32201a7b14cde364841760f94487e247e200a037
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 03:10:51 2010 +0000

    2010-08-10  Matthew Delaney  <mdelaney at apple.com>
    
            Reviewed by Darin Adler.
    
            2d.path.clip.empty.html test is failing
            https://bugs.webkit.org/show_bug.cgi?id=43161
    
            * platform/mac/Skipped: Unskipping now passing path.clip.empty
    2010-08-10  Matthew Delaney  <mdelaney at apple.com>
    
            Reviewed by Darin Adler.
    
            2d.path.clip.empty.html test is failing
            https://bugs.webkit.org/show_bug.cgi?id=43161
    
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::clip):
            Catching the empty path case from being sent directly to
            CGContextClip - which would ignore it. Instead, using
            CGContextClip with a CGRectZero to achieve the desired
            behavior of reducing the clipping region to nothing.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65118 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8fdcae2..95662cc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-10  Matthew Delaney  <mdelaney at apple.com>
+
+        Reviewed by Darin Adler.
+
+        2d.path.clip.empty.html test is failing
+        https://bugs.webkit.org/show_bug.cgi?id=43161
+
+        * platform/mac/Skipped: Unskipping now passing path.clip.empty
+
 2010-08-10  Sergio Villar Senin  <svillar at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 1e3b65c..127193d 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -161,7 +161,6 @@ scrollbars/scrollbar-click-does-not-blur-content.html
 
 # Failing canvas test cases from http://philip.html5.org/tests/canvas/suite/tests/
 canvas/philip/tests/2d.drawImage.broken.html
-canvas/philip/tests/2d.path.clip.empty.html
 canvas/philip/tests/2d.composite.operation.clear.html
 canvas/philip/tests/2d.composite.operation.darker.html
 canvas/philip/tests/2d.composite.operation.highlight.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8ca2e0e..9101279 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-10  Matthew Delaney  <mdelaney at apple.com>
+
+        Reviewed by Darin Adler.
+
+        2d.path.clip.empty.html test is failing
+        https://bugs.webkit.org/show_bug.cgi?id=43161
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::clip):
+        Catching the empty path case from being sent directly to 
+        CGContextClip - which would ignore it. Instead, using 
+        CGContextClip with a CGRectZero to achieve the desired
+        behavior of reducing the clipping region to nothing.
+
 2010-08-10  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 2de4d14..c3d4c07 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -950,9 +950,17 @@ void GraphicsContext::clip(const Path& path)
     if (paintingDisabled())
         return;
     CGContextRef context = platformContext();
-    CGContextBeginPath(context);
-    CGContextAddPath(context, path.platformPath());
-    CGContextClip(context);
+
+    // CGContextClip does nothing if the path is empty, so in this case, we
+    // instead clip against a zero rect to reduce the clipping region to
+    // nothing - which is the intended behavior of clip() if the path is empty.    
+    if (path.isEmpty())
+        CGContextClipToRect(context, CGRectZero);
+    else {
+        CGContextBeginPath(context);
+        CGContextAddPath(context, path.platformPath());
+        CGContextClip(context);
+    }
     m_data->clip(path);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list