WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237696
[iOS] Fix overscroll-behavior for main document
https://bugs.webkit.org/show_bug.cgi?id=237696
Summary
[iOS] Fix overscroll-behavior for main document
Nikos Mouchtaris
Reported
2022-03-09 19:22:04 PST
Make overscroll-behavior on html element work for iOS.
Attachments
Patch
(6.77 KB, patch)
2022-03-09 19:38 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(12.35 KB, patch)
2022-03-10 17:53 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(13.47 KB, patch)
2022-03-10 19:30 PST
,
Nikos Mouchtaris
simon.fraser
: review+
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
Patch
(14.72 KB, patch)
2022-03-10 20:47 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(15.28 KB, patch)
2022-03-11 11:52 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(15.39 KB, patch)
2022-03-11 12:10 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Nikos Mouchtaris
Comment 1
2022-03-09 19:22:45 PST
rdar://89501965
Nikos Mouchtaris
Comment 2
2022-03-09 19:38:42 PST
Created
attachment 454309
[details]
Patch
Nikos Mouchtaris
Comment 3
2022-03-10 17:53:07 PST
Created
attachment 454432
[details]
Patch
Nikos Mouchtaris
Comment 4
2022-03-10 19:30:25 PST
Created
attachment 454437
[details]
Patch
Simon Fraser (smfr)
Comment 5
2022-03-10 19:45:04 PST
Comment on
attachment 454437
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=454437&action=review
> Source/WebKit/ChangeLog:10 > + UIScrollView should rubber band or not. Need to investigate adding a test for this, > + as this doesn't require the new UIKit SPI.
The comment about testing is no longer relevant.
> Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:232 > +#if HAVE(UIKIT_OVERSCROLL_BEHAVIOR_SUPPORT) > + scrollView._allowsParentToBeginHorizontally = horizontalOverscrollBehavior == OverscrollBehavior::Auto; > + scrollView._allowsParentToBeginVertically = verticalOverscrollBehavior == OverscrollBehavior::Auto; > +#endif
I don't think we want to set this on the root scroll view. That would allow web content to prevent scroll gestures in the web view from propagating to some ancestor scroller.
Nikos Mouchtaris
Comment 6
2022-03-10 20:47:34 PST
Created
attachment 454442
[details]
Patch
Simon Fraser (smfr)
Comment 7
2022-03-11 09:38:13 PST
Comment on
attachment 454442
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=454442&action=review
> Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:86 > + static void updateScrollViewForOverscrollBehavior(UIScrollView *, const WebCore::OverscrollBehavior, const WebCore::OverscrollBehavior, bool);
We try to avoid bool function parameters where it's hard to know at the call site what it means (this is called "the boolean trap"). You make it harder here by not naming the parameters in the header. Possible solution are to use an enum, like enum class AllowScrollPropagation : bool { No, Yes }; or two functions.
Nikos Mouchtaris
Comment 8
2022-03-11 11:52:21 PST
Created
attachment 454501
[details]
Patch
Simon Fraser (smfr)
Comment 9
2022-03-11 12:00:31 PST
Comment on
attachment 454501
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=454501&action=review
> Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:229 > + if (allowPropogation == AllowScrollPropagation::No) {
Isn't this backwards? Or maybe it's confusing that the enum is called "AllowScrollPropagation" (bad suggestion on my part). I was thinking more like "AllowOverscrollToPreventScrollPropagation"
Nikos Mouchtaris
Comment 10
2022-03-11 12:10:35 PST
Created
attachment 454504
[details]
Patch
Nikos Mouchtaris
Comment 11
2022-03-11 12:12:13 PST
(In reply to Simon Fraser (smfr) from
comment #9
)
> Comment on
attachment 454501
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=454501&action=review
> > > Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:229 > > + if (allowPropogation == AllowScrollPropagation::No) { > > Isn't this backwards? > > Or maybe it's confusing that the enum is called "AllowScrollPropagation" > (bad suggestion on my part). I was thinking more like > "AllowOverscrollToPreventScrollPropagation"
Ah I had interpreted AllowScrollPropagation::No to mean we were disabling scroll propagation. I updated to AllowOverscrollToPreventScrollPropagation as its a bit more clear.
EWS
Comment 12
2022-03-11 15:44:01 PST
Committed
r291198
(
248353@main
): <
https://commits.webkit.org/248353@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 454504
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug