| Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
|
| diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
|
| index fda8b77ab11f0a40ffc4c2459e1c69fedf37d210..4ca84e883a68cf4296537784b4064e5998dfacb1 100644
|
| --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
|
| +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
|
| @@ -679,19 +679,6 @@ gfx::Size BookmarkBarView::GetPreferredSize() const {
|
| return prefsize;
|
| }
|
|
|
| -bool BookmarkBarView::HitTestRect(const gfx::Rect& rect) const {
|
| - // If bookmark bar is attached and omnibox popup is open (on top of the bar),
|
| - // force hit-testing to fail. This prevents hovers/clicks just above the
|
| - // omnibox popup from activating the top few pixels of items on the bookmark
|
| - // bar.
|
| - if (!IsDetached() && browser_view_ &&
|
| - browser_view_->GetLocationBar()->GetOmniboxView()->model()->
|
| - popup_model()->IsOpen()) {
|
| - return false;
|
| - }
|
| - return DetachableToolbarView::HitTestRect(rect);
|
| -}
|
| -
|
| gfx::Size BookmarkBarView::GetMinimumSize() const {
|
| // The minimum width of the bookmark bar should at least contain the overflow
|
| // button, by which one can access all the Bookmark Bar items, and the "Other
|
| @@ -930,6 +917,20 @@ const char* BookmarkBarView::GetClassName() const {
|
| return kViewClassName;
|
| }
|
|
|
| +bool BookmarkBarView::CanAcceptEvent(const ui::Event& event) {
|
| + // If bookmark bar is attached and omnibox popup is open (on top of the bar),
|
| + // do not allow the bookmark bar to accept events. This prevents, for example,
|
| + // hovers/clicks just above the omnibox popup from activating the top few
|
| + // pixels of items on the bookmark bar.
|
| + if (!IsDetached() && browser_view_ &&
|
| + browser_view_->GetLocationBar()->GetOmniboxView()->model()->
|
| + popup_model()->IsOpen()) {
|
| + return false;
|
| + }
|
| +
|
| + return View::CanAcceptEvent(event);
|
| +}
|
| +
|
| void BookmarkBarView::GetAccessibleState(ui::AXViewState* state) {
|
| state->role = ui::AX_ROLE_TOOLBAR;
|
| state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS);
|
|
|