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

Changeset 245832 in webkit


Ignore:
Timestamp:
May 28, 2019, 4:57:27 PM (7 years ago)
Author:
timothy_horton@apple.com
Message:

Horizontal scrollbar flashes after scrolling vertically with keyboard
https://bugs.webkit.org/show_bug.cgi?id=197942
<rdar://problem/46169578>

Reviewed by Dean Jackson.

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(axesForDelta):
(-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
Only flash relevant axes.

  • Platform/spi/ios/UIKitSPI.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245831 r245832  
     12019-05-28  Tim Horton  <timothy_horton@apple.com>
     2
     3        Horizontal scrollbar flashes after scrolling vertically with keyboard
     4        https://bugs.webkit.org/show_bug.cgi?id=197942
     5        <rdar://problem/46169578>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * UIProcess/ios/WKKeyboardScrollingAnimator.mm:
     10        (axesForDelta):
     11        (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]):
     12        Only flash relevant axes.
     13
     14        * Platform/spi/ios/UIKitSPI.h:
     15
    1162019-05-28  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r245144 r245832  
    339339};
    340340
     341typedef enum {
     342    UIAxisNeither = 0,
     343    UIAxisHorizontal = 1 << 0,
     344    UIAxisVertical = 1 << 1,
     345    UIAxisBoth = (UIAxisHorizontal | UIAxisVertical),
     346} UIAxis;
     347
    341348@interface UIScrollView ()
    342349- (void)_stopScrollingAndZoomingAnimations;
     
    345352- (double)_horizontalVelocity;
    346353- (double)_verticalVelocity;
    347 - (void)_flashScrollIndicatorsPersistingPreviousFlashes;
     354- (void)_flashScrollIndicatorsForAxes:(UIAxis)axes persistingPreviousFlashes:(BOOL)persisting;
    348355@property (nonatomic, getter=isZoomEnabled) BOOL zoomEnabled;
    349356@property (nonatomic, readonly, getter=_isAnimatingZoom) BOOL isAnimatingZoom;
  • trunk/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm

    r245285 r245832  
    590590}
    591591
    592 - (void)scrollToContentOffset:(WebCore::FloatPoint)contentOffsetDelta animated:(BOOL)animated
     592#if HAVE(UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI)
     593static UIAxis axesForDelta(WebCore::FloatSize delta)
     594{
     595    UIAxis axes = UIAxisNeither;
     596    if (delta.width())
     597        axes = static_cast<UIAxis>(axes | UIAxisHorizontal);
     598    if (delta.height())
     599        axes = static_cast<UIAxis>(axes | UIAxisVertical);
     600    return axes;
     601}
     602#endif
     603
     604- (void)scrollToContentOffset:(WebCore::FloatPoint)contentOffset animated:(BOOL)animated
    593605{
    594606    auto scrollView = _scrollView.getAutoreleased();
     
    597609    if (_delegateRespondsToWillScroll)
    598610        [_delegate keyboardScrollViewAnimatorWillScroll:self];
    599     [scrollView setContentOffset:contentOffsetDelta animated:animated];
     611    [scrollView setContentOffset:contentOffset animated:animated];
    600612#if HAVE(UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI)
    601     [scrollView _flashScrollIndicatorsPersistingPreviousFlashes];
     613    [scrollView _flashScrollIndicatorsForAxes:axesForDelta(WebCore::FloatPoint(scrollView.contentOffset) - contentOffset) persistingPreviousFlashes:YES];
    602614#else
    603615    [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES];
Note: See TracChangeset for help on using the changeset viewer.