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

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

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: 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/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index c4805db740a077635e25cfe2b7f90b53aa5ea463..aef60c6bb449a0fc94868edead9e5df2e10b5024 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -232,7 +232,9 @@ void InspectorOverlay::updateAllLifecyclePhases() {
overlayMainFrame()->view()->updateAllLifecyclePhases();
}
-bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
+bool InspectorOverlay::handleInputEvent(
+ const WebInputEvent& inputEvent,
+ const std::vector<const WebInputEvent*>& webCoalescedEvents) {
bool handled = false;
if (isEmpty())
@@ -267,15 +269,21 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
if (handled)
return true;
- if (mouseEvent.type() == PlatformEvent::MouseMoved)
+ if (mouseEvent.type() == PlatformEvent::MouseMoved) {
handled = overlayMainFrame()->eventHandler().handleMouseMoveEvent(
- mouseEvent) != WebInputEventResult::NotHandled;
- if (mouseEvent.type() == PlatformEvent::MousePressed)
+ mouseEvent, createPlatformMouseEventVector(
+ m_webViewImpl->mainFrameImpl()->frameView(),
+ webCoalescedEvents)) !=
+ WebInputEventResult::NotHandled;
+ }
+ if (mouseEvent.type() == PlatformEvent::MousePressed) {
handled = overlayMainFrame()->eventHandler().handleMousePressEvent(
mouseEvent) != WebInputEventResult::NotHandled;
- if (mouseEvent.type() == PlatformEvent::MouseReleased)
+ }
+ if (mouseEvent.type() == PlatformEvent::MouseReleased) {
handled = overlayMainFrame()->eventHandler().handleMouseReleaseEvent(
mouseEvent) != WebInputEventResult::NotHandled;
+ }
}
if (WebInputEvent::isTouchEventType(inputEvent.type)) {
@@ -285,7 +293,10 @@ bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) {
handled = handleTouchEvent(touchEvent);
if (handled)
return true;
- overlayMainFrame()->eventHandler().handleTouchEvent(touchEvent);
+ overlayMainFrame()->eventHandler().handleTouchEvent(
+ touchEvent,
+ createPlatformTouchEventVector(
+ m_webViewImpl->mainFrameImpl()->frameView(), webCoalescedEvents));
}
if (WebInputEvent::isKeyboardEventType(inputEvent.type)) {
overlayMainFrame()->eventHandler().keyEvent(

Powered by Google App Engine
This is Rietveld 408576698