[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

cmarrin at apple.com cmarrin at apple.com
Wed Dec 22 18:24:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3aaada2886e9a9d47f78c68a4d4cb385833eb831
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 16:41:48 2010 +0000

    2010-12-10  Chris Marrin  <cmarrin at apple.com>
    
            Reviewed by Simon Fraser.
    
            Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
            https://bugs.webkit.org/show_bug.cgi?id=49388
    
            Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
            the implementation.
    
            * platform/graphics/ca/GraphicsLayerCA.cpp:
            (WebCore::GraphicsLayerCA::setAnimationOnLayer):
            * platform/graphics/ca/PlatformCAAnimation.h:
            * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
            (hasNonZeroBeginTimeFlag):
            (setNonZeroBeginTimeFlag):
            (PlatformCAAnimation::PlatformCAAnimation):
            (PlatformCAAnimation::setBeginTime):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1009fef..4e0fbcd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-12-10  Chris Marrin  <cmarrin at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
+        https://bugs.webkit.org/show_bug.cgi?id=49388
+
+        Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
+        the implementation.
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::setAnimationOnLayer):
+        * platform/graphics/ca/PlatformCAAnimation.h:
+        * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
+        (hasNonZeroBeginTimeFlag):
+        (setNonZeroBeginTimeFlag):
+        (PlatformCAAnimation::PlatformCAAnimation):
+        (PlatformCAAnimation::setBeginTime):
+
 2010-12-10  Pavel Podivilov  <podivilov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 7ab34f0..9868def 100644
--- a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -1406,10 +1406,8 @@ void GraphicsLayerCA::setAnimationOnLayer(PlatformCAAnimation* caAnim, AnimatedP
 {
     PlatformCALayer* layer = animatedLayer(property);
     
-    if (timeOffset) {
+    if (timeOffset)
         caAnim->setBeginTime(CACurrentMediaTime() - timeOffset);
-        caAnim->setNonZeroBeginTimeFlag(true);
-    }
 
     String animationID = animationIdentifier(animationName, property, index);
 
diff --git a/WebCore/platform/graphics/ca/PlatformCAAnimation.h b/WebCore/platform/graphics/ca/PlatformCAAnimation.h
index 396b170..d802700 100644
--- a/WebCore/platform/graphics/ca/PlatformCAAnimation.h
+++ b/WebCore/platform/graphics/ca/PlatformCAAnimation.h
@@ -77,9 +77,6 @@ public:
     AnimationType animationType() const { return m_type; }
     String keyPath() const;
     
-    bool hasNonZeroBeginTimeFlag() const;
-    void setNonZeroBeginTimeFlag(bool value);
-    
     CFTimeInterval beginTime() const;
     void setBeginTime(CFTimeInterval);
     
diff --git a/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm b/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
index 447d932..2a00857 100644
--- a/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
+++ b/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
@@ -42,6 +42,16 @@ using namespace WebCore;
 // This value must be the same as in PlatformCALayerMac.mm
 static NSString * const WKNonZeroBeginTimeFlag = @"WKPlatformCAAnimationNonZeroBeginTimeFlag";
 
+static bool hasNonZeroBeginTimeFlag(const PlatformCAAnimation* animation)
+{
+    return [[animation->platformAnimation() valueForKey:WKNonZeroBeginTimeFlag] boolValue];
+}
+
+static void setNonZeroBeginTimeFlag(PlatformCAAnimation* animation, bool value)
+{
+    [animation->platformAnimation() setValue:[NSNumber numberWithBool:value] forKey:WKNonZeroBeginTimeFlag];
+}
+    
 static NSString* toCAFillModeType(PlatformCAAnimation::FillModeType type)
 {
     switch (type) {
@@ -196,7 +206,7 @@ PlatformCAAnimation::PlatformCAAnimation(const PlatformCAAnimation* animation)
     newAnimation->setValueFunction(animation->valueFunction());
 #endif
 
-    newAnimation->setNonZeroBeginTimeFlag(animation->hasNonZeroBeginTimeFlag());
+    setNonZeroBeginTimeFlag(newAnimation, hasNonZeroBeginTimeFlag(animation));
     
     // Copy the specific Basic or Keyframe values
     if (animation->animationType() == Keyframe) {
@@ -213,16 +223,6 @@ PlatformCAAnimation::~PlatformCAAnimation()
 {
 }
 
-bool PlatformCAAnimation::hasNonZeroBeginTimeFlag() const
-{
-    return [[m_animation.get() valueForKey:WKNonZeroBeginTimeFlag] boolValue];
-}
-
-void PlatformCAAnimation::setNonZeroBeginTimeFlag(bool value)
-{
-    [m_animation.get() setValue:[NSNumber numberWithBool:value] forKey:WKNonZeroBeginTimeFlag];
-}
-    
 bool PlatformCAAnimation::supportsValueFunction()
 {
     static bool sHaveValueFunction = [CAPropertyAnimation instancesRespondToSelector:@selector(setValueFunction:)];
@@ -247,6 +247,13 @@ CFTimeInterval PlatformCAAnimation::beginTime() const
 void PlatformCAAnimation::setBeginTime(CFTimeInterval value)
 {
     [m_animation.get() setBeginTime:value];
+    
+    // Also set a flag to tell us if we've passed in a 0 value. 
+    // The flag is needed because later beginTime will get changed
+    // to the time at which it fired and we need to know whether
+    // or not it was 0 to begin with.
+    if (value)
+        setNonZeroBeginTimeFlag(this, true);
 }
 
 CFTimeInterval PlatformCAAnimation::duration() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list