[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:43:19 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 73b99d87fe9c6e6f5ea57c887c9cd9c755a90406
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed May 28 20:47:29 2003 +0000

    	Fixed 3165631 (and other similar).
    	Fixed 3262592.
    
    	We now set NSImage's cache mode to NSImageCacheNever during
    	progressive loads.  It gets reset to NSImageCacheDefault when
    	loads complete.
    
    	If an image is scaled, NSImage appears to create a NSCacheImageRep
    	with the wrong size during progessive image loading.  Specifically
    	it appears to create a cached rep with the original size.
    
            Reviewed by Chris.
    
            * WebCoreSupport.subproj/WebImageRenderer.m:
            (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
            (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
            * WebCoreSupport.subproj/WebImageRendererFactory.m:
            (-[WebImageRendererFactory imageRendererWithMIMEType:]):
    
            * WebView.subproj/WebPreferences.h:
    	Updated headerdoc comments.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4440 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 85056e3..663ce76 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,27 @@
+2003-05-28  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3165631 (and other similar).
+	Fixed 3262592.
+
+	We now set NSImage's cache mode to NSImageCacheNever during
+	progressive loads.  It gets reset to NSImageCacheDefault when
+	loads complete.
+
+	If an image is scaled, NSImage appears to create a NSCacheImageRep
+	with the wrong size during progessive image loading.  Specifically
+	it appears to create a cached rep with the original size.
+
+        Reviewed by Chris.
+
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
+        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
+        * WebCoreSupport.subproj/WebImageRendererFactory.m:
+        (-[WebImageRendererFactory imageRendererWithMIMEType:]):
+
+        * WebView.subproj/WebPreferences.h:
+	Updated headerdoc comments.
+
 2003-05-27  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: 3233442 - Crash in -[WebNetscapePluginPackage load] at http://www.adultswim.com/
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index bc4103d..15d7ace 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -180,8 +180,8 @@ static NSMutableArray *activeImageRenderers;
         //printf ("NSImageRepLoadStatusUnexpectedEOF size %d, isComplete %d\n", length, isComplete);
         // Force the image to use the pixel size and ignore the dpi.
         size = NSMakeSize([imageRep pixelsWide], [imageRep pixelsHigh]);
+        [self setCacheMode: NSImageCacheDefault];
         [imageRep setSize:size];
-        [self setSize:size];
         isNull = NO;
         return YES;
     default:
@@ -278,7 +278,7 @@ static NSMutableArray *activeImageRenderers;
 
 - (void)drawClippedToValidInRect:(NSRect)ir fromRect:(NSRect)fr
 {
-    if (loadStatus > 0) {
+    if (loadStatus >= 0) {
         int pixelsHigh = [[[self representations] objectAtIndex:0] pixelsHigh];
         if (pixelsHigh > loadStatus) {
             // Figure out how much of the image is OK to draw.  We can't simply
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
index 795b66e..689651a 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
@@ -52,6 +52,12 @@
     [imageRenderer addRepresentation:rep];
     [rep release];
     [imageRenderer setFlipped:YES];
+    
+    // Turn the default caching mode back on when the image has completed load.
+    // Caching intermediate progressive representations causes problems for
+    // progressive loads.  We also rely on the NSBitmapImageRep surviving during
+    // incremental loads.  See 3165631 and 3262592.
+    [imageRenderer setCacheMode: NSImageCacheNever];
 
     [imageRenderer setScalesWhenResized:NO];
     return [imageRenderer autorelease];
diff --git a/WebKit/WebView.subproj/WebPreferences.h b/WebKit/WebView.subproj/WebPreferences.h
index 1ec5e98..6f46a97 100644
--- a/WebKit/WebView.subproj/WebPreferences.h
+++ b/WebKit/WebView.subproj/WebPreferences.h
@@ -27,11 +27,12 @@ extern NSString *WebPreferencesChangedNotification;
 
 /*!
     @method initWithIdentifier:
-    @param anIdentifier The prefix to add to the user defaults keys for the WebPreferences.
+    @param anIdentifier A string used to identify the WebPreferences.
     @discussion WebViews can share instances of WebPreferences by using an instance of WebPreferences with
     the same identifier.  Typically, instance are not created directly.  Instead you set the preferences
-    identifier on a WebView.
-    @result Returns a new instance of WebPreferences of a previously allocated instance with the same identifier.
+    identifier on a WebView.  The identifier is used as a prefix that is added to the user defaults keys
+    for the WebPreferences.
+    @result Returns a new instance of WebPreferences or a previously allocated instance with the same identifier.
 */
 - (id)initWithIdentifier:(NSString *)anIdentifier;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list