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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 134203004: Temporary fix for bad hit testing of tab close button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 41d524b37d0359ad0e9374e4b8431e4f348249ab..49d187bd65f3ea310fe4d7057c83fa8b706a8efc 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -425,11 +425,12 @@ class Tab::TabCloseButton : public views::ImageButton {
// If the button is hidden behind another tab, the hit test mask is empty.
// Otherwise set the hit test mask to be the contents bounds.
path->reset();
- if (tab_bounds.Contains(button_bounds)) {
+ if (tab_bounds.Intersects(button_bounds)) {
// Include the padding in the hit test mask for touch events.
if (source == HIT_TEST_SOURCE_TOUCH)
button_bounds = GetLocalBounds();
+ // TODO: this isn't quite right, really need to intersect the two regions.
path->addRect(RectToSkRect(button_bounds));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698