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

Unified Diff: chrome/browser/ui/browser.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 months 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
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 7eb07ea1cc7ab9f76bd5d48fe2f9c2ae37d86b41..509b58d7e28597a84dff3c733a7d247fae1e3ada 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -915,7 +915,7 @@ void Browser::TabInsertedAt(WebContents* contents,
// Make sure the loading state is updated correctly, otherwise the throbber
// won't start if the page is loading.
- LoadingStateChanged(contents);
+ LoadingStateChanged(contents, true);
interstitial_observers_.push_back(new InterstitialObserver(this, contents));
@@ -1340,13 +1340,14 @@ void Browser::DeactivateContents(WebContents* contents) {
window_->Deactivate();
}
-void Browser::LoadingStateChanged(WebContents* source) {
+void Browser::LoadingStateChanged(WebContents* source,
+ bool to_different_document) {
window_->UpdateLoadingAnimations(tab_strip_model_->TabsAreLoading());
window_->UpdateTitleBar();
WebContents* selected_contents = tab_strip_model_->GetActiveWebContents();
if (source == selected_contents) {
- bool is_loading = source->IsLoading();
+ bool is_loading = source->IsLoading() && to_different_document;
command_controller_->LoadingStateChanged(is_loading, false);
if (GetStatusBubble()) {
GetStatusBubble()->SetStatus(CoreTabHelper::FromWebContents(

Powered by Google App Engine
This is Rietveld 408576698