Changeset 65107 in webkit
- Timestamp:
- Aug 10, 2010 6:03:58 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r65101 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 This tests suspend and resume of animations. Transitions are currently broken 9 due to https://bugs.webkit.org/show_bug.cgi?id=43792. I will add transition 10 tests and tests of transition and animation interaction with that fix. 11 12 * animations/animation-test-helpers.js: 13 (matrixStringToArray): 14 * animations/suspend-resume-animation-expected.txt: Added. 15 * animations/suspend-resume-animation.html: Added. 16 1 17 2010-08-10 Stephen White <senorblanco@chromium.org> 2 18 -
trunk/LayoutTests/animations/animation-test-helpers.js
r46727 r65107 39 39 function matrixStringToArray(s) 40 40 { 41 if (s == "none") 42 return [ 1, 0, 0, 1, 0, 0 ]; 41 43 var m = s.split("("); 42 44 m = m[1].split(")"); -
trunk/WebKit/gtk/ChangeLog
r65077 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 Gtk specific API. 9 10 * webkit/webkitprivate.h: 11 * webkit/webkitwebframe.cpp: 12 (webkit_web_frame_suspend_animations): 13 (webkit_web_frame_resume_animations): 14 1 15 2010-08-10 Gavin Barraclough <barraclough@apple.com> 2 16 -
trunk/WebKit/gtk/webkit/webkitprivate.h
r64524 r65107 348 348 349 349 WEBKIT_API void 350 webkit_web_frame_suspend_animations(WebKitWebFrame* frame); 351 352 WEBKIT_API void 353 webkit_web_frame_resume_animations(WebKitWebFrame* frame); 354 355 WEBKIT_API void 350 356 webkit_web_frame_clear_main_frame_name(WebKitWebFrame* frame); 351 357 -
trunk/WebKit/gtk/webkit/webkitwebframe.cpp
r64496 r65107 1054 1054 } 1055 1055 1056 void webkit_web_frame_suspend_animations(WebKitWebFrame* frame) 1057 { 1058 Frame* coreFrame = core(frame); 1059 if (!coreFrame) 1060 return; 1061 1062 AnimationController* controller = coreFrame->animation(); 1063 if (!controller) 1064 return; 1065 1066 controller->suspendAnimations(coreFrame->document()); 1067 } 1068 1069 void webkit_web_frame_resume_animations(WebKitWebFrame* frame) 1070 { 1071 Frame* coreFrame = core(frame); 1072 if (!coreFrame) 1073 return; 1074 1075 AnimationController* controller = coreFrame->animation(); 1076 if (!controller) 1077 return; 1078 1079 controller->resumeAnimations(coreFrame->document()); 1080 } 1081 1056 1082 gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame) 1057 1083 { -
trunk/WebKit/mac/ChangeLog
r65104 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 Mac specific API. Plumbs suspendAnimations/resumeAnimations down to WebCore. 9 10 * WebView/WebFrame.mm: 11 (-[WebFrame _suspendAnimations]): 12 (-[WebFrame _resumeAnimations]): 13 * WebView/WebFramePrivate.h: 14 1 15 2010-08-10 Gavin Barraclough <barraclough@apple.com> 2 16 -
trunk/WebKit/mac/WebView/WebFrame.mm
r61584 r65107 1194 1194 } 1195 1195 1196 - (void) _suspendAnimations 1197 { 1198 Frame* frame = core(self); 1199 if (!frame) 1200 return; 1201 1202 AnimationController* controller = frame->animation(); 1203 if (!controller) 1204 return; 1205 1206 controller->suspendAnimations(frame->document()); 1207 } 1208 1209 - (void) _resumeAnimations 1210 { 1211 Frame* frame = core(self); 1212 if (!frame) 1213 return; 1214 1215 AnimationController* controller = frame->animation(); 1216 if (!controller) 1217 return; 1218 1219 controller->resumeAnimations(frame->document()); 1220 } 1221 1196 1222 - (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle 1197 1223 { -
trunk/WebKit/mac/WebView/WebFramePrivate.h
r56934 r65107 114 114 - (unsigned) _numberOfActiveAnimations; 115 115 116 // Suspend and resume animations (includes both CSS transitions and CSS animations). 117 - (void) _suspendAnimations; 118 - (void) _resumeAnimations; 119 116 120 - (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle; 117 121 - (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace; -
trunk/WebKit/qt/ChangeLog
r65021 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 Qt specific API. Missing symbian symbol defines in: 9 10 WebKit/qt/symbian/bwins/QtWebKitu.def 11 WebKit/qt/symbian/eabi/QtWebKitu.def 12 13 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 14 (DumpRenderTreeSupportQt::suspendAnimations): 15 (DumpRenderTreeSupportQt::resumeAnimations): 16 * WebCoreSupport/DumpRenderTreeSupportQt.h: 17 1 18 2010-08-06 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r63921 r65107 263 263 } 264 264 265 void DumpRenderTreeSupportQt::suspendAnimations(QWebFrame *frame) 266 { 267 Frame* coreFrame = QWebFramePrivate::core(frame); 268 if (!coreFrame) 269 return; 270 271 AnimationController* controller = coreFrame->animation(); 272 if (!controller) 273 return; 274 275 controller->suspendAnimations(coreFrame->document()); 276 } 277 278 void DumpRenderTreeSupportQt::resumeAnimations(QWebFrame *frame) 279 { 280 Frame* coreFrame = QWebFramePrivate::core(frame); 281 if (!coreFrame) 282 return; 283 284 AnimationController* controller = coreFrame->animation(); 285 if (!controller) 286 return; 287 288 controller->resumeAnimations(coreFrame->document()); 289 } 290 265 291 void DumpRenderTreeSupportQt::clearFrameName(QWebFrame* frame) 266 292 { -
trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r63921 r65107 80 80 static void overwritePluginDirectories(); 81 81 static int numberOfActiveAnimations(QWebFrame*); 82 static void suspendAnimations(QWebFrame*); 83 static void resumeAnimations(QWebFrame*); 82 84 static int numberOfPages(QWebFrame* frame, float width, float height); 83 85 static int pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height); -
trunk/WebKit/win/ChangeLog
r65021 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 Win specific API 9 10 * Interfaces/IWebFramePrivate.idl: 11 * WebFrame.cpp: 12 (WebFrame::suspendAnimations): 13 (WebFrame::resumeAnimations): 14 * WebFrame.h: 15 1 16 2010-08-06 Gavin Barraclough <barraclough@apple.com> 2 17 -
trunk/WebKit/win/Interfaces/IWebFramePrivate.idl
r61270 r65107 91 91 HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning); 92 92 HRESULT numberOfActiveAnimations([out, retval] UINT* number); 93 HRESULT suspendAnimations(); 94 HRESULT resumeAnimations(); 93 95 94 96 HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result); -
trunk/WebKit/win/WebFrame.cpp
r64412 r65107 1298 1298 } 1299 1299 1300 HRESULT WebFrame::suspendAnimations() 1301 { 1302 Frame* frame = core(this); 1303 if (!frame) 1304 return; 1305 1306 AnimationController* controller = frame->animation(); 1307 if (!controller) 1308 return; 1309 1310 controller->suspendAnimations(); 1311 return S_OK; 1312 } 1313 1314 HRESULT WebFrame::resumeAnimations() 1315 { 1316 Frame* frame = core(this); 1317 if (!frame) 1318 return; 1319 1320 AnimationController* controller = frame->animation(); 1321 if (!controller) 1322 return; 1323 1324 controller->resumeAnimations(); 1325 return S_OK; 1326 } 1327 1300 1328 HRESULT WebFrame::isDisplayingStandaloneImage(BOOL* result) 1301 1329 { -
trunk/WebKit/win/WebFrame.h
r65021 r65107 259 259 virtual HRESULT STDMETHODCALLTYPE pauseSVGAnimation(BSTR elementId, IDOMNode*, double secondsFromNow, BOOL* animationWasRunning); 260 260 virtual HRESULT STDMETHODCALLTYPE numberOfActiveAnimations(UINT*); 261 virtual HRESULT STDMETHODCALLTYPE suspendAnimations(); 262 virtual HRESULT STDMETHODCALLTYPE resumeAnimations(); 261 263 262 264 virtual HRESULT STDMETHODCALLTYPE isDisplayingStandaloneImage(BOOL*); -
trunk/WebKitTools/ChangeLog
r65098 r65107 1 2010-08-10 Chris Marrin <cmarrin@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 Add suspendAnimations/resumeAnimation API to DRT 6 https://bugs.webkit.org/show_bug.cgi?id=43733 7 8 Adds suspendAnimations() and resumeAnimations() to LayoutTestController. 9 Calls functions with the same names on AnimationController for the 10 mainFrame. 11 12 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 13 * DumpRenderTree/LayoutTestController.cpp: 14 (suspendAnimationsCallback): 15 (resumeAnimationsCallback): 16 (LayoutTestController::staticFunctions): 17 * DumpRenderTree/LayoutTestController.h: 18 * DumpRenderTree/chromium/LayoutTestController.cpp: 19 (LayoutTestController::LayoutTestController): 20 (LayoutTestController::suspendAnimations): 21 (LayoutTestController::resumeAnimations): 22 * DumpRenderTree/chromium/LayoutTestController.h: 23 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 24 (LayoutTestController::suspendAnimations): 25 (LayoutTestController::resumeAnimations): 26 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 27 (LayoutTestController::suspendAnimations): 28 (LayoutTestController::resumeAnimations): 29 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 30 (LayoutTestController::suspendAnimations): 31 (LayoutTestController::resumeAnimations): 32 * DumpRenderTree/qt/LayoutTestControllerQt.h: 33 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 34 (LayoutTestController::suspendAnimations): 35 (LayoutTestController::resumeAnimations): 36 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 37 (LayoutTestController::suspendAnimations): 38 (LayoutTestController::resumeAnimations): 39 1 40 2010-08-10 Dimitri Glazkov <dglazkov@chromium.org> 2 41 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r64749 r65107 1544 1544 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1545 1545 return JSValueMakeNumber(context, controller->numberOfActiveAnimations()); 1546 } 1547 1548 static JSValueRef suspendAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1549 { 1550 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1551 controller->suspendAnimations(); 1552 return JSValueMakeUndefined(context); 1553 } 1554 1555 static JSValueRef resumeAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1556 { 1557 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1558 controller->resumeAnimations(); 1559 return JSValueMakeUndefined(context); 1546 1560 } 1547 1561 … … 1851 1865 { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1852 1866 { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1867 { "suspendAnimations", suspendAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1868 { "resumeAnimations", resumeAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1853 1869 { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1854 1870 { "pageNumberForElementById", pageNumberForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r64749 r65107 252 252 bool sampleSVGAnimationForElementAtTime(JSStringRef animationId, double time, JSStringRef elementId); 253 253 unsigned numberOfActiveAnimations() const; 254 void suspendAnimations() const; 255 void resumeAnimations() const; 254 256 255 257 void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains); -
trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
r64843 r65107 118 118 bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId); 119 119 bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations); 120 bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations); 121 bindMethod("resumeAnimations", &LayoutTestController::resumeAnimations); 120 122 bindMethod("disableImageLoading", &LayoutTestController::disableImageLoading); 121 123 bindMethod("setIconDatabaseEnabled", &LayoutTestController::setIconDatabaseEnabled); … … 839 841 } 840 842 843 void LayoutTestController::suspendAnimations() 844 { 845 WebFrame* webFrame = m_shell->webView()->mainFrame(); 846 if (!webFrame) 847 return; 848 849 WebAnimationController* controller = webFrame->animationController(); 850 if (!controller) 851 return; 852 853 controller->suspendAnimations(core(webFrame)->document()); 854 } 855 856 void LayoutTestController::resumeAnimations() 857 { 858 WebFrame* webFrame = m_shell->webView()->mainFrame(); 859 if (!webFrame) 860 return; 861 862 WebAnimationController* controller = webFrame->animationController(); 863 if (!controller) 864 return; 865 866 controller->resumeAnimations(core(webFrame)->document()); 867 } 868 841 869 void LayoutTestController::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result) 842 870 { … … 874 902 { 875 903 result->set(numberOfActiveAnimations()); 904 } 905 906 void LayoutTestController::suspendAnimations(const CppArgumentList&, CppVariant* result) 907 { 908 suspendAnimations(); 909 result->setNull(); 910 } 911 912 void LayoutTestController::resumeAnimations(const CppArgumentList&, CppVariant* result) 913 { 914 resumeAnimations(); 915 result->setNull(); 876 916 } 877 917 -
trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
r64749 r65107 208 208 void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*); 209 209 void numberOfActiveAnimations(const CppArgumentList&, CppVariant*); 210 void suspendAnimations(const CppArgumentList&, CppVariant*); 211 void resumeAnimations(const CppArgumentList&, CppVariant*); 210 212 211 213 void disableImageLoading(const CppArgumentList&, CppVariant*); … … 396 398 bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&); 397 399 int numberOfActiveAnimations(); 400 void suspendAnimations(); 401 void suspendAnimations(); 398 402 399 403 // Used for test timeouts. -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r64749 r65107 53 53 bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element); 54 54 unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame); 55 void webkit_web_frame_suspend_animations(WebKitWebFrame* frame); 56 void webkit_web_frame_resume_animations(WebKitWebFrame* frame); 55 57 void webkit_application_cache_set_maximum_size(unsigned long long size); 56 58 unsigned int webkit_worker_thread_count(void); … … 619 621 { 620 622 return webkit_web_frame_number_of_active_animations(mainFrame); 623 } 624 625 void LayoutTestController::suspendAnimations() const 626 { 627 return webkit_web_frame_suspend_animations(mainFrame); 628 } 629 630 void LayoutTestController::resumeAnimations() const 631 { 632 return webkit_web_frame_resume_animations(mainFrame); 621 633 } 622 634 -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r64749 r65107 632 632 } 633 633 634 void LayoutTestController::suspendAnimations() const 635 { 636 return [mainFrame _suspendAnimations]; 637 } 638 639 void LayoutTestController::resumeAnimations() const 640 { 641 return [mainFrame _resumeAnimations]; 642 } 643 634 644 void LayoutTestController::waitForPolicyDelegate() 635 645 { -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r64749 r65107 485 485 } 486 486 487 void LayoutTestController::suspendAnimations() const 488 { 489 QWebFrame* frame = m_drt->webPage()->mainFrame(); 490 Q_ASSERT(frame); 491 DumpRenderTreeSupportQt::suspendAnimations(frame); 492 } 493 494 void LayoutTestController::resumeAnimations() const 495 { 496 QWebFrame* frame = m_drt->webPage()->mainFrame(); 497 Q_ASSERT(frame); 498 DumpRenderTreeSupportQt::resumeAnimations(frame); 499 } 500 487 501 void LayoutTestController::disableImageLoading() 488 502 { -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
r64749 r65107 168 168 169 169 unsigned numberOfActiveAnimations() const; 170 void suspendAnimations() const; 171 void resumeAnimations() const; 170 172 171 173 void addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r64749 r65107 1061 1061 } 1062 1062 1063 void LayoutTestController::suspendAnimations() const 1064 { 1065 COMPtr<IWebFramePrivate> framePrivate(Query, frame); 1066 if (!framePrivate) 1067 return; 1068 1069 framePrivate->suspendAnimations(); 1070 } 1071 1072 void LayoutTestController::resumeAnimations() const 1073 { 1074 COMPtr<IWebFramePrivate> framePrivate(Query, frame); 1075 if (!framePrivate) 1076 return; 1077 1078 framePrivate->resumeAnimations(); 1079 } 1080 1063 1081 static _bstr_t bstrT(JSStringRef jsString) 1064 1082 { -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r64749 r65107 265 265 } 266 266 267 void LayoutTestController::suspendAnimations() const 268 { 269 // FIXME: implement 270 } 271 272 void LayoutTestController::resumeAnimations() const 273 { 274 // FIXME: implement 275 } 276 267 277 unsigned LayoutTestController::workerThreadCount() const 268 278 {
Note: See TracChangeset
for help on using the changeset viewer.