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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 1147583002: Fix a crash when views::HWNDMessageHandler::HandleTouchMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the check for missing touch press Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index cb34bbe7999d9a4412b27e04a1656cc2265a5d2d..4aae47eecff403973ddc3591f7d83b4adfa0f497 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2350,6 +2350,11 @@ void HWNDMessageHandler::PrepareTouchEventList(TOUCHINPUT input[],
ScreenToClient(hwnd(), &point);
+ // We set a check to assert that we do not receive any touch events from
+ // user's palm.
+ bool touch_event_from_palm = (input[i].dwFlags & TOUCHEVENTF_PALM) != 0;
+ CHECK(!touch_event_from_palm) << "There are touch events from user's palm";
sadrul 2015/05/19 23:38:12 I don't think we should crash here? Why not just i
ananta 2015/05/19 23:40:18 Wanted to check if the missing touch downs are bec
sadrul 2015/05/19 23:51:13 Should we keep the old CHECKs too then? If the pal
+
// TOUCHEVENTF_DOWN cannot be combined with TOUCHEVENTF_MOVE or
// TOUCHEVENTF_UP, but TOUCHEVENTF_MOVE and TOUCHEVENTF_UP can be combined
// in one input.
@@ -2392,12 +2397,6 @@ void HWNDMessageHandler::GenerateTouchEvent(DWORD input_dwID,
// touchevent time.
base::TimeDelta now = ui::EventTimeForNow();
- // We set a check to assert that we do not have missing touch presses in
- // every message.
- bool has_missing_touch_press = touch_event_type != ui::ET_TOUCH_PRESSED &&
- touch_point.in_touch_list == InTouchList::NotPresent;
- CHECK(!has_missing_touch_press) << "There are missing touch presses";
-
ui::TouchEvent event(touch_event_type, point_location, touch_id, now);
event.set_flags(flags);
event.latency()->AddLatencyNumberWithTimestamp(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698