Bug 635542 - [Regression] Navigation buttons not updated when using URL fragments [r=mbrubeck]
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -1305,17 +1305,17 @@ Browser.WebProgress.prototype = {
break;
}
case "Content:LocationChange": {
let spec = json.location;
let location = spec.split("#")[0]; // Ignore fragment identifier changes.
if (tab == Browser.selectedTab)
- BrowserUI.updateURI({ captionOnly: true }); // Do less for more speed
+ BrowserUI.updateURI();
let locationHasChanged = (location != tab.browser.lastLocation);
if (locationHasChanged) {
Browser.getNotificationBox(tab.browser).removeTransientNotifications();
tab.resetZoomLevel();
tab.hostChanged = true;
tab.browser.lastLocation = location;
tab.browser.userTypedValue = "";
@@ -1367,21 +1367,18 @@ Browser.WebProgress.prototype = {
if (aTab.browser.currentURI.spec == "about:blank")
BrowserUI.updateURI({ captionOnly: true });
}
},
_networkStop: function _networkStop(aTab) {
aTab.endLoading();
- if (aTab == Browser.selectedTab) {
- // Now that pageload is finished, do the more expensive updates
- BrowserUI.updateURI();
+ if (aTab == Browser.selectedTab)
BrowserUI.update(TOOLBARSTATE_LOADED);
- }
if (aTab.browser.currentURI.spec != "about:blank")
aTab.updateThumbnail();
},
_documentStop: function _documentStop(aTab) {
// Make sure the URLbar is in view. If this were the selected tab,
// onLocationChange would scroll to top.
@@ -2568,16 +2565,19 @@ Tab.prototype = {
},
/** Record the initial zoom level when a page first loads. */
resetZoomLevel: function resetZoomLevel() {
this._defaultZoomLevel = this._browser.scale;
},
scrolledAreaChanged: function scrolledAreaChanged() {
+ if (!this._browser)
+ return;
+
this.updateDefaultZoomLevel();
if (!this.useFallbackWidth && this._browser.contentDocumentWidth > kDefaultBrowserWidth)
this.useFallbackWidth = true;
this.updateViewportSize();
},