Changeset 148618 in webkit


Ignore:
Timestamp:
Apr 17, 2013 11:16:52 AM (11 years ago)
Author:
Bruno de Oliveira Abinader
Message:

[refactor] Moved ScriptedAnimationController common code to inline function
https://bugs.webkit.org/show_bug.cgi?id=114681

Reviewed by Daniel Bates.

Avoided duplicated code by moving ScriptedAnimationController clearance
code to a common function used by both Document::dispose() and
Document::detach().

No new tests, no behavior changes.

  • dom/Document.cpp:

(WebCore::Document::dispose):
(WebCore::Document::detach):
(WebCore::Document::clearScriptedAnimationController): Added.

  • dom/Document.h:

(Document):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148617 r148618  
     12013-04-17  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
     2
     3        [refactor] Moved ScriptedAnimationController common code to inline function
     4        https://bugs.webkit.org/show_bug.cgi?id=114681
     5
     6        Reviewed by Daniel Bates.
     7
     8        Avoided duplicated code by moving ScriptedAnimationController clearance
     9        code to a common function used by both Document::dispose() and
     10        Document::detach().
     11
     12        No new tests, no behavior changes.
     13
     14        * dom/Document.cpp:
     15        (WebCore::Document::dispose):
     16        (WebCore::Document::detach):
     17        (WebCore::Document::clearScriptedAnimationController): Added.
     18        * dom/Document.h:
     19        (Document):
     20
    1212013-04-17  Chris Fleizach  <cfleizach@apple.com>
    222
  • trunk/Source/WebCore/dom/Document.cpp

    r148395 r148618  
    696696
    697697#if ENABLE(REQUEST_ANIMATION_FRAME)
    698     // FIXME: consider using ActiveDOMObject.
    699     if (m_scriptedAnimationController)
    700         m_scriptedAnimationController->clearDocumentPointer();
    701     m_scriptedAnimationController.clear();
     698    clearScriptedAnimationController();
    702699#endif
    703700}
     
    21182115
    21192116#if ENABLE(REQUEST_ANIMATION_FRAME)
    2120     // FIXME: consider using ActiveDOMObject.
    2121     if (m_scriptedAnimationController)
    2122         m_scriptedAnimationController->clearDocumentPointer();
    2123     m_scriptedAnimationController.clear();
     2117    clearScriptedAnimationController();
    21242118#endif
    21252119
     
    56285622    m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationStartTime);
    56295623}
     5624
     5625void Document::clearScriptedAnimationController()
     5626{
     5627    // FIXME: consider using ActiveDOMObject.
     5628    if (m_scriptedAnimationController)
     5629        m_scriptedAnimationController->clearDocumentPointer();
     5630    m_scriptedAnimationController.clear();
     5631}
    56305632#endif
    56315633
  • trunk/Source/WebCore/dom/Document.h

    r148289 r148618  
    15441544
    15451545#if ENABLE(REQUEST_ANIMATION_FRAME)
     1546    void clearScriptedAnimationController();
    15461547    RefPtr<ScriptedAnimationController> m_scriptedAnimationController;
    15471548#endif
Note: See TracChangeset for help on using the changeset viewer.