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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 51659936184982ceb2be1e8e92c6cf3b41e38246..e89246a6ea1ab66fbcbad4ed2fe1a42c32210934 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -397,9 +397,9 @@ void OpaqueBrowserFrameView::Layout() {
client_view_bounds_ = CalculateClientAreaBounds(width(), height());
}
-bool OpaqueBrowserFrameView::HitTest(const gfx::Point& l) const {
+bool OpaqueBrowserFrameView::HitTest(const gfx::Rect& r) const {
// If the point is outside the bounds of the client area, claim it.
- bool in_nonclient = NonClientFrameView::HitTest(l);
+ bool in_nonclient = NonClientFrameView::HitTest(r);
if (in_nonclient)
return in_nonclient;
@@ -410,13 +410,13 @@ bool OpaqueBrowserFrameView::HitTest(const gfx::Point& l) const {
gfx::Point tabstrip_origin(tabstrip_bounds.origin());
View::ConvertPointToView(frame()->client_view(), this, &tabstrip_origin);
tabstrip_bounds.set_origin(tabstrip_origin);
- if (l.y() > tabstrip_bounds.bottom())
+ if (r.y() > tabstrip_bounds.bottom())
tdanderson 2012/08/07 16:18:28 Should this instead be r.y() + r.height() ?
sky 2012/08/07 20:11:43 Same comments in this file as the ash file.
tdanderson 2012/08/08 23:47:51 Done.
return false;
// We convert from our parent's coordinates since we assume we fill its bounds
// completely. We need to do this since we're not a parent of the tabstrip,
// meaning ConvertPointToView would otherwise return something bogus.
- gfx::Point browser_view_point(l);
+ gfx::Point browser_view_point(gfx::Point(r.x(), r.y()));
tdanderson 2012/08/08 23:47:51 I am also passing through the center point here fo
tdanderson 2012/08/09 16:16:46 Also added a TODO here as well.
View::ConvertPointToView(parent(), browser_view(), &browser_view_point);
return browser_view()->IsPositionInWindowCaption(browser_view_point);
}

Powered by Google App Engine
This is Rietveld 408576698