Changeset 139509 in webkit
- Timestamp:
- Jan 11, 2013 3:18:06 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139504 r139509 1 2013-01-11 James Simonsen <simonjam@chromium.org> 2 3 Restore old semantics to webkitRequestAnimationFrame callbacks 4 https://bugs.webkit.org/show_bug.cgi?id=106697 5 6 Reviewed by James Robinson. 7 8 * fast/animation/request-animation-frame-prefix-expected.txt: Added. 9 * fast/animation/request-animation-frame-prefix.html: Added. 10 * fast/animation/script-tests/request-animation-frame-prefix.js: Added. 11 (busyWait): 12 (window.webkitRequestAnimationFrame): 13 1 14 2013-01-11 Kenneth Russell <kbr@google.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r139503 r139509 1 2013-01-11 James Simonsen <simonjam@chromium.org> 2 3 Restore old semantics to webkitRequestAnimationFrame callbacks 4 https://bugs.webkit.org/show_bug.cgi?id=106697 5 6 Reviewed by James Robinson. 7 8 Sites that use GWT <= 2.4 are buggy and rely on Date.now()-like callback values. 9 We'll restore that behavior to the prefixed version of webkitRequestAnimationFrame. 10 requestAnimationFrame will continue to follow the spec. 11 12 Test: fast/animation/request-animation-frame-prefix.html 13 14 * dom/RequestAnimationFrameCallback.h: 15 (RequestAnimationFrameCallback): 16 * dom/ScriptedAnimationController.cpp: 17 (WebCore::ScriptedAnimationController::serviceScriptedAnimations): 18 * page/DOMWindow.cpp: 19 (WebCore::DOMWindow::requestAnimationFrame): 20 (WebCore): 21 (WebCore::DOMWindow::webkitRequestAnimationFrame): 22 * page/DOMWindow.h: 23 (DOMWindow): 24 * page/DOMWindow.idl: 25 1 26 2013-01-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 27 -
trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h
r131131 r139509 43 43 int m_id; 44 44 bool m_firedOrCancelled; 45 bool m_useLegacyTimeBase; 45 46 }; 46 47 -
trunk/Source/WebCore/dom/ScriptedAnimationController.cpp
r131131 r139509 115 115 116 116 double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicTimeNow); 117 double legacyHighResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToPseudoWallTime(monotonicTimeNow); 117 118 118 119 // First, generate a list of callbacks to consider. Callbacks registered from this point … … 129 130 callback->m_firedOrCancelled = true; 130 131 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireAnimationFrame(m_document, callback->m_id); 131 callback->handleEvent(highResNowMs); 132 if (callback->m_useLegacyTimeBase) 133 callback->handleEvent(legacyHighResNowMs); 134 else 135 callback->handleEvent(highResNowMs); 132 136 InspectorInstrumentation::didFireAnimationFrame(cookie); 133 137 } -
trunk/Source/WebCore/page/DOMWindow.cpp
r139050 r139509 1551 1551 int DOMWindow::requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback) 1552 1552 { 1553 callback->m_useLegacyTimeBase = false; 1554 if (Document* d = document()) 1555 return d->requestAnimationFrame(callback); 1556 return 0; 1557 } 1558 1559 int DOMWindow::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback) 1560 { 1561 callback->m_useLegacyTimeBase = true; 1553 1562 if (Document* d = document()) 1554 1563 return d->requestAnimationFrame(callback); -
trunk/Source/WebCore/page/DOMWindow.h
r138674 r139509 265 265 #if ENABLE(REQUEST_ANIMATION_FRAME) 266 266 int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>); 267 int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>); 267 268 void cancelAnimationFrame(int id); 268 269 #endif -
trunk/Source/WebCore/page/DOMWindow.idl
r139372 r139509 209 209 [V8MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); 210 210 void cancelAnimationFrame(in long id); 211 [ ImplementedAs=requestAnimationFrame,V8MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback);211 [V8MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback); 212 212 [ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(in long id); 213 213 [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix.
Note: See TracChangeset
for help on using the changeset viewer.