Index: ui/aura/window.cc |
diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
index febf221d70604a4860a7614b0e27c63d64e022ee..60977c845bccf890dac9ac7175f3c42e7f25d86c 100644 |
--- a/ui/aura/window.cc |
+++ b/ui/aura/window.cc |
@@ -54,7 +54,8 @@ Window::Window(WindowDelegate* delegate) |
transparent_(false), |
user_data_(NULL), |
stops_event_propagation_(false), |
- ignore_events_(false) { |
+ ignore_events_(false), |
+ hit_test_bounds_inset_(0) { |
} |
Window::~Window() { |
@@ -401,8 +402,10 @@ bool Window::ContainsPoint(const gfx::Point& local_point) { |
} |
bool Window::HitTest(const gfx::Point& local_point) { |
+ gfx::Rect local_bounds(gfx::Point(), bounds().size()); |
+ local_bounds.Inset(hit_test_bounds_inset_, hit_test_bounds_inset_); |
// TODO(beng): hittest masks. |
- return ContainsPoint(local_point); |
+ return local_bounds.Contains(local_point); |
} |
Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) { |