[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 08:09:35 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit bd22e10cf8604501f61a9a1b4076cf935dd177cd
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 6 00:17:20 2003 +0000
WebKit:
Fixed 3029966. Animated backgrounds specified in <BODY> don't animate
Fixed 3474824. Tiled animated GIFs don't animate.
Fixed 3029966. Animated backgrounds specified with CSS don't animate.
Reviewed by Chris.
* WebCoreSupport.subproj/WebImageRenderer.h:
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageRenderer nextFrame:]):
(-[WebImageRenderer drawImageInRect:fromRect:]):
(-[WebImageRenderer startAnimationIfNecessary]):
(-[WebImageRenderer tileInRect:fromPoint:]):
* WebView.subproj/WebImageView.m:
(-[WebImageView drawRect:]):
WebCore:
Fixed 3474957. Changed name of image rendering method to better reflect it's actual function.
- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
renamed to
- (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr;
Reviewed by Chris.
* kwq/KWQPainter.mm:
(QPainter::drawPixmap):
* kwq/WebCoreImageRenderer.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index cc72853..a14ce4b 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-11-05 Richard Williamson <rjw at apple.com>
+
+ Fixed 3474957. Changed name of image rendering method to better reflect it's actual function.
+
+ - (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
+
+ renamed to
+
+ - (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr;
+
+ Reviewed by Chris.
+
+ * kwq/KWQPainter.mm:
+ (QPainter::drawPixmap):
+ * kwq/WebCoreImageRenderer.h:
+
2003-11-05 Darin Adler <darin at apple.com>
* WebCore-tests.exp: Added missing symbol so tests will link.
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index e2a3844..c711e9d 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -452,7 +452,7 @@ void QPainter::drawPixmap( int x, int y, const QPixmap &pixmap,
NSRect fromRect = NSMakeRect(sx, sy, sw, sh);
KWQ_BLOCK_EXCEPTIONS;
- [pixmap.imageRenderer beginAnimationInRect:inRect
+ [pixmap.imageRenderer drawImageInRect:inRect
fromRect:fromRect];
KWQ_UNBLOCK_EXCEPTIONS;
}
diff --git a/WebCore/kwq/WebCoreImageRenderer.h b/WebCore/kwq/WebCoreImageRenderer.h
index feba214..60328f7 100644
--- a/WebCore/kwq/WebCoreImageRenderer.h
+++ b/WebCore/kwq/WebCoreImageRenderer.h
@@ -31,7 +31,7 @@
- (NSSize)size;
- (void)resize:(NSSize)s;
-- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
+- (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr;
- (void)stopAnimation;
- (void)tileInRect:(NSRect)r fromPoint:(NSPoint)p;
- (BOOL)isNull;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6eeb95b..8520128 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-11-05 Richard Williamson <rjw at apple.com>
+
+ Fixed 3029966. Animated backgrounds specified in <BODY> don't animate
+ Fixed 3474824. Tiled animated GIFs don't animate.
+ Fixed 3029966. Animated backgrounds specified with CSS don't animate.
+
+ Reviewed by Chris.
+
+ * WebCoreSupport.subproj/WebImageRenderer.h:
+ * WebCoreSupport.subproj/WebImageRenderer.m:
+ (-[WebImageRenderer nextFrame:]):
+ (-[WebImageRenderer drawImageInRect:fromRect:]):
+ (-[WebImageRenderer startAnimationIfNecessary]):
+ (-[WebImageRenderer tileInRect:fromPoint:]):
+ * WebView.subproj/WebImageView.m:
+ (-[WebImageView drawRect:]):
+
2003-11-05 Chris Blumenberg <cblu at apple.com>
Fixed: <rdar://problem/3201364>: Safari crashes when hosting carbon plug-in using drag and drop
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
index 1372f43..a7b65f3 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
@@ -20,6 +20,9 @@
int repetitionsComplete;
BOOL animationFinished;
+
+ NSPoint tilePoint;
+ BOOL animatedTile;
NSString *MIMEType;
BOOL isNull;
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 177c7d4..4e3d87e 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -14,6 +14,11 @@ extern NSString *NSImageLoopCount;
#define MINIMUM_DURATION (1.0/30.0)
+// Forward declarations
+ at interface WebImageRenderer (WebInternal)
+- (void)startAnimationIfNecessary;
+ at end
+
@implementation WebImageRenderer
static NSMutableSet *activeImageRenderers;
@@ -336,16 +341,35 @@ static NSMutableSet *activeImageRenderers;
currentFrame = 0;
}
[self setCurrentFrame:currentFrame];
+
+ // Release the tiling pattern so next frame will update the pattern if we're tiling.
+ [patternColor release];
+ patternColor = nil;
+
[frameView setNeedsDisplayInRect:targetRect];
}
-- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr
+// Will be called when the containing view is displayed by WebCore RenderImage (via QPainter).
+// If the image is an animated image it will begin animating. If the image is already animating,
+// it's frame will have been advanced by nextFrame:.
+//
+// Also used to draw the image by WebImageView.
+- (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr
{
- [self drawClippedToValidInRect:ir fromRect:fr];
-
- if ([self frameCount] > 1 && !animationFinished) {
+ if (animatedTile){
+ [self tileInRect:ir fromPoint:tilePoint];
+ }
+ else {
+ [self drawClippedToValidInRect:ir fromRect:fr];
imageRect = fr;
targetRect = ir;
+ [self startAnimationIfNecessary];
+ }
+}
+
+- (void)startAnimationIfNecessary
+{
+ if ([self frameCount] > 1 && !animationFinished) {
NSView *newView = [NSView focusView];
if (newView != frameView){
[frameView release];
@@ -426,6 +450,11 @@ static NSMutableSet *activeImageRenderers;
[NSBezierPath fillRect:rect];
[NSGraphicsContext restoreGraphicsState];
+
+ animatedTile = YES;
+ tilePoint = point;
+ targetRect = rect;
+ [self startAnimationIfNecessary];
}
- (void)resize:(NSSize)s
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 7d18f62..1e6298a 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -80,7 +80,7 @@
NSRectFill(rect);
NSRect drawingRect = [self drawingRect];
- [[rep image] beginAnimationInRect:drawingRect fromRect:drawingRect];
+ [[rep image] drawImageInRect:drawingRect fromRect:drawingRect];
}
- (void)adjustFrameSize
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list