Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: webkit/glue/dom_operations.cc

Issue 16216: Adds support for pauseAnimationAtTimeOnElementWithId and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/dom_operations.h ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "AnimationController.h"
10 #include "FrameLoader.h" 11 #include "FrameLoader.h"
11 #include "FrameTree.h" 12 #include "FrameTree.h"
12 #include "Document.h" 13 #include "Document.h"
13 #include "Element.h" 14 #include "Element.h"
14 #include "EventListener.h" 15 #include "EventListener.h"
15 #include "EventNames.h" 16 #include "EventNames.h"
16 #include "HTMLCollection.h" 17 #include "HTMLCollection.h"
17 #include "HTMLElement.h" 18 #include "HTMLElement.h"
18 #include "HTMLFormElement.h" 19 #include "HTMLFormElement.h"
19 #include "HTMLFrameOwnerElement.h" 20 #include "HTMLFrameOwnerElement.h"
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 app_info->app_url = main_url.is_valid() ? 788 app_info->app_url = main_url.is_valid() ?
788 main_url.Resolve(url) : GURL(url); 789 main_url.Resolve(url) : GURL(url);
789 if (!app_info->app_url.is_valid()) 790 if (!app_info->app_url.is_valid())
790 app_info->app_url = GURL(); 791 app_info->app_url = GURL();
791 } 792 }
792 } 793 }
793 } 794 }
794 } 795 }
795 } 796 }
796 797
798 bool PauseAnimationAtTimeOnElementWithId(WebView* view,
799 const std::string& animation_name,
800 double time,
801 const std::string& element_id) {
802 WebFrame* web_frame = view->GetMainFrame();
803 if (!web_frame)
804 return false;
805
806 WebCore::Frame* frame = static_cast<WebFrameImpl*>(web_frame)->frame();
807 WebCore::AnimationController* controller = frame->animation();
808 if (!controller)
809 return false;
810
811 WebCore::Element* element =
812 frame->document()->getElementById(StdStringToString(element_id));
813 if (!element)
814 return false;
815
816 return controller->pauseAnimationAtTime(element->renderer(),
817 StdStringToString(animation_name),
818 time);
819 }
820
821 bool PauseTransitionAtTimeOnElementWithId(WebView* view,
822 const std::string& property_name,
823 double time,
824 const std::string& element_id) {
825 WebFrame* web_frame = view->GetMainFrame();
826 if (!web_frame)
827 return false;
828
829 WebCore::Frame* frame = static_cast<WebFrameImpl*>(web_frame)->frame();
830 WebCore::AnimationController* controller = frame->animation();
831 if (!controller)
832 return false;
833
834 WebCore::Element* element =
835 frame->document()->getElementById(StdStringToString(element_id));
836 if (!element)
837 return false;
838
839 return controller->pauseTransitionAtTime(element->renderer(),
840 StdStringToString(property_name),
841 time);
842 }
843
797 } // webkit_glue 844 } // webkit_glue
798 845
OLDNEW
« no previous file with comments | « webkit/glue/dom_operations.h ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698