From 1f89f352af4edc119a7e63ac920ed32f6c83c884 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Thu, 14 Apr 2011 20:58:12 +0000 Subject: Fix repaint problems in omnibox by invalidating the omnibox when unfreezing, instead of just asking for a paint. The lack of invalidation was previously disguised by our global painting code that invalidated children much more frequently. BUG=78787 TEST=Paste in address bar, then press the left arrow key. You should not see an unblinking cursor-like black line at the end of the text. Review URL: http://codereview.chromium.org/6831023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81638 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'chrome/browser/autocomplete') diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 8844732..b630271 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -289,10 +289,11 @@ AutocompleteEditViewWin::ScopedFreeze::~ScopedFreeze() { long count; text_object_model_->Unfreeze(&count); if (count == 0) { - // We need to UpdateWindow() here instead of InvalidateRect() because, as - // far as I can tell, the edit likes to synchronously erase its background - // when unfreezing, thus requiring us to synchronously redraw if we don't - // want flicker. + // We need to UpdateWindow() here in addition to InvalidateRect() because, + // as far as I can tell, the edit likes to synchronously erase its + // background when unfreezing, thus requiring us to synchronously redraw + // if we don't want flicker. + edit_->InvalidateRect(NULL, false); edit_->UpdateWindow(); } } -- cgit v1.1