[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 06:20:56 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0aa50b8a01ee020071f16ddd0fd8f9f49989938c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jun 21 23:40:55 2002 +0000

    WebCore:
    
            * kwq/KWQFont.mm: Made it store a copy of the family name instead of
    	storing a reference to the mutable CFString.
    
            * kwq/KWQPainter.mm:
            (QPainter::drawPixmap): Simplified.
            (QPainter::drawTiledPixmap): Used the new [tileInRect:].
    
            * kwq/WebCoreImageRenderer.h: Added [tileInRect:], removed [drawInRect:],
    	and also removed view parameter from [beginAnimation].
    
            * kwq/qt/qpixmap.h: Removed unneeded getImageRenderer().
    
    WebKit:
    
    	Cache the patterns we make for tiled images for added speed.
    
            * WebCoreSupport.subproj/IFImageRenderer.h: Removed declarations of
    	methods inherited from WebCoreImageRenderer. Added patternColor field.
    
            * WebCoreSupport.subproj/IFImageRenderer.m:
            (-[IFImageRenderer dealloc]): Release patternColor.
            (-[IFImageRenderer beginAnimationInRect:fromRect:]): Get the view with
    	[NSView focusView] rather than taking a parameter that's used only for
    	the animating case.
            (-[IFImageRenderer tileInRect:fromPoint:]): New. Caches the pattern in
    	the patternColor field.
    
            * WebView.subproj/IFImageView.m: (-[IFImageView drawRect:]): No need to
    	pass view to image renderer any more.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1416 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index ff41609..040b87e 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,19 @@
 2002-06-21  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQFont.mm: Made it store a copy of the family name instead of
+	storing a reference to the mutable CFString.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawPixmap): Simplified.
+        (QPainter::drawTiledPixmap): Used the new [tileInRect:].
+
+        * kwq/WebCoreImageRenderer.h: Added [tileInRect:], removed [drawInRect:],
+	and also removed view parameter from [beginAnimation].
+	
+        * kwq/qt/qpixmap.h: Removed unneeded getImageRenderer().
+
+2002-06-21  Darin Adler  <darin at apple.com>
+
         - fixed 2964718 -- crash in KWQCheckCacheObjectStatus
 
 	* kwq/KWQKloader.mm: (KWQCheckCacheObjectStatus):
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ff41609..040b87e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,19 @@
 2002-06-21  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQFont.mm: Made it store a copy of the family name instead of
+	storing a reference to the mutable CFString.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawPixmap): Simplified.
+        (QPainter::drawTiledPixmap): Used the new [tileInRect:].
+
+        * kwq/WebCoreImageRenderer.h: Added [tileInRect:], removed [drawInRect:],
+	and also removed view parameter from [beginAnimation].
+	
+        * kwq/qt/qpixmap.h: Removed unneeded getImageRenderer().
+
+2002-06-21  Darin Adler  <darin at apple.com>
+
         - fixed 2964718 -- crash in KWQCheckCacheObjectStatus
 
 	* kwq/KWQKloader.mm: (KWQCheckCacheObjectStatus):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ff41609..040b87e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,19 @@
 2002-06-21  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQFont.mm: Made it store a copy of the family name instead of
+	storing a reference to the mutable CFString.
+
+        * kwq/KWQPainter.mm:
+        (QPainter::drawPixmap): Simplified.
+        (QPainter::drawTiledPixmap): Used the new [tileInRect:].
+
+        * kwq/WebCoreImageRenderer.h: Added [tileInRect:], removed [drawInRect:],
+	and also removed view parameter from [beginAnimation].
+	
+        * kwq/qt/qpixmap.h: Removed unneeded getImageRenderer().
+
+2002-06-21  Darin Adler  <darin at apple.com>
+
         - fixed 2964718 -- crash in KWQCheckCacheObjectStatus
 
 	* kwq/KWQKloader.mm: (KWQCheckCacheObjectStatus):
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 91a8e45..016821a 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -47,8 +47,6 @@ QFont::~QFont()
     [_family release];
 }
 
