[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:37:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b76442a4d783329ade776be36f1f9d1c6738d3bd
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Apr 16 00:38:23 2003 +0000

            Fixed clipping of progressive images to correctly clip.
    
            Reviewed by darin.
    
            * WebCoreSupport.subproj/WebImageRenderer.m:
            (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 28f49b6..88e99c0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-15  Richard Williamson   <rjw at apple.com>
+
+        Fixed clipping of progressive images to correctly clip.
+        
+        Reviewed by darin.
+
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
+
 2003-04-15  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Darin
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 9939011..d67a8bb 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -242,7 +242,8 @@ static NSMutableArray *activeImageRenderers;
     if (loadStatus > 0) {
         int pixelsHigh = [[[self representations] objectAtIndex:0] pixelsHigh];
         if (pixelsHigh > loadStatus) {
-            // Figure out how much of the image is OK to draw.
+            // Figure out how much of the image is OK to draw.  We can't simply
+            // use loadStatus because the image may be scaled.
             float clippedImageHeight = floor([self size].height * loadStatus / pixelsHigh);
             
             // Figure out how much of the source is OK to draw from.
@@ -257,13 +258,10 @@ static NSMutableArray *activeImageRenderers;
             // Reduce heights of both rectangles without changing their positions.
             // In the non-flipped case, this means moving the origins up from the bottom left.
             // In the flipped case, just adjusting the height is sufficient.
-            if (![[NSView focusView] isFlipped]) {
-                ir.origin.y += ir.size.height - clippedDestinationHeight;
-            }
+            ASSERT ([self isFlipped]);
+            ASSERT ([[NSView focusView] isFlipped]);
             ir.size.height = clippedDestinationHeight;
-            if (![self isFlipped]) {
-                fr.origin.y += fr.size.height - clippedSourceHeight;
-            }
+            fr.origin.y += fr.size.height - clippedSourceHeight;
             fr.size.height = clippedSourceHeight;
         }
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list