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

Unified Diff: components/test_runner/event_sender.cc

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 months 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
« no previous file with comments | « components/test_runner/event_sender.h ('k') | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/event_sender.cc
diff --git a/components/test_runner/event_sender.cc b/components/test_runner/event_sender.cc
index 58b8f1c179ad0271b0cfa6f2f8d1e08f2af055dd..fca46e1cb494b85a6b52171ed62b5bd83440c0b1 100644
--- a/components/test_runner/event_sender.cc
+++ b/components/test_runner/event_sender.cc
@@ -523,6 +523,7 @@ class EventSenderBindings : public gin::Wrappable<EventSenderBindings> {
void TouchMoveCausingScrollIfUncanceled();
void TouchCancel();
void TouchEnd();
+ void NotifyStartOfTouchScroll();
void LeapForward(int milliseconds);
double LastEventTimestamp();
void BeginDragWithFiles(const std::vector<std::string>& files);
@@ -644,10 +645,10 @@ EventSenderBindings::GetObjectTemplateBuilder(v8::Isolate* isolate) {
&EventSenderBindings::GestureScrollFirstPoint)
.SetMethod("touchStart", &EventSenderBindings::TouchStart)
.SetMethod("touchMove", &EventSenderBindings::TouchMove)
- .SetMethod("touchMoveCausingScrollIfUncanceled",
- &EventSenderBindings::TouchMoveCausingScrollIfUncanceled)
.SetMethod("touchCancel", &EventSenderBindings::TouchCancel)
.SetMethod("touchEnd", &EventSenderBindings::TouchEnd)
+ .SetMethod("notifyStartOfTouchScroll",
+ &EventSenderBindings::NotifyStartOfTouchScroll)
.SetMethod("leapForward", &EventSenderBindings::LeapForward)
.SetMethod("lastEventTimestamp", &EventSenderBindings::LastEventTimestamp)
.SetMethod("beginDragWithFiles", &EventSenderBindings::BeginDragWithFiles)
@@ -828,11 +829,6 @@ void EventSenderBindings::TouchMove() {
sender_->TouchMove();
}
-void EventSenderBindings::TouchMoveCausingScrollIfUncanceled() {
- if (sender_)
- sender_->TouchMoveCausingScrollIfUncanceled();
-}
-
void EventSenderBindings::TouchCancel() {
if (sender_)
sender_->TouchCancel();
@@ -843,6 +839,11 @@ void EventSenderBindings::TouchEnd() {
sender_->TouchEnd();
}
+void EventSenderBindings::NotifyStartOfTouchScroll() {
+ if (sender_)
+ sender_->NotifyStartOfTouchScroll();
+}
+
void EventSenderBindings::LeapForward(int milliseconds) {
if (sender_)
sender_->LeapForward(milliseconds);
@@ -1891,10 +1892,6 @@ void EventSender::TouchMove() {
SendCurrentTouchEvent(WebInputEvent::TouchMove, false);
}
-void EventSender::TouchMoveCausingScrollIfUncanceled() {
- SendCurrentTouchEvent(WebInputEvent::TouchMove, true);
-}
-
void EventSender::TouchCancel() {
SendCurrentTouchEvent(WebInputEvent::TouchCancel, false);
}
@@ -1903,6 +1900,12 @@ void EventSender::TouchEnd() {
SendCurrentTouchEvent(WebInputEvent::TouchEnd, false);
}
+void EventSender::NotifyStartOfTouchScroll() {
+ WebTouchEvent event;
+ event.type = WebInputEvent::TouchScrollStarted;
+ HandleInputEventOnViewOrPopup(event);
+}
+
void EventSender::LeapForward(int milliseconds) {
if (is_drag_mode_ &&
current_pointer_state_[kMousePointerId].pressed_button_ ==
« no previous file with comments | « components/test_runner/event_sender.h ('k') | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698