Backed out changeset dc3780dd8a43 (bug 311007). Going to change onLocationChange instead of adding onLocationChange2.
authorDão Gottwald <dao@mozilla.com>
Tue, 14 Jun 2011 00:02:28 +0200
changeset 71528 5e3cf50377aaf8066bb42b89c6d5e65ee42a7c25
parent 71527 d1d6d8d0123164160dceb636b2d0ab51492576ab
child 71536 060127d32405ec7da605e8f2b2e87073f569dd84
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs311007
milestone7.0a1
backs outdc3780dd8a43feb076131bf1b9398b3e4c5b1c81
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
Backed out changeset dc3780dd8a43 (bug 311007). Going to change onLocationChange instead of adding onLocationChange2.
browser/base/content/browser.js
docshell/base/nsDocShell.cpp
docshell/base/nsDocShell.h
security/manager/boot/src/nsSecureBrowserUIImpl.cpp
security/manager/boot/src/nsSecureBrowserUIImpl.h
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/downloads/nsDownloadProxy.h
toolkit/components/statusfilter/nsBrowserStatusFilter.cpp
toolkit/content/tests/browser/common/mockTransferForContinuing.js
toolkit/mozapps/downloads/nsHelperAppDlg.js
uriloader/base/nsDocLoader.cpp
uriloader/base/nsDocLoader.h
uriloader/base/nsIWebProgressListener2.idl
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4361,20 +4361,16 @@ var XULBrowserWindow = {
           this.throbberElement.removeAttribute("busy");
 
         this.stopCommand.setAttribute("disabled", "true");
         CombinedStopReload.switchToReload(aRequest instanceof Ci.nsIRequest);
       }
     }
   },
 
-  onLocationChange2: function (aWebProgress, aRequest, aLocationURI, aFlags) {
-    onLocationChange(aWebProgress, aRequest, aLocationURI);
-  },
-
   onLocationChange: function (aWebProgress, aRequest, aLocationURI) {
     var location = aLocationURI ? aLocationURI.spec : "";
     this._hostChanged = true;
 
     // Hide the form invalid popup.
     if (gFormSubmitObserver.panelIsOpen()) {
       gFormSubmitObserver.panel.hidePopup();
     }
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1721,30 +1721,27 @@ NS_IMETHODIMP
 nsDocShell::GetChromeEventHandler(nsIDOMEventTarget** aChromeEventHandler)
 {
     NS_ENSURE_ARG_POINTER(aChromeEventHandler);
     nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(mChromeEventHandler);
     target.swap(*aChromeEventHandler);
     return NS_OK;
 }
 
-/* void setCurrentURI (in nsIURI uri); */
+/* [noscript] void setCurrentURI (in nsIURI uri); */
 NS_IMETHODIMP
 nsDocShell::SetCurrentURI(nsIURI *aURI)
 {
-    // Note that securityUI will set STATE_IS_INSECURE, even if
-    // the scheme of |aURI| is "https".
-    SetCurrentURI(aURI, nsnull, PR_TRUE,
-                  nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
+    SetCurrentURI(aURI, nsnull, PR_TRUE);
     return NS_OK;
 }
 
 PRBool
 nsDocShell::SetCurrentURI(nsIURI *aURI, nsIRequest *aRequest,
-                          PRBool aFireOnLocationChange, PRUint32 aLocationFlags)
+                          PRBool aFireOnLocationChange)
 {
 #ifdef PR_LOGGING
     if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
         nsCAutoString spec;
         if (aURI)
             aURI->GetSpec(spec);
         PR_LogPrint("DOCSHELL %p SetCurrentURI %s\n", this, spec.get());
     }
@@ -1778,17 +1775,17 @@ nsDocShell::SetCurrentURI(nsIURI *aURI, 
        * We don't want to send OnLocationChange notifications when
        * a subframe is being loaded for the first time, while
        * visiting a frameset page
        */
       return PR_FALSE; 
     }
 
     if (aFireOnLocationChange) {
-        FireOnLocationChange(this, aRequest, aURI, aLocationFlags);
+        FireOnLocationChange(this, aRequest, aURI);
     }
     return !aFireOnLocationChange;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetCharset(char** aCharset)
 {
     NS_ENSURE_ARG_POINTER(aCharset);
@@ -5872,18 +5869,17 @@ nsDocShell::OnStateChange(nsIWebProgress
                 }
 
                 // This is a document.write(). Get the made-up url
                 // from the channel and store it in session history.
                 // Pass false for aCloneChildren, since we're creating
                 // a new DOM here.
                 rv = AddToSessionHistory(uri, wcwgChannel, nsnull, PR_FALSE,
                                          getter_AddRefs(mLSHE));
-                SetCurrentURI(uri, aRequest, PR_TRUE,
-                              nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
+                SetCurrentURI(uri, aRequest, PR_TRUE);
                 // Save history state of the previous page
                 rv = PersistLayoutHistoryState();
                 // We'll never get an Embed() for this load, so just go ahead
                 // and SetHistoryEntry now.
                 SetHistoryEntry(&mOSHE, mLSHE);
             }
         
         }
@@ -6527,18 +6523,17 @@ nsDocShell::CreateAboutBlankContentViewe
       docFactory->CreateInstanceForDocument(NS_ISUPPORTS_CAST(nsIDocShell *, this),
                     blankDoc, "view", getter_AddRefs(viewer));
 
       // hook 'em up
       if (viewer) {
         viewer->SetContainer(static_cast<nsIContentViewerContainer *>(this));
         Embed(viewer, "", 0);
 
-        SetCurrentURI(blankDoc->GetDocumentURI(), nsnull, PR_TRUE,
-                      nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
+        SetCurrentURI(blankDoc->GetDocumentURI(), nsnull, PR_TRUE);
         rv = mIsBeingDestroyed ? NS_ERROR_NOT_AVAILABLE : NS_OK;
       }
     }
   }
   mCreatingDocument = PR_FALSE;
 
   // The transient about:blank viewer doesn't have a session history entry.
   SetHistoryEntry(&mOSHE, nsnull);
