Title: [244032] trunk/Source/WebCore
- Revision
- 244032
- Author
- [email protected]
- Date
- 2019-04-08 11:50:41 -0700 (Mon, 08 Apr 2019)
Log Message
[ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=195233
<rdar://problem/48527231>
Reviewed by Dean Jackson.
We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244031 => 244032)
--- trunk/Source/WebCore/ChangeLog 2019-04-08 18:49:04 UTC (rev 244031)
+++ trunk/Source/WebCore/ChangeLog 2019-04-08 18:50:41 UTC (rev 244032)
@@ -1,5 +1,18 @@
2019-04-08 Antoine Quint <[email protected]>
+ [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=195233
+ <rdar://problem/48527231>
+
+ Reviewed by Dean Jackson.
+
+ We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.
+
+ * animation/DocumentTimeline.cpp:
+ (WebCore::DocumentTimeline::currentTime):
+
+2019-04-08 Antoine Quint <[email protected]>
+
[Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
https://bugs.webkit.org/show_bug.cgi?id=196118
<rdar://problem/46614137>
Modified: trunk/Source/WebCore/animation/DocumentTimeline.cpp (244031 => 244032)
--- trunk/Source/WebCore/animation/DocumentTimeline.cpp 2019-04-08 18:49:04 UTC (rev 244031)
+++ trunk/Source/WebCore/animation/DocumentTimeline.cpp 2019-04-08 18:50:41 UTC (rev 244032)
@@ -266,12 +266,11 @@
if (!m_document || !m_document->domWindow())
return AnimationTimeline::currentTime();
- if (auto* mainDocumentTimeline = m_document->existingTimeline()) {
- if (mainDocumentTimeline != this) {
- if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline->currentTime())
- return mainDocumentTimelineCurrentTime.value() - m_originTime;
- return WTF::nullopt;
- }
+ auto& mainDocumentTimeline = m_document->timeline();
+ if (&mainDocumentTimeline != this) {
+ if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline.currentTime())
+ return *mainDocumentTimelineCurrentTime - m_originTime;
+ return WTF::nullopt;
}
auto currentTime = liveCurrentTime();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes