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

Unified Diff: chrome/browser/ui/views/tabs/base_tab.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/base_tab.cc
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 0f9edce6c9766b469936d91ba931c96209b5e30f..6bf436312103633238971fde1bb24780403b37cb 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -361,7 +361,7 @@ void BaseTab::OnMouseReleased(const views::MouseEvent& event) {
// (normal windows behavior is to discard presses of a UI element where the
// releases happen off the element).
if (event.IsMiddleMouseButton()) {
- if (HitTest(event.location())) {
+ if (HitTest(gfx::Rect(event.location(), gfx::Size(0, 0)))) {
controller()->CloseTab(this);
} else if (closing_) {
// We're animating closed and a middle mouse button was pushed on us but

Powered by Google App Engine
This is Rietveld 408576698