Bug 188459 - Cleanup: Remove unnecessary code to resume animations from CachedFrameBase::restore()
Summary: Cleanup: Remove unnecessary code to resume animations from CachedFrameBase::r...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-09 17:08 PDT by Daniel Bates
Modified: 2018-08-10 14:54 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.74 KB, patch)
2018-08-09 17:13 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-08-09 17:08:08 PDT
CachedFrameBase::restore() starts off as:

[[
void CachedFrameBase::restore()
{
    ASSERT(m_document->view() == m_view);
    ...
    if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
        m_document->timeline().resumeAnimations();
    else
        frame.animation().resumeAnimationsForDocument(m_document.get());

    m_document->resume(ReasonForSuspension::PageCache);
...
]]]
<https://trac.webkit.org/browser/trunk/Source/WebCore/history/CachedFrame.cpp?rev=234703#L88>

And Document::resume() starts off as:

[[
void Document::resume(ReasonForSuspension reason)
{
    if (!m_isSuspended)
        return;

    ...

    if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
        timeline().resumeAnimations();
    else
        m_frame->animation().resumeAnimationsForDocument(this);

...
]]
<https://trac.webkit.org/browser/trunk/Source/WebCore/dom/Document.cpp?rev=234703#L4942>

It is not necessary for CachedFrameBase::restore() to explicitly resume animations because Document will do this for us when Document::resume() is called.
Comment 1 Daniel Bates 2018-08-09 17:13:01 PDT
Created attachment 346877 [details]
Patch
Comment 2 Daniel Bates 2018-08-10 14:53:10 PDT
Comment on attachment 346877 [details]
Patch

Clearing flags on attachment: 346877

Committed r234771: <https://trac.webkit.org/changeset/234771>
Comment 3 Daniel Bates 2018-08-10 14:53:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-08-10 14:54:16 PDT
<rdar://problem/43158193>