Changeset 243454 in webkit
- Timestamp:
- Mar 25, 2019, 1:55:33 PM (7 years ago)
- Location:
- trunk/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
-
trunk/Source/WebKit/ChangeLog
r243453 r243454 1 2019-03-25 Tim Horton <timothy_horton@apple.com> 2 3 Animated keyboard scrolling is extremely chaotic 4 https://bugs.webkit.org/show_bug.cgi?id=196164 5 <rdar://problem/48702444> 6 7 Reviewed by Simon Fraser. 8 9 * UIProcess/ios/WKContentViewInteraction.mm: 10 (-[WKContentView _interpretKeyEvent:isCharEvent:]): 11 Consume keyboard events instead of interpreting them traditionally 12 if WKKeyboardScrollingAnimator is animating. 13 14 * UIProcess/ios/WKKeyboardScrollingAnimator.h: 15 * UIProcess/ios/WKKeyboardScrollingAnimator.mm: 16 (-[WKKeyboardScrollingAnimator beginWithEvent:]): 17 (-[WKKeyboardScrollingAnimator handleKeyEvent:]): 18 (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): 19 (-[WKKeyboardScrollingAnimator scrollTriggeringKeyIsPressed]): 20 (-[WKKeyboardScrollingAnimator displayLinkFired:]): 21 (-[WKKeyboardScrollViewAnimator scrollTriggeringKeyIsPressed]): 22 Expose the current state of interactive scrolling, and rename the related member. 23 1 24 2019-03-25 Keith Rollin <krollin@apple.com> 2 25 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r243370 r243454 4450 4450 return NO; 4451 4451 4452 if ([_keyboardScrollingAnimator beginWithEvent:event] )4452 if ([_keyboardScrollingAnimator beginWithEvent:event] || [_keyboardScrollingAnimator scrollTriggeringKeyIsPressed]) 4453 4453 return YES; 4454 4454 -
trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.h
r242695 r243454 63 63 - (void)handleKeyEvent:(::WebEvent *)event; 64 64 65 - (BOOL)scrollTriggeringKeyIsPressed; 66 65 67 @property (nonatomic, weak) id <WKKeyboardScrollViewAnimatorDelegate> delegate; 66 68 -
trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm
r242695 r243454 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.