⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243480 in webkit


Ignore:
Timestamp:
Mar 25, 2019, 6:44:50 PM (7 years ago)
Author:
timothy_horton@apple.com
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.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243479 r243480  
     12019-03-25  Tim Horton  <timothy_horton@apple.com>
     2
     3        Get rid of ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     4        https://bugs.webkit.org/show_bug.cgi?id=196224
     5
     6        Reviewed by Simon Fraser.
     7
     8        * Platform/spi/ios/AccessibilitySupportSPI.h:
     9        * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
     10        (-[WKKeyboardScrollingAnimator invalidate]):
     11        (perpendicularAbsoluteUnitVector):
     12        (-[WKKeyboardScrollingAnimator beginWithEvent:]):
     13        (-[WKKeyboardScrollingAnimator stopAnimatedScroll]):
     14        (-[WKKeyboardScrollingAnimator willStartInteractiveScroll]):
     15        (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
     16        (-[WKKeyboardScrollViewAnimator scrollWithScrollToExtentAnimationTo:]):
     17        (-[WKKeyboardScrollingAnimator startRepeatTimerIfNeeded]): Deleted.
     18        (-[WKKeyboardScrollingAnimator stopRepeatTimer]): Deleted.
     19        (-[WKKeyboardScrollingAnimator performDiscreteScroll]): Deleted.
     20
    1212019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
    222
  • trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h

    r243034 r243480  
    4141#if PLATFORM(IOS_FAMILY)
    4242extern Boolean _AXSKeyRepeatEnabled();
    43 extern CFTimeInterval _AXSKeyRepeatDelay();
    4443extern Boolean _AXSApplicationAccessibilityEnabled();
    4544extern CFStringRef kAXSApplicationAccessibilityEnabledNotification;
  • trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm

    r243454 r243480  
    107107    WebCore::FloatPoint _currentPosition;
    108108    WebCore::FloatPoint _idealPositionForMinimumTravel;
    109 
    110 #if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    111     RetainPtr<NSTimer> _repeatTimer;
    112 #endif
    113109}
    114110
     
    138134{
    139135    [self stopAnimatedScroll];
    140 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    141136    [self stopDisplayLink];
    142 #endif
    143137    _scrollable = nil;
    144138}
     
    158152}
    159153
    160 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    161154static WebCore::FloatSize perpendicularAbsoluteUnitVector(WebKit::ScrollingDirection direction)
    162155{
     
    170163    }
    171164}
    172 #endif
    173165
    174166static WebCore::PhysicalBoxSide boxSide(WebKit::ScrollingDirection direction)
     
    305297    _currentScroll = scroll;
    306298
    307 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    308299    if (scroll->increment == WebKit::ScrollingIncrement::Document) {
    309300        _velocity = { };
     
    319310    _velocity += WebCore::FloatSize([_scrollable interactiveScrollVelocity]);
    320311    _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset;
    321 #else
    322     [self startRepeatTimerIfNeeded];
    323     [self performDiscreteScroll];
    324 #endif
    325312
    326313    return YES;
     
    377364
    378365    _currentScroll = WTF::nullopt;
    379 
    380 #if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    381     [self stopRepeatTimer];
    382 #endif
    383366}
    384367
     
    393376    _velocity = { };
    394377    [self stopAnimatedScroll];
    395 
    396 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    397378    [self stopDisplayLink];
    398 #endif
    399 }
    400 
    401 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
     379}
    402380
    403381- (void)startDisplayLinkIfNeeded
     
    471449}
    472450
    473 #else
    474 
    475 - (void)startRepeatTimerIfNeeded
    476 {
    477     if (_repeatTimer)
    478         return;
    479 
    480     if (!_AXSKeyRepeatEnabled())
    481         return;
    482 
    483     _repeatTimer = [NSTimer scheduledTimerWithTimeInterval:_AXSKeyRepeatDelay() target:self selector:@selector(performDiscreteScroll) userInfo:nil repeats:YES];
    484 }
    485 
    486 - (void)stopRepeatTimer
    487 {
    488     [_repeatTimer invalidate];
    489     _repeatTimer = nil;
    490 }
    491 
    492 - (void)performDiscreteScroll
    493 {
    494     _currentPosition = WebCore::FloatPoint([_scrollable contentOffset]);
    495     _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset;
    496     [_scrollable scrollToContentOffset:[_scrollable boundedContentOffset:_idealPositionForMinimumTravel] animated:YES];
    497 }
    498 
    499 #endif
    500 
    501451@end
    502452
     
    617567        [_delegate keyboardScrollViewAnimatorWillScroll:self];
    618568    [scrollView setContentOffset:contentOffsetDelta animated:animated];
    619 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    620569    [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES];
    621 #endif
    622570}
    623571
     
    626574    auto scrollView = _scrollView.getAutoreleased();
    627575    [scrollView _setContentOffsetWithDecelerationAnimation:offset];
    628 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)
    629576    [scrollView flashScrollIndicators];
    630 #endif
    631577}
    632578
Note: See TracChangeset for help on using the changeset viewer.