Changeset 243480 in webkit
- Timestamp:
- Mar 25, 2019, 6:44:50 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Platform/spi/ios/AccessibilitySupportSPI.h (modified) (1 diff)
-
UIProcess/ios/WKKeyboardScrollingAnimator.mm (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243479 r243480 1 2019-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 1 21 2019-03-25 Fujii Hironori <Hironori.Fujii@sony.com> 2 22 -
trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h
r243034 r243480 41 41 #if PLATFORM(IOS_FAMILY) 42 42 extern Boolean _AXSKeyRepeatEnabled(); 43 extern CFTimeInterval _AXSKeyRepeatDelay();44 43 extern Boolean _AXSApplicationAccessibilityEnabled(); 45 44 extern CFStringRef kAXSApplicationAccessibilityEnabledNotification; -
trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm
r243454 r243480 107 107 WebCore::FloatPoint _currentPosition; 108 108 WebCore::FloatPoint _idealPositionForMinimumTravel; 109 110 #if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)111 RetainPtr<NSTimer> _repeatTimer;112 #endif113 109 } 114 110 … … 138 134 { 139 135 [self stopAnimatedScroll]; 140 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)141 136 [self stopDisplayLink]; 142 #endif143 137 _scrollable = nil; 144 138 } … … 158 152 } 159 153 160 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)161 154 static WebCore::FloatSize perpendicularAbsoluteUnitVector(WebKit::ScrollingDirection direction) 162 155 { … … 170 163 } 171 164 } 172 #endif173 165 174 166 static WebCore::PhysicalBoxSide boxSide(WebKit::ScrollingDirection direction) … … 305 297 _currentScroll = scroll; 306 298 307 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)308 299 if (scroll->increment == WebKit::ScrollingIncrement::Document) { 309 300 _velocity = { }; … … 319 310 _velocity += WebCore::FloatSize([_scrollable interactiveScrollVelocity]); 320 311 _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset; 321 #else322 [self startRepeatTimerIfNeeded];323 [self performDiscreteScroll];324 #endif325 312 326 313 return YES; … … 377 364 378 365 _currentScroll = WTF::nullopt; 379 380 #if !ENABLE(ANIMATED_KEYBOARD_SCROLLING)381 [self stopRepeatTimer];382 #endif383 366 } 384 367 … … 393 376 _velocity = { }; 394 377 [self stopAnimatedScroll]; 395 396 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)397 378 [self stopDisplayLink]; 398 #endif 399 } 400 401 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING) 379 } 402 380 403 381 - (void)startDisplayLinkIfNeeded … … 471 449 } 472 450 473 #else474 475 - (void)startRepeatTimerIfNeeded476 {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)stopRepeatTimer487 {488 [_repeatTimer invalidate];489 _repeatTimer = nil;490 }491 492 - (void)performDiscreteScroll493 {494 _currentPosition = WebCore::FloatPoint([_scrollable contentOffset]);495 _idealPositionForMinimumTravel = _currentPosition + _currentScroll->offset;496 [_scrollable scrollToContentOffset:[_scrollable boundedContentOffset:_idealPositionForMinimumTravel] animated:YES];497 }498 499 #endif500 501 451 @end 502 452 … … 617 567 [_delegate keyboardScrollViewAnimatorWillScroll:self]; 618 568 [scrollView setContentOffset:contentOffsetDelta animated:animated]; 619 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)620 569 [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES]; 621 #endif622 570 } 623 571 … … 626 574 auto scrollView = _scrollView.getAutoreleased(); 627 575 [scrollView _setContentOffsetWithDecelerationAnimation:offset]; 628 #if ENABLE(ANIMATED_KEYBOARD_SCROLLING)629 576 [scrollView flashScrollIndicators]; 630 #endif631 577 } 632 578
Note:
See TracChangeset
for help on using the changeset viewer.