Diff
Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-23 18:36:24 UTC (rev 118212)
@@ -1,3 +1,52 @@
+2012-05-23 Lucas Forschler <lforsch...@apple.com>
+
+ Merge 116319
+
+ 2012-05-07 Nat Duca <nd...@chromium.org>
+
+ 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-21 Lucas Forschler <lforsch...@apple.com>
Merge 117652
Modified: branches/safari-536-branch/Source/WebCore/WebCore.exp.in (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/WebCore.exp.in 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/WebCore.exp.in 2012-05-23 18:36:24 UTC (rev 118212)
@@ -2052,7 +2052,7 @@
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
-__ZN7WebCore9FrameView25serviceScriptedAnimationsEd
+__ZN7WebCore9FrameView25serviceScriptedAnimationsEy
#endif
#if ENABLE(VIDEO)
Modified: branches/safari-536-branch/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/bindings/js/JSRequestAnimationFrameCallbackCustom.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/dom/Document.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/Document.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/Document.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -5812,11 +5812,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: branches/safari-536-branch/Source/WebCore/dom/Document.h (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/Document.h 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/Document.h 2012-05-23 18:36:24 UTC (rev 118212)
@@ -1125,7 +1125,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: branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.h (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.h 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.h 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.idl (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.idl 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/RequestAnimationFrameCallback.idl 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -29,7 +29,6 @@
#if ENABLE(REQUEST_ANIMATION_FRAME)
#include "Document.h"
-#include "DocumentLoader.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
#include "RequestAnimationFrameCallback.h"
@@ -52,7 +51,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
@@ -107,13 +106,11 @@
}
}
-void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow)
+void ScriptedAnimationController::serviceScriptedAnimations(DOMTimeStamp time)
{
if (!m_callbacks.size() || m_suspendCount)
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);
@@ -127,7 +124,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);
}
}
@@ -143,14 +140,14 @@
if (m_callbacks.size())
scheduleAnimation();
}
-
+
void ScriptedAnimationController::windowScreenDidChange(PlatformDisplayID displayID)
{
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
#else
UNUSED_PARAM(displayID);
-#endif
+#endif
}
void ScriptedAnimationController::scheduleAnimation()
@@ -163,14 +160,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())
@@ -181,19 +178,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: branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.h (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.h 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/dom/ScriptedAnimationController.h 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/page/FrameView.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/page/FrameView.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/page/FrameView.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -2157,7 +2157,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();
@@ -2169,7 +2169,7 @@
documents.append(frame->document());
for (size_t i = 0; i < documents.size(); ++i)
- documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
+ documents[i]->serviceScriptedAnimations(time);
}
#endif
Modified: branches/safari-536-branch/Source/WebCore/page/FrameView.h (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/page/FrameView.h 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/page/FrameView.h 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/platform/graphics/DisplayRefreshMonitor.h 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -81,7 +81,7 @@
m_previousFrameDone = false;
- m_monotonicAnimationStartTime = monotonicallyIncreasingTime();
+ m_timestamp = currentTime();
callOnMainThread(refreshDisplayOnMainThread, this);
}
Modified: branches/safari-536-branch/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebCore/platform/graphics/mac/DisplayRefreshMonitorMac.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebKit/chromium/ChangeLog (118211 => 118212)
--- branches/safari-536-branch/Source/WebKit/chromium/ChangeLog 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebKit/chromium/ChangeLog 2012-05-23 18:36:24 UTC (rev 118212)
@@ -1,3 +1,21 @@
+2012-05-23 Lucas Forschler <lforsch...@apple.com>
+
+ Merge 116319
+
+ 2012-05-07 Nat Duca <nd...@chromium.org>
+
+ 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-04 Kent Tamura <tk...@chromium.org>
Rename ICULocale to LocaleICU, part 1
Modified: branches/safari-536-branch/Source/WebKit/chromium/src/PageWidgetDelegate.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebKit/chromium/src/PageWidgetDelegate.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebKit/chromium/src/PageWidgetDelegate.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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: branches/safari-536-branch/Source/WebKit/chromium/src/WebViewImpl.cpp (118211 => 118212)
--- branches/safari-536-branch/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-05-23 18:31:23 UTC (rev 118211)
+++ branches/safari-536-branch/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-05-23 18:36:24 UTC (rev 118212)
@@ -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
}