Title: [116319] trunk/Source
Revision
116319
Author
[email protected]
Date
2012-05-07 10:37:30 -0700 (Mon, 07 May 2012)

Log Message

Unreviewed, rolling out r115525.
http://trac.webkit.org/changeset/115525
https://bugs.webkit.org/show_bug.cgi?id=66683

Too many pages rely on DOMTimeStamp as first argument.
Reverting while we consider next steps.

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
(WebCore::JSRequestAnimationFrameCallback::handleEvent):
* dom/Document.cpp:
(WebCore::Document::serviceScriptedAnimations):
* dom/Document.h:
(Document):
* dom/RequestAnimationFrameCallback.h:
(RequestAnimationFrameCallback):
* dom/RequestAnimationFrameCallback.idl:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
(WebCore::ScriptedAnimationController::displayRefreshFired):
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations):
* page/FrameView.h:
(FrameView):
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::notifyClients):
* platform/graphics/DisplayRefreshMonitor.h:
(DisplayRefreshMonitor):
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore):
(WebCore::DisplayRefreshMonitor::requestRefreshCallback):
(WebCore::DisplayRefreshMonitor::displayLinkFired):

Source/WebKit/chromium:

* src/PageWidgetDelegate.cpp:
(WebKit::PageWidgetDelegate::animate):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::updateAnimations):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (116318 => 116319)


--- trunk/Source/WebCore/ChangeLog	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/ChangeLog	2012-05-07 17:37:30 UTC (rev 116319)
@@ -1,3 +1,48 @@
+2012-05-07  Nat Duca  <[email protected]>
+
+        Unreviewed, rolling out r115525.
+        http://trac.webkit.org/changeset/115525
+        https://bugs.webkit.org/show_bug.cgi?id=66683
+
+        Too many pages rely on DOMTimeStamp as first argument.
+        Reverting while we consider next steps.
+
+        * WebCore.exp.in:
+        * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
+        (WebCore::JSRequestAnimationFrameCallback::handleEvent):
+        * dom/Document.cpp:
+        (WebCore::Document::serviceScriptedAnimations):
+        * dom/Document.h:
+        (Document):
+        * dom/RequestAnimationFrameCallback.h:
+        (RequestAnimationFrameCallback):
+        * dom/RequestAnimationFrameCallback.idl:
+        * dom/ScriptedAnimationController.cpp:
+        (WebCore::ScriptedAnimationController::ScriptedAnimationController):
+        (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
+        (WebCore):
+        (WebCore::ScriptedAnimationController::windowScreenDidChange):
+        (WebCore::ScriptedAnimationController::scheduleAnimation):
+        (WebCore::ScriptedAnimationController::animationTimerFired):
+        * dom/ScriptedAnimationController.h:
+        (ScriptedAnimationController):
+        (WebCore::ScriptedAnimationController::displayRefreshFired):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::serviceScriptedAnimations):
+        * page/FrameView.h:
+        (FrameView):
+        * platform/graphics/DisplayRefreshMonitor.cpp:
+        (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
+        (WebCore::DisplayRefreshMonitor::notifyClients):
+        * platform/graphics/DisplayRefreshMonitor.h:
+        (DisplayRefreshMonitor):
+        * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
+        (WebCore::DisplayRefreshMonitor::displayLinkFired):
+        * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
+        (WebCore):
+        (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
+        (WebCore::DisplayRefreshMonitor::displayLinkFired):
+
 2012-05-07  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor

Modified: trunk/Source/WebCore/WebCore.exp.in (116318 => 116319)


--- trunk/Source/WebCore/WebCore.exp.in	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-05-07 17:37:30 UTC (rev 116319)
@@ -2050,7 +2050,7 @@
 #endif
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
-__ZN7WebCore9FrameView25serviceScriptedAnimationsEd
+__ZN7WebCore9FrameView25serviceScriptedAnimationsEy
 #endif
 
 #if ENABLE(VIDEO)

Modified: trunk/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp (116318 => 116319)


--- trunk/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-bool JSRequestAnimationFrameCallback::handleEvent(double highResNowMs)
+bool JSRequestAnimationFrameCallback::handleEvent(DOMTimeStamp time)
 {
     if (!canInvokeCallback())
         return true;
@@ -43,7 +43,7 @@
     JSLock lock(SilenceAssertionsOnly);
 
     MarkedArgumentBuffer args;
-    args.append(jsNumber(highResNowMs));
+    args.append(jsNumber(time));
 
     bool raisedException = false;
     m_data->invokeCallback(args, &raisedException);

Modified: trunk/Source/WebCore/dom/Document.cpp (116318 => 116319)


--- trunk/Source/WebCore/dom/Document.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/Document.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -5805,11 +5805,11 @@
     m_scriptedAnimationController->cancelCallback(id);
 }
 
-void Document::serviceScriptedAnimations(double monotonicAnimationStartTime)
+void Document::serviceScriptedAnimations(DOMTimeStamp time)
 {
     if (!m_scriptedAnimationController)
         return;
-    m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationStartTime);
+    m_scriptedAnimationController->serviceScriptedAnimations(time);
 }
 #endif
 

Modified: trunk/Source/WebCore/dom/Document.h (116318 => 116319)


--- trunk/Source/WebCore/dom/Document.h	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/Document.h	2012-05-07 17:37:30 UTC (rev 116319)
@@ -1124,7 +1124,7 @@
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>);
     void webkitCancelAnimationFrame(int id);
