Commit 3857cb10 authored by stevet@chromium.org's avatar stevet@chromium.org

Fixed a crash involving popup windows in compact nav mode.

BUG=83551
TEST=See 83551. Ensure that popups in compact nav mode are stable and can be clicked on without crashing.
Review URL: http://codereview.chromium.org/6992031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86639 0039d316-1c4b-4281-b951-d872f2087c98
parent 1302c3b6
......@@ -90,6 +90,9 @@ MouseObserver::MouseObserver(CompactLocationBarViewHost* host,
: host_(host),
browser_view_(view),
observing_(false) {
DCHECK(host_);
DCHECK(browser_view_);
DCHECK(browser_view_->GetWidget());
top_level_window_ = browser_view_->GetWidget()->GetNativeView();
}
......@@ -163,8 +166,10 @@ bool MouseObserver::HitContentArea(int x, int y) {
if (HitOnScreen(host_->view(), p)) {
return false;
}
// Treat the bookmark as a content area when it in detached mode.
if (browser_view_->GetBookmarkBarView()->IsDetached() &&
// Treat the bookmark as a content area when it in detached mode. We must
// check the view itself as it can be NULL for example in popup windows.
if (browser_view_->GetBookmarkBarView() &&
browser_view_->GetBookmarkBarView()->IsDetached() &&
browser_view_->IsBookmarkBarVisible() &&
HitOnScreen(browser_view_->GetBookmarkBarView(), p)) {
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment