diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 18:09:48 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 18:09:48 +0000 |
commit | 376bc0c68d0eef158d872dc16741fae048ffb223 (patch) | |
tree | a4d3e061738a519387007b9450ef525a717a5727 /webkit/glue | |
parent | 8ac68283bbf58ad85ab929148a33aad8c46230fb (diff) | |
download | chromium_src-376bc0c68d0eef158d872dc16741fae048ffb223.zip chromium_src-376bc0c68d0eef158d872dc16741fae048ffb223.tar.gz chromium_src-376bc0c68d0eef158d872dc16741fae048ffb223.tar.bz2 |
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
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/dom_operations.cc | 13 | ||||
-rw-r--r-- | webkit/glue/dom_operations.h | 2 |
2 files changed, 15 insertions, 0 deletions
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<WebFrameImpl*>(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 |