Title: [243480] trunk/Source/WebKit
Revision
243480
Author
[email protected]
Date
2019-03-25 18:44:50 -0700 (Mon, 25 Mar 2019)

Log Message

Get rid of ENABLE(ANIMATED_KEYBOARD_SCROLLING)
https://bugs.webkit.org/show_bug.cgi?id=196224

Reviewed by Simon Fraser.

* Platform/spi/ios/AccessibilitySupportSPI.h:
* UIProcess/ios/WKKeyboardScrollingAnimator.mm:
(-[WKKeyboardScrollingAnimator invalidate]):
(perpendicularAbsoluteUnitVector):
(-[WKKeyboardScrollingAnimator beginWithEvent:]):
(-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
(-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
(-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
(-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]): Deleted.
(-[WKKeyboardScrollingAnimator stopRepeatTimer]): Deleted.
(-[WKKeyboardScrollingAnimator performDiscreteScroll]): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (243479 => 243480)


--- trunk/Source/WebKit/ChangeLog	2019-03-26 01:36:52 UTC (rev 243479)
+++ trunk/Source/WebKit/ChangeLog	2019-03-26 01:44:50 UTC (rev 243480)
@@ -1,3 +1,23 @@
+2019-03-25  Tim Horton  <[email protected]>
+
+        Get rid of ENABLE(ANIMATED_KEYBOARD_SCROLLING)
+        https://bugs.webkit.org/show_bug.cgi?id=196224
+
+        Reviewed by Simon Fraser.
+
+        * Platform/spi/ios/AccessibilitySupportSPI.h:
+        * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
+        (-[WKKeyboardScrollingAnimator invalidate]):
+        (perpendicularAbsoluteUnitVector):
+        (-[WKKeyboardScrollingAnimator beginWithEvent:]):
+        (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
+        (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
+        (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
+        (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
+        (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]): Deleted.
+        (-[WKKeyboardScrollingAnimator stopRepeatTimer]): Deleted.
+        (-[WKKeyboardScrollingAnimator performDiscreteScroll]): Deleted.
+
 2019-03-25  Fujii Hironori  <[email protected]>
 
         Enable IPC sending and receiving non-default-constructible types

Modified: trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h (243479 => 243480)


--- trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h	2019-03-26 01:36:52 UTC (rev 243479)
+++ trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h	2019-03-26 01:44:50 UTC (rev 243480)
@@ -40,7 +40,6 @@
 
 #if PLATFORM(IOS_FAMILY)
 extern Boolean _AXSKeyRepeatEnabled();
-extern CFTimeInterval _AXSKeyRepeatDelay();
 extern Boolean _AXSApplicationAccessibilityEnabled();
 extern CFStringRef kAXSApplicationAccessibilityEnabledNotification;
 #endif

Modified: trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm (243479 => 243480)


--- trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm	2019-03-26 01:36:52 UTC (rev 243479)
+++ trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm	2019-03-26 01:44:50 UTC (rev 243480)
@@ -106,10 +106,6 @@
     WebCore::FloatPoint _idealPosition;
     WebCore::FloatPoint _currentPosition;
     WebCore::FloatPoint _idealPositionForMinimumTravel;
-
-#if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)
-    RetainPtr<NSTimer> _repeatTimer;
-#endif
 }
 
 - (instancetype)init
@@ -137,9 +133,7 @@
 - (void)invalidate
 {
     [self stopAnimatedScroll];
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     [self stopDisplayLink];
-#endif
     _scrollable = nil;
 }
 
@@ -157,7 +151,6 @@
     }
 }
 
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
 static WebCore::FloatSize perpendicularAbsoluteUnitVector(WebKit::ScrollingDirection direction)
 {
     switch (direction) {
@@ -169,7 +162,6 @@
         return { 0, 1 };
     }
 }
-#endif
 
 static WebCore::PhysicalBoxSide boxSide(WebKit::ScrollingDirection direction)
 {
@@ -304,7 +296,6 @@
     _scrollTriggeringKeyIsPressed = YES;
     _currentScroll = scroll;
 
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     if (scroll->increment == WebKit::ScrollingIncrement::Document) {
         _velocity = { };
         [self stopAnimatedScroll];
@@ -318,10 +309,6 @@
     _currentPosition = WebCore::FloatPoint([_scrollable contentOffset]);
     _velocity += WebCore::FloatSize([_scrollable interactiveScrollVelocity]);
     _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset;
-#else
-    [self startRepeatTimerIfNeeded];
-    [self performDiscreteScroll];
-#endif
 
     return YES;
 }
@@ -376,10 +363,6 @@
     _idealPosition = [_scrollable boundedContentOffset:farthestPointInDirection(_currentPosition + displacement, _idealPositionForMinimumTravel, _currentScroll->direction)];
 
     _currentScroll = WTF::nullopt;
-
-#if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)
-    [self stopRepeatTimer];
-#endif
 }
 
 - (BOOL)scrollTriggeringKeyIsPressed
@@ -392,14 +375,9 @@
     // If the user touches the screen to start an interactive scroll, stop everything.
     _velocity = { };
     [self stopAnimatedScroll];
-
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     [self stopDisplayLink];
-#endif
 }
 
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
-
 - (void)startDisplayLinkIfNeeded
 {
     if (_displayLink)
@@ -470,34 +448,6 @@
     }
 }
 
-#else
-
-- (void)startRepeatTimerIfNeeded
-{
-    if (_repeatTimer)
-        return;
-
-    if (!_AXSKeyRepeatEnabled())
-        return;
-
-    _repeatTimer = [NSTimer scheduledTimerWithTimeInterval:_AXSKeyRepeatDelay() target:self selector:@selector(performDiscreteScroll) userInfo:nil repeats:YES];
-}
-
-- (void)stopRepeatTimer
-{
-    [_repeatTimer invalidate];
-    _repeatTimer = nil;
-}
-
-- (void)performDiscreteScroll
-{
-    _currentPosition = WebCore::FloatPoint([_scrollable contentOffset]);
-    _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset;
-    [_scrollable scrollToContentOffset:[_scrollable boundedContentOffset:_idealPositionForMinimumTravel] animated:YES];
-}
-
-#endif
-
 @end
 
 @interface WKKeyboardScrollViewAnimator () <WKKeyboardScrollableInternal>
@@ -616,9 +566,7 @@
     if (_delegateRespondsToWillScroll)
         [_delegate keyboardScrollViewAnimatorWillScroll:self];
     [scrollView setContentOffset:contentOffsetDelta animated:animated];
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES];
-#endif
 }
 
 - (void)scrollWithScrollToExtentAnimationTo:(CGPoint)offset
@@ -625,9 +573,7 @@
 {
     auto scrollView = _scrollView.getAutoreleased();
     [scrollView _setContentOffsetWithDecelerationAnimation:offset];
-#if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     [scrollView flashScrollIndicators];
-#endif
 }
 
 - (CGPoint)contentOffset
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to