⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244032 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 11:50:41 AM (7 years ago)
Author:
graouts@webkit.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244031 r244032  
     12019-04-08  Antoine Quint  <graouts@apple.com>
     2
     3        [ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=195233
     5        <rdar://problem/48527231>
     6
     7        Reviewed by Dean Jackson.
     8
     9        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.
     10
     11        * animation/DocumentTimeline.cpp:
     12        (WebCore::DocumentTimeline::currentTime):
     13
    1142019-04-08  Antoine Quint  <graouts@apple.com>
    215
  • trunk/Source/WebCore/animation/DocumentTimeline.cpp

    r243263 r244032  
    267267        return AnimationTimeline::currentTime();
    268268
    269     if (auto* mainDocumentTimeline = m_document->existingTimeline()) {
    270         if (mainDocumentTimeline != this) {
    271             if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline->currentTime())
    272                 return mainDocumentTimelineCurrentTime.value() - m_originTime;
    273             return WTF::nullopt;
    274         }
     269    auto& mainDocumentTimeline = m_document->timeline();
     270    if (&mainDocumentTimeline != this) {
     271        if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline.currentTime())
     272            return *mainDocumentTimelineCurrentTime - m_originTime;
     273        return WTF::nullopt;
    275274    }
    276275
Note: See TracChangeset for help on using the changeset viewer.