Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1690)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Creating CoalescedWebInputEvent Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index bc2e404e7a9fe61a87eef3bcea5315f49c4674a2..04c272bd0e5f129381043c5157c3b57c4a8f5b69 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -970,7 +970,7 @@ WebInputEventResult WebViewImpl::handleSyntheticWheelFromTouchpadPinchEvent(
wheelEvent.wheelTicksX = 0;
wheelEvent.wheelTicksY = pinchEvent.data.pinchUpdate.scale > 1 ? 1 : -1;
- return handleInputEvent(wheelEvent);
+ return handleInputEvent(CoalescedWebInputEvent(wheelEvent));
}
void WebViewImpl::transferActiveWheelFlingAnimation(
@@ -2117,7 +2117,8 @@ bool WebViewImpl::hasVerticalScrollbar() {
const WebInputEvent* WebViewImpl::m_currentInputEvent = nullptr;
WebInputEventResult WebViewImpl::handleInputEvent(
- const WebInputEvent& inputEvent) {
+ const CoalescedWebInputEvent& coalescedEvent) {
+ const WebInputEvent& inputEvent = coalescedEvent.event();
// TODO(dcheng): The fact that this is getting called when there is no local
// main frame is problematic and probably indicates a bug in the input event
// routing code.
@@ -2151,7 +2152,7 @@ WebInputEventResult WebViewImpl::handleInputEvent(
return WebInputEventResult::HandledSuppressed;
if (InspectorOverlay* overlay = inspectorOverlay()) {
- if (overlay->handleInputEvent(inputEvent))
+ if (overlay->handleInputEvent(coalescedEvent))
return WebInputEventResult::HandledSuppressed;
}
@@ -2220,7 +2221,7 @@ WebInputEventResult WebViewImpl::handleInputEvent(
// FIXME: This should take in the intended frame, not the local frame root.
WebInputEventResult result = PageWidgetDelegate::handleInputEvent(
- *this, inputEvent, mainFrameImpl()->frame());
+ *this, coalescedEvents, mainFrameImpl()->frame());
if (result != WebInputEventResult::NotHandled)
return result;

Powered by Google App Engine
This is Rietveld 408576698