WebKit Bugzilla
Attachment 371582 Details for
Bug 198656
: REGRESSION (r245006): Setting scrollview.scrollEnabled clobbers any scrollEnabled set by a client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
scrollenabled-clobber.patch (text/plain), 4.18 KB, created by
Antti Koivisto
on 2019-06-07 05:23:38 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-06-07 05:23:38 PDT
Size:
4.18 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 246195) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-06-07 Antti Koivisto <antti@apple.com> >+ >+ REGRESSION (r245006): Setting scrollview.scrollEnabled clobbers any scrollEnabled set by a client >+ https://bugs.webkit.org/show_bug.cgi?id=198656 >+ <rdar://problem/51494585> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Allow client to disable scrolling. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _didCommitLayerTree:]): >+ * UIProcess/ios/WKScrollView.h: >+ * UIProcess/ios/WKScrollView.mm: >+ (-[WKScrollView initWithFrame:]): >+ (-[WKScrollView setScrollEnabled:]): >+ (-[WKScrollView _setScrollEnabledInternal:]): >+ (-[WKScrollView _updateScrollability]): >+ > 2019-06-06 Carlos Garcia Campos <cgarcia@igalia.com> > > REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 246186) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -1990,7 +1990,7 @@ - (void)_didCommitLayerTree:(const WebKi > #if ENABLE(ASYNC_SCROLLING) > bool hasDockedInputView = !CGRectIsEmpty(_inputViewBounds); > bool isZoomed = layerTreeTransaction.pageScaleFactor() > layerTreeTransaction.initialScaleFactor(); >- [_scrollView setScrollEnabled:_page->scrollingCoordinatorProxy()->hasScrollableMainFrame() || hasDockedInputView || isZoomed]; >+ [_scrollView _setScrollEnabledInternal:_page->scrollingCoordinatorProxy()->hasScrollableMainFrame() || hasDockedInputView || isZoomed]; > #endif > if (!layerTreeTransaction.scaleWasSetByUIProcess() && ![_scrollView isZooming] && ![_scrollView isZoomBouncing] && ![_scrollView _isAnimatingZoom] && [_scrollView zoomScale] != layerTreeTransaction.pageScaleFactor()) { > LOG_WITH_STREAM(VisibleRects, stream << " updating scroll view with pageScaleFactor " << layerTreeTransaction.pageScaleFactor()); >Index: Source/WebKit/UIProcess/ios/WKScrollView.h >=================================================================== >--- Source/WebKit/UIProcess/ios/WKScrollView.h (revision 246186) >+++ Source/WebKit/UIProcess/ios/WKScrollView.h (working copy) >@@ -34,6 +34,7 @@ > @property (nonatomic, assign) WKWebView <UIScrollViewDelegate> *internalDelegate; > > - (void)_setContentSizePreservingContentOffsetDuringRubberband:(CGSize)contentSize; >+- (void)_setScrollEnabledInternal:(BOOL)enabled; > > #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 > @property (nonatomic, assign, readonly) BOOL _contentInsetAdjustmentBehaviorWasExternallyOverridden; >Index: Source/WebKit/UIProcess/ios/WKScrollView.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WKScrollView.mm (revision 246186) >+++ Source/WebKit/UIProcess/ios/WKScrollView.mm (working copy) >@@ -130,6 +130,8 @@ - (id)forwardingTargetForSelector:(SEL)a > BOOL _contentInsetAdjustmentBehaviorWasExternallyOverridden; > #endif > CGFloat _keyboardBottomInsetAdjustment; >+ BOOL _scrollEnabledByClient; >+ BOOL _scrollEnabledInternal; > } > > - (id)initWithFrame:(CGRect)frame >@@ -139,6 +141,9 @@ - (id)initWithFrame:(CGRect)frame > if (!self) > return nil; > >+ _scrollEnabledByClient = YES; >+ _scrollEnabledInternal = YES; >+ > self.alwaysBounceVertical = YES; > self.directionalLockEnabled = YES; > [self _setIndicatorInsetAdjustmentBehavior:UIScrollViewIndicatorInsetAdjustmentAlways]; >@@ -354,6 +359,23 @@ - (UIEdgeInsets)_systemContentInset > return systemContentInset; > } > >+- (void)setScrollEnabled:(BOOL)value >+{ >+ _scrollEnabledByClient = value; >+ [self _updateScrollability]; >+} >+ >+- (void)_setScrollEnabledInternal:(BOOL)value >+{ >+ _scrollEnabledInternal = value; >+ [self _updateScrollability]; >+} >+ >+- (void)_updateScrollability >+{ >+ [super setScrollEnabled:(_scrollEnabledByClient && _scrollEnabledInternal)]; >+} >+ > #if PLATFORM(WATCHOS) > > - (void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
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
Flags:
fred.wang
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198656
:
371582
|
371604