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

andersca at apple.com andersca at apple.com
Wed Dec 22 15:06:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 0edef1aa29deea01a8a41f4376213f173fb7ec83
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 01:44:58 2010 +0000

    Find indicators do not bounce
    https://bugs.webkit.org/show_bug.cgi?id=48490
    <rdar://problem/8564276>
    
    Reviewed by Sam Weinig.
    
    WebKit2:
    
    * UIProcess/API/mac/FindIndicatorWindow.h:
    * UIProcess/API/mac/FindIndicatorWindow.mm:
    (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
    Add an animationDuration parameter.
    
    (WebKit::FindIndicatorWindow::FindIndicatorWindow):
    Initialize m_bounceAnimationContext.
    
    (WebKit::FindIndicatorWindow::setFindIndicator):
    Create a bounce animation and start it.
    
    (WebKit::FindIndicatorWindow::closeWindow):
    Stop the bounce animation and destroy the bounce animation context.
    
    (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
    pass the fade out duration.
    
    (WebKit::FindIndicatorWindow::bounceAnimationCallback):
    Set the bounce animation progress.
    
    (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
    Destroy the bounce animation context.
    
    WebKitLibraries:
    
    Add bounce animation context functions.
    
    * WebKitSystemInterface.h:
    * libWebKitSystemInterfaceLeopard.a:
    * libWebKitSystemInterfaceSnowLeopard.a:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70737 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 89d3008..00f72e0 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,34 @@
+2010-10-27  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Find indicators do not bounce
+        https://bugs.webkit.org/show_bug.cgi?id=48490
+        <rdar://problem/8564276>
+
+        * UIProcess/API/mac/FindIndicatorWindow.h:
+        * UIProcess/API/mac/FindIndicatorWindow.mm:
+        (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
+        Add an animationDuration parameter.
+        
+        (WebKit::FindIndicatorWindow::FindIndicatorWindow):
+        Initialize m_bounceAnimationContext.
+
+        (WebKit::FindIndicatorWindow::setFindIndicator):
+        Create a bounce animation and start it.
+
+        (WebKit::FindIndicatorWindow::closeWindow):
+        Stop the bounce animation and destroy the bounce animation context.
+
+        (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
+        pass the fade out duration.
+
+        (WebKit::FindIndicatorWindow::bounceAnimationCallback):
+        Set the bounce animation progress.
+
+        (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
+        Destroy the bounce animation context.
+
 2010-10-27  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h b/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h
index 4ffcf79..e8889b6 100644
--- a/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h
+++ b/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h
@@ -31,6 +31,7 @@
 #import <wtf/RefPtr.h>
 #import <wtf/RetainPtr.h>
 #import "RunLoop.h"
+#import "WebKitSystemInterface.h"
 
 @class WKView;
 @class WebFindIndicatorWindowAnimation;
@@ -57,10 +58,16 @@ private:
     void fadeOutAnimationCallback(double);
     void fadeOutAnimationDidEnd();
 
+    void bounceAnimationCallback(double);
+    void bounceAnimationDidEnd();
+
     WKView* m_wkView;
     RefPtr<FindIndicator> m_findIndicator;
     RetainPtr<NSWindow> m_findIndicatorWindow;
 
+    WKWindowBounceAnimationContextRef m_bounceAnimationContext;
+    RetainPtr<WebFindIndicatorWindowAnimation> m_bounceAnimation;
+
     RunLoop::Timer<FindIndicatorWindow> m_startFadeOutTimer;
     RetainPtr<WebFindIndicatorWindowAnimation> m_fadeOutAnimation;
 };
diff --git a/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm b/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
index 85fe9ed..5b93a9e 100644
--- a/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
+++ b/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
@@ -28,8 +28,8 @@
 #include "FindIndicator.h"
 #include <WebCore/GraphicsContext.h>
 
-static const double pulseAnimationDuration = 0.12;
-static const double timeBeforeFadeStarts = pulseAnimationDuration + 0.2;
+static const double bounceAnimationDuration = 0.12;
+static const double timeBeforeFadeStarts = bounceAnimationDuration + 0.2;
 static const double fadeOutAnimationDuration = 0.3;
 
 using namespace WebCore;
@@ -72,17 +72,19 @@ using namespace WebCore;
 }
 
 - (id)_initWithFindIndicatorWindow:(WebKit::FindIndicatorWindow *)findIndicatorWindow 
-                 animationProgressCallback:(void (WebKit::FindIndicatorWindow::*)(double progress))animationProgressCallback
-                   animationDidEndCallback:(void (WebKit::FindIndicatorWindow::*)())animationDidEndCallback;
+                 animationDuration:(CFTimeInterval)duration
+         animationProgressCallback:(void (WebKit::FindIndicatorWindow::*)(double progress))animationProgressCallback
+           animationDidEndCallback:(void (WebKit::FindIndicatorWindow::*)())animationDidEndCallback;
 @end
 
 @implementation WebFindIndicatorWindowAnimation
 
 - (id)_initWithFindIndicatorWindow:(WebKit::FindIndicatorWindow *)findIndicatorWindow 
+                 animationDuration:(CFTimeInterval)animationDuration
          animationProgressCallback:(void (WebKit::FindIndicatorWindow::*)(double progress))animationProgressCallback
            animationDidEndCallback:(void (WebKit::FindIndicatorWindow::*)())animationDidEndCallback
 {
-    if ((self = [super initWithDuration:fadeOutAnimationDuration animationCurve:NSAnimationEaseInOut])) {
+    if ((self = [super initWithDuration:animationDuration animationCurve:NSAnimationEaseInOut])) {
         _findIndicatorWindow = findIndicatorWindow;
         _animationProgressCallback = animationProgressCallback;
         _animationDidEndCallback = animationDidEndCallback;
@@ -115,6 +117,7 @@ PassOwnPtr<FindIndicatorWindow> FindIndicatorWindow::create(WKView *wkView)
 
 FindIndicatorWindow::FindIndicatorWindow(WKView *wkView)
     : m_wkView(wkView)
+    , m_bounceAnimationContext(0)
     , m_startFadeOutTimer(RunLoop::main(), this, &FindIndicatorWindow::startFadeOutTimerFired)
 {
 }
@@ -158,6 +161,14 @@ void FindIndicatorWindow::setFindIndicator(PassRefPtr<FindIndicator> findIndicat
     [[m_wkView window] addChildWindow:m_findIndicatorWindow.get() ordered:NSWindowAbove];
     [m_findIndicatorWindow.get() setReleasedWhenClosed:NO];
 
+    // Start the bounce animation.
+    m_bounceAnimationContext = WKWindowBounceAnimationContextCreate(m_findIndicatorWindow.get());
+    m_bounceAnimation.adoptNS([[WebFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
+                                                                                  animationDuration:bounceAnimationDuration
+                                                                          animationProgressCallback:&FindIndicatorWindow::bounceAnimationCallback
+                                                                            animationDidEndCallback:&FindIndicatorWindow::bounceAnimationDidEnd]);
+    [m_bounceAnimation.get() startAnimation];
+
     if (fadeOut)
         m_startFadeOutTimer.startOneShot(timeBeforeFadeStarts);
 }
@@ -174,6 +185,14 @@ void FindIndicatorWindow::closeWindow()
         m_fadeOutAnimation = nullptr;
     }
 
+    if (m_bounceAnimation) {
+        [m_bounceAnimation.get() stopAnimation];
+        m_bounceAnimation = nullptr;
+    }
+
+    if (m_bounceAnimationContext)
+        WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext);
+    
     [[m_findIndicatorWindow.get() parentWindow] removeChildWindow:m_findIndicatorWindow.get()];
     [m_findIndicatorWindow.get() close];
     m_findIndicatorWindow = nullptr;
@@ -183,7 +202,8 @@ void FindIndicatorWindow::startFadeOutTimerFired()
 {
     ASSERT(!m_fadeOutAnimation);
     
-    m_fadeOutAnimation.adoptNS([[WebFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this 
+    m_fadeOutAnimation.adoptNS([[WebFindIndicatorWindowAnimation alloc] _initWithFindIndicatorWindow:this
+                                                                                   animationDuration:fadeOutAnimationDuration
                                                                            animationProgressCallback:&FindIndicatorWindow::fadeOutAnimationCallback
                                                                              animationDidEndCallback:&FindIndicatorWindow::fadeOutAnimationDidEnd]);
     [m_fadeOutAnimation.get() startAnimation];
@@ -204,4 +224,22 @@ void FindIndicatorWindow::fadeOutAnimationDidEnd()
     closeWindow();
 }
 
+void FindIndicatorWindow::bounceAnimationCallback(double progress)
+{
+    ASSERT(m_bounceAnimation);
+    ASSERT(m_bounceAnimationContext);
+
+    WKWindowBounceAnimationSetAnimationProgress(m_bounceAnimationContext, progress);
+}
+
+void FindIndicatorWindow::bounceAnimationDidEnd()
+{
+    ASSERT(m_bounceAnimation);
+    ASSERT(m_bounceAnimationContext);
+    ASSERT(m_findIndicatorWindow);
+
+    WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext);
+    m_bounceAnimationContext = 0;
+}
+
 } // namespace WebKit
diff --git a/WebKitLibraries/ChangeLog b/WebKitLibraries/ChangeLog
index 23029f5..96a8be2 100644
--- a/WebKitLibraries/ChangeLog
+++ b/WebKitLibraries/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-27  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Find indicators do not bounce
+        https://bugs.webkit.org/show_bug.cgi?id=48490
+        <rdar://problem/8564276>
+
+        Add bounce animation context functions.
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+
 2010-10-26  Adam Roben  <aroben at apple.com>
 
         Fix duplicate vsprops name
diff --git a/WebKitLibraries/WebKitSystemInterface.h b/WebKitLibraries/WebKitSystemInterface.h
index 79e816f..3e94071 100644
--- a/WebKitLibraries/WebKitSystemInterface.h
+++ b/WebKitLibraries/WebKitSystemInterface.h
@@ -290,6 +290,12 @@ uint32_t WKCARemoteLayerClientGetClientId(WKCARemoteLayerClientRef);
 void WKCARemoteLayerClientSetLayer(WKCARemoteLayerClientRef, CALayer *);
 CALayer *WKCARemoteLayerClientGetLayer(WKCARemoteLayerClientRef);
 
+typedef struct __WKWindowBounceAnimationContext *WKWindowBounceAnimationContextRef;
+
+WKWindowBounceAnimationContextRef WKWindowBounceAnimationContextCreate(NSWindow *window);
+void WKWindowBounceAnimationContextDestroy(WKWindowBounceAnimationContextRef context);
+void WKWindowBounceAnimationSetAnimationProgress(WKWindowBounceAnimationContextRef context, double animationProgress);
+
 #if defined(__x86_64__)
 #import <mach/mig.h>
 
diff --git a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
index 0de4a0b..b3fec5e 100644
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
index 2a5ca23..53f60b4 100644
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list