Title: [256092] trunk/Source/WebKit
- Revision
- 256092
- Author
- [email protected]
- Date
- 2020-02-08 12:36:28 -0800 (Sat, 08 Feb 2020)
Log Message
REGRESSION (r256072): ScrollViewScrollabilityTests.ScrollableWithOverflowHiddenAndInputView fails
https://bugs.webkit.org/show_bug.cgi?id=207425
Followup to <rdar://problem/56960774>
Reviewed by Tim Horton.
The failing test ScrollViewScrollabilityTests.ScrollableWithOverflowHiddenAndInputView relies on -[WKWebView
_zoomToFocusRect:...:] to modify the zoom scale of WKScrollView in order for the next layer tree transaction to
have a zoom scale not equal to the initial scale, which in turn ensures that we make the UIScrollView scrollable
after the next remote layer tree update.
The change in r256072 caused us to bail early in -_zoomToFocusRect: and -_zoomToPoint: in the case where the
scroll view is not scrollable (i.e. the page has `overflow: hidden`); this means that if all the following
conditions are met, we now avoid zooming into focused elements, whereas we would've zoomed before the change:
1. The user is focusing an element on an iPhone.
2. The document body has `overflow: hidden;`, or the WebKit client has called `-setScrollEnabled:NO`.
3. Either an SPI client has vended an empty input view and input accessory view, or the focused element has
inputmode="none".
To fix the test and restore zooming behavior, we partially revert the change in r256072, such that we no longer
bail from WKWebView's zooming codepaths if the scrollEnabled property is NO.
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _zoomToPoint:atScale:animated:]):
(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (256091 => 256092)
--- trunk/Source/WebKit/ChangeLog 2020-02-08 18:29:37 UTC (rev 256091)
+++ trunk/Source/WebKit/ChangeLog 2020-02-08 20:36:28 UTC (rev 256092)
@@ -1,3 +1,32 @@
+2020-02-08 Wenson Hsieh <[email protected]>
+
+ REGRESSION (r256072): ScrollViewScrollabilityTests.ScrollableWithOverflowHiddenAndInputView fails
+ https://bugs.webkit.org/show_bug.cgi?id=207425
+ Followup to <rdar://problem/56960774>
+
+ Reviewed by Tim Horton.
+
+ The failing test ScrollViewScrollabilityTests.ScrollableWithOverflowHiddenAndInputView relies on -[WKWebView
+ _zoomToFocusRect:...:] to modify the zoom scale of WKScrollView in order for the next layer tree transaction to
+ have a zoom scale not equal to the initial scale, which in turn ensures that we make the UIScrollView scrollable
+ after the next remote layer tree update.
+
+ The change in r256072 caused us to bail early in -_zoomToFocusRect: and -_zoomToPoint: in the case where the
+ scroll view is not scrollable (i.e. the page has `overflow: hidden`); this means that if all the following
+ conditions are met, we now avoid zooming into focused elements, whereas we would've zoomed before the change:
+
+ 1. The user is focusing an element on an iPhone.
+ 2. The document body has `overflow: hidden;`, or the WebKit client has called `-setScrollEnabled:NO`.
+ 3. Either an SPI client has vended an empty input view and input accessory view, or the focused element has
+ inputmode="none".
+
+ To fix the test and restore zooming behavior, we partially revert the change in r256072, such that we no longer
+ bail from WKWebView's zooming codepaths if the scrollEnabled property is NO.
+
+ * UIProcess/API/ios/WKWebViewIOS.mm:
+ (-[WKWebView _zoomToPoint:atScale:animated:]):
+ (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
+
2020-02-08 Sam Weinig <[email protected]>
Move trivial definitions from FeatureDefines.xcconfig to PlatformEnableCocoa.h
Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (256091 => 256092)
--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2020-02-08 18:29:37 UTC (rev 256091)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2020-02-08 20:36:28 UTC (rev 256092)
@@ -1042,9 +1042,6 @@
- (void)_zoomToPoint:(WebCore::FloatPoint)point atScale:(double)scale animated:(BOOL)animated
{
- if (![_scrollView isScrollEnabled])
- return;
-
CFTimeInterval duration = 0;
CGFloat zoomScale = contentZoomScale(self);
@@ -1187,8 +1184,6 @@
{
LOG_WITH_STREAM(VisibleRects, stream << "_zoomToFocusRect:" << focusedElementRectInDocumentCoordinates << " selectionRect:" << selectionRectInDocumentCoordinates);
UNUSED_PARAM(insideFixed);
- if (![_scrollView isScrollEnabled])
- return;
const double minimumHeightToShowContentAboveKeyboard = 106;
const CFTimeInterval formControlZoomAnimationDuration = 0.25;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes