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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.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/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index c73afe636af86db0fdedc8ad8e63a5884b19e4fa..24cd0c86595d36e9512eb7478f0ccea18e85154c 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -266,7 +266,7 @@ views::View* ConvertPointToViewAndGetEventHandler(
const gfx::Point& point_in_source) {
gfx::Point dest_point(point_in_source);
views::View::ConvertPointToView(source, dest, &dest_point);
- return dest->HitTest(dest_point) ?
+ return dest->HitTest(gfx::Rect(dest_point, gfx::Size(0, 0))) ?
dest->GetEventHandlerForPoint(dest_point) : NULL;
}
@@ -853,7 +853,8 @@ bool TabStrip::IsPositionInWindowCaption(const gfx::Point& point) {
gfx::Point point_in_newtab_coords(point);
View::ConvertPointToView(this, newtab_button_, &point_in_newtab_coords);
if (newtab_button_->GetLocalBounds().Contains(point_in_newtab_coords) &&
- !newtab_button_->HitTest(point_in_newtab_coords)) {
+ !newtab_button_->HitTest(gfx::Rect(point_in_newtab_coords,
+ gfx::Size(0, 0)))) {
return true;
}
@@ -2286,7 +2287,7 @@ bool TabStrip::IsPointInTab(Tab* tab,
const gfx::Point& point_in_tabstrip_coords) {
gfx::Point point_in_tab_coords(point_in_tabstrip_coords);
View::ConvertPointToView(this, tab, &point_in_tab_coords);
- return tab->HitTest(point_in_tab_coords);
+ return tab->HitTest(gfx::Rect(point_in_tab_coords, gfx::Size(0, 0)));
}
int TabStrip::GetStartXForNormalTabs() const {

Powered by Google App Engine
This is Rietveld 408576698