WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 209134
Add support for scrollend event of programmatic scroll
https://bugs.webkit.org/show_bug.cgi?id=209134
Summary
Add support for scrollend event of programmatic scroll
cathiechen
Reported
2020-03-16 01:49:59 PDT
The programmatic scroll would fire scrollend events.
Attachments
scrollend-programmatic-for-ews
(94.13 KB, patch)
2020-03-17 05:26 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(30.11 KB, patch)
2020-03-17 05:27 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(94.13 KB, patch)
2020-03-17 05:49 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(94.34 KB, patch)
2020-03-17 06:22 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(140.45 KB, patch)
2020-04-08 06:32 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(57.59 KB, patch)
2020-04-08 06:32 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(140.48 KB, patch)
2020-04-08 06:47 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(57.62 KB, patch)
2020-04-08 06:47 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(140.68 KB, patch)
2020-04-08 07:13 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(57.42 KB, patch)
2020-04-08 07:13 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(142.82 KB, patch)
2020-04-09 05:25 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(59.56 KB, patch)
2020-04-09 05:25 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(142.59 KB, patch)
2020-04-09 06:14 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(59.47 KB, patch)
2020-04-09 06:15 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(116.86 KB, patch)
2020-04-10 00:24 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(51.24 KB, patch)
2020-04-10 00:24 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(51.25 KB, patch)
2020-04-10 00:41 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-ews
(112.39 KB, patch)
2020-05-15 02:18 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
scrollend-programmatic-for-review
(46.67 KB, patch)
2020-05-15 02:19 PDT
,
cathiechen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(17)
View All
Add attachment
proposed patch, testcase, etc.
cathiechen
Comment 1
2020-03-17 05:26:34 PDT
Created
attachment 393744
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 2
2020-03-17 05:27:06 PDT
Created
attachment 393745
[details]
scrollend-programmatic-for-review
cathiechen
Comment 3
2020-03-17 05:49:12 PDT
Created
attachment 393746
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 4
2020-03-17 06:22:31 PDT
Created
attachment 393747
[details]
scrollend-programmatic-for-ews
Frédéric Wang (:fredw)
Comment 5
2020-03-19 08:01:05 PDT
Comment on
attachment 393745
[details]
scrollend-programmatic-for-review View in context:
https://bugs.webkit.org/attachment.cgi?id=393745&action=review
> Source/WebCore/dom/Document.cpp:804 > + m_pendingScrollendEventTargetList = nullptr;
Should everything in this patch be "ScrollEnd"? Did you check what we do for other events?
> Source/WebCore/page/FrameView.cpp:2286 > +void FrameView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, bool animated, bool saveScrollendPosition)
I believe Simon complained in the past about "boolean trap". I wonder whether we want enums here?
> Source/WebCore/platform/ScrollView.cpp:543 > + if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && newScrollPosition == this->scrollPosition()) {
this line is very long, maybe consider
https://webkit.org/code-style-guidelines/#indentation-wrap-bool-op
?
> Source/WebCore/platform/ScrollView.cpp:-534 > - scrollAnimator().cancelAnimations();
Can you explain this behavior change? It seems you move it above where the if is no longer done.
> Source/WebCore/rendering/RenderLayer.cpp:2848 > + bool autoscrollNotInProgress = !renderer().frame().eventHandler().autoscrollInProgress();
It seems the autscrollstatus change can be done in a separate preliminary patch?
cathiechen
Comment 6
2020-04-08 06:32:03 PDT
Created
attachment 395799
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 7
2020-04-08 06:32:43 PDT
Created
attachment 395800
[details]
scrollend-programmatic-for-review
cathiechen
Comment 8
2020-04-08 06:47:27 PDT
Created
attachment 395801
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 9
2020-04-08 06:47:51 PDT
Created
attachment 395802
[details]
scrollend-programmatic-for-review
cathiechen
Comment 10
2020-04-08 07:13:13 PDT
Created
attachment 395805
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 11
2020-04-08 07:13:36 PDT
Created
attachment 395806
[details]
scrollend-programmatic-for-review
cathiechen
Comment 12
2020-04-08 08:58:18 PDT
Hi Fred, Thanks for the review:)
> > > Source/WebCore/dom/Document.cpp:804 > > + m_pendingScrollendEventTargetList = nullptr; > > Should everything in this patch be "ScrollEnd"? Did you check what we do for > other events? >
Done.
> > Source/WebCore/page/FrameView.cpp:2286 > > +void FrameView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, bool animated, bool saveScrollendPosition) > > I believe Simon complained in the past about "boolean trap". I wonder > whether we want enums here? >
Done.
> > Source/WebCore/platform/ScrollView.cpp:543 > > + if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && newScrollPosition == this->scrollPosition()) { > > this line is very long, maybe consider >
https://webkit.org/code-style-guidelines/#indentation-wrap-bool-op
? >
Done.
> > Source/WebCore/platform/ScrollView.cpp:-534 > > - scrollAnimator().cancelAnimations(); > > Can you explain this behavior change? It seems you move it above where the > if is no longer done. >
We should cancel the animation before return. There's a tiny chance that animation doesn't stop. Moved this change to
https://bugs.webkit.org/show_bug.cgi?id=210171
.
> > Source/WebCore/rendering/RenderLayer.cpp:2848 > > + bool autoscrollNotInProgress = !renderer().frame().eventHandler().autoscrollInProgress(); > > It seems the autscrollstatus change can be done in a separate preliminary > patch?
Done, I move this change to
https://bugs.webkit.org/show_bug.cgi?id=210171
cathiechen
Comment 13
2020-04-09 05:25:27 PDT
Created
attachment 395939
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 14
2020-04-09 05:25:54 PDT
Created
attachment 395940
[details]
scrollend-programmatic-for-review
cathiechen
Comment 15
2020-04-09 06:14:54 PDT
Created
attachment 395943
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 16
2020-04-09 06:15:20 PDT
Created
attachment 395944
[details]
scrollend-programmatic-for-review
cathiechen
Comment 17
2020-04-09 07:42:10 PDT
Comment on
attachment 395944
[details]
scrollend-programmatic-for-review Hi, The patch is ready to review\o/ Thanks:) This is based on the parsing patch(208802) and code style fix up for scroll animated patch(
bug 210171
).
cathiechen
Comment 18
2020-04-10 00:24:12 PDT
Created
attachment 396058
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 19
2020-04-10 00:24:41 PDT
Created
attachment 396059
[details]
scrollend-programmatic-for-review
cathiechen
Comment 20
2020-04-10 00:41:44 PDT
Created
attachment 396062
[details]
scrollend-programmatic-for-review
cathiechen
Comment 21
2020-04-10 06:35:38 PDT
Comment on
attachment 396062
[details]
scrollend-programmatic-for-review Hi, Rebase the code. After commit the code style fix up patch and test import patch, now this patch is only based on the parsing patch(
bug 208802
). I wonder if I can commit the parsing patch now?
cathiechen
Comment 22
2020-05-15 02:18:33 PDT
Created
attachment 399465
[details]
scrollend-programmatic-for-ews
cathiechen
Comment 23
2020-05-15 02:19:10 PDT
Created
attachment 399466
[details]
scrollend-programmatic-for-review
mic.gallego
Comment 24
2022-09-24 05:04:54 PDT
Chrome has shipped the new "scrollend" event as an experimental feature. Are there plans to enable this feature to Safari as well?
Simon Fraser (smfr)
Comment 25
2022-09-24 10:49:21 PDT
Is there a spec for this new event?
mic.gallego
Comment 26
2022-09-24 19:03:08 PDT
(In reply to Simon Fraser (smfr) from
comment #25
)
> Is there a spec for this new event?
Yes, here you are:
https://wicg.github.io/overscroll-scrollend-events/
Chrome has shipped it behind experimental flag (for now, I think they only implemented the scrollend event).
Šime Vidas
Comment 27
2023-06-10 09:03:50 PDT
The scrollend event shipped in Chrome 114 last month. Simple test page (the page will turn yellow after the scroll):
https://output.jsbin.com/ludiban/quiet
The event seems to now be defined in the CSSOM View spec:
https://drafts.csswg.org/cssom-view/#eventdef-document-scrollend
Ernst
Comment 28
2023-07-31 08:45:44 PDT
Firefox also shipped 'scrollend'. Please also enable it in Safari on both iOS and macOS. Would make some components much easier than with debouncing and heuristics to detect scroll end. Thanks.
Rado
Comment 29
2023-12-04 07:15:40 PST
Please implement the 'scrollend' event, because we must use a polyfill for Safari only. Thanks!
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