Changeset 268499 in webkit
- Timestamp:
- Oct 14, 2020 4:55:58 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r268497 r268499 1 2020-10-14 Simon Fraser <simon.fraser@apple.com> 2 3 Scrolls in the passive handler region should be reported as handled promptly 4 https://bugs.webkit.org/show_bug.cgi?id=217718 5 6 Reviewed by Tim Horton. 7 8 The UI process will enqueue wheel events to send later if the WebContent process doesn't 9 promptly respond that it has handled the previous event. When scrolling in the passive 10 event region, we want the WebContent process to appear responsive, so respond to the UI 11 process when we've scrolled (which is before the event has been dispatched for DOM events). 12 13 Hard to test because CPU-constrained bots don't send wheel events in a predictable way. 14 15 * WebProcess/WebPage/EventDispatcher.cpp: 16 (WebKit::EventDispatcher::wheelEvent): 17 * WebProcess/WebPage/WebPage.cpp: 18 (WebKit::WebPage::wheelEvent): 19 1 20 2020-10-14 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp
r268417 r268499 149 149 if (result.needsMainThreadProcessing()) { 150 150 protectedThis->dispatchWheelEventViaMainThread(pageID, wheelEvent, result.steps); 151 return; 151 if (result.steps.contains(WheelEventProcessingSteps::MainThreadForScrolling)) 152 return; 152 153 } 153 154 155 // If we scrolled on the scrolling thread (even if we send the event to the main thread for passive event handlers) 156 // respond to the UI process that the event was handled. 154 157 protectedThis->sendDidReceiveEvent(pageID, wheelEvent.type(), result.wasHandled); 155 158 }); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r268492 r268499 2871 2871 bool handled = handleWheelEvent(wheelEvent, m_page.get(), processingSteps); 2872 2872 2873 send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(wheelEvent.type()), handled)); 2873 if (processingSteps.contains(WheelEventProcessingSteps::MainThreadForScrolling)) 2874 send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(wheelEvent.type()), handled)); 2874 2875 } 2875 2876
Note: See TracChangeset
for help on using the changeset viewer.