-    void serviceScriptedAnimations(double monotonicAnimationStartTime);
+    void serviceScriptedAnimations(DOMTimeStamp);
 #endif
 
     virtual EventTarget* errorEventTarget();

Modified: trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h (116318 => 116319)


--- trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h	2012-05-07 17:37:30 UTC (rev 116319)
@@ -31,6 +31,7 @@
 #ifndef RequestAnimationFrameCallback_h
 #define RequestAnimationFrameCallback_h
 
+#include "DOMTimeStamp.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -38,7 +39,7 @@
 class RequestAnimationFrameCallback : public RefCounted<RequestAnimationFrameCallback> {
 public:
     virtual ~RequestAnimationFrameCallback() { }
-    virtual bool handleEvent(double highResTimeMs) = 0;
+    virtual bool handleEvent(DOMTimeStamp) = 0;
 
     int m_id;
     bool m_firedOrCancelled;
@@ -47,3 +48,4 @@
 }
 
 #endif // RequestAnimationFrameCallback_h
+

Modified: trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl (116318 => 116319)


--- trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/RequestAnimationFrameCallback.idl	2012-05-07 17:37:30 UTC (rev 116319)
@@ -33,13 +33,11 @@
         Callback,
         Conditional=REQUEST_ANIMATION_FRAME,
     ] RequestAnimationFrameCallback{
-        // highResTime is passed as high resolution timestamp, see
-        // http://www.w3.org/TR/hr-time/ for details.
 #if defined(V8_BINDING) && V8_BINDING
-        boolean handleEvent(in double highResTime);
+        boolean handleEvent(in DOMTimeStamp time);
 #else
-        [Custom] boolean handleEvent(in double highResTime);
+        [Custom] boolean handleEvent(in DOMTimeStamp time);
 #endif
-
+        
     };
 }

Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (116318 => 116319)


--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -29,7 +29,6 @@
 #if ENABLE(REQUEST_ANIMATION_FRAME)
 
 #include "Document.h"
-#include "DocumentLoader.h"
 #include "FrameView.h"
 #include "InspectorInstrumentation.h"
 #include "RequestAnimationFrameCallback.h"
@@ -53,7 +52,7 @@
     , m_suspendCount(0)
 #if USE(REQUEST_ANIMATION_FRAME_TIMER)
     , m_animationTimer(this, &ScriptedAnimationController::animationTimerFired)
-    , m_lastAnimationFrameTimeMonotonic(0)
+    , m_lastAnimationFrameTime(0)
 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     , m_useTimer(false)
 #endif
@@ -108,13 +107,11 @@
     }
 }
 
-void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow)
+void ScriptedAnimationController::serviceScriptedAnimations(DOMTimeStamp time)
 {
     if (!m_callbacks.size() || m_suspendCount || (m_document->settings() && !m_document->settings()->requestAnimationFrameEnabled()))
         return;
 
-    double highResNowMs = 1000.0 * m_document->loader()->timing()->convertMonotonicTimeToZeroBasedDocumentTime(monotonicTimeNow);
-
     // First, generate a list of callbacks to consider.  Callbacks registered from this point
     // on are considered only for the "next" frame, not this one.
     CallbackList callbacks(m_callbacks);
@@ -128,7 +125,7 @@
         if (!callback->m_firedOrCancelled) {
             callback->m_firedOrCancelled = true;
             InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireAnimationFrame(m_document, callback->m_id);
-            callback->handleEvent(highResNowMs);
+            callback->handleEvent(time);
             InspectorInstrumentation::didFireAnimationFrame(cookie);
         }
     }
@@ -144,7 +141,7 @@
     if (m_callbacks.size())
         scheduleAnimation();
 }
-
+    
 void ScriptedAnimationController::windowScreenDidChange(PlatformDisplayID displayID)
 {
     if (m_document->settings() && !m_document->settings()->requestAnimationFrameEnabled())
@@ -153,7 +150,7 @@
     DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
 #else
     UNUSED_PARAM(displayID);
-#endif
+#endif    
 }
 
 void ScriptedAnimationController::scheduleAnimation()
