Scroll event should happen during Page::updateRendering.
<rdar://problem/56890922>
Created attachment 382889 [details] WIP
Created attachment 382891 [details] WIP2
Created attachment 382897 [details] WIP3
Created attachment 382982 [details] Patch
Ping reviewers.
Comment on attachment 382982 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382982&action=review > Source/WebCore/dom/Document.cpp:4018 > + m_needsVisualViewportScrollEvent = true; > + scheduleTimedRenderingUpdate(); Can this avoid calling scheduleTimedRenderingUpdate if m_needsVisualViewportScrollEvent is already true? > Source/WebCore/dom/Document.cpp:4041 > + window->visualViewport().dispatchEvent(Event::create(eventNames().scrollEvent, Event::CanBubble::No, Event::IsCancelable::No)); Is window->visualViewport() always non-null?
(In reply to Simon Fraser (smfr) from comment #7) > Comment on attachment 382982 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=382982&action=review > > > Source/WebCore/dom/Document.cpp:4018 > > + m_needsVisualViewportScrollEvent = true; > > + scheduleTimedRenderingUpdate(); > > Can this avoid calling scheduleTimedRenderingUpdate if > m_needsVisualViewportScrollEvent is already true? Done. > > Source/WebCore/dom/Document.cpp:4041 > > + window->visualViewport().dispatchEvent(Event::create(eventNames().scrollEvent, Event::CanBubble::No, Event::IsCancelable::No)); > > Is window->visualViewport() always non-null? Yes. We also never reach here unless VisualViewport::update is called.
Committed r252205: <https://trac.webkit.org/changeset/252205>
(In reply to Ryosuke Niwa from comment #9) > Committed r252205: <https://trac.webkit.org/changeset/252205> One of the added test fast/events/scroll-subframe-in-rendering-update.html is failing consistently on iOS, and slowing down ios-wk2 queue. Tracked in bug 204045.