|
| 1 | +2017-05-05 Simon Fraser < [email protected]> |
| 2 | + |
| 3 | + Make it possible to test rotation in iOS WebKitTestRunner |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=171755 |
| 5 | + |
| 6 | + Reviewed by Tim Horton. |
| 7 | + |
| 8 | + Add to UIScriptController: |
| 9 | + void simulateRotation(DeviceOrientation orientation, object callback); |
| 10 | + void simulateRotationLikeSafari(DeviceOrientation orientation, object callback); |
| 11 | + |
| 12 | + The former just does a view resize, as a simple WKWebView app would do. The second does |
| 13 | + animation more like MobileSafari, using _begin/_endAnimatedResize. and associated override |
| 14 | + layout size and interface orientation. The two behaviors produce different resize and |
| 15 | + orientationchange events and sizes, and both need to be tested. |
| 16 | + |
| 17 | + Rotation is initiated by a call on UIDevice, and responded to by the root view controller, |
| 18 | + which is now a custom subclass (PlatformWebViewController). |
| 19 | + |
| 20 | + * DumpRenderTree/ios/UIScriptControllerIOS.mm: |
| 21 | + (WTR::UIScriptController::simulateRotation): |
| 22 | + (WTR::UIScriptController::simulateRotationLikeSafari): |
| 23 | + * DumpRenderTree/mac/UIScriptControllerMac.mm: |
| 24 | + (WTR::UIScriptController::simulateRotation): |
| 25 | + (WTR::UIScriptController::simulateRotationLikeSafari): |
| 26 | + * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: |
| 27 | + * TestRunnerShared/UIScriptContext/UIScriptController.cpp: |
| 28 | + (WTR::toDeviceOrientation): |
| 29 | + (WTR::UIScriptController::simulateRotation): |
| 30 | + (WTR::UIScriptController::simulateRotationLikeSafari): |
| 31 | + * TestRunnerShared/UIScriptContext/UIScriptController.h: |
| 32 | + * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: |
| 33 | + * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: |
| 34 | + (-[TestRunnerWKWebView dealloc]): |
| 35 | + (-[TestRunnerWKWebView _didEndRotation]): |
| 36 | + * WebKitTestRunner/ios/PlatformWebViewIOS.mm: |
| 37 | + (-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]): |
| 38 | + (WTR::PlatformWebView::PlatformWebView): |
| 39 | + * WebKitTestRunner/ios/TestControllerIOS.mm: |
| 40 | + (WTR::TestController::platformResetStateToConsistentValues): |
| 41 | + * WebKitTestRunner/ios/UIScriptControllerIOS.mm: |
| 42 | + (WTR::toUIDeviceOrientation): |
| 43 | + (WTR::UIScriptController::simulateRotation): |
| 44 | + (WTR::UIScriptController::simulateRotationLikeSafari): |
| 45 | + (WTR::UIScriptController::platformClearAllCallbacks): |
| 46 | + * WebKitTestRunner/mac/UIScriptControllerMac.mm: |
| 47 | + (WTR::UIScriptController::simulateRotation): |
| 48 | + (WTR::UIScriptController::simulateRotationLikeSafari): |
| 49 | + |
1 | 50 | 2017-05-05 Jonathan Bedard < [email protected]>
|
2 | 51 |
|
3 | 52 | Use ImageDiff built by host SDK and remove ImageDiff from DumpRenderTree
|
|
0 commit comments