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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2925883003: [Touch Adjustment] Pass primary_pointer_type to WebGestureEvent and disable adjustment for stylus (Closed)
Patch Set: jochen and dtapuska's comments: Add default value 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: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 81d3157168d6a82a2af1152e80ba27723e293428..02aaf6d8ab20e478b783da6609a7a6ce19c2b1af 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1364,6 +1364,10 @@ bool EventHandler::ShouldApplyTouchAdjustment(
if (frame_->GetSettings() &&
!frame_->GetSettings()->GetTouchAdjustmentEnabled())
return false;
+
+ if (event.primary_pointer_type == WebPointerProperties::PointerType::kPen)
+ return false;
+
return !event.TapAreaInRootFrame().IsEmpty();
}

Powered by Google App Engine
This is Rietveld 408576698