We should remove m_useLegacyTimeBase from webkitRequestAnimationFrame() (and eventually remove webkitRequestAnimationFrame altogether).
<rdar://problem/49490207>
Created attachment 366524 [details] Patch
Created attachment 366525 [details] Patch
Comment on attachment 366525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366525&action=review > Source/WebCore/dom/ScriptedAnimationController.cpp:-219 > - if (callback->m_useLegacyTimeBase) > - callback->handleEvent(legacyHighResNowMs); > - else > - callback->handleEvent(highResNowMs); This change will conflict with my patch in https://bugs.webkit.org/show_bug.cgi?id=177484. But this is fine I will resolve the conflict if this patches before mine. Actually this code is confusing and it is good that we are going to remove it.
Comment on attachment 366525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366525&action=review > Source/WebCore/page/DOMWindow.cpp:1707 > + if (auto* document = this->document()) > + document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s); Maybe this should be logged only once per document per load?
(In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 366525 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366525&action=review > > > Source/WebCore/page/DOMWindow.cpp:1707 > > + if (auto* document = this->document()) > > + document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s); > > Maybe this should be logged only once per document per load? Do we have any precedent for doing this? I thought we usually logged on every call.
(In reply to Chris Dumez from comment #6) > (In reply to Simon Fraser (smfr) from comment #5) > > Comment on attachment 366525 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=366525&action=review > > > > > Source/WebCore/page/DOMWindow.cpp:1707 > > > + if (auto* document = this->document()) > > > + document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s); > > > > Maybe this should be logged only once per document per load? > > Do we have any precedent for doing this? I thought we usually logged on > every call. static bool firstTime = true; if (firstTime && context().scriptExecutionContext()) { context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead."_s); firstTime = false; }
(In reply to Simon Fraser (smfr) from comment #7) > (In reply to Chris Dumez from comment #6) > > (In reply to Simon Fraser (smfr) from comment #5) > > > Comment on attachment 366525 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=366525&action=review > > > > > > > Source/WebCore/page/DOMWindow.cpp:1707 > > > > + if (auto* document = this->document()) > > > > + document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s); > > > > > > Maybe this should be logged only once per document per load? > > > > Do we have any precedent for doing this? I thought we usually logged on > > every call. > > static bool firstTime = true; > if (firstTime && context().scriptExecutionContext()) { > > context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, > MessageLevel::Warning, "AudioBufferSourceNode 'looping' attribute is > deprecated. Use 'loop' instead."_s); > firstTime = false; > } Ugh, this relies on a static which means it would survive loads and potentially not log when it should.
Created attachment 366613 [details] Patch
Comment on attachment 366613 [details] Patch Clearing flags on attachment: 366613 Committed r243810: <https://trac.webkit.org/changeset/243810>
All reviewed patches have been landed. Closing bug.