[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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 57796844
2013-04-17 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[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):
2013-04-17 Chris Fleizach <cfleizach@apple.com>
AX: When img@alt is undefined, WebKit should use @title as accessibility label if available
......@@ -695,10 +695,7 @@ void Document::dispose()
m_cssCanvasElements.clear();
#if ENABLE(REQUEST_ANIMATION_FRAME)
// FIXME: consider using ActiveDOMObject.
if (m_scriptedAnimationController)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
clearScriptedAnimationController();
#endif
}
......@@ -2117,10 +2114,7 @@ void Document::detach()
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
// FIXME: consider using ActiveDOMObject.
if (m_scriptedAnimationController)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
clearScriptedAnimationController();
#endif
RenderObject* render = renderer();
......@@ -5627,6 +5621,14 @@ void Document::serviceScriptedAnimations(double monotonicAnimationStartTime)
return;
m_scriptedAnimationController->serviceScriptedAnimations(monotonicAnimationStartTime);
}
void Document::clearScriptedAnimationController()
{
// FIXME: consider using ActiveDOMObject.
if (m_scriptedAnimationController)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
}
#endif
#if ENABLE(TOUCH_EVENTS)
......
......@@ -1543,6 +1543,7 @@ private:
double m_lastHandledUserGestureTimestamp;
#if ENABLE(REQUEST_ANIMATION_FRAME)
void clearScriptedAnimationController();
RefPtr<ScriptedAnimationController> m_scriptedAnimationController;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment