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

Unified Diff: ui/aura/window.cc

Issue 27458002: Allow setting different hit test bounds overrides for mouse and touch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index c0c574424ea73eee47aa2a8bf35f8d51eae72057..6104ca56b93ed78f9864bc2098da8e385381b8b6 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -744,10 +744,14 @@ Window* Window::GetWindowForPoint(const gfx::Point& local_point,
// Check if I should claim this event and not pass it to my children because
// the location is inside my hit test override area. For details, see
- // set_hit_test_bounds_override_inner().
- if (for_event_handling && !hit_test_bounds_override_inner_.empty()) {
+ // SetHitTestBoundsOverrideInner().
+ gfx::Insets hit_test_bounds_override_inner =
+ aura::Env::GetInstance()->is_touch_down() ?
+ hit_test_bounds_override_inner_touch_ :
+ hit_test_bounds_override_inner_mouse_;
+ if (for_event_handling && !hit_test_bounds_override_inner.empty()) {
gfx::Rect inset_local_bounds(gfx::Point(), bounds().size());
- inset_local_bounds.Inset(hit_test_bounds_override_inner_);
+ inset_local_bounds.Inset(hit_test_bounds_override_inner);
// We know we're inside the normal local bounds, so if we're outside the
// inset bounds we must be in the special hit test override area.
DCHECK(HitTest(local_point));
« ui/aura/window.h ('K') | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698