From 376bc0c68d0eef158d872dc16741fae048ffb223 Mon Sep 17 00:00:00 2001 From: "finnur@google.com" Date: Fri, 30 Jan 2009 18:09:48 +0000 Subject: Implement LayoutTestController::numberOfActiveAnimations to get a few Layout tests passing. Review URL: http://codereview.chromium.org/19490 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8968 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/dom_operations.cc | 13 +++++++++++++ webkit/glue/dom_operations.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'webkit/glue') diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index 6fc79b9..d972263 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -860,4 +860,17 @@ bool ElementDoesAutoCompleteForElementWithId(WebView* view, return input_element->autoComplete(); } +int NumberOfActiveAnimations(WebView* view) { + WebFrame* web_frame = view->GetMainFrame(); + if (!web_frame) + return -1; + + WebCore::Frame* frame = static_cast(web_frame)->frame(); + WebCore::AnimationController* controller = frame->animation(); + if (!controller) + return -1; + + return controller->numberOfActiveAnimations(); +} + } // webkit_glue diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h index 9c88e86..61af34e 100644 --- a/webkit/glue/dom_operations.h +++ b/webkit/glue/dom_operations.h @@ -192,6 +192,8 @@ bool PauseTransitionAtTimeOnElementWithId(WebView* view, bool ElementDoesAutoCompleteForElementWithId(WebView* view, const std::string& element_id); +// Returns the number of animations currently running. +int NumberOfActiveAnimations(WebView* view); } // namespace webkit_glue -- cgit v1.1