| 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 169d128faa2f31c7f85a841676eabcd731c45ef0..4108f5063860b3e06d6296530a0efe8ba2e51dbf 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| @@ -812,11 +812,11 @@ void TabStrip::UpdateLoadingAnimations() {
|
| controller_->UpdateLoadingAnimations();
|
| }
|
|
|
| -bool TabStrip::IsPositionInWindowCaption(const gfx::Point& point) {
|
| - return IsRectInWindowCaption(gfx::Rect(point, gfx::Size(1, 1)));
|
| +bool TabStrip::IsPositionInWindowCaption(const gfx::PointF& point) {
|
| + return IsRectInWindowCaption(gfx::RectF(point, gfx::Size(1, 1)));
|
| }
|
|
|
| -bool TabStrip::IsRectInWindowCaption(const gfx::Rect& rect) {
|
| +bool TabStrip::IsRectInWindowCaption(const gfx::RectF& rect) {
|
| views::View* v = GetEventHandlerForRect(rect);
|
|
|
| // If there is no control at this location, claim the hit was in the title
|
| @@ -827,11 +827,10 @@ bool TabStrip::IsRectInWindowCaption(const gfx::Rect& rect) {
|
| // Check to see if the rect intersects 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.
|
| - gfx::RectF rect_in_newtab_coords_f(rect);
|
| - View::ConvertRectToTarget(this, newtab_button_, &rect_in_newtab_coords_f);
|
| - gfx::Rect rect_in_newtab_coords = gfx::ToEnclosingRect(
|
| - rect_in_newtab_coords_f);
|
| - if (newtab_button_->GetLocalBounds().Intersects(rect_in_newtab_coords) &&
|
| + gfx::RectF rect_in_newtab_coords(rect);
|
| + View::ConvertRectToTarget(this, newtab_button_, &rect_in_newtab_coords);
|
| + gfx::RectF newtab_bounds(newtab_button_->GetLocalBounds());
|
| + if (newtab_bounds.Intersects(rect_in_newtab_coords) &&
|
| !newtab_button_->HitTestRect(rect_in_newtab_coords))
|
| return true;
|
|
|
| @@ -1337,10 +1336,10 @@ void TabStrip::GetAccessibleState(ui::AXViewState* state) {
|
| state->role = ui::AX_ROLE_TAB_LIST;
|
| }
|
|
|
| -views::View* TabStrip::GetEventHandlerForRect(const gfx::Rect& rect) {
|
| +views::View* TabStrip::GetEventHandlerForRect(const gfx::RectF& rect) {
|
| if (!views::UsePointBasedTargeting(rect))
|
| return View::GetEventHandlerForRect(rect);
|
| - const gfx::Point point(rect.CenterPoint());
|
| + const gfx::Point point(gfx::ToFlooredPoint(rect.CenterPoint()));
|
|
|
| if (!touch_layout_.get()) {
|
| // Return any view that isn't a Tab or this TabStrip immediately. We don't
|
|
|