[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:51:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 81674757c17bd1f95fe0737a97553793efd0e461
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 14 18:13:56 2003 +0000

            Reviewed by Chris.
    
            - fixed 3344259 -- flipped image when copying from Safari in 1000s of colors mode
    
            The workaround is to turn off the NSImage cache. Andrew says this won't have any
            practical repercussions other than making the bug go away.
    
            Seems to have a side effect of speeding up the cvs-base page load test!
    
            * WebCoreSupport.subproj/WebImageRenderer.m:
            (-[WebImageRenderer initWithMIMEType:]): Set mode to NSImageCacheNever.
            (-[WebImageRenderer initWithData:MIMEType:]): Ditto.
            (-[WebImageRenderer initWithContentsOfFile:]): Ditto.
            (-[WebImageRenderer _adjustSizeToPixelDimensions]): Don't set mode to NSImageCacheDefault.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4824 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 42d2833..b7c1ccd 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-08-14  Darin Adler  <darin at apple.com>
+
+        Reviewed by Chris.
+
+        - fixed 3344259 -- flipped image when copying from Safari in 1000s of colors mode
+
+        The workaround is to turn off the NSImage cache. Andrew says this won't have any
+        practical repercussions other than making the bug go away.
+        
+        Seems to have a side effect of speeding up the cvs-base page load test!
+
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer initWithMIMEType:]): Set mode to NSImageCacheNever.
+        (-[WebImageRenderer initWithData:MIMEType:]): Ditto.
+        (-[WebImageRenderer initWithContentsOfFile:]): Ditto.
+        (-[WebImageRenderer _adjustSizeToPixelDimensions]): Don't set mode to NSImageCacheDefault.
+
 2003-08-14  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Darin
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 257f820..89bddcb 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -43,9 +43,13 @@ static NSMutableSet *activeImageRenderers;
 {
     self = [super init];
     if (self != nil) {
+        // Work around issue with flipped images and TIFF by never using the image cache.
+        // See bug 3344259 and related bugs.
+        [self setCacheMode:NSImageCacheNever];
+
+        loadStatus = NSImageRepLoadStatusUnknownType;
         MIMEType = [MIME copy];
         isNull = YES;
-        loadStatus = NSImageRepLoadStatusUnknownType;
     }
     return self;
 }
@@ -54,12 +58,13 @@ static NSMutableSet *activeImageRenderers;
 {
     self = [super initWithData:data];
     if (self != nil) {
-        MIMEType = [MIME copy];
-        if ([data length] > 0)
-            isNull = NO;
-        else
-            isNull = YES;
+        // Work around issue with flipped images and TIFF by never using the image cache.
+        // See bug 3344259 and related bugs.
+        [self setCacheMode:NSImageCacheNever];
+
         loadStatus = NSImageRepLoadStatusUnknownType;
+        MIMEType = [MIME copy];
+        isNull = [data length] == 0;
     }
     return self;
 }
@@ -69,8 +74,11 @@ static NSMutableSet *activeImageRenderers;
     NSBundle *bundle = [NSBundle bundleForClass:[self class]];
     NSString *imagePath = [bundle pathForResource:filename ofType:@"tiff"];
     self = [super initWithContentsOfFile:imagePath];
-    if (self){
-        isNull = NO;
+    if (self != nil) {
+        // Work around issue with flipped images and TIFF by never using the image cache.
+        // See bug 3344259 and related bugs.
+        [self setCacheMode:NSImageCacheNever];
+
         loadStatus = NSImageRepLoadStatusUnknownType;
     }
     return self;
@@ -116,7 +124,6 @@ static NSMutableSet *activeImageRenderers;
     // Ignore any absolute size in the image and always use pixel dimensions.
     NSBitmapImageRep *imageRep = [[self representations] objectAtIndex:0];
     NSSize size = NSMakeSize([imageRep pixelsWide], [imageRep pixelsHigh]);
-    [self setCacheMode: NSImageCacheDefault];
     [imageRep setSize:size];
     [self setScalesWhenResized:YES];
     [self setSize:size];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list