Changeset 243810 in webkit
- Timestamp:
- Apr 3, 2019, 10:27:20 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/animation/request-animation-frame-prefix-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/RequestAnimationFrameCallback.h (modified) (1 diff)
-
Source/WebCore/dom/ScriptedAnimationController.cpp (modified) (2 diffs)
-
Source/WebCore/page/DOMWindow.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243809 r243810 1 2019-04-03 Chris Dumez <cdumez@apple.com> 2 3 Remove legacy webkitRequestAnimationFrame time quirk 4 https://bugs.webkit.org/show_bug.cgi?id=196458 5 <rdar://problem/49490207> 6 7 Reviewed by Simon Fraser. 8 9 Rebaseline webkitRequestAnimationFrame layout test now that we log a deprecation 10 warning. 11 12 * fast/animation/request-animation-frame-prefix-expected.txt: 13 1 14 2019-04-03 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/LayoutTests/fast/animation/request-animation-frame-prefix-expected.txt
r139509 r243810 1 CONSOLE MESSAGE: line 27: webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead. 1 2 Tests the timestamps provided to prefixed webkitRequestAnimationFrame callbacks 2 3 -
trunk/Source/WebCore/ChangeLog
r243807 r243810 1 2019-04-03 Chris Dumez <cdumez@apple.com> 2 3 Remove legacy webkitRequestAnimationFrame time quirk 4 https://bugs.webkit.org/show_bug.cgi?id=196458 5 <rdar://problem/49490207> 6 7 Reviewed by Simon Fraser. 8 9 Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation 10 warning whenever webkitRequestAnimationFrame is called. 11 12 * dom/ScriptedAnimationController.cpp: 13 (WebCore::ScriptedAnimationController::serviceScriptedAnimations): 14 * page/DOMWindow.cpp: 15 (WebCore::DOMWindow::requestAnimationFrame): 16 (WebCore::DOMWindow::webkitRequestAnimationFrame): 17 1 18 2019-04-03 Sihui Liu <sihui_liu@apple.com> 2 19 -
trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h
r220210 r243810 45 45 int m_id; 46 46 bool m_firedOrCancelled; 47 bool m_useLegacyTimeBase;48 47 }; 49 48 -
trunk/Source/WebCore/dom/ScriptedAnimationController.cpp
r243459 r243810 199 199 // We round this to the nearest microsecond so that we can return a time that matches what is returned by document.timeline.currentTime. 200 200 double highResNowMs = std::round(1000 * timestamp); 201 double legacyHighResNowMs = 1000 * (timestamp + m_document->loader()->timing().referenceWallTime().secondsSinceEpoch().seconds());202 201 203 202 // First, generate a list of callbacks to consider. Callbacks registered from this point … … 214 213 callback->m_firedOrCancelled = true; 215 214 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireAnimationFrame(protectedDocument, callback->m_id); 216 if (callback->m_useLegacyTimeBase) 217 callback->handleEvent(legacyHighResNowMs); 218 else 219 callback->handleEvent(highResNowMs); 215 callback->handleEvent(highResNowMs); 220 216 InspectorInstrumentation::didFireAnimationFrame(cookie); 221 217 } -
trunk/Source/WebCore/page/DOMWindow.cpp
r243705 r243810 1696 1696 int DOMWindow::requestAnimationFrame(Ref<RequestAnimationFrameCallback>&& callback) 1697 1697 { 1698 callback->m_useLegacyTimeBase = false;1699 1698 auto* document = this->document(); 1700 1699 if (!document) … … 1705 1704 int DOMWindow::webkitRequestAnimationFrame(Ref<RequestAnimationFrameCallback>&& callback) 1706 1705 { 1707 callback->m_useLegacyTimeBase = true; 1708 auto* document = this->document(); 1709 if (!document) 1710 return 0; 1711 return document->requestAnimationFrame(WTFMove(callback)); 1706 static bool firstTime = true; 1707 if (firstTime && document()) { 1708 document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s); 1709 firstTime = false; 1710 } 1711 return requestAnimationFrame(WTFMove(callback)); 1712 1712 } 1713 1713
Note:
See TracChangeset
for help on using the changeset viewer.