@@ -166,14 +163,14 @@
     if (!m_useTimer) {
         if (DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this))
             return;
-
+            
         m_useTimer = true;
     }
 #endif
     if (m_animationTimer.isActive())
         return;
-
-    double scheduleDelay = max<double>(MinimumAnimationInterval - (monotonicallyIncreasingTime() - m_lastAnimationFrameTimeMonotonic), 0);
+        
+    double scheduleDelay = max<double>(MinimumAnimationInterval - (currentTime() - m_lastAnimationFrameTime), 0);
     m_animationTimer.startOneShot(scheduleDelay);
 #else
     if (FrameView* frameView = m_document->view())
@@ -184,19 +181,12 @@
 #if USE(REQUEST_ANIMATION_FRAME_TIMER)
 void ScriptedAnimationController::animationTimerFired(Timer<ScriptedAnimationController>*)
 {
-    m_lastAnimationFrameTimeMonotonic = monotonicallyIncreasingTime();
-    serviceScriptedAnimations(m_lastAnimationFrameTimeMonotonic);
+    m_lastAnimationFrameTime = currentTime();
+    serviceScriptedAnimations(convertSecondsToDOMTimeStamp(m_lastAnimationFrameTime));
 }
-#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-void ScriptedAnimationController::displayRefreshFired(double monotonicTimeNow)
-{
-    serviceScriptedAnimations(monotonicTimeNow);
-}
 #endif
-#endif
 
-
-
 }
 
 #endif
+

Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.h (116318 => 116319)


--- trunk/Source/WebCore/dom/ScriptedAnimationController.h	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.h	2012-05-07 17:37:30 UTC (rev 116319)
@@ -61,7 +61,7 @@
 
     CallbackId registerCallback(PassRefPtr<RequestAnimationFrameCallback>);
     void cancelCallback(CallbackId);
-    void serviceScriptedAnimations(double monotonicTimeNow);
+    void serviceScriptedAnimations(DOMTimeStamp);
 
     void suspend();
     void resume();
@@ -70,7 +70,7 @@
 
 private:
     ScriptedAnimationController(Document*, PlatformDisplayID);
-
+    
     typedef Vector<RefPtr<RequestAnimationFrameCallback> > CallbackList;
     CallbackList m_callbacks;
 
@@ -83,11 +83,11 @@
 #if USE(REQUEST_ANIMATION_FRAME_TIMER)
     void animationTimerFired(Timer<ScriptedAnimationController>*);
     Timer<ScriptedAnimationController> m_animationTimer;
-    double m_lastAnimationFrameTimeMonotonic;
+    double m_lastAnimationFrameTime;
 
 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     // Override for DisplayRefreshMonitorClient
-    virtual void displayRefreshFired(double timestamp);
+    virtual void displayRefreshFired(double timestamp) { serviceScriptedAnimations(convertSecondsToDOMTimeStamp(timestamp)); }
 
     bool m_useTimer;
 #endif
@@ -99,3 +99,4 @@
 #endif // ENABLE(REQUEST_ANIMATION_FRAME)
 
 #endif // ScriptedAnimationController_h
+

Modified: trunk/Source/WebCore/page/FrameView.cpp (116318 => 116319)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -2161,7 +2161,7 @@
 }
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
-void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime)
+void FrameView::serviceScriptedAnimations(DOMTimeStamp time)
 {
     for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext()) {
         frame->view()->serviceScrollAnimations();
@@ -2173,7 +2173,7 @@
         documents.append(frame->document());
 
     for (size_t i = 0; i < documents.size(); ++i)
-        documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
+        documents[i]->serviceScriptedAnimations(time);
 }
 #endif
 

Modified: trunk/Source/WebCore/page/FrameView.h (116318 => 116319)


--- trunk/Source/WebCore/page/FrameView.h	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/page/FrameView.h	2012-05-07 17:37:30 UTC (rev 116319)
@@ -112,7 +112,7 @@
     bool needsFullRepaint() const { return m_doFullRepaint; }
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
-    void serviceScriptedAnimations(double monotonicAnimationStartTime);
+    void serviceScriptedAnimations(DOMTimeStamp);
 #endif
 
 #if USE(ACCELERATED_COMPOSITING)

Modified: trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp (116318 => 116319)


--- trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -53,7 +53,7 @@
 }
 
 DisplayRefreshMonitor::DisplayRefreshMonitor(PlatformDisplayID displayID)
-    : m_monotonicAnimationStartTime(0)
+    : m_timestamp(0)
     , m_active(true)
     , m_scheduled(false)
     , m_previousFrameDone(true)
