summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 21:06:59 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 21:06:59 +0000
commit8fe497be04f86438c531ad222d6d0434afc85676 (patch)
tree306ba5087eb4c906a1a8bc0bb6a9600b3e20f898 /chrome/browser/browser.cc
parentfb76593391e388bf791f3a6e0d2b72c09ad24202 (diff)
downloadchromium_src-8fe497be04f86438c531ad222d6d0434afc85676.zip
chromium_src-8fe497be04f86438c531ad222d6d0434afc85676.tar.gz
chromium_src-8fe497be04f86438c531ad222d6d0434afc85676.tar.bz2
Fix a flicker of the URL bar after you enter it. The code
inBrowser::OpenURLFromTab was not using the current tab when no source was specified. This means we didn't update the correct tab. This change uses the computed current URL for updating, and also clarifies the comments in the TabContentsDelegate about what NULL means. BUG=9799 Review URL: http://codereview.chromium.org/63125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 35e4e22..5c5c581 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -671,8 +671,8 @@ void Browser::OpenCurrentURL() {
UserMetrics::RecordAction(L"LoadURL", profile_);
LocationBar* location_bar = window_->GetLocationBar();
OpenURL(GURL(WideToUTF8(location_bar->GetInputString())), GURL(),
- location_bar->GetWindowOpenDisposition(),
- location_bar->GetPageTransition());
+ location_bar->GetWindowOpenDisposition(),
+ location_bar->GetPageTransition());
}
void Browser::Go(WindowOpenDisposition disposition) {
@@ -1719,8 +1719,8 @@ void Browser::OpenURLFromTab(TabContents* source,
// Update the location bar and load state. These are both synchronous
// updates inside of ScheduleUIUpdate.
- ScheduleUIUpdate(source, TabContents::INVALIDATE_URL |
- TabContents::INVALIDATE_LOAD);
+ ScheduleUIUpdate(current_tab, TabContents::INVALIDATE_URL |
+ TabContents::INVALIDATE_LOAD);
} else if (disposition == OFF_THE_RECORD) {
OpenURLOffTheRecord(profile_, url);
return;