Adopt different scroll view flashing SPI
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 00:42:36 +0000 (00:42 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 00:42:36 +0000 (00:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197043
<rdar://problem/49996476>

Reviewed by Wenson Hsieh.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244414 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm

index 990108a..d1542f9 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-17  Tim Horton  <timothy_horton@apple.com>
+
+        Adopt different scroll view flashing SPI
+        https://bugs.webkit.org/show_bug.cgi?id=197043
+        <rdar://problem/49996476>
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/Platform.h:
+
 2019-04-17  Jer Noble  <jer.noble@apple.com>
 
         Enable HAVE_AVFOUNDATION_VIDEO_OUTPUT on PLATFORM(IOSMAC)
index aa1c5a4..cbcff95 100644 (file)
 #define HAVE_ALLOWS_SENSITIVE_LOGGING 1
 #endif
 
+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 130000)
+#define HAVE_UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI 1
+#endif
+
 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
 #define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO 1
 #endif
index 889cee0..809d501 100644 (file)
@@ -1,5 +1,17 @@
 2019-04-17  Tim Horton  <timothy_horton@apple.com>
 
+        Adopt different scroll view flashing SPI
+        https://bugs.webkit.org/show_bug.cgi?id=197043
+        <rdar://problem/49996476>
+
+        Reviewed by Wenson Hsieh.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
+        (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
+
+2019-04-17  Tim Horton  <timothy_horton@apple.com>
+
         REGRESSION (r241988): Switching tabs is slow
         https://bugs.webkit.org/show_bug.cgi?id=197037
         <rdar://problem/49951473>
index 00d4222..d867fa1 100644 (file)
@@ -344,6 +344,7 @@ typedef NS_ENUM(NSInteger, UIScrollViewIndicatorInsetAdjustmentBehavior) {
 - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration;
 - (double)_horizontalVelocity;
 - (double)_verticalVelocity;
+- (void)_flashScrollIndicatorsPersistingPreviousFlashes;
 @property (nonatomic, getter=isZoomEnabled) BOOL zoomEnabled;
 @property (nonatomic, readonly, getter=_isAnimatingZoom) BOOL isAnimatingZoom;
 @property (nonatomic, readonly, getter=_isAnimatingScroll) BOOL isAnimatingScroll;
index 2a42c71..bca982e 100644 (file)
@@ -593,7 +593,11 @@ static WebCore::FloatPoint farthestPointInDirection(WebCore::FloatPoint a, WebCo
     if (_delegateRespondsToWillScroll)
         [_delegate keyboardScrollViewAnimatorWillScroll:self];
     [scrollView setContentOffset:contentOffsetDelta animated:animated];
+#if HAVE(UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI)
+    [scrollView _flashScrollIndicatorsPersistingPreviousFlashes];
+#else
     [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES];
+#endif
 }
 
 - (void)scrollWithScrollToExtentAnimationTo:(CGPoint)offset