Bug 670235 - Remove nsIDOMWindowInternal; r=sicking
authorMs2ger <ms2ger@gmail.com>
Fri, 15 Jul 2011 12:31:34 +0200
changeset 72822 b2ba5a0e5ddaa80448123e14c74bbfa5a18b3414
parent 72821 53d0d74e602e1ba9c3d24fd1f0b8df518294214d
child 72823 0c493e9d4819e1884ba809a8081443ad9a8860da
push idunknown
push userunknown
push dateunknown
reviewerssicking
bugs670235
milestone8.0a1
Bug 670235 - Remove nsIDOMWindowInternal; r=sicking
accessible/src/atk/nsMaiInterfaceComponent.cpp
accessible/src/base/nsCoreUtils.cpp
accessible/src/html/nsHTMLImageAccessible.cpp
accessible/src/html/nsHyperTextAccessible.cpp
browser/base/content/test/browser_bug553455.js
browser/base/content/test/browser_sanitize-download-history.js
browser/components/migration/src/nsProfileMigrator.cpp
browser/components/preferences/tests/browser_permissions.js
browser/components/wintaskbar/test/browser_taskbar_preview.js
browser/fuel/src/fuelApplication.js
browser/fuel/test/browser_Application.js
caps/src/nsScriptSecurityManager.cpp
chrome/src/nsChromeRegistry.cpp
chrome/src/nsChromeRegistry.h
content/base/src/nsContentSink.cpp
content/base/src/nsDocument.cpp
content/base/src/nsStyledElement.cpp
content/events/src/nsDOMUIEvent.cpp
content/events/src/nsEventStateManager.cpp
content/html/content/public/nsIFormSubmitObserver.idl
content/html/content/src/nsHTMLImageElement.cpp
content/html/content/src/nsHTMLInputElement.cpp
content/html/document/src/nsHTMLDocument.cpp
content/smil/nsDOMTimeEvent.cpp
content/xbl/src/nsXBLPrototypeHandler.cpp
content/xbl/src/nsXBLWindowKeyHandler.cpp
content/xml/document/src/nsXMLContentSink.cpp
content/xul/content/src/nsXULPopupListener.cpp
content/xul/document/public/nsIController.idl
content/xul/document/src/nsXULCommandDispatcher.cpp
docshell/base/nsDSURIContentListener.cpp
docshell/base/nsDocShell.cpp
docshell/base/nsIContentViewerFile.idl
dom/base/nsBarProps.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsGlobalWindow.h
dom/base/nsHistory.cpp
dom/base/nsPIDOMWindow.h
dom/base/nsWindowRoot.cpp
dom/interfaces/base/Makefile.in
dom/interfaces/base/domstubs.idl
dom/interfaces/base/nsIDOMJSWindow.idl
dom/interfaces/base/nsIDOMWindow.idl
dom/interfaces/base/nsIDOMWindowInternal.idl
editor/composer/src/nsEditingSession.cpp
embedding/browser/webBrowser/nsWebBrowser.cpp
embedding/browser/webBrowser/nsWebBrowser.h
embedding/components/commandhandler/src/nsCommandManager.cpp
embedding/components/printingui/src/mac/nsPrintProgress.cpp
embedding/components/printingui/src/mac/nsPrintProgress.h
embedding/components/printingui/src/os2/nsPrintProgress.cpp
embedding/components/printingui/src/os2/nsPrintProgress.h
embedding/components/printingui/src/os2/nsPrintingPromptService.cpp
embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
embedding/components/printingui/src/unixshared/nsPrintProgress.h
embedding/components/printingui/src/unixshared/nsPrintingPromptService.cpp
embedding/components/printingui/src/win/nsPrintProgress.cpp
embedding/components/printingui/src/win/nsPrintProgress.h
embedding/components/printingui/src/win/nsPrintingPromptService.cpp
embedding/components/windowwatcher/public/nsPIWindowWatcher.idl
embedding/components/windowwatcher/src/nsWindowWatcher.cpp
js/src/xpconnect/src/dom_quickstubs.qsconf
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsDocumentViewer.cpp
layout/forms/nsFileControlFrame.cpp
layout/generic/nsCanvasFrame.cpp
layout/inspector/public/inIFlasher.idl
layout/inspector/src/inDOMUtils.cpp
layout/inspector/src/inFlasher.cpp
layout/inspector/src/inLayoutUtils.cpp
layout/inspector/src/inLayoutUtils.h
layout/printing/nsIPrintProgress.idl
layout/printing/nsIPrintStatusFeedback.idl
layout/svg/base/src/nsSVGOuterSVGFrame.cpp
layout/xul/base/src/nsMenuBarFrame.cpp
layout/xul/base/src/nsXULPopupManager.cpp
mobile/components/HelperAppDialog.js
netwerk/test/browser/browser_NetUtil.js
security/manager/boot/src/nsSecureBrowserUIImpl.cpp
security/manager/boot/src/nsSecureBrowserUIImpl.h
security/manager/pki/src/nsFormSigningDialog.cpp
security/manager/pki/src/nsNSSDialogHelper.cpp
security/manager/pki/src/nsNSSDialogHelper.h
security/manager/pki/src/nsNSSDialogs.cpp
security/manager/ssl/src/nsNSSComponent.cpp
toolkit/components/alerts/nsAlertsService.cpp
toolkit/components/console/hudservice/HUDService.jsm
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/places/PlacesUtils.jsm
toolkit/components/remote/nsGTKRemoteService.cpp
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/startup/tests/browser/browser_bug511456.js
toolkit/components/startup/tests/browser/browser_bug537449.js
toolkit/mozapps/downloads/nsHelperAppDlg.js
toolkit/mozapps/downloads/tests/chrome/utils.js
toolkit/mozapps/downloads/tests/unit/test_privatebrowsing_downloadLastDir.js
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/amIWebInstallListener.idl
toolkit/mozapps/extensions/amIWebInstaller.idl
toolkit/mozapps/extensions/test/browser/browser_bug567127.js
toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
toolkit/mozapps/extensions/test/browser/head.js
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/mozapps/update/test/chrome/utils.js
toolkit/mozapps/update/test/unit/test_0081_prompt_uiAlreadyOpen.js
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsNativeAppSupportCocoa.mm
toolkit/xre/nsNativeAppSupportOS2.cpp
toolkit/xre/nsNativeAppSupportUnix.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
uriloader/base/nsURILoader.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
uriloader/exthandler/nsExternalHelperAppService.h
widget/src/xpwidgets/nsPrintOptionsImpl.cpp
widget/tests/TestWinTSF.cpp
xpcom/tests/SizeTest06.cpp
xpfe/appshell/public/nsIAppShellService.idl
xpfe/appshell/public/nsIWindowMediator.idl
xpfe/appshell/src/nsAppShellService.cpp
xpfe/appshell/src/nsAppShellWindowEnumerator.cpp
xpfe/appshell/src/nsChromeTreeOwner.cpp
xpfe/appshell/src/nsContentTreeOwner.cpp
xpfe/appshell/src/nsWindowMediator.cpp
xpfe/appshell/src/nsXULWindow.cpp
xpfe/appshell/src/nsXULWindow.h
xpfe/components/directory/nsDirectoryViewer.cpp
xpfe/components/windowds/nsIWindowDataSource.idl
xpfe/components/windowds/nsWindowDataSource.cpp
xpinstall/public/nsIXPIInstallInfo.idl
xpinstall/src/nsInstallTrigger.cpp
xpinstall/src/nsJSInstallTriggerGlobal.cpp
xpinstall/src/nsXPIInstallInfo.cpp
xpinstall/src/nsXPIInstallInfo.h
xpinstall/src/nsXPInstallManager.cpp
xpinstall/src/nsXPInstallManager.h
xpinstall/tests/harness.js
--- a/accessible/src/atk/nsMaiInterfaceComponent.cpp
+++ b/accessible/src/atk/nsMaiInterfaceComponent.cpp
@@ -38,21 +38,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsMaiInterfaceComponent.h"
 
 #include "nsAccessibleWrap.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 
