summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc8
-rw-r--r--views/view.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 8d07ec3..a8876de 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -800,24 +800,26 @@ const BookmarkNode* BookmarkBarView::GetNodeForButtonAt(const gfx::Point& loc,
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;
diff --git a/views/view.h b/views/view.h
index d7144f7..48d7b58 100644
--- a/views/view.h
+++ b/views/view.h
@@ -144,7 +144,7 @@ class View : public AcceleratorTarget {
// Return the bounds of the View, relative to the parent. If
// |settings| is IGNORE_MIRRORING_TRANSFORMATION, the function returns the
- // bounds_ rectangle. If |settings| is APPLY_MIRRORING_SETTINGS AND the
+ // bounds_ rectangle. If |settings| is APPLY_MIRRORING_TRANSFORMATION AND the
// parent View is using a right-to-left UI layout, then the function returns
// a shifted version of the bounds_ rectangle that represents the mirrored
// View bounds.