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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:53:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c305ee2a6e523a4a8571b79a514e7900b862e294
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 25 01:44:34 2003 +0000

            Reviewed by John.
    
            - fixed 3382179 -- REGRESSION: many images scroll down while loading (e.g., homepage.mac.com slide show)
    
            * WebCoreSupport.subproj/WebImageRenderer.m:
            (-[WebImageRenderer drawClippedToValidInRect:fromRect:]): While loading, always draw one less line than
            the number NSImage says we have, since that last line is a partial line and draws unwanted white. This
            is not what the bug report complains about, but is a longstanding and very minor issue. Remove the code
            that adjust the Y origin. This is what the bug report is about. That adjustment is incorrect and was
            unknowingly compensating for some kind of NSImage bug that is now fixed.
            (-[WebImageRenderer tileInRect:fromPoint:]): Added an assertion that the WebImageRenderer is flipped.
            The code does assume that it's flipped.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4883 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0e7830b..2dbc4f6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2003-08-24  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+        - fixed 3382179 -- REGRESSION: many images scroll down while loading (e.g., homepage.mac.com slide show)
+
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]): While loading, always draw one less line than
+        the number NSImage says we have, since that last line is a partial line and draws unwanted white. This
+        is not what the bug report complains about, but is a longstanding and very minor issue. Remove the code
+        that adjust the Y origin. This is what the bug report is about. That adjustment is incorrect and was
+        unknowingly compensating for some kind of NSImage bug that is now fixed.
+        (-[WebImageRenderer tileInRect:fromPoint:]): Added an assertion that the WebImageRenderer is flipped.
+        The code does assume that it's flipped.
+
 2003-08-22  John Sullivan  <sullivan at apple.com>
 	
 	- fixed 3385837 -- REGRESSION: can't paste link from Safari into 
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 3849428..d35cc5b 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -284,11 +284,17 @@ static NSMutableSet *activeImageRenderers;
 - (void)drawClippedToValidInRect:(NSRect)ir fromRect:(NSRect)fr
 {
     if (loadStatus >= 0) {
+        // The last line might be a partial line, so the number of complete lines is the number
+        // we get from NSImage minus one.
+        int numCompleteLines = loadStatus - 1;
+        if (numCompleteLines <= 0) {
+            return;
+        }
         int pixelsHigh = [[[self representations] objectAtIndex:0] pixelsHigh];
-        if (pixelsHigh > loadStatus) {
+        if (pixelsHigh > numCompleteLines) {
             // 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);
+            // use numCompleteLines because the image may be scaled.
+            float clippedImageHeight = floor([self size].height * numCompleteLines / pixelsHigh);
             
             // Figure out how much of the source is OK to draw from.
             float clippedSourceHeight = clippedImageHeight - fr.origin.y;
@@ -300,12 +306,10 @@ static NSMutableSet *activeImageRenderers;
             float clippedDestinationHeight = ir.size.height * clippedSourceHeight / fr.size.height;
 
             // 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.
             ASSERT([self isFlipped]);
             ASSERT([[NSView focusView] isFlipped]);
             ir.size.height = clippedDestinationHeight;
-            fr.origin.y += fr.size.height - clippedSourceHeight;
             fr.size.height = clippedSourceHeight;
         }
     }
@@ -392,6 +396,7 @@ static NSMutableSet *activeImageRenderers;
 - (void)tileInRect:(NSRect)rect fromPoint:(NSPoint)point
 {
     // These calculations are only correct for the flipped case.
+    ASSERT([self isFlipped]);
     ASSERT([[NSView focusView] isFlipped]);
 
     NSSize size = [self size];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list