@@ -7179,18 +7174,17 @@ nsDocShell::RestoreFromHistory()
 
         // Use the uri from the mLSHE we had when we entered this function
         // (which need not match the document's URI if anchors are involved),
         // since that's the history entry we're loading.  Note that if we use
         // origLSHE we don't have to worry about whether the entry in question
         // is still mLSHE or whether it's now mOSHE.
         nsCOMPtr<nsIURI> uri;
         origLSHE->GetURI(getter_AddRefs(uri));
-        SetCurrentURI(uri, document->GetChannel(), PR_TRUE,
-                      nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
+        SetCurrentURI(uri, document->GetChannel(), PR_TRUE);
     }
 
     // This is the end of our CreateContentViewer() replacement.
     // Now we simulate a load.  First, we restore the state of the javascript
     // window object.
     nsCOMPtr<nsPIDOMWindow> privWin =
         do_GetInterface(static_cast<nsIInterfaceRequestor*>(this));
     NS_ASSERTION(privWin, "could not get nsPIDOMWindow interface");
@@ -7519,18 +7513,17 @@ nsDocShell::CreateContentViewer(const ch
     if (++gNumberOfDocumentsLoading == 1) {
       // Hint to favor performance for the plevent notification mechanism.
       // We want the pages to load as fast as possible even if its means 
       // native messages might be starved.
       FavorPerformanceHint(PR_TRUE, NS_EVENT_STARVATION_DELAY_HINT);
     }
 
     if (onLocationChangeNeeded) {
-      FireOnLocationChange(this, request, mCurrentURI,
-                           nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
+      FireOnLocationChange(this, request, mCurrentURI);
     }
   
     return NS_OK;
 }
 
 nsresult
 nsDocShell::NewContentViewerObj(const char *aContentType,
                                 nsIRequest * request, nsILoadGroup * aLoadGroup,
@@ -8387,21 +8380,16 @@ nsDocShell::InternalLoad(nsIURI * aURI,
              */
             nsCOMPtr<nsISupports> owner;
             if (mOSHE) {
                 mOSHE->GetOwner(getter_AddRefs(owner));
             }
             // Pass true for aCloneSHChildren, since we're not
             // changing documents here, so all of our subframes are
             // still relevant to the new session history entry.
-            //
-            // It also makes OnNewURI(...) set LOCATION_CHANGE_SAME_DOCUMENT
-            // flag on firing onLocationChange(...).
-            // Anyway, aCloneSHChildren param is simply reflecting
-            // doShortCircuitedLoad in this scope.
             OnNewURI(aURI, nsnull, owner, mLoadType, PR_TRUE, PR_TRUE, PR_TRUE);
 
             nsCOMPtr<nsIInputStream> postData;
             PRUint64 docIdent = PRUint64(-1);
             nsCOMPtr<nsISupports> cacheKey;
 
             if (mOSHE) {
                 /* save current position of scroller(s) (bug 59774) */
@@ -9471,24 +9459,18 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIC
             shInternal->UpdateIndex();
             rootSH->GetIndex(&mLoadedTransIndex);
 #ifdef DEBUG_PAGE_CACHE
             printf("Previous index: %d, Loaded index: %d\n\n",
                    mPreviousTransIndex, mLoadedTransIndex);
 #endif
         }
     }
-
-    // aCloneSHChildren exactly means "we are not loading a new document".
-    PRUint32 locationFlags = aCloneSHChildren?
-        PRUint32(nsIWebProgressListener2::LOCATION_CHANGE_SAME_DOCUMENT) :
-        PRUint32(nsIWebProgressListener2::LOCATION_CHANGE_NORMAL);
     PRBool onLocationChangeNeeded = SetCurrentURI(aURI, aChannel,
-                                                  aFireOnLocationChange,
-                                                  locationFlags);
+                                                  aFireOnLocationChange);
     // Make sure to store the referrer from the channel, if any
     SetupReferrerFromChannel(aChannel);
     return onLocationChangeNeeded;
 }
 
 PRBool
 nsDocShell::OnLoadingSite(nsIChannel * aChannel, PRBool aFireOnLocationChange,
                           PRBool aAddToGlobalHistory)
