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

trey trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:14:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4c01c7d1a672cdd8a859583c3e088682ea1469dd
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 12 17:15:13 2002 +0000

    	Fixed 3094525 - Need to use SPI to fix flipped drag image problem
    
    	We call the new SPI.  I also had to rework the dissolve steps to get it
    	to non flip the image in Panther in millions (but leave the old code for
    	the Jaguar case).
    
            Reviewed by cblu
    
            * Misc.subproj/WebNSImageExtras.m:
            (+[NSImage load]):  Call the SPI.
            (-[NSImage _web_dissolveToFraction:]):  Add new way of building the image for Panther.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 207d1b2..bd1446b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-12-12  Trey Matteson  <trey at apple.com>
+
+	Fixed 3094525 - Need to use SPI to fix flipped drag image problem
+
+	We call the new SPI.  I also had to rework the dissolve steps to get it
+	to non flip the image in Panther in millions (but leave the old code for
+	the Jaguar case).
+
+        Reviewed by cblu
+
+        * Misc.subproj/WebNSImageExtras.m:
+        (+[NSImage load]):  Call the SPI.
+        (-[NSImage _web_dissolveToFraction:]):  Add new way of building the image for Panther.
+
 2002-12-12  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebKit/Misc.subproj/WebNSImageExtras.m b/WebKit/Misc.subproj/WebNSImageExtras.m
index 01d82e7..fa7f8db 100644
--- a/WebKit/Misc.subproj/WebNSImageExtras.m
+++ b/WebKit/Misc.subproj/WebNSImageExtras.m
@@ -9,8 +9,29 @@
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebNSImageExtras.h>
 
+// see +load for details
+ at interface NSBitmapImageRep (SPINeededForJagGreen)
++ (void)_setEnableFlippedImageFix:(BOOL)f;
+ at end
+static BOOL AKBugIsFixed = NO;
+
+
 @implementation NSImage (WebExtras)
 
++ (void)load
+{
+    // See 3094525, 3065097, 2767424.  We need to call this SPI to get it fixed in JagGreen.
+    // Pre-green we're SOL.  In Panther the fix is always on.
+    //
+    // FIXME 3125264: We can nuke this code, the category above, and half the code in
+    // _web_dissolveToFraction when we drop Jag support.
+    //
+    if ([[NSBitmapImageRep class] respondsToSelector:@selector(_setEnableFlippedImageFix:)]) {
+        [NSBitmapImageRep _setEnableFlippedImageFix:YES];
+        AKBugIsFixed = YES;
+    }
+}
+
 - (void)_web_scaleToMaxSize:(NSSize)size
 {
     float heightResizeDelta = 0.0, widthResizeDelta = 0.0, resizeDelta = 0.0;
@@ -37,20 +58,36 @@
 
 - (void)_web_dissolveToFraction:(float)delta
 {
-    NSImage *dissolvedImage = [[[NSImage alloc] initWithSize:[self size]] autorelease];
-    BOOL isFlipped = [self isFlipped];
-    
-    [self setFlipped:NO];
-    
-    [dissolvedImage lockFocus];
-    [self dissolveToPoint:NSZeroPoint fraction: delta];
-    [dissolvedImage unlockFocus];
+    NSImage *dissolvedImage = [[NSImage alloc] initWithSize:[self size]];
+
+    if (AKBugIsFixed) {
+        // In this case the dragging image is always correct.
+        [dissolvedImage setFlipped:[self isFlipped]];
+
+        [dissolvedImage lockFocus];
+        [self dissolveToPoint:NSMakePoint(0, [self size].height) fraction: delta];
+        [dissolvedImage unlockFocus];
 
-    [self lockFocus];
-    [dissolvedImage compositeToPoint:NSZeroPoint operation:NSCompositeCopy];
-    [self unlockFocus];
+        [self lockFocus];
+        [dissolvedImage compositeToPoint:NSMakePoint(0, [self size].height)   operation:NSCompositeCopy];
+        [self unlockFocus];
+    } else {
+        // In this case Thousands mode will have an inverted drag image.  Millions is OK.
+        // FIXME 3125264: this branch of code can go when we drop Jaguar support.
+        BOOL isFlipped = [self isFlipped];
+        [self setFlipped:NO];
 
-    [self setFlipped:isFlipped];
+        [dissolvedImage lockFocus];
+        [self dissolveToPoint:NSZeroPoint fraction: delta];
+        [dissolvedImage unlockFocus];
+
+        [self lockFocus];
+        [dissolvedImage compositeToPoint:NSZeroPoint operation:NSCompositeCopy];
+        [self unlockFocus];
+
+        [self setFlipped:isFlipped];
+    }
+    [dissolvedImage release];
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list