Changeset 243543 in webkit
- Timestamp:
- Mar 27, 2019, 8:46:26 AM (7 years ago)
- Location:
- tags/Safari-608.1.13.2/Source/WebKit
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
-
UIProcess/ios/WKKeyboardScrollingAnimator.h (modified) (1 diff)
-
UIProcess/ios/WKKeyboardScrollingAnimator.mm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-608.1.13.2/Source/WebKit/ChangeLog
r243399 r243543 1 2019-03-27 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r243454. rdar://problem/48702444 4 5 Animated keyboard scrolling is extremely chaotic 6 https://bugs.webkit.org/show_bug.cgi?id=196164 7 <rdar://problem/48702444> 8 9 Reviewed by Simon Fraser. 10 11 * UIProcess/ios/WKContentViewInteraction.mm: 12 (-[WKContentView _interpretKeyEvent:isCharEvent:]): 13 Consume keyboard events instead of interpreting them traditionally 14 if WKKeyboardScrollingAnimator is animating. 15 16 * UIProcess/ios/WKKeyboardScrollingAnimator.h: 17 * UIProcess/ios/WKKeyboardScrollingAnimator.mm: 18 (-[WKKeyboardScrollingAnimator beginWithEvent:]): 19 (-[WKKeyboardScrollingAnimator handleKeyEvent:]): 20 (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): 21 (-[WKKeyboardScrollingAnimator scrollTriggeringKeyIsPressed]): 22 (-[WKKeyboardScrollingAnimator displayLinkFired:]): 23 (-[WKKeyboardScrollViewAnimator scrollTriggeringKeyIsPressed]): 24 Expose the current state of interactive scrolling, and rename the related member. 25 26 27 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243454 268f45cc-cd09-0410-ab3c-d52691b4dbfc 28 29 2019-03-25 Tim Horton <timothy_horton@apple.com> 30 31 Animated keyboard scrolling is extremely chaotic 32 https://bugs.webkit.org/show_bug.cgi?id=196164 33 <rdar://problem/48702444> 34 35 Reviewed by Simon Fraser. 36 37 * UIProcess/ios/WKContentViewInteraction.mm: 38 (-[WKContentView _interpretKeyEvent:isCharEvent:]): 39 Consume keyboard events instead of interpreting them traditionally 40 if WKKeyboardScrollingAnimator is animating. 41 42 * UIProcess/ios/WKKeyboardScrollingAnimator.h: 43 * UIProcess/ios/WKKeyboardScrollingAnimator.mm: 44 (-[WKKeyboardScrollingAnimator beginWithEvent:]): 45 (-[WKKeyboardScrollingAnimator handleKeyEvent:]): 46 (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): 47 (-[WKKeyboardScrollingAnimator scrollTriggeringKeyIsPressed]): 48 (-[WKKeyboardScrollingAnimator displayLinkFired:]): 49 (-[WKKeyboardScrollViewAnimator scrollTriggeringKeyIsPressed]): 50 Expose the current state of interactive scrolling, and rename the related member. 51 1 52 2019-03-22 Alan Coon <alancoon@apple.com> 2 53 -
tags/Safari-608.1.13.2/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r243370 r243543 4450 4450 return NO; 4451 4451 4452 if ([_keyboardScrollingAnimator beginWithEvent:event] )4452 if ([_keyboardScrollingAnimator beginWithEvent:event] || [_keyboardScrollingAnimator scrollTriggeringKeyIsPressed]) 4453 4453 return YES; 4454 4454 -
tags/Safari-608.1.13.2/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.h
r242695 r243543 63 63 - (void)handleKeyEvent:(::WebEvent *)event; 64 64 65 - (BOOL)scrollTriggeringKeyIsPressed; 66 65 67 @property (nonatomic, weak) id <WKKeyboardScrollViewAnimatorDelegate> delegate; 66 68 -
tags/Safari-608.1.13.2/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm
r242695 r243543 100 100 Optional<WebKit::KeyboardScroll> _currentScroll; 101 101 102 BOOL _ hasPressedScrollingKey;102 BOOL _scrollTriggeringKeyIsPressed; 103 103 104 104 WebCore::FloatSize _velocity; // Points per second. … … 296 296 return NO; 297 297 298 if (_ hasPressedScrollingKey)298 if (_scrollTriggeringKeyIsPressed) 299 299 return NO; 300 300 … … 302 302 return NO; 303 303 304 _ hasPressedScrollingKey= YES;304 _scrollTriggeringKeyIsPressed = YES; 305 305 _currentScroll = scroll; 306 306 … … 329 329 - (void)handleKeyEvent:(::WebEvent *)event 330 330 { 331 if (!_ hasPressedScrollingKey)331 if (!_scrollTriggeringKeyIsPressed) 332 332 return; 333 333 … … 335 335 if (!scroll || event.type == WebEventKeyUp) { 336 336 [self stopAnimatedScroll]; 337 _ hasPressedScrollingKey= NO;337 _scrollTriggeringKeyIsPressed = NO; 338 338 } 339 339 } … … 381 381 [self stopRepeatTimer]; 382 382 #endif 383 } 384 385 - (BOOL)scrollTriggeringKeyIsPressed 386 { 387 return _scrollTriggeringKeyIsPressed; 383 388 } 384 389 … … 459 464 // If we've effectively stopped scrolling, and no key is pressed, 460 465 // shut down the display link. 461 if (!_ hasPressedScrollingKey&& _velocity.diagonalLengthSquared() < 1) {466 if (!_scrollTriggeringKeyIsPressed && _velocity.diagonalLengthSquared() < 1) { 462 467 [_scrollable didFinishScrolling]; 463 468 [self stopDisplayLink]; … … 563 568 { 564 569 return [_animator handleKeyEvent:event]; 570 } 571 572 - (BOOL)scrollTriggeringKeyIsPressed 573 { 574 return [_animator scrollTriggeringKeyIsPressed]; 565 575 } 566 576
Note:
See TracChangeset
for help on using the changeset viewer.