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


The following commit has been merged in the debian/unstable branch:
commit 714a996c56b50ae24a989562047974470c302634
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 1 19:51:03 2002 +0000

    	- implemented loop counts
    
            * WebCoreSupport.subproj/WebImageRenderer.h: Added repetitionsComplete field.
            * WebCoreSupport.subproj/WebImageRenderer.m:
            (-[WebImageRenderer repetitionCount]): Get NSImageLoopCount.
            (-[WebImageRenderer nextFrame:]): Check repetitionCount and stop once we hit it.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2528 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7a33ffe..f0d82b1 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-11-01  Darin Adler  <darin at apple.com>
+
+	- implemented loop counts
+
+        * WebCoreSupport.subproj/WebImageRenderer.h: Added repetitionsComplete field.
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer repetitionCount]): Get NSImageLoopCount.
+        (-[WebImageRenderer nextFrame:]): Check repetitionCount and stop once we hit it.
+
 2002-10-31  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebFrame.m: (-[WebFrame setController:]): Add an assert,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 7a33ffe..f0d82b1 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-11-01  Darin Adler  <darin at apple.com>
+
+	- implemented loop counts
+
+        * WebCoreSupport.subproj/WebImageRenderer.h: Added repetitionsComplete field.
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        (-[WebImageRenderer repetitionCount]): Get NSImageLoopCount.
+        (-[WebImageRenderer nextFrame:]): Check repetitionCount and stop once we hit it.
+
 2002-10-31  Darin Adler  <darin at apple.com>
 
         * WebView.subproj/WebFrame.m: (-[WebFrame setController:]): Add an assert,
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
index ceee7db..acf5a9f 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
@@ -14,9 +14,10 @@
     int loadStatus;
     NSColor *patternColor;
     int patternColorLoadStatus;
+    int repetitionsComplete;
     BOOL animationFinished;
 }
 
-+ (void)stopAnimationsInView: (NSView *)aView;
++ (void)stopAnimationsInView:(NSView *)aView;
 
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 74f9f06..cc6a239 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -7,6 +7,8 @@
 
 #import <WebFoundation/WebAssertions.h>
 
+extern NSString *NSImageLoopCount;
+
 #define MINIMUM_DURATION (1.0/30.0)
 
 @implementation WebImageRenderer
@@ -115,8 +117,7 @@ static NSMutableArray *activeImageRenderers;
 - (float)unadjustedFrameDuration
 {
     id property = [self firstRepProperty:NSImageCurrentFrameDuration];
-    float duration = property ? [property floatValue] : 0.0;
-    return duration;
+    return property ? [property floatValue] : 0.0;
 }
 
 - (float)frameDuration
@@ -138,6 +139,12 @@ static NSMutableArray *activeImageRenderers;
     return duration;
 }
 
+- (int)repetitionCount
+{
+    id property = [self firstRepProperty:NSImageLoopCount];
+    return property ? [property intValue] : 0;
+}
+
 - (void)scheduleFrame
 {   
     frameTimer = [[NSTimer scheduledTimerWithTimeInterval:[self frameDuration]
@@ -193,6 +200,10 @@ static NSMutableArray *activeImageRenderers;
     
     currentFrame = [self currentFrame] + 1;
     if (currentFrame >= [self frameCount]) {
+        repetitionsComplete += 1;
+        if ([self repetitionCount] && repetitionsComplete >= [self repetitionCount]) {
+            animationFinished = YES;
+        }
 	// Don't repeat if the last frame has a duration of 0.  
         // IE doesn't repeat, so we don't.
         if ([self unadjustedFrameDuration] == 0) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list