-// member functions --------------------------------------------------------
-
 int QFont::pixelSize() const
 {
     return (int)_size;
@@ -56,13 +54,13 @@ int QFont::pixelSize() const
 
 QString QFont::family() const
 {
-    return NSSTRING_TO_QSTRING(_family);
+    return QString::fromNSString(_family);
 }
 
 void QFont::setFamily(const QString &qfamilyName)
 {
     [_family release];
-    _family = [_FAST_QSTRING_TO_NSSTRING(qfamilyName) retain];
+    _family = [qfamilyName.getNSString() copy];
 }
 
 void QFont::setPixelSize(int sz)
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 81d5c15..9c6f30c 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -410,95 +410,22 @@ void QPainter::drawPixmap( int x, int y, const QPixmap &pixmap,
 {
     _lockFocus();
 
-    id <WebCoreImageRenderer>imageRenderer = pixmap.getImageRenderer();
+    if (sw == -1)
+        sw = pixmap.width();
+    if (sh == -1)
+        sh = pixmap.height();
     
-    if (imageRenderer != nil) {
-        if (sw == -1)
-            sw = (int)[imageRenderer size].width;
-        if (sh == -1)
-            sh = (int)[imageRenderer size].height;
-        NSRect ir = NSMakeRect(x, y, sw, sh);
-        NSRect fr = NSMakeRect(sx, sy, sw, sh);
-        
-        [imageRenderer beginAnimationInView: [NSView focusView]
-                                     inRect: ir
-                                   fromRect: fr];
-    }
+    [pixmap.imageRenderer beginAnimationInRect:NSMakeRect(x, y, sw, sh)
+                                      fromRect:NSMakeRect(sx, sy, sw, sh)];
     
     _unlockFocus();
 }
 
-#define USE_COLOR_TILING
-#ifdef USE_COLOR_TILING
-extern "C" {
-CG_EXTERN void CGContextSetPatternPhase(CGContextRef c, CGSize phase);
-}
-
-void QPainter::drawTiledPixmap( int x, int y, int w, int h,
-				const QPixmap &pixmap, int sx, int sy )
-{    
-    NSColor *patternColor;
-    int sw = pixmap.width();
-    int sh = pixmap.height();
-    NSPoint p = [[NSView focusView] convertPoint: NSMakePoint (x, y) toView: nil];
-    CGContextRef cgContext;
-
-    [NSGraphicsContext saveGraphicsState];
-
-    cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
-    CGSize phase = { (float)(((int)p.x) % sw), (float)(((int)p.y) % sh) };
-    CGContextSetPatternPhase(cgContext, phase);
-    patternColor = [NSColor colorWithPatternImage: (NSImage *)pixmap.getImageRenderer()];
-    [patternColor set];
-    [NSBezierPath fillRect:NSMakeRect(x, y, w, h)];
-
-    [NSGraphicsContext restoreGraphicsState];
-}
-#else
-static void drawTile( QPainter *p, int x, int y, int w, int h,
-		      const QPixmap &pixmap, int xOffset, int yOffset )
-{
-    int yPos, xPos, drawH, drawW, yOff, xOff;
-    yPos = y;
-    yOff = yOffset;
-    while( yPos < y + h ) {
-	drawH = pixmap.height() - yOff;    // Cropping first row
-	if ( yPos + drawH > y + h )	   // Cropping last row
-	    drawH = y + h - yPos;
-	xPos = x;
-	xOff = xOffset;
-	while( xPos < x + w ) {
-	    drawW = pixmap.width() - xOff; // Cropping first column
-	    if ( xPos + drawW > x + w )	   // Cropping last column
-		drawW = x + w - xPos;
-	    p->drawPixmap( xPos, yPos, pixmap, xOff, yOff, drawW, drawH );
-	    xPos += drawW;
-	    xOff = 0;
-	}
-	yPos += drawH;
-	yOff = 0;
-    }
-}
-
 void QPainter::drawTiledPixmap( int x, int y, int w, int h,
 				const QPixmap &pixmap, int sx, int sy )
 {
-    int sw = pixmap.width();
-    int sh = pixmap.height();
-    if (!sw || !sh )
-	return;
-    if ( sx < 0 )
-	sx = sw - -sx % sw;
-    else
-	sx = sx % sw;
-    if ( sy < 0 )
-	sy = sh - -sy % sh;
-    else
-	sy = sy % sh;
-
-    drawTile( this, x, y, w, h, pixmap, sx, sy );
+    [pixmap.imageRenderer tileInRect:NSMakeRect(x, y, w, h) fromPoint:NSMakePoint(sx, sy)];
 }
-#endif
 
 // y is the baseline
 void QPainter::drawText(int x, int y, const QString &qstring, int len)
diff --git a/WebCore/kwq/KWQPixmap.h b/WebCore/kwq/KWQPixmap.h
index b9cca1c..a85609e 100644
--- a/WebCore/kwq/KWQPixmap.h
+++ b/WebCore/kwq/KWQPixmap.h
@@ -70,7 +70,6 @@ public:
 
     QPixmap &operator=(const QPixmap &);
 
-    WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
     bool receivedData(const QByteArray &bytes, bool isComplete);
     void stopAnimations();
     
diff --git a/WebCore/kwq/WebCoreImageRenderer.h b/WebCore/kwq/WebCoreImageRenderer.h
index b17e3d3..7da0699 100644
--- a/WebCore/kwq/WebCoreImageRenderer.h
+++ b/WebCore/kwq/WebCoreImageRenderer.h
@@ -27,12 +27,12 @@
 
 @protocol WebCoreImageRenderer <NSObject, NSCopying>
 
-- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
+- (BOOL)incrementalLoadWithBytes:(const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
 
 - (NSSize)size;
 - (void)resize: (NSSize)s;
-- (void)beginAnimationInView:(NSView *)view inRect:(NSRect)ir fromRect:(NSRect)fr;
+- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
 - (void)stopAnimation;
-- (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op fraction:(float)delta;
+- (void)tileInRect:(NSRect)r fromPoint:(NSPoint)p;
 
 @end
diff --git a/WebCore/kwq/qt/qpixmap.h b/WebCore/kwq/qt/qpixmap.h
index b9cca1c..a85609e 100644
--- a/WebCore/kwq/qt/qpixmap.h
+++ b/WebCore/kwq/qt/qpixmap.h
@@ -70,7 +70,6 @@ public:
 
     QPixmap &operator=(const QPixmap &);
 
-    WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
     bool receivedData(const QByteArray &bytes, bool isComplete);
     void stopAnimations();
     
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2ae4d59..117d13c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,23 @@
 2002-06-21  Darin Adler  <darin at apple.com>
 
+	Cache the patterns we make for tiled images for added speed.
+
+        * WebCoreSupport.subproj/IFImageRenderer.h: Removed declarations of
+	methods inherited from WebCoreImageRenderer. Added patternColor field.
+
+        * WebCoreSupport.subproj/IFImageRenderer.m:
+        (-[IFImageRenderer dealloc]): Release patternColor.
+        (-[IFImageRenderer beginAnimationInRect:fromRect:]): Get the view with
+	[NSView focusView] rather than taking a parameter that's used only for
+	the animating case.
+        (-[IFImageRenderer tileInRect:fromPoint:]): New. Caches the pattern in
+	the patternColor field.
+
+        * WebView.subproj/IFImageView.m: (-[IFImageView drawRect:]): No need to
+	pass view to image renderer any more.
+
+2002-06-21  Darin Adler  <darin at apple.com>
+
 	Fix rendering of non-opaque animated images.
 
 	* WebCoreSupport.subproj/IFImageRenderer.m:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 2ae4d59..117d13c 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,23 @@
 2002-06-21  Darin Adler  <darin at apple.com>
 
+	Cache the patterns we make for tiled images for added speed.
+
+        * WebCoreSupport.subproj/IFImageRenderer.h: Removed declarations of
+	methods inherited from WebCoreImageRenderer. Added patternColor field.
+
+        * WebCoreSupport.subproj/IFImageRenderer.m:
+        (-[IFImageRenderer dealloc]): Release patternColor.
+        (-[IFImageRenderer beginAnimationInRect:fromRect:]): Get the view with
+	[NSView focusView] rather than taking a parameter that's used only for
+	the animating case.
+        (-[IFImageRenderer tileInRect:fromPoint:]): New. Caches the pattern in
+	the patternColor field.
+
+        * WebView.subproj/IFImageView.m: (-[IFImageView drawRect:]): No need to
+	pass view to image renderer any more.
+
+2002-06-21  Darin Adler  <darin at apple.com>
+
 	Fix rendering of non-opaque animated images.
 
 	* WebCoreSupport.subproj/IFImageRenderer.m:
diff --git a/WebKit/WebCoreSupport.subproj/IFImageRenderer.h b/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
index 4d4fc16..846c73a 100644
--- a/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
@@ -14,10 +14,9 @@
     int lastStatus;
     unsigned lastLength;
     BOOL lastReturn;
+    NSColor *patternColor;
 }
+
 + (void)stopAnimationsInView: (NSView *)aView;
-- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
-- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr;
-- (void)stopAnimation;
-- (NSView *)frameView;
+
 @end
diff --git a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
index 645c437..562c194 100644
--- a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
@@ -17,7 +17,7 @@ static NSMutableArray *activeImageRenderers;
     count = [activeImageRenderers count];
     for (i = count-1; i >= 0; i--){
         IFImageRenderer *renderer = [activeImageRenderers objectAtIndex: i];
-        if ([renderer frameView] == aView){
+        if (renderer->frameView == aView){
             [renderer stopAnimation];
         }
     }
@@ -80,6 +80,7 @@ static NSMutableArray *activeImageRenderers;
 - (void)dealloc
 {
     [self stopAnimation];
+    [patternColor release];
     [super dealloc];
 }
 
@@ -165,7 +166,7 @@ static NSMutableArray *activeImageRenderers;
 #endif
 }
 
-- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr
+- (void)beginAnimationInRect: (NSRect)ir fromRect: (NSRect)fr
 {
     // The previous, if any, frameView, is released in stopAnimation.
     [self stopAnimation];
@@ -173,7 +174,7 @@ static NSMutableArray *activeImageRenderers;
     if ([self frameCount] > 1) {
         imageRect = fr;
         targetRect = ir;
-        frameView = [view retain];
+        frameView = [[NSView focusView] retain];
         frameTimer = [[NSTimer scheduledTimerWithTimeInterval:[self frameDuration]
                                                        target:self
                                                      selector:@selector(nextFrame:)
@@ -191,11 +192,6 @@ static NSMutableArray *activeImageRenderers;
             fraction: 1.0];
 }
 
-- (NSView *)frameView
-{
-    return frameView;
-}
-
 - (void)stopAnimation
 {
     [frameTimer invalidate];
@@ -214,6 +210,30 @@ static NSMutableArray *activeImageRenderers;
     [self setSize: s];
 }
 
+- (void)tileInRect:(NSRect)rect fromPoint:(NSPoint)point
+{
+    if (!patternColor)
+        patternColor = [[NSColor colorWithPatternImage:self] retain];
+    
+    // FIXME: This doesn't use the passed in point to determine the pattern phase.
+    // It might be OK to do what we're doing, but I'm not 100% sure.
+    // This code uses the coordinate system of whatever converting toView:nil
+    // does, which may be OK.
+    NSPoint p = [[NSView focusView] convertPoint:rect.origin toView:nil];
+    NSSize size = [self size];
+    CGSize phase = { (int)p.x % (int)size.width, (int)p.y % (int)size.height };
+
+    [NSGraphicsContext saveGraphicsState];
+
+    CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+    CGContextSetPatternPhase(cgContext, phase);
+    [patternColor set];
+    
+    [NSBezierPath fillRect:rect];
+
+    [NSGraphicsContext restoreGraphicsState];
+}
+
 // required by protocol -- apparently inherited methods don't count
 
 - (NSSize)size
@@ -221,9 +241,4 @@ static NSMutableArray *activeImageRenderers;
     return [super size];
 }
 
-- (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op fraction:(float)delta
-{
-    [super drawInRect:dstRect fromRect:srcRect operation:op fraction:delta];
-}
-
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
index 4d4fc16..846c73a 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
@@ -14,10 +14,9 @@
     int lastStatus;
     unsigned lastLength;
     BOOL lastReturn;
+    NSColor *patternColor;
 }
+
 + (void)stopAnimationsInView: (NSView *)aView;
-- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
-- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr;
-- (void)stopAnimation;
-- (NSView *)frameView;
+
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 645c437..562c194 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -17,7 +17,7 @@ static NSMutableArray *activeImageRenderers;
     count = [activeImageRenderers count];
     for (i = count-1; i >= 0; i--){
         IFImageRenderer *renderer = [activeImageRenderers objectAtIndex: i];
-        if ([renderer frameView] == aView){
+        if (renderer->frameView == aView){
             [renderer stopAnimation];
         }
     }
@@ -80,6 +80,7 @@ static NSMutableArray *activeImageRenderers;
 - (void)dealloc
 {
     [self stopAnimation];
+    [patternColor release];
     [super dealloc];
 }
 
@@ -165,7 +166,7 @@ static NSMutableArray *activeImageRenderers;
 #endif
 }
 
-- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr
+- (void)beginAnimationInRect: (NSRect)ir fromRect: (NSRect)fr
 {
     // The previous, if any, frameView, is released in stopAnimation.
     [self stopAnimation];
@@ -173,7 +174,7 @@ static NSMutableArray *activeImageRenderers;
     if ([self frameCount] > 1) {
         imageRect = fr;
         targetRect = ir;
-        frameView = [view retain];
+        frameView = [[NSView focusView] retain];
         frameTimer = [[NSTimer scheduledTimerWithTimeInterval:[self frameDuration]
                                                        target:self
                                                      selector:@selector(nextFrame:)
@@ -191,11 +192,6 @@ static NSMutableArray *activeImageRenderers;
             fraction: 1.0];
 }
 
-- (NSView *)frameView
-{
-    return frameView;
-}
-
 - (void)stopAnimation
 {
     [frameTimer invalidate];
@@ -214,6 +210,30 @@ static NSMutableArray *activeImageRenderers;
     [self setSize: s];
 }
 
+- (void)tileInRect:(NSRect)rect fromPoint:(NSPoint)point
+{
+    if (!patternColor)
+        patternColor = [[NSColor colorWithPatternImage:self] retain];
+    
+    // FIXME: This doesn't use the passed in point to determine the pattern phase.
+    // It might be OK to do what we're doing, but I'm not 100% sure.
+    // This code uses the coordinate system of whatever converting toView:nil
+    // does, which may be OK.
+    NSPoint p = [[NSView focusView] convertPoint:rect.origin toView:nil];
+    NSSize size = [self size];
+    CGSize phase = { (int)p.x % (int)size.width, (int)p.y % (int)size.height };
+
+    [NSGraphicsContext saveGraphicsState];
+
+    CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+    CGContextSetPatternPhase(cgContext, phase);
+    [patternColor set];
+    
+    [NSBezierPath fillRect:rect];
+
+    [NSGraphicsContext restoreGraphicsState];
+}
+
 // required by protocol -- apparently inherited methods don't count
 
 - (NSSize)size
@@ -221,9 +241,4 @@ static NSMutableArray *activeImageRenderers;
     return [super size];
 }
 
-- (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op fraction:(float)delta
-{
-    [super drawInRect:dstRect fromRect:srcRect operation:op fraction:delta];
-}
-
 @end
diff --git a/WebKit/WebView.subproj/IFImageView.h b/WebKit/WebView.subproj/IFImageView.h
index 911f4eb..3688cab 100644
--- a/WebKit/WebView.subproj/IFImageView.h
+++ b/WebKit/WebView.subproj/IFImageView.h
@@ -17,17 +17,4 @@
     BOOL canDragTo;
     BOOL didSetFrame;
 }
-
-
-- (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
-- (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource;
-- (void)dataSourceUpdated:(IFWebDataSource *)dataSource; 
-- (void)layout;
-
-- (void)setCanDragFrom: (BOOL)flag;
-- (BOOL)canDragFrom;
-- (void)setCanDragTo: (BOOL)flag;
-- (BOOL)canDragTo;
-
-
 @end
diff --git a/WebKit/WebView.subproj/IFImageView.m b/WebKit/WebView.subproj/IFImageView.m
index f53d35a..a848bcd 100644
--- a/WebKit/WebView.subproj/IFImageView.m
+++ b/WebKit/WebView.subproj/IFImageView.m
@@ -3,18 +3,17 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFDocument.h>
-#import <WebKit/IFDynamicScrollBarsView.h>
 #import <WebKit/IFImageView.h>
+
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFImageRenderer.h>
 #import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFNSViewExtras.h>
 #import <WebKit/IFWebDataSource.h>
 
 @implementation IFImageView
 
-- (id)initWithFrame:(NSRect)frame {
-    
+- (id)initWithFrame:(NSRect)frame
+{    
     self = [super initWithFrame:frame];
     if (self) {
         canDragFrom = YES;
@@ -38,13 +37,9 @@
 }
 
 
-- (void)drawRect:(NSRect)rect {
-    IFImageRenderer *image;
-    
-    image = [representation image];
-    if(image){
-        [image beginAnimationInView:self inRect:[self frame] fromRect:[self frame]];
-    }
+- (void)drawRect:(NSRect)rect
+{
+    [[representation image] beginAnimationInRect:[self frame] fromRect:[self frame]];
 }
 
 
@@ -71,9 +66,7 @@
     IFImageRenderer *image = [representation image];
     
     if(image){
-        NSSize imageSize = [image size];
-
-        [self setFrameSize:imageSize];
+        [self setFrameSize:[image size]];
         [image setFlipped:YES];
     }
 
diff --git a/WebKit/WebView.subproj/WebImageView.h b/WebKit/WebView.subproj/WebImageView.h
index 911f4eb..3688cab 100644
--- a/WebKit/WebView.subproj/WebImageView.h
+++ b/WebKit/WebView.subproj/WebImageView.h
@@ -17,17 +17,4 @@
     BOOL canDragTo;
     BOOL didSetFrame;
 }
-
-
-- (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
-- (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource;
-- (void)dataSourceUpdated:(IFWebDataSource *)dataSource; 
-- (void)layout;
-
-- (void)setCanDragFrom: (BOOL)flag;
-- (BOOL)canDragFrom;
-- (void)setCanDragTo: (BOOL)flag;
-- (BOOL)canDragTo;
-
-
 @end
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index f53d35a..a848bcd 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -3,18 +3,17 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import <WebKit/IFDocument.h>
-#import <WebKit/IFDynamicScrollBarsView.h>
 #import <WebKit/IFImageView.h>
+
+#import <WebKit/IFDocument.h>
 #import <WebKit/IFImageRenderer.h>
 #import <WebKit/IFImageRepresentation.h>
-#import <WebKit/IFNSViewExtras.h>
 #import <WebKit/IFWebDataSource.h>
 
 @implementation IFImageView
 
-- (id)initWithFrame:(NSRect)frame {
-    
+- (id)initWithFrame:(NSRect)frame
+{    
     self = [super initWithFrame:frame];
     if (self) {
         canDragFrom = YES;
@@ -38,13 +37,9 @@
 }
 
 
-- (void)drawRect:(NSRect)rect {
-    IFImageRenderer *image;
-    
-    image = [representation image];
-    if(image){
-        [image beginAnimationInView:self inRect:[self frame] fromRect:[self frame]];
-    }
+- (void)drawRect:(NSRect)rect
+{
+    [[representation image] beginAnimationInRect:[self frame] fromRect:[self frame]];
 }
 
 
@@ -71,9 +66,7 @@
     IFImageRenderer *image = [representation image];
     
     if(image){
-        NSSize imageSize = [image size];
-
-        [self setFrameSize:imageSize];
+        [self setFrameSize:[image size]];
         [image setFlipped:YES];
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list