| Index: chrome/browser/cocoa/location_bar/location_bar_view_mac.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/location_bar/location_bar_view_mac.mm (revision 69571)
|
| +++ chrome/browser/cocoa/location_bar/location_bar_view_mac.mm (working copy)
|
| @@ -233,18 +233,17 @@
|
| if (!instant)
|
| return;
|
|
|
| - if (!instant->is_active() || !instant->GetPreviewContents())
|
| - return;
|
| -
|
| // If |IsMouseDownFromActivate()| returns false, the RenderWidgetHostView did
|
| // not receive a mouseDown event. Therefore, we should destroy the preview.
|
| // Otherwise, the RWHV was clicked, so we commit the preview.
|
| - if (!instant->IsMouseDownFromActivate())
|
| + if (!instant->is_displayable() || !instant->GetPreviewContents() ||
|
| + !instant->IsMouseDownFromActivate()) {
|
| instant->DestroyPreviewContents();
|
| - else if (instant->IsShowingInstant())
|
| + } else if (instant->IsShowingInstant()) {
|
| instant->SetCommitOnMouseUp();
|
| - else
|
| + } else {
|
| instant->CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
|
| + }
|
| }
|
|
|
| void LocationBarViewMac::OnAutocompleteWillAccept() {
|
|
|