- Revision
- 226750
- Author
- [email protected]
- Date
- 2018-01-10 18:18:45 -0800 (Wed, 10 Jan 2018)
Log Message
REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
https://bugs.webkit.org/show_bug.cgi?id=181269
<rdar://problem/35110344>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLayerTree:]):
When swiping to a page that set history.scrollRestoration = "manual",
we will never restore the scroll position. We will still restore
"state", but won't have a location. Currently, the code assumes that
it should wait to remove the swipe snapshot until the scroll position
is restored. Instead, wait until the "state" is restored, whether
or not that includes a scroll position/center point restoration.
Do this by making _firstTransactionIDAfterPageRestore an optional,
and reset it after it fires, so that we only run the restoration code
in _didCommitLayerTree for the first commit after state restoration,
not all subsequent commits. Then, tell ViewGestureController that
the scroll position has been restored even if the page opted out.
The reason that this is specific to pushState is that normal,
non-same-document loads bail from waiting for the scroll position
restoration in VGC::didReachMainFrameLoadTerminalState() (see the long
comment there for an explanation).
(-[WKWebView _beginBackSwipeForTesting]):
(-[WKWebView _completeBackSwipeForTesting]):
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController transitionForDirection:]):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
Add a mechanism to forcefully test swipe back. Instead of simulating
events like on Mac, we just talk to the UIKit internals and force
the interaction to start, pause, and then complete when we want.
* swipe/pushstate-with-manual-scrollrestoration-expected.txt: Added.
* swipe/pushstate-with-manual-scrollrestoration.html: Added.
Add a test (which previously would complain about taking too long)
that using manual scroll position restoration and pushState together
doesn't cause swipes to hang until the watchdog fires.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
(WTR::UIScriptController::overridePreference):
(WTR::UIScriptController::replaceTextAtRange):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::setNavigationGesturesEnabled):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
Implement beginBackSwipe and completeBackSwipe on iOS (they already
exist on Mac) in terms of the new WKWebView testing SPI.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (226749 => 226750)
--- trunk/LayoutTests/ChangeLog 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/LayoutTests/ChangeLog 2018-01-11 02:18:45 UTC (rev 226750)
@@ -1,3 +1,17 @@
+2018-01-10 Tim Horton <[email protected]>
+
+ REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
+ https://bugs.webkit.org/show_bug.cgi?id=181269
+ <rdar://problem/35110344>
+
+ Reviewed by Simon Fraser.
+
+ * swipe/pushstate-with-manual-scrollrestoration-expected.txt: Added.
+ * swipe/pushstate-with-manual-scrollrestoration.html: Added.
+ Add a test (which previously would complain about taking too long)
+ that using manual scroll position restoration and pushState together
+ doesn't cause swipes to hang until the watchdog fires.
+
2018-01-10 Ryan Haddad <[email protected]>
Skip http/tests/workers/service/cors-image-fetch.html.
Modified: trunk/LayoutTests/platform/mac/TestExpectations (226749 => 226750)
--- trunk/LayoutTests/platform/mac/TestExpectations 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2018-01-11 02:18:45 UTC (rev 226750)
@@ -1761,3 +1761,5 @@
webkit.org/b/180675 accessibility/mac/search-field-cancel-button.html [ Pass Failure ]
webkit.org/b/181098 fast/workers/worker-terminate.html [ Pass Timeout ]
+
+webkit.org/b/181502 swipe/pushstate-with-manual-scrollrestoration.html [ Failure ]
\ No newline at end of file
Added: trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration-expected.txt (0 => 226750)
--- trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration-expected.txt (rev 0)
+++ trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration-expected.txt 2018-01-11 02:18:45 UTC (rev 226750)
@@ -0,0 +1,6 @@
+startSwipeGesture
+didBeginSwipe
+completeSwipeGesture
+didEndSwipe
+didRemoveSwipeSnapshot
+
Added: trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html (0 => 226750)
--- trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html (rev 0)
+++ trunk/LayoutTests/swipe/pushstate-with-manual-scrollrestoration.html 2018-01-11 02:18:45 UTC (rev 226750)
@@ -0,0 +1,60 @@
+<head>
+<style>
+html {
+ font-size: 32pt;
+}
+</style>
+<script src=""
+<script>
+history.scrollRestoration = "manual";
+
+function didBeginSwipeCallback()
+{
+ log("didBeginSwipe");
+
+ completeSwipeGesture();
+}
+
+function didEndSwipeCallback()
+{
+ log("didEndSwipe");
+
+ startMeasuringDuration("snapshotRemoval");
+}
+
+function didRemoveSwipeSnapshotCallback()
+{
+ log("didRemoveSwipeSnapshot");
+
+ measuredDurationShouldBeLessThan("snapshotRemoval", 1000, "Because we're using the page cache, it shouldn't be long between the gesture completing and the snapshot being removed.")
+
+ testComplete();
+}
+
+window._onload_ = function () {
+ if (!window.eventSender || !window.testRunner) {
+ document.body.innerHTML = "This test must be run in WebKitTestRunner.";
+ return;
+ }
+
+ initializeSwipeTest();
+
+ testRunner.installDidBeginSwipeCallback(didBeginSwipeCallback);
+ testRunner.installDidEndSwipeCallback(didEndSwipeCallback);
+ testRunner.installDidRemoveSwipeSnapshotCallback(didRemoveSwipeSnapshotCallback);
+
+ testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+
+ setTimeout(function () {
+ history.pushState({page: "second"}, "second", "?second");
+ document.body.innerHTML = "second";
+ startSwipeGesture();
+ }, 0);
+};
+</script>
+</head>
+<body>
+first
+</body>
\ No newline at end of file
Modified: trunk/Source/WebKit/ChangeLog (226749 => 226750)
--- trunk/Source/WebKit/ChangeLog 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/ChangeLog 2018-01-11 02:18:45 UTC (rev 226750)
@@ -1,3 +1,48 @@
+2018-01-10 Tim Horton <[email protected]>
+
+ REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
+ https://bugs.webkit.org/show_bug.cgi?id=181269
+ <rdar://problem/35110344>
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _processDidExit]):
+ (-[WKWebView _didCommitLayerTree:]):
+ When swiping to a page that set history.scrollRestoration = "manual",
+ we will never restore the scroll position. We will still restore
+ "state", but won't have a location. Currently, the code assumes that
+ it should wait to remove the swipe snapshot until the scroll position
+ is restored. Instead, wait until the "state" is restored, whether
+ or not that includes a scroll position/center point restoration.
+
+ Do this by making _firstTransactionIDAfterPageRestore an optional,
+ and reset it after it fires, so that we only run the restoration code
+ in _didCommitLayerTree for the first commit after state restoration,
+ not all subsequent commits. Then, tell ViewGestureController that
+ the scroll position has been restored even if the page opted out.
+
+ The reason that this is specific to pushState is that normal,
+ non-same-document loads bail from waiting for the scroll position
+ restoration in VGC::didReachMainFrameLoadTerminalState() (see the long
+ comment there for an explanation).
+
+ (-[WKWebView _beginBackSwipeForTesting]):
+ (-[WKWebView _completeBackSwipeForTesting]):
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/Cocoa/ViewGestureController.h:
+ * UIProcess/ios/ViewGestureControllerIOS.mm:
+ (-[WKSwipeTransitionController transitionForDirection:]):
+ (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
+ (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
+ * UIProcess/mac/ViewGestureControllerMac.mm:
+ (WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
+ (WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):
+ Add a mechanism to forcefully test swipe back. Instead of simulating
+ events like on Mac, we just talk to the UIKit internals and force
+ the interaction to start, pause, and then complete when we want.
+
2018-01-10 Brent Fulgham <[email protected]>
Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (226749 => 226750)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-01-11 02:18:45 UTC (rev 226750)
@@ -772,6 +772,7 @@
@interface _UINavigationInteractiveTransitionBase ()
- (id)initWithGestureRecognizerView:(UIView *)gestureRecognizerView animator:(id<UIViewControllerAnimatedTransitioning>)animator delegate:(id<_UINavigationInteractiveTransitionBaseDelegate>)delegate;
+- (void)_completeStoppedInteractiveTransition;
@property (nonatomic, weak) UIPanGestureRecognizer *gestureRecognizer;
@property (nonatomic, assign) BOOL shouldReverseTranslation;
@property (nonatomic, retain) _UINavigationParallaxTransition *animationController;
@@ -970,6 +971,10 @@
- (UIResponder *)firstResponder;
@end
+@interface _UINavigationInteractiveTransitionBase ()
+- (void)_stopInteractiveTransition;
+@end
+
#if __has_include(<UIKit/UITextAutofillSuggestion.h>)
#import <UIKit/UITextAutofillSuggestion.h>
#else
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -318,7 +318,7 @@
WebCore::FloatBoxExtent _obscuredInsetsWhenSaved;
std::optional<WebCore::FloatPoint> _unobscuredCenterToRestore;
- uint64_t _firstTransactionIDAfterPageRestore;
+ std::optional<uint64_t> _firstTransactionIDAfterPageRestore;
double _scaleToRestore;
std::unique_ptr<WebKit::ViewGestureController> _gestureController;
@@ -1615,7 +1615,7 @@
_frozenUnobscuredContentRect = std::nullopt;
_firstPaintAfterCommitLoadTransactionID = 0;
- _firstTransactionIDAfterPageRestore = 0;
+ _firstTransactionIDAfterPageRestore = std::nullopt;
_resizeAnimationTransformTransactionID = std::nullopt;
_hasScheduledVisibleRectUpdate = NO;
@@ -1737,8 +1737,7 @@
needUpdateVisibleContentRects = true;
}
- if (layerTreeTransaction.transactionID() >= _firstTransactionIDAfterPageRestore) {
- bool shouldRestoreScrollPosition = false;
+ if (_firstTransactionIDAfterPageRestore && layerTreeTransaction.transactionID() >= _firstTransactionIDAfterPageRestore.value()) {
if (_scrollOffsetToRestore) {
WebCore::FloatPoint scaledScrollOffset = _scrollOffsetToRestore.value();
_scrollOffsetToRestore = std::nullopt;
@@ -1749,8 +1748,6 @@
changeContentOffsetBoundedInValidRange(_scrollView.get(), contentOffsetInScrollViewCoordinates);
_commitDidRestoreScrollPosition = YES;
-
- shouldRestoreScrollPosition = true;
}
needUpdateVisibleContentRects = true;
@@ -1769,15 +1766,15 @@
topLeftInDocumentCoordinates.moveBy(WebCore::FloatPoint(-_obscuredInsets.left, -_obscuredInsets.top));
changeContentOffsetBoundedInValidRange(_scrollView.get(), topLeftInDocumentCoordinates);
-
- shouldRestoreScrollPosition = true;
}
needUpdateVisibleContentRects = true;
}
- if (shouldRestoreScrollPosition && _gestureController)
+ if (_gestureController)
_gestureController->didRestoreScrollPosition();
+
+ _firstTransactionIDAfterPageRestore = std::nullopt;
}
if (needUpdateVisibleContentRects)
@@ -6167,6 +6164,28 @@
#endif // PLATFORM(IOS)
+- (BOOL)_beginBackSwipeForTesting
+{
+#if PLATFORM(MAC)
+ return _impl->beginBackSwipeForTesting();
+#else
+ if (!_gestureController)
+ return NO;
+ return _gestureController->beginSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);
+#endif
+}
+
+- (BOOL)_completeBackSwipeForTesting
+{
+#if PLATFORM(MAC)
+ return _impl->completeBackSwipeForTesting();
+#else
+ if (!_gestureController)
+ return NO;
+ return _gestureController->completeSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);
+#endif
+}
+
@end
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-01-11 02:18:45 UTC (rev 226750)
@@ -454,6 +454,9 @@
- (void)_disableBackForwardSnapshotVolatilityForTesting WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
- (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (BOOL)_beginBackSwipeForTesting;
+- (BOOL)_completeBackSwipeForTesting;
+
@end
#endif
Modified: trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h 2018-01-11 02:18:45 UTC (rev 226750)
@@ -135,6 +135,10 @@
void removeSwipeSnapshot();
+ // Testing
+ bool beginSimulatedSwipeInDirectionForTesting(SwipeDirection);
+ bool completeSimulatedSwipeInDirectionForTesting(SwipeDirection);
+
private:
// IPC::MessageReceiver.
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2018-01-11 02:18:45 UTC (rev 226750)
@@ -537,6 +537,9 @@
void prepareToDragPromisedBlob(const WebCore::PromisedBlobInfo&);
+ bool beginBackSwipeForTesting();
+ bool completeBackSwipeForTesting();
+
private:
#if HAVE(TOUCH_BAR)
void setUpTextTouchBar(NSTouchBar *);
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -4943,6 +4943,20 @@
m_page->setUserInterfaceLayoutDirection(toUserInterfaceLayoutDirection(direction));
}
+bool WebViewImpl::beginBackSwipeForTesting()
+{
+ if (!m_gestureController)
+ return false;
+ return m_gestureController->beginSimulatedSwipeInDirectionForTesting(ViewGestureController::SwipeDirection::Back);
+}
+
+bool WebViewImpl::completeBackSwipeForTesting()
+{
+ if (!m_gestureController)
+ return false;
+ return m_gestureController->completeSimulatedSwipeInDirectionForTesting(ViewGestureController::SwipeDirection::Back);
+}
+
} // namespace WebKit
#endif // PLATFORM(MAC)
Modified: trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -50,6 +50,8 @@
@interface WKSwipeTransitionController : NSObject <_UINavigationInteractiveTransitionBaseDelegate>
- (instancetype)initWithViewGestureController:(WebKit::ViewGestureController*)gestureController gestureRecognizerView:(UIView *)gestureRecognizerView;
- (void)invalidate;
+
+- (_UINavigationInteractiveTransitionBase *)transitionForDirection:(WebKit::ViewGestureController::SwipeDirection)direction;
@end
@interface _UIViewControllerTransitionContext (WKDetails)
@@ -93,6 +95,11 @@
return transition == _backTransitionController ? WebKit::ViewGestureController::SwipeDirection::Back : WebKit::ViewGestureController::SwipeDirection::Forward;
}
+- (_UINavigationInteractiveTransitionBase *)transitionForDirection:(WebKit::ViewGestureController::SwipeDirection)direction
+{
+ return direction == WebKit::ViewGestureController::SwipeDirection::Back ? _backTransitionController.get() : _forwardTransitionController.get();
+}
+
- (void)startInteractiveTransition:(_UINavigationInteractiveTransitionBase *)transition
{
_gestureController->beginSwipeGesture(transition, [self directionForTransition:transition]);
@@ -361,6 +368,26 @@
didEndGesture();
}
+bool ViewGestureController::beginSimulatedSwipeInDirectionForTesting(SwipeDirection direction)
+{
+ if (!canSwipeInDirection(direction))
+ return false;
+
+ _UINavigationInteractiveTransitionBase *transition = [m_swipeInteractiveTransitionDelegate transitionForDirection:direction];
+ beginSwipeGesture(transition, direction);
+ [transition _stopInteractiveTransition];
+
+ return true;
+}
+
+bool ViewGestureController::completeSimulatedSwipeInDirectionForTesting(SwipeDirection direction)
+{
+ _UINavigationInteractiveTransitionBase *transition = [m_swipeInteractiveTransitionDelegate transitionForDirection:direction];
+ [transition _completeStoppedInteractiveTransition];
+
+ return true;
+}
+
} // namespace WebKit
#endif // PLATFORM(IOS)
Modified: trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm (226749 => 226750)
--- trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -43,6 +43,7 @@
#import "WebProcessProxy.h"
#import <Cocoa/Cocoa.h>
#import <WebCore/IOSurface.h>
+#import <WebCore/NotImplemented.h>
#import <WebCore/WebActionDisablingCALayerDelegate.h>
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <pal/spi/mac/NSEventSPI.h>
@@ -820,6 +821,18 @@
return m_webPageProxy.pageScaleFactor();
}
+bool ViewGestureController::beginSimulatedSwipeInDirectionForTesting(SwipeDirection)
+{
+ notImplemented();
+ return false;
+}
+
+bool ViewGestureController::completeSimulatedSwipeInDirectionForTesting(SwipeDirection)
+{
+ notImplemented();
+ return false;
+}
+
} // namespace WebKit
#endif // PLATFORM(MAC)
Modified: trunk/Tools/ChangeLog (226749 => 226750)
--- trunk/Tools/ChangeLog 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Tools/ChangeLog 2018-01-11 02:18:45 UTC (rev 226750)
@@ -1,3 +1,27 @@
+2018-01-10 Tim Horton <[email protected]>
+
+ REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
+ https://bugs.webkit.org/show_bug.cgi?id=181269
+ <rdar://problem/35110344>
+
+ Reviewed by Simon Fraser.
+
+ * DumpRenderTree/ios/UIScriptControllerIOS.mm:
+ (WTR::UIScriptController::beginBackSwipe):
+ (WTR::UIScriptController::completeBackSwipe):
+ * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
+ (WTR::UIScriptController::beginBackSwipe):
+ (WTR::UIScriptController::completeBackSwipe):
+ (WTR::UIScriptController::overridePreference):
+ (WTR::UIScriptController::replaceTextAtRange):
+ * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+ (WTR::PlatformWebView::setNavigationGesturesEnabled):
+ * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+ (WTR::UIScriptController::beginBackSwipe):
+ (WTR::UIScriptController::completeBackSwipe):
+ Implement beginBackSwipe and completeBackSwipe on iOS (they already
+ exist on Mac) in terms of the new WKWebView testing SPI.
+
2018-01-10 Jonathan Bedard <[email protected]>
REGRESSION (r226715): ignore WARNING output in linter tests
Modified: trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm (226749 => 226750)
--- trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -335,6 +335,14 @@
{
}
+void UIScriptController::beginBackSwipe(JSValueRef callback)
+{
}
+void UIScriptController::completeBackSwipe(JSValueRef callback)
+{
+}
+
+}
+
#endif // PLATFORM(IOS)
Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp (226749 => 226750)
--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2018-01-11 02:18:45 UTC (rev 226750)
@@ -457,6 +457,14 @@
{
}
+void UIScriptController::beginBackSwipe(JSValueRef callback)
+{
+}
+
+void UIScriptController::completeBackSwipe(JSValueRef callback)
+{
+}
+
#endif // !PLATFORM(COCOA)
#if !PLATFORM(MAC)
@@ -469,14 +477,6 @@
{
}
-void UIScriptController::beginBackSwipe(JSValueRef callback)
-{
-}
-
-void UIScriptController::completeBackSwipe(JSValueRef callback)
-{
-}
-
void UIScriptController::platformPlayBackEventStream(JSStringRef, JSValueRef)
{
}
Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (226749 => 226750)
--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -356,6 +356,9 @@
void PlatformWebView::setNavigationGesturesEnabled(bool enabled)
{
+#if WK_API_ENABLED
+ [platformView() setAllowsBackForwardNavigationGestures:enabled];
+#endif
}
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (226749 => 226750)
--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm 2018-01-11 01:45:14 UTC (rev 226749)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm 2018-01-11 02:18:45 UTC (rev 226750)
@@ -749,6 +749,24 @@
webView.overrideSafeAreaInsets = insets;
}
+void UIScriptController::beginBackSwipe(JSValueRef callback)
+{
+ TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
+ [webView _beginBackSwipeForTesting];
+
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+ m_context->asyncTaskComplete(callbackID);
}
+void UIScriptController::completeBackSwipe(JSValueRef callback)
+{
+ TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
+ [webView _completeBackSwipeForTesting];
+
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+ m_context->asyncTaskComplete(callbackID);
+}
+
+}
+
#endif // PLATFORM(IOS)