Title: [210348] branches/safari-603-branch/Tools
- Revision
- 210348
- Author
- matthew_han...@apple.com
- Date
- 2017-01-05 09:09:18 -0800 (Thu, 05 Jan 2017)
Log Message
Merge r210101. rdar://problem/28475977
Modified Paths
Diff
Modified: branches/safari-603-branch/Tools/ChangeLog (210347 => 210348)
--- branches/safari-603-branch/Tools/ChangeLog 2017-01-05 17:09:15 UTC (rev 210347)
+++ branches/safari-603-branch/Tools/ChangeLog 2017-01-05 17:09:18 UTC (rev 210348)
@@ -1,5 +1,35 @@
2017-01-05 Matthew Hanson <matthew_han...@apple.com>
+ Merge r210101. rdar://problem/28475977
+
+ 2016-12-22 Wenson Hsieh <wenson_hs...@apple.com>
+
+ fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html is flaky/order dependent
+ https://bugs.webkit.org/show_bug.cgi?id=161328
+ <rdar://problem/28475977>
+
+ Reviewed by Darin Adler.
+
+ Running a test that scales the viewport and listens to a didEndZooming callback (such as
+ viewport-shrink-to-fit-allows-double-tap.html) immediately after a test that may begin to trigger viewport
+ scaling as the test completes (such as viewport-device-width-at-initial-scale-fast-clicks.html) may result in
+ the didEndZooming callback of the latter test being fired early due to the previous test triggering a zoom
+ animation. Ideally, -[WKScrollView _stopScrollingAndZoomingAnimations], which is called when committing the page
+ load, should prevent this from happening, but from reading documentation and code inspection, this is not
+ intended to fire any associated delegate methods or notifications of the UIScrollView, instead deferring them
+ for later. Instead, what we need in this case is to clear out any started but not yet completed animations after
+ we finish running a test and before we load the next test.
+
+ One way to do this is to remove all animations from the WKScrollView's layer, and the layers of its children,
+ recursively. Doing so causes scrollViewDidEndZooming:withView:atScale: to fire at the end of the runloop if the
+ previous test started zooming and then finished before zooming completed. Since this happens before the next
+ test has a chance to run UI-side scripts, we won't end up firing this callback prematurely during the next test.
+
+ * WebKitTestRunner/ios/TestControllerIOS.mm:
+ (WTR::TestController::platformResetStateToConsistentValues):
+
+2017-01-05 Matthew Hanson <matthew_han...@apple.com>
+
Merge r210100. rdar://problem/28388000
2016-12-22 Jer Noble <jer.no...@apple.com>
Modified: branches/safari-603-branch/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (210347 => 210348)
--- branches/safari-603-branch/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2017-01-05 17:09:15 UTC (rev 210347)
+++ branches/safari-603-branch/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2017-01-05 17:09:18 UTC (rev 210348)
@@ -29,6 +29,7 @@
#import "PlatformWebView.h"
#import "TestInvocation.h"
#import "TestRunnerWKWebView.h"
+#import "UIKitSPI.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <WebKit/WKPreferencesRefPrivate.h>
@@ -88,6 +89,7 @@
if (PlatformWebView* webView = mainWebView()) {
webView->platformView()._stableStateOverride = nil;
UIScrollView *scrollView = webView->platformView().scrollView;
+ [scrollView _removeAllAnimations:YES];
[scrollView setZoomScale:1 animated:NO];
[scrollView setContentOffset:CGPointZero];
}
Modified: branches/safari-603-branch/Tools/WebKitTestRunner/ios/UIKitSPI.h (210347 => 210348)
--- branches/safari-603-branch/Tools/WebKitTestRunner/ios/UIKitSPI.h 2017-01-05 17:09:15 UTC (rev 210347)
+++ branches/safari-603-branch/Tools/WebKitTestRunner/ios/UIKitSPI.h 2017-01-05 17:09:18 UTC (rev 210348)
@@ -36,6 +36,7 @@
#import <UIKit/UIApplication_Private.h>
#import <UIKit/UIKeyboard.h>
+#import <UIKit/UIView_Private.h>
#import <UIKit/UIWindow_Private.h>
@interface UIKeyboardPredictionView : UIView
@@ -60,6 +61,10 @@
+ (void)removeAllDynamicDictionaries;
@end
+@interface UIView ()
+- (void)_removeAllAnimations:(BOOL)includeSubviews;
+@end
+
#endif // USE(APPLE_INTERNAL_SDK)
#endif // PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes