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

Unified Diff: content/shell/test_runner/event_sender.cc

Issue 2925883003: [Touch Adjustment] Pass primary_pointer_type to WebGestureEvent and disable adjustment for stylus (Closed)
Patch Set: dtapuska's comment: Add args check Created 3 years, 6 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
Index: content/shell/test_runner/event_sender.cc
diff --git a/content/shell/test_runner/event_sender.cc b/content/shell/test_runner/event_sender.cc
index 02ece2fb7ec769e0b7677631844de2ee87fdb573..9108b8cbbd14ad66872d9ba84c6485552c907958 100644
--- a/content/shell/test_runner/event_sender.cc
+++ b/content/shell/test_runner/event_sender.cc
@@ -2525,6 +2525,11 @@ void EventSender::GestureEvent(WebInputEvent::Type type, gin::Arguments* args) {
}
event.unique_touch_event_id = GetUniqueTouchEventId(args);
+ // This check is necessary as tests may pass some redundant args.
+ if (!args->PeekNext().IsEmpty() && args->PeekNext()->IsString()) {
dtapuska 2017/06/16 15:46:23 Do you really need the IsString() ? If there are
chongz 2017/06/16 16:03:02 Fixed layout tests. In this case I think we don't
+ if (!getPointerType(args, false, event.primary_pointer_type))
+ return;
+ }
event.global_x = event.x;
event.global_y = event.y;

Powered by Google App Engine
This is Rietveld 408576698