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

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

Issue 5997004: Merge 69201 - Fixes bug in instant that resulted in flickery fade. The proble... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: '' 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/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/gtk/browser_window_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698