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

Unified Diff: ui/aura/window.cc

Issue 10806055: Fix aura::Window::ContainsPointInRoot(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address comment Created 8 years, 5 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 | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index a94ccfe2a295a7f7397bb3303f89316b8d5fb717..de7f4921a3755c7d7514c0283479f2cfe8847654 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -485,12 +485,11 @@ bool Window::ContainsPointInRoot(const gfx::Point& point_in_root) {
return false;
gfx::Point local_point(point_in_root);
ConvertPointToWindow(root_window, this, &local_point);
- return GetTargetBounds().Contains(local_point);
+ return gfx::Rect(GetTargetBounds().size()).Contains(local_point);
}
bool Window::ContainsPoint(const gfx::Point& local_point) {
- gfx::Rect local_bounds(gfx::Point(), bounds().size());
- return local_bounds.Contains(local_point);
+ return gfx::Rect(bounds().size()).Contains(local_point);
}
bool Window::HitTest(const gfx::Point& local_point) {
« no previous file with comments | « no previous file | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698