@@ -9782,25 +9764,18 @@ nsDocShell::AddState(nsIVariant *aData, 
 
     // Step 6: If the document's URI changed, update document's URI and update
     // global history.
     //
     // We need to call FireOnLocationChange so that the browser's address bar
     // gets updated and the back button is enabled, but we only need to
     // explicitly call FireOnLocationChange if we're not calling SetCurrentURI,
     // since SetCurrentURI will call FireOnLocationChange for us.
-    //
-    // Both SetCurrentURI(...) and FireDummyOnLocationChange() pass
-    // nsnull for aRequest param to FireOnLocationChange(...). Such an update
-    // notification is allowed only when we know docshell is not loading a new
-    // document and it requires LOCATION_CHANGE_SAME_DOCUMENT flag. Otherwise,
-    // FireOnLocationChange(...) breaks security UI.
     if (!equalURIs) {
-        SetCurrentURI(newURI, nsnull, PR_TRUE,
-                      nsIWebProgressListener2::LOCATION_CHANGE_SAME_DOCUMENT);
+        SetCurrentURI(newURI, nsnull, PR_TRUE);
         document->SetDocumentURI(newURI);
 
         AddURIVisit(newURI, oldURI, oldURI, 0);
 
         // AddURIVisit doesn't set the title for the new URI in global history,
         // so do that here.
         if (mUseGlobalHistory) {
             nsCOMPtr<IHistory> history = services::GetHistoryService();
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -89,17 +89,17 @@
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptGlobalObjectOwner.h"
 #include "nsISHistory.h"
 #include "nsILayoutHistoryState.h"
 #include "nsIStringBundle.h"
 #include "nsISupportsArray.h"
 #include "nsIWebNavigation.h"
 #include "nsIWebPageDescriptor.h"
-#include "nsIWebProgressListener2.h"
+#include "nsIWebProgressListener.h"
 #include "nsISHContainer.h"
 #include "nsIDocShellLoadInfo.h"
 #include "nsIDocShellHistory.h"
 #include "nsIURIFixup.h"
 #include "nsIWebBrowserFind.h"
 #include "nsIHttpChannel.h"
 #include "nsDocShellTransferableHooks.h"
 #include "nsIAuthPromptProvider.h"
@@ -263,23 +263,20 @@ public:
     // ForceRefreshURI method on nsIRefreshURI, but makes sure to take
     // the timer involved out of mRefreshURIList if it's there.
     // aTimer must not be null.
     nsresult ForceRefreshURIFromTimer(nsIURI * aURI, PRInt32 aDelay,
                                       PRBool aMetaRefresh, nsITimer* aTimer);
 
     friend class OnLinkClickEvent;
 
-    // We need dummy OnLocationChange in some cases to update the UI without
-    // updating security info.
+    // We need dummy OnLocationChange in some cases to update the UI.
     void FireDummyOnLocationChange()
     {
-        FireOnLocationChange
-            (this, nsnull, mCurrentURI, 
-             nsIWebProgressListener2::LOCATION_CHANGE_SAME_DOCUMENT);
+      FireOnLocationChange(this, nsnull, mCurrentURI);
     }
 
     nsresult HistoryTransactionRemoved(PRInt32 aIndex);
 protected:
     // Object Management
     virtual ~nsDocShell();
     virtual void DestroyChildren();
 
@@ -590,18 +587,17 @@ protected:
                                  nsIDocShellTreeItem* aTargetTreeItem);
 
     // Returns PR_TRUE if would have called FireOnLocationChange,
     // but did not because aFireOnLocationChange was false on entry.
     // In this case it is the caller's responsibility to ensure
     // FireOnLocationChange is called.
     // In all other cases PR_FALSE is returned.
     PRBool SetCurrentURI(nsIURI *aURI, nsIRequest *aRequest,
-                         PRBool aFireOnLocationChange,
-                         PRUint32 aLocationFlags);
+                         PRBool aFireOnLocationChange);
 
     // The following methods deal with saving and restoring content viewers
     // in session history.
 
     // mContentViewer points to the current content viewer associated with
     // this docshell.  When loading a new document, the content viewer is
     // either destroyed or stored into a session history entry.  To make sure
     // that destruction happens in a controlled fashion, a given content viewer
--- a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
+++ b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
@@ -187,20 +187,19 @@ nsSecureBrowserUIImpl::nsSecureBrowserUI
 nsSecureBrowserUIImpl::~nsSecureBrowserUIImpl()
 {
   if (mTransferringRequests.ops) {
     PL_DHashTableFinish(&mTransferringRequests);
     mTransferringRequests.ops = nsnull;
   }
 }
 
-NS_IMPL_THREADSAFE_ISUPPORTS7(nsSecureBrowserUIImpl,
+NS_IMPL_THREADSAFE_ISUPPORTS6(nsSecureBrowserUIImpl,
                               nsISecureBrowserUI,
                               nsIWebProgressListener,
-                              nsIWebProgressListener2,
                               nsIFormSubmitObserver,
                               nsIObserver,
                               nsISupportsWeakReference,
                               nsISSLStatusProvider)
 
 NS_IMETHODIMP
 nsSecureBrowserUIImpl::Init(nsIDOMWindow *aWindow)
 {
@@ -1513,49 +1512,16 @@ nsresult nsSecureBrowserUIImpl::TellTheW
   return NS_OK; 
 }
 
 NS_IMETHODIMP
 nsSecureBrowserUIImpl::OnLocationChange(nsIWebProgress* aWebProgress,
                                         nsIRequest* aRequest,
                                         nsIURI* aLocation)
 {
-  NS_NOTREACHED("onLocationChange2(...) should be called instead.");
-  return NS_OK;
-}
-
-//  nsIWebProgressListener2
-NS_IMETHODIMP 
-nsSecureBrowserUIImpl::OnProgressChange64(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          PRInt64 aCurSelfProgress,
-                                          PRInt64 aMaxSelfProgress,
-                                          PRInt64 aCurTotalProgress,
-                                          PRInt64 aMaxTotalProgress)
-{
-  NS_NOTREACHED("notification excluded in AddProgressListener(...)");
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsSecureBrowserUIImpl::OnRefreshAttempted(nsIWebProgress* aWebProgress,
-                                          nsIURI* aRefreshURI, PRInt32 aMillis,
-                                          PRBool aSameURI, PRBool* aResult)
-{
-  NS_NOTREACHED("notification excluded in AddProgressListener(...)");
-  *aResult = PR_TRUE;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsSecureBrowserUIImpl::OnLocationChange2(nsIWebProgress* aWebProgress,
-                                         nsIRequest* aRequest,
-                                         nsIURI* aLocation,
-                                         PRUint32 aFlags)
-{
 #ifdef DEBUG
   nsAutoAtomic atomic(mOnStateLocationChangeReentranceDetection);
   NS_ASSERTION(mOnStateLocationChangeReentranceDetection == 1,
                "unexpected parallel nsIWebProgress OnStateChange and/or OnLocationChange notification");
 #endif
   PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
          ("SecureUI:%p: OnLocationChange\n", this));
 
@@ -1584,20 +1550,19 @@ nsSecureBrowserUIImpl::OnLocationChange2
     if (updateIsViewSource) {
       mIsViewSource = temp_IsViewSource;
     }
     mCurrentURI = aLocation;
     window = do_QueryReferent(mWindow);
     NS_ASSERTION(window, "Window has gone away?!");
   }
 
-  // When |aRequest| is null, basically we don't trust that document. But if
-  // docshell insists that the document has not changed at all, we will reuse
-  // the previous security state, no matter what |aRequest| may be.
-  if (aFlags & LOCATION_CHANGE_SAME_DOCUMENT)
+  // If the location change does not have a corresponding request, then we
+  // assume that it does not impact the security state.
+  if (!aRequest)
     return NS_OK;
 
   // The location bar has changed, so we must update the security state.  The
   // only concern with doing this here is that a page may transition from being
   // reported as completely secure to being reported as partially secure
   // (mixed).  This may be confusing for users, and it may bother users who
   // like seeing security dialogs.  However, it seems prudent given that page
   // loading may never end in some edge cases (perhaps by a site with malicious
--- a/security/manager/boot/src/nsSecureBrowserUIImpl.h
+++ b/security/manager/boot/src/nsSecureBrowserUIImpl.h
@@ -48,17 +48,17 @@
 #include "nsString.h"
 #include "nsIObserver.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMHTMLFormElement.h"
 #include "nsIStringBundle.h"
 #include "nsISecureBrowserUI.h"
 #include "nsIDocShell.h"
-#include "nsIWebProgressListener2.h"
+#include "nsIWebProgressListener.h"
 #include "nsIFormSubmitObserver.h"
 #include "nsIURI.h"
 #include "nsISecurityEventSink.h"
 #include "nsWeakReference.h"
 #include "nsISSLStatusProvider.h"
 #include "nsIAssociatedContentSecurity.h"
 #include "pldhash.h"
 #include "nsINetUtil.h"
@@ -67,30 +67,29 @@ class nsITransportSecurityInfo;
 class nsISecurityWarningDialogs;
 class nsIChannel;
 
 #define NS_SECURE_BROWSER_UI_CID \
 { 0xcc75499a, 0x1dd1, 0x11b2, {0x8a, 0x82, 0xca, 0x41, 0x0a, 0xc9, 0x07, 0xb8}}
 
 
 class nsSecureBrowserUIImpl : public nsISecureBrowserUI,
-                              public nsIWebProgressListener2,
+                              public nsIWebProgressListener,
                               public nsIFormSubmitObserver,
                               public nsIObserver,
                               public nsSupportsWeakReference,
                               public nsISSLStatusProvider
 {
 public:
   
   nsSecureBrowserUIImpl();
   virtual ~nsSecureBrowserUIImpl();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_NSIWEBPROGRESSLISTENER2
   NS_DECL_NSISECUREBROWSERUI
   
   // nsIObserver
   NS_DECL_NSIOBSERVER
   NS_DECL_NSISSLSTATUSPROVIDER
 
   NS_IMETHOD Notify(nsIDOMHTMLFormElement* formNode, nsIDOMWindowInternal* window,
                     nsIURI *actionURL, PRBool* cancelSubmit);
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -2434,24 +2434,16 @@ nsDownload::OnRefreshAttempted(nsIWebPro
                                PRInt32 aDelay,
                                PRBool aSameUri,
                                PRBool *allowRefresh)
 {
   *allowRefresh = PR_TRUE;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsDownload::OnLocationChange2(nsIWebProgress *aWebProgress,
-                              nsIRequest *aRequest, nsIURI *aLocation,
-                              PRUint32 aFlags)
-{
-  return OnLocationChange(aWebProgress, aRequest, aLocation);
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 //// nsIWebProgressListener
 
 NS_IMETHODIMP
 nsDownload::OnProgressChange(nsIWebProgress *aWebProgress,
                              nsIRequest *aRequest,
                              PRInt32 aCurSelfProgress,
                              PRInt32 aMaxSelfProgress,
--- a/toolkit/components/downloads/nsDownloadProxy.h
+++ b/toolkit/components/downloads/nsDownloadProxy.h
@@ -123,23 +123,16 @@ public:
   }
 
   NS_IMETHODIMP OnLocationChange(nsIWebProgress *aWebProgress,
                                  nsIRequest *aRequest, nsIURI *aLocation)
   {
     NS_ENSURE_TRUE(mInner, NS_ERROR_NOT_INITIALIZED);
     return mInner->OnLocationChange(aWebProgress, aRequest, aLocation);
   }
-
-  NS_IMETHODIMP OnLocationChange2(nsIWebProgress *aWebProgress,
-                                  nsIRequest *aRequest, nsIURI *aLocation,
-                                  PRUint32 aFlags)
-  {
-    return OnLocationChange(aWebProgress, aRequest, aLocation);
-  }
   
   NS_IMETHODIMP OnProgressChange(nsIWebProgress *aWebProgress,
                                  nsIRequest *aRequest,
                                  PRInt32 aCurSelfProgress,
                                  PRInt32 aMaxSelfProgress,
                                  PRInt32 aCurTotalProgress,
                                  PRInt32 aMaxTotalProgress)
   {
--- a/toolkit/components/statusfilter/nsBrowserStatusFilter.cpp
+++ b/toolkit/components/statusfilter/nsBrowserStatusFilter.cpp
@@ -304,25 +304,16 @@ nsBrowserStatusFilter::OnRefreshAttempte
         *allowRefresh = PR_TRUE;
         return NS_OK;
     }
 
     return listener->OnRefreshAttempted(aWebProgress, aUri, aDelay, aSameUri,
                                         allowRefresh);
 }
 
-NS_IMETHODIMP
-nsBrowserStatusFilter::OnLocationChange2(nsIWebProgress *aWebProgress,
-                                         nsIRequest *aRequest,
-                                         nsIURI *aLocation,
-                                         PRUint32 aFlags)
-{
-    return OnLocationChange(aWebProgress, aRequest, aLocation);
-}
-
 //-----------------------------------------------------------------------------
 // nsBrowserStatusFilter <private>
 //-----------------------------------------------------------------------------
 
 void
 nsBrowserStatusFilter::ResetMembers()
 {
     mTotalRequests = 0;
--- a/toolkit/content/tests/browser/common/mockTransferForContinuing.js
+++ b/toolkit/content/tests/browser/common/mockTransferForContinuing.js
@@ -83,17 +83,16 @@ MockTransferForContinuing.prototype = {
   //////////////////////////////////////////////////////////////////////////////
   //// nsIWebProgressListener2
 
   onProgressChange64: function(aWebProgress, aRequest, aCurSelfProgress,
                                aMaxSelfProgress, aCurTotalProgress,
                                aMaxTotalProgress) { },
   onRefreshAttempted: function(aWebProgress, aRefreshURI, aMillis,
                                aSameURI) { },
-  onLocationChange2: function(aWebProgress, aRequest, aLocation, aFlags) { },
 
   //////////////////////////////////////////////////////////////////////////////
   //// nsITransfer
 
   init: function(aSource, aTarget, aDisplayName, aMIMEInfo, aStartTime,
                  aTempFile, aCancelable) { }
 };
 
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
@@ -111,19 +111,16 @@ nsUnkownContentTypeDialogProgressListene
   onLocationChange: function( aWebProgress, aRequest, aLocation ) {
   },
 
   onSecurityChange: function( aWebProgress, aRequest, state ) {
   },
 
   onRefreshAttempted: function( aWebProgress, aURI, aDelay, aSameURI ) {
     return true;
-  },
-
-  onLocationChange2: function( aWebProgress, aRequest, aLocation, aFlags ) {
   }
 };
 
 ///////////////////////////////////////////////////////////////////////////////
 //// nsUnkownContentTypeDialog
 
 /* This file implements the nsIHelperAppLauncherDialog interface.
  *
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -1347,18 +1347,17 @@ void nsDocLoader::FireOnStateChange(nsIW
   }
 }
 
 
 
 void
 nsDocLoader::FireOnLocationChange(nsIWebProgress* aWebProgress,
                                   nsIRequest* aRequest,
-                                  nsIURI *aUri,
-                                  PRUint32 aFlags)
+                                  nsIURI *aUri)
 {
   /*                                                                           
    * First notify any listeners of the new state info...
    *
    * Operate the elements from back to front so that if items get
    * get removed from the list it won't affect our iteration
    */
   nsCOMPtr<nsIWebProgressListener> listener;
@@ -1375,31 +1374,24 @@ nsDocLoader::FireOnLocationChange(nsIWeb
     listener = do_QueryReferent(info->mWeakListener);
     if (!listener) {
       // the listener went away. gracefully pull it out of the list.
       mListenerInfoList.RemoveElementAt(count);
       delete info;
       continue;
     }
 
-    nsCOMPtr<nsIWebProgressListener2>
-      listener2(do_QueryReferent(info->mWeakListener));
-
-    if (listener2) {
-      listener2->OnLocationChange2(aWebProgress, aRequest, aUri, aFlags);
-    } else {
-      listener->OnLocationChange(aWebProgress, aRequest, aUri);
-    }
+    listener->OnLocationChange(aWebProgress, aRequest, aUri);
   }
 
   mListenerInfoList.Compact();
 
   // Pass the notification up to the parent...
   if (mParent) {
-    mParent->FireOnLocationChange(aWebProgress, aRequest, aUri, aFlags);
+    mParent->FireOnLocationChange(aWebProgress, aRequest, aUri);
   }
 }
 
 void
 nsDocLoader::FireOnStatusChange(nsIWebProgress* aWebProgress,
                                 nsIRequest* aRequest,
                                 nsresult aStatus,
                                 const PRUnichar* aMessage)
--- a/uriloader/base/nsDocLoader.h
+++ b/uriloader/base/nsDocLoader.h
@@ -160,18 +160,17 @@ protected:
 
     void FireOnStatusChange(nsIWebProgress *aWebProgress,
                             nsIRequest *aRequest,
                             nsresult aStatus,
                             const PRUnichar* aMessage);
 
     void FireOnLocationChange(nsIWebProgress* aWebProgress,
                               nsIRequest* aRequest,
-                              nsIURI *aUri,
-                              PRUint32 aFlags);
+                              nsIURI *aUri);
 
     PRBool RefreshAttempted(nsIWebProgress* aWebProgress,
                             nsIURI *aURI,
                             PRInt32 aDelay,
                             PRBool aSameURI);
 
     // this function is overridden by the docshell, it is provided so that we
     // can pass more information about redirect state (the normal OnStateChange
--- a/uriloader/base/nsIWebProgressListener2.idl
+++ b/uriloader/base/nsIWebProgressListener2.idl
@@ -35,17 +35,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIWebProgressListener.idl"
 
 /**
  * An extended version of nsIWebProgressListener.
  */
-[scriptable, uuid(9fad5966-62ea-11e0-966c-001320257da5)]
+[scriptable, uuid(dde39de0-e4e0-11da-8ad9-0800200c9a66)]
 interface nsIWebProgressListener2 : nsIWebProgressListener {
   /**
    * Notification that the progress has changed for one of the requests
    * associated with aWebProgress.  Progress totals are reset to zero when all
    * requests in aWebProgress complete (corresponding to onStateChange being
    * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW
    * flags).
    *
@@ -94,47 +94,9 @@ interface nsIWebProgressListener2 : nsIW
    *
    * @return True if the refresh may proceed.
    *         False if the refresh should be aborted.
    */
   boolean onRefreshAttempted(in nsIWebProgress aWebProgress,
                              in nsIURI aRefreshURI,
                              in long aMillis,
                              in boolean aSameURI);
-
-   /**
-    * Flags for onLocationChange2
-    *
-    * LOCATION_CHANGE_NORMAL
-    *   Nothing special.
-    *
-    * LOCATION_CHANGE_SAME_DOCUMENT
-    *   This flag is on when |aWebProgress| did not load a new document. 
-    *   For example,
-    *     1. The user clicks that anchor in a document which is linking to 
-    *        [1.a.] the document itself.
-    *        [1.b.] a location only <#hash> portion changed.
-    *     2. The user inputs [1.b.]'s URI in the location bar.
-    *     3. Session history navigation.
-    *        [3.a.] history.pushState(...), history.replaceState(...) or
-    *               history.popState(...) is called and |aWebProgress| wants to
-    *               update the UI.
-    *        [3.b.] Back/Forward/Go to URI of [1.a.], [1.b.] or [3.a.].
-    *        [3.c.] After session history is cleared.
-    */
-
-  const unsigned long LOCATION_CHANGE_NORMAL          = 0x00000001;
-  const unsigned long LOCATION_CHANGE_SAME_DOCUMENT   = 0x00000002;
-
-  /**
-   * This function is identical to nsIWebProgressListener::onLocationChange,
-   * except for aFlags argument.
-   *
-   * @param aFlags
-   *        This is a value which explains the situation or the reason why
-   *        the location has changed.
-   */
-
-  void onLocationChange2(in nsIWebProgress aWebProgress,
-                         in nsIRequest aRequest,
-                         in nsIURI aLocation,
-                         in unsigned long aFlags);
 };