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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 5701008: Fixes bug in instant that resulted in flickery fade. The problem would (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Adds content to 403.html as bots seem to have problem with empty file Created 10 years 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 | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 72f3172da472d70a52e24f4ad3e26d70cc06a528..436963d6ad584fcc397db2a6c41badbf1b630022 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -233,18 +233,17 @@ void LocationBarViewMac::OnAutocompleteLosingFocus(gfx::NativeView unused) {
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() {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698