WebKit Bugzilla
Attachment 370800 Details for
Bug 197942
: Horizontal scrollbar flashes after scrolling vertically with keyboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197942-20190528162000.patch (text/plain), 3.90 KB, created by
Tim Horton
on 2019-05-28 16:20:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-05-28 16:20:01 PDT
Size:
3.90 KB
patch
obsolete
>Subversion Revision: 245829 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index ef33bfe1ab49f48282d392aceaf614c5cdc9e31c..7b72d45ee902a3bb239345bed70cc4a238f9503a 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-28 Tim Horton <timothy_horton@apple.com> >+ >+ Horizontal scrollbar flashes after scrolling vertically with keyboard >+ https://bugs.webkit.org/show_bug.cgi?id=197942 >+ <rdar://problem/46169578> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/ios/WKKeyboardScrollingAnimator.mm: >+ (axesForDelta): >+ (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]): >+ Only flash relevant axes. >+ >+ * Platform/spi/ios/UIKitSPI.h: >+ > 2019-05-28 Brent Fulgham <bfulgham@apple.com> > > Remove dead code from sandboxes >diff --git a/Source/WebKit/Platform/spi/ios/UIKitSPI.h b/Source/WebKit/Platform/spi/ios/UIKitSPI.h >index fabe18a70ce9bd47853234c76aeec593e09ef092..c4c8105c83784d431553f27b72586d8825be79d5 100644 >--- a/Source/WebKit/Platform/spi/ios/UIKitSPI.h >+++ b/Source/WebKit/Platform/spi/ios/UIKitSPI.h >@@ -338,13 +338,20 @@ typedef NS_ENUM(NSInteger, UIScrollViewIndicatorInsetAdjustmentBehavior) { > UIScrollViewIndicatorInsetAdjustmentNever > }; > >+typedef enum { >+ UIAxisNeither = 0, >+ UIAxisHorizontal = 1 << 0, >+ UIAxisVertical = 1 << 1, >+ UIAxisBoth = (UIAxisHorizontal | UIAxisVertical), >+} UIAxis; >+ > @interface UIScrollView () > - (void)_stopScrollingAndZoomingAnimations; > - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration force:(BOOL)force; > - (void)_zoomToCenter:(CGPoint)center scale:(CGFloat)scale duration:(CFTimeInterval)duration; > - (double)_horizontalVelocity; > - (double)_verticalVelocity; >-- (void)_flashScrollIndicatorsPersistingPreviousFlashes; >+- (void)_flashScrollIndicatorsForAxes:(UIAxis)axes persistingPreviousFlashes:(BOOL)persisting; > @property (nonatomic, getter=isZoomEnabled) BOOL zoomEnabled; > @property (nonatomic, readonly, getter=_isAnimatingZoom) BOOL isAnimatingZoom; > @property (nonatomic, readonly, getter=_isAnimatingScroll) BOOL isAnimatingScroll; >diff --git a/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm b/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm >index 172810aec105ce944ad767d06b26289510c46961..c02909a81d025841712fadab3240fff411fe3b90 100644 >--- a/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm >+++ b/Source/WebKit/UIProcess/ios/WKKeyboardScrollingAnimator.mm >@@ -589,16 +589,28 @@ - (CGFloat)distanceForIncrement:(WebKit::ScrollingIncrement)increment inDirectio > return [_delegate keyboardScrollViewAnimator:self distanceForIncrement:increment inDirection:direction]; > } > >-- (void)scrollToContentOffset:(WebCore::FloatPoint)contentOffsetDelta animated:(BOOL)animated >+#if HAVE(UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI) >+static UIAxis axesForDelta(WebCore::FloatSize delta) >+{ >+ UIAxis axes = UIAxisNeither; >+ if (delta.width()) >+ axes = static_cast<UIAxis>(axes | UIAxisHorizontal); >+ if (delta.height()) >+ axes = static_cast<UIAxis>(axes | UIAxisVertical); >+ return axes; >+} >+#endif >+ >+- (void)scrollToContentOffset:(WebCore::FloatPoint)contentOffset animated:(BOOL)animated > { > auto scrollView = _scrollView.getAutoreleased(); > if (!scrollView) > return; > if (_delegateRespondsToWillScroll) > [_delegate keyboardScrollViewAnimatorWillScroll:self]; >- [scrollView setContentOffset:contentOffsetDelta animated:animated]; >+ [scrollView setContentOffset:contentOffset animated:animated]; > #if HAVE(UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI) >- [scrollView _flashScrollIndicatorsPersistingPreviousFlashes]; >+ [scrollView _flashScrollIndicatorsForAxes:axesForDelta(WebCore::FloatPoint(scrollView.contentOffset) - contentOffset) persistingPreviousFlashes:YES]; > #else > [scrollView _flashScrollIndicatorsPersistingPreviousFlashes:YES]; > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197942
:
370029
|
370038
|
370098
| 370800