summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab_strip.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs/tab_strip.cc')
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index ec1a705..083036b 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -543,11 +543,9 @@ bool TabStrip::PointIsWithinWindowCaption(const CPoint& point) {
// Check to see if the point is within the non-button parts of the new tab
// button. The button has a non-rectangular shape, so if it's not in the
// visual portions of the button we treat it as a click to the caption.
- CRect bounds;
- newtab_button_->GetBounds(&bounds);
CPoint point_in_newtab_coords(point);
View::ConvertPointToView(this, newtab_button_, &point_in_newtab_coords);
- if (bounds.PtInRect(point) &&
+ if (newtab_button_->bounds().Contains(gfx::Point(point)) &&
!newtab_button_->HitTest(point_in_newtab_coords)) {
return true;
}