Title: [243810] trunk
- Revision
- 243810
- Author
- [email protected]
- Date
- 2019-04-03 10:27:20 -0700 (Wed, 03 Apr 2019)
Log Message
Remove legacy webkitRequestAnimationFrame time quirk
https://bugs.webkit.org/show_bug.cgi?id=196458
<rdar://problem/49490207>
Reviewed by Simon Fraser.
Source/WebCore:
Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation
warning whenever webkitRequestAnimationFrame is called.
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::requestAnimationFrame):
(WebCore::DOMWindow::webkitRequestAnimationFrame):
LayoutTests:
Rebaseline webkitRequestAnimationFrame layout test now that we log a deprecation
warning.
* fast/animation/request-animation-frame-prefix-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243809 => 243810)
--- trunk/LayoutTests/ChangeLog 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/LayoutTests/ChangeLog 2019-04-03 17:27:20 UTC (rev 243810)
@@ -1,3 +1,16 @@
+2019-04-03 Chris Dumez <[email protected]>
+
+ Remove legacy webkitRequestAnimationFrame time quirk
+ https://bugs.webkit.org/show_bug.cgi?id=196458
+ <rdar://problem/49490207>
+
+ Reviewed by Simon Fraser.
+
+ Rebaseline webkitRequestAnimationFrame layout test now that we log a deprecation
+ warning.
+
+ * fast/animation/request-animation-frame-prefix-expected.txt:
+
2019-04-03 Alex Christensen <[email protected]>
Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
Modified: trunk/LayoutTests/fast/animation/request-animation-frame-prefix-expected.txt (243809 => 243810)
--- trunk/LayoutTests/fast/animation/request-animation-frame-prefix-expected.txt 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-prefix-expected.txt 2019-04-03 17:27:20 UTC (rev 243810)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 27: webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead.
Tests the timestamps provided to prefixed webkitRequestAnimationFrame callbacks
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: trunk/Source/WebCore/ChangeLog (243809 => 243810)
--- trunk/Source/WebCore/ChangeLog 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/Source/WebCore/ChangeLog 2019-04-03 17:27:20 UTC (rev 243810)
@@ -1,3 +1,20 @@
+2019-04-03 Chris Dumez <[email protected]>
+
+ Remove legacy webkitRequestAnimationFrame time quirk
+ https://bugs.webkit.org/show_bug.cgi?id=196458
+ <rdar://problem/49490207>
+
+ Reviewed by Simon Fraser.
+
+ Remove legacy webkitRequestAnimationFrame time quirk and log a deprecation
+ warning whenever webkitRequestAnimationFrame is called.
+
+ * dom/ScriptedAnimationController.cpp:
+ (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::requestAnimationFrame):
+ (WebCore::DOMWindow::webkitRequestAnimationFrame):
+
2019-04-03 Sihui Liu <[email protected]>
Blob type cannot be stored correctly in IDB when IDBObjectStore has autoIncrement and keyPath options
Modified: trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h (243809 => 243810)
--- trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/Source/WebCore/dom/RequestAnimationFrameCallback.h 2019-04-03 17:27:20 UTC (rev 243810)
@@ -44,7 +44,6 @@
int m_id;
bool m_firedOrCancelled;
- bool m_useLegacyTimeBase;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (243809 => 243810)
--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp 2019-04-03 17:27:20 UTC (rev 243810)
@@ -198,7 +198,6 @@
// We round this to the nearest microsecond so that we can return a time that matches what is returned by document.timeline.currentTime.
double highResNowMs = std::round(1000 * timestamp);
- double legacyHighResNowMs = 1000 * (timestamp + m_document->loader()->timing().referenceWallTime().secondsSinceEpoch().seconds());
// First, generate a list of callbacks to consider. Callbacks registered from this point
// on are considered only for the "next" frame, not this one.
@@ -213,10 +212,7 @@
if (!callback->m_firedOrCancelled) {
callback->m_firedOrCancelled = true;
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireAnimationFrame(protectedDocument, callback->m_id);
- if (callback->m_useLegacyTimeBase)
- callback->handleEvent(legacyHighResNowMs);
- else
- callback->handleEvent(highResNowMs);
+ callback->handleEvent(highResNowMs);
InspectorInstrumentation::didFireAnimationFrame(cookie);
}
}
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (243809 => 243810)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2019-04-03 17:23:33 UTC (rev 243809)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2019-04-03 17:27:20 UTC (rev 243810)
@@ -1695,7 +1695,6 @@
int DOMWindow::requestAnimationFrame(Ref<RequestAnimationFrameCallback>&& callback)
{
- callback->m_useLegacyTimeBase = false;
auto* document = this->document();
if (!document)
return 0;
@@ -1704,11 +1703,12 @@
int DOMWindow::webkitRequestAnimationFrame(Ref<RequestAnimationFrameCallback>&& callback)
{
- callback->m_useLegacyTimeBase = true;
- auto* document = this->document();
- if (!document)
- return 0;
- return document->requestAnimationFrame(WTFMove(callback));
+ static bool firstTime = true;
+ if (firstTime && document()) {
+ document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "webkitRequestAnimationFrame() is deprecated and will be removed. Please use requestAnimationFrame() instead."_s);
+ firstTime = false;
+ }
+ return requestAnimationFrame(WTFMove(callback));
}
void DOMWindow::cancelAnimationFrame(int id)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes