Bug 788584 - TabsProgressListener.onLocationChange should obey the LOCATION_CHANGE_SAME_DOCUMENT flag rather than null-checking aRequest. r=jaws
authorDão Gottwald <dao@mozilla.com>
Wed, 20 Feb 2013 00:14:36 +0100
changeset 122380 cc8e0ae5459d03bd30af7829e849107371c3cef5
parent 122379 d7a59870712854e54075eaf62fe13485e3173163
child 122381 b399e0488c098b663b996141f394376f2e11f4be
push id24336
push userryanvm@gmail.com
push dateWed, 20 Feb 2013 12:07:46 +0000
treeherdermozilla-central@1bcc3c56b011 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs788584
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 788584 - TabsProgressListener.onLocationChange should obey the LOCATION_CHANGE_SAME_DOCUMENT flag rather than null-checking aRequest. r=jaws
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4758,17 +4758,17 @@ var TabsProgressListener = {
   },
 
   onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI,
                               aFlags) {
     // Filter out any sub-frame loads
     if (aBrowser.contentWindow == aWebProgress.DOMWindow) {
       // Filter out any onLocationChanges triggered by anchor navigation
       // or history.push/pop/replaceState.
-      if (aRequest) {
+      if (!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)) {
         // Initialize the click-to-play state.
         aBrowser._clickToPlayPluginsActivated = new Map();
         aBrowser._clickToPlayAllPluginsActivated = false;
         aBrowser._pluginScriptedState = gPluginHandler.PLUGIN_SCRIPTED_STATE_NONE;
 
         // Only need to call locationChange if the PopupNotifications object
         // for this window has already been initialized (i.e. its getter no
         // longer exists)