-#include "nsIDOMDocument.h"
-#include "nsIDOMWindowInternal.h"
-#include "nsIDocShellTreeItem.h"
-#include "nsIInterfaceRequestorUtils.h"
-
 void
 componentInterfaceInitCB(AtkComponentIface *aIface)
 {
     NS_ASSERTION(aIface, "Invalid Interface");
     if(!aIface)
         return;
 
     /*
--- a/accessible/src/base/nsCoreUtils.cpp
+++ b/accessible/src/base/nsCoreUtils.cpp
@@ -41,19 +41,18 @@
 #include "nsIAccessibleTypes.h"
 
 #include "nsAccessNode.h"
 
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLElement.h"
-#include "nsIDOMNodeList.h"
 #include "nsIDOMRange.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDOMXULElement.h"
 #include "nsIDocShell.h"
 #include "nsIContentViewer.h"
 #include "nsEventListenerManager.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsIScrollableFrame.h"
 #include "nsEventStateManager.h"
@@ -422,22 +421,21 @@ nsCoreUtils::GetScreenCoordsForWindow(ns
   nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
   treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
   nsCOMPtr<nsIDOMDocument> domDoc = do_GetInterface(rootTreeItem);
   if (!domDoc)
     return coords;
 
   nsCOMPtr<nsIDOMWindow> window;
   domDoc->GetDefaultView(getter_AddRefs(window));
-  nsCOMPtr<nsIDOMWindowInternal> windowInter(do_QueryInterface(window));
-  if (!windowInter)
+  if (!window)
     return coords;
 
-  windowInter->GetScreenX(&coords.x);
-  windowInter->GetScreenY(&coords.y);
+  window->GetScreenX(&coords.x);
+  window->GetScreenY(&coords.y);
   return coords;
 }
 
 already_AddRefed<nsIDocShellTreeItem>
 nsCoreUtils::GetDocShellTreeItemFor(nsINode *aNode)
 {
   if (!aNode)
     return nsnull;
--- a/accessible/src/html/nsHTMLImageAccessible.cpp
+++ b/accessible/src/html/nsHTMLImageAccessible.cpp
@@ -174,17 +174,17 @@ nsHTMLImageAccessible::DoAction(PRUint8 
     NS_ENSURE_TRUE(element, NS_ERROR_FAILURE);
 
     nsAutoString longDesc;
     nsresult rv = element->GetLongDesc(longDesc);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsIDocument* document = mContent->GetOwnerDoc();
     nsCOMPtr<nsPIDOMWindow> piWindow = document->GetWindow();
-    nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(piWindow));
+    nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(piWindow);
     NS_ENSURE_TRUE(win, NS_ERROR_FAILURE);
     nsCOMPtr<nsIDOMWindow> tmp;
     return win->Open(longDesc, EmptyString(), EmptyString(),
                      getter_AddRefs(tmp));
   }
   return nsLinkableAccessible::DoAction(aIndex);
 }
 
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -44,20 +44,18 @@
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
 #include "nsTextAttrs.h"
 
 #include "nsIClipboard.h"
 #include "nsContentCID.h"
 #include "nsIDOMCharacterData.h"
 #include "nsIDOMDocument.h"
-#include "nsPIDOMWindow.h"        
 #include "nsIDOMRange.h"
 #include "nsIDOMNSRange.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIEditingSession.h"
 #include "nsIEditor.h"
 #include "nsIFrame.h"
 #include "nsFrameSelection.h"
 #include "nsILineIterator.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIPlaintextEditor.h"
--- a/browser/base/content/test/browser_bug553455.js
+++ b/browser/base/content/test/browser_bug553455.js
@@ -45,17 +45,17 @@ function wait_for_notification_close(aCa
 function wait_for_install_dialog(aCallback) {
   info("Waiting for install dialog");
   Services.wm.addListener({
     onOpenWindow: function(aXULWindow) {
       info("Install dialog opened, waiting for focus");
       Services.wm.removeListener(this);
 
       var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                .getInterface(Ci.nsIDOMWindowInternal);
+                                .getInterface(Ci.nsIDOMWindow);
       waitForFocus(function() {
         info("Saw install dialog");
         is(domwindow.document.location.href, XPINSTALL_URL, "Should have seen the right window open");
 
         // Override the countdown timer on the accept button
         var button = domwindow.document.documentElement.getButton("accept");
         button.disabled = false;
 
--- a/browser/base/content/test/browser_sanitize-download-history.js
+++ b/browser/base/content/test/browser_sanitize-download-history.js
@@ -136,30 +136,30 @@ function test()
            getService(Ci.nsIDownloadManager);
   let db = dm.DBConnection;
 
   // Empty any old downloads
   db.executeSimpleSQL("DELETE FROM moz_downloads");
 
   // Close the UI if necessary
   let win = Services.ww.getWindowByName("Sanatize", null);
-  if (win && (win instanceof Ci.nsIDOMWindowInternal))
+  if (win && (win instanceof Ci.nsIDOMWindow))
     win.close();
 
   // Start the test when the sanitize window loads
   Services.ww.registerNotification(function (aSubject, aTopic, aData) {
     Services.ww.unregisterNotification(arguments.callee);
     aSubject.QueryInterface(Ci.nsIDOMEventTarget)
             .addEventListener("DOMContentLoaded", doTest, false);
   });
 
   // Let the methods that run onload finish before we test
   let doTest = function() setTimeout(function() {
     let win = Services.ww.getWindowByName("Sanitize", null)
-                .QueryInterface(Ci.nsIDOMWindowInternal);
+                .QueryInterface(Ci.nsIDOMWindow);
 
     for (let i = 0; i < tests.length; i++)
       tests[i](win);
 
     win.close();
     finish();
   }, 0);
  
--- a/browser/components/migration/src/nsProfileMigrator.cpp
+++ b/browser/components/migration/src/nsProfileMigrator.cpp
@@ -34,17 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsProfileMigrator.h"
 
 #include "nsIBrowserProfileMigrator.h"
 #include "nsIComponentManager.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsILocalFile.h"
 #include "nsIObserverService.h"
 #include "nsIProperties.h"
 #include "nsIServiceManager.h"
 #include "nsISupportsPrimitives.h"
 #include "nsISupportsArray.h"
 #include "nsIToolkitProfile.h"
 #include "nsIToolkitProfileService.h"
--- a/browser/components/preferences/tests/browser_permissions.js
+++ b/browser/components/preferences/tests/browser_permissions.js
@@ -290,17 +290,17 @@ function getSiteItem(aHost) {
 
 function addWindowListener(aURL, aCallback) {
   Services.wm.addListener({
     onOpenWindow: function(aXULWindow) {
       info("window opened, waiting for focus");
       Services.wm.removeListener(this);
 
       var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                .getInterface(Ci.nsIDOMWindowInternal);
+                                .getInterface(Ci.nsIDOMWindow);
       waitForFocus(function() {
         is(domwindow.document.location.href, aURL, "should have seen the right window open");
         domwindow.close();
         aCallback();
       }, domwindow);
     },
     onCloseWindow: function(aXULWindow) { },
     onWindowTitleChange: function(aXULWindow, aNewTitle) { }
--- a/browser/components/wintaskbar/test/browser_taskbar_preview.js
+++ b/browser/components/wintaskbar/test/browser_taskbar_preview.js
@@ -124,16 +124,16 @@ function test() {
       thumbnailWidth = thumbnailHeight * ratio;
     else
       thumbnailHeight = thumbnailWidth / ratio;
 
     return getCanvas(thumbnailWidth, thumbnailHeight);
   }
 
   function getCanvas(width, height) {
-    let win = window.QueryInterface(Ci.nsIDOMWindowInternal);
+    let win = window.QueryInterface(Ci.nsIDOMWindow);
     let doc = win.document;
     let canvas = doc.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
     canvas.width = width;
     canvas.height = height;
     return canvas;
   }
 }
--- a/browser/fuel/src/fuelApplication.js
+++ b/browser/fuel/src/fuelApplication.js
@@ -217,17 +217,17 @@ BrowserTab.prototype = {
   /*
    * Helper event callback used to redirect events made on the XBL element
    */
   _event : function bt_event(aEvent) {
     if (aEvent.type == "load") {
       if (!(aEvent.originalTarget instanceof Ci.nsIDOMDocument))
         return;
 
-      if (aEvent.originalTarget.defaultView instanceof Ci.nsIDOMWindowInternal &&
+      if (aEvent.originalTarget.defaultView instanceof Ci.nsIDOMWindow &&
           aEvent.originalTarget.defaultView.frameElement)
         return;
     }
     this._events.dispatch(aEvent.type, this);
   },
   /*
    * Helper used to determine the index offset of the browsertab
    */
--- a/browser/fuel/test/browser_Application.js
+++ b/browser/fuel/test/browser_Application.js
@@ -29,17 +29,17 @@ WindowOpenListener.prototype = {
   },
 
   onOpenWindow: function(window) {
     if (this.window)
       return;
 
     this.window = window;
     this.domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
-                           .getInterface(Ci.nsIDOMWindowInternal);
+                           .getInterface(Ci.nsIDOMWindow);
     this.domwindow.addEventListener("load", this, false);
   },
 
   onCloseWindow: function(window) {
     if (this.window != window)
       return;
 
     Services.wm.removeListener(this);
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -2707,17 +2707,17 @@ nsScriptSecurityManager::CheckConfirmDia
 
     //-- Get a prompter for the current window.
     nsCOMPtr<nsIPrompt> prompter;
     if (cx)
     {
         nsIScriptContext *scriptContext = GetScriptContext(cx);
         if (scriptContext)
         {
-            nsCOMPtr<nsIDOMWindowInternal> domWin =
+            nsCOMPtr<nsIDOMWindow> domWin =
                 do_QueryInterface(scriptContext->GetGlobalObject());
             if (domWin)
                 domWin->GetPrompter(getter_AddRefs(prompter));
         }
     }
 
     if (!prompter)
     {
--- a/chrome/src/nsChromeRegistry.cpp
+++ b/chrome/src/nsChromeRegistry.cpp
@@ -59,17 +59,17 @@
 #include "nsCSSStyleSheet.h"
 #include "nsIConsoleService.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDocShell.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMLocation.h"
 #include "nsIDOMWindowCollection.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIIOService.h"
 #include "nsIJARProtocolHandler.h"
 #include "nsIObserverService.h"
 #include "nsIPresShell.h"
 #include "nsIProtocolHandler.h"
 #include "nsIScriptError.h"
 #include "nsIWindowMediator.h"
 
@@ -346,17 +346,17 @@ nsChromeRegistry::ConvertChromeURL(nsIUR
   return NS_NewURI(aResult, path, nsnull, baseURI);
 }
 
 ////////////////////////////////////////////////////////////////////////
 
 // theme stuff
 
 
-static void FlushSkinBindingsForWindow(nsIDOMWindowInternal* aWindow)
+static void FlushSkinBindingsForWindow(nsIDOMWindow* aWindow)
 {
   // Get the DOM document.
   nsCOMPtr<nsIDOMDocument> domDocument;
   aWindow->GetDocument(getter_AddRefs(domDocument));
   if (!domDocument)
     return;
 
   nsCOMPtr<nsIDocument> document = do_QueryInterface(domDocument);
@@ -378,32 +378,32 @@ NS_IMETHODIMP nsChromeRegistry::RefreshS
   nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
   windowMediator->GetEnumerator(nsnull, getter_AddRefs(windowEnumerator));
   PRBool more;
   windowEnumerator->HasMoreElements(&more);
   while (more) {
     nsCOMPtr<nsISupports> protoWindow;
     windowEnumerator->GetNext(getter_AddRefs(protoWindow));
     if (protoWindow) {
-      nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(protoWindow);
+      nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
       if (domWindow)
         FlushSkinBindingsForWindow(domWindow);
     }
     windowEnumerator->HasMoreElements(&more);
   }
 
   FlushSkinCaches();
 
   windowMediator->GetEnumerator(nsnull, getter_AddRefs(windowEnumerator));
   windowEnumerator->HasMoreElements(&more);
   while (more) {
     nsCOMPtr<nsISupports> protoWindow;
     windowEnumerator->GetNext(getter_AddRefs(protoWindow));
     if (protoWindow) {
-      nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(protoWindow);
+      nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
       if (domWindow)
         RefreshWindow(domWindow);
     }
     windowEnumerator->HasMoreElements(&more);
   }
    
   return NS_OK;
 }
@@ -423,29 +423,28 @@ static PRBool IsChromeURI(nsIURI* aURI)
 {
     PRBool isChrome=PR_FALSE;
     if (NS_SUCCEEDED(aURI->SchemeIs("chrome", &isChrome)) && isChrome)
         return PR_TRUE;
     return PR_FALSE;
 }
 
 // XXXbsmedberg: move this to windowmediator
-nsresult nsChromeRegistry::RefreshWindow(nsIDOMWindowInternal* aWindow)
+nsresult nsChromeRegistry::RefreshWindow(nsIDOMWindow* aWindow)
 {
   // Deal with our subframes first.
   nsCOMPtr<nsIDOMWindowCollection> frames;
   aWindow->GetFrames(getter_AddRefs(frames));
   PRUint32 length;
   frames->GetLength(&length);
   PRUint32 j;
   for (j = 0; j < length; j++) {
     nsCOMPtr<nsIDOMWindow> childWin;
     frames->Item(j, getter_AddRefs(childWin));
-    nsCOMPtr<nsIDOMWindowInternal> childInt(do_QueryInterface(childWin));
-    RefreshWindow(childInt);
+    RefreshWindow(childWin);
   }
 
   nsresult rv;
   // Get the DOM document.
   nsCOMPtr<nsIDOMDocument> domDocument;
   aWindow->GetDocument(getter_AddRefs(domDocument));
   if (!domDocument)
     return NS_OK;
@@ -563,18 +562,17 @@ nsChromeRegistry::ReloadChrome()
       // Get each dom window
       PRBool more;
       rv = windowEnumerator->HasMoreElements(&more);
       if (NS_FAILED(rv)) return rv;
       while (more) {
         nsCOMPtr<nsISupports> protoWindow;
         rv = windowEnumerator->GetNext(getter_AddRefs(protoWindow));
         if (NS_SUCCEEDED(rv)) {
-          nsCOMPtr<nsIDOMWindowInternal> domWindow =
-            do_QueryInterface(protoWindow);
+          nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(protoWindow);
           if (domWindow) {
             nsCOMPtr<nsIDOMLocation> location;
             domWindow->GetLocation(getter_AddRefs(location));
             if (location) {
               rv = location->Reload(PR_FALSE);
               if (NS_FAILED(rv)) return rv;
             }
           }
--- a/chrome/src/nsChromeRegistry.h
+++ b/chrome/src/nsChromeRegistry.h
@@ -58,17 +58,17 @@
 #include "nsURIHashKey.h"
 #include "nsInterfaceHashtable.h"
 #include "nsXULAppAPI.h"
 #include "nsIResProtocolHandler.h"
 #include "nsIXPConnect.h"
 
 #include "mozilla/Omnijar.h"
 
-class nsIDOMWindowInternal;
+class nsIDOMWindow;
 class nsIURL;
 
 // The chrome registry is actually split between nsChromeRegistryChrome and
 // nsChromeRegistryContent. The work/data that is common to both resides in
 // the shared nsChromeRegistry implementation, with operations that only make
 // sense for one side erroring out in the other.
 
 // for component registration
@@ -125,17 +125,17 @@ protected:
   virtual nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
                                         const nsCString& aProvider,
                                         const nsCString& aPath) = 0;
   virtual nsresult GetFlagsFromPackage(const nsCString& aPackage,
                                        PRUint32* aFlags) = 0;
 
   nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
 
-  static nsresult RefreshWindow(nsIDOMWindowInternal* aWindow);
+  static nsresult RefreshWindow(nsIDOMWindow* aWindow);
   static nsresult GetProviderAndPath(nsIURL* aChromeURL,
                                      nsACString& aProvider, nsACString& aPath);
 
 public:
   static already_AddRefed<nsChromeRegistry> GetSingleton();
 
   struct ManifestProcessingContext
   {
--- a/content/base/src/nsContentSink.cpp
+++ b/content/base/src/nsContentSink.cpp
@@ -61,17 +61,17 @@
 #include "nsIParser.h"
 #include "nsContentErrors.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsIViewManager.h"
 #include "nsIContentViewer.h"
 #include "nsIAtom.h"
 #include "nsGkAtoms.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsNetCID.h"
 #include "nsIOfflineCacheUpdate.h"
 #include "nsIApplicationCache.h"
 #include "nsIApplicationCacheContainer.h"
 #include "nsIApplicationCacheChannel.h"
 #include "nsIScriptSecurityManager.h"
@@ -510,17 +510,17 @@ nsContentSink::ProcessHeaderData(nsIAtom
 
     // Note that a non-codebase principal (eg the system principal) will return
     // a null URI.
     nsCOMPtr<nsIURI> codebaseURI;
     rv = mDocument->NodePrincipal()->GetURI(getter_AddRefs(codebaseURI));
     NS_ENSURE_TRUE(codebaseURI, rv);
 
     nsCOMPtr<nsIPrompt> prompt;
-    nsCOMPtr<nsIDOMWindowInternal> window (do_QueryInterface(mDocument->GetScriptGlobalObject()));
+    nsCOMPtr<nsIDOMWindow> window = do_QueryInterface(mDocument->GetScriptGlobalObject());
     if (window) {
       window->GetPrompter(getter_AddRefs(prompt));
     }
 
     nsCOMPtr<nsIChannel> channel;
     if (mParser) {
       mParser->GetChannel(getter_AddRefs(channel));
     }
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -111,17 +111,17 @@
 #include "nsIWebNavigation.h"
 #include "nsIScriptError.h"
 
 #include "nsNetUtil.h"     // for NS_MakeAbsoluteURI
 
 #include "nsIScriptSecurityManager.h"
 #include "nsIPrincipal.h"
 
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDOMElement.h"
 #include "nsFocusManager.h"
 
 // for radio group stuff
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIRadioVisitor.h"
 #include "nsIFormControl.h"
@@ -5090,31 +5090,30 @@ nsDocument::GetDefaultView(nsIDOMWindow*
 }
 
 NS_IMETHODIMP
 nsDocument::GetLocation(nsIDOMLocation **_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = nsnull;
 
-  nsCOMPtr<nsIDOMWindowInternal> w(do_QueryInterface(mScriptGlobalObject));
+  nsCOMPtr<nsIDOMWindow> w = do_QueryInterface(mScriptGlobalObject);
 
   if (!w) {
     return NS_OK;
   }
 
   return w->GetLocation(_retval);
 }
 
 Element*
 nsIDocument::GetHtmlElement()
 {
   Element* rootElement = GetRootElement();
-  if (rootElement && rootElement->Tag() == nsGkAtoms::html &&
-      rootElement->IsHTML())
+  if (rootElement && rootElement->IsHTML(nsGkAtoms::html))
     return rootElement;
   return nsnull;
 }
 
 Element*
 nsIDocument::GetHtmlChildElement(nsIAtom* aTag)
 {
   Element* html = GetHtmlElement();
--- a/content/base/src/nsStyledElement.cpp
+++ b/content/base/src/nsStyledElement.cpp
@@ -48,16 +48,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsIDocument.h"
 #include "mozilla/css/StyleRule.h"
 #include "nsCSSParser.h"
 #include "mozilla/css/Loader.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsXULElement.h"
 #include "nsIDOMSVGStylable.h"
+#include "nsContentUtils.h"
 
 namespace css = mozilla::css;
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 nsIAtom*
 nsStyledElementNotElementCSSInlineStyle::GetClassAttributeName() const
--- a/content/events/src/nsDOMUIEvent.cpp
+++ b/content/events/src/nsDOMUIEvent.cpp
@@ -38,17 +38,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "base/basictypes.h"
 #include "IPC/IPCMessageUtils.h"
 #include "nsCOMPtr.h"
 #include "nsDOMUIEvent.h"
 #include "nsIPresShell.h"
 #include "nsIInterfaceRequestorUtils.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDOMNode.h"
 #include "nsIContent.h"
 #include "nsContentUtils.h"
 #include "nsEventStateManager.h"
 #include "nsIFrame.h"
 #include "nsLayoutUtils.h"
 #include "nsIScrollableFrame.h"
 
@@ -90,17 +90,17 @@ nsDOMUIEvent::nsDOMUIEvent(nsPresContext
   }
 
   mView = nsnull;
   if (mPresContext)
   {
     nsCOMPtr<nsISupports> container = mPresContext->GetContainer();
     if (container)
     {
-       nsCOMPtr<nsIDOMWindowInternal> window = do_GetInterface(container);
+       nsCOMPtr<nsIDOMWindow> window = do_GetInterface(container);
        if (window)
           mView = do_QueryInterface(window);
     }
   }
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMUIEvent)
 
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -60,37 +60,24 @@
 #include "nsIPresShell.h"
 #include "nsDOMEvent.h"
 #include "nsGkAtoms.h"
 #include "nsIEditorDocShell.h"
 #include "nsIFormControl.h"
 #include "nsIComboboxControlFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsIDOMNSHTMLElement.h"
-#include "nsIDOMHTMLAnchorElement.h"
-#include "nsIDOMHTMLInputElement.h"
-#include "nsIDOMHTMLLabelElement.h"
-#include "nsIDOMHTMLSelectElement.h"
-#include "nsIDOMHTMLTextAreaElement.h"
-#include "nsIDOMHTMLAreaElement.h"
-#include "nsIDOMHTMLButtonElement.h"
-#include "nsIDOMHTMLObjectElement.h"
-#include "nsIDOMHTMLImageElement.h"
-#include "nsIDOMHTMLMapElement.h"
-#include "nsIDOMHTMLBodyElement.h"
 #include "nsIDOMXULControlElement.h"
-#include "nsIDOMXULTextboxElement.h"
 #include "nsINameSpaceManager.h"
 #include "nsIBaseWindow.h"
 #include "nsIView.h"
 #include "nsIViewManager.h"
 #include "nsISelection.h"
 #include "nsFrameSelection.h"
 #include "nsIPrivateDOMEvent.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowRoot.h"
 #include "nsIEnumerator.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShellTreeNode.h"
 #include "nsIWebNavigation.h"
 #include "nsIContentViewer.h"
 #ifdef MOZ_XUL
@@ -111,17 +98,16 @@
 #include "nsIMarkupDocumentViewer.h"
 #include "nsIDOMMouseScrollEvent.h"
 #include "nsIDOMDragEvent.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMNSUIEvent.h"
 #include "nsDOMDragEvent.h"
 #include "nsIDOMNSEditableElement.h"
 
-#include "nsIDOMRange.h"
 #include "nsCaret.h"
 #include "nsILookAndFeel.h"
 #include "nsWidgetsCID.h"
 
 #include "nsSubDocumentFrame.h"
 #include "nsIFrameTraversal.h"
 #include "nsLayoutCID.h"
 #include "nsLayoutUtils.h"
@@ -213,17 +199,17 @@ PrintDocTree(nsIDocShellTreeItem* aParen
   nsRefPtr<nsPresContext> presContext;
   parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
   nsCOMPtr<nsIContentViewer> cv;
   parentAsDocShell->GetContentViewer(getter_AddRefs(cv));
   nsCOMPtr<nsIDOMDocument> domDoc;
   if (cv)
     cv->GetDOMDocument(getter_AddRefs(domDoc));
   nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
-  nsCOMPtr<nsIDOMWindowInternal> domwin = doc ? doc->GetWindow() : nsnull;
+  nsCOMPtr<nsIDOMWindow> domwin = doc ? doc->GetWindow() : nsnull;
   nsIURI* uri = doc ? doc->GetDocumentURI() : nsnull;
 
   printf("DS %p  Type %s  Cnt %d  Doc %p  DW %p  EM %p%c",
     static_cast<void*>(parentAsDocShell.get()),
     type==nsIDocShellTreeItem::typeChrome?"Chrome":"Content",
     childWebshellCount, static_cast<void*>(doc.get()),
     static_cast<void*>(domwin.get()),
     static_cast<void*>(presContext ? presContext->EventStateManager() : nsnull),
@@ -2416,17 +2402,17 @@ nsEventStateManager::GetMarkupDocumentVi
   if(!fm) return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIDOMWindow> focusedWindow;
   fm->GetFocusedWindow(getter_AddRefs(focusedWindow));
 
   nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(focusedWindow);
   if(!ourWindow) return NS_ERROR_FAILURE;
 
-  nsIDOMWindowInternal *rootWindow = ourWindow->GetPrivateRoot();
+  nsIDOMWindow *rootWindow = ourWindow->GetPrivateRoot();
   if(!rootWindow) return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIDOMWindow> contentWindow;
   rootWindow->GetContent(getter_AddRefs(contentWindow));
   if(!contentWindow) return NS_ERROR_FAILURE;
 
   nsIDocument *doc = GetDocumentFromWindow(contentWindow);
   if(!doc) return NS_ERROR_FAILURE;
--- a/content/html/content/public/nsIFormSubmitObserver.idl
+++ b/content/html/content/public/nsIFormSubmitObserver.idl
@@ -36,24 +36,24 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 
 #include "nsISupports.idl"
 
 interface nsIDOMHTMLFormElement;
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIURI;
 interface nsIArray;
 
-[scriptable, uuid(0b3cc84d-25d2-448e-ae71-746ee6e41c2d)]
+[scriptable, uuid(534ab795-6a99-4195-bfab-cfdd7836657d)]
 interface nsIFormSubmitObserver: nsISupports
 {
-  void notify(in nsIDOMHTMLFormElement formNode, in nsIDOMWindowInternal window, in nsIURI actionURL, out boolean cancelSubmit);
+  void notify(in nsIDOMHTMLFormElement formNode, in nsIDOMWindow window, in nsIURI actionURL, out boolean cancelSubmit);
 
   void notifyInvalidSubmit(in nsIDOMHTMLFormElement formNode,
                            in nsIArray invalidElements);
 };
 
 %{C++
 #define NS_FORMSUBMIT_SUBJECT "formsubmit"
 #define NS_EARLYFORMSUBMIT_SUBJECT "earlyformsubmit"
--- a/content/html/content/src/nsHTMLImageElement.cpp
+++ b/content/html/content/src/nsHTMLImageElement.cpp
@@ -40,17 +40,16 @@
 #include "nsImageLoadingContent.h"
 #include "nsGkAtoms.h"
 #include "nsStyleConsts.h"
 #include "nsPresContext.h"
 #include "nsMappedAttributes.h"
 #include "nsIJSNativeInitializer.h"
 #include "nsSize.h"
 #include "nsIDocument.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMDocument.h"
 #include "nsIScriptContext.h"
 #include "nsIURL.h"
 #include "nsIIOService.h"
 #include "nsIServiceManager.h"
 #include "nsNetUtil.h"
 #include "nsContentUtils.h"
 #include "nsIFrame.h"
--- a/content/html/content/src/nsHTMLInputElement.cpp
+++ b/content/html/content/src/nsHTMLInputElement.cpp
@@ -32,16 +32,18 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "nsHTMLInputElement.h"
+
 #include "nsIDOMHTMLInputElement.h"
 #include "nsITextControlElement.h"
 #include "nsIDOMNSEditableElement.h"
 #include "nsIRadioVisitor.h"
 #include "nsIPhonetic.h"
 
 #include "nsIControllers.h"
 #include "nsFocusManager.h"
@@ -106,32 +108,29 @@
 #include "nsIContentURIGrouper.h"
 #include "nsIContentPrefService.h"
 #include "nsIObserverService.h"
 #include "nsIPopupWindowManager.h"
 #include "nsGlobalWindow.h"
 
 // input type=image
 #include "nsImageLoadingContent.h"
-#include "nsIDOMWindowInternal.h"
 
 #include "mozAutoDocUpdate.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsContentUtils.h"
 #include "nsRadioVisitor.h"
 
 #include "nsTextEditRules.h"
 
 // JS headers are needed for the pattern attribute.
 #include "jsapi.h"
 #include "jscntxt.h"
 
-#include "nsHTMLInputElement.h"
-
 using namespace mozilla::dom;
 
 // XXX align=left, hspace, vspace, border? other nav4 attrs
 
 static NS_DEFINE_CID(kXULControllersCID,  NS_XULCONTROLLERS_CID);
 static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
 
 // First bits are needed for the control type.
@@ -263,17 +262,17 @@ protected:
   PopupControlState mPopupControlState;
 };
 
 NS_IMETHODIMP
 AsyncClickHandler::Run()
 {
   nsresult rv;
 
-  // Get parent nsIDOMWindowInternal object.
+  // Get parent nsPIDOMWindow object.
   nsCOMPtr<nsIDocument> doc = mInput->GetOwnerDoc();
   if (!doc)
     return NS_ERROR_FAILURE;
 
   nsPIDOMWindow* win = doc->GetWindow();
   if (!win) {
     return NS_ERROR_FAILURE;
   }
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -1523,17 +1523,17 @@ nsHTMLDocument::Open(const nsAString& aC
                      JSContext* cx, PRUint8 aOptionalArgCount,
                      nsISupports** aReturn)
 {
   NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
                "XOW should have caught this!");
 
   // When called with 3 or more arguments, document.open() calls window.open().
   if (aOptionalArgCount > 2) {
-    nsCOMPtr<nsIDOMWindowInternal> window = GetWindowInternal();
+    nsCOMPtr<nsIDOMWindow> window = GetWindowInternal();
     if (!window) {
       return NS_OK;
     }
     nsCOMPtr<nsIDOMWindow> newWindow;
     nsresult rv = window->Open(aContentTypeOrUrl, aReplaceOrName, aFeatures,
                                getter_AddRefs(newWindow));
     *aReturn = newWindow.forget().get();
     return rv;
--- a/content/smil/nsDOMTimeEvent.cpp
+++ b/content/smil/nsDOMTimeEvent.cpp
@@ -57,17 +57,17 @@ nsDOMTimeEvent::nsDOMTimeEvent(nsPresCon
   }
 
   mEvent->flags |= NS_EVENT_FLAG_CANT_BUBBLE |
                    NS_EVENT_FLAG_CANT_CANCEL;
 
   if (mPresContext) {
     nsCOMPtr<nsISupports> container = mPresContext->GetContainer();
     if (container) {
-      nsCOMPtr<nsIDOMWindowInternal> window = do_GetInterface(container);
+      nsCOMPtr<nsIDOMWindow> window = do_GetInterface(container);
       if (window) {
         mView = do_QueryInterface(window);
       }
     }
   }
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMTimeEvent)
--- a/content/xbl/src/nsXBLPrototypeHandler.cpp
+++ b/content/xbl/src/nsXBLPrototypeHandler.cpp
@@ -60,17 +60,17 @@
 #include "nsFocusManager.h"
 #include "nsEventListenerManager.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMEventListener.h"
 #include "nsIPrivateDOMEvent.h"
 #include "nsIDOMNSEvent.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowRoot.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIServiceManager.h"
 #include "nsIScriptError.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsGkAtoms.h"
 #include "nsGUIEvent.h"
 #include "nsIXPConnect.h"
 #include "nsIDOMScriptObjectFactory.h"
@@ -565,17 +565,17 @@ nsXBLPrototypeHandler::GetController(nsI
 
   if (!controllers) {
     nsCOMPtr<nsIDOMHTMLInputElement> htmlInputElement(do_QueryInterface(aTarget));
     if (htmlInputElement)
       htmlInputElement->GetControllers(getter_AddRefs(controllers));
   }
 
   if (!controllers) {
-    nsCOMPtr<nsIDOMWindowInternal> domWindow(do_QueryInterface(aTarget));
+    nsCOMPtr<nsIDOMWindow> domWindow(do_QueryInterface(aTarget));
     if (domWindow)
       domWindow->GetControllers(getter_AddRefs(controllers));
   }
 
   // Return the first controller.
   // XXX This code should be checking the command name and using supportscommand and
   // iscommandenabled.
   nsIController* controller;
--- a/content/xbl/src/nsXBLWindowKeyHandler.cpp
+++ b/content/xbl/src/nsXBLWindowKeyHandler.cpp
@@ -49,17 +49,16 @@
 #include "nsXBLService.h"
 #include "nsIServiceManager.h"
 #include "nsGkAtoms.h"
 #include "nsXBLDocumentInfo.h"
 #include "nsIDOMElement.h"
 #include "nsINativeKeyBindings.h"
 #include "nsIController.h"
 #include "nsIControllers.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsFocusManager.h"
 #include "nsPIWindowRoot.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 #include "nsContentUtils.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsIDOMDocument.h"
 #include "nsPIWindowRoot.h"
--- a/content/xml/document/src/nsXMLContentSink.cpp
+++ b/content/xml/document/src/nsXMLContentSink.cpp
@@ -75,17 +75,16 @@
 #include "nsIScriptElement.h"
 #include "nsScriptLoader.h"
 #include "nsStyleLinkElement.h"
 #include "nsIImageLoadingContent.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsICookieService.h"
 #include "nsIPrompt.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIChannel.h"
 #include "nsIPrincipal.h"
 #include "nsXMLPrettyPrinter.h"
 #include "nsNodeInfoManager.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIContentPolicy.h"
 #include "nsIDocumentViewer.h"
 #include "nsContentPolicyUtils.h"
--- a/content/xul/content/src/nsXULPopupListener.cpp
+++ b/content/xul/content/src/nsXULPopupListener.cpp
@@ -52,17 +52,17 @@
 #include "nsIDOMNodeList.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentXBL.h"
 #include "nsContentCID.h"
 #include "nsContentUtils.h"
 #include "nsXULPopupManager.h"
 #include "nsEventStateManager.h"
 #include "nsIScriptContext.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIDocument.h"
 #include "nsIDOMNSUIEvent.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMNSEvent.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptSecurityManager.h"
--- a/content/xul/document/public/nsIController.idl
+++ b/content/xul/document/public/nsIController.idl
@@ -65,17 +65,17 @@ interface nsICommandController : nsISupp
     
   void        doCommandWithParams(in string command, in nsICommandParams aCommandParams);
 
 };
 
 
 /*
   An API for registering commands in groups, to allow for 
-  updating via nsIDOMWindowInternal::UpdateCommands.
+  updating via nsIDOMWindow::UpdateCommands.
 */
 interface nsISimpleEnumerator;
 
 [scriptable, uuid(9F82C404-1C7B-11D5-A73C-ECA43CA836FC)]
 interface nsIControllerCommandGroup : nsISupports
 {
 
   void  addCommandToGroup(in string aCommand, in string aGroup);
--- a/content/xul/document/src/nsXULCommandDispatcher.cpp
+++ b/content/xul/document/src/nsXULCommandDispatcher.cpp
@@ -45,17 +45,17 @@
 
 #include "nsIContent.h"
 #include "nsFocusManager.h"
 #include "nsIControllers.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMElement.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDOMXULElement.h"
 #include "nsIDocument.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowRoot.h"
 #include "nsRDFCID.h"
--- a/docshell/base/nsDSURIContentListener.cpp
+++ b/docshell/base/nsDSURIContentListener.cpp
@@ -1,11 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
  *
  * Software distributed under the License is distributed on an "AS IS" basis,
@@ -39,17 +38,17 @@
 
 #include "nsDocShell.h"
 #include "nsDSURIContentListener.h"
 #include "nsIChannel.h"
 #include "nsServiceManagerUtils.h"
 #include "nsXPIDLString.h"
 #include "nsDocShellCID.h"
 #include "nsIWebNavigationInfo.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsAutoPtr.h"
 #include "nsIHttpChannel.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsNetError.h"
 
 //*****************************************************************************
 //***    nsDSURIContentListener: Object Management
 //*****************************************************************************
@@ -153,17 +152,17 @@ nsDSURIContentListener::DoContent(const 
     }
 
     if (NS_FAILED(rv)) {
        // it's okay if we don't know how to handle the content   
         return NS_OK;
     }
 
     if (loadFlags & nsIChannel::LOAD_RETARGETED_DOCUMENT_URI) {
-        nsCOMPtr<nsIDOMWindowInternal> domWindow = do_GetInterface(static_cast<nsIDocShell*>(mDocShell));
+        nsCOMPtr<nsIDOMWindow> domWindow = do_GetInterface(static_cast<nsIDocShell*>(mDocShell));
         NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);
         domWindow->Focus();
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -48,17 +48,16 @@
 
 #include "nsIBrowserDOMWindow.h"
 #include "nsIComponentManager.h"
 #include "nsIContent.h"
 #include "mozilla/dom/Element.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMElement.h"
-#include "nsIDOMStorageObsolete.h"
 #include "nsIDOMStorage.h"
 #include "nsPIDOMStorage.h"
 #include "nsIDocumentViewer.h"
 #include "nsIDocumentLoaderFactory.h"
 #include "nsCURILoader.h"
 #include "nsURILoader.h"
 #include "nsDocShellCID.h"
 #include "nsLayoutCID.h"
@@ -66,17 +65,17 @@
 #include "nsIDOMScriptObjectFactory.h"
 #include "nsNetUtil.h"
 #include "nsRect.h"
 #include "prprf.h"
 #include "nsIMarkupDocumentViewer.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsIDOMChromeWindow.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsPoint.h"
 #include "nsGfxCIID.h"
 #include "nsIObserverService.h"
 #include "nsIPrompt.h"
 #include "nsIAuthPrompt.h"
 #include "nsIAuthPrompt2.h"
 #include "nsTextFormatter.h"
@@ -170,19 +169,16 @@
 #include "nsPIWindowRoot.h"
 #include "nsIDOMDocument.h"
 #include "nsICachingChannel.h"
 #include "nsICacheVisitor.h"
 #include "nsICacheEntryDescriptor.h"
 #include "nsIMultiPartChannel.h"
 #include "nsIWyciwygChannel.h"
 
-// The following are for bug #13871: Prevent frameset spoofing
-#include "nsIHTMLDocument.h"
-
 // For reporting errors with the console service.
 // These can go away if error reporting is propagated up past nsDocShell.
 #include "nsIConsoleService.h"
 #include "nsIScriptError.h"
 
 // used to dispatch urls to default protocol handlers
 #include "nsCExternalHandlerService.h"
 #include "nsIExternalProtocolService.h"
@@ -918,18 +914,17 @@ NS_IMETHODIMP nsDocShell::GetInterface(c
     }
     else if (aIID.Equals(NS_GET_IID(nsIURIContentListener))) {
         *aSink = mContentListener;
     }
     else if (aIID.Equals(NS_GET_IID(nsIScriptGlobalObject)) &&
              NS_SUCCEEDED(EnsureScriptEnvironment())) {
         *aSink = mScriptGlobal;
     }
-    else if ((aIID.Equals(NS_GET_IID(nsIDOMWindowInternal)) ||
-              aIID.Equals(NS_GET_IID(nsPIDOMWindow)) ||
+    else if ((aIID.Equals(NS_GET_IID(nsPIDOMWindow)) ||
               aIID.Equals(NS_GET_IID(nsIDOMWindow))) &&
              NS_SUCCEEDED(EnsureScriptEnvironment())) {
         return mScriptGlobal->QueryInterface(aIID, aSink);
     }
     else if (aIID.Equals(NS_GET_IID(nsIDOMDocument)) &&
              NS_SUCCEEDED(EnsureContentViewer())) {
         mContentViewer->GetDOMDocument((nsIDOMDocument **) aSink);
         return *aSink ? NS_OK : NS_NOINTERFACE;
@@ -2771,40 +2766,38 @@ nsDocShell::CanAccessItem(nsIDocShellTre
         return PR_FALSE;
     }
 
     if (!aConsiderOpener) {
         // All done here
         return PR_FALSE;
     }
 
-    nsCOMPtr<nsIDOMWindow> targetWindow(do_GetInterface(aTargetItem));
-    nsCOMPtr<nsIDOMWindowInternal> targetInternal(do_QueryInterface(targetWindow));
-    if (!targetInternal) {
+    nsCOMPtr<nsIDOMWindow> targetWindow = do_GetInterface(aTargetItem);
+    if (!targetWindow) {
         NS_ERROR("This should not happen, really");
         return PR_FALSE;
     }
 
-    nsCOMPtr<nsIDOMWindowInternal> targetOpener;
-    targetInternal->GetOpener(getter_AddRefs(targetOpener));
+    nsCOMPtr<nsIDOMWindow> targetOpener;
+    targetWindow->GetOpener(getter_AddRefs(targetOpener));
     nsCOMPtr<nsIWebNavigation> openerWebNav(do_GetInterface(targetOpener));
     nsCOMPtr<nsIDocShellTreeItem> openerItem(do_QueryInterface(openerWebNav));
 
     if (!openerItem) {
         return PR_FALSE;
     }
 
     return CanAccessItem(openerItem, aAccessingItem, PR_FALSE);    
 }
 
 static PRBool
 ItemIsActive(nsIDocShellTreeItem *aItem)
 {
-    nsCOMPtr<nsIDOMWindow> tmp(do_GetInterface(aItem));
-    nsCOMPtr<nsIDOMWindowInternal> window(do_QueryInterface(tmp));
+    nsCOMPtr<nsIDOMWindow> window(do_GetInterface(aItem));
 
     if (window) {
         PRBool isClosed;
 
         if (NS_SUCCEEDED(window->GetClosed(&isClosed)) && !isClosed) {
             return PR_TRUE;
         }
     }
@@ -2984,17 +2977,17 @@ PrintDocTree(nsIDocShellTreeItem * aPare
   PRInt32 type;
   aParentNode->GetItemType(&type);
   nsCOMPtr<nsIPresShell> presShell;
   parentAsDocShell->GetPresShell(getter_AddRefs(presShell));
   nsRefPtr<nsPresContext> presContext;
   parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
   nsIDocument *doc = presShell->GetDocument();
 
-  nsCOMPtr<nsIDOMWindowInternal> domwin(doc->GetWindow());
+  nsCOMPtr<nsIDOMWindow> domwin(doc->GetWindow());
 
   nsCOMPtr<nsIWidget> widget;
   nsIViewManager* vm = presShell->GetViewManager();
   if (vm) {
     vm->GetWidget(getter_AddRefs(widget));
   }
   dom::Element* rootElement = doc->GetRootElement();
 
@@ -8229,17 +8222,17 @@ nsDocShell::InternalLoad(nsIURI * aURI,
         nsCOMPtr<nsIDocShellTreeItem> targetItem;
         FindItemWithName(aWindowTarget, nsnull, this,
                          getter_AddRefs(targetItem));
 
         nsCOMPtr<nsIDocShell> targetDocShell = do_QueryInterface(targetItem);
         
         PRBool isNewWindow = PR_FALSE;
         if (!targetDocShell) {
-            nsCOMPtr<nsIDOMWindowInternal> win =
+            nsCOMPtr<nsIDOMWindow> win =
                 do_GetInterface(GetAsSupports(this));
             NS_ENSURE_TRUE(win, NS_ERROR_NOT_AVAILABLE);
 
             nsDependentString name(aWindowTarget);
             nsCOMPtr<nsIDOMWindow> newWin;
             rv = win->Open(EmptyString(), // URL to load
                            name,          // window name
                            EmptyString(), // Features
@@ -8285,17 +8278,17 @@ nsDocShell::InternalLoad(nsIURI * aURI,
                 if (isNewWindow) {
                     //
                     // At this point, a new window has been created, but the
                     // URI did not have any data associated with it...
                     //
                     // So, the best we can do, is to tear down the new window
                     // that was just created!
                     //
-                    nsCOMPtr<nsIDOMWindowInternal> domWin =
+                    nsCOMPtr<nsIDOMWindow> domWin =
                         do_GetInterface(targetDocShell);
                     if (domWin) {
                         domWin->Close();
                     }
                 }
                 //
                 // NS_ERROR_NO_CONTENT should not be returned to the
                 // caller... This is an internal error code indicating that
--- a/docshell/base/nsIContentViewerFile.idl
+++ b/docshell/base/nsIContentViewerFile.idl
@@ -35,36 +35,35 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 #include "nsIPrintSettings.idl"
 
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIWebProgressListener;
 
 %{ C++
 #include <stdio.h>
 %}
 
 [ptr] native FILE(FILE);
 
 /**
  * The nsIDocShellFile    
  */
 
-[scriptable, uuid(6317f32c-9bc7-11d3-bccc-0060b0fc76bd)]
+[scriptable, uuid(1b373597-6132-49f7-940e-6ff62fca5d35)]
 interface nsIContentViewerFile : nsISupports
 {
-  /* readonly attribute boolean printable; */
   readonly attribute boolean printable;
 
   [noscript] void print(in boolean aSilent,
                         in FILE    aDebugFile, 
                         in nsIPrintSettings aPrintSettings);
 
-  [noscript] void printWithParent(in nsIDOMWindowInternal aParentWin,
+  [noscript] void printWithParent(in nsIDOMWindow aParentWin,
                                   in nsIPrintSettings aThePrintSettings,
                                   in nsIWebProgressListener aWPListener);
 
 };
--- a/dom/base/nsBarProps.cpp
+++ b/dom/base/nsBarProps.cpp
@@ -31,26 +31,27 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "nsBarProps.h"
+
 #include "nsCOMPtr.h"
 #include "nscore.h"
-#include "nsBarProps.h"
 #include "nsGlobalWindow.h"
 #include "nsStyleConsts.h"
 #include "nsIDocShell.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScrollable.h"
 #include "nsIWebBrowserChrome.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsDOMClassInfo.h"
 
 //
 //  Basic (virtual) BarProp class implementation
 //
 nsBarProp::nsBarProp(nsGlobalWindow *aWindow)
 {
   mDOMWindow = aWindow;
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -109,17 +109,17 @@
 #include "nsJSEnvironment.h"
 
 // DOM base includes
 #include "nsIDOMPluginArray.h"
 #include "nsIDOMPlugin.h"
 #include "nsIDOMMimeTypeArray.h"
 #include "nsIDOMMimeType.h"
 #include "nsIDOMLocation.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDOMJSWindow.h"
 #include "nsIDOMWindowCollection.h"
 #include "nsIDOMHistory.h"
 #include "nsIDOMMediaList.h"
 #include "nsIDOMChromeWindow.h"
 #include "nsIDOMConstructor.h"
 #include "nsIDOMPerformanceTiming.h"
@@ -2387,47 +2387,43 @@ nsDOMClassInfo::Init()
   rv = stack->GetSafeJSContext(&cx);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (nsGlobalWindow::HasIndexedDBSupport()) {
     if (nsGlobalWindow::HasPerformanceSupport()) {
       DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-        DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowPerformance)
       DOM_CLASSINFO_MAP_END
     } else {
       DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-        DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
       DOM_CLASSINFO_MAP_END
     }
   } else {
     if (nsGlobalWindow::HasPerformanceSupport()) {
       DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-        DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowPerformance)
       DOM_CLASSINFO_MAP_END
     } else {
       DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-        DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
         DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
       DOM_CLASSINFO_MAP_END
     }
   }
 
   DOM_CLASSINFO_MAP_BEGIN(WindowUtils, nsIDOMWindowUtils)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowUtils)
@@ -3138,17 +3134,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMProcessingInstruction)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ChromeWindow, nsIDOMWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMChromeWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(RangeException, nsIDOMRangeException)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMRangeException)
@@ -4033,17 +4028,16 @@ nsDOMClassInfo::Init()
 
   DOM_CLASSINFO_MAP_BEGIN(DOMStringMap, nsIDOMDOMStringMap)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMStringMap)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ModalContentWindow, nsIDOMWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageIndexedDB)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMModalContentWindow)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(DataContainerEvent, nsIDOMDataContainerEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDataContainerEvent)
@@ -5566,17 +5560,17 @@ nsWindowSH::SetProperty(nsIXPConnectWrap
                         JSObject *obj, jsid id, jsval *vp, PRBool *_retval)
 {
   if (id == sLocation_id) {
     JSAutoRequest ar(cx);
 
     JSString *val = ::JS_ValueToString(cx, *vp);
     NS_ENSURE_TRUE(val, NS_ERROR_UNEXPECTED);
 
-    nsCOMPtr<nsIDOMWindowInternal> window(do_QueryWrappedNative(wrapper));
+    nsCOMPtr<nsIDOMWindow> window = do_QueryWrappedNative(wrapper);
     NS_ENSURE_TRUE(window, NS_ERROR_UNEXPECTED);
 
     nsCOMPtr<nsIDOMLocation> location;
     nsresult rv = window->GetLocation(getter_AddRefs(location));
     NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && location, rv);
 
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     rv = WrapNative(cx, obj, location, &NS_GET_IID(nsIDOMLocation), PR_TRUE,
@@ -6910,17 +6904,17 @@ nsWindowSH::NewResolve(nsIXPConnectWrapp
         // again for this property name.
 
         JSObject *wrapperObj;
         wrapper->GetJSObject(&wrapperObj);
 
         jsval v;
         nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
         rv = WrapNative(cx, wrapperObj, child_win,
-                        &NS_GET_IID(nsIDOMWindowInternal), PR_TRUE, &v,
+                        &NS_GET_IID(nsIDOMWindow), PR_TRUE, &v,
                         getter_AddRefs(holder));
         NS_ENSURE_SUCCESS(rv, rv);
 
         JSAutoRequest ar(cx);
 
         PRBool ok = JS_WrapValue(cx, &v) &&
                     JS_DefinePropertyById(cx, obj, id, v, nsnull, nsnull, 0);
         if (!ok) {
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1338,17 +1338,16 @@ nsGlobalWindow::FreeInnerObjects(PRBool 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsGlobalWindow)
 
 DOMCI_DATA(Window, nsGlobalWindow)
 
 // QueryInterface implementation for nsGlobalWindow
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsGlobalWindow)
   // Make sure this matches the cast in nsGlobalWindow::FromWrapper()
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptGlobalObject)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMWindowInternal)
   NS_INTERFACE_MAP_ENTRY(nsIDOMWindow)
   NS_INTERFACE_MAP_ENTRY(nsIDOMJSWindow)
   NS_INTERFACE_MAP_ENTRY(nsIScriptGlobalObject)
   NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
   NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)
   NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow)
   NS_INTERFACE_MAP_ENTRY(nsIDOMStorageWindow)
   NS_INTERFACE_MAP_ENTRY(nsIDOMStorageIndexedDB)
@@ -1834,18 +1833,16 @@ nsGlobalWindow::SetNewDocument(nsIDocume
   if (aForceReuseInnerWindow &&
       !wouldReuseInnerWindow &&
       mDoc &&
       mDoc->NodePrincipal() != aDocument->NodePrincipal()) {
     NS_ERROR("Attempted forced inner window reuse while changing principal");
     return NS_ERROR_UNEXPECTED;
   }
 
-  nsresult rv = NS_OK;
-
   nsCOMPtr<nsIDocument> oldDoc(do_QueryInterface(mDocument));
 
   nsIScriptContext *scx = GetContextInternal();
   NS_ENSURE_TRUE(scx, NS_ERROR_NOT_INITIALIZED);
 
   JSContext *cx = (JSContext *)scx->GetNativeContext();
 #ifndef MOZ_DISABLE_DOMCRYPTO
   // clear smartcard events, our document has gone away.
@@ -1854,19 +1851,19 @@ nsGlobalWindow::SetNewDocument(nsIDocume
   }
 #endif
   if (!mDocument) {
     // First document load.
 
     // Get our private root. If it is equal to us, then we need to
     // attach our global key bindings that handles browser scrolling
     // and other browser commands.
-    nsIDOMWindowInternal *internal = nsGlobalWindow::GetPrivateRoot();
-
-    if (internal == static_cast<nsIDOMWindowInternal *>(this)) {
+    nsIDOMWindow* privateRoot = nsGlobalWindow::GetPrivateRoot();
+
+    if (privateRoot == static_cast<nsIDOMWindow*>(this)) {
       nsCOMPtr<nsIXBLService> xblService = do_GetService("@mozilla.org/xbl;1");
       if (xblService) {
         xblService->AttachGlobalKeyHandler(mChromeEventHandler);
       }
     }
   }
 
   /* No mDocShell means we're already been partially closed down.  When that
@@ -1879,16 +1876,18 @@ nsGlobalWindow::SetNewDocument(nsIDocume
   PRBool reUseInnerWindow = aForceReuseInnerWindow || wouldReuseInnerWindow;
 
   // Remember the old document's principal.
   nsIPrincipal *oldPrincipal = nsnull;
   if (oldDoc) {
     oldPrincipal = oldDoc->NodePrincipal();
   }
 
+  nsresult rv = NS_OK;
+
   // Drop our reference to the navigator object unless we're reusing
   // the existing inner window or the new document is from the same
   // origin as the old document.
   if (!reUseInnerWindow && mNavigator && oldPrincipal) {
     PRBool equal;
     rv = oldPrincipal->Equals(aDocument->NodePrincipal(), &equal);
 
     if (NS_FAILED(rv) || !equal) {
@@ -2472,17 +2471,17 @@ nsGlobalWindow::SetDocShell(nsIDocShell*
 
     PRBool docShellActive;
     mDocShell->GetIsActive(&docShellActive);
     mIsBackground = !docShellActive;
   }
 }
 
 void
-nsGlobalWindow::SetOpenerWindow(nsIDOMWindowInternal* aOpener,
+nsGlobalWindow::SetOpenerWindow(nsIDOMWindow* aOpener,
                                 PRBool aOriginalOpener)
 {
   FORWARD_TO_OUTER_VOID(SetOpenerWindow, (aOpener, aOriginalOpener));
 
   NS_ASSERTION(!aOriginalOpener || !mSetOpenerWindowCalled,
                "aOriginalOpener is true, but not first call to "
                "SetOpenerWindow!");
   NS_ASSERTION(aOpener || !aOriginalOpener,
@@ -2907,36 +2906,32 @@ nsGlobalWindow::GetDocument(nsIDOMDocume
   if (!mDocument && (docShell = GetDocShell()))
     nsCOMPtr<nsIDOMDocument> domdoc(do_GetInterface(docShell));
 
   NS_IF_ADDREF(*aDocument = mDocument);
 
   return NS_OK;
 }
 
-//*****************************************************************************
-// nsGlobalWindow::nsIDOMWindowInternal
-//*****************************************************************************
-
-NS_IMETHODIMP
-nsGlobalWindow::GetWindow(nsIDOMWindowInternal** aWindow)
+NS_IMETHODIMP
+nsGlobalWindow::GetWindow(nsIDOMWindow** aWindow)
 {
   FORWARD_TO_OUTER(GetWindow, (aWindow), NS_ERROR_NOT_INITIALIZED);
 
-  *aWindow = static_cast<nsIDOMWindowInternal *>(this);
+  *aWindow = static_cast<nsIDOMWindow*>(this);
   NS_ADDREF(*aWindow);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsGlobalWindow::GetSelf(nsIDOMWindowInternal** aWindow)
+nsGlobalWindow::GetSelf(nsIDOMWindow** aWindow)
 {
   FORWARD_TO_OUTER(GetSelf, (aWindow), NS_ERROR_NOT_INITIALIZED);
 
-  *aWindow = static_cast<nsIDOMWindowInternal *>(this);
+  *aWindow = static_cast<nsIDOMWindow*>(this);
   NS_ADDREF(*aWindow);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::GetNavigator(nsIDOMNavigator** aNavigator)
 {
   FORWARD_TO_OUTER(GetNavigator, (aNavigator), NS_ERROR_NOT_INITIALIZED);
@@ -3037,17 +3032,17 @@ nsGlobalWindow::GetParent(nsIDOMWindow**
   docShellAsItem->GetSameTypeParent(getter_AddRefs(parent));
 
   if (parent) {
     nsCOMPtr<nsIScriptGlobalObject> globalObject(do_GetInterface(parent));
     NS_ENSURE_SUCCESS(CallQueryInterface(globalObject.get(), aParent),
                       NS_ERROR_FAILURE);
   }
   else {
-    *aParent = static_cast<nsIDOMWindowInternal *>(this);
+    *aParent = static_cast<nsIDOMWindow*>(this);
     NS_ADDREF(*aParent);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::GetTop(nsIDOMWindow** aTop)
 {
@@ -3099,17 +3094,17 @@ nsGlobalWindow::GetContent(nsIDOMWindow*
   if (!primaryContent) {
     nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
     GetTreeOwner(getter_AddRefs(treeOwner));
     NS_ENSURE_TRUE(treeOwner, NS_ERROR_FAILURE);
 
     treeOwner->GetPrimaryContentShell(getter_AddRefs(primaryContent));
   }
 
-  nsCOMPtr<nsIDOMWindowInternal> domWindow(do_GetInterface(primaryContent));
+  nsCOMPtr<nsIDOMWindow> domWindow(do_GetInterface(primaryContent));
   NS_IF_ADDREF(*aContent = domWindow);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
 {
@@ -3356,17 +3351,17 @@ nsGlobalWindow::GetControllers(nsIContro
   }
 
   *aResult = mControllers;
   NS_ADDREF(*aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsGlobalWindow::GetOpener(nsIDOMWindowInternal** aOpener)
+nsGlobalWindow::GetOpener(nsIDOMWindow** aOpener)
 {
   FORWARD_TO_OUTER(GetOpener, (aOpener), NS_ERROR_NOT_INITIALIZED);
 
   *aOpener = nsnull;
 
   nsCOMPtr<nsPIDOMWindow> opener = do_QueryReferent(mOpener);
   if (!opener) {
     return NS_OK;
@@ -3408,17 +3403,17 @@ nsGlobalWindow::GetOpener(nsIDOMWindowIn
     }
   }
 
   NS_IF_ADDREF(*aOpener);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsGlobalWindow::SetOpener(nsIDOMWindowInternal* aOpener)
+nsGlobalWindow::SetOpener(nsIDOMWindow* aOpener)
 {
   // check if we were called from a privileged chrome script.
   // If not, opener is settable only to null.
   if (aOpener && !nsContentUtils::IsCallerTrustedForWrite()) {
     return NS_OK;
   }
 
   SetOpenerWindow(aOpener, PR_FALSE);
@@ -4399,17 +4394,17 @@ nsGlobalWindow::SetFullScreen(PRBool aFu
   }
 
   // SetFullScreen needs to be called on the root window, so get that
   // via the DocShell tree, and if we are not already the root,
   // call SetFullScreen on that window instead.
   nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryInterface(mDocShell);
   nsCOMPtr<nsIDocShellTreeItem> rootItem;
   treeItem->GetRootTreeItem(getter_AddRefs(rootItem));
-  nsCOMPtr<nsIDOMWindowInternal> window = do_GetInterface(rootItem);
+  nsCOMPtr<nsIDOMWindow> window = do_GetInterface(rootItem);
   if (!window)
     return NS_ERROR_FAILURE;
   if (rootItem != treeItem)
     return window->SetFullScreen(aFullScreen);
 
   // make sure we don't try to set full screen on a non-chrome window,
   // which might happen in embedding world
   PRInt32 itemType;
@@ -4454,17 +4449,17 @@ nsGlobalWindow::GetFullScreen(PRBool* aF
 
   // Get the fullscreen value of the root window, to always have the value
   // accurate, even when called from content.
   nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryInterface(mDocShell);
   if (treeItem) {
     nsCOMPtr<nsIDocShellTreeItem> rootItem;
     treeItem->GetRootTreeItem(getter_AddRefs(rootItem));
     if (rootItem != treeItem) {
-      nsCOMPtr<nsIDOMWindowInternal> window = do_GetInterface(rootItem);
+      nsCOMPtr<nsIDOMWindow> window = do_GetInterface(rootItem);
       if (window)
         return window->GetFullScreen(aFullScreen);
     }
   }
 
   // We are the root window, or something went wrong. Return our internal value.
   *aFullScreen = mFullScreen;
   return NS_OK;
@@ -4924,19 +4919,19 @@ nsGlobalWindow::Focus()
     baseWin->GetVisibility(&isVisible);
   }
 
   if (!isVisible) {
     // A hidden tab is being focused, ignore this call.
     return NS_OK;
   }
 
-  nsIDOMWindowInternal *caller =
-    static_cast<nsIDOMWindowInternal*>(nsContentUtils::GetWindowFromCaller());
-  nsCOMPtr<nsIDOMWindowInternal> opener;
+  nsIDOMWindow *caller =
+    static_cast<nsIDOMWindow*>(nsContentUtils::GetWindowFromCaller());
+  nsCOMPtr<nsIDOMWindow> opener;
   GetOpener(getter_AddRefs(opener));
 
   // Enforce dom.disable_window_flip (for non-chrome), but still allow the
   // window which opened us to raise us at times when popups are allowed
   // (bugs 355482 and 369306).
   PRBool canFocus = CanSetProperty("dom.disable_window_flip") ||
                     (opener == caller &&
                      RevisePopupAbuseLevel(gPopupControlState) < openAbused);
@@ -4972,17 +4967,17 @@ nsGlobalWindow::Focus()
   nsCOMPtr<nsIPresShell> presShell;
   // Don't look for a presshell if we're a root chrome window that's got
   // about:blank loaded.  We don't want to focus our widget in that case.
   // XXXbz should we really be checking for IsInitialDocument() instead?
   PRBool lookForPresShell = PR_TRUE;
   PRInt32 itemType = nsIDocShellTreeItem::typeContent;
   treeItem->GetItemType(&itemType);
   if (itemType == nsIDocShellTreeItem::typeChrome &&
-      GetPrivateRoot() == static_cast<nsIDOMWindowInternal*>(this) &&
+      GetPrivateRoot() == static_cast<nsIDOMWindow*>(this) &&
       mDocument) {
     nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument));
     NS_ASSERTION(doc, "Bogus doc?");
     nsIURI* ourURI = doc->GetDocumentURI();
     if (ourURI) {
       lookForPresShell = !IsAboutBlank(ourURI);
     }
   }
@@ -5390,17 +5385,17 @@ nsGlobalWindow::GetWindowRoot(nsIDOMEven
 {
   nsCOMPtr<nsPIWindowRoot> root = GetTopWindowRoot();
   return CallQueryInterface(root, aWindowRoot);
 }
 
 already_AddRefed<nsPIWindowRoot>
 nsGlobalWindow::GetTopWindowRoot()
 {
-  nsIDOMWindowInternal *rootWindow = GetPrivateRoot();
+  nsIDOMWindow *rootWindow = GetPrivateRoot();
   nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(rootWindow));
   if (!piWin)
     return nsnull;
 
   nsCOMPtr<nsPIWindowRoot> window = do_QueryInterface(piWin->GetChromeEventHandler());
   return window.forget();
 }
 
@@ -7149,17 +7144,17 @@ nsGlobalWindow::Find(const nsAString& aS
   }
   
   // The Find API does not accept empty strings. Launch the Find Dialog.
   if (aStr.IsEmpty() || aShowDialog) {
     // See if the find dialog is already up using nsIWindowMediator
     nsCOMPtr<nsIWindowMediator> windowMediator =
       do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
 
-    nsCOMPtr<nsIDOMWindowInternal> findDialog;
+    nsCOMPtr<nsIDOMWindow> findDialog;
 
     if (windowMediator) {
       windowMediator->GetMostRecentWindow(NS_LITERAL_STRING("findInPage").get(),
                                           getter_AddRefs(findDialog));
     }
 
     if (findDialog) {
       // The Find dialog is already open, bring it to the top.
@@ -7455,19 +7450,19 @@ nsGlobalWindow::ActivateOrDeactivate(PRB
   // Get the top level widget (if the main widget is a sheet, this will
   // be the sheet's top (non-sheet) parent).
   nsCOMPtr<nsIWidget> topLevelWidget = mainWidget->GetSheetWindowParent();
   if (!topLevelWidget) {
     topLevelWidget = mainWidget;
   }
 
   // Get the top level widget's nsGlobalWindow
-  nsCOMPtr<nsIDOMWindowInternal> topLevelWindow;
+  nsCOMPtr<nsIDOMWindow> topLevelWindow;
   if (topLevelWidget == mainWidget) {
-    topLevelWindow = static_cast<nsIDOMWindowInternal*>(this);
+    topLevelWindow = static_cast<nsIDOMWindow*>(this);
   } else {
     // This is a workaround for the following problem:
     // When a window with an open sheet loses focus, only the sheet window
     // receives the NS_DEACTIVATE event. However, it's not the sheet that
     // should lose the active styling, but the containing top level window.
     void* clientData;
     topLevelWidget->GetClientData(clientData); // clientData is nsXULWindow
     nsISupports* data = static_cast<nsISupports*>(clientData);
@@ -8578,34 +8573,29 @@ nsGlobalWindow::FireDelayedDOMEvents()
 
   return NS_OK;
 }
 
 //*****************************************************************************
 // nsGlobalWindow: Window Control Functions
 //*****************************************************************************
 
-nsIDOMWindowInternal *
+nsIDOMWindow *
 nsGlobalWindow::GetParentInternal()
 {
   FORWARD_TO_OUTER(GetParentInternal, (), nsnull);
 
-  nsIDOMWindowInternal *parentInternal = nsnull;
-
   nsCOMPtr<nsIDOMWindow> parent;
   GetParent(getter_AddRefs(parent));
 
   if (parent && parent != static_cast<nsIDOMWindow *>(this)) {
-    nsCOMPtr<nsIDOMWindowInternal> tmp(do_QueryInterface(parent));
-    NS_ASSERTION(parent, "Huh, parent not an nsIDOMWindowInternal?");
-
-    parentInternal = tmp;
-  }
-
-  return parentInternal;
+    return parent;
+  }
+
+  return NULL;
 }
 
 // static
 void
 nsGlobalWindow::CloseBlockScriptTerminationFunc(nsISupports *aRef)
 {
   nsGlobalWindow* pwin = static_cast<nsGlobalWindow*>
                                     (static_cast<nsPIDOMWindow*>(aRef));
@@ -8727,17 +8717,17 @@ nsGlobalWindow::OpenInternal(const nsASt
         
       rv = pwwatch->OpenWindowJS(this, url.get(), name_ptr, options_ptr,
                                  aDialog, argv,
                                  getter_AddRefs(domReturn));
     } else {
       // Push a null JSContext here so that the window watcher won't screw us
       // up.  We do NOT want this case looking at the JS context on the stack
       // when searching.  Compare comments on
-      // nsIDOMWindowInternal::OpenWindow and nsIWindowWatcher::OpenWindow.
+      // nsIDOMWindow::OpenWindow and nsIWindowWatcher::OpenWindow.
       nsCOMPtr<nsIJSContextStack> stack;
 
       if (!aContentModal) {
         stack = do_GetService(sJSStackContractID);
       }
 
       if (stack) {
         rv = stack->Push(nsnull);
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -62,17 +62,16 @@
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDOMClientInformation.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMNavigator.h"
 #include "nsIDOMNavigatorGeolocation.h"
 #include "nsIDOMNavigatorDesktopNotification.h"
 #include "nsIDOMLocation.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIDOMJSWindow.h"
 #include "nsIDOMChromeWindow.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptObjectPrincipal.h"
 #include "nsIScriptTimeoutHandler.h"
@@ -320,19 +319,16 @@ public:
   virtual void SetScriptsEnabled(PRBool aEnabled, PRBool aFireTimeouts);
 
   // nsIScriptObjectPrincipal
   virtual nsIPrincipal* GetPrincipal();
 
   // nsIDOMWindow
   NS_DECL_NSIDOMWINDOW
 
-  // nsIDOMWindowInternal
-  NS_DECL_NSIDOMWINDOWINTERNAL
-
   // nsIDOMWindowPerformance
   NS_DECL_NSIDOMWINDOWPERFORMANCE
 
   // nsIDOMJSWindow
   NS_DECL_NSIDOMJSWINDOW
 
   // nsIDOMEventTarget
   NS_DECL_NSIDOMEVENTTARGET
@@ -365,22 +361,22 @@ public:
 
   virtual NS_HIDDEN_(PRBool) WouldReuseInnerWindow(nsIDocument *aNewDocument);
 
   virtual NS_HIDDEN_(void) SetDocShell(nsIDocShell* aDocShell);
   virtual NS_HIDDEN_(nsresult) SetNewDocument(nsIDocument *aDocument,
                                               nsISupports *aState,
                                               PRBool aForceReuseInnerWindow);
   void DispatchDOMWindowCreated();
-  virtual NS_HIDDEN_(void) SetOpenerWindow(nsIDOMWindowInternal *aOpener,
+  virtual NS_HIDDEN_(void) SetOpenerWindow(nsIDOMWindow* aOpener,
                                            PRBool aOriginalOpener);
   virtual NS_HIDDEN_(void) EnsureSizeUpToDate();
 
-  virtual NS_HIDDEN_(nsIDOMWindow *) EnterModalState();
-  virtual NS_HIDDEN_(void) LeaveModalState(nsIDOMWindow *aWindow);
+  virtual NS_HIDDEN_(nsIDOMWindow*) EnterModalState();
+  virtual NS_HIDDEN_(void) LeaveModalState(nsIDOMWindow* aWindow);
 
   virtual NS_HIDDEN_(PRBool) CanClose();
   virtual NS_HIDDEN_(nsresult) ForceClose();
 
   virtual NS_HIDDEN_(void) SetHasOrientationEventListener();
   virtual NS_HIDDEN_(void) MaybeUpdateTouchState();
   virtual NS_HIDDEN_(void) UpdateTouchState();
   virtual NS_HIDDEN_(PRBool) DispatchCustomEvent(const char *aEventName);
@@ -577,17 +573,17 @@ protected:
   void FreeInnerObjects(PRBool aClearScope);
   nsGlobalWindow *CallerInnerWindow();
 
   nsresult InnerSetNewDocument(nsIDocument* aDocument);
 
   nsresult DefineArgumentsProperty(nsIArray *aArguments);
 
   // Get the parent, returns null if this is a toplevel window
-  nsIDOMWindowInternal *GetParentInternal();
+  nsIDOMWindow* GetParentInternal();
 
   // popup tracking
   PRBool IsPopupSpamWindow()
   {
     if (IsInnerWindow() && !mOuterWindow) {
       return PR_FALSE;
     }
 
--- a/dom/base/nsHistory.cpp
+++ b/dom/base/nsHistory.cpp
@@ -32,20 +32,20 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "nsHistory.h"
+
 #include "nsCOMPtr.h"
 #include "nscore.h"
-#include "nsHistory.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsPIDOMWindow.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIDOMDocument.h"
 #include "nsIDocument.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -35,21 +35,21 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 
 #ifndef nsPIDOMWindow_h__
 #define nsPIDOMWindow_h__
 
-#include "nsISupports.h"
+#include "nsIDOMWindow.h"
+
 #include "nsIDOMLocation.h"
 #include "nsIDOMXULCommandDispatcher.h"
 #include "nsIDOMElement.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMDocument.h"
 #include "nsCOMPtr.h"
 #include "nsEvent.h"
 #include "nsIURI.h"
 
 #define DOM_WINDOW_DESTROYED_TOPIC "dom-window-destroyed"
 #define DOM_WINDOW_FROZEN_TOPIC "dom-window-frozen"
@@ -75,20 +75,20 @@ class nsIDocument;
 class nsIScriptTimeoutHandler;
 struct nsTimeout;
 class nsScriptObjectHolder;
 class nsXBLPrototypeHandler;
 class nsIArray;
 class nsPIWindowRoot;
 
 #define NS_PIDOMWINDOW_IID \
-{ 0xa595249b, 0x1e74, 0x467e, \
- { 0x92, 0x56, 0x58, 0xff, 0x07, 0x1b, 0xc2, 0x96 } }
+{ 0x9200de98, 0x079b, 0x4ecc, \
+  { 0xbe, 0xfd, 0x86, 0x41, 0xde, 0x84, 0x8b, 0x38 } }
 
-class nsPIDOMWindow : public nsIDOMWindowInternal
+class nsPIDOMWindow : public nsIDOMWindow
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOW_IID)
 
   virtual nsPIDOMWindow* GetPrivateRoot() = 0;
 
   virtual void ActivateOrDeactivate(PRBool aActivate) = 0;
 
@@ -391,17 +391,17 @@ public:
 
   /**
    * Set the opener window.  aOriginalOpener is true if and only if this is the
    * original opener for the window.  That is, it can only be true at most once
    * during the life cycle of a window, and then only the first time
    * SetOpenerWindow is called.  It might never be true, of course, if the
    * window does not have an opener when it's created.
    */
-  virtual void SetOpenerWindow(nsIDOMWindowInternal *aOpener,
+  virtual void SetOpenerWindow(nsIDOMWindow* aOpener,
                                PRBool aOriginalOpener) = 0;
 
   virtual void EnsureSizeUpToDate() = 0;
 
   /**
    * Callback for notifying a window about a modal dialog being
    * opened/closed with the window as a parent.
    */
--- a/dom/base/nsWindowRoot.cpp
+++ b/dom/base/nsWindowRoot.cpp
@@ -35,28 +35,25 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsCOMPtr.h"
 #include "nsWindowRoot.h"
 #include "nsPIDOMWindow.h"
-#include "nsIDOMWindow.h"
 #include "nsIDOMDocument.h"
 #include "nsIDocument.h"
 #include "nsEventListenerManager.h"
 #include "nsPresContext.h"
 #include "nsLayoutCID.h"
 #include "nsContentCID.h"
 #include "nsIPrivateDOMEvent.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsString.h"
 #include "nsEventDispatcher.h"
-#include "nsIProgrammingLanguage.h"
 #include "nsGUIEvent.h"
 #include "nsGlobalWindow.h"
 #include "nsFocusManager.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsIControllers.h"
 
 #include "nsCycleCollectionParticipant.h"
@@ -239,17 +236,17 @@ nsWindowRoot::GetControllers(nsIControll
       do_QueryInterface(focusedContent);
     if (htmlInputElement)
       return htmlInputElement->GetControllers(aResult);
 
     if (focusedContent->IsEditable() && focusedWindow)
       return focusedWindow->GetControllers(aResult);
   }
   else {
-    nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(focusedWindow);
+    nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(focusedWindow);
     if (domWindow)
       return domWindow->GetControllers(aResult);
   }
 
   return NS_OK;
 }
 
 nsresult
@@ -269,34 +266,34 @@ nsWindowRoot::GetControllerForCommand(co
       controller.swap(*_retval);
       return NS_OK;
     }
   }
 
   nsCOMPtr<nsPIDOMWindow> focusedWindow;
   nsFocusManager::GetFocusedDescendant(mWindow, PR_TRUE, getter_AddRefs(focusedWindow));
   while (focusedWindow) {
-    nsCOMPtr<nsIDOMWindowInternal> domWindow(do_QueryInterface(focusedWindow));
+    nsCOMPtr<nsIDOMWindow> domWindow(do_QueryInterface(focusedWindow));
 
     nsCOMPtr<nsIControllers> controllers2;
     domWindow->GetControllers(getter_AddRefs(controllers2));
     if (controllers2) {
       controllers2->GetControllerForCommand(aCommand,
                                             getter_AddRefs(controller));
       if (controller) {
         controller.swap(*_retval);
         return NS_OK;
       }
     }
 
     // XXXndeakin P3 is this casting safe?
     nsCOMPtr<nsPIDOMWindow> piWindow = do_QueryInterface(focusedWindow); 
     nsGlobalWindow *win =
       static_cast<nsGlobalWindow *>
-                 (static_cast<nsIDOMWindowInternal *>(piWindow));
+                 (static_cast<nsIDOMWindow*>(piWindow));
     focusedWindow = win->GetPrivateParent();
   }
   
   return NS_OK;
 }
 
 nsIDOMNode*
 nsWindowRoot::GetPopupNode()
--- a/dom/interfaces/base/Makefile.in
+++ b/dom/interfaces/base/Makefile.in
@@ -69,17 +69,16 @@ XPIDLSRCS =					\
 	nsIDOMMediaQueryList.idl		\
 	nsIDOMMimeType.idl			\
 	nsIDOMMimeTypeArray.idl			\
 	nsIDOMNavigator.idl			\
 	nsIDOMPkcs11.idl			\
 	nsIDOMPlugin.idl			\
 	nsIDOMPluginArray.idl			\
 	nsIDOMScreen.idl			\
-	nsIDOMWindowInternal.idl		\
 	nsIDOMJSWindow.idl			\
 	nsIDOMModalContentWindow.idl		\
 	nsIDOMChromeWindow.idl			\
         nsIDOMClientRect.idl			\
         nsIDOMClientRectList.idl		\
 	nsIFocusManager.idl			\
 	nsIQueryContentEventResult.idl		\
 	nsITabChild.idl				\
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -71,17 +71,16 @@ interface RangeException;
 // Style Sheets
 interface nsIDOMStyleSheetList;
 interface nsIDOMLinkStyle;
 interface nsIDOMStyleSheet;
 interface nsIDOMMediaList;
 
 // Base
 interface nsIDOMWindow;
-interface nsIDOMWindowInternal;
 interface nsIDOMWindowCollection;
 interface nsIDOMPlugin;
 interface nsIDOMPluginArray;
 interface nsIDOMMimeType;
 interface nsIDOMMimeTypeArray;
 interface nsIDOMBarProp;
 interface nsIDOMNavigator;
 interface nsIDOMScreen;
--- a/dom/interfaces/base/nsIDOMJSWindow.idl
+++ b/dom/interfaces/base/nsIDOMJSWindow.idl
@@ -72,32 +72,32 @@ interface nsIDOMJSWindow : nsISupports
    */
   void                      captureEvents(in long eventFlags);
   void                      releaseEvents(in long eventFlags);
   void                      routeEvent(in nsIDOMEvent evt);
   void                      enableExternalCapture();
   void                      disableExternalCapture();
 
   /**
-   * This is the scriptable version of nsIDOMWindowInternal::open()
+   * This is the scriptable version of nsIDOMWindow::open()
    * that takes 3 optional arguments. Its binary name is OpenJS to
-   * avoid colliding with nsIDOMWindowInternal::open(), which has the
+   * avoid colliding with nsIDOMWindow::open(), which has the
    * same signature. The reason we can't have that collision is that
    * the implementation needs to know whether it was called from JS or
    * not.
    *
    * IOW, DO NOT CALL THIS FROM C++
    */
   [binaryname(OpenJS)] nsIDOMWindow open([optional] in DOMString url,
                                          [optional] in DOMString name,
                                          [optional] in DOMString options);
 
   /**
    * This is the scriptable version of
-   * nsIDOMWindowInternal::openDialog() that takes 3 optional
+   * nsIDOMWindow::openDialog() that takes 3 optional
    * arguments, plus any additional arguments are passed on as
    * arguments on the dialog's window object (window.arguments).
    */
   nsIDOMWindow              openDialog([optional] in DOMString url,
                                        [optional] in DOMString name,
                                        [optional] in DOMString options);
 
   /**
--- a/dom/interfaces/base/nsIDOMWindow.idl
+++ b/dom/interfaces/base/nsIDOMWindow.idl
@@ -34,107 +34,243 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "domstubs.idl"
 
+%{ C++
+#include "jspubtd.h"
+%}
+
+interface nsIAnimationFrameListener;
+interface nsIControllers;
+interface nsIDOMBlob;
+interface nsIDOMLocation;
+interface nsIDOMMediaQueryList;
 interface nsIDOMOfflineResourceList;
+interface nsIDOMPerformance;
+interface nsIPrompt;
 interface nsISelection;
+interface nsIVariant;
+
+[scriptable, uuid(8fc58f56-f769-4368-a098-edd08550cf1a)]
+interface nsIDOMMozURLProperty : nsISupports
+{
+  DOMString createObjectURL(in nsIDOMBlob blob);
+  void revokeObjectURL(in DOMString URL);
+};
 
 /**
  * The nsIDOMWindow interface is the primary interface for a DOM
  * window object. It represents a single window object that may
  * contain child windows if the document in the window contains a
  * HTML frameset document or if the document contains iframe elements.
  *
  * @see <http://www.whatwg.org/html/#window>
  */
 
-[scriptable, uuid(90fec5b7-c58b-463f-a147-f91b6b104a96)]
+[scriptable, uuid(7e0db7f5-34c2-4a26-9eba-0d261c588652)]
 interface nsIDOMWindow : nsISupports
 {
+  // the current browsing context
+  readonly attribute nsIDOMWindow                       window;
+
+  /* [replaceable] self */
+  readonly attribute nsIDOMWindow                       self;
+
   /**
    * Accessor for the document in this window.
    */
   readonly attribute nsIDOMDocument                     document;
 
   /**
    * Set/Get the name of this window.
    *
    * This attribute is "replaceable" in JavaScript
    */
            attribute DOMString                          name;
 
+  /* The setter that takes a string argument needs to be special cased! */
+  readonly attribute nsIDOMLocation                     location;
+
+  readonly attribute nsIDOMHistory                      history;
+
+
+  /* [replaceable] locationbar */
+  readonly attribute nsIDOMBarProp                      locationbar;
+
+  /* [replaceable] menubar */
+  readonly attribute nsIDOMBarProp                      menubar;
+
+  /* [replaceable] personalbar */
+  readonly attribute nsIDOMBarProp                      personalbar;
+
   /**
    * Accessor for the object that controls whether or not scrollbars
    * are shown in this window.
    *
    * This attribute is "replaceable" in JavaScript
    */
   readonly attribute nsIDOMBarProp                      scrollbars;
 
+  /* [replaceable] statusbar */
+  readonly attribute nsIDOMBarProp                      statusbar;
+
+  /* [replaceable] toolbar */
+  readonly attribute nsIDOMBarProp                      toolbar;
+
+  /* [replaceable] */
+           attribute DOMString                          status;
+
+  void                      close();
+  void                      stop();
+  void                      focus();
+  void                      blur();
+
+
+  // other browsing contexts
+  /* [replaceable] length */
+  readonly attribute unsigned long                      length;
+
   /**
    * Accessor for the root of this hierarchy of windows. This root may
    * be the window itself if there is no parent, or if the parent is
    * of different type (i.e. this does not cross chrome-content
    * boundaries).
    *
    * This property is "replaceable" in JavaScript */
   readonly attribute nsIDOMWindow                       top;
 
+           attribute nsIDOMWindow                       opener;
+
   /**
    * Accessor for this window's parent window, or the window itself if
    * there is no parent, or if the parent is of different type
    * (i.e. this does not cross chrome-content boundaries).
    */
   readonly attribute nsIDOMWindow                       parent;
 
+  readonly attribute nsIDOMElement                      frameElement;
+
+
+  // the user agent
+  readonly attribute nsIDOMNavigator                    navigator;
+
   /**
    * Get the application cache object for this window.
    */
   readonly attribute nsIDOMOfflineResourceList          applicationCache;
 
 
+  // user prompts
+  void                      alert(in DOMString text);
+  boolean                   confirm(in DOMString text);
+
+  // prompt() should return a null string if cancel is pressed
+  DOMString                 prompt([optional] in DOMString aMessage,
+                                   [optional] in DOMString aInitial);
+
+  void                      print();
+
+  nsIVariant                showModalDialog(in DOMString aURI,
+                                            [optional] in nsIVariant aArgs,
+                                            [optional] in DOMString aOptions);
+
+
+  // cross-document messaging
+  /**
+   * Implements a safe message-passing system which can cross same-origin
+   * boundaries.
+   *
+   * This method, when called, causes a MessageEvent to be asynchronously
+   * dispatched at the primary document for the window upon which this method is
+   * called.  (Note that the postMessage property on windows is allAccess and
+   * thus is readable cross-origin.)  The dispatched event will have message as
+   * its data, the calling context's window as its source, and an origin
+   * determined by the calling context's main document URI.  The targetOrigin
+   * argument specifies a URI and is used to restrict the message to be sent
+   * only when the target window has the same origin as targetOrigin (since,
+   * when the sender and the target have different origins, neither can read the
+   * location of the other).
+   * 
+   * @see <http://www.whatwg.org/html/#dom-window-postmessage>
+   */
+  [implicit_jscontext, binaryname(PostMessageMoz)]
+    void postMessage(in jsval message, in DOMString targetOrigin);
+
+
+  // WindowBase64
+  // Ascii base64 data to binary data and vice versa...
+  DOMString                 atob(in DOMString aAsciiString);
+  DOMString                 btoa(in DOMString aBase64Data);
+
+
+  // DOM Range
+  /**
+   * Method for accessing this window's selection object.
+   */
+  nsISelection              getSelection();
+
+
   // CSSOM-View
+  // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface
+  nsIDOMMediaQueryList      matchMedia(in DOMString media_query_list);
+
+  readonly attribute nsIDOMScreen                       screen;
+
+  // viewport
+           attribute long                               innerWidth;
+           attribute long                               innerHeight;
+
+
+  // viewport scrolling
   /**
    * Accessor for the current x scroll position in this window in
    * pixels.
    *
    * This attribute is "replaceable" in JavaScript
    */
   readonly attribute long                               scrollX;
 
+  /* The offset in pixels by which the window is scrolled */
+  readonly attribute long                               pageXOffset;
+
   /**
    * Accessor for the current y scroll position in this window in
    * pixels.
    *
    * This attribute is "replaceable" in JavaScript
    */
   readonly attribute long                               scrollY;
 
+  /* The offset in pixels by which the window is scrolled */
+  readonly attribute long                               pageYOffset;
+
+  void                      scroll(in long xScroll, in long yScroll);
+
   /**
    * Method for scrolling this window to an absolute pixel offset.
    */
   void                      scrollTo(in long xScroll, in long yScroll);
 
   /**
    * Method for scrolling this window to a pixel offset relative to
    * the current scroll position.
    */
   void                      scrollBy(in long xScrollDif, in long yScrollDif);
 
 
-  // DOM Range
-  /**
-   * Method for accessing this window's selection object.
-   */
-  nsISelection              getSelection();
+  // client
+           attribute long                        screenX;
+           attribute long                        screenY;
+           attribute long                        outerWidth;
+           attribute long                        outerHeight;
 
 
   // CSSOM
   /**
    * @see <http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle>
    */
   nsIDOMCSSStyleDeclaration getComputedStyle(in nsIDOMElement elt, 
                                              [optional] in DOMString pseudoElt);
@@ -172,9 +308,120 @@ interface nsIDOMWindow : nsISupports
    * Method for scrolling this window by a number of pages.
    */
   void                      scrollByPages(in long numPages);
 
   /**
    * Method for sizing this window to the content in the window.
    */
   void                      sizeToContent();
+
+  /* [replaceable] content */
+  readonly attribute nsIDOMWindow                       content;
+
+  /* [replaceable] prompter */
+  [noscript] readonly attribute nsIPrompt               prompter;
+
+  readonly attribute boolean                            closed;
+  // http://wiki.whatwg.org/wiki/Crypto
+  readonly attribute nsIDOMCrypto                       crypto;
+  readonly attribute nsIDOMPkcs11                       pkcs11;
+
+  // XXX Shouldn't this be in nsIDOMChromeWindow?
+  /* [replaceable] controllers */
+  readonly attribute nsIControllers                     controllers;
+
+           attribute DOMString                          defaultStatus;
+
+  readonly attribute float                              mozInnerScreenX;
+  readonly attribute float                              mozInnerScreenY;
+
+  /* The maximum offset that the window can be scrolled to
+     (i.e., the document width/height minus the scrollport width/height) */
+  readonly attribute long                               scrollMaxX;
+  readonly attribute long                               scrollMaxY;
+
+           attribute boolean                            fullScreen;
+
+  void                      back();
+  void                      forward();
+  void                      home();
+
+  void                      moveTo(in long xPos, in long yPos);
+  void                      moveBy(in long xDif, in long yDif);
+  void                      resizeTo(in long width, in long height);
+  void                      resizeBy(in long widthDif, in long heightDif);
+
+  /**
+   * Open a new window with this one as the parent.  This method will
+   * NOT examine the JS stack for purposes of determining a caller.
+   * This window will be used for security checks during the search by
+   * name and the default character set on the newly opened window
+   * will just be the default character set of this window.
+   */
+  [noscript] nsIDOMWindow   open(in DOMString url, in DOMString name,
+                                 in DOMString options);
+
+  /**
+   * This method works like open except that aExtraArgument gets
+   * converted into the array window.arguments in JS, if
+   * aExtraArgument is a nsISupportsArray then the individual items in
+   * the array are inserted into window.arguments, and primitive
+   * nsISupports (nsISupportsPrimitives) types are converted to native
+   * JS types when possible.
+   */
+  [noscript] nsIDOMWindow   openDialog(in DOMString url, in DOMString name,
+                                       in DOMString options,
+                                       in nsISupports aExtraArgument);
+
+  // XXX Should this be in nsIDOMChromeWindow?
+  void                      updateCommands(in DOMString action);
+
+  /* Find in page.
+   * @param str: the search pattern
+   * @param caseSensitive: is the search caseSensitive
+   * @param backwards: should we search backwards
+   * @param wrapAround: should we wrap the search
+   * @param wholeWord: should we search only for whole words
+   * @param searchInFrames: should we search through all frames
+   * @param showDialog: should we show the Find dialog
+   */
+  boolean                   find([optional] in DOMString str,
+                                 [optional] in boolean caseSensitive,
+                                 [optional] in boolean backwards,
+                                 [optional] in boolean wrapAround,
+                                 [optional] in boolean wholeWord,
+                                 [optional] in boolean searchInFrames,
+                                 [optional] in boolean showDialog);
+
+  /**
+   * Returns the number of times this document for this window has
+   * been painted to the screen.
+   */
+  readonly attribute unsigned long long mozPaintCount;
+
+  /**
+   * Request a refresh of this browser window.
+   *
+   * @see <http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html>
+   */
+  void
+    mozRequestAnimationFrame([optional] in nsIAnimationFrameListener aListener);
+
+  /**
+   * The current animation start time in milliseconds since the epoch.
+   */
+  readonly attribute long long mozAnimationStartTime;
+
+  /**
+   * @see <http://dev.w3.org/2006/webapi/FileAPI/#creating-revoking>
+   */
+  readonly attribute nsIDOMMozURLProperty URL;
 };
+
+[scriptable, uuid(2146c906-57f7-486c-a1b4-8cdb57ef577f)]
+interface nsIDOMWindowPerformance : nsISupports
+{
+  /**
+   * A namespace to hold performance related data and statistics.
+   */
+  readonly attribute nsIDOMPerformance performance;
+};
deleted file mode 100644
--- a/dom/interfaces/base/nsIDOMWindowInternal.idl
+++ /dev/null
@@ -1,266 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2000
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Vidur Apparao <vidur@netscape.com> (original author)
- *   Johnny Stenback <jst@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIDOMWindow.idl"
-
-%{ C++
-#include "jspubtd.h"
-%}
-
-interface nsIPrompt;
-interface nsIControllers;
-interface nsIDOMLocation;
-interface nsIDOMPerformance;
-interface nsIVariant;
-interface nsIAnimationFrameListener;
-interface nsIDOMMediaQueryList;
-interface nsIDOMBlob;
-
-[scriptable, uuid(8fc58f56-f769-4368-a098-edd08550cf1a)]
-interface nsIDOMMozURLProperty : nsISupports
-{
-  DOMString createObjectURL(in nsIDOMBlob blob);
-  void revokeObjectURL(in DOMString URL);
-};
-
-[scriptable, uuid(7fec9403-7562-4ae0-8d9b-0735f0a55d7d)]
-interface nsIDOMWindowInternal : nsIDOMWindow
-{
-  readonly attribute nsIDOMWindowInternal        window;
-
-  /* [replaceable] self */
-  readonly attribute nsIDOMWindowInternal        self;
-
-  readonly attribute nsIDOMNavigator             navigator;
-  readonly attribute nsIDOMScreen                screen;
-  readonly attribute nsIDOMHistory               history;
-
-  /* [replaceable] content */
-  readonly attribute nsIDOMWindow                content;
-
-  /* [replaceable] prompter */
-  [noscript] readonly attribute nsIPrompt        prompter;
-
-  /* [replaceable] menubar */
-  readonly attribute nsIDOMBarProp               menubar;
-
-  /* [replaceable] toolbar */
-  readonly attribute nsIDOMBarProp               toolbar;
-
-  /* [replaceable] locationbar */
-  readonly attribute nsIDOMBarProp               locationbar;
-
-  /* [replaceable] personalbar */
-  readonly attribute nsIDOMBarProp               personalbar;
-
-  /* [replaceable] statusbar */
-  readonly attribute nsIDOMBarProp               statusbar;
-
-  readonly attribute boolean                     closed;
-  readonly attribute nsIDOMCrypto                crypto;
-  readonly attribute nsIDOMPkcs11                pkcs11;
-
-  // XXX Shouldn't this be in nsIDOMChromeWindow?
-  /* [replaceable] controllers */
-  readonly attribute nsIControllers              controllers;
-
-           attribute nsIDOMWindowInternal        opener;
-
-  /* [replaceable] */
-           attribute DOMString                   status;
-           attribute DOMString                   defaultStatus;
-
-  // XXX: The setter that takes a string argument needs to be special
-  // cased!
-  readonly attribute nsIDOMLocation              location;
-  
-  /* [replaceable] */
-           attribute long                        innerWidth;
-           attribute long                        innerHeight;
-           attribute long                        outerWidth;
-           attribute long                        outerHeight;
-           attribute long                        screenX;
-           attribute long                        screenY;
-  readonly attribute float                       mozInnerScreenX;
-  readonly attribute float                       mozInnerScreenY;
-
-  /* The offset in pixels by which the window is scrolled */
-  readonly attribute long                        pageXOffset;
-  readonly attribute long                        pageYOffset;
-
-  /* The maximum offset that the window can be scrolled to
-     (i.e., the document width/height minus the scrollport width/height) */
-  readonly attribute long                        scrollMaxX;
-  readonly attribute long                        scrollMaxY;
-
-  /* [replaceable] length */
-  readonly attribute unsigned long               length;
-
-           attribute boolean                     fullScreen;
-
-  void                      alert(in DOMString text);
-  boolean                   confirm(in DOMString text);
-
-  // prompt() should return a null string if cancel is pressed
-  DOMString                 prompt([optional] in DOMString aMessage,
-                                   [optional] in DOMString aInitial);
-
-  void                      focus();
-  void                      blur();
-
-  void                      back();
-  void                      forward();
-  void                      home();
-  void                      stop();
-
-  void                      print();
-
-  void                      moveTo(in long xPos, in long yPos);
-  void                      moveBy(in long xDif, in long yDif);
-  void                      resizeTo(in long width, in long height);
-  void                      resizeBy(in long widthDif, in long heightDif);
-  void                      scroll(in long xScroll, in long yScroll);
-
-  /**
-   * Open a new window with this one as the parent.  This method will
-   * NOT examine the JS stack for purposes of determining a caller.
-   * This window will be used for security checks during the search by
-   * name and the default character set on the newly opened window
-   * will just be the default character set of this window.
-   */
-  [noscript] nsIDOMWindow   open(in DOMString url, in DOMString name,
-                                 in DOMString options);
-
-  /**
-   * This method works like open except that aExtraArgument gets
-   * converted into the array window.arguments in JS, if
-   * aExtraArgument is a nsISupportsArray then the individual items in
-   * the array are inserted into window.arguments, and primitive
-   * nsISupports (nsISupportsPrimitives) types are converted to native
-   * JS types when possible.
-   */
-  [noscript] nsIDOMWindow   openDialog(in DOMString url, in DOMString name,
-                                       in DOMString options,
-                                       in nsISupports aExtraArgument);
-  void                      close();
-
-  // XXX Should this be in nsIDOMChromeWindow?
-  void                      updateCommands(in DOMString action);
-
-  /* Find in page.
-   * @param str: the search pattern
-   * @param caseSensitive: is the search caseSensitive
-   * @param backwards: should we search backwards
-   * @param wrapAround: should we wrap the search
-   * @param wholeWord: should we search only for whole words
-   * @param searchInFrames: should we search through all frames
-   * @param showDialog: should we show the Find dialog
-   */
-  boolean                   find([optional] in DOMString str,
-                                 [optional] in boolean caseSensitive,
-                                 [optional] in boolean backwards,
-                                 [optional] in boolean wrapAround,
-                                 [optional] in boolean wholeWord,
-                                 [optional] in boolean searchInFrames,
-                                 [optional] in boolean showDialog);
-
-  // Ascii base64 data to binary data and vice versa...
-  DOMString                 atob(in DOMString aAsciiString);
-  DOMString                 btoa(in DOMString aBase64Data);
-
-  readonly attribute nsIDOMElement               frameElement;
-
-  nsIVariant                showModalDialog(in DOMString aURI,
-                                            [optional] in nsIVariant aArgs,
-                                            [optional] in DOMString aOptions);
-
-  /**
-   * Implements a safe message-passing system which can cross same-origin
-   * boundaries.
-   *
-   * This method, when called, causes a MessageEvent to be asynchronously
-   * dispatched at the primary document for the window upon which this method is
-   * called.  (Note that the postMessage property on windows is allAccess and
-   * thus is readable cross-origin.)  The dispatched event will have message as
-   * its data, the calling context's window as its source, and an origin
-   * determined by the calling context's main document URI.  The targetOrigin
-   * argument specifies a URI and is used to restrict the message to be sent
-   * only when the target window has the same origin as targetOrigin (since,
-   * when the sender and the target have different origins, neither can read the
-   * location of the other).
-   * 
-   * See the WHATWG HTML5 specification, section 6.4, for more details.
-   */
-  [implicit_jscontext, binaryname(PostMessageMoz)]
-    void postMessage(in jsval message, in DOMString targetOrigin);
-
-  /**
-   * Returns the number of times this document for this window has
-   * been painted to the screen.
-   */
-  readonly attribute unsigned long long mozPaintCount;
-
-  /**
-   * Request a refresh of this browser window.
-   */
-  void
-    mozRequestAnimationFrame([optional] in nsIAnimationFrameListener aListener);
-
-  /**
-   * The current animation start time in milliseconds since the epoch.
-   */
-  readonly attribute long long mozAnimationStartTime;
-
-  /**
-   * http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface
-   */
-  nsIDOMMediaQueryList matchMedia(in DOMString media_query_list);
-
-  readonly attribute nsIDOMMozURLProperty URL;
-};
-
-[scriptable, uuid(2146c906-57f7-486c-a1b4-8cdb57ef577f)]
-interface nsIDOMWindowPerformance : nsISupports
-{
-  /**
-   * A namespace to hold performance related data and statistics.
-   */
-  readonly attribute nsIDOMPerformance performance;
-};
-
--- a/editor/composer/src/nsEditingSession.cpp
+++ b/editor/composer/src/nsEditingSession.cpp
@@ -37,17 +37,16 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsPIDOMWindow.h"
 #include "nsIDOMWindowUtils.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDocument.h"
 #include "nsIHTMLDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIURI.h"
 #include "nsISelectionPrivate.h"
 #include "nsITransactionManager.h"
 
@@ -1209,31 +1208,25 @@ nsEditingSession::SetupEditorCommandCont
                                   nsIDOMWindow *aWindow,
                                   nsISupports *aContext,
                                   PRUint32 *aControllerId)
 {
   NS_ENSURE_ARG_POINTER(aControllerClassName);
   NS_ENSURE_ARG_POINTER(aWindow);
   NS_ENSURE_ARG_POINTER(aContext);
   NS_ENSURE_ARG_POINTER(aControllerId);
-
-  nsresult rv;
-  nsCOMPtr<nsIDOMWindowInternal> domWindowInt =
-                                    do_QueryInterface(aWindow, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
   
   nsCOMPtr<nsIControllers> controllers;      
-  rv = domWindowInt->GetControllers(getter_AddRefs(controllers));
+  nsresult rv = aWindow->GetControllers(getter_AddRefs(controllers));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // We only have to create each singleton controller once
   // We know this has happened once we have a controllerId value
   if (!*aControllerId)
   {
-    nsresult rv;
     nsCOMPtr<nsIController> controller;
     controller = do_CreateInstance(aControllerClassName, &rv);
     NS_ENSURE_SUCCESS(rv, rv);  
 
     // We must insert at head of the list to be sure our
     //   controller is found before other implementations
     //   (e.g., not-implemented versions by browser)
     rv = controllers->InsertControllerAt(0, controller);
@@ -1253,25 +1246,20 @@ nsEditingSession::SetupEditorCommandCont
   SetEditorOnControllers
 
   Set the editor on the controller(s) for this window
 ----------------------------------------------------------------------------*/
 NS_IMETHODIMP
 nsEditingSession::SetEditorOnControllers(nsIDOMWindow *aWindow,
                                          nsIEditor* aEditor)
 {
-  nsresult rv;
-  
-  // set the editor on the controller
-  nsCOMPtr<nsIDOMWindowInternal> domWindowInt =
-                                     do_QueryInterface(aWindow, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
+  NS_ENSURE_TRUE(aWindow, NS_ERROR_NULL_POINTER);
   
   nsCOMPtr<nsIControllers> controllers;      
-  rv = domWindowInt->GetControllers(getter_AddRefs(controllers));
+  nsresult rv = aWindow->GetControllers(getter_AddRefs(controllers));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsISupports> editorAsISupports = do_QueryInterface(aEditor);
   if (mBaseCommandControllerId)
   {
     rv = SetContextOnControllerById(controllers, editorAsISupports,
                                     mBaseCommandControllerId);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1310,21 +1298,20 @@ nsEditingSession::SetContextOnController
   return editorController->SetCommandContext(aContext);
 }
 
 void
 nsEditingSession::RemoveEditorControllers(nsIDOMWindow *aWindow)
 {
   // Remove editor controllers from the aWindow, call when we're 
   // tearing down/detaching editor.
-  nsCOMPtr<nsIDOMWindowInternal> domWindowInt(do_QueryInterface(aWindow));
 
   nsCOMPtr<nsIControllers> controllers;
-  if (domWindowInt)
-    domWindowInt->GetControllers(getter_AddRefs(controllers));
+  if (aWindow)
+    aWindow->GetControllers(getter_AddRefs(controllers));
 
   if (controllers)
   {
     nsCOMPtr<nsIController> controller;
     if (mBaseCommandControllerId)
     {
       controllers->GetControllerById(mBaseCommandControllerId,
                                      getter_AddRefs(controller));
--- a/embedding/browser/webBrowser/nsWebBrowser.cpp
+++ b/embedding/browser/webBrowser/nsWebBrowser.cpp
@@ -50,17 +50,16 @@
 #include "nsIDOMDocument.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMElement.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsPIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIWebProgress.h"
 #include "nsIWebProgressListener.h"
 #include "nsIWebBrowserFocus.h"
 #include "nsIWebBrowserStream.h"
 #include "nsIPresShell.h"
 #include "nsIGlobalHistory.h"
 #include "nsIDocShellHistory.h"
 #include "nsIURIContentListener.h"
@@ -1765,31 +1764,30 @@ nsEventStatus nsWebBrowser::HandleEvent(
 
   default:
     break;
   }
 
   return nsEventStatus_eIgnore;
 }
 
-NS_IMETHODIMP nsWebBrowser::GetPrimaryContentWindow(nsIDOMWindowInternal **aDOMWindow)
+NS_IMETHODIMP nsWebBrowser::GetPrimaryContentWindow(nsIDOMWindow** aDOMWindow)
 {
   *aDOMWindow = 0;
 
   nsCOMPtr<nsIDocShellTreeItem> item;
   NS_ENSURE_TRUE(mDocShellTreeOwner, NS_ERROR_FAILURE);
   mDocShellTreeOwner->GetPrimaryContentShell(getter_AddRefs(item));
   NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDocShell> docShell;
   docShell = do_QueryInterface(item);
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
   
-  nsCOMPtr<nsIDOMWindowInternal> domWindow;
-  domWindow = do_GetInterface(docShell);
+  nsCOMPtr<nsIDOMWindow> domWindow = do_GetInterface(docShell);
   NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE);
 
   *aDOMWindow = domWindow;
   NS_ADDREF(*aDOMWindow);
   return NS_OK;
   
 }
 //*****************************************************************************
--- a/embedding/browser/webBrowser/nsWebBrowser.h
+++ b/embedding/browser/webBrowser/nsWebBrowser.h
@@ -142,17 +142,17 @@ public:
 
 protected:
     virtual ~nsWebBrowser();
     NS_IMETHOD InternalDestroy();
 
     // XXXbz why are these NS_IMETHOD?  They're not interface methods!
     NS_IMETHOD SetDocShell(nsIDocShell* aDocShell);
     NS_IMETHOD EnsureDocShellTreeOwner();
-    NS_IMETHOD GetPrimaryContentWindow(nsIDOMWindowInternal **aDomWindow);
+    NS_IMETHOD GetPrimaryContentWindow(nsIDOMWindow **aDomWindow);
     NS_IMETHOD BindListener(nsISupports *aListener, const nsIID& aIID);
     NS_IMETHOD UnBindListener(nsISupports *aListener, const nsIID& aIID);
     NS_IMETHOD EnableGlobalHistory(PRBool aEnable);
 
     static nsEventStatus HandleEvent(nsGUIEvent *aEvent);
 
 protected:
    nsDocShellTreeOwner*       mDocShellTreeOwner;
--- a/embedding/components/commandhandler/src/nsCommandManager.cpp
+++ b/embedding/components/commandhandler/src/nsCommandManager.cpp
@@ -46,17 +46,16 @@
 
 #include "nsServiceManagerUtils.h"
 #include "nsIScriptSecurityManager.h"
 
 #include "nsIDOMDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowRoot.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIFocusManager.h"
 #include "nsIDOMEventTarget.h"
 
 #include "nsCOMArray.h"
 
 #include "nsCommandManager.h"
 
 
@@ -310,25 +309,20 @@ nsCommandManager::GetControllerForComman
     if (!aTargetWindow)
       return rv;
 
     // if a target window is specified, it must be the window we expect
     if (aTargetWindow != mWindow)
         return NS_ERROR_FAILURE;
   }
 
-  if (aTargetWindow)
-  {
+  if (aTargetWindow) {
     // get the controller for this particular window
-    nsCOMPtr<nsIDOMWindowInternal> domWindowInternal = do_QueryInterface(aTargetWindow);
-    if (!domWindowInternal)
-      return NS_ERROR_FAILURE;
-
     nsCOMPtr<nsIControllers> controllers;
-    rv = domWindowInternal->GetControllers(getter_AddRefs(controllers));
+    rv = aTargetWindow->GetControllers(getter_AddRefs(controllers));
     if (NS_FAILED(rv))
       return rv;
     if (!controllers)
       return NS_ERROR_FAILURE;
 
     // dispatch the command
     return controllers->GetControllerForCommand(aCommand, outController);
   }
--- a/embedding/components/printingui/src/mac/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/mac/nsPrintProgress.cpp
@@ -64,18 +64,18 @@ nsPrintProgress::nsPrintProgress()
   m_pendingStateValue = 0;
 }
 
 nsPrintProgress::~nsPrintProgress()
 {
   (void)ReleaseListeners();
 }
 
-/* void openProgressDialog (in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters); */
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
+/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */
+NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent,
                                                   const char *dialogURL,
                                                   nsISupports *parameters, 
                                                   nsIObserver *openDialogObserver,
                                                   PRBool *notifyOnOpen)
 {
   m_observer = openDialogObserver;
 
   nsresult rv = NS_ERROR_FAILURE;
@@ -337,18 +337,18 @@ NS_IMETHODIMP nsPrintProgress::StopMeteo
 }
 
 /* void showProgress (in long percent); */
 NS_IMETHODIMP nsPrintProgress::ShowProgress(PRInt32 percent)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindowInternal window); */
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindowInternal *window)
+/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */
+NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* void closeWindow (); */
 NS_IMETHODIMP nsPrintProgress::CloseWindow()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/embedding/components/printingui/src/mac/nsPrintProgress.h
+++ b/embedding/components/printingui/src/mac/nsPrintProgress.h
@@ -39,38 +39,38 @@
 
 #ifndef __nsPrintProgress_h
 #define __nsPrintProgress_h
 
 #include "nsIPrintProgress.h"
 
 #include "nsCOMPtr.h"
 #include "nsISupportsArray.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private:
-  nsresult ReleaseListeners(void);
+  nsresult ReleaseListeners();
 
   PRBool                            m_closeProgress;
   PRBool                            m_processCanceled;
   nsString                          m_pendingStatus;
   PRInt32                           m_pendingStateFlags;
   PRInt32                           m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindowInternal>    m_dialog;
+  nsCOMPtr<nsIDOMWindow>            m_dialog;
   nsCOMPtr<nsISupportsArray>        m_listenerList;
   nsCOMPtr<nsIObserver>             m_observer;
 };
 
 #endif
--- a/embedding/components/printingui/src/os2/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/os2/nsPrintProgress.cpp
@@ -64,18 +64,18 @@ nsPrintProgress::nsPrintProgress()
   m_pendingStateValue = 0;
 }
 
 nsPrintProgress::~nsPrintProgress()
 {
   (void)ReleaseListeners();
 }
 
-/* void openProgressDialog (in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters); */
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
+/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */
+NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent,
                                                   const char *dialogURL,
                                                   nsISupports *parameters, 
                                                   nsIObserver *openDialogObserver,
                                                   PRBool *notifyOnOpen)
 {
   *notifyOnOpen = PR_TRUE;
   m_observer = openDialogObserver;
   nsresult rv = NS_ERROR_FAILURE;
@@ -334,18 +334,18 @@ NS_IMETHODIMP nsPrintProgress::StopMeteo
 }
 
 /* void showProgress (in long percent); */
 NS_IMETHODIMP nsPrintProgress::ShowProgress(PRInt32 percent)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindowInternal window); */
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindowInternal *window)
+/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */
+NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* void closeWindow (); */
 NS_IMETHODIMP nsPrintProgress::CloseWindow()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/embedding/components/printingui/src/os2/nsPrintProgress.h
+++ b/embedding/components/printingui/src/os2/nsPrintProgress.h
@@ -39,38 +39,38 @@
 
 #ifndef __nsPrintProgress_h
 #define __nsPrintProgress_h
 
 #include "nsIPrintProgress.h"
 
 #include "nsCOMPtr.h"
 #include "nsISupportsArray.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private:
-  nsresult ReleaseListeners(void);
+  nsresult ReleaseListeners();
 
   PRBool                            m_closeProgress;
   PRBool                            m_processCanceled;
   nsString                          m_pendingStatus;
   PRInt32                           m_pendingStateFlags;
   PRInt32                           m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindowInternal>    m_dialog;
+  nsCOMPtr<nsIDOMWindow>            m_dialog;
   nsCOMPtr<nsISupportsArray>        m_listenerList;
   nsCOMPtr<nsIObserver>             m_observer;
 };
 
 #endif
--- a/embedding/components/printingui/src/os2/nsPrintingPromptService.cpp
+++ b/embedding/components/printingui/src/os2/nsPrintingPromptService.cpp
@@ -120,17 +120,17 @@ nsPrintingPromptService::ShowPrintDialog
       return rv;
 
     block->SetInt(0, 0);
     return DoDialog(parent, block, webBrowserPrint, printSettings, kPrintDialogURL);
 }
 
 /* void showProgress (in nsIDOMWindow parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen); */
 NS_IMETHODIMP 
-nsPrintingPromptService::ShowProgress(nsIDOMWindow*           parent, 
+nsPrintingPromptService::ShowProgress(nsIDOMWindow*            parent, 
                                       nsIWebBrowserPrint*      webBrowserPrint,    // ok to be null
                                       nsIPrintSettings*        printSettings,      // ok to be null
                                       nsIObserver*             openDialogObserver, // ok to be null
                                       PRBool                   isForPrinting,
                                       nsIWebProgressListener** webProgressListener,
                                       nsIPrintProgressParams** printProgressParams,
                                       PRBool*                  notifyOnOpen)
 {
@@ -146,31 +146,26 @@ nsPrintingPromptService::ShowProgress(ns
 
     rv = prtProgress->QueryInterface(NS_GET_IID(nsIWebProgressListener), (void**)getter_AddRefs(mWebProgressListener));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsPrintProgressParams* prtProgressParams = new nsPrintProgressParams();
     rv = prtProgressParams->QueryInterface(NS_GET_IID(nsIPrintProgressParams), (void**)printProgressParams);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    if (printProgressParams) 
-    {
-        nsCOMPtr<nsIDOMWindowInternal> parentDOMIntl(do_QueryInterface(parent));
+    if (printProgressParams) {
+        nsCOMPtr<nsIDOMWindow> parentDOMIntl = parent;
 
-        if (mWatcher && !parentDOMIntl) 
-        {
-            nsCOMPtr<nsIDOMWindow> active;
-            mWatcher->GetActiveWindow(getter_AddRefs(active));
-            parentDOMIntl = do_QueryInterface(active);
+        if (mWatcher && !parentDOMIntl) {
+            mWatcher->GetActiveWindow(getter_AddRefs(parentDOMIntl));
         }
 
-        if (parentDOMIntl) 
-        {
-            mPrintProgress->OpenProgressDialog(parentDOMIntl, 
-                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL, 
+        if (parentDOMIntl) {
+            mPrintProgress->OpenProgressDialog(parentDOMIntl,
+                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL,
                                                *printProgressParams, openDialogObserver, notifyOnOpen);
         }
     }
 
     *webProgressListener = static_cast<nsIWebProgressListener*>(this);
     NS_ADDREF(*webProgressListener);
 
     return rv;
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp
@@ -65,18 +65,18 @@ nsPrintProgress::nsPrintProgress(nsIPrin
   m_PrintSetting = aPrintSettings;
 }
 
 nsPrintProgress::~nsPrintProgress()
 {
   (void)ReleaseListeners();
 }
 
-/* void openProgressDialog (in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters); */
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
+/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */
+NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent,
                                                   const char *dialogURL,
                                                   nsISupports *parameters, 
                                                   nsIObserver *openDialogObserver,
                                                   PRBool *notifyOnOpen)
 {
   *notifyOnOpen = PR_TRUE;
   m_observer = openDialogObserver;
   nsresult rv = NS_ERROR_FAILURE;
@@ -337,18 +337,18 @@ NS_IMETHODIMP nsPrintProgress::StopMeteo
 }
 
 /* void showProgress (in long percent); */
 NS_IMETHODIMP nsPrintProgress::ShowProgress(PRInt32 percent)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindowInternal window); */
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindowInternal *window)
+/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */
+NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* void closeWindow (); */
 NS_IMETHODIMP nsPrintProgress::CloseWindow()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/embedding/components/printingui/src/unixshared/nsPrintProgress.h
+++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.h
@@ -40,39 +40,39 @@
 #ifndef __nsPrintProgress_h
 #define __nsPrintProgress_h
 
 #include "nsIPrintProgress.h"
 #include "nsIPrintingPromptService.h"
 
 #include "nsCOMPtr.h"
 #include "nsISupportsArray.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsIObserver.h"
 #include "nsString.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress(nsIPrintSettings* aPrintSettings);
 	virtual ~nsPrintProgress();
 
 private:
-  nsresult ReleaseListeners(void);
+  nsresult ReleaseListeners();
 
   PRBool                            m_closeProgress;
   PRBool                            m_processCanceled;
   nsString                          m_pendingStatus;
   PRInt32                           m_pendingStateFlags;
   PRInt32                           m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindowInternal>    m_dialog;
+  nsCOMPtr<nsIDOMWindow>            m_dialog;
   nsCOMPtr<nsISupportsArray>        m_listenerList;
   nsCOMPtr<nsIObserver>             m_observer;
   nsCOMPtr<nsIPrintSettings>        m_PrintSetting;
 };
 
 #endif
--- a/embedding/components/printingui/src/unixshared/nsPrintingPromptService.cpp
+++ b/embedding/components/printingui/src/unixshared/nsPrintingPromptService.cpp
@@ -149,31 +149,26 @@ nsPrintingPromptService::ShowProgress(ns
 
     rv = prtProgress->QueryInterface(NS_GET_IID(nsIWebProgressListener), (void**)getter_AddRefs(mWebProgressListener));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsPrintProgressParams* prtProgressParams = new nsPrintProgressParams();
     rv = prtProgressParams->QueryInterface(NS_GET_IID(nsIPrintProgressParams), (void**)printProgressParams);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    if (printProgressParams) 
-    {
-        nsCOMPtr<nsIDOMWindowInternal> parentDOMIntl(do_QueryInterface(parent));
+    if (printProgressParams) {
+        nsCOMPtr<nsIDOMWindow> parentDOMIntl = parent;
 
-        if (mWatcher && !parentDOMIntl) 
-        {
-            nsCOMPtr<nsIDOMWindow> active;
-            mWatcher->GetActiveWindow(getter_AddRefs(active));
-            parentDOMIntl = do_QueryInterface(active);
+        if (mWatcher && !parentDOMIntl) {
+            mWatcher->GetActiveWindow(getter_AddRefs(parentDOMIntl));
         }
 
-        if (parentDOMIntl) 
-        {
-            mPrintProgress->OpenProgressDialog(parentDOMIntl, 
-                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL, 
+        if (parentDOMIntl) {
+            mPrintProgress->OpenProgressDialog(parentDOMIntl,
+                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL,
                                                *printProgressParams, openDialogObserver, notifyOnOpen);
         }
     }
 
     *webProgressListener = static_cast<nsIWebProgressListener*>(this);
     NS_ADDREF(*webProgressListener);
 
     return rv;
--- a/embedding/components/printingui/src/win/nsPrintProgress.cpp
+++ b/embedding/components/printingui/src/win/nsPrintProgress.cpp
@@ -94,18 +94,18 @@ nsPrintProgress::nsPrintProgress()
   m_pendingStateValue = 0;
 }
 
 nsPrintProgress::~nsPrintProgress()
 {
   (void)ReleaseListeners();
 }
 
-/* void openProgressDialog (in nsIDOMWindowInternal parent, in string dialogURL, in nsISupports parameters); */
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
+/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */
+NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent,
                                                   const char *dialogURL,
                                                   nsISupports *parameters, 
                                                   nsIObserver *openDialogObserver, 
                                                   PRBool *notifyOnOpen)
 {
   *notifyOnOpen = PR_TRUE;
   m_observer = openDialogObserver;
 
@@ -365,18 +365,18 @@ NS_IMETHODIMP nsPrintProgress::StopMeteo
 }
 
 /* void showProgress (in long percent); */
 NS_IMETHODIMP nsPrintProgress::ShowProgress(PRInt32 percent)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindowInternal window); */
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindowInternal *window)
+/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */
+NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* void closeWindow (); */
 NS_IMETHODIMP nsPrintProgress::CloseWindow()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/embedding/components/printingui/src/win/nsPrintProgress.h
+++ b/embedding/components/printingui/src/win/nsPrintProgress.h
@@ -39,17 +39,17 @@
 
 #ifndef __nsPrintProgress_h
 #define __nsPrintProgress_h
 
 #include "nsIPrintProgress.h"
 
 #include "nsCOMPtr.h"
 #include "nsISupportsArray.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIPrintStatusFeedback.h"
 #include "nsString.h"
 #include "nsIWindowWatcher.h"
 #include "nsIObserver.h"
 
 class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
 {
 public: 
@@ -57,21 +57,21 @@ public:
   NS_DECL_NSIPRINTPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTSTATUSFEEDBACK
 
 	nsPrintProgress();
 	virtual ~nsPrintProgress();
 
 private:
-  nsresult ReleaseListeners(void);
+  nsresult ReleaseListeners();
 
   PRBool                            m_closeProgress;
   PRBool                            m_processCanceled;
   nsString                          m_pendingStatus;
   PRInt32                           m_pendingStateFlags;
   PRInt32                           m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindowInternal>    m_dialog;
+  nsCOMPtr<nsIDOMWindow>            m_dialog;
   nsCOMPtr<nsISupportsArray>        m_listenerList;
   nsCOMPtr<nsIObserver>             m_observer;
 };
 
 #endif
--- a/embedding/components/printingui/src/win/nsPrintingPromptService.cpp
+++ b/embedding/components/printingui/src/win/nsPrintingPromptService.cpp
@@ -222,31 +222,26 @@ nsPrintingPromptService::ShowProgress(ns
 
     rv = prtProgress->QueryInterface(NS_GET_IID(nsIWebProgressListener), (void**)getter_AddRefs(mWebProgressListener));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsPrintProgressParams* prtProgressParams = new nsPrintProgressParams();
     rv = prtProgressParams->QueryInterface(NS_GET_IID(nsIPrintProgressParams), (void**)printProgressParams);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    if (printProgressParams) 
-    {
-        nsCOMPtr<nsIDOMWindowInternal> parentDOMIntl(do_QueryInterface(parent));
+    if (printProgressParams) {
+        nsCOMPtr<nsIDOMWindow> parentDOMIntl = parent;
 
-        if (mWatcher && !parentDOMIntl) 
-        {
-            nsCOMPtr<nsIDOMWindow> active;
-            mWatcher->GetActiveWindow(getter_AddRefs(active));
-            parentDOMIntl = do_QueryInterface(active);
+        if (mWatcher && !parentDOMIntl) {
+            mWatcher->GetActiveWindow(getter_AddRefs(parentDOMIntl));
         }
 
-        if (parentDOMIntl) 
-        {
-            mPrintProgress->OpenProgressDialog(parentDOMIntl, 
-                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL, 
+        if (parentDOMIntl) {
+            mPrintProgress->OpenProgressDialog(parentDOMIntl,
+                                               isForPrinting?kPrintProgressDialogURL:kPrtPrvProgressDialogURL,
                                                *printProgressParams, openDialogObserver, notifyOnOpen);
         }
     }
 
     *webProgressListener = static_cast<nsIWebProgressListener*>(this);
     NS_ADDREF(*webProgressListener);
 
     return rv;
--- a/embedding/components/windowwatcher/public/nsPIWindowWatcher.idl
+++ b/embedding/components/windowwatcher/public/nsPIWindowWatcher.idl
@@ -77,17 +77,17 @@ interface nsPIWindowWatcher : nsISupport
              impossible to get to an nsIWebBrowserChrome from aParent, this
              method will effectively act as if aParent were null.
       @param aURL url to which to open the new window. Must already be
              escaped, if applicable. can be null.
       @param aName window name from JS window.open. can be null.  If a window
              with this name already exists, the openWindow call may just load
              aUrl in it (if aUrl is not null) and return it.
       @param aFeatures window features from JS window.open. can be null.
-      @param aDialog use dialog defaults (see nsIDOMWindowInternal::openDialog)
+      @param aDialog use dialog defaults (see nsIDOMWindow::openDialog)
       @param aArgs Window argument
       @return the new window
 
       @note This method may examine the JS context stack for purposes of
             determining the security context to use for the search for a given
             window named aName.
       @note This method should try to set the default charset for the new
             window to the default charset of the document in the calling window
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -52,17 +52,16 @@
 #include "nsIDocShellLoadInfo.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDocumentLoader.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMChromeWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMModalContentWindow.h"
 #include "nsIPrompt.h"
 #include "nsIScriptObjectPrincipal.h"
 #include "nsIScreen.h"
 #include "nsIScreenManager.h"
 #include "nsIScriptContext.h"
 #include "nsIJSContextStack.h"
 #include "nsIObserverService.h"
@@ -1773,18 +1772,17 @@ nsWindowWatcher::ReadyOpenedDocShellItem
                                          nsIDOMWindow        **aOpenedWindow)
 {
   nsresult rv = NS_ERROR_FAILURE;
 
   *aOpenedWindow = 0;
   nsCOMPtr<nsPIDOMWindow> piOpenedWindow(do_GetInterface(aOpenedItem));
   if (piOpenedWindow) {
     if (aParent) {
-      nsCOMPtr<nsIDOMWindowInternal> internalParent(do_QueryInterface(aParent));
-      piOpenedWindow->SetOpenerWindow(internalParent, aWindowIsNew); // damnit
+      piOpenedWindow->SetOpenerWindow(aParent, aWindowIsNew); // damnit
 
       if (aWindowIsNew) {
 #ifdef DEBUG
         // Assert that we're not loading things right now.  If we are, when
         // that load completes it will clobber whatever principals we set up
         // on this new window!
         nsCOMPtr<nsIDocumentLoader> docloader =
           do_QueryInterface(aOpenedItem);
--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
@@ -51,17 +51,17 @@ members = [
     # dom/interfaces/base
     #
     # Note that many implementations of interfaces in this directory
     # use GetCurrentNativeCallContext, notably:
     #   - nsIDOMCrypto.{generateCRMFRequest,signText}
     #   - nsIDOMLocation.reload
     #   - nsIDOMNSHistory.go
     #   - nsIDOMJSPluginArray.refresh
-    #   - nsIDOMWindowInternal.postMessage
+    #   - nsIDOMWindow.postMessage
     #   - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog}
     #
     # (And nsIDOMModalContentWindow.returnValue is an attribute of type
     # nsIVariant, which qsgen.py can't handle.)
     #
     'nsIDOMWindow.name',
     'nsIDOMWindow.parent',
     'nsIDOMWindow.top',
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -107,17 +107,16 @@
 #include "nsLayoutUtils.h"
 #include "nsAutoPtr.h"
 #include "nsBoxFrame.h"
 #include "nsBoxLayout.h"
 #include "nsImageFrame.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsContentErrors.h"
 #include "nsIPrincipal.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsStyleUtil.h"
 #include "nsBox.h"
 #include "nsTArray.h"
 #include "nsGenericDOMDataNode.h"
 #include "mozilla/dom/Element.h"
 #include "FrameLayerBuilder.h"
 
 #ifdef MOZ_XUL
@@ -206,20 +205,16 @@ NS_NewSVGFilterFrame(nsIPresShell *aPres
 nsIFrame*
 NS_NewSVGPatternFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGMaskFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 #include "nsIDocument.h"
-#include "nsIDOMElement.h"
-#include "nsIDOMNodeList.h"
-#include "nsIDOMDocument.h"
-#include "nsIDOMDocumentXBL.h"
 #include "nsIScrollable.h"
 #include "nsINodeInfo.h"
 #include "prenv.h"
 #include "nsWidgetsCID.h"
 #include "nsNodeInfoManager.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIServiceManager.h"
 
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2668,19 +2668,19 @@ DocumentViewerImpl::Print(PRBool        
 
 
   return Print(printSettings, nsnull);
 #else
   return NS_ERROR_FAILURE;
 #endif
 }
 
-/* [noscript] void printWithParent (in nsIDOMWindowInternal aParentWin, in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */
+/* [noscript] void printWithParent (in nsIDOMWindow aParentWin, in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */
 NS_IMETHODIMP 
-DocumentViewerImpl::PrintWithParent(nsIDOMWindowInternal *aParentWin, nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener)
+DocumentViewerImpl::PrintWithParent(nsIDOMWindow*, nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener)
 {
 #ifdef NS_PRINTING
   return Print(aThePrintSettings, aWPListener);
 #else
   return NS_ERROR_FAILURE;
 #endif
 }
 
@@ -4283,17 +4283,17 @@ DocumentViewerImpl::OnDonePrinting()
       mPrintEngine->Destroy();
       mPrintEngine = nsnull;
     }
 
     // We are done printing, now cleanup 
     if (mDeferredWindowClose) {
       mDeferredWindowClose = PR_FALSE;
       nsCOMPtr<nsISupports> container = do_QueryReferent(mContainer);
-      nsCOMPtr<nsIDOMWindowInternal> win = do_GetInterface(container);
+      nsCOMPtr<nsIDOMWindow> win = do_GetInterface(container);
       if (win)
         win->Close();
     } else if (mClosingWhilePrinting) {
       if (mDocument) {
         mDocument->SetScriptGlobalObject(nsnull);
         mDocument->Destroy();
         mDocument = nsnull;
       }
--- a/layout/forms/nsFileControlFrame.cpp
+++ b/layout/forms/nsFileControlFrame.cpp
@@ -417,17 +417,17 @@ NS_IMETHODIMP
 nsFileControlFrame::CaptureMouseListener::HandleEvent(nsIDOMEvent* aMouseEvent)
 {
   nsresult rv;
 
   NS_ASSERTION(mFrame, "We should have been unregistered");
   if (!ShouldProcessMouseClick(aMouseEvent))
     return NS_OK;
 
-  // Get parent nsIDOMWindowInternal object.
+  // Get parent nsPIDOMWindow object.
   nsIContent* content = mFrame->GetContent();
   if (!content)
     return NS_ERROR_FAILURE;
 
   nsHTMLInputElement* inputElement = nsHTMLInputElement::FromContent(content);
   if (!inputElement)
     return NS_ERROR_FAILURE;
 
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -52,17 +52,16 @@
 #include "nsIPresShell.h"
 #include "nsIScrollPositionListener.h"
 #include "nsDisplayList.h"
 #include "nsAbsoluteContainingBlock.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsFrameManager.h"
 
 // for focus
-#include "nsIDOMWindowInternal.h"
 #include "nsIScrollableFrame.h"
 #include "nsIDocShell.h"
 
 #ifdef DEBUG_rods
 //#define DEBUG_CANVAS_FOCUS
 #endif
 
 #define CANVAS_ABS_POS_CHILD_LIST NS_CONTAINER_LIST_COUNT_INCL_OC
--- a/layout/inspector/public/inIFlasher.idl
+++ b/layout/inspector/public/inIFlasher.idl
@@ -33,19 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 
-interface nsIDOMDocument;
 interface nsIDOMElement;
-interface nsIDOMWindowInternal;
 
 [scriptable, uuid(7B4A099F-6F6E-4565-977B-FB622ADBFF49)]
 interface inIFlasher : nsISupports 
 {
   attribute DOMString       color;
   attribute boolean         invert;
   attribute unsigned short  thickness;
 
--- a/layout/inspector/src/inDOMUtils.cpp
+++ b/layout/inspector/src/inDOMUtils.cpp
@@ -45,17 +45,17 @@
 #include "nsIDocument.h"
 #include "nsIPresShell.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMCharacterData.h"
 #include "nsRuleNode.h"
 #include "nsIStyleRule.h"
 #include "mozilla/css/StyleRule.h"
 #include "nsICSSStyleRuleDOMWrapper.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsXBLBinding.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsIMutableArray.h"
 #include "nsBindingManager.h"
 #include "nsComputedDOMStyle.h"
 #include "nsEventStateManager.h"
 #include "nsIAtom.h"
 #include "nsIRange.h"
@@ -90,17 +90,17 @@ inDOMUtils::IsIgnorableWhitespace(nsIDOM
 
   if (!content->TextIsOnlyWhitespace()) {
     return NS_OK;
   }
 
   // Okay.  We have only white space.  Let's check the white-space
   // property now and make sure that this isn't preformatted text...
 
-  nsCOMPtr<nsIDOMWindowInternal> win = inLayoutUtils::GetWindowFor(aDataNode);
+  nsCOMPtr<nsIDOMWindow> win = inLayoutUtils::GetWindowFor(aDataNode);
   if (!win) {
     // Hmm.  Things are screwy if we have no window...
     NS_ERROR("No window!");
     return NS_OK;
   }
 
   nsIFrame* frame = content->GetPrimaryFrame();
   if (frame) {
--- a/layout/inspector/src/inFlasher.cpp
+++ b/layout/inspector/src/inFlasher.cpp
@@ -141,17 +141,17 @@ inFlasher::RepaintElement(nsIDOMElement*
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 inFlasher::DrawElementOutline(nsIDOMElement* aElement)
 {
   NS_ENSURE_ARG_POINTER(aElement);
-  nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
+  nsCOMPtr<nsIDOMWindow> window = inLayoutUtils::GetWindowFor(aElement);
   if (!window) return NS_OK;
   nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
   if (!presShell) return NS_OK;
 
   nsIFrame* frame = inLayoutUtils::GetFrameFor(aElement);
 
   PRBool isFirstFrame = PR_TRUE;
 
@@ -178,17 +178,17 @@ inFlasher::DrawElementOutline(nsIDOMElem
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 inFlasher::ScrollElementIntoView(nsIDOMElement *aElement)
 {
   NS_ENSURE_ARG_POINTER(aElement);
-  nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
+  nsCOMPtr<nsIDOMWindow> window = inLayoutUtils::GetWindowFor(aElement);
   if (!window) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
   if (!presShell) {
     return NS_OK;
   }
--- a/layout/inspector/src/inLayoutUtils.cpp
+++ b/layout/inspector/src/inLayoutUtils.cpp
@@ -42,35 +42,30 @@
 #include "nsIContentViewer.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 
 ///////////////////////////////////////////////////////////////////////////////
 
-nsIDOMWindowInternal*
+nsIDOMWindow*
 inLayoutUtils::GetWindowFor(nsIDOMNode* aNode)
 {
   nsCOMPtr<nsIDOMDocument> doc1;
   aNode->GetOwnerDocument(getter_AddRefs(doc1));
   return GetWindowFor(doc1.get());
 }
 
-nsIDOMWindowInternal*
+nsIDOMWindow*
 inLayoutUtils::GetWindowFor(nsIDOMDocument* aDoc)
 {
   nsCOMPtr<nsIDOMWindow> window;
   aDoc->GetDefaultView(getter_AddRefs(window));
-  if (!window) {
-    return nsnull;
-  }
-  
-  nsCOMPtr<nsIDOMWindowInternal> windowInternal = do_QueryInterface(window);
-  return windowInternal;
+  return window;
 }
 
 nsIPresShell* 
 inLayoutUtils::GetPresShellFor(nsISupports* aThing)
 {
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aThing);
 
   nsCOMPtr<nsIPresShell> presShell;
--- a/layout/inspector/src/inLayoutUtils.h
+++ b/layout/inspector/src/inLayoutUtils.h
@@ -37,27 +37,27 @@
 
 #ifndef __inLayoutUtils_h__
 #define __inLayoutUtils_h__
 
 class nsBindingManager;
 class nsIDOMDocument;
 class nsIDOMElement;
 class nsIDOMNode;
-class nsIDOMWindowInternal;
+class nsIDOMWindow;
 class nsEventStateManager;
 class nsIFrame;
 class nsIPresShell;
 class nsISupports;
 
 class inLayoutUtils
 {
 public:
-  static nsIDOMWindowInternal* GetWindowFor(nsIDOMNode* aNode);
-  static nsIDOMWindowInternal* GetWindowFor(nsIDOMDocument* aDoc);
+  static nsIDOMWindow* GetWindowFor(nsIDOMNode* aNode);
+  static nsIDOMWindow* GetWindowFor(nsIDOMDocument* aDoc);
   static nsIPresShell* GetPresShellFor(nsISupports* aThing);
   static nsIFrame* GetFrameFor(nsIDOMElement* aElement);
   static nsEventStateManager* GetEventStateManagerFor(nsIDOMElement *aElement);
   static nsBindingManager* GetBindingManagerFor(nsIDOMNode* aNode);
   static nsIDOMDocument* GetSubDocumentFor(nsIDOMNode* aNode);
   static nsIDOMNode* GetContainerFor(nsIDOMDocument* aDoc);
 };
 
--- a/layout/printing/nsIPrintProgress.idl
+++ b/layout/printing/nsIPrintProgress.idl
@@ -34,27 +34,27 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "nsISupports.idl"
 #include "nsIWebProgressListener.idl"
 
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIObserver;
 interface nsIPrompt;
 
-[scriptable, uuid(7E46BC35-FB7D-4b45-AB35-82FD61015380)]
+[scriptable, uuid(594fd36d-5b1b-412f-a74e-ab72099a5bb2)]
 interface nsIPrintProgress: nsIWebProgressListener {
 
   /* Open the progress dialog
      you can specify parameters through an xpcom object
   */
-  void openProgressDialog(in nsIDOMWindowInternal parent, 
+  void openProgressDialog(in nsIDOMWindow parent, 
                           in string dialogURL, 
                           in nsISupports parameters, 
                           in nsIObserver openDialogObserver,
                           out boolean notifyOnOpen);
   
   /* Close the progress dialog */
   void closeProgressDialog(in boolean forceClose);
   
--- a/layout/printing/nsIPrintStatusFeedback.idl
+++ b/layout/printing/nsIPrintStatusFeedback.idl
@@ -33,21 +33,21 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
  
 #include "nsISupports.idl"
 
 interface nsIDocShell;
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 
-[scriptable, uuid(19855DFF-3248-4902-B196-93EE4C477880)]
+[scriptable, uuid(e439d3eb-b1ed-449c-aaf7-c693e399b16f)]
 interface nsIPrintStatusFeedback : nsISupports {
 
 	void showStatusString(in wstring status);
 	void startMeteors();
 	void stopMeteors();
 	void showProgress(in long percent);
-	[noscript] void setDocShell(in nsIDocShell shell, in nsIDOMWindowInternal window);
+	[noscript] void setDocShell(in nsIDocShell shell, in nsIDOMWindow window);
 	void closeWindow();
 };
 
--- a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
@@ -44,17 +44,17 @@
 #include "nsDisplayList.h"
 #include "nsStubMutationObserver.h"
 #include "gfxContext.h"
 #include "gfxMatrix.h"
 #include "gfxRect.h"
 #include "nsIContentViewer.h"
 #include "nsIDocShell.h"
 #include "nsIDOMDocument.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsSVGMatrix.h"
 
 namespace dom = mozilla::dom;
 
 class nsSVGMutationObserver : public nsStubMutationObserver
@@ -832,17 +832,17 @@ nsSVGOuterSVGFrame::UnregisterForeignObj
 }
 
 PRBool
 nsSVGOuterSVGFrame::IsRootOfReplacedElementSubDoc(nsIFrame **aEmbeddingFrame)
 {
   if (!mContent->GetParent()) {
     // Our content is the document element
     nsCOMPtr<nsISupports> container = PresContext()->GetContainer();
-    nsCOMPtr<nsIDOMWindowInternal> window = do_GetInterface(container);
+    nsCOMPtr<nsIDOMWindow> window = do_GetInterface(container);
     if (window) {
       nsCOMPtr<nsIDOMElement> frameElement;
       window->GetFrameElement(getter_AddRefs(frameElement));
       nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(frameElement);
       if (olc) {
         // Our document is inside an HTML 'object', 'embed' or 'applet' element
         if (aEmbeddingFrame) {
           nsCOMPtr<nsIContent> element = do_QueryInterface(frameElement);
--- a/layout/xul/base/src/nsMenuBarFrame.cpp
+++ b/layout/xul/base/src/nsMenuBarFrame.cpp
@@ -48,17 +48,16 @@
 #include "nsINameSpaceManager.h"
 #include "nsIDocument.h"
 #include "nsIDOMEventTarget.h"
 #include "nsGkAtoms.h"
 #include "nsMenuFrame.h"
 #include "nsMenuPopupFrame.h"
 #include "nsGUIEvent.h"
 #include "nsUnicharUtils.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMDocument.h"
 #include "nsPIDOMWindow.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsCSSFrameConstructor.h"
 #ifdef XP_WIN
 #include "nsISound.h"
 #include "nsWidgetsCID.h"
 #endif
--- a/layout/xul/base/src/nsXULPopupManager.cpp
+++ b/layout/xul/base/src/nsXULPopupManager.cpp
@@ -713,21 +713,19 @@ CheckCaretDrawingState() {
   // document and erase its caret.
   nsIFocusManager* fm = nsFocusManager::GetFocusManager();
   if (fm) {
     nsCOMPtr<nsIDOMWindow> window;
     fm->GetFocusedWindow(getter_AddRefs(window));
     if (!window)
       return;
 
-    nsCOMPtr<nsIDOMWindowInternal> windowInternal = do_QueryInterface(window);
-
     nsCOMPtr<nsIDOMDocument> domDoc;
     nsCOMPtr<nsIDocument> focusedDoc;
-    windowInternal->GetDocument(getter_AddRefs(domDoc));
+    window->GetDocument(getter_AddRefs(domDoc));
     focusedDoc = do_QueryInterface(domDoc);
     if (!focusedDoc)
       return;
 
     nsIPresShell* presShell = focusedDoc->GetShell();
     if (!presShell)
       return;
 
--- a/mobile/components/HelperAppDialog.js
+++ b/mobile/components/HelperAppDialog.js
@@ -112,17 +112,17 @@ HelperAppLauncherDialog.prototype = {
         if (file)
           return file;
       }
     }
 
     // Use file picker to show dialog.
     let picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
     let windowTitle = "";
-    let parent = aContext.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal);
+    let parent = aContext.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
     picker.init(parent, windowTitle, Ci.nsIFilePicker.modeSave);
     picker.defaultString = aDefaultFile;
 
     if (aSuggestedFileExt) {
       // aSuggestedFileExtension includes the period, so strip it
       picker.defaultExtension = aSuggestedFileExt.substring(1);
     }
     else {
--- a/netwerk/test/browser/browser_NetUtil.js
+++ b/netwerk/test/browser/browser_NetUtil.js
@@ -74,17 +74,17 @@ function test_asyncFetchBadCert() {
 
 function WindowListener(aURL, aCallback) {
   this.callback = aCallback;
   this.url = aURL;
 }
 WindowListener.prototype = {
   onOpenWindow: function(aXULWindow) {
     var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                              .getInterface(Ci.nsIDOMWindowInternal);
+                              .getInterface(Ci.nsIDOMWindow);
     var self = this;
     domwindow.addEventListener("load", function() {
       domwindow.removeEventListener("load", arguments.callee, false);
 
       if (domwindow.document.location.href != self.url)
         return;
 
       // Allow other window load listeners to execute before passing to callback
--- a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
+++ b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp
@@ -415,17 +415,17 @@ static PRUint32 GetSecurityStateFromSecu
   PR_LOG(gSecureDocLog, PR_LOG_DEBUG, ("SecureUI: GetSecurityState: - Returning %d\n", 
                                        securityState));
   return securityState;
 }
 
 
 NS_IMETHODIMP
 nsSecureBrowserUIImpl::Notify(nsIDOMHTMLFormElement* aDOMForm,
-                              nsIDOMWindowInternal* aWindow, nsIURI* actionURL,
+                              nsIDOMWindow* aWindow, nsIURI* actionURL,
                               PRBool* cancelSubmit)
 {
   // Return NS_OK unless we want to prevent this form from submitting.
   *cancelSubmit = PR_FALSE;
   if (!aWindow || !actionURL || !aDOMForm)
     return NS_OK;
   
   nsCOMPtr<nsIContent> formNode = do_QueryInterface(aDOMForm);
@@ -1786,22 +1786,22 @@ nsUIContext::~nsUIContext()
 
 /* void getInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
 NS_IMETHODIMP nsUIContext::GetInterface(const nsIID & uuid, void * *result)
 {
   NS_ENSURE_TRUE(mWindow, NS_ERROR_FAILURE);
   nsresult rv;
 
   if (uuid.Equals(NS_GET_IID(nsIPrompt))) {
-    nsCOMPtr<nsIDOMWindowInternal> internal = do_QueryInterface(mWindow, &rv);
+    nsCOMPtr<nsIDOMWindow> window = do_QueryInterface(mWindow, &rv);
     if (NS_FAILED(rv)) return rv;
 
     nsIPrompt *prompt;
 
-    rv = internal->GetPrompter(&prompt);
+    rv = window->GetPrompter(&prompt);
     *result = prompt;
   } else if (uuid.Equals(NS_GET_IID(nsIDOMWindow))) {
     *result = mWindow;
     NS_ADDREF ((nsISupports*) *result);
     rv = NS_OK;
   } else {
     rv = NS_ERROR_NO_INTERFACE;
   }
--- a/security/manager/boot/src/nsSecureBrowserUIImpl.h
+++ b/security/manager/boot/src/nsSecureBrowserUIImpl.h
@@ -86,17 +86,17 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSISECUREBROWSERUI
   
   // nsIObserver
   NS_DECL_NSIOBSERVER
   NS_DECL_NSISSLSTATUSPROVIDER
 
-  NS_IMETHOD Notify(nsIDOMHTMLFormElement* formNode, nsIDOMWindowInternal* window,
+  NS_IMETHOD Notify(nsIDOMHTMLFormElement* formNode, nsIDOMWindow* window,
                     nsIURI *actionURL, PRBool* cancelSubmit);
   NS_IMETHOD NotifyInvalidSubmit(nsIDOMHTMLFormElement* formNode,
                                  nsIArray* invalidElements) { return NS_OK; };
   
 protected:
   mozilla::ReentrantMonitor mReentrantMonitor;
   
   nsWeakPtr mWindow;
--- a/security/manager/pki/src/nsFormSigningDialog.cpp
+++ b/security/manager/pki/src/nsFormSigningDialog.cpp
@@ -62,17 +62,17 @@ nsFormSigningDialog::ConfirmSignText(nsI
                                      const PRUnichar **aCertNickList,
                                      const PRUnichar **aCertDetailsList,
                                      PRUint32 aCount, PRInt32 *aSelectedIndex,
                                      nsAString &aPassword, PRBool *aCanceled) 
 {
   *aCanceled = PR_TRUE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(aContext);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(aContext);
 
   nsresult rv;
   nsCOMPtr<nsIDialogParamBlock> block =
     do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   block->SetNumberStrings(3 + aCount * 2);
 
--- a/security/manager/pki/src/nsNSSDialogHelper.cpp
+++ b/security/manager/pki/src/nsNSSDialogHelper.cpp
@@ -46,36 +46,30 @@
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 
 static const char kOpenDialogParam[] = "centerscreen,chrome,modal,titlebar";
 static const char kOpenWindowParam[] = "centerscreen,chrome,titlebar";
 
 nsresult
 nsNSSDialogHelper::openDialog(
-    nsIDOMWindowInternal *window,
+    nsIDOMWindow *window,
     const char *url,
     nsISupports *params,
     PRBool modal)
 {
   nsresult rv;
   nsCOMPtr<nsIWindowWatcher> windowWatcher = 
            do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
 
-  nsIDOMWindowInternal *parent = window;
+  nsCOMPtr<nsIDOMWindow> parent = window;
 
-  nsCOMPtr<nsIDOMWindowInternal> activeParent;
   if (!parent) {
-    nsCOMPtr<nsIDOMWindow> active;
-    windowWatcher->GetActiveWindow(getter_AddRefs(active));
-    if (active) {
-      active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(activeParent));
-      parent = activeParent;
-    }
+    windowWatcher->GetActiveWindow(getter_AddRefs(parent));
   }
 
   nsCOMPtr<nsIDOMWindow> newWindow;
   rv = windowWatcher->OpenWindow(parent,
                                  url,
                                  "_blank",
                                  modal
                                  ? kOpenDialogParam
--- a/security/manager/pki/src/nsNSSDialogHelper.h
+++ b/security/manager/pki/src/nsNSSDialogHelper.h
@@ -33,28 +33,28 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 
 /**
  * Common class that uses the window watcher service to open a
  * standard dialog, with or without a parent context. The params
  * parameter can be an nsISupportsArray so any number of additional
  * arguments can be used.
  */
 class nsNSSDialogHelper
 {
 public:
   //The params is going to be either a nsIPKIParamBlock or
   //nsIDialogParamBlock
   static nsresult openDialog(
-                  nsIDOMWindowInternal *window,
+                  nsIDOMWindow *window,
                   const char *url,
                   nsISupports *params,
                   PRBool modal = PR_TRUE);
 };
 
--- a/security/manager/pki/src/nsNSSDialogs.cpp
+++ b/security/manager/pki/src/nsNSSDialogs.cpp
@@ -42,17 +42,17 @@
 /*
  * Dialog services for PIP.
  */
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsIPrompt.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDialogParamBlock.h"
 #include "nsIComponentManager.h"
 #include "nsIServiceManager.h"
 #include "nsIStringBundle.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIX509Cert.h"
 #include "nsIX509CertDB.h"
@@ -108,17 +108,17 @@ nsresult
 nsNSSDialogs::SetPassword(nsIInterfaceRequestor *ctx,
                           const PRUnichar *tokenName, PRBool* _canceled)
 {
   nsresult rv;
 
   *_canceled = PR_FALSE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
 
   // void ChangePassword(in wstring tokenName, out int status);
   rv = block->SetString(1, tokenName);
   if (NS_FAILED(rv)) return rv;
@@ -143,17 +143,17 @@ nsresult
 nsNSSDialogs::GetPassword(nsIInterfaceRequestor *ctx,
                           const PRUnichar *tokenName, 
                           PRUnichar **_password,
                           PRBool* _canceled)
 {
   nsresult rv;
   *_canceled = PR_FALSE;
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
   nsCOMPtr<nsIDialogParamBlock> block = 
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
   // Set the token name in the window
   rv = block->SetString(1, tokenName);
   if (NS_FAILED(rv)) return rv;
   // open up the window
   rv = nsNSSDialogHelper::openDialog(parent,
@@ -199,29 +199,29 @@ nsNSSDialogs::ConfirmDownloadCACert(nsII
                                     PRUint32 *_trust,
                                     PRBool *_retval)
 {
   nsresult rv;
 
   *_retval = PR_TRUE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsCOMPtr<nsIPKIParamBlock> block =
            do_CreateInstance(NS_PKIPARAMBLOCK_CONTRACTID);
   if (!block)
     return NS_ERROR_FAILURE;
 
   rv = block->SetISupportAtIndex(1, cert);
   if (NS_FAILED(rv))
     return rv;
 
   rv = nsNSSDialogHelper::openDialog(parent, 
-                                   "chrome://pippki/content/downloadcert.xul",
+                                     "chrome://pippki/content/downloadcert.xul",
                                      block);
   if (NS_FAILED(rv)) return rv;
 
   PRInt32 status;
   PRInt32 ssl, email, objsign;
 
   nsCOMPtr<nsIDialogParamBlock> dlgParamBlock = do_QueryInterface(block);
   
@@ -246,17 +246,17 @@ nsNSSDialogs::ConfirmDownloadCACert(nsII
 
 
 NS_IMETHODIMP 
 nsNSSDialogs::NotifyCACertExists(nsIInterfaceRequestor *ctx)
 {
   nsresult rv;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
 
   
   rv = nsNSSDialogHelper::openDialog(parent, 
                                      "chrome://pippki/content/cacertexists.xul",
@@ -270,17 +270,17 @@ NS_IMETHODIMP
 nsNSSDialogs::ChooseCertificate(nsIInterfaceRequestor *ctx, const PRUnichar *cn, const PRUnichar *organization, const PRUnichar *issuer, const PRUnichar **certNickList, const PRUnichar **certDetailsList, PRUint32 count, PRInt32 *selectedIndex, PRBool *canceled) 
 {
   nsresult rv;
   PRUint32 i;
 
   *canceled = PR_FALSE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
 
   block->SetNumberStrings(4+count*2);
 
   rv = block->SetString(0, cn);
@@ -341,17 +341,17 @@ nsNSSDialogs::PickCertificate(nsIInterfa
                               PRBool *canceled) 
 {
   nsresult rv;
   PRUint32 i;
 
   *canceled = PR_FALSE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
 
   block->SetNumberStrings(1+count*2);
 
   for (i = 0; i < count; i++) {
@@ -391,17 +391,17 @@ nsNSSDialogs::PickCertificate(nsIInterfa
 NS_IMETHODIMP 
 nsNSSDialogs::SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, 
                                     nsAString &_password,
                                     PRBool *_retval)
 {
   nsresult rv;
   *_retval = PR_TRUE;
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
   // open up the window
   rv = nsNSSDialogHelper::openDialog(parent,
                                   "chrome://pippki/content/setp12password.xul",
                                   block);
   if (NS_FAILED(rv)) return rv;
@@ -425,17 +425,17 @@ nsNSSDialogs::SetPKCS12FilePassword(nsII
 NS_IMETHODIMP 
 nsNSSDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, 
                                     nsAString &_password,
                                     PRBool *_retval)
 {
   nsresult rv;
   *_retval = PR_TRUE;
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
   // open up the window
   rv = nsNSSDialogHelper::openDialog(parent,
                                   "chrome://pippki/content/getp12password.xul",
                                   block);
   if (NS_FAILED(rv)) return rv;
@@ -468,48 +468,48 @@ nsNSSDialogs::ViewCert(nsIInterfaceReque
   if (!block)
     return NS_ERROR_FAILURE;
 
   rv = block->SetISupportAtIndex(1, cert);
   if (NS_FAILED(rv))
     return rv;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
 
   rv = nsNSSDialogHelper::openDialog(parent,
                                      "chrome://pippki/content/certViewer.xul",
                                      block,
                                      PR_FALSE);
   return rv;
 }
 
 NS_IMETHODIMP
 nsNSSDialogs::DisplayGeneratingKeypairInfo(nsIInterfaceRequestor *aCtx, nsIKeygenThread *runnable) 
 {
   nsresult rv;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(aCtx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(aCtx);
 
   rv = nsNSSDialogHelper::openDialog(parent,
                                      "chrome://pippki/content/createCertInfo.xul",
                                      runnable);
   return rv;
 }
 
 NS_IMETHODIMP
 nsNSSDialogs::ChooseToken(nsIInterfaceRequestor *aCtx, const PRUnichar **aTokenList, PRUint32 aCount, PRUnichar **aTokenChosen, PRBool *aCanceled) {
   nsresult rv;
   PRUint32 i;
 
   *aCanceled = PR_FALSE;
 
   // Get the parent window for the dialog
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(aCtx);
+  nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(aCtx);
 
   nsCOMPtr<nsIDialogParamBlock> block =
            do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
   if (!block) return NS_ERROR_FAILURE;
 
   block->SetNumberStrings(aCount);
 
   for (i = 0; i < aCount; i++) {
@@ -579,33 +579,25 @@ nsNSSDialogs::DisplayProtectedAuth(nsIIn
     // We cannot use nsNSSDialogHelper here. We cannot allow close widget
     // in the window because protected authentication is interruptible
     // from user interface and changing nsNSSDialogHelper's static variable
     // would not be thread-safe
     
     nsresult rv = NS_ERROR_FAILURE;
     
     // Get the parent window for the dialog
-    nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(aCtx);
+    nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(aCtx);
     
     nsCOMPtr<nsIWindowWatcher> windowWatcher = 
         do_GetService("@mozilla.org/embedcomp/window-watcher;1", &rv);
     if (NS_FAILED(rv))
         return rv;
     
-    nsCOMPtr<nsIDOMWindowInternal> activeParent;
-    if (!parent)
-    {
-        nsCOMPtr<nsIDOMWindow> active;
-        windowWatcher->GetActiveWindow(getter_AddRefs(active));
-        if (active)
-        {
-            active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(activeParent));
-            parent = activeParent;
-        }
+    if (!parent) {
+        windowWatcher->GetActiveWindow(getter_AddRefs(parent));
     }
     
     nsCOMPtr<nsIDOMWindow> newWindow;
     rv = windowWatcher->OpenWindow(parent,
         "chrome://pippki/content/protectedAuth.xul",
         "_blank",
         "centerscreen,chrome,modal,titlebar,close=no",
         runnable,
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -71,17 +71,16 @@
 #include "nsIPrefBranch.h"
 #include "nsIPrefBranch2.h"
 #include "nsIDateTimeFormat.h"
 #include "nsDateTimeFormatCID.h"
 #include "nsIDOMEvent.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMWindowCollection.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMSmartCardEvent.h"
 #include "nsIDOMCrypto.h"
 #include "nsThreadUtils.h"
 #include "nsAutoPtr.h"
 #include "nsCRT.h"
 #include "nsCRLInfo.h"
 #include "nsCertOverrideService.h"
 
@@ -543,23 +542,23 @@ nsNSSComponent::DispatchEventToWindow(ns
       DispatchEventToWindow(childWin, eventType, tokenName);
     }
   }
 
   // check if we've enabled smart card events on this window
   // NOTE: it's not an error to say that we aren't going to dispatch
   // the event.
   {
-    nsCOMPtr<nsIDOMWindowInternal> intWindow = do_QueryInterface(domWin);
-    if (!intWindow) {
+    nsCOMPtr<nsIDOMWindow> domWindow = domWin;
+    if (!domWindow) {
       return NS_OK; // nope, it's not an internal window
     }
 
     nsCOMPtr<nsIDOMCrypto> crypto;
-    intWindow->GetCrypto(getter_AddRefs(crypto));
+    domWindow->GetCrypto(getter_AddRefs(crypto));
     if (!crypto) {
       return NS_OK; // nope, it doesn't have a crypto property
     }
 
     PRBool boolrv;
     crypto->GetEnableSmartCardEvents(&boolrv);
     if (!boolrv) {
       return NS_OK; // nope, it's not enabled.
--- a/toolkit/components/alerts/nsAlertsService.cpp
+++ b/toolkit/components/alerts/nsAlertsService.cpp
@@ -35,41 +35,42 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "mozilla/dom/ContentChild.h"
 #include "nsXULAppAPI.h"
-using mozilla::dom::ContentChild;
 
 #include "nsAlertsService.h"
 
 #ifdef ANDROID
 #include "AndroidBridge.h"
 #else
 
 #include "nsISupportsArray.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIServiceManager.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIWindowWatcher.h"
 #include "nsDependentString.h"
 #include "nsWidgetsCID.h"
 #include "nsILookAndFeel.h"
 #include "nsToolkitCompsCID.h"
 
 static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
 
 #define ALERT_CHROME_URL "chrome://global/content/alerts/alert.xul"
 
 #endif // !ANDROID
 
+using mozilla::dom::ContentChild;
+
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsAlertsService, nsIAlertsService, nsIAlertsProgressListener)
 
 nsAlertsService::nsAlertsService()
 {
 }
 
 nsAlertsService::~nsAlertsService()
 {}
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -4429,17 +4429,17 @@ JSTerm.prototype = {
     this.sandbox = new Cu.Sandbox(this._window,
       { sandboxPrototype: this._window, wantXrays: false });
     this.sandbox.console = this.console;
     JSTermHelper(this);
   },
 
   get _window()
   {
-    return this.context.get().QueryInterface(Ci.nsIDOMWindowInternal);
+    return this.context.get().QueryInterface(Ci.nsIDOMWindow);
   },
 
   /**
    * Evaluates a string in the sandbox.
    *
    * @param string aString
    *        String to evaluate in the sandbox.
    * @returns something
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -39,17 +39,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "mozIStorageService.h"
 #include "nsIAlertsService.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDownloadHistory.h"
 #include "nsIDownloadManagerUI.h"
 #include "nsIMIMEService.h"
 #include "nsIParentalControlsService.h"
 #include "nsIPrefService.h"
 #include "nsIPrivateBrowsingService.h"
 #include "nsIPromptService.h"
 #include "nsIResumableChannel.h"
@@ -2100,17 +2100,17 @@ nsDownloadManager::ConfirmCancelDownload
     mBundle->GetStringFromName(NS_LITERAL_STRING("cancelDownloadsOKText").get(),
                                getter_Copies(quitButton));
   }
 
   mBundle->GetStringFromName(aDontCancelButton, getter_Copies(dontQuitButton));
 
   // Get Download Manager window, to be parent of alert.
   nsCOMPtr<nsIWindowMediator> wm = do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
-  nsCOMPtr<nsIDOMWindowInternal> dmWindow;
+  nsCOMPtr<nsIDOMWindow> dmWindow;
   if (wm) {
     wm->GetMostRecentWindow(NS_LITERAL_STRING("Download:Manager").get(),
                             getter_AddRefs(dmWindow));
   }
 
   // Show alert.
   nsCOMPtr<nsIPromptService> prompter(do_GetService(NS_PROMPTSERVICE_CONTRACTID));
   if (prompter) {
@@ -3080,17 +3080,17 @@ nsDownload::FailDownload(nsresult aStatu
       NS_LITERAL_STRING("downloadErrorGeneric").get(), getter_Copies(message));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // Get Download Manager window to be parent of alert
   nsCOMPtr<nsIWindowMediator> wm =
     do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  nsCOMPtr<nsIDOMWindowInternal> dmWindow;
+  nsCOMPtr<nsIDOMWindow> dmWindow;
   rv = wm->GetMostRecentWindow(NS_LITERAL_STRING("Download:Manager").get(),
                                getter_AddRefs(dmWindow));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Show alert
   nsCOMPtr<nsIPromptService> prompter =
     do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -2219,17 +2219,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
 
 /**
  * Updates commands in the undo group of the active window commands.
  * Inactive windows commands will be updated on focus.
  */
 function updateCommandsOnActiveWindow()
 {
   let win = focusManager.activeWindow;
-  if (win && win instanceof Ci.nsIDOMWindowInternal) {
+  if (win && win instanceof Ci.nsIDOMWindow) {
     // Updating "undo" will cause a group update including "redo".
     win.updateCommands("undo");
   }
 }
 
 
 /**
  * Base transaction implementation.
--- a/toolkit/components/remote/nsGTKRemoteService.cpp
+++ b/toolkit/components/remote/nsGTKRemoteService.cpp
@@ -113,17 +113,17 @@ static nsIWidget* GetMainWidget(nsIDOMWi
   return mainWidget;
 }
 
 static nsGTKToolkit* GetGTKToolkit()
 {
   nsCOMPtr<nsIAppShellService> svc = do_GetService(NS_APPSHELLSERVICE_CONTRACTID);
   if (!svc)
     return nsnull;
-  nsCOMPtr<nsIDOMWindowInternal> window;
+  nsCOMPtr<nsIDOMWindow> window;
   svc->GetHiddenDOMWindow(getter_AddRefs(window));
   if (!window)
     return nsnull;
   nsIWidget* widget = GetMainWidget(window);
   if (!widget)
     return nsnull;
   nsIToolkit* toolkit = widget->GetToolkit();
   if (!toolkit)
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -41,17 +41,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAppStartup.h"
 
 #include "nsIAppShellService.h"
 #include "nsPIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsILocalFile.h"
 #include "nsIObserverService.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsIProfileChangeStatus.h"
 #include "nsIPromptService.h"
 #include "nsIStringBundle.h"
@@ -335,17 +334,17 @@ nsAppStartup::Quit(PRUint32 aMode)
         if (windowEnumerator) {
           PRBool more;
           while (windowEnumerator->HasMoreElements(&more), more) {
             /* we can't quit immediately. we'll try again as the last window
                finally closes. */
             ferocity = eAttemptQuit;
             nsCOMPtr<nsISupports> window;
             windowEnumerator->GetNext(getter_AddRefs(window));
-            nsCOMPtr<nsIDOMWindowInternal> domWindow(do_QueryInterface(window));
+            nsCOMPtr<nsIDOMWindow> domWindow = do_QueryInterface(window);
             if (domWindow) {
               PRBool closed = PR_FALSE;
               domWindow->GetClosed(&closed);
               if (!closed) {
                 rv = NS_ERROR_FAILURE;
                 break;
               }
             }
--- a/toolkit/components/startup/tests/browser/browser_bug511456.js
+++ b/toolkit/components/startup/tests/browser/browser_bug511456.js
@@ -61,17 +61,17 @@ var Watcher = {
 
   // nsIWindowMediatorListener
 
   onWindowTitleChange: function(win, title) {
   },
 
   onOpenWindow: function(win) {
     var domwindow = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                       .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                       .getInterface(Components.interfaces.nsIDOMWindow);
     var self = this;
     domwindow.addEventListener("load", function() {
       domwindow.removeEventListener("load", arguments.callee, false);
       self.windowLoad(domwindow);
     }, false);
   },
 
   onCloseWindow: function(win) {
--- a/toolkit/components/startup/tests/browser/browser_bug537449.js
+++ b/toolkit/components/startup/tests/browser/browser_bug537449.js
@@ -61,17 +61,17 @@ var Watcher = {
 
   // nsIWindowMediatorListener
 
   onWindowTitleChange: function(win, title) {
   },
 
   onOpenWindow: function(win) {
     var domwindow = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                       .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                       .getInterface(Components.interfaces.nsIDOMWindow);
     var self = this;
     domwindow.addEventListener("load", function() {
       domwindow.removeEventListener("load", arguments.callee, false);
       self.windowLoad(domwindow);
     }, false);
   },
 
   onCloseWindow: function(win) {
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
@@ -184,17 +184,17 @@ nsUnknownContentTypeDialog.prototype = {
 
   // When opening from new tab, if tab closes while dialog is opening,
   // (which is a race condition on the XUL file being cached and the timer
   // in nsExternalHelperAppService), the dialog gets a blur and doesn't
   // activate the OK button.  So we wait a bit before doing opening it.
   reallyShow: function() {
     try {
       var ir = this.mContext.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
-      var dwi = ir.getInterface(Components.interfaces.nsIDOMWindowInternal);
+      var dwi = ir.getInterface(Components.interfaces.nsIDOMWindow);
       var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                          .getService(Components.interfaces.nsIWindowWatcher);
       this.mDialog = ww.openWindow(dwi,
                                    "chrome://mozapps/content/downloads/unknownContentType.xul",
                                    null,
                                    "chrome,centerscreen,titlebar,dialog=yes,dependent",
                                    null);
     } catch (ex) {
@@ -274,17 +274,17 @@ nsUnknownContentTypeDialog.prototype = {
           return result;
       }
     }
 
     // Use file picker to show dialog.
     var nsIFilePicker = Components.interfaces.nsIFilePicker;
     var picker = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
     var windowTitle = bundle.GetStringFromName("saveDialogTitle");
-    var parent = aContext.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowInternal);
+    var parent = aContext.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow);
     picker.init(parent, windowTitle, nsIFilePicker.modeSave);
     picker.defaultString = aDefaultFile;
 
     if (aSuggestedFileExtension) {
       // aSuggestedFileExtension includes the period, so strip it
       picker.defaultExtension = aSuggestedFileExtension.substring(1);
     }
     else {
--- a/toolkit/mozapps/downloads/tests/chrome/utils.js
+++ b/toolkit/mozapps/downloads/tests/chrome/utils.js
@@ -139,17 +139,17 @@ function populateDM(DownloadData)
     stmt.execute();
   }
   stmt.finalize();
 }
 
 /**
  * Returns an instance to the download manager window
  *
- * @return an instance of nsIDOMWindowInternal
+ * @return an instance of nsIDOMWindow
  */
 function getDMWindow()
 {
   return Cc["@mozilla.org/appshell/window-mediator;1"].
          getService(Ci.nsIWindowMediator).
          getMostRecentWindow("Download:Manager");
 }
 
--- a/toolkit/mozapps/downloads/tests/unit/test_privatebrowsing_downloadLastDir.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_privatebrowsing_downloadLastDir.js
@@ -81,17 +81,17 @@ if (!profileDir) {
 }
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/DownloadLastDir.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 let context = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterfaceRequestor]),
-  getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindowInternal])
+  getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindow])
 };
 
 function FilePickerService() {
 }
 
 FilePickerService.prototype = {
   _obs: Cc["@mozilla.org/observer-service;1"].
         getService(Ci.nsIObserverService),
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -822,17 +822,17 @@ var AddonManagerInternal = {
 
   /**
    * Starts installation of an array of AddonInstalls notifying the registered
    * web install listener of blocked or started installs.
    *
    * @param  aMimetype
    *         The mimetype of add-ons being installed
    * @param  aSource
-   *         The nsIDOMWindowInternal that started the installs
+   *         The nsIDOMWindow that started the installs
    * @param  aURI
    *         the nsIURI that started the installs
    * @param  aInstalls
    *         The array of AddonInstalls to be installed
    */
   installAddonsFromWebpage: function AMI_installAddonsFromWebpage(aMimetype,
                                                                   aSource,
                                                                   aURI,
--- a/toolkit/mozapps/extensions/amIWebInstallListener.idl
+++ b/toolkit/mozapps/extensions/amIWebInstallListener.idl
@@ -32,29 +32,29 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIURI;
 interface nsIVariant;
 
 /**
  * amIWebInstallInfo is used by the default implementation of
  * amIWebInstallListener to communicate with the running application and allow
  * it to warn the user about blocked installs and start the installs running.
  */
 [scriptable, uuid(8710e692-3989-4dc7-b607-40d57610ae75)]
 interface amIWebInstallInfo : nsISupports
 {
-  readonly attribute nsIDOMWindowInternal originatingWindow;
+  readonly attribute nsIDOMWindow originatingWindow;
   readonly attribute nsIURI originatingURI;
   readonly attribute nsIVariant installs;
 
   /**
    * Starts all installs.
    */
   void install();
 };
@@ -75,17 +75,17 @@ interface amIWebInstallListener : nsISup
    *         The window that triggered the installs
    * @param  aUri
    *         The URI of the site that triggered the installs
    * @param  aInstalls
    *         The AddonInstalls that were blocked
    * @param  aCount
    *         The number of AddonInstalls
    */
-  void onWebInstallDisabled(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+  void onWebInstallDisabled(in nsIDOMWindow aWindow, in nsIURI aUri,
                             [array, size_is(aCount)] in nsIVariant aInstalls,
                             [optional] in PRUint32 aCount);
 
   /**
    * Called when the website is not allowed to directly prompt the user to
    * install add-ons.
    *
    * @param  aWindow
@@ -93,34 +93,34 @@ interface amIWebInstallListener : nsISup
    * @param  aUri
    *         The URI of the site that triggered the installs
    * @param  aInstalls
    *         The AddonInstalls that were blocked
    * @param  aCount
    *         The number of AddonInstalls
    * @return true if the caller should start the installs
    */
-  boolean onWebInstallBlocked(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+  boolean onWebInstallBlocked(in nsIDOMWindow aWindow, in nsIURI aUri,
                               [array, size_is(aCount)] in nsIVariant aInstalls,
                               [optional] in PRUint32 aCount);
 
   /**
    * Called when a website wants to ask the user to install add-ons.
    *
    * @param  aWindow
    *         The window that triggered the installs
    * @param  aUri
    *         The URI of the site that triggered the installs
    * @param  aInstalls
    *         The AddonInstalls that were requested
    * @param  aCount
    *         The number of AddonInstalls
    * @return true if the caller should start the installs
    */
-  boolean onWebInstallRequested(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+  boolean onWebInstallRequested(in nsIDOMWindow aWindow, in nsIURI aUri,
                                 [array, size_is(aCount)] in nsIVariant aInstalls,
                                 [optional] in PRUint32 aCount);
 };
 
 /**
  * amIWebInstallPrompt is used, if available, by the default implementation of 
  * amIWebInstallInfo to display a confirmation UI to the user before running
  * installs.
@@ -135,12 +135,12 @@ interface amIWebInstallPrompt : nsISuppo
    *         The window that triggered the installs
    * @param  aUri
    *         The URI of the site that triggered the installs
    * @param  aInstalls
    *         The AddonInstalls that were requested
    * @param  aCount
    *         The number of AddonInstalls
    */
-  void confirm(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+  void confirm(in nsIDOMWindow aWindow, in nsIURI aUri,
                [array, size_is(aCount)] in nsIVariant aInstalls,
                [optional] in PRUint32 aCount);
 };
--- a/toolkit/mozapps/extensions/amIWebInstaller.idl
+++ b/toolkit/mozapps/extensions/amIWebInstaller.idl
@@ -32,17 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIVariant;
 interface amIInstallCallback;
 interface nsIURI;
 
 /**
  * This interface is used to allow webpages to start installing add-ons.
  */
 [scriptable, uuid(4fdf4f84-73dc-4857-9bbe-84895e8afd5d)]
@@ -79,17 +79,17 @@ interface amIWebInstaller : nsISupports
    * @param  aCallback
    *         An optional callback to notify about installation success and
    *         failure
    * @param  aInstallCount
    *         An optional argument including the number of add-ons to install
    * @return true if the installation was successfully started
    */
   boolean installAddonsFromWebpage(in AString aMimetype,
-                                   in nsIDOMWindowInternal aWindow,
+                                   in nsIDOMWindow aWindow,
                                    in nsIURI aReferer,
                                    [array, size_is(aInstallCount)] in wstring aUris,
                                    [array, size_is(aInstallCount)] in wstring aHashes,
                                    [array, size_is(aInstallCount)] in wstring aNames,
                                    [array, size_is(aInstallCount)] in wstring aIcons,
                                    [optional] in amIInstallCallback aCallback,
                                    [optional] in PRUint32 aInstallCount);
 };
--- a/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
@@ -70,17 +70,17 @@ WindowOpenListener.prototype = {
   },
 
   onOpenWindow: function(window) {
     if (this.window)
       return;
 
     this.window = window;
     this.domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                           .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                           .getInterface(Components.interfaces.nsIDOMWindow);
     this.domwindow.addEventListener("load", this, false);
   },
 
   onCloseWindow: function(window) {
     if (this.window != window)
       return;
 
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
--- a/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
@@ -43,17 +43,17 @@ WindowOpenListener.prototype = {
   },
 
   onOpenWindow: function(window) {
     if (this.window)
       return;
 
     this.window = window;
     this.domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                           .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                           .getInterface(Components.interfaces.nsIDOMWindow);
     this.domwindow.addEventListener("load", this, false);
   },
 
   onCloseWindow: function(window) {
     if (this.window != window)
       return;
 
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -299,17 +299,17 @@ function restart_manager(aManagerWindow,
 }
 
 function wait_for_window_open(aCallback) {
   Services.wm.addListener({
     onOpenWindow: function(aWindow) {
       Services.wm.removeListener(this);
 
       let domwindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                             .getInterface(Ci.nsIDOMWindowInternal);
+                             .getInterface(Ci.nsIDOMWindow);
       domwindow.addEventListener("load", function() {
         domwindow.removeEventListener("load", arguments.callee, false);
         executeSoon(function() {
           aCallback(domwindow);
         });
       }, false);
     },
 
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -238,17 +238,17 @@ var Harness = {
 
   // nsIWindowMediatorListener
 
   onWindowTitleChange: function(window, title) {
   },
 
   onOpenWindow: function(window) {
     var domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                          .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                          .getInterface(Components.interfaces.nsIDOMWindow);
     var self = this;
     waitForFocus(function() {
       self.windowReady(domwindow);
     }, domwindow);
   },
 
   onCloseWindow: function(window) {
   },
--- a/toolkit/mozapps/update/test/chrome/utils.js
+++ b/toolkit/mozapps/update/test/chrome/utils.js
@@ -1199,17 +1199,17 @@ function closeUpdateWindow() {
             "test... attempting to close it.");
   updateWindow.close();
   return true;
 }
 
 /**
  * Gets the update window.
  *
- * @return The nsIDOMWindowInternal for the Update Window if it is open and null
+ * @return The nsIDOMWindow for the Update Window if it is open and null
  *         if it isn't.
  */
 function getUpdateWindow() {
   return Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME);
 }
 
 /**
  * Helper for background check errors.
--- a/toolkit/mozapps/update/test/unit/test_0081_prompt_uiAlreadyOpen.js
+++ b/toolkit/mozapps/update/test/unit/test_0081_prompt_uiAlreadyOpen.js
@@ -96,17 +96,17 @@ var WindowWatcherFactory = {
     if (aOuter != null)
       throw AUS_Cr.NS_ERROR_NO_AGGREGATION;
     return WindowWatcher.QueryInterface(aIID);
   }
 };
 
 var WindowMediator = {
   getMostRecentWindow: function(aWindowType) {
-    return { getInterface: XPCOMUtils.generateQI([AUS_Ci.nsIDOMWindowInternal]) };
+    return { getInterface: XPCOMUtils.generateQI([AUS_Ci.nsIDOMWindow]) };
   },
 
   QueryInterface: function(aIID) {
     if (aIID.equals(AUS_Ci.nsIWindowMediator) ||
         aIID.equals(AUS_Ci.nsISupports))
       return this;
 
     throw AUS_Cr.NS_ERROR_NO_INTERFACE;
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -55,17 +55,16 @@
 #include <QtGui/QInputContextFactory>
 #include <QtGui/QInputContext>
 #ifdef MOZ_ENABLE_MEEGOTOUCH
 #include <MComponentData>
 #endif // MOZ_ENABLE_MEEGOTOUCH
 #endif // MOZ_WIDGET_QT
 
 #include "mozilla/dom/ContentParent.h"
-using mozilla::dom::ContentParent;
 
 #include "nsAppRunner.h"
 #include "nsUpdateDriver.h"
 
 #ifdef MOZ_INSTRUMENT_EVENT_LOOP
 #include "EventTracer.h"
 #endif
 
@@ -250,16 +249,18 @@ static char **gQtOnlyArgv;
 #include <gtk/gtk.h>
 #ifdef MOZ_X11
 #include <gdk/gdkx.h>
 #endif /* MOZ_X11 */
 #include "nsGTKToolkit.h"
 #endif
 #include "BinaryPath.h"
 
+using mozilla::dom::ContentParent;
+
 // Save literal putenv string to environment variable.
 static void
 SaveToEnv(const char *putenv)
 {
   char *expr = strdup(putenv);
   if (expr)
     PR_SetEnv(expr);
   // We intentionally leak |expr| here since it is required by PR_SetEnv.
@@ -2413,17 +2414,17 @@ static nsIWidget* GetMainWidget(nsIDOMWi
   return mainWidget;
 }
 
 static nsGTKToolkit* GetGTKToolkit()
 {
   nsCOMPtr<nsIAppShellService> svc = do_GetService(NS_APPSHELLSERVICE_CONTRACTID);
   if (!svc)
     return nsnull;
-  nsCOMPtr<nsIDOMWindowInternal> window;
+  nsCOMPtr<nsIDOMWindow> window;
   svc->GetHiddenDOMWindow(getter_AddRefs(window));
   if (!window)
     return nsnull;
   nsIWidget* widget = GetMainWidget(window);
   if (!widget)
     return nsnull;
   nsIToolkit* toolkit = widget->GetToolkit();
   if (!toolkit)
--- a/toolkit/xre/nsNativeAppSupportCocoa.mm
+++ b/toolkit/xre/nsNativeAppSupportCocoa.mm
@@ -44,28 +44,28 @@
 #include "nsCOMPtr.h"
 #include "nsObjCExceptions.h"
 #include "nsNativeAppSupportBase.h"
 
 #include "nsIAppShellService.h"
 #include "nsIAppStartup.h"
 #include "nsIBaseWindow.h"
 #include "nsICommandLineRunner.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIObserver.h"
 #include "nsIServiceManager.h"
 #include "nsIWebNavigation.h"
 #include "nsIWidget.h"
 #include "nsIWindowMediator.h"
 
 nsresult
-GetNativeWindowPointerFromDOMWindow(nsIDOMWindowInternal *a_window, NSWindow **a_nativeWindow)
+GetNativeWindowPointerFromDOMWindow(nsIDOMWindow *a_window, NSWindow **a_nativeWindow)
 {
   *a_nativeWindow = nil;
   if (!a_window)
     return NS_ERROR_INVALID_ARG;
 
   nsCOMPtr<nsIWebNavigation> mruWebNav(do_GetInterface(a_window));
   if (mruWebNav) {
     nsCOMPtr<nsIDocShellTreeItem> mruTreeItem(do_QueryInterface(mruWebNav));
@@ -182,17 +182,17 @@ nsNativeAppSupportCocoa::ReOpen()
         haveNonMiniaturized = PR_TRUE;
         break;  //have un-minimized windows, nothing to do
       } 
       windowList->HasMoreElements(&more);
     } // end while
         
     if (!haveNonMiniaturized) {
       // Deminiaturize the most recenty used window
-      nsCOMPtr<nsIDOMWindowInternal> mru = nsnull;
+      nsCOMPtr<nsIDOMWindow> mru;
       wm->GetMostRecentWindow(nsnull, getter_AddRefs(mru));
             
       if (mru) {        
         NSWindow *cocoaMru = nil;
         GetNativeWindowPointerFromDOMWindow(mru, &cocoaMru);
         if (cocoaMru) {
           [cocoaMru deminiaturize:nil];
           done = PR_TRUE;
--- a/toolkit/xre/nsNativeAppSupportOS2.cpp
+++ b/toolkit/xre/nsNativeAppSupportOS2.cpp
@@ -105,31 +105,31 @@ typedef struct _COPYDATASTRUCT
 #define WM_COPYDATA             (WM_USER + 60)
 
 char szCommandLine[2*CCHMAXPATH];
 
 static HWND hwndForDOMWindow( nsISupports * );
 
 static
 nsresult
-GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindowInternal** aWindow) {
+GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindow** aWindow) {
     nsresult rv;
     nsCOMPtr<nsIWindowMediator> med( do_GetService( NS_WINDOWMEDIATOR_CONTRACTID, &rv ) );
     if ( NS_FAILED( rv ) )
         return rv;
 
     if ( med )
         return med->GetMostRecentWindow( aType, aWindow );
 
     return NS_ERROR_FAILURE;
 }
 
 static
 void
-activateWindow( nsIDOMWindowInternal *win ) {
+activateWindow( nsIDOMWindow *win ) {
     // Try to get native window handle.
     HWND hwnd = hwndForDOMWindow( win );
     if ( hwnd ) {
 
         /* if we are looking at a client window, then we really probably want
          * the frame so that we can manipulate THAT
          */
         LONG id = WinQueryWindowUShort( hwnd, QWS_ID );
@@ -1161,17 +1161,17 @@ nsNativeAppSupportOS2::HandleDDENotifica
                     // "Window ID" however the window ID is not used for this
                     // command, therefore it is returned as a null string
 
                     // This isn't really a loop.  We just use "break"
                     // statements to bypass the remaining steps when
                     // something goes wrong.
                     do {
                         // Get most recently used Nav window.
-                        nsCOMPtr<nsIDOMWindowInternal> navWin;
+                        nsCOMPtr<nsIDOMWindow> navWin;
                         GetMostRecentWindow( NS_LITERAL_STRING( "navigator:browser" ).get(),
                                              getter_AddRefs( navWin ) );
                         if ( !navWin ) {
                             // There is not a window open
                             break;
                         }
                         // Get content window.
                         nsCOMPtr<nsIDOMWindow> content;
@@ -1403,17 +1403,17 @@ void nsNativeAppSupportOS2::ParseDDEArg(
     // Now get the string contents.
     WinDdeQueryString( args, temp.BeginWriting(), temp.Length(), CP_WINANSI );
     // Parse out the given arg.
     ParseDDEArg(temp.get(), index, aString);
     return;
 }
 
 void nsNativeAppSupportOS2::ActivateLastWindow() {
-    nsCOMPtr<nsIDOMWindowInternal> navWin;
+    nsCOMPtr<nsIDOMWindow> navWin;
     GetMostRecentWindow( NS_LITERAL_STRING("navigator:browser").get(), getter_AddRefs( navWin ) );
     if ( navWin )
         // Activate that window.
         activateWindow( navWin );
     else
         // Need to create a Navigator window, then.
         OpenBrowserWindow();
 }
@@ -1704,17 +1704,17 @@ nsNativeAppSupportOS2::OpenBrowserWindow
     nsresult rv = NS_OK;
 
     // Open the argument URL in the most recently used Navigator window.
     // If there is no Nav window, open a new one.
 
     // If at all possible, hand the request off to the most recent
     // browser window.
 
-    nsCOMPtr<nsIDOMWindowInternal> navWin;
+    nsCOMPtr<nsIDOMWindow> navWin;
     GetMostRecentWindow( NS_LITERAL_STRING( "navigator:browser" ).get(), getter_AddRefs( navWin ) );
 
     // This isn't really a loop.  We just use "break" statements to fall
     // out to the OpenWindow call when things go awry.
     do {
         // If caller requires a new window, then don't use an existing one.
         if ( !navWin ) {
             // Have to open a new one.
--- a/toolkit/xre/nsNativeAppSupportUnix.cpp
+++ b/toolkit/xre/nsNativeAppSupportUnix.cpp
@@ -47,17 +47,16 @@
 #include "prlink.h"
 #include "nsXREDirProvider.h"
 #include "nsReadableUtils.h"
 
 #include "nsIFile.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsICommandLineRunner.h"
 #include "nsIWindowMediator.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsIBaseWindow.h"
 #include "nsIWidget.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsIPrefService.h"
 #include "mozilla/Services.h"
 
@@ -186,17 +185,17 @@ private:
      that we can determine what has changed.
   */  
   osso_hw_state_t m_hw_state;
 #endif
 };
 
 #if (MOZ_PLATFORM_MAEMO == 5)
 static nsresult
-GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindowInternal** aWindow)
+GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindow** aWindow)
 {
   nsCOMPtr<nsIWindowMediator> wm = do_GetService("@mozilla.org/appshell/window-mediator;1");
   if (wm)
     return wm->GetMostRecentWindow(aType, aWindow);
   return NS_ERROR_FAILURE;
 }
 
 static GtkWidget*
@@ -229,17 +228,17 @@ OssoSetWindowOrientation(PRBool aPortrai
 
   if (lockScreen)
     return;
 
   // Tell Hildon desktop to force our window to be either portrait or landscape,
   // depending on the current rotation
   // NOTE: We only update the most recent top-level window so this is only
   //       suitable for apps with only one window.
-  nsCOMPtr<nsIDOMWindowInternal> window;
+  nsCOMPtr<nsIDOMWindow> window;
   GetMostRecentWindow(EmptyString().get(), getter_AddRefs(window));
   GtkWidget* widget = WidgetForDOMWindow(window);
   if (widget && widget->window) {
     GdkWindow *gdk = widget->window;
     GdkAtom request = gdk_atom_intern("_HILDON_PORTRAIT_MODE_REQUEST", FALSE);
 
     if (aPortrait) {
       gulong portrait_set = 1;
@@ -350,17 +349,17 @@ static void OssoHardwareCallback(osso_hw
 static gint
 OssoDbusCallback(const gchar *interface, const gchar *method,
                  GArray *arguments, gpointer data, osso_rpc_t *retval)
 {
   retval->type = DBUS_TYPE_INVALID;
 
   // The "top_application" method just wants us to focus the top-most window.
   if (!strcmp("top_application", method)) {
-    nsCOMPtr<nsIDOMWindowInternal> window;
+    nsCOMPtr<nsIDOMWindow> window;
     GetMostRecentWindow(NS_LITERAL_STRING("").get(), getter_AddRefs(window));
     if (window)
       window->Focus();
 
     return OSSO_OK;
   }
 
   if (!strcmp("quit", method)) {
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -82,31 +82,31 @@
 #include <io.h>
 #include <direct.h>
 #include <fcntl.h>
 
 static HWND hwndForDOMWindow( nsISupports * );
 
 static
 nsresult
-GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindowInternal** aWindow) {
+GetMostRecentWindow(const PRUnichar* aType, nsIDOMWindow** aWindow) {
     nsresult rv;
     nsCOMPtr<nsIWindowMediator> med( do_GetService( NS_WINDOWMEDIATOR_CONTRACTID, &rv ) );
     if ( NS_FAILED( rv ) )
         return rv;
 
     if ( med )
         return med->GetMostRecentWindow( aType, aWindow );
 
     return NS_ERROR_FAILURE;
 }
 
 static
 void
-activateWindow( nsIDOMWindowInternal *win ) {
+activateWindow( nsIDOMWindow *win ) {
     // Try to get native window handle.
     HWND hwnd = hwndForDOMWindow( win );
     if ( hwnd ) {
         // Restore the window if it is minimized.
         if ( ::IsIconic( hwnd ) ) {
             ::ShowWindow( hwnd, SW_RESTORE );
         }
         // Use the OS call, if possible.
@@ -612,17 +612,17 @@ struct MessageWindow {
 
                 NS_NewLocalFile(NS_ConvertUTF8toUTF16(wdpath),
                                 PR_FALSE,
                                 getter_AddRefs(workingDir));
             }
             (void)nsNativeAppSupportWin::HandleCommandLine((char*)cds->lpData, workingDir, nsICommandLine::STATE_REMOTE_AUTO);
 
             // Get current window and return its window handle.
-            nsCOMPtr<nsIDOMWindowInternal> win;
+            nsCOMPtr<nsIDOMWindow> win;
             GetMostRecentWindow( 0, getter_AddRefs( win ) );
             return win ? (LRESULT)hwndForDOMWindow( win ) : 0;
         }
         return DefWindowProc( msgWindow, msg, wp, lp );
     }
 
 private:
     HWND mHandle;
@@ -992,17 +992,17 @@ nsNativeAppSupportWin::HandleDDENotifica
                     // "Window ID" however the window ID is not used for this
                     // command, therefore it is returned as a null string
 
                     // This isn't really a loop.  We just use "break"
                     // statements to bypass the remaining steps when
                     // something goes wrong.
                     do {
                         // Get most recently used Nav window.
-                        nsCOMPtr<nsIDOMWindowInternal> navWin;
+                        nsCOMPtr<nsIDOMWindow> navWin;
                         GetMostRecentWindow( NS_LITERAL_STRING( "navigator:browser" ).get(),
                                              getter_AddRefs( navWin ) );
                         if ( !navWin ) {
                             // There is not a window open
                             break;
                         }
                         // Get content window.
                         nsCOMPtr<nsIDOMWindow> content;
@@ -1250,17 +1250,17 @@ HDDEDATA nsNativeAppSupportWin::CreateDD
                                            0,
                                            mApplication,
                                            CF_TEXT,
                                            0 );
     return result;
 }
 
 void nsNativeAppSupportWin::ActivateLastWindow() {
-    nsCOMPtr<nsIDOMWindowInternal> navWin;
+    nsCOMPtr<nsIDOMWindow> navWin;
     GetMostRecentWindow( NS_LITERAL_STRING("navigator:browser").get(), getter_AddRefs( navWin ) );
     if ( navWin ) {
         // Activate that window.
         activateWindow( navWin );
     } else {
         // Need to create a Navigator window, then.
         OpenBrowserWindow();
     }
@@ -1520,17 +1520,17 @@ nsNativeAppSupportWin::OpenBrowserWindow
     nsresult rv = NS_OK;
 
     // Open the argument URL in the most recently used Navigator window.
     // If there is no Nav window, open a new one.
 
     // If at all possible, hand the request off to the most recent
     // browser window.
 
-    nsCOMPtr<nsIDOMWindowInternal> navWin;
+    nsCOMPtr<nsIDOMWindow> navWin;
     GetMostRecentWindow( NS_LITERAL_STRING( "navigator:browser" ).get(), getter_AddRefs( navWin ) );
 
     // This isn't really a loop.  We just use "break" statements to fall
     // out to the OpenWindow call when things go awry.
     do {
         // If caller requires a new window, then don't use an existing one.
         if ( !navWin ) {
             // Have to open a new one.
--- a/uriloader/base/nsURILoader.cpp
+++ b/uriloader/base/nsURILoader.cpp
@@ -61,17 +61,16 @@
 #include "nsCRT.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShellTreeOwner.h"
 
 #include "nsXPIDLString.h"
 #include "nsString.h"
 #include "nsNetUtil.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsReadableUtils.h"
 #include "nsDOMError.h"
 
 #include "nsICategoryManager.h"
 #include "nsCExternalHandlerService.h" // contains contractids for the helper app service
 
 #include "nsIMIMEHeaderParam.h"
 #include "nsNetCID.h"
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -119,17 +119,16 @@
 #include "nsIMIMEHeaderParam.h"
 
 #include "nsIWindowWatcher.h"
 
 #include "nsIDownloadHistory.h" // to mark downloads as visited
 #include "nsDocShellCID.h"
 
 #include "nsIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDocShell.h"
 
 #include "nsCRT.h"
 
 #include "nsLocalHandlerApp.h"
 
 #include "nsIRandomGenerator.h"
 #include "plbase64.h"
@@ -2507,40 +2506,39 @@ PRBool nsExternalAppHandler::GetNeverAsk
   prefCString.BeginReading(start);
   prefCString.EndReading(end);
   return !CaseInsensitiveFindInReadable(nsDependentCString(aContentType),
                                         start, end);
 }
 
 nsresult nsExternalAppHandler::MaybeCloseWindow()
 {
-  nsCOMPtr<nsIDOMWindow> window(do_GetInterface(mWindowContext));
-  nsCOMPtr<nsIDOMWindowInternal> internalWindow = do_QueryInterface(window);
-  NS_ENSURE_STATE(internalWindow);
+  nsCOMPtr<nsIDOMWindow> window = do_GetInterface(mWindowContext);
+  NS_ENSURE_STATE(window);
 
   if (mShouldCloseWindow) {
     // Reset the window context to the opener window so that the dependent
     // dialogs have a parent
-    nsCOMPtr<nsIDOMWindowInternal> opener;
-    internalWindow->GetOpener(getter_AddRefs(opener));
+    nsCOMPtr<nsIDOMWindow> opener;
+    window->GetOpener(getter_AddRefs(opener));
 
     PRBool isClosed;
     if (opener && NS_SUCCEEDED(opener->GetClosed(&isClosed)) && !isClosed) {
       mWindowContext = do_GetInterface(opener);
 
       // Now close the old window.  Do it on a timer so that we don't run
       // into issues trying to close the window before it has fully opened.
       NS_ASSERTION(!mTimer, "mTimer was already initialized once!");
       mTimer = do_CreateInstance("@mozilla.org/timer;1");
       if (!mTimer) {
         return NS_ERROR_FAILURE;
       }
 
       mTimer->InitWithCallback(this, 0, nsITimer::TYPE_ONE_SHOT);
-      mWindowToClose = internalWindow;
+      mWindowToClose = window;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsExternalAppHandler::Notify(nsITimer* timer)
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
@@ -72,17 +72,17 @@
 #include "nsIObserver.h"
 #include "nsCOMArray.h"
 #include "nsWeakReference.h"
 #include "nsIPrompt.h"
 
 class nsExternalAppHandler;
 class nsIMIMEInfo;
 class nsITransfer;
-class nsIDOMWindowInternal;
+class nsIDOMWindow;
 
 /**
  * The helper app service. Responsible for handling content that Mozilla
  * itself can not handle
  */
 class nsExternalHelperAppService
 : public nsIExternalHelperAppService,
   public nsPIExternalAppLauncher,
@@ -281,17 +281,17 @@ protected:
   nsCOMPtr<nsIMIMEInfo> mMimeInfo;
   nsCOMPtr<nsIOutputStream> mOutStream; /**< output stream to the temp file */
   nsCOMPtr<nsIInterfaceRequestor> mWindowContext;
 
   /**
    * Used to close the window on a timer, to avoid any exceptions that are
    * thrown if we try to close the window before it's fully loaded.
    */
-  nsCOMPtr<nsIDOMWindowInternal> mWindowToClose;
+  nsCOMPtr<nsIDOMWindow> mWindowToClose;
   nsCOMPtr<nsITimer> mTimer;
 
   /**
    * The following field is set if we were processing an http channel that had
    * a content disposition header which specified the SUGGESTED file name we
    * should present to the user in the save to disk dialog. 
    */
   nsString mSuggestedFileName;
--- a/widget/src/xpwidgets/nsPrintOptionsImpl.cpp
+++ b/widget/src/xpwidgets/nsPrintOptionsImpl.cpp
@@ -42,17 +42,16 @@
 #include "nsPrintSettingsImpl.h"
 
 #include "nsIDOMWindow.h"
 #include "nsIServiceManager.h"
 #include "nsIDialogParamBlock.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIWindowWatcher.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsISupportsArray.h"
 #include "prprf.h"
 
 #include "nsIStringEnumerator.h"
 #include "nsISupportsPrimitives.h"
 #include "stdlib.h"
 #include "nsAutoPtr.h"
 #include "mozilla/Preferences.h"
@@ -155,19 +154,18 @@ nsPrintOptions::ShowPrintSetupDialog(nsI
   nsCOMPtr<nsISupports> blkSupps = do_QueryInterface(ioParamBlock);
   NS_ASSERTION(blkSupps, "IOBlk must be a supports");
   array->AppendElement(blkSupps);
 
   nsCOMPtr<nsIWindowWatcher> wwatch =
       do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCOMPtr<nsIDOMWindow> active;
-  wwatch->GetActiveWindow(getter_AddRefs(active));
-  nsCOMPtr<nsIDOMWindowInternal> parent = do_QueryInterface(active);
+  nsCOMPtr<nsIDOMWindow> parent;
+  wwatch->GetActiveWindow(getter_AddRefs(parent));
   // null |parent| is non-fatal
 
   nsCOMPtr<nsIDOMWindow> newWindow;
 
   return wwatch->OpenWindow(parent,
                             "chrome://global/content/printPageSetup.xul",
                             "_blank","chrome,modal,centerscreen", array,
                             getter_AddRefs(newWindow));
--- a/widget/tests/TestWinTSF.cpp
+++ b/widget/tests/TestWinTSF.cpp
@@ -77,17 +77,17 @@ template<class T> class nsReadingIterato
 #include "nsIAppShell.h"
 #include "nsWidgetsCID.h"
 #include "nsIAppShellService.h"
 #include "nsAppShellCID.h"
 #include "nsNetUtil.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsIXULWindow.h"
 #include "nsIBaseWindow.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsIWidget.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsIFrame.h"
 #include "nsIWebProgress.h"
 #include "nsIWebProgressListener.h"
 #include "nsIInterfaceRequestorUtils.h"
@@ -1547,17 +1547,17 @@ TestApp::Init(void)
   (*daMgr) = mMgr;
   (*daMgr)->AddRef();
 
   // Apply the change
   reinterpret_cast<ITfThreadMgr**>(
       widget->GetNativeData(NS_NATIVE_TSF_THREAD_MGR));
 
   // Create a couple of text boxes for testing
-  nsCOMPtr<nsIDOMWindowInternal> win(do_GetInterface(mWindow));
+  nsCOMPtr<nsIDOMWindow> win(do_GetInterface(mWindow));
   NS_ENSURE_TRUE(win, NS_ERROR_UNEXPECTED);
   nsCOMPtr<nsIDOMDocument> document;
   rv = win->GetDocument(getter_AddRefs(document));
   NS_ENSURE_TRUE(document, NS_ERROR_UNEXPECTED);
   nsCOMPtr<nsIDOMHTMLDocument> htmlDoc(do_QueryInterface(document));
   NS_ENSURE_TRUE(htmlDoc, NS_ERROR_UNEXPECTED);
   nsCOMPtr<nsIDOMHTMLElement> htmlBody;
   rv = htmlDoc->GetBody(getter_AddRefs(htmlBody));
@@ -1618,17 +1618,17 @@ TestApp::Init(void)
 nsresult
 TestApp::Term(void)
 {
   mCurrentNode = nsnull;
   mInput = nsnull;
   mTextArea = nsnull;
   mButton = nsnull;
 
-  nsCOMPtr<nsIDOMWindowInternal> win(do_GetInterface(mWindow));
+  nsCOMPtr<nsIDOMWindow> win(do_GetInterface(mWindow));
   if (win)
     win->Close();
   win = nsnull;
   mWindow = nsnull;
 
   if (mAppShell)
     mAppShell->Exit();
   mAppShell = nsnull;
@@ -2174,19 +2174,19 @@ TestApp::TestExtents(void)
   nsCOMPtr<nsISelectionController> selCon;
   if (!(NS_SUCCEEDED(GetSelCon(getter_AddRefs(selCon))) && selCon)) {
     fail("TestExtents: get nsISelectionController");
     return PR_FALSE;
   }
   selCon->ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL,
               nsISelectionController::SELECTION_FOCUS_REGION, PR_TRUE);
 
-  nsCOMPtr<nsIDOMWindowInternal> window(do_GetInterface(mWindow));
+  nsCOMPtr<nsIDOMWindow> window(do_GetInterface(mWindow));
   if (!window) {
-    fail("TestExtents: get nsIDOMWindowInternal");
+    fail("TestExtents: get nsIDOMWindow");
     return PR_FALSE;
   }
   RECT windowRect, screenRect, textRect1, textRect2;
   BOOL clipped;
   PRInt32 val;
   TsViewCookie view;
   HRESULT hr;
 
--- a/xpcom/tests/SizeTest06.cpp
+++ b/xpcom/tests/SizeTest06.cpp
@@ -29,17 +29,17 @@ NS_DEF_PTR(nsIBaseWindow);
       raw_optimized, nsCOMPtr03    332    (1.1067)
       nsCOMPtr_as_found            344    (1.1467)
       raw                          388    (1.2933)
 
   */
 
 
 void // nsresult
-Test06_raw(nsIDOMWindowInternal* aDOMWindow, nsIBaseWindow** aBaseWindow)
+Test06_raw(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow)
     // m388, w214
 {
 //  if (!aDOMWindow)
 //    return NS_ERROR_NULL_POINTER;
   nsPIDOMWindow* window = 0;
   nsresult status = aDOMWindow->QueryInterface(NS_GET_IID(nsPIDOMWindow), (void**)&window);
   nsIDocShell* docShell = 0;
   if (window)
@@ -47,17 +47,17 @@ Test06_raw(nsIDOMWindowInternal* aDOMWin
   nsIWebShell* rootWebShell = 0;
   NS_IF_RELEASE(rootWebShell);
   NS_IF_RELEASE(docShell);
   NS_IF_RELEASE(window);
 //    return status;
 }
 
 void // nsresult
-Test06_raw_optimized(nsIDOMWindowInternal* aDOMWindow, nsIBaseWindow** aBaseWindow)
+Test06_raw_optimized(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow)
     // m332, w191
 {
 //  if (!aDOMWindow)
 //    return NS_ERROR_NULL_POINTER;
   (*aBaseWindow) = 0;
   nsPIDOMWindow* window;
   nsresult status = aDOMWindow->QueryInterface(NS_GET_IID(nsPIDOMWindow), (void**)&window);
   if (NS_SUCCEEDED(status)) {
@@ -67,76 +67,76 @@ Test06_raw_optimized(nsIDOMWindowInterna
       NS_RELEASE(docShell);
     }
     NS_RELEASE(window);
   }
 //  return status;
 }
 
 void
-Test06_nsCOMPtr_as_found(nsIDOMWindowInternal* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
+Test06_nsCOMPtr_as_found(nsIDOMWindow* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
     // m344, w181/201
 {
 //  if (!aDOMWindow)
 //    return;
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aDOMWindow);
   nsCOMPtr<nsIDocShell> docShell;
   if (window)
     window->GetDocShell(getter_AddRefs(docShell));  
 }
 
 void // nsresult
-Test06_nsCOMPtr00(nsIDOMWindowInternal* aDOMWindow, nsIBaseWindow** aBaseWindow)
+Test06_nsCOMPtr00(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow)
     // m328, w191/199
 {
 //  if (!aDOMWindow)
 //    return NS_ERROR_NULL_POINTER;
   nsresult status;
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aDOMWindow, &status);
   nsIDocShell* temp0 = 0;
   if (window)
     window->GetDocShell(&temp0);
   nsCOMPtr<nsIDocShell> docShell = dont_AddRef(temp0);
   (*aBaseWindow) = 0;
 //    return status;
 }
 
 void // nsresult
-Test06_nsCOMPtr_optimized(nsIDOMWindowInternal* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
+Test06_nsCOMPtr_optimized(nsIDOMWindow* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
     // m300, w176/182
 {
 //    if (!aDOMWindow)
 //      return NS_ERROR_NULL_POINTER;
   nsresult status;
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aDOMWindow, &status);
   nsIDocShell* temp0 = 0;
   if (window)
     window->GetDocShell(&temp0);
   (*aBaseWindow) = do_QueryInterface(nsnull, &status);
 //    return status;
 }
 
 void // nsresult
-Test06_nsCOMPtr02(nsIDOMWindowInternal* aDOMWindow, nsIBaseWindow** aBaseWindow)
+Test06_nsCOMPtr02(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow)
     // m320, w187/184
 {
 //    if (!aDOMWindow)
 //      return NS_ERROR_NULL_POINTER;
   (*aBaseWindow) = 0;
   nsresult status;
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aDOMWindow, &status);
   if (window) {
     nsIDocShell* temp0;
     window->GetDocShell(&temp0);
   }
 //    return status;
 }
 
 void // nsresult
-Test06_nsCOMPtr03(nsIDOMWindowInternal* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
+Test06_nsCOMPtr03(nsIDOMWindow* aDOMWindow, nsCOMPtr<nsIBaseWindow>* aBaseWindow)
     // m332, w189/188
 {
 //    if (!aDOMWindow)
 //      return NS_ERROR_NULL_POINTER;
   (*aBaseWindow) = 0;
   nsresult status;
   nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aDOMWindow, &status);
   if (window) {
--- a/xpfe/appshell/public/nsIAppShellService.idl
+++ b/xpfe/appshell/public/nsIAppShellService.idl
@@ -34,17 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 
 interface nsIXULWindow;
 interface nsIURI;
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIAppShell;
 
 [ptr] native JSContext(JSContext);
 
 %{C++
 struct JSContext;
 %}
 
@@ -92,27 +92,27 @@ interface nsIAppShellService : nsISuppor
   readonly attribute nsIXULWindow hiddenWindow;
 
   /**
    * Return the (singleton) application hidden window, automatically created
    * and maintained by this AppShellService.
    * @param aResult the hidden window.  Do not unhide hidden window.
    *                Do not taunt hidden window.
    */
-  readonly attribute nsIDOMWindowInternal hiddenDOMWindow;
+  readonly attribute nsIDOMWindow hiddenDOMWindow;
 
   /**
-   * Return the (singleton) application hidden window as an nsIDOMWindowInternal,
+   * Return the (singleton) application hidden window as an nsIDOMWindow,
    * and, the corresponding JavaScript context pointer.  This is useful
    * if you'd like to subsequently call OpenDialog on the hidden window.
-   * @aHiddenDOMWindow the hidden window QI'd to type nsIDOMWindowInternal
+   * @aHiddenDOMWindow the hidden window QI'd to type nsIDOMWindow
    * @aJSContext       the corresponding JavaScript context
    */
   [noscript]
-  void getHiddenWindowAndJSContext(out nsIDOMWindowInternal aHiddenDOMWindow,
+  void getHiddenWindowAndJSContext(out nsIDOMWindow aHiddenDOMWindow,
                                    out JSContext aJSContext);
 
   /**
    * Return true if the application hidden window was provided by the
    * application. If it wasn't, the default hidden window was used. This will
    * usually be false on all non-mac platforms.
    */
   readonly attribute boolean applicationProvidedHiddenWindow;
--- a/xpfe/appshell/public/nsIWindowMediator.idl
+++ b/xpfe/appshell/public/nsIWindowMediator.idl
@@ -35,28 +35,29 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 #include "nsISimpleEnumerator.idl"
 
 %{C++
 #define NS_WINDOWMEDIATOR_CID \
-{ 0x0659cb83, 0xfaad, 0x11d2, { 0x8e, 0x19, 0xb2, 0x06, 0x62, 0x0a, 0x65, 0x7c } }
+{ 0x292e17c8, 0xccc1, 0x42e1, \
+  { 0xac, 0x8b, 0xaf, 0x61, 0x7d, 0x54, 0x13, 0xb1 } }
 
 #define NS_WINDOWMEDIATOR_CONTRACTID \
   "@mozilla.org/appshell/window-mediator;1"
 %}
 
 interface nsIXULWindow;
 interface nsIWidget;
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIWindowMediatorListener;
 
-[scriptable, uuid(0659cb81-faad-11d2-8e19-b206620a657c)]
+[scriptable, uuid(292e17c8-ccc1-42e1-ac8b-af617d5413b1)]
 interface nsIWindowMediator: nsISupports
 {
   /** Return an enumerator which iterates over all windows of type aWindowType
     * from the oldest window to the youngest.
     * @param  aWindowType the returned enumerator will enumerate only
     *                     windows of this type. ("type" is the
     *                     |windowtype| attribute of the XML <window> element.)
     *                     If null, all windows will be enumerated.
@@ -93,17 +94,17 @@ interface nsIWindowMediator: nsISupports
   /** This is a shortcut for simply fetching the first window in
     * front to back order.
     * @param  aWindowType return the topmost window of this type.
     *                     ("type" is the |windowtype| attribute of
     *                     the XML <window> element.)
     *                     If null, return the topmost window of any type.
     * @return the topmost window
     */
-  nsIDOMWindowInternal getMostRecentWindow(in wstring aWindowType);
+  nsIDOMWindow getMostRecentWindow(in wstring aWindowType);
 
   /** Add the window to the list of known windows. Listeners (see
     * addListener) will be notified through their onOpenWindow method.
     * @param aWindow the window to add
     */
   [noscript] void registerWindow(in nsIXULWindow aWindow);
 
   /** Remove the window from the list of known windows. Listeners (see
--- a/xpfe/appshell/src/nsAppShellService.cpp
+++ b/xpfe/appshell/src/nsAppShellService.cpp
@@ -47,17 +47,17 @@
 #include "nsIObserverService.h"
 #include "nsIObserver.h"
 #include "nsIXPConnect.h"
 #include "nsIJSContextStack.h"
 
 #include "nsIWindowMediator.h"
 #include "nsIWindowWatcher.h"
 #include "nsPIWindowWatcher.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsWebShellWindow.h"
 
 #include "nsIEnumerator.h"
 #include "nsCRT.h"
 #include "nsITimelineService.h"
 #include "prprf.h"    
 
 #include "nsWidgetsCID.h"
@@ -115,17 +115,17 @@ nsresult
 nsAppShellService::SetXPConnectSafeContext()
 {
   nsresult rv;
 
   nsCOMPtr<nsIThreadJSContextStack> cxstack =
     do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCOMPtr<nsIDOMWindowInternal> junk;
+  nsCOMPtr<nsIDOMWindow> junk;
   JSContext *cx;
   rv = GetHiddenWindowAndJSContext(getter_AddRefs(junk), &cx);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return cxstack->SetSafeJSContext(cx);
 }  
 
 nsresult nsAppShellService::ClearXPConnectSafeContext()
@@ -134,17 +134,17 @@ nsresult nsAppShellService::ClearXPConne
 
   nsCOMPtr<nsIThreadJSContextStack> cxstack =
     do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
   if (NS_FAILED(rv)) {
     NS_ERROR("XPConnect ContextStack gone before XPCOM shutdown?");
     return rv;
   }
 
-  nsCOMPtr<nsIDOMWindowInternal> junk;
+  nsCOMPtr<nsIDOMWindow> junk;
   JSContext *cx;
   rv = GetHiddenWindowAndJSContext(getter_AddRefs(junk), &cx);
   NS_ENSURE_SUCCESS(rv, rv);
 
   JSContext *safe_cx;
   rv = cxstack->GetSafeJSContext(&safe_cx);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -449,52 +449,52 @@ nsAppShellService::GetHiddenWindow(nsIXU
   NS_ENSURE_ARG_POINTER(aWindow);
 
   *aWindow = mHiddenWindow;
   NS_IF_ADDREF(*aWindow);
   return *aWindow ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsAppShellService::GetHiddenDOMWindow(nsIDOMWindowInternal **aWindow)
+nsAppShellService::GetHiddenDOMWindow(nsIDOMWindow **aWindow)
 {
   nsresult rv;
   nsCOMPtr<nsIDocShell> docShell;
   NS_ENSURE_TRUE(mHiddenWindow, NS_ERROR_FAILURE);
 
   rv = mHiddenWindow->GetDocShell(getter_AddRefs(docShell));
   NS_ENSURE_SUCCESS(rv, rv);
   
-  nsCOMPtr<nsIDOMWindowInternal> hiddenDOMWindow(do_GetInterface(docShell, &rv));
+  nsCOMPtr<nsIDOMWindow> hiddenDOMWindow(do_GetInterface(docShell, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aWindow = hiddenDOMWindow;
   NS_IF_ADDREF(*aWindow);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsAppShellService::GetHiddenWindowAndJSContext(nsIDOMWindowInternal **aWindow,
+nsAppShellService::GetHiddenWindowAndJSContext(nsIDOMWindow **aWindow,
                                                JSContext    **aJSContext)
 {
     nsresult rv = NS_OK;
     if ( aWindow && aJSContext ) {
         *aWindow    = nsnull;
         *aJSContext = nsnull;
 
         if ( mHiddenWindow ) {
-            // Convert hidden window to nsIDOMWindowInternal and extract its JSContext.
+            // Convert hidden window to nsIDOMWindow and extract its JSContext.
             do {
                 // 1. Get doc for hidden window.
                 nsCOMPtr<nsIDocShell> docShell;
                 rv = mHiddenWindow->GetDocShell(getter_AddRefs(docShell));
                 if (NS_FAILED(rv)) break;
 
-                // 2. Convert that to an nsIDOMWindowInternal.
-                nsCOMPtr<nsIDOMWindowInternal> hiddenDOMWindow(do_GetInterface(docShell));
+                // 2. Convert that to an nsIDOMWindow.
+                nsCOMPtr<nsIDOMWindow> hiddenDOMWindow(do_GetInterface(docShell));
                 if(!hiddenDOMWindow) break;
 
                 // 3. Get script global object for the window.
                 nsCOMPtr<nsIScriptGlobalObject> sgo;
                 sgo = do_QueryInterface( hiddenDOMWindow );
                 if (!sgo) { rv = NS_ERROR_FAILURE; break; }
 
                 // 4. Get script context from that.
--- a/xpfe/appshell/src/nsAppShellWindowEnumerator.cpp
+++ b/xpfe/appshell/src/nsAppShellWindowEnumerator.cpp
@@ -37,38 +37,37 @@
 
 #include "nsIContentViewer.h"
 #include "nsIDocShell.h"
 #include "nsIDocumentViewer.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIFactory.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIXULWindow.h"
 
 #include "nsAppShellWindowEnumerator.h"
 #include "nsWindowMediator.h"
 
 //
 // static helper functions
 //
 
 static nsresult GetDOMWindow(nsIXULWindow* inWindow,
-                             nsCOMPtr<nsIDOMWindowInternal> &outDOMWindow);
+                             nsCOMPtr<nsIDOMWindow> &outDOMWindow);
 static nsCOMPtr<nsIDOMNode> GetDOMNodeFromDocShell(nsIDocShell *aShell);
 static void GetAttribute(nsIXULWindow *inWindow, const nsAString &inAttribute,
                          nsAString &outValue);
 static void GetWindowType(nsIXULWindow* inWindow, nsString &outType);
 
 // fetch the nsIDOMWindow(Internal) from a XUL Window
-nsresult GetDOMWindow(nsIXULWindow *aWindow, nsCOMPtr<nsIDOMWindowInternal> &aDOMWindow)
+nsresult GetDOMWindow(nsIXULWindow *aWindow, nsCOMPtr<nsIDOMWindow> &aDOMWindow)
 {
   nsCOMPtr<nsIDocShell> docShell;
 
   aWindow->GetDocShell(getter_AddRefs(docShell));
   aDOMWindow = do_GetInterface(docShell);
   return aDOMWindow ? NS_OK : NS_ERROR_FAILURE;
 }
 
@@ -251,17 +250,17 @@ nsASDOMWindowEnumerator::~nsASDOMWindowE
 
 NS_IMETHODIMP nsASDOMWindowEnumerator::GetNext(nsISupports **retval)
 {
   if (!retval)
     return NS_ERROR_INVALID_ARG;
 
   *retval = nsnull;
   if (mCurrentPosition) {
-    nsCOMPtr<nsIDOMWindowInternal> domWindow;
+    nsCOMPtr<nsIDOMWindow> domWindow;
     GetDOMWindow(mCurrentPosition->mWindow, domWindow);
     CallQueryInterface(domWindow, retval);
     mCurrentPosition = FindNext();
   }
   return NS_OK;
 }
 
 //
--- a/xpfe/appshell/src/nsChromeTreeOwner.cpp
+++ b/xpfe/appshell/src/nsChromeTreeOwner.cpp
@@ -51,17 +51,16 @@
 // Interfaces needed to include
 #include "nsIPrompt.h"
 #include "nsIAuthPrompt.h"
 #include "nsIWebProgress.h"
 #include "nsIWindowMediator.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMNodeList.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMXULElement.h"
 #include "nsIXULBrowserWindow.h"
 
 // CIDs
 static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
 
 //*****************************************************************************
 // nsChromeTreeOwner string literals
--- a/xpfe/appshell/src/nsContentTreeOwner.cpp
+++ b/xpfe/appshell/src/nsContentTreeOwner.cpp
@@ -45,17 +45,17 @@
 // Helper Classes
 #include "nsIServiceManager.h"
 #include "nsAutoPtr.h"
 
 // Interfaces needed to be included
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMNodeList.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDOMChromeWindow.h"
 #include "nsIBrowserDOMWindow.h"
 #include "nsIDOMXULElement.h"
 #include "nsIEmbeddingSiteWindow.h"
 #include "nsIEmbeddingSiteWindow2.h"
 #include "nsIPrompt.h"
 #include "nsIAuthPrompt.h"
 #include "nsIWindowMediator.h"
@@ -914,17 +914,17 @@ nsContentTreeOwner::ProvideWindow(nsIDOM
         // Only continue if there are no size/position features and no special
         // chrome flags.
         (aChromeFlags != nsIWebBrowserChrome::CHROME_ALL ||
          aPositionSpecified || aSizeSpecified)) {
       return NS_OK;
     }
   }
 
-  nsCOMPtr<nsIDOMWindowInternal> domWin;
+  nsCOMPtr<nsIDOMWindow> domWin;
   mXULWindow->GetWindowDOMWindow(getter_AddRefs(domWin));
   nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(domWin);
   if (!chromeWin) {
     // Really odd... but whatever
     NS_WARNING("nsXULWindow's DOMWindow is not a chrome window");
     return NS_OK;
   }
   
@@ -1066,17 +1066,17 @@ nsSiteWindow2::SetFocus(void)
      nsGlobalWindow::Focus (providing a hook for MDI embedding apps)
      and it's better for our purposes to not pick a document and
      focus it, but allow nsGlobalWindow to carry on unhindered.
   */
   nsXULWindow *window = mAggregator->XULWindow();
   if (window) {
     nsCOMPtr<nsIDocShell> docshell;
     window->GetDocShell(getter_AddRefs(docshell));
-    nsCOMPtr<nsIDOMWindowInternal> domWindow(do_GetInterface(docshell));
+    nsCOMPtr<nsIDOMWindow> domWindow(do_GetInterface(docshell));
     if (domWindow)
       domWindow->Focus();
   }
 #endif
   return NS_OK;
 }
 
 /* this implementation focuses another window. if there isn't another
@@ -1126,17 +1126,17 @@ nsSiteWindow2::Blur(void)
 
     windowEnumerator->HasMoreElements(&more);
   }
 
   // change focus to the window we just found
   if (xulWindow) {
     nsCOMPtr<nsIDocShell> docshell;
     xulWindow->GetDocShell(getter_AddRefs(docshell));
-    nsCOMPtr<nsIDOMWindowInternal> domWindow(do_GetInterface(docshell));
+    nsCOMPtr<nsIDOMWindow> domWindow(do_GetInterface(docshell));
     if (domWindow)
       domWindow->Focus();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSiteWindow2::GetVisibility(PRBool *aVisibility)
--- a/xpfe/appshell/src/nsWindowMediator.cpp
+++ b/xpfe/appshell/src/nsWindowMediator.cpp
@@ -39,17 +39,16 @@
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsTArray.h"
 #include "nsIBaseWindow.h"
 #include "nsIWidget.h"
 #include "nsIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMElement.h"
 #include "nsIDocumentViewer.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIObserverService.h"
 #include "nsIServiceManager.h"
 #include "nsISimpleEnumerator.h"
 #include "nsAppShellWindowEnumerator.h"
@@ -60,30 +59,30 @@
 #include "nsIDocShell.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIXULWindow.h"
 
 using namespace mozilla;
 
 static nsresult GetDOMWindow(nsIXULWindow* inWindow,
-                             nsCOMPtr< nsIDOMWindowInternal>& outDOMWindow);
+                             nsCOMPtr< nsIDOMWindow>& outDOMWindow);
 
 static PRBool notifyOpenWindow(nsISupports *aElement, void* aData);
 static PRBool notifyCloseWindow(nsISupports *aElement, void* aData);
 static PRBool notifyWindowTitleChange(nsISupports *aElement, void* aData);
 
 // for notifyWindowTitleChange
 struct WindowTitleData {
   nsIXULWindow* mWindow;
   const PRUnichar *mTitle;
 };
 
 nsresult
-GetDOMWindow(nsIXULWindow* inWindow, nsCOMPtr<nsIDOMWindowInternal>& outDOMWindow)
+GetDOMWindow(nsIXULWindow* inWindow, nsCOMPtr<nsIDOMWindow>& outDOMWindow)
 {
   nsCOMPtr<nsIDocShell> docShell;
 
   inWindow->GetDocShell(getter_AddRefs(docShell));
   outDOMWindow = do_GetInterface(docShell);
   return outDOMWindow ? NS_OK : NS_ERROR_FAILURE;
 }
 
@@ -303,31 +302,31 @@ PRInt32
 nsWindowMediator::RemoveEnumerator(nsAppShellWindowEnumerator * inEnumerator)
 {
   return mEnumeratorList.RemoveElement(inEnumerator);
 }
 
 // Returns the window of type inType ( if null return any window type ) which has the most recent
 // time stamp
 NS_IMETHODIMP
-nsWindowMediator::GetMostRecentWindow(const PRUnichar* inType, nsIDOMWindowInternal** outWindow)
+nsWindowMediator::GetMostRecentWindow(const PRUnichar* inType, nsIDOMWindow** outWindow)
 {
   NS_ENSURE_ARG_POINTER(outWindow);
   *outWindow = nsnull;
   if (!mReady)
     return NS_OK;
 
   // Find the most window with the highest time stamp that matches
   // the requested type
 
   MutexAutoLock lock(mListLock);
   nsWindowInfo *info = MostRecentWindowInfo(inType);
 
   if (info && info->mWindow) {
-    nsCOMPtr<nsIDOMWindowInternal> DOMWindow;
+    nsCOMPtr<nsIDOMWindow> DOMWindow;
     if (NS_SUCCEEDED(GetDOMWindow(info->mWindow, DOMWindow))) {  
       *outWindow = DOMWindow;
       NS_ADDREF(*outWindow);
       return NS_OK;
     }
     return NS_ERROR_FAILURE;
   }
 
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -195,18 +195,18 @@ NS_IMETHODIMP nsXULWindow::GetInterface(
     if (NS_FAILED(rv)) return rv;
     return mPrompter->QueryInterface(aIID, aSink);
   }   
   if (aIID.Equals(NS_GET_IID(nsIAuthPrompt))) {
     rv = EnsureAuthPrompter();
     if (NS_FAILED(rv)) return rv;
     return mAuthPrompter->QueryInterface(aIID, aSink);
   }
-  if (aIID.Equals(NS_GET_IID(nsIDOMWindowInternal))) {
-    return GetWindowDOMWindow(reinterpret_cast<nsIDOMWindowInternal**>(aSink));
+  if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) {
+    return GetWindowDOMWindow(reinterpret_cast<nsIDOMWindow**>(aSink));
   }   
   if (aIID.Equals(NS_GET_IID(nsIWebBrowserChrome)) && 
     NS_SUCCEEDED(EnsureContentTreeOwner()) &&
     NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink)))
     return NS_OK;
 
   if (aIID.Equals(NS_GET_IID(nsIEmbeddingSiteWindow)) && 
     NS_SUCCEEDED(EnsureContentTreeOwner()) &&
@@ -966,33 +966,33 @@ NS_IMETHODIMP nsXULWindow::EnsurePrimary
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULWindow::EnsurePrompter()
 {
   if (mPrompter)
     return NS_OK;
    
-  nsCOMPtr<nsIDOMWindowInternal> ourWindow;
+  nsCOMPtr<nsIDOMWindow> ourWindow;
   nsresult rv = GetWindowDOMWindow(getter_AddRefs(ourWindow));
   if (NS_SUCCEEDED(rv)) {
     nsCOMPtr<nsIWindowWatcher> wwatch = 
         do_GetService(NS_WINDOWWATCHER_CONTRACTID);
     if (wwatch)
       wwatch->GetNewPrompter(ourWindow, getter_AddRefs(mPrompter));
   }
   return mPrompter ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsXULWindow::EnsureAuthPrompter()
 {
   if (mAuthPrompter)
     return NS_OK;
       
-  nsCOMPtr<nsIDOMWindowInternal> ourWindow;
+  nsCOMPtr<nsIDOMWindow> ourWindow;
   nsresult rv = GetWindowDOMWindow(getter_AddRefs(ourWindow));
   if (NS_SUCCEEDED(rv)) {
     nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
     if (wwatch)
       wwatch->GetNewAuthPrompter(ourWindow, getter_AddRefs(mAuthPrompter));
   }
   return mAuthPrompter ? NS_OK : NS_ERROR_FAILURE;
 }
@@ -1153,17 +1153,17 @@ PRBool nsXULWindow::LoadSizeFromXUL()
     if (NS_SUCCEEDED(errorCode) && temp > 0) {
       specHeight = CSSToDevPixels(NS_MAX(temp, 100), appPerDev);
       gotSize = PR_TRUE;
     }
   }
 
   if (gotSize) {
     // constrain to screen size
-    nsCOMPtr<nsIDOMWindowInternal> domWindow;
+    nsCOMPtr<nsIDOMWindow> domWindow;
     GetWindowDOMWindow(getter_AddRefs(domWindow));
     if (domWindow) {
       nsCOMPtr<nsIDOMScreen> screen;
       domWindow->GetScreen(getter_AddRefs(screen));
       if (screen) {
         PRInt32 screenWidth;
         PRInt32 screenHeight;
         screen->GetAvailWidth(&screenWidth);
@@ -1243,17 +1243,17 @@ PRBool nsXULWindow::LoadMiscPersistentAt
       else if (sizeMode == nsSizeMode_Normal)
         sizeString.Assign(SIZEMODE_NORMAL);
       if (!sizeString.IsEmpty()) {
         windowElement->SetAttribute(MODE_ATTRIBUTE, sizeString);
       }
     }
 
     if (sizeMode == nsSizeMode_Fullscreen) {
-      nsCOMPtr<nsIDOMWindowInternal> ourWindow;
+      nsCOMPtr<nsIDOMWindow> ourWindow;
       GetWindowDOMWindow(getter_AddRefs(ourWindow));
       ourWindow->SetFullScreen(PR_TRUE);
     } else {
       mWindow->SetSizeMode(sizeMode);
     }
     gotState = PR_TRUE;
   }
 
@@ -1553,17 +1553,17 @@ NS_IMETHODIMP nsXULWindow::SavePersisten
       }
     }
   }
 
   mPersistentAttributesDirty = 0;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsXULWindow::GetWindowDOMWindow(nsIDOMWindowInternal** aDOMWindow)
+NS_IMETHODIMP nsXULWindow::GetWindowDOMWindow(nsIDOMWindow** aDOMWindow)
 {
   NS_ENSURE_STATE(mDocShell);
 
   if (!mDOMWindow)
     mDOMWindow = do_GetInterface(mDocShell);
   NS_ENSURE_TRUE(mDOMWindow, NS_ERROR_FAILURE);
 
   *aDOMWindow = mDOMWindow;
--- a/xpfe/appshell/src/nsXULWindow.h
+++ b/xpfe/appshell/src/nsXULWindow.h
@@ -50,17 +50,17 @@
 #include "nsString.h"
 #include "nsWeakReference.h"
 #include "nsCOMArray.h"
 
 // Interfaces needed
 #include "nsIBaseWindow.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIXULWindow.h"
 #include "nsIPrompt.h"
 #include "nsIAuthPrompt.h"
 #include "nsGUIEvent.h"
 #include "nsIXULBrowserWindow.h"
 #include "nsIWeakReference.h"
@@ -118,17 +118,17 @@ protected:
    void StaggerPosition(PRInt32 &aRequestedX, PRInt32 &aRequestedY,
                         PRInt32 aSpecWidth, PRInt32 aSpecHeight);
    PRBool     LoadPositionFromXUL();
    PRBool     LoadSizeFromXUL();
    PRBool     LoadMiscPersistentAttributesFromXUL();
    void       SyncAttributesToWidget();
    NS_IMETHOD SavePersistentAttributes();
 
-   NS_IMETHOD GetWindowDOMWindow(nsIDOMWindowInternal** aDOMWindow);
+   NS_IMETHOD GetWindowDOMWindow(nsIDOMWindow** aDOMWindow);
    NS_IMETHOD GetWindowDOMElement(nsIDOMElement** aDOMElement);
 
    // See nsIDocShellTreeOwner for docs on next two methods
    NS_HIDDEN_(nsresult) ContentShellAdded(nsIDocShellTreeItem* aContentShell,
                                           PRBool aPrimary, PRBool aTargetable,
                                           const nsAString& aID);
    NS_HIDDEN_(nsresult) ContentShellRemoved(nsIDocShellTreeItem* aContentShell);
    NS_IMETHOD SizeShellTo(nsIDocShellTreeItem* aShellItem, PRInt32 aCX, 
@@ -149,17 +149,17 @@ protected:
    void       PersistentAttributesDirty(PRUint32 aDirtyFlags);
    PRInt32    AppUnitsPerDevPixel();
 
    nsChromeTreeOwner*      mChromeTreeOwner;
    nsContentTreeOwner*     mContentTreeOwner;
    nsContentTreeOwner*     mPrimaryContentTreeOwner;
    nsCOMPtr<nsIWidget>     mWindow;
    nsCOMPtr<nsIDocShell>   mDocShell;
-   nsCOMPtr<nsIDOMWindowInternal>  mDOMWindow;
+   nsCOMPtr<nsIDOMWindow>  mDOMWindow;
    nsCOMPtr<nsIWeakReference> mParentWindow;
    nsCOMPtr<nsIPrompt>     mPrompter;
    nsCOMPtr<nsIAuthPrompt> mAuthPrompter;
    nsCOMPtr<nsIXULBrowserWindow> mXULBrowserWindow;
    nsCOMPtr<nsIDocShellTreeItem> mPrimaryContentShell;
    nsTArray<nsContentShellInfo*> mContentShells; // array of doc shells by id
    nsresult                mModalStatus;
    PRPackedBool            mContinueModalLoop;
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -76,17 +76,16 @@
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIFTPChannel.h"
 #include "nsIWindowWatcher.h"
 #include "nsIPrompt.h"
 #include "nsIAuthPrompt.h"
 #include "nsIProgressEventSink.h"
 #include "nsIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
 #include "nsIDOMWindowCollection.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMText.h"
 #include "nsIStreamConverterService.h"
 #include "nsICategoryManager.h"
 #include "nsXPCOMCID.h"
 #include "nsIDocument.h"
--- a/xpfe/components/windowds/nsIWindowDataSource.idl
+++ b/xpfe/components/windowds/nsIWindowDataSource.idl
@@ -32,19 +32,19 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
-#include "nsIDOMWindowInternal.idl"
+#include "nsIDOMWindow.idl"
 
 // interface for accessing RDF-specific data from the window datasource
 [scriptable, uuid(3722A5B9-5323-4ed0-BB1A-8299F27A4E89)]
 interface nsIWindowDataSource : nsISupports
 {
     /**
      * for the given resource name, return the window
      */
-    nsIDOMWindowInternal getWindowForResource(in string inResource);
+    nsIDOMWindow getWindowForResource(in string inResource);
 };
--- a/xpfe/components/windowds/nsWindowDataSource.cpp
+++ b/xpfe/components/windowds/nsWindowDataSource.cpp
@@ -328,35 +328,34 @@ findWindow(nsHashKey* aKey, void *aData,
     }
     return PR_TRUE;
 }
 
 // nsIWindowDataSource implementation
 
 NS_IMETHODIMP
 nsWindowDataSource::GetWindowForResource(const char *aResourceString,
-                                         nsIDOMWindowInternal** aResult)
+                                         nsIDOMWindow** aResult)
 {
     nsCOMPtr<nsIRDFResource> windowResource;
     gRDFService->GetResource(nsDependentCString(aResourceString),
                              getter_AddRefs(windowResource));
 
     // now reverse-lookup in the hashtable
     findWindowClosure closure = { windowResource.get(), nsnull };
     mWindowResources.Enumerate(findWindow, (void*)&closure);
     if (closure.resultWindow) {
 
         // this sucks, we have to jump through docshell to go from
-        // nsIXULWindow -> nsIDOMWindowInternal
+        // nsIXULWindow -> nsIDOMWindow
         nsCOMPtr<nsIDocShell> docShell;
         closure.resultWindow->GetDocShell(getter_AddRefs(docShell));
 
         if (docShell) {
-            nsCOMPtr<nsIDOMWindowInternal> result =
-                do_GetInterface(docShell);
+            nsCOMPtr<nsIDOMWindow> result = do_GetInterface(docShell);
         
             *aResult = result;
             NS_IF_ADDREF(*aResult);
         }
     }
 
     return NS_OK;
 }
--- a/xpinstall/public/nsIXPIInstallInfo.idl
+++ b/xpinstall/public/nsIXPIInstallInfo.idl
@@ -35,17 +35,17 @@
  *
  * ***** END LICENSE BLOCK *****
  */
 
 #include "nsISupports.idl"
 
 [ptr] native triggerInfoPtr(nsXPITriggerInfo);
 
-interface nsIDOMWindowInternal;
+interface nsIDOMWindow;
 interface nsIDocShell;
 interface nsIURI;
 
 /**
  * Interface holding information about a triggered install that can be passed
  * to and from script.
  */
 [scriptable, uuid(5a4a775c-e452-4cf2-8ff8-d327ae24aec6)]
@@ -54,17 +54,17 @@ interface nsIXPIInstallInfo : nsISupport
   /**
    * The install triggers supplied by the install.
    */
   [noscript, notxpcom] attribute triggerInfoPtr triggerInfo;
   
   /**
    * The original window that initiated the install.
    */
-  readonly attribute nsIDOMWindowInternal originatingWindow;
+  readonly attribute nsIDOMWindow originatingWindow;
   
   /**
    * The original URI calling the install. This is the URI that would have been
    * checked against the whitelist if necessary.
    */
   readonly attribute nsIURI originatingURI;
   
   /**
--- a/xpinstall/src/nsInstallTrigger.cpp
+++ b/xpinstall/src/nsInstallTrigger.cpp
@@ -238,17 +238,17 @@ nsInstallTrigger::HandleContent(const ch
 
     nsAutoPtr<nsXPITriggerInfo> trigger(new nsXPITriggerInfo());
     nsAutoPtr<nsXPITriggerItem> item(new nsXPITriggerItem(0, NS_ConvertUTF8toUTF16(urispec).get(),
                                                           nsnull));
     if (trigger && item)
     {
         // trigger will own the item now
         trigger->Add(item.forget());
-        nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(globalObject));
+        nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(globalObject);
         nsCOMPtr<nsIXPIInstallInfo> installInfo =
                               new nsXPIInstallInfo(win, checkuri, trigger, 0);
         if (installInfo)
         {
             // From here trigger is owned by installInfo until passed on to nsXPInstallManager
             trigger.forget();
             if (AllowInstall(checkuri))
             {
--- a/xpinstall/src/nsJSInstallTriggerGlobal.cpp
+++ b/xpinstall/src/nsJSInstallTriggerGlobal.cpp
@@ -404,17 +404,17 @@ InstallTriggerGlobalInstall(JSContext *c
     // pass on only if good stuff found
     if (!abortLoad && trigger->Size() > 0)
     {
         nsCOMPtr<nsIURI> checkuri;
         rv = nativeThis->GetOriginatingURI(globalObject,
                                            getter_AddRefs(checkuri));
         if (NS_SUCCEEDED(rv))
         {
-            nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(globalObject));
+            nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(globalObject);
             nsCOMPtr<nsIXPIInstallInfo> installInfo =
                 new nsXPIInstallInfo(win, checkuri, trigger, 0);
             if (installInfo)
             {
                 // installInfo now owns triggers
                 PRBool enabled = PR_FALSE;
                 nativeThis->UpdateEnabled(checkuri, XPI_WHITELIST, &enabled);
                 if (!enabled)
@@ -526,17 +526,17 @@ InstallTriggerGlobalInstallChrome(JSCont
             nsAutoPtr<nsXPITriggerInfo> trigger(new nsXPITriggerInfo());
             nsAutoPtr<nsXPITriggerItem> item(new nsXPITriggerItem(name.get(),
                                                                   sourceURL.get(),
                                                                   nsnull));
             if (trigger && item)
             {
                 // trigger will free item when complete
                 trigger->Add(item.forget());
-                nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(globalObject));
+                nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(globalObject);
                 nsCOMPtr<nsIXPIInstallInfo> installInfo =
                     new nsXPIInstallInfo(win, checkuri, trigger, chromeType);
                 if (installInfo)
                 {
                     // installInfo owns trigger now
                     trigger.forget();
                     PRBool enabled = PR_FALSE;
                     nativeThis->UpdateEnabled(checkuri, XPI_WHITELIST,
@@ -632,17 +632,17 @@ InstallTriggerGlobalStartSoftwareUpdate(
         nsAutoPtr<nsXPITriggerInfo> trigger(new nsXPITriggerInfo());
         nsAutoPtr<nsXPITriggerItem> item(new nsXPITriggerItem(0,
                                                               xpiURL.get(),
                                                               nsnull));
         if (trigger && item)
         {
             // trigger will free item when complete
             trigger->Add(item.forget());
-            nsCOMPtr<nsIDOMWindowInternal> win(do_QueryInterface(globalObject));
+            nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(globalObject);
             nsCOMPtr<nsIXPIInstallInfo> installInfo =
                                 new nsXPIInstallInfo(win, checkuri, trigger, 0);
             if (installInfo)
             {
                 // From here trigger is owned by installInfo until passed on to nsXPInstallManager
                 trigger.forget();
                 PRBool enabled = PR_FALSE;
                 nativeThis->UpdateEnabled(checkuri, XPI_WHITELIST, &enabled);
--- a/xpinstall/src/nsXPIInstallInfo.cpp
+++ b/xpinstall/src/nsXPIInstallInfo.cpp
@@ -35,17 +35,17 @@
  *
  * ***** END LICENSE BLOCK *****
  */
 
 #include "nsXPIInstallInfo.h"
 
 NS_IMPL_ISUPPORTS1(nsXPIInstallInfo, nsIXPIInstallInfo)
 
-nsXPIInstallInfo::nsXPIInstallInfo(nsIDOMWindowInternal *aOriginatingWindow,
+nsXPIInstallInfo::nsXPIInstallInfo(nsIDOMWindow *aOriginatingWindow,
                                    nsIURI *aOriginatingURI,
                                    nsXPITriggerInfo *aTriggerInfo,
                                    PRUint32 aChromeType)
   : mOriginatingWindow(aOriginatingWindow), mOriginatingURI(aOriginatingURI),
     mTriggerInfo(aTriggerInfo), mChromeType(aChromeType)
 {
 }
 
@@ -64,19 +64,19 @@ nsXPIInstallInfo::GetTriggerInfo(nsXPITr
 
 NS_IMETHODIMP
 nsXPIInstallInfo::SetTriggerInfo(nsXPITriggerInfo * aTriggerInfo)
 {
     mTriggerInfo = aTriggerInfo;
     return NS_OK;
 }
 
-/* readonly attribute nsIDOMWindowInternal originatingWindow; */
+/* readonly attribute nsIDOMWindow originatingWindow; */
 NS_IMETHODIMP
-nsXPIInstallInfo::GetOriginatingWindow(nsIDOMWindowInternal * *aOriginatingWindow)
+nsXPIInstallInfo::GetOriginatingWindow(nsIDOMWindow * *aOriginatingWindow)
 {
     NS_IF_ADDREF(*aOriginatingWindow = mOriginatingWindow);
     return NS_OK;
 }
 
 /* readonly attribute nsIURI uri; */
 NS_IMETHODIMP
 nsXPIInstallInfo::GetOriginatingURI(nsIURI * *aOriginatingURI)
--- a/xpinstall/src/nsXPIInstallInfo.h
+++ b/xpinstall/src/nsXPIInstallInfo.h
@@ -33,30 +33,30 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK *****
  */
 
 #include "nsXPITriggerInfo.h"
 #include "nsIXPIInstallInfo.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsIURI.h"
 
 class nsXPIInstallInfo : public nsIXPIInstallInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIXPIINSTALLINFO
 
-  nsXPIInstallInfo(nsIDOMWindowInternal *aOriginatingWindow,
+  nsXPIInstallInfo(nsIDOMWindow *aOriginatingWindow,
                    nsIURI *aOriginatingURI, nsXPITriggerInfo *aTriggerInfo,
                    PRUint32 aChromeType);
 
 private:
   ~nsXPIInstallInfo();
 
-  nsCOMPtr<nsIDOMWindowInternal> mOriginatingWindow;
+  nsCOMPtr<nsIDOMWindow> mOriginatingWindow;
   nsCOMPtr<nsIURI> mOriginatingURI;
   nsXPITriggerInfo* mTriggerInfo;
   PRUint32 mChromeType;
 };
--- a/xpinstall/src/nsXPInstallManager.cpp
+++ b/xpinstall/src/nsXPInstallManager.cpp
@@ -62,17 +62,17 @@
 #include "nsXPITriggerInfo.h"
 #include "nsXPInstallManager.h"
 #include "nsInstallTrigger.h"
 #include "nsIWindowWatcher.h"
 #include "nsIAuthPrompt.h"
 #include "nsIWindowMediator.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsAppDirectoryServiceDefs.h"
 
 #include "nsReadableUtils.h"
 #include "nsIPromptService.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsXPCOM.h"
@@ -193,17 +193,17 @@ nsXPInstallManager::InitManagerWithHashe
 
 NS_IMETHODIMP
 nsXPInstallManager::InitManagerWithInstallInfo(nsIXPIInstallInfo* aInstallInfo)
 {
     nsXPITriggerInfo* triggers;
     nsresult rv = aInstallInfo->GetTriggerInfo(&triggers);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsCOMPtr<nsIDOMWindowInternal> win;
+    nsCOMPtr<nsIDOMWindow> win;
     rv = aInstallInfo->GetOriginatingWindow(getter_AddRefs(win));
     if (NS_SUCCEEDED(rv))
     {
         PRUint32 type;
         rv = aInstallInfo->GetChromeType(&type);
         if (NS_SUCCEEDED(rv))
         {
             // Passing ownership onto InitManager which will free when necessary
@@ -212,17 +212,17 @@ nsXPInstallManager::InitManagerWithInsta
         }
     }
 
     NS_RELEASE_THIS();
     return rv;
 }
 
 NS_IMETHODIMP
-nsXPInstallManager::InitManager(nsIDOMWindowInternal* aParentWindow, nsXPITriggerInfo* aTriggers, PRUint32 aChromeType)
+nsXPInstallManager::InitManager(nsIDOMWindow* aParentWindow, nsXPITriggerInfo* aTriggers, PRUint32 aChromeType)
 {
     if ( !aTriggers || aTriggers->Size() == 0 )
     {
         NS_WARNING("XPInstallManager called with no trigger info!");
         delete aTriggers;
         NS_RELEASE_THIS();
         return NS_ERROR_INVALID_POINTER;
     }
@@ -363,17 +363,17 @@ nsXPInstallManager::InitManagerInternal(
 }
 
 
 NS_IMETHODIMP
 nsXPInstallManager::ConfirmInstall(nsIDOMWindow *aParent, const PRUnichar **aPackageList, PRUint32 aCount, PRBool *aRetval)
 {
     *aRetval = PR_FALSE;
 
-    nsCOMPtr<nsIDOMWindowInternal> parentWindow( do_QueryInterface(aParent) );
+    nsCOMPtr<nsIDOMWindow> parentWindow = aParent;
     nsCOMPtr<nsIDialogParamBlock> params;
     nsresult rv = LoadParams( aCount, aPackageList, getter_AddRefs(params) );
 
     if ( NS_SUCCEEDED(rv) && parentWindow && params)
     {
         nsCOMPtr<nsIDOMWindow> newWindow;
 
         nsCOMPtr<nsISupportsInterfacePointer> ifptr =
@@ -407,17 +407,17 @@ nsXPInstallManager::ConfirmInstall(nsIDO
             *aRetval = buttonPressed ? PR_FALSE : PR_TRUE;
         }
     }
 
     return rv;
 }
 
 #ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
-PRBool nsXPInstallManager::ConfirmChromeInstall(nsIDOMWindowInternal* aParentWindow, const PRUnichar **aPackage)
+PRBool nsXPInstallManager::ConfirmChromeInstall(nsIDOMWindow* aParentWindow, const PRUnichar **aPackage)
 {
     // get the dialog strings
     nsXPIDLString applyNowText;
     nsXPIDLString confirmText;
     nsCOMPtr<nsIStringBundleService> bundleSvc =
              do_GetService(NS_STRINGBUNDLE_CONTRACTID);
     if (!bundleSvc)
         return PR_FALSE;
@@ -519,17 +519,17 @@ nsXPInstallManager::OpenProgressDialog(c
     const char* statusType = mChromeType == CHROME_SKIN ? PREF_XPINSTALL_STATUS_DLG_TYPE_SKIN
                                                         : PREF_XPINSTALL_STATUS_DLG_TYPE_CHROME;
     rv = pref->GetCharPref(statusType, &statusDialogType);
     nsAutoString type;
     type.AssignWithConversion(statusDialogType);
     if (NS_SUCCEEDED(rv) && !type.IsEmpty()) {
         nsCOMPtr<nsIWindowMediator> wm = do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
 
-        nsCOMPtr<nsIDOMWindowInternal> recentWindow;
+        nsCOMPtr<nsIDOMWindow> recentWindow;
         wm->GetMostRecentWindow(type.get(), getter_AddRefs(recentWindow));
         if (recentWindow) {
             nsCOMPtr<nsIObserverService> os =
               mozilla::services::GetObserverService();
             os->NotifyObservers(params, "xpinstall-download-started", nsnull);
 
             recentWindow->Focus();
             return NS_OK;
--- a/xpinstall/src/nsXPInstallManager.h
+++ b/xpinstall/src/nsXPInstallManager.h
@@ -49,17 +49,17 @@
 #include "nsIURL.h"
 #include "nsIInputStream.h"
 #include "nsIStreamListener.h"
 #include "nsIXPInstallManager.h"
 #include "nsIXPIDialogService.h"
 #include "nsXPITriggerInfo.h"
 #include "nsIXPIProgressDialog.h"
 #include "nsIChromeRegistry.h"
-#include "nsIDOMWindowInternal.h"
+#include "nsIDOMWindow.h"
 #include "nsIObserver.h"
 #include "nsIBadCertListener2.h"
 #include "nsISSLErrorListener.h"
 #include "nsIChannelEventSink.h"
 #include "nsIZipReader.h"
 #include "nsIXPIInstallInfo.h"
 #include "nsILoadGroup.h"
 
@@ -103,27 +103,27 @@ class nsXPInstallManager : public nsIXPI
         NS_DECL_NSIPROGRESSEVENTSINK
         NS_DECL_NSIREQUESTOBSERVER
         NS_DECL_NSIINTERFACEREQUESTOR
         NS_DECL_NSPICERTNOTIFICATION
         NS_DECL_NSIBADCERTLISTENER2
         NS_DECL_NSISSLERRORLISTENER
         NS_DECL_NSICHANNELEVENTSINK
 
-        NS_IMETHOD InitManager(nsIDOMWindowInternal* aParentWindow, nsXPITriggerInfo* aTrigger, PRUint32 aChromeType );
+        NS_IMETHOD InitManager(nsIDOMWindow* aParentWindow, nsXPITriggerInfo* aTrigger, PRUint32 aChromeType );
 
     private:
         nsresult    InitManagerInternal();
         nsresult    InstallItems();
         NS_IMETHOD  DownloadNext();
         void        Shutdown(PRInt32 status = nsInstall::USER_CANCELLED);
         NS_IMETHOD  GetDestinationFile(nsString& url, nsILocalFile* *file);
         NS_IMETHOD  LoadParams(PRUint32 aCount, const PRUnichar** aPackageList, nsIDialogParamBlock** aParams);
 #ifdef ENABLE_SKIN_SIMPLE_INSTALLATION_UI
-        PRBool      ConfirmChromeInstall(nsIDOMWindowInternal* aParentWindow, const PRUnichar** aPackage);
+        PRBool      ConfirmChromeInstall(nsIDOMWindow* aParentWindow, const PRUnichar** aPackage);
 #endif
         PRBool      VerifyHash(nsXPITriggerItem* aItem);
         PRInt32     GetIndexFromURL(const PRUnichar* aUrl);
         nsresult    CheckCert(nsIChannel* aChannel);
 
         nsXPITriggerInfo*   mTriggers;
         nsXPITriggerItem*   mItem;
         PRUint32            mNextItem;
@@ -132,13 +132,13 @@ class nsXPInstallManager : public nsIXPI
         PRInt32             mOutstandingCertLoads;
         PRBool              mDialogOpen;
         PRBool              mCancelled;
         PRBool              mNeedsShutdown;
         PRBool              mFromChrome;
 
         nsCOMPtr<nsIXPIProgressDialog>  mDlg;
 
-        nsCOMPtr<nsIDOMWindowInternal>  mParentWindow;
+        nsCOMPtr<nsIDOMWindow>          mParentWindow;
         nsCOMPtr<nsILoadGroup>          mLoadGroup;
 };
 
 #endif
--- a/xpinstall/tests/harness.js
+++ b/xpinstall/tests/harness.js
@@ -175,17 +175,17 @@ var Harness = {
 
   // nsIWindowMediatorListener
 
   onWindowTitleChange: function(window, title) {
   },
 
   onOpenWindow: function(window) {
     var domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                          .getInterface(Components.interfaces.nsIDOMWindowInternal);
+                          .getInterface(Components.interfaces.nsIDOMWindow);
     var self = this;
     domwindow.addEventListener("load", function() {
       self.windowLoad(domwindow);
     }, false);
   },
 
   onCloseWindow: function(window) {
   },