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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 384021: Fixes regression in showing bookmark menus where the wrong menu would... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 31560)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -800,24 +800,26 @@
if (loc.x() < 0 || loc.x() >= width() || loc.y() < 0 || loc.y() >= height())
return NULL;
+ gfx::Point adjusted_loc(MirroredXCoordinateInsideView(loc.x()), loc.y());
+
// Check the buttons first.
for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
views::View* child = GetChildViewAt(i);
if (!child->IsVisible())
break;
- if (child->bounds().Contains(loc))
+ if (child->bounds().Contains(adjusted_loc))
return model_->GetBookmarkBarNode()->GetChild(i);
}
// Then the overflow button.
if (overflow_button_->IsVisible() &&
- overflow_button_->bounds().Contains(loc)) {
+ overflow_button_->bounds().Contains(adjusted_loc)) {
*start_index = GetFirstHiddenNodeIndex();
return model_->GetBookmarkBarNode();
}
// And finally the other folder.
- if (other_bookmarked_button_->bounds().Contains(loc))
+ if (other_bookmarked_button_->bounds().Contains(adjusted_loc))
return model_->other_node();
return NULL;
« no previous file with comments | « no previous file | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698