@@ -75,15 +75,15 @@
 
 void DisplayRefreshMonitor::notifyClients()
 {
-    double monotonicAnimationStartTime;
+    double timestamp;
     {
         MutexLocker lock(m_mutex);
         m_scheduled = false;
-        monotonicAnimationStartTime = m_monotonicAnimationStartTime;
+        timestamp = m_timestamp;
     }
 
     for (size_t i = 0; i < m_clients.size(); ++i)
-        m_clients[i]->fireDisplayRefreshIfNeeded(monotonicAnimationStartTime);
+        m_clients[i]->fireDisplayRefreshIfNeeded(timestamp);
 
     {
         MutexLocker lock(m_mutex);

Modified: trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h (116318 => 116319)


--- trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h	2012-05-07 17:37:30 UTC (rev 116319)
@@ -113,7 +113,7 @@
     void notifyClients();
     static void refreshDisplayOnMainThread(void* data);
 
-    double m_monotonicAnimationStartTime;
+    double m_timestamp;
     bool m_active;
     bool m_scheduled;
     bool m_previousFrameDone;

Modified: trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp (116318 => 116319)


--- trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -81,7 +81,7 @@
 
     m_previousFrameDone = false;
 
-    m_monotonicAnimationStartTime = monotonicallyIncreasingTime();
+    m_timestamp = currentTime();
 
     callOnMainThread(refreshDisplayOnMainThread, this);
 }

Modified: trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp (116318 => 116319)


--- trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -45,7 +45,7 @@
 
     return kCVReturnSuccess;
 }
-
+ 
 DisplayRefreshMonitor::~DisplayRefreshMonitor()
 {
     if (m_displayLink) {
@@ -61,7 +61,7 @@
 {
     if (!m_active)
         return false;
-
+        
     if (!m_displayLink) {
         m_active = false;
         CVReturn error = CVDisplayLinkCreateWithCGDisplay(m_displayID, &m_displayLink);
@@ -78,7 +78,7 @@
 
         m_active = true;
     }
-
+    
     MutexLocker lock(m_mutex);
     m_scheduled = true;
     return true;
@@ -92,11 +92,9 @@
 
     m_previousFrameDone = false;
 
-    double webKitMonotonicNow = monotonicallyIncreasingTime();
-    double timeUntilOutput = outputTimeSeconds - nowSeconds;
-    // FIXME: Should this be using webKitMonotonicNow?
-    m_monotonicAnimationStartTime = webKitMonotonicNow + timeUntilOutput;
-
+    double webKitNow = currentTime();
+    m_timestamp = webKitNow - nowSeconds + outputTimeSeconds;
+    
     callOnMainThread(refreshDisplayOnMainThread, this);
 }
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (116318 => 116319)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-07 17:37:30 UTC (rev 116319)
@@ -1,3 +1,17 @@
+2012-05-07  Nat Duca  <[email protected]>
+
+        Unreviewed, rolling out r115525.
+        http://trac.webkit.org/changeset/115525
+        https://bugs.webkit.org/show_bug.cgi?id=66683
+
+        Too many pages rely on DOMTimeStamp as first argument.
+        Reverting while we consider next steps.
+
+        * src/PageWidgetDelegate.cpp:
+        (WebKit::PageWidgetDelegate::animate):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::updateAnimations):
+
 2012-05-07  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor

Modified: trunk/Source/WebKit/chromium/src/PageWidgetDelegate.cpp (116318 => 116319)


--- trunk/Source/WebKit/chromium/src/PageWidgetDelegate.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebKit/chromium/src/PageWidgetDelegate.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -59,7 +59,8 @@
     FrameView* view = mainFrameView(page);
     if (!view)
         return;
-    view->serviceScriptedAnimations(monotonicFrameBeginTime);
+    double timeShift = currentTime() - monotonicallyIncreasingTime();
+    view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(monotonicFrameBeginTime + timeShift));
 #endif
 }
 

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (116318 => 116319)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-05-07 17:32:20 UTC (rev 116318)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-05-07 17:37:30 UTC (rev 116319)
@@ -1432,6 +1432,13 @@
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     TRACE_EVENT("WebViewImpl::updateAnimations", this, 0);
 
+    WebFrameImpl* webframe = mainFrameImpl();
+    if (!webframe)
+        return;
+    FrameView* view = webframe->frameView();
+    if (!view)
+        return;
+
     // Create synthetic wheel events as necessary for fling.
     if (m_gestureAnimation) {
         if (m_gestureAnimation->animate(monotonicFrameBeginTime))
@@ -1440,9 +1447,6 @@
             m_gestureAnimation.clear();
     }
 
-    if (!m_page)
-        return;
-
     PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime);
 #endif
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to