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

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: 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 2160728e687efb22f47a1c8777cf9c46b621b99d..8f395f204bf0aac8704e7844780c0053970cd5c9 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1405,6 +1405,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