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

Unified Diff: ui/views/window/non_client_view.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index 68a804056eff599142ae7ad09d0c7bfe358fb5a6..d417078bf219ac34546a414891fd2181cd44dcb5 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -178,7 +178,7 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) {
// removed from the NonClientView.
gfx::Point point_in_child_coords(point);
View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords);
- if (frame_view_->HitTest(point_in_child_coords))
+ if (frame_view_->HitTestPoint(point_in_child_coords))
return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
}
@@ -247,10 +247,10 @@ int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point,
////////////////////////////////////////////////////////////////////////////////
// NonClientFrameView, View overrides:
-bool NonClientFrameView::HitTest(const gfx::Point& l) const {
+bool NonClientFrameView::HitTestRect(const gfx::Rect& rect) const {
// For the default case, we assume the non-client frame view never overlaps
// the client view.
- return !GetWidget()->client_view()->bounds().Contains(l);
+ return !GetWidget()->client_view()->bounds().Intersects(rect);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698