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

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

Issue 10938009: Views fuzzing for Aura and Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Work in progress. Created 8 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
« 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 d6ee959f7b07812296700e5fa96e4a5d8252ae6f..644b814f179e437736136e6e7f2889309fdefc9d 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -169,7 +169,7 @@ std::string NonClientView::GetClassName() const {
return kViewClassName;
}
-views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) {
+View* NonClientView::GetEventHandler(const gfx::Rect& rect, EventType type) {
// Because of the z-ordering of our child views (the client view is positioned
// over the non-client frame view, if the client view ever overlaps the frame
// view visually (as it does for the browser window), then it will eat mouse
@@ -181,13 +181,13 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) {
// During the reset of the frame_view_ it's possible to be in this code
// after it's been removed from the view hierarchy but before it's been
// removed from the NonClientView.
- gfx::Point point_in_child_coords(point);
- View::ConvertPointToTarget(this, frame_view_.get(), &point_in_child_coords);
- if (frame_view_->HitTestPoint(point_in_child_coords))
- return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
+ gfx::Rect rect_in_child_coords(rect);
+ View::ConvertRectToTarget(this, frame_view_.get(), &rect_in_child_coords);
+ if (frame_view_->HitTestRect(rect_in_child_coords))
+ return frame_view_->GetEventHandler(rect_in_child_coords, type);
}
- return View::GetEventHandlerForPoint(point);
+ return View::GetEventHandler(rect, type);
}
////////////////////////////////////////////////////////////////////////////////
« 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