Bug 826632. Part 1: Merge nsIViewManager into nsViewManager. r=tnikkel
authorRobert O'Callahan <robert@ocallahan.org>
Sat, 05 Jan 2013 16:12:24 +1300
changeset 126813 20df426b611197b3fdf08615f2b2f951b9ebf282
parent 126812 bd3b4d20072a3cd9b040ecfca0d5a9217c1cc59e
child 126814 d6f3da9601612c4dce7855139d62e33f28d4eeb6
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs826632
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 826632. Part 1: Merge nsIViewManager into nsViewManager. r=tnikkel
accessible/src/generic/DocAccessible.cpp
accessible/src/mac/RootAccessibleWrap.mm
accessible/src/msaa/AccessibleWrap.cpp
accessible/src/msaa/DocAccessibleWrap.cpp
content/base/public/nsIDocument.h
content/base/src/Element.cpp
content/base/src/FragmentOrElement.cpp
content/base/src/nsContentSink.cpp
content/base/src/nsContentSink.h
content/base/src/nsContentUtils.cpp
content/base/src/nsDocument.cpp
content/base/src/nsDocument.h
content/base/src/nsINode.cpp
content/events/src/nsEventListenerManager.cpp
content/events/src/nsIMEStateManager.cpp
content/html/content/src/nsGenericHTMLElement.cpp
content/html/document/src/MediaDocument.cpp
content/html/document/src/nsHTMLDocument.cpp
content/html/document/src/nsHTMLDocument.h
content/xml/document/src/nsXMLContentSink.h
content/xul/content/src/nsXULElement.cpp
content/xul/content/src/nsXULPopupListener.cpp
content/xul/document/src/nsXULContentSink.cpp
content/xul/document/src/nsXULDocument.cpp
docshell/base/nsDocShell.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsFocusManager.cpp
dom/base/nsGlobalWindow.cpp
dom/ipc/TabParent.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
extensions/widgetutils/src/nsWidgetUtils.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsCSSRendering.cpp
layout/base/nsCSSRenderingBorders.cpp
layout/base/nsDisplayList.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsIDocumentViewerPrint.h
layout/base/nsIPresShell.h
layout/base/nsPresContext.cpp
layout/base/nsPresShell.cpp
layout/base/nsPresShell.h
layout/base/nsRefreshDriver.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsListControlFrame.cpp
layout/forms/nsTextControlFrame.cpp
layout/generic/nsContainerFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsObjectFrame.cpp
layout/generic/nsSubDocumentFrame.cpp
layout/printing/nsPrintEngine.cpp
layout/printing/nsPrintObject.h
layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp
layout/tools/layout-debug/src/nsRegressionTester.cpp
layout/xul/base/src/nsBoxFrame.cpp
layout/xul/base/src/nsDeckFrame.cpp
layout/xul/base/src/nsLeafBoxFrame.cpp
layout/xul/base/src/nsListBoxBodyFrame.cpp
layout/xul/base/src/nsMenuPopupFrame.cpp
layout/xul/base/src/nsMenuPopupFrame.h
layout/xul/base/src/nsXULPopupManager.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
view/public/Makefile.in
view/public/nsIViewManager.h
view/public/nsView.h
view/public/nsViewManager.h
view/src/nsView.cpp
view/src/nsViewManager.cpp
view/src/nsViewManager.h
widget/android/nsWindow.cpp
widget/cocoa/nsChildView.mm
widget/gtk2/nsDragService.cpp
widget/gtk2/nsNativeThemeGTK.cpp
widget/tests/TestWinTSF.cpp
widget/xpwidgets/nsBaseDragService.cpp
--- a/accessible/src/generic/DocAccessible.cpp
+++ b/accessible/src/generic/DocAccessible.cpp
@@ -30,17 +30,17 @@
 #include "nsIDOMXULPopupElement.h"
 #include "nsIEditingSession.h"
 #include "nsEventStateManager.h"
 #include "nsIFrame.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsINameSpaceManager.h"
 #include "nsIPresShell.h"
 #include "nsIServiceManager.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsUnicharUtils.h"
 #include "nsIURI.h"
 #include "nsIWebNavigation.h"
 #include "nsFocusManager.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/Element.h"
 
@@ -1248,17 +1248,17 @@ DocAccessible::HandleAccEvent(AccEvent* 
 // Public members
 
 void*
 DocAccessible::GetNativeWindow() const
 {
   if (!mPresShell)
     return nullptr;
 
-  nsIViewManager* vm = mPresShell->GetViewManager();
+  nsViewManager* vm = mPresShell->GetViewManager();
   if (!vm)
     return nullptr;
 
   nsCOMPtr<nsIWidget> widget;
   vm->GetRootWidget(getter_AddRefs(widget));
   if (widget)
     return widget->GetNativeData(NS_NATIVE_WINDOW);
 
--- a/accessible/src/mac/RootAccessibleWrap.mm
+++ b/accessible/src/mac/RootAccessibleWrap.mm
@@ -5,17 +5,17 @@
 
 #include "RootAccessibleWrap.h"
 
 #include "mozDocAccessible.h"
 
 #include "nsCOMPtr.h"
 #include "nsObjCExceptions.h"
 #include "nsIWidget.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 
 using namespace mozilla::a11y;
 
 RootAccessibleWrap::
   RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
                      nsIPresShell* aPresShell) :
   RootAccessible(aDocument, aRootContent, aPresShell)
 {
--- a/accessible/src/msaa/AccessibleWrap.cpp
+++ b/accessible/src/msaa/AccessibleWrap.cpp
@@ -29,17 +29,17 @@
 #include "nsIMutableArray.h"
 #include "nsIFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsINameSpaceManager.h"
 #include "nsINodeInfo.h"
 #include "nsIServiceManager.h"
 #include "nsTextFormatter.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsEventMap.h"
 #include "nsArrayUtils.h"
 #include "mozilla/Preferences.h"
 
 #include "Accessible2_i.c"
 #include "AccessibleRole.h"
 #include "AccessibleStates.h"
 #include "oleacc.h"
@@ -1648,17 +1648,17 @@ AccessibleWrap::GetHWNDFor(Accessible* a
     // Popup lives in own windows, use its HWND until the popup window is
     // hidden to make old JAWS versions work with collapsed comboboxes (see
     // discussion in bug 379678).
     nsIFrame* frame = aAccessible->GetFrame();
     if (frame) {
       nsIWidget* widget = frame->GetNearestWidget();
       if (widget && widget->IsVisible()) {
         nsIPresShell* shell = document->PresShell();
-        nsIViewManager* vm = shell->GetViewManager();
+        nsViewManager* vm = shell->GetViewManager();
         if (vm) {
           nsCOMPtr<nsIWidget> rootWidget;
           vm->GetRootWidget(getter_AddRefs(rootWidget));
           // Make sure the accessible belongs to popup. If not then use
           // document HWND (which might be different from root widget in the
           // case of window emulation).
           if (rootWidget != widget)
             return static_cast<HWND>(widget->GetNativeData(NS_NATIVE_WINDOW));
--- a/accessible/src/msaa/DocAccessibleWrap.cpp
+++ b/accessible/src/msaa/DocAccessibleWrap.cpp
@@ -16,17 +16,17 @@
 #include "Statistics.h"
 
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeNode.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsISelectionController.h"
 #include "nsIServiceManager.h"
 #include "nsIURI.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWebNavigation.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 /* For documentation of the accessibility architecture, 
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
  */
--- a/content/base/public/nsIDocument.h
+++ b/content/base/public/nsIDocument.h
@@ -60,17 +60,17 @@ class nsIObserver;
 class nsIPresShell;
 class nsIPrincipal;
 class nsIRequest;
 class nsIStreamListener;
 class nsIStyleRule;
 class nsIStyleSheet;
 class nsIURI;
 class nsIVariant;
-class nsIViewManager;
+class nsViewManager;
 class nsPresContext;
 class nsRange;
 class nsScriptLoader;
 class nsSMILAnimationController;
 class nsStyleSet;
 class nsTextNode;
 class nsWindowSizes;
 class nsSmallVoidArray;
@@ -473,17 +473,17 @@ public:
   /**
    * Create a new presentation shell that will use aContext for its
    * presentation context (presentation contexts <b>must not</b> be
    * shared among multiple presentation shells). The caller of this
    * method is responsible for calling BeginObservingDocument() on the
    * presshell if the presshell should observe document mutations.
    */
   virtual nsresult CreateShell(nsPresContext* aContext,
-                               nsIViewManager* aViewManager,
+                               nsViewManager* aViewManager,
                                nsStyleSet* aStyleSet,
                                nsIPresShell** aInstancePtrResult) = 0;
   virtual void DeleteShell() = 0;
 
   nsIPresShell* GetShell() const
   {
     return GetBFCacheEntry() ? nullptr : mPresShell;
   }
--- a/content/base/src/Element.cpp
+++ b/content/base/src/Element.cpp
@@ -89,17 +89,17 @@
 #include "nsGenericHTMLElement.h"
 #include "nsIEditor.h"
 #include "nsIEditorIMESupport.h"
 #include "nsIEditorDocShell.h"
 #include "nsEventDispatcher.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIControllers.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsXBLInsertionPoint.h"
 #include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
 #include "nsCSSRuleProcessor.h"
 #include "nsRuleProcessorData.h"
 #include "nsAsyncDOMEvent.h"
 #include "nsTextNode.h"
 
--- a/content/base/src/FragmentOrElement.cpp
+++ b/content/base/src/FragmentOrElement.cpp
@@ -88,17 +88,17 @@
 #include "nsGenericHTMLElement.h"
 #include "nsIEditor.h"
 #include "nsIEditorIMESupport.h"
 #include "nsIEditorDocShell.h"
 #include "nsEventDispatcher.h"
 #include "nsContentCreatorFunctions.h"
 #include "nsIControllers.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsXBLInsertionPoint.h"
 #include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
 #include "nsRuleProcessorData.h"
 #include "nsAsyncDOMEvent.h"
 #include "nsTextNode.h"
 #include "mozilla/dom/NodeListBinding.h"
 #include "mozilla/dom/UndoManager.h"
--- a/content/base/src/nsContentSink.cpp
+++ b/content/base/src/nsContentSink.cpp
@@ -20,17 +20,17 @@
 #include "nsIDocShellTreeItem.h"
 #include "nsCPrefetchService.h"
 #include "nsIURI.h"
 #include "nsNetUtil.h"
 #include "nsIHttpChannel.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIAtom.h"
 #include "nsGkAtoms.h"
 #include "nsIDOMWindow.h"
 #include "nsNetCID.h"
 #include "nsIOfflineCacheUpdate.h"
 #include "nsIApplicationCache.h"
 #include "nsIApplicationCacheContainer.h"
 #include "nsIApplicationCacheChannel.h"
@@ -1366,17 +1366,17 @@ nsContentSink::DidProcessATokenImpl()
   }
 
   // Increase before comparing to gEventProbeRate
   ++mDeflectedCount;
 
   // Check if there's a pending event
   if (sPendingEventMode != 0 && !mHasPendingEvent &&
       (mDeflectedCount % sEventProbeRate) == 0) {
-    nsIViewManager* vm = shell->GetViewManager();
+    nsViewManager* vm = shell->GetViewManager();
     NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
     nsCOMPtr<nsIWidget> widget;
     vm->GetRootWidget(getter_AddRefs(widget));
     mHasPendingEvent = widget && widget->HasPendingInputEvent();
   }
 
   if (mHasPendingEvent && sPendingEventMode == 2) {
     return NS_ERROR_HTMLPARSER_INTERRUPTED;
@@ -1513,17 +1513,17 @@ nsContentSink::WillParseImpl(void)
   nsIPresShell *shell = mDocument->GetShell();
   if (!shell) {
     return NS_OK;
   }
 
   uint32_t currentTime = PR_IntervalToMicroseconds(PR_IntervalNow());
 
   if (sEnablePerfMode == 0) {
-    nsIViewManager* vm = shell->GetViewManager();
+    nsViewManager* vm = shell->GetViewManager();
     NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
     uint32_t lastEventTime;
     vm->GetLastUserEventTime(lastEventTime);
 
     bool newDynLower =
       mDocument->IsInBackgroundWindow() ||
       ((currentTime - mBeginLoadTime) > uint32_t(sInitialPerfTime) &&
        (currentTime - lastEventTime) < uint32_t(sInteractiveTime));
--- a/content/base/src/nsContentSink.h
+++ b/content/base/src/nsContentSink.h
@@ -29,17 +29,17 @@
 class nsIDocument;
 class nsIURI;
 class nsIChannel;
 class nsIDocShell;
 class nsIParser;
 class nsIAtom;
 class nsIChannel;
 class nsIContent;
-class nsIViewManager;
+class nsViewManager;
 class nsNodeInfoManager;
 class nsScriptLoader;
 class nsIApplicationCache;
 
 namespace mozilla {
 namespace css {
 class Loader;
 }
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -110,17 +110,17 @@
 #include "nsDOMDataTransfer.h"
 #include "nsHtml5Module.h"
 #include "nsPresContext.h"
 #include "nsLayoutStatics.h"
 #include "nsFocusManager.h"
 #include "nsTextEditorState.h"
 #include "nsIPluginHost.h"
 #include "nsICategoryManager.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsEventStateManager.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsParserConstants.h"
 #include "nsIWebNavigation.h"
 #include "nsILoadContext.h"
 #include "nsTextFragment.h"
 #include "mozilla/Selection.h"
 
@@ -6430,21 +6430,21 @@ nsContentUtils::FindPresShellForDocument
   return nullptr;
 }
 
 nsIWidget*
 nsContentUtils::WidgetForDocument(nsIDocument* aDoc)
 {
   nsIPresShell* shell = FindPresShellForDocument(aDoc);
   if (shell) {
-    nsIViewManager* VM = shell->GetViewManager();
+    nsViewManager* VM = shell->GetViewManager();
     if (VM) {
       nsView* rootView = VM->GetRootView();
       if (rootView) {
-        nsView* displayRoot = nsIViewManager::GetDisplayRootFor(rootView);
+        nsView* displayRoot = nsViewManager::GetDisplayRootFor(rootView);
         if (displayRoot) {
           return displayRoot->GetNearestWidget(nullptr);
         }
       }
     }
   }
 
   return nullptr;
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -3114,30 +3114,30 @@ nsDocument::TryChannelCharset(nsIChannel
         aExecutor->ComplainAboutBogusProtocolCharset(this);
       }
     }
   }
   return false;
 }
 
 nsresult
-nsDocument::CreateShell(nsPresContext* aContext, nsIViewManager* aViewManager,
+nsDocument::CreateShell(nsPresContext* aContext, nsViewManager* aViewManager,
                         nsStyleSet* aStyleSet,
                         nsIPresShell** aInstancePtrResult)
 {
   // Don't add anything here.  Add it to |doCreateShell| instead.
   // This exists so that subclasses can pass other values for the 4th
   // parameter some of the time.
   return doCreateShell(aContext, aViewManager, aStyleSet,
                        eCompatibility_FullStandards, aInstancePtrResult);
 }
 
 nsresult
 nsDocument::doCreateShell(nsPresContext* aContext,
-                          nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
+                          nsViewManager* aViewManager, nsStyleSet* aStyleSet,
                           nsCompatibility aCompatMode,
                           nsIPresShell** aInstancePtrResult)
 {
   *aInstancePtrResult = nullptr;
 
   NS_ASSERTION(!mPresShell, "We have a presshell already!");
 
   NS_ENSURE_FALSE(GetBFCacheEntry(), NS_ERROR_FAILURE);
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -563,17 +563,17 @@ public:
                              const nsAString& aData);
 
   /**
    * Create a new presentation shell that will use aContext for
    * its presentation context (presentation context's <b>must not</b> be
    * shared among multiple presentation shell's).
    */
   virtual nsresult CreateShell(nsPresContext* aContext,
-                               nsIViewManager* aViewManager,
+                               nsViewManager* aViewManager,
                                nsStyleSet* aStyleSet,
                                nsIPresShell** aInstancePtrResult);
   virtual void DeleteShell();
 
   virtual nsresult GetAllowPlugins(bool* aAllowPlugins);
 
   virtual already_AddRefed<mozilla::dom::UndoManager> GetUndoManager();
 
@@ -1071,17 +1071,17 @@ protected:
 public:
   // Get our title
   virtual void GetTitle(nsString& aTitle);
   // Set our title
   virtual void SetTitle(const nsAString& aTitle, mozilla::ErrorResult& rv);
 
 protected:
   nsresult doCreateShell(nsPresContext* aContext,
-                         nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
+                         nsViewManager* aViewManager, nsStyleSet* aStyleSet,
                          nsCompatibility aCompatMode,
                          nsIPresShell** aInstancePtrResult);
 
   void RemoveStyleSheetsFromStyleSets(nsCOMArray<nsIStyleSheet>& aSheets, 
                                       nsStyleSet::sheetType aType);
   nsresult ResetStylesheetsToURI(nsIURI* aURI);
   void FillStyleSet(nsStyleSet* aStyleSet);
 
--- a/content/base/src/nsINode.cpp
+++ b/content/base/src/nsINode.cpp
@@ -69,17 +69,17 @@
 #include "nsIPresShell.h"
 #include "nsIScriptError.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsIServiceManager.h"
 #include "nsIURL.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWebNavigation.h"
 #include "nsIWidget.h"
 #include "nsLayoutStatics.h"
 #include "nsLayoutUtils.h"
 #include "nsMutationEvent.h"
 #include "nsNetUtil.h"
 #include "nsNodeInfoManager.h"
 #include "nsNodeUtils.h"
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -22,17 +22,17 @@
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptRuntime.h"
 #include "nsLayoutUtils.h"
 #include "nsINameSpaceManager.h"
 #include "nsIContent.h"
 #include "mozilla/dom/Element.h"
 #include "nsIFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsError.h"
 #include "nsIJSContextStack.h"
 #include "nsIDocument.h"
 #include "nsIPresShell.h"
 #include "nsMutationEvent.h"
--- a/content/events/src/nsIMEStateManager.cpp
+++ b/content/events/src/nsIMEStateManager.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIMEStateManager.h"
 #include "nsCOMPtr.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIPresShell.h"
 #include "nsISupports.h"
 #include "nsPIDOMWindow.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIEditorDocShell.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsPresContext.h"
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -33,17 +33,17 @@
 #include "nsPIDOMWindow.h"
 #include "nsIStyleRule.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsEscape.h"
 #include "nsIFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWidget.h"
 #include "nsRange.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsINameSpaceManager.h"
 #include "nsError.h"
--- a/content/html/document/src/MediaDocument.cpp
+++ b/content/html/document/src/MediaDocument.cpp
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaDocument.h"
 #include "nsGkAtoms.h"
 #include "nsRect.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsIScrollable.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsITextToSubURI.h"
 #include "nsIURL.h"
 #include "nsIContentViewer.h"
 #include "nsIMarkupDocumentViewer.h"
 #include "nsIDocShell.h"
 #include "nsCharsetSource.h" // kCharsetFrom* macro definition
 #include "nsNodeInfoManager.h"
 #include "nsContentUtils.h"
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -300,17 +300,17 @@ nsHTMLDocument::ResetToURI(nsIURI *aURI,
   // Make the content type default to "text/html", we are a HTML
   // document, after all. Once we start getting data, this may be
   // changed.
   SetContentTypeInternal(nsDependentCString("text/html"));
 }
 
 nsresult
 nsHTMLDocument::CreateShell(nsPresContext* aContext,
-                            nsIViewManager* aViewManager,
+                            nsViewManager* aViewManager,
                             nsStyleSet* aStyleSet,
                             nsIPresShell** aInstancePtrResult)
 {
   return doCreateShell(aContext, aViewManager, aStyleSet, mCompatMode,
                        aInstancePtrResult);
 }
 
 void
--- a/content/html/document/src/nsHTMLDocument.h
+++ b/content/html/document/src/nsHTMLDocument.h
@@ -50,17 +50,17 @@ public:
   NS_IMETHOD_(nsrefcnt) AddRef(void);
   NS_IMETHOD_(nsrefcnt) Release(void);
 
   virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
   virtual void ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup,
                           nsIPrincipal* aPrincipal);
 
   virtual nsresult CreateShell(nsPresContext* aContext,
-                               nsIViewManager* aViewManager,
+                               nsViewManager* aViewManager,
                                nsStyleSet* aStyleSet,
                                nsIPresShell** aInstancePtrResult);
 
   virtual nsresult StartDocumentLoad(const char* aCommand,
                                      nsIChannel* aChannel,
                                      nsILoadGroup* aLoadGroup,
                                      nsISupports* aContainer,
                                      nsIStreamListener **aDocListener,
--- a/content/xml/document/src/nsXMLContentSink.h
+++ b/content/xml/document/src/nsXMLContentSink.h
@@ -17,17 +17,17 @@
 #include "nsIDTD.h"
 #include "mozilla/dom/FromParser.h"
 
 class nsIDocument;
 class nsIURI;
 class nsIContent;
 class nsINodeInfo;
 class nsIParser;
-class nsIViewManager;
+class nsViewManager;
 
 typedef enum {
   eXMLContentSinkState_InProlog,
   eXMLContentSinkState_InDocumentElement,
   eXMLContentSinkState_InEpilog
 } XMLContentSinkState;
 
 struct StackNode {
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -49,17 +49,17 @@
 #include "nsIScriptContext.h"
 #include "nsIScriptRuntime.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptGlobalObjectOwner.h"
 #include "nsIServiceManager.h"
 #include "mozilla/css/StyleRule.h"
 #include "nsIStyleSheet.h"
 #include "nsIURL.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWidget.h"
 #include "nsIXULDocument.h"
 #include "nsIXULTemplateBuilder.h"
 #include "nsLayoutCID.h"
 #include "nsContentCID.h"
 #include "nsRDFCID.h"
 #include "nsStyleConsts.h"
 #include "nsXPIDLString.h"
--- a/content/xul/content/src/nsXULPopupListener.cpp
+++ b/content/xul/content/src/nsXULPopupListener.cpp
@@ -35,17 +35,17 @@
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/FragmentOrElement.h"
 
 // for event firing in context menus
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsFocusManager.h"
 #include "nsPIDOMWindow.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsError.h"
 #include "nsMenuFrame.h"
 
 using namespace mozilla;
 
 // on win32 and os/2, context menus come up on mouse up. On other platforms,
 // they appear on mouse down. Certain bits of code care about this difference.
 #if defined(XP_WIN) || defined(XP_OS2)
--- a/content/xul/document/src/nsXULContentSink.cpp
+++ b/content/xul/document/src/nsXULContentSink.cpp
@@ -25,17 +25,17 @@
 #include "nsHTMLStyleSheet.h"
 #include "nsINameSpaceManager.h"
 #include "nsINodeInfo.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptRuntime.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIServiceManager.h"
 #include "nsIURL.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIXULDocument.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsLayoutCID.h"
 #include "nsNetUtil.h"
 #include "nsRDFCID.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsXULElement.h"
--- a/content/xul/document/src/nsXULDocument.cpp
+++ b/content/xul/document/src/nsXULDocument.cpp
@@ -25,17 +25,17 @@
 
 // Note the ALPHABETICAL ORDERING
 #include "nsXULDocument.h"
 
 #include "nsError.h"
 #include "nsIBoxObject.h"
 #include "nsIChromeRegistry.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIContentViewer.h"
 #include "nsGUIEvent.h"
 #include "nsIDOMXULElement.h"
 #include "nsIRDFNode.h"
 #include "nsIRDFRemoteDataSource.h"
 #include "nsIRDFService.h"
 #include "nsIStreamListener.h"
 #include "nsITimer.h"
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -61,17 +61,17 @@
 #include "nsISeekableStream.h"
 #include "nsAutoPtr.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsIAppShell.h"
 #include "nsWidgetsCID.h"
 #include "nsDOMJSUtils.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIScriptChannel.h"
 #include "nsIOfflineCacheUpdate.h"
 #include "nsITimedChannel.h"
 #include "nsIPrivacyTransitionObserver.h"
 #include "nsCPrefetchService.h"
 #include "nsJSON.h"
 #include "IHistory.h"
 #include "mozilla/Services.h"
@@ -3244,17 +3244,17 @@ PrintDocTree(nsIDocShellTreeItem * aPare
   nsCOMPtr<nsIPresShell> presShell = parentAsDocShell->GetPresShell();
   nsRefPtr<nsPresContext> presContext;
   parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
   nsIDocument *doc = presShell->GetDocument();
 
   nsCOMPtr<nsIDOMWindow> domwin(doc->GetWindow());
 
   nsCOMPtr<nsIWidget> widget;
-  nsIViewManager* vm = presShell->GetViewManager();
+  nsViewManager* vm = presShell->GetViewManager();
   if (vm) {
     vm->GetWidget(getter_AddRefs(widget));
   }
   dom::Element* rootElement = doc->GetRootElement();
 
   printf("DS %p  Ty %s  Doc %p DW %p EM %p CN %p\n",  
     (void*)parentAsDocShell.get(), 
     type==nsIDocShellTreeItem::typeChrome?"Chr":"Con", 
@@ -5043,17 +5043,17 @@ nsDocShell::DoGetPositionAndSize(int32_t
 }
 
 NS_IMETHODIMP
 nsDocShell::Repaint(bool aForce)
 {
     nsCOMPtr<nsIPresShell> presShell =GetPresShell();
     NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
 
-    nsIViewManager* viewManager = presShell->GetViewManager();
+    nsViewManager* viewManager = presShell->GetViewManager();
     NS_ENSURE_TRUE(viewManager, NS_ERROR_FAILURE);
 
     NS_ENSURE_SUCCESS(viewManager->InvalidateAllViews(), NS_ERROR_FAILURE);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetParentWidget(nsIWidget ** parentWidget)
@@ -5110,17 +5110,17 @@ nsDocShell::GetVisibility(bool * aVisibi
     if (!mContentViewer)
         return NS_OK;
 
     nsCOMPtr<nsIPresShell> presShell = GetPresShell();
     if (!presShell)
         return NS_OK;
 
     // get the view manager
-    nsIViewManager* vm = presShell->GetViewManager();
+    nsViewManager* vm = presShell->GetViewManager();
     NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
 
     // get the root view
     nsView *view = vm->GetRootView(); // views are not ref counted
     NS_ENSURE_TRUE(view, NS_ERROR_FAILURE);
 
     // if our root view is hidden, we are not visible
     if (view->GetVisibility() == nsViewVisibility_kHide)
@@ -7383,17 +7383,17 @@ nsDocShell::RestoreFromHistory()
     // new content viewer's root view at the same position.  Also save the
     // bounds of the root view's widget.
 
     nsView *rootViewSibling = nullptr, *rootViewParent = nullptr;
     nsIntRect newBounds(0, 0, 0, 0);
 
     nsCOMPtr<nsIPresShell> oldPresShell = GetPresShell();
     if (oldPresShell) {
-        nsIViewManager *vm = oldPresShell->GetViewManager();
+        nsViewManager *vm = oldPresShell->GetViewManager();
         if (vm) {
             nsView *oldRootView = vm->GetRootView();
 
             if (oldRootView) {
                 rootViewSibling = oldRootView->GetNextSibling();
                 rootViewParent = oldRootView->GetParent();
 
                 mContentViewer->GetBounds(newBounds);
@@ -7604,33 +7604,33 @@ nsDocShell::RestoreFromHistory()
         childShell->SetAllowDNSPrefetch(allowDNSPrefetch);
 
         rv = childShell->BeginRestore(nullptr, false);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     nsCOMPtr<nsIPresShell> shell = GetPresShell();
 
-    nsIViewManager *newVM = shell ? shell->GetViewManager() : nullptr;
+    nsViewManager *newVM = shell ? shell->GetViewManager() : nullptr;
     nsView *newRootView = newVM ? newVM->GetRootView() : nullptr;
 
     // Insert the new root view at the correct location in the view tree.
     if (container) {
         nsSubDocumentFrame* subDocFrame = do_QueryFrame(container->GetPrimaryFrame());
         rootViewParent = subDocFrame ? subDocFrame->EnsureInnerView() : nullptr;
     }
     if (sibling &&
         sibling->GetShell() &&
         sibling->GetShell()->GetViewManager()) {
         rootViewSibling = sibling->GetShell()->GetViewManager()->GetRootView();
     } else {
         rootViewSibling = nullptr;
     }
     if (rootViewParent && newRootView && newRootView->GetParent() != rootViewParent) {
-        nsIViewManager *parentVM = rootViewParent->GetViewManager();
+        nsViewManager *parentVM = rootViewParent->GetViewManager();
         if (parentVM) {
             // InsertChild(parent, child, sib, true) inserts the child after
             // sib in content order, which is before sib in view order. BUT
             // when sib is null it inserts at the end of the the document
             // order, i.e., first in view order.  But when oldRootSibling is
             // null, the old root as at the end of the view list --- last in
             // content order --- and we want to call InsertChild(parent, child,
             // nullptr, false) in that case.
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -28,17 +28,17 @@
 
 #include "nsIFrame.h"
 #include "nsIWidget.h"
 #include "nsGUIEvent.h"
 #include "nsCharsetSource.h"
 #include "nsJSEnvironment.h"
 #include "nsJSUtils.h"
 
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 
 #include "nsIDOMHTMLCanvasElement.h"
 #include "gfxContext.h"
 #include "gfxImageSurface.h"
 #include "nsLayoutUtils.h"
 #include "nsComputedDOMStyle.h"
 #include "nsIPresShell.h"
 #include "nsStyleAnimation.h"
@@ -656,17 +656,17 @@ nsDOMWindowUtils::SendMouseEventCommon(c
   event.refPoint = ToWidgetPoint(aX, aY, offset, presContext);
   event.ignoreRootScrollFrame = aIgnoreRootScrollFrame;
 
   nsEventStatus status;
   if (aToWindow) {
     nsCOMPtr<nsIPresShell> presShell = presContext->PresShell();
     if (!presShell)
       return NS_ERROR_FAILURE;
-    nsIViewManager* viewManager = presShell->GetViewManager();
+    nsViewManager* viewManager = presShell->GetViewManager();
     if (!viewManager)
       return NS_ERROR_FAILURE;
     nsView* view = viewManager->GetRootView();
     if (!view)
       return NS_ERROR_FAILURE;
 
     status = nsEventStatus_eIgnore;
     return presShell->HandleEvent(view->GetFrame(), &event, false, &status);
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -34,17 +34,17 @@
 #include "nsFrameTraversal.h"
 #include "nsObjectFrame.h"
 #include "nsEventDispatcher.h"
 #include "nsEventStateManager.h"
 #include "nsIMEStateManager.h"
 #include "nsIWebNavigation.h"
 #include "nsCaret.h"
 #include "nsIBaseWindow.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsFrameSelection.h"
 #include "mozilla/Selection.h"
 #include "nsXULPopupManager.h"
 #include "nsIDOMNodeFilter.h"
 #include "nsIScriptObjectPrincipal.h"
 #include "nsIPrincipal.h"
 #include "mozAutoDocUpdate.h"
 #include "nsFrameLoader.h"
@@ -1050,17 +1050,17 @@ nsFocusManager::EnsureCurrentWidgetFocus
     return;
 
   // get the main child widget for the focused window and ensure that the
   // platform knows that this widget is focused.
   nsCOMPtr<nsIDocShell> docShell = mFocusedWindow->GetDocShell();
   if (docShell) {
     nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
     if (presShell) {
-      nsIViewManager* vm = presShell->GetViewManager();
+      nsViewManager* vm = presShell->GetViewManager();
       if (vm) {
         nsCOMPtr<nsIWidget> widget;
         vm->GetRootWidget(getter_AddRefs(widget));
         if (widget)
           widget->SetFocus(false);
       }
     }
   }
@@ -1547,17 +1547,17 @@ nsFocusManager::Blur(nsPIDOMWindow* aWin
     // But don't do this if we are blurring due to the window being lowered,
     // otherwise, the parent window can get raised again.
     if (mActiveWindow) {
       nsIFrame* contentFrame = content->GetPrimaryFrame();
       nsIObjectFrame* objectFrame = do_QueryFrame(contentFrame);
       if (aAdjustWidgets && objectFrame && !sTestMode) {
         // note that the presshell's widget is being retrieved here, not the one
         // for the object frame.
-        nsIViewManager* vm = presShell->GetViewManager();
+        nsViewManager* vm = presShell->GetViewManager();
         if (vm) {
           nsCOMPtr<nsIWidget> widget;
           vm->GetRootWidget(getter_AddRefs(widget));
           if (widget)
             widget->SetFocus(false);
         }
       }
 
@@ -1721,17 +1721,17 @@ nsFocusManager::Focus(nsPIDOMWindow* aWi
   nsCOMPtr<nsIWidget> objectFrameWidget;
   if (aContent) {
     nsIFrame* contentFrame = aContent->GetPrimaryFrame();
     nsIObjectFrame* objectFrame = do_QueryFrame(contentFrame);
     if (objectFrame)
       objectFrameWidget = objectFrame->GetWidget();
   }
   if (aAdjustWidgets && !objectFrameWidget && !sTestMode) {
-    nsIViewManager* vm = presShell->GetViewManager();
+    nsViewManager* vm = presShell->GetViewManager();
     if (vm) {
       nsCOMPtr<nsIWidget> widget;
       vm->GetRootWidget(getter_AddRefs(widget));
       if (widget)
         widget->SetFocus(false);
     }
   }
 
@@ -1807,17 +1807,17 @@ nsFocusManager::Focus(nsPIDOMWindow* aWi
   }
   else {
     // If the window focus event (fired above when aIsNewDocument) caused
     // the plugin not to be focusable, update the system focus by focusing
     // the root widget.
     if (aAdjustWidgets && objectFrameWidget &&
         mFocusedWindow == aWindow && mFocusedContent == nullptr &&
         !sTestMode) {
-      nsIViewManager* vm = presShell->GetViewManager();
+      nsViewManager* vm = presShell->GetViewManager();
       if (vm) {
         nsCOMPtr<nsIWidget> widget;
         vm->GetRootWidget(getter_AddRefs(widget));
         if (widget)
           widget->SetFocus(false);
       }
     }
 
@@ -1969,17 +1969,17 @@ nsFocusManager::RaiseWindow(nsPIDOMWindo
   nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
   if (!docShell)
     return;
 
   nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
   if (!presShell)
     return;
 
-  nsIViewManager* vm = presShell->GetViewManager();
+  nsViewManager* vm = presShell->GetViewManager();
   if (vm) {
     nsCOMPtr<nsIWidget> widget;
     vm->GetRootWidget(getter_AddRefs(widget));
     if (widget)
       widget->SetFocus(true);
   }
 #else
   nsCOMPtr<nsIWebNavigation> webnav = do_GetInterface(aWindow);
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -113,17 +113,17 @@
 #include "nsIMarkupDocumentViewer.h"
 #include "nsIPresShell.h"
 #include "nsIProgrammingLanguage.h"
 #include "nsIServiceManager.h"
 #include "nsIScriptGlobalObjectOwner.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsISelectionController.h"
 #include "nsISelection.h"
 #include "nsIPrompt.h"
 #include "nsIPromptService.h"
 #include "nsIPromptFactory.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsIWebNavigation.h"
 #include "nsIWebBrowser.h"
@@ -11019,17 +11019,17 @@ nsGlobalChromeWindow::SetCursor(const ns
     mDocShell->GetPresContext(getter_AddRefs(presContext));
   }
 
   if (presContext) {
     // Need root widget.
     nsCOMPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
     NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
 
-    nsIViewManager* vm = presShell->GetViewManager();
+    nsViewManager* vm = presShell->GetViewManager();
     NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
 
     nsView* rootView = vm->GetRootView();
     NS_ENSURE_TRUE(rootView, NS_ERROR_FAILURE);
 
     nsIWidget* widget = rootView->GetNearestWidget(nullptr);
     NS_ENSURE_TRUE(widget, NS_ERROR_FAILURE);
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -36,17 +36,17 @@
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMHTMLFrameElement.h"
 #include "nsIDOMWindow.h"
 #include "nsIDialogCreator.h"
 #include "nsIPromptFactory.h"
 #include "nsIURI.h"
 #include "nsIMozBrowserFrame.h"
 #include "nsIScriptSecurityManager.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWidget.h"
 #include "nsIWindowWatcher.h"
 #include "nsNetUtil.h"
 #include "nsPIDOMWindow.h"
 #include "nsPrintfCString.h"
 #include "nsSerializationHelper.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
@@ -878,17 +878,17 @@ TabParent::RecvGetDPI(float* aValue)
 
 bool
 TabParent::RecvGetWidgetNativeData(WindowsHandle* aValue)
 {
   nsCOMPtr<nsIContent> content = do_QueryInterface(mFrameElement);
   if (content) {
     nsIPresShell* shell = content->OwnerDoc()->GetShell();
     if (shell) {
-      nsIViewManager* vm = shell->GetViewManager();
+      nsViewManager* vm = shell->GetViewManager();
       nsCOMPtr<nsIWidget> widget;
       vm->GetRootWidget(getter_AddRefs(widget));
       if (widget) {
         *aValue = reinterpret_cast<WindowsHandle>(
           widget->GetNativeData(NS_NATIVE_SHAREABLE_WINDOW));
         return true;
       }
     }
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -40,17 +40,17 @@ using mozilla::DefaultXDisplay;
 #include "nsIStringStream.h"
 #include "nsNetUtil.h"
 #include "mozilla/Preferences.h"
 #include "nsILinkHandler.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsLayoutUtils.h"
 #include "nsIPluginWidget.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIDOMHTMLObjectElement.h"
 #include "nsIAppShell.h"
 #include "nsIDOMHTMLAppletElement.h"
 #include "nsAttrName.h"
 #include "nsIFocusManager.h"
 #include "nsFocusManager.h"
 #include "nsIDOMDragEvent.h"
@@ -688,17 +688,17 @@ NS_IMETHODIMP nsPluginInstanceOwner::Get
 {
   if (!mObjectFrame) {
     NS_WARNING("plugin owner has no owner in getting doc's window handle");
     return NS_ERROR_FAILURE;
   }
   
 #if defined(XP_WIN) || defined(XP_OS2)
   void** pvalue = (void**)value;
-  nsIViewManager* vm = mObjectFrame->PresContext()->GetPresShell()->GetViewManager();
+  nsViewManager* vm = mObjectFrame->PresContext()->GetPresShell()->GetViewManager();
   if (!vm)
     return NS_ERROR_FAILURE;
 #if defined(XP_WIN)
   // This property is provided to allow a "windowless" plugin to determine the window it is drawing
   // in, so it can translate mouse coordinates it receives directly from the operating system
   // to coordinates relative to itself.
   
   // The original code (outside this #if) returns the document's window, which is OK if the window the "windowless" plugin
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -56,17 +56,17 @@
 #include "nsPIWindowWatcher.h"
 #include "nsIPrompt.h"
 #include "nsRect.h"
 #include "nsIWebBrowserChromeFocus.h"
 #include "nsIContent.h"
 #include "imgIContainer.h"
 #include "nsContextMenuInfo.h"
 #include "nsPresContext.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsView.h"
 #include "nsEventListenerManager.h"
 #include "nsIDOMDragEvent.h"
 #include "nsIConstraintValidation.h"
 #include "mozilla/Attributes.h"
 
 using namespace mozilla;
 
@@ -1438,17 +1438,17 @@ ChromeTooltipListener::sTooltipCallback(
       do_GetInterface(static_cast<nsIWebBrowser*>(self->mWebBrowser));
     nsCOMPtr<nsIPresShell> shell;
     if (docShell) {
       shell = docShell->GetPresShell();
     }
 
     nsIWidget* widget = nullptr;
     if (shell) {
-      nsIViewManager* vm = shell->GetViewManager();
+      nsViewManager* vm = shell->GetViewManager();
       if (vm) {
         nsView* view = vm->GetRootView();
         if (view) {
           nsPoint offset;
           widget = view->GetNearestWidget(&offset);
         }
       }
     }
--- a/extensions/widgetutils/src/nsWidgetUtils.cpp
+++ b/extensions/widgetutils/src/nsWidgetUtils.cpp
@@ -31,17 +31,17 @@
 #include "nsPIDOMWindow.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMCompositionListener.h"
 #include "nsIDOMTextListener.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIDOMWheelEvent.h"
 #include "nsView.h"
 #include "nsGUIEvent.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIContentPolicy.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIContent.h"
 #include "nsITimer.h"
 
 using namespace mozilla;
 
 const int MIN_INT =((int) (1 << (sizeof(int) * 8 - 1)));
@@ -84,17 +84,17 @@ private:
   nsresult UpdateFromEvent(nsIDOMEvent *aDOMEvent);
   nsresult MouseDown(nsIDOMEvent* aDOMEvent);
   nsresult MouseUp(nsIDOMEvent* aDOMEvent);
   nsresult MouseMove(nsIDOMEvent* aDOMEvent);
 
   static void StopPanningCallback(nsITimer *timer, void *closure);
 
   nsCOMPtr<nsIWidget> mWidget;
-  nsCOMPtr<nsIViewManager> mViewManager;
+  nsCOMPtr<nsViewManager> mViewManager;
   nsCOMPtr<nsITimer> mTimer;
 };
 
 nsWidgetUtils::nsWidgetUtils()
 {
   Init();
 }
 
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -31,17 +31,17 @@
 #include "nsTableColFrame.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLTableColElement.h"
 #include "nsIDOMHTMLTableCaptionElem.h"
 #include "nsHTMLParts.h"
 #include "nsIPresShell.h"
 #include "nsUnicharUtils.h"
 #include "nsStyleSet.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsEventStates.h"
 #include "nsStyleConsts.h"
 #include "nsTableOuterFrame.h"
 #include "nsIDOMXULElement.h"
 #include "nsContainerFrame.h"
 #include "nsINameSpaceManager.h"
 #include "nsIDOMHTMLSelectElement.h"
 #include "nsIDOMHTMLLegendElement.h"
@@ -12010,17 +12010,17 @@ nsCSSFrameConstructor::RebuildAllStyleDa
   mRebuildAllStyleData = false;
   NS_UpdateHint(aExtraHint, mRebuildAllExtraHint);
   mRebuildAllExtraHint = nsChangeHint(0);
 
   if (!mPresShell || !mPresShell->GetRootFrame())
     return;
 
   // Make sure that the viewmanager will outlive the presshell
-  nsCOMPtr<nsIViewManager> vm = mPresShell->GetViewManager();
+  nsCOMPtr<nsViewManager> vm = mPresShell->GetViewManager();
 
   // Processing the style changes could cause a flush that propagates to
   // the parent frame and thus destroys the pres shell.
   nsCOMPtr<nsIPresShell> kungFuDeathGrip(mPresShell);
 
   // We may reconstruct frames below and hence process anything that is in the
   // tree. We don't want to get notified to process those items again after.
   mPresShell->GetDocument()->FlushPendingNotifications(Flush_ContentAndNotify);
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/HashFunctions.h"
 #include "mozilla/Types.h"
 
 #include "nsStyleConsts.h"
 #include "nsPresContext.h"
 #include "nsIFrame.h"
 #include "nsPoint.h"
 #include "nsRect.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIPresShell.h"
 #include "nsFrameManager.h"
 #include "nsStyleContext.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsTransform2D.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -2,17 +2,17 @@
 // vim:cindent:ts=2:et:sw=2:
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsStyleConsts.h"
 #include "nsPoint.h"
 #include "nsRect.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsFrameManager.h"
 #include "nsStyleContext.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsTransform2D.h"
 #include "nsIContent.h"
 #include "nsIScrollableFrame.h"
 #include "imgIRequest.h"
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -41,17 +41,17 @@
 #include "nsBoxFrame.h"
 #include "nsViewportFrame.h"
 #include "nsSVGEffects.h"
 #include "nsSVGElement.h"
 #include "nsSVGClipPathFrame.h"
 #include "sampler.h"
 #include "nsAnimationManager.h"
 #include "nsTransitionManager.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "ImageLayers.h"
 #include "ImageContainer.h"
 #include "nsCanvasFrame.h"
 
 #include "mozilla/StandardInteger.h"
 
 using namespace mozilla;
 using namespace mozilla::css;
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -37,17 +37,17 @@
 #include "nsContentCID.h"
 #include "nsLayoutCID.h"
 #include "nsContentUtils.h"
 #include "nsLayoutStylesheetCache.h"
 #include "mozilla/Preferences.h"
 
 #include "nsViewsCID.h"
 #include "nsIDeviceContextSpec.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsView.h"
 
 #include "nsIPageSequenceFrame.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsIContentViewerEdit.h"
 #include "nsIContentViewerFile.h"
 #include "mozilla/css/Loader.h"
@@ -374,17 +374,17 @@ private:
   // are sharing/recycling a single base widget and not creating multiple
   // child widgets.
   bool ShouldAttachToTopLevel();
 
 protected:
   // These return the current shell/prescontext etc.
   nsIPresShell* GetPresShell();
   nsPresContext* GetPresContext();
-  nsIViewManager* GetViewManager();
+  nsViewManager* GetViewManager();
 
   void DetachFromTopLevelWidget();
 
   // IMPORTANT: The ownership implicit in the following member
   // variables has been explicitly checked and set using nsCOMPtr
   // for owning pointers and raw COM interface pointers for weak
   // (ie, non owning) references. If you add any members to this
   // class, please make the ownership explicit (pinkerton, scc).
@@ -392,17 +392,17 @@ protected:
   nsWeakPtr mContainer; // it owns me!
   nsWeakPtr mTopContainerWhilePrinting;
   nsRefPtr<nsDeviceContext> mDeviceContext;  // We create and own this baby
 
   // the following six items are explicitly in this order
   // so they will be destroyed in the reverse order (pinkerton, scc)
   nsCOMPtr<nsIDocument>    mDocument;
   nsCOMPtr<nsIWidget>      mWindow;      // may be null
-  nsCOMPtr<nsIViewManager> mViewManager;
+  nsCOMPtr<nsViewManager> mViewManager;
   nsRefPtr<nsPresContext>  mPresContext;
   nsCOMPtr<nsIPresShell>   mPresShell;
 
   nsCOMPtr<nsISelectionListener> mSelectionListener;
   nsRefPtr<nsDocViewerFocusListener> mFocusListener;
 
   nsCOMPtr<nsIContentViewer> mPreviousViewer;
   nsCOMPtr<nsISHEntry> mSHEntry;
@@ -1394,17 +1394,17 @@ nsDocumentViewer::Open(nsISupports *aSta
   // page B, we detach. So page A's view has no widget. If we then go
   // back to it, and it is in the bfcache, we will use that view, which
   // doesn't have a widget. The attach call here will properly attach us.
   if (nsIWidget::UsePuppetWidgets() && mPresContext &&
       ShouldAttachToTopLevel()) {
     // If the old view is already attached to our parent, detach
     DetachFromTopLevelWidget();
 
-    nsIViewManager *vm = GetViewManager();
+    nsViewManager *vm = GetViewManager();
     NS_ABORT_IF_FALSE(vm, "no view manager");
     nsView* v = vm->GetRootView();
     NS_ABORT_IF_FALSE(v, "no root view");
     NS_ABORT_IF_FALSE(mParentWidget, "no mParentWidget to set");
     v->AttachToTopLevelWidget(mParentWidget);
 
     mAttachedToParent = true;
   }
@@ -1541,30 +1541,30 @@ nsDocumentViewer::Destroy()
     // Make sure the presentation isn't torn down by Hide().
     mSHEntry->SetSticky(mIsSticky);
     mIsSticky = true;
 
     bool savePresentation = mDocument ? mDocument->IsBFCachingAllowed() : true;
 
     // Remove our root view from the view hierarchy.
     if (mPresShell) {
-      nsIViewManager *vm = mPresShell->GetViewManager();
+      nsViewManager *vm = mPresShell->GetViewManager();
       if (vm) {
         nsView *rootView = vm->GetRootView();
 
         if (rootView) {
           // The invalidate that removing this view causes is dropped because
           // the Freeze call above sets painting to be suppressed for our
           // document. So we do it ourselves and make it happen.
           vm->InvalidateViewNoSuppression(rootView,
             rootView->GetBounds() - rootView->GetPosition());
 
           nsView *rootViewParent = rootView->GetParent();
           if (rootViewParent) {
-            nsIViewManager *parentVM = rootViewParent->GetViewManager();
+            nsViewManager *parentVM = rootViewParent->GetViewManager();
             if (parentVM) {
               parentVM->RemoveChild(rootView);
             }
           }
         }
       }
     }
 
@@ -1801,17 +1801,17 @@ nsDocumentViewer::GetPresShell()
 }
 
 nsPresContext*
 nsDocumentViewer::GetPresContext()
 {
   return mPresContext;
 }
 
-nsIViewManager*
+nsViewManager*
 nsDocumentViewer::GetViewManager()
 {
   return mViewManager;
 }
 
 NS_IMETHODIMP
 nsDocumentViewer::GetPresShell(nsIPresShell** aResult)
 {
@@ -4383,17 +4383,17 @@ nsDocumentViewer::IsInitializedForPrintP
 
 void
 nsDocumentViewer::InitializeForPrintPreview()
 {
   mInitializedForPrintPreview = true;
 }
 
 void
-nsDocumentViewer::SetPrintPreviewPresentation(nsIViewManager* aViewManager,
+nsDocumentViewer::SetPrintPreviewPresentation(nsViewManager* aViewManager,
                                                 nsPresContext* aPresContext,
                                                 nsIPresShell* aPresShell)
 {
   if (mPresShell) {
     DestroyPresShell();
   }
 
   mWindow = nullptr;
--- a/layout/base/nsIDocumentViewerPrint.h
+++ b/layout/base/nsIDocumentViewerPrint.h
@@ -7,17 +7,17 @@
 
 #include "nsISupports.h"
 
 class nsIDocument;
 class nsStyleSet;
 class nsIPresShell;
 class nsPresContext;
 class nsIWidget;
-class nsIViewManager;
+class nsViewManager;
 
 // {c6f255cf-cadd-4382-b57f-cd2a9874169b}
 #define NS_IDOCUMENT_VIEWER_PRINT_IID \
 { 0xc6f255cf, 0xcadd, 0x4382, \
   { 0xb5, 0x7f, 0xcd, 0x2a, 0x98, 0x74, 0x16, 0x9b } }
 
 /**
  * A DocumentViewerPrint is an INTERNAL Interface used for interaction
@@ -53,17 +53,17 @@ public:
   /**
    * Marks this viewer to be used for print preview.
    */
   virtual void InitializeForPrintPreview() = 0;
 
   /**
    * Replaces the current presentation with print preview presentation.
    */
-  virtual void SetPrintPreviewPresentation(nsIViewManager* aViewManager,
+  virtual void SetPrintPreviewPresentation(nsViewManager* aViewManager,
                                            nsPresContext* aPresContext,
                                            nsIPresShell* aPresShell) = 0;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewerPrint,
                               NS_IDOCUMENT_VIEWER_PRINT_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
@@ -73,13 +73,13 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumen
   virtual void     SetIsPrintPreview(bool aIsPrintPreview); \
   virtual bool     GetIsPrintPreview(); \
   virtual nsresult CreateStyleSet(nsIDocument* aDocument, nsStyleSet** aStyleSet); \
   virtual void     IncrementDestroyRefCount(); \
   virtual void     ReturnToGalleyPresentation(); \
   virtual void     OnDonePrinting(); \
   virtual bool     IsInitializedForPrintPreview(); \
   virtual void     InitializeForPrintPreview(); \
-  virtual void     SetPrintPreviewPresentation(nsIViewManager* aViewManager, \
+  virtual void     SetPrintPreviewPresentation(nsViewManager* aViewManager, \
                                                nsPresContext* aPresContext, \
                                                nsIPresShell* aPresShell);
 
 #endif /* nsIDocumentViewerPrint_h___ */
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -39,17 +39,17 @@
 #include "nsEventStates.h"
 #include "nsPresArena.h"
 
 class nsIContent;
 class nsIDocument;
 class nsIFrame;
 class nsPresContext;
 class nsStyleSet;
-class nsIViewManager;
+class nsViewManager;
 class nsView;
 class nsRenderingContext;
 class nsIPageSequenceFrame;
 class nsAString;
 class nsCaret;
 class nsFrameSelection;
 class nsFrameManager;
 class nsILayoutHistoryState;
@@ -171,17 +171,17 @@ protected:
   enum eRenderFlag {
     STATE_IGNORING_VIEWPORT_SCROLLING = 0x1
   };
   typedef uint8_t RenderFlags; // for storing the above flags
 
 public:
   virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
                                    nsPresContext* aPresContext,
-                                   nsIViewManager* aViewManager,
+                                   nsViewManager* aViewManager,
                                    nsStyleSet* aStyleSet,
                                    nsCompatibility aCompatMode) = 0;
 
   /**
    * All callers are responsible for calling |Destroy| after calling
    * |EndObservingDocument|.  It needs to be separate only because form
    * controls incorrectly store their data in the frames rather than the
    * content model and printing calls |EndObservingDocument| multiple
@@ -267,17 +267,17 @@ public:
     if (PRESARENA_MUST_FREE_DURING_DESTROY || !mIsDestroying)
       mFrameArena.FreeBySize(aSize, aPtr);
   }
 
   nsIDocument* GetDocument() const { return mDocument; }
 
   nsPresContext* GetPresContext() const { return mPresContext; }
 
-  nsIViewManager* GetViewManager() const { return mViewManager; }
+  nsViewManager* GetViewManager() const { return mViewManager; }
 
 #ifdef ACCESSIBILITY
   /**
    * Return the document accessible for this pres shell if there is one.
    */
   mozilla::a11y::DocAccessible* GetDocAccessible() const
   {
     return mDocAccessible;
@@ -1376,17 +1376,17 @@ protected:
   // please make the ownership explicit (pinkerton, scc).
 
   // These are the same Document and PresContext owned by the DocViewer.
   // we must share ownership.
   nsIDocument*              mDocument;      // [STRONG]
   nsPresContext*            mPresContext;   // [STRONG]
   nsStyleSet*               mStyleSet;      // [OWNS]
   nsCSSFrameConstructor*    mFrameConstructor; // [OWNS]
-  nsIViewManager*           mViewManager;   // [WEAK] docViewer owns it so I don't have to
+  nsViewManager*           mViewManager;   // [WEAK] docViewer owns it so I don't have to
   nsPresArena               mFrameArena;
   nsFrameSelection*         mSelection;
   // Pointer into mFrameConstructor - this is purely so that FrameManager() and
   // GetRootFrame() can be inlined:
   nsFrameManagerBase*       mFrameManager;
   nsWeakPtr                 mForwardingContainer;
   nsRefreshDriver*          mHiddenInvalidationObserverRefreshDriver;
 #ifdef ACCESSIBILITY
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -38,17 +38,17 @@
 #include "nsIWeakReferenceUtils.h"
 #include "nsCSSRendering.h"
 #include "prprf.h"
 #include "nsAutoPtr.h"
 #include "nsEventStateManager.h"
 #include "nsThreadUtils.h"
 #include "nsFrameManager.h"
 #include "nsLayoutUtils.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsCSSRuleProcessor.h"
 #include "nsStyleChangeList.h"
 #include "nsRuleNode.h"
 #include "nsEventDispatcher.h"
 #include "gfxUserFontSet.h"
 #include "gfxPlatform.h"
 #include "nsCSSRules.h"
@@ -821,17 +821,17 @@ nsPresContext::PreferenceChanged(const c
   nsDependentCString prefName(aPrefName);
   if (prefName.EqualsLiteral("layout.css.dpi") ||
       prefName.EqualsLiteral("layout.css.devPixelsPerPx")) {
     int32_t oldAppUnitsPerDevPixel = AppUnitsPerDevPixel();
     if (mDeviceContext->CheckDPIChange() && mShell) {
       // Re-fetch the view manager's window dimensions in case there's a deferred
       // resize which hasn't affected our mVisibleArea yet
       nscoord oldWidthAppUnits, oldHeightAppUnits;
-      nsIViewManager* vm = mShell->GetViewManager();
+      nsViewManager* vm = mShell->GetViewManager();
       vm->GetWindowDimensions(&oldWidthAppUnits, &oldHeightAppUnits);
       float oldWidthDevPixels = oldWidthAppUnits/oldAppUnitsPerDevPixel;
       float oldHeightDevPixels = oldHeightAppUnits/oldAppUnitsPerDevPixel;
 
       nscoord width = NSToCoordRound(oldWidthDevPixels*AppUnitsPerDevPixel());
       nscoord height = NSToCoordRound(oldHeightDevPixels*AppUnitsPerDevPixel());
       vm->SetWindowDimensions(width, height);
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -783,17 +783,17 @@ PresShell::~PresShell()
 
 /**
  * Initialize the presentation shell. Create view manager and style
  * manager.
  */
 nsresult
 PresShell::Init(nsIDocument* aDocument,
                 nsPresContext* aPresContext,
-                nsIViewManager* aViewManager,
+                nsViewManager* aViewManager,
                 nsStyleSet* aStyleSet,
                 nsCompatibility aCompatMode)
 {
   NS_PRECONDITION(nullptr != aDocument, "null ptr");
   NS_PRECONDITION(nullptr != aPresContext, "null ptr");
   NS_PRECONDITION(nullptr != aViewManager, "null ptr");
   nsresult result;
 
@@ -1852,17 +1852,17 @@ PresShell::ResizeReflowIgnoreOverride(ns
   nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
 
   if (!rootFrame && aHeight == NS_UNCONSTRAINEDSIZE) {
     // We can't do the work needed for SizeToContent without a root
     // frame, and we want to return before setting the visible area.
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  nsCOMPtr<nsIViewManager> viewManagerDeathGrip = mViewManager;
+  nsCOMPtr<nsViewManager> viewManagerDeathGrip = mViewManager;
   // Take this ref after viewManager so it'll make sure to go away first
   nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
 
   if (!mIsDestroying && !mResizeEvent.IsPending() &&
       !mAsyncResizeTimerIsActive) {
     FireBeforeResizeEvent();
   }
 
@@ -1892,17 +1892,17 @@ PresShell::ResizeReflowIgnoreOverride(ns
       // the way don't have region accumulation issues?
 
       {
         nsAutoCauseReflowNotifier crNotifier(this);
         WillDoReflow();
 
         // Kick off a top-down reflow
         AUTO_LAYOUT_PHASE_ENTRY_POINT(GetPresContext(), Reflow);
-        nsIViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
+        nsViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
 
         mDirtyRoots.RemoveElement(rootFrame);
         DoReflow(rootFrame, true);
       }
 
       DidDoReflow(true);
     }
   }
@@ -3730,17 +3730,17 @@ bool
 PresShell::IsSafeToFlush() const
 {
   // Not safe if we are reflowing or in the middle of frame construction
   bool isSafeToFlush = !mIsReflowing &&
                          !mChangeNestCount;
 
   if (isSafeToFlush) {
     // Not safe if we are painting
-    nsIViewManager* viewManager = GetViewManager();
+    nsViewManager* viewManager = GetViewManager();
     if (viewManager) {
       bool isPainting = false;
       viewManager->IsPainting(isPainting);
       if (isPainting) {
         isSafeToFlush = false;
       }
     }
   }
@@ -3803,17 +3803,17 @@ PresShell::FlushPendingNotifications(moz
   bool hasHadScriptObject;
   if (mDocument->GetScriptHandlingObject(hasHadScriptObject) ||
       hasHadScriptObject) {
     isSafeToFlush = isSafeToFlush && nsContentUtils::IsSafeToRunScript();
   }
 
   NS_ASSERTION(!isSafeToFlush || mViewManager, "Must have view manager");
   // Make sure the view manager stays alive.
-  nsCOMPtr<nsIViewManager> viewManagerDeathGrip = mViewManager;
+  nsCOMPtr<nsViewManager> viewManagerDeathGrip = mViewManager;
   if (isSafeToFlush && mViewManager) {
     // Processing pending notifications can kill us, and some callers only
     // hold weak refs when calling FlushPendingNotifications().  :(
     nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
 
     if (mResizeEvent.IsPending()) {
       FireResizeEvent();
       if (mIsDestroying) {
@@ -5181,17 +5181,17 @@ PresShell::ProcessSynthMouseMoveEvent(bo
   int32_t viewAPD;
 
   // refPoint will be mMouseLocation relative to the widget of |view|, the
   // widget we will put in the event we dispatch, in viewAPD appunits
   nsPoint refpoint(0, 0);
 
   // We always dispatch the event to the pres shell that contains the view that
   // the mouse is over. pointVM is the VM of that pres shell.
-  nsIViewManager *pointVM = nullptr;
+  nsViewManager *pointVM = nullptr;
 
   // This could be a bit slow (traverses entire view hierarchy)
   // but it's OK to do it once per synthetic mouse event
   view = FindFloatingViewContaining(rootView, mMouseLocation);
   if (!view) {
     view = rootView;
     nsView *pointView = FindViewContaining(rootView, mMouseLocation);
     // pointView can be null in situations related to mouse capture
@@ -7647,17 +7647,17 @@ PresShell::ProcessReflowCommands(bool aI
         ? PR_IntervalNow() + PR_MicrosecondsToInterval(gMaxRCProcessingTime)
         : (PRIntervalTime)0;
 
     // Scope for the reflow entry point
     {
       nsAutoScriptBlocker scriptBlocker;
       WillDoReflow();
       AUTO_LAYOUT_PHASE_ENTRY_POINT(GetPresContext(), Reflow);
-      nsIViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
+      nsViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
 
       do {
         // Send an incremental reflow notification to the target frame.
         int32_t idx = mDirtyRoots.Length() - 1;
         nsIFrame *target = mDirtyRoots[idx];
         mDirtyRoots.RemoveElementAt(idx);
 
         if (!NS_SUBTREE_DIRTY(target)) {
@@ -8265,17 +8265,17 @@ PresShell::VerifyIncrementalReflow()
   NS_ENSURE_SUCCESS(rv, false);
 
   // Get our scrolling preference
   nsView* rootView = mViewManager->GetRootView();
   NS_ENSURE_TRUE(rootView->HasWidget(), false);
   nsIWidget* parentWidget = rootView->GetWidget();
 
   // Create a new view manager.
-  nsCOMPtr<nsIViewManager> vm = do_CreateInstance(kViewManagerCID);
+  nsCOMPtr<nsViewManager> vm = do_CreateInstance(kViewManagerCID);
   NS_ENSURE_TRUE(vm, false);
   rv = vm->Init(dc);
   NS_ENSURE_SUCCESS(rv, false);
 
   // Create a child window of the parent that is our "root view/window"
   // Create a view
   nsRect tbounds = mPresContext->GetVisibleArea();
   nsView* view = vm->CreateView(tbounds, nullptr);
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -65,17 +65,17 @@ public:
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
 
   // nsISupports
   NS_DECL_ISUPPORTS
 
   // nsIPresShell
   virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
                                    nsPresContext* aPresContext,
-                                   nsIViewManager* aViewManager,
+                                   nsViewManager* aViewManager,
                                    nsStyleSet* aStyleSet,
                                    nsCompatibility aCompatMode);
   virtual NS_HIDDEN_(void) Destroy();
 
   virtual NS_HIDDEN_(nsresult) SetPreferenceStyleRules(bool aForceReflow);
 
   NS_IMETHOD GetSelection(SelectionType aType, nsISelection** aSelection);
   virtual nsISelection* GetCurrentSelection(SelectionType aType);
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -34,17 +34,17 @@
 #include "nsAutoPtr.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsIDocument.h"
 #include "nsGUIEvent.h"
 #include "nsEventDispatcher.h"
 #include "jsapi.h"
 #include "nsContentUtils.h"
 #include "mozilla/Preferences.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "sampler.h"
 #include "nsNPAPIPluginInstance.h"
 
 using mozilla::TimeStamp;
 using mozilla::TimeDuration;
 
 using namespace mozilla;
 
@@ -946,17 +946,17 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
     // Waiting for bug 785597 to work on android.
     nsRefPtr<layers::LayerManager> mgr = mPresContext->GetPresShell()->GetLayerManager();
     if (mgr) {
       mgr->SetPaintStartTime(mMostRecentRefresh);
     }
 #endif
 
     mViewManagerFlushIsPending = false;
-    nsCOMPtr<nsIViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
+    nsCOMPtr<nsViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
     vm->ProcessPendingUpdates();
 #ifdef DEBUG_INVALIDATIONS
     printf("Ending ProcessPendingUpdates\n");
 #endif
   }
 }
 
 PLDHashOperator
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -19,17 +19,17 @@
 #include "nsIListControlFrame.h"
 #include "nsIDOMHTMLCollection.h"
 #include "nsIDOMHTMLSelectElement.h"
 #include "nsIDOMHTMLOptionElement.h"
 #include "nsPIDOMWindow.h"
 #include "nsIPresShell.h"
 #include "nsContentList.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsEventDispatcher.h"
 #include "nsEventListenerManager.h"
 #include "nsIDOMNode.h"
 #include "nsISelectControlFrame.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIComponentManager.h"
 #include "nsContentUtils.h"
@@ -351,17 +351,17 @@ nsComboboxControlFrame::SetFocus(bool aO
   // Bug 32920
   InvalidateFrame();
 }
 
 void
 nsComboboxControlFrame::ShowPopup(bool aShowPopup)
 {
   nsView* view = mDropdownFrame->GetView();
-  nsIViewManager* viewManager = view->GetViewManager();
+  nsViewManager* viewManager = view->GetViewManager();
 
   if (aShowPopup) {
     nsRect rect = mDropdownFrame->GetRect();
     rect.x = rect.y = 0;
     viewManager->ResizeView(view, rect);
     viewManager->SetViewVisibility(view, nsViewVisibility_kShow);
   } else {
     viewManager->SetViewVisibility(view, nsViewVisibility_kHide);
@@ -505,17 +505,17 @@ nsComboboxControlFrame::ReflowDropdown(n
     aReflowState.mComputedBorderPadding.LeftRight() -
     kidReflowState.mComputedBorderPadding.LeftRight();
   kidReflowState.SetComputedWidth(NS_MAX(kidReflowState.ComputedWidth(),
                                          forcedWidth));
 
   // ensure we start off hidden
   if (GetStateBits() & NS_FRAME_FIRST_REFLOW) {
     nsView* view = mDropdownFrame->GetView();
-    nsIViewManager* viewManager = view->GetViewManager();
+    nsViewManager* viewManager = view->GetViewManager();
     viewManager->SetViewVisibility(view, nsViewVisibility_kHide);
     nsRect emptyRect(0, 0, 0, 0);
     viewManager->ResizeView(view, emptyRect);
   }
 
   // Allow the child to move/size/change-visibility its view if it's currently
   // dropped down
   int32_t flags = NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_VISIBILITY | NS_FRAME_NO_SIZE_VIEW;
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -12,17 +12,17 @@
 #include "nsGkAtoms.h"
 #include "nsIFormControl.h"
 #include "nsIDocument.h"
 #include "nsIDOMHTMLCollection.h"
 #include "nsIDOMHTMLOptionsCollection.h"
 #include "nsIDOMHTMLSelectElement.h"
 #include "nsIDOMHTMLOptionElement.h"
 #include "nsComboboxControlFrame.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDOMHTMLOptGroupElement.h"
 #include "nsWidgetsCID.h"
 #include "nsIPresShell.h"
 #include "nsHTMLParts.h"
 #include "nsIDOMEventTarget.h"
 #include "nsEventDispatcher.h"
 #include "nsEventStateManager.h"
 #include "nsEventListenerManager.h"
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -34,17 +34,17 @@
 #include "nsIContent.h"
 #include "nsIAtom.h"
 #include "nsPresContext.h"
 #include "nsRenderingContext.h"
 #include "nsGkAtoms.h"
 #include "nsLayoutUtils.h"
 #include "nsIComponentManager.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIPresShell.h"
 
 #include "nsBoxLayoutState.h"
 //for keylistener for "return" check
 #include "nsIDOMEventTarget.h"
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -17,17 +17,17 @@
 #include "nsGUIEvent.h"
 #include "nsStyleConsts.h"
 #include "nsView.h"
 #include "nsFrameManager.h"
 #include "nsIPresShell.h"
 #include "nsCOMPtr.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIWidget.h"
 #include "nsGfxCIID.h"
 #include "nsIServiceManager.h"
 #include "nsCSSRendering.h"
 #include "nsTransform2D.h"
 #include "nsRegion.h"
 #include "nsError.h"
 #include "nsDisplayList.h"
@@ -368,17 +368,17 @@ nsContainerFrame::PeekOffsetCharacter(bo
   return false;
 }
 
 /////////////////////////////////////////////////////////////////////////////
 // Helper member functions
 
 static nsresult
 ReparentFrameViewTo(nsIFrame*       aFrame,
-                    nsIViewManager* aViewManager,
+                    nsViewManager* aViewManager,
                     nsView*        aNewParentView,
                     nsView*        aOldParentView)
 {
 
   // XXX What to do about placeholder views for "position: fixed" elements?
   // They should be reparented too.
 
   // Does aFrame have a view?
@@ -427,17 +427,17 @@ nsContainerFrame::CreateViewForFrame(nsI
   if (!aForce && !aFrame->NeedsView()) {
     // don't need a view
     return NS_OK;
   }
 
   nsView* parentView = aFrame->GetParent()->GetClosestView();
   NS_ASSERTION(parentView, "no parent with view");
 
-  nsIViewManager* viewManager = parentView->GetViewManager();
+  nsViewManager* viewManager = parentView->GetViewManager();
   NS_ASSERTION(viewManager, "null view manager");
 
   // Create a view
   nsView* view = viewManager->CreateView(aFrame->GetRect(), parentView);
   if (!view)
     return NS_ERROR_OUT_OF_MEMORY;
 
   SyncFrameViewProperties(aFrame->PresContext(), aFrame, nullptr, view);
@@ -475,17 +475,17 @@ nsContainerFrame::CreateViewForFrame(nsI
 void
 nsContainerFrame::PositionFrameView(nsIFrame* aKidFrame)
 {
   nsIFrame* parentFrame = aKidFrame->GetParent();
   if (!aKidFrame->HasView() || !parentFrame)
     return;
 
   nsView* view = aKidFrame->GetView();
-  nsIViewManager* vm = view->GetViewManager();
+  nsViewManager* vm = view->GetViewManager();
   nsPoint pt;
   nsView* ancestorView = parentFrame->GetClosestView(&pt);
 
   if (ancestorView != view->GetParent()) {
     NS_ASSERTION(ancestorView == view->GetParent()->GetParent(),
                  "Allowed only one anonymous view between frames");
     // parentFrame is responsible for positioning aKidFrame's view
     // explicitly
@@ -602,17 +602,17 @@ nsContainerFrame::ReparentFrameViewList(
   // found a common ancestor.
   nsView* oldParentView = aOldParentFrame->GetClosestView();
   nsView* newParentView = aNewParentFrame->GetClosestView();
   
   // See if the old parent frame and the new parent frame are in the
   // same view sub-hierarchy. If they are then we don't have to do
   // anything
   if (oldParentView != newParentView) {
-    nsIViewManager* viewManager = oldParentView->GetViewManager();
+    nsViewManager* viewManager = oldParentView->GetViewManager();
 
     // They're not so we need to reparent any child views
     for (nsFrameList::Enumerator e(aChildFrameList); !e.AtEnd(); e.Next()) {
       ReparentFrameViewTo(e.get(), viewManager, newParentView, oldParentView);
     }
   }
 
   return NS_OK;
@@ -651,17 +651,17 @@ nsContainerFrame::SyncWindowProperties(n
 #ifdef MOZ_XUL
   if (!aView || !nsCSSRendering::IsCanvasFrame(aFrame) || !aView->HasWidget())
     return;
 
   nsIWidget* windowWidget = GetPresContextContainerWidget(aPresContext);
   if (!windowWidget || !IsTopLevelWidget(windowWidget))
     return;
 
-  nsIViewManager* vm = aView->GetViewManager();
+  nsViewManager* vm = aView->GetViewManager();
   nsView* rootView = vm->GetRootView();
 
   if (aView != rootView)
     return;
 
   Element* rootElement = aPresContext->Document()->GetRootElement();
   if (!rootElement || !rootElement->IsXUL()) {
     // Scrollframes use native widgets which don't work well with
@@ -743,17 +743,17 @@ nsContainerFrame::SyncFrameViewAfterRefl
   }
 
   // Make sure the view is sized and positioned correctly
   if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
     PositionFrameView(aFrame);
   }
 
   if (0 == (aFlags & NS_FRAME_NO_SIZE_VIEW)) {
-    nsIViewManager* vm = aView->GetViewManager();
+    nsViewManager* vm = aView->GetViewManager();
 
     vm->ResizeView(aView, aVisualOverflowArea, true);
   }
 }
 
 void
 nsContainerFrame::SyncFrameViewProperties(nsPresContext*  aPresContext,
                                           nsIFrame*        aFrame,
@@ -763,17 +763,17 @@ nsContainerFrame::SyncFrameViewPropertie
 {
   NS_ASSERTION(!aStyleContext || aFrame->GetStyleContext() == aStyleContext,
                "Wrong style context for frame?");
 
   if (!aView) {
     return;
   }
 
-  nsIViewManager* vm = aView->GetViewManager();
+  nsViewManager* vm = aView->GetViewManager();
 
   if (nullptr == aStyleContext) {
     aStyleContext = aFrame->GetStyleContext();
   }
 
   // Make sure visibility is correct. This only affects nsSubdocumentFrame.
   if (0 == (aFlags & NS_FRAME_NO_VISIBILITY) &&
       !aFrame->SupportsVisibilityHidden()) {
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -17,17 +17,17 @@
 #include "nsIContent.h"
 #include "nsContentUtils.h"
 #include "nsIAtom.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
 #include "nsStyleContext.h"
 #include "nsTableOuterFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIScrollableFrame.h"
 #include "nsPresContext.h"
 #include "nsCRT.h"
 #include "nsGUIEvent.h"
 #include "nsIDOMEvent.h"
 #include "nsAsyncDOMEvent.h"
 #include "nsStyleConsts.h"
 #include "nsIPresShell.h"
@@ -5284,17 +5284,17 @@ nsFrame::UpdateOverflow()
   if (FinishAndStoreOverflow(overflowAreas, GetSize())) {
     nsView* view = GetView();
     if (view) {
       uint32_t flags = 0;
       GetLayoutFlags(flags);
 
       if ((flags & NS_FRAME_NO_SIZE_VIEW) == 0) {
         // Make sure the frame's view is properly sized.
-        nsIViewManager* vm = view->GetViewManager();
+        nsViewManager* vm = view->GetViewManager();
         vm->ResizeView(view, overflowAreas.VisualOverflow(), true);
       }
     }
 
     return true;
   }
 
   return false;
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -17,17 +17,17 @@
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsIComponentManager.h"
 #include "nsIStreamListener.h"
 #include "nsIURL.h"
 #include "nsIDocument.h"
 #include "nsINodeInfo.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsWidgetsCID.h"
 #include "nsGkAtoms.h"
 #include "nsStyleCoord.h"
 #include "nsStyleConsts.h"
 #include "nsStyleContext.h"
 #include "nsHTMLParts.h"
 #include "nsGUIEvent.h"
 #include "nsRenderingContext.h"
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -6,17 +6,17 @@
 /* rendering object to wrap rendering objects that should be scrollable */
 
 #include "nsCOMPtr.h"
 #include "nsHTMLParts.h"
 #include "nsPresContext.h"
 #include "nsIServiceManager.h"
 #include "nsView.h"
 #include "nsIScrollable.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsContainerFrame.h"
 #include "nsGfxScrollFrame.h"
 #include "nsGkAtoms.h"
 #include "nsINameSpaceManager.h"
 #include "nsContentList.h"
 #include "nsIDocument.h"
 #include "nsFontMetrics.h"
 #include "nsIDocumentObserver.h"
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -9,17 +9,17 @@
 #include "mozilla/plugins/PluginMessageUtils.h"
 
 #include "nscore.h"
 #include "nsCOMPtr.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsWidgetsCID.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMDragEvent.h"
 #include "nsPluginHost.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
 #include "nsGkAtoms.h"
 #include "nsIAppShell.h"
 #include "nsIDocument.h"
@@ -324,17 +324,17 @@ nsObjectFrame::DestroyFrom(nsIFrame* aDe
   nsObjectFrameSuper::DestroyFrom(aDestructRoot);
 }
 
 /* virtual */ void
 nsObjectFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
 {
   if (HasView()) {
     nsView* view = GetView();
-    nsIViewManager* vm = view->GetViewManager();
+    nsViewManager* vm = view->GetViewManager();
     if (vm) {
       nsViewVisibility visibility = 
         IsHidden() ? nsViewVisibility_kHide : nsViewVisibility_kShow;
       vm->SetViewVisibility(view, visibility);
     }
   }
 
   nsObjectFrameSuper::DidSetStyleContext(aOldStyleContext);
@@ -360,17 +360,17 @@ nsObjectFrame::PrepForDrawing(nsIWidget 
   mWidget = aWidget;
 
   nsView* view = GetView();
   NS_ASSERTION(view, "Object frames must have views");  
   if (!view) {
     return NS_ERROR_FAILURE;
   }
 
-  nsIViewManager* viewMan = view->GetViewManager();
+  nsViewManager* viewMan = view->GetViewManager();
   // mark the view as hidden since we don't know the (x,y) until Paint
   // XXX is the above comment correct?
   viewMan->SetViewVisibility(view, nsViewVisibility_kHide);
 
   //this is ugly. it was ripped off from didreflow(). MMP
   // Position and size view relative to its parent, not relative to our
   // parent frame (our parent frame may not have a view).
   
@@ -588,17 +588,17 @@ nsObjectFrame::Reflow(nsPresContext*    
     aStatus = NS_FRAME_COMPLETE;
     return NS_OK;
   }
 
   nsRect r(0, 0, aMetrics.width, aMetrics.height);
   r.Deflate(aReflowState.mComputedBorderPadding);
 
   if (mInnerView) {
-    nsIViewManager* vm = mInnerView->GetViewManager();
+    nsViewManager* vm = mInnerView->GetViewManager();
     vm->MoveViewTo(mInnerView, r.x, r.y);
     vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), r.Size()), true);
   }
 
   FixupWindow(r.Size());
   if (!mReflowCallbackPosted) {
     mReflowCallbackPosted = true;
     aPresContext->PresShell()->PostReflowCallback(this);
@@ -879,17 +879,17 @@ nsObjectFrame::DidReflow(nsPresContext* 
 
   // The view is created hidden; once we have reflowed it and it has been
   // positioned then we show it.
   if (aStatus != nsDidReflowStatus::FINISHED) 
     return rv;
 
   if (HasView()) {
     nsView* view = GetView();
-    nsIViewManager* vm = view->GetViewManager();
+    nsViewManager* vm = view->GetViewManager();
     if (vm)
       vm->SetViewVisibility(view, IsHidden() ? nsViewVisibility_kHide : nsViewVisibility_kShow);
   }
 
   return rv;
 }
 
 /* static */ void
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -25,17 +25,17 @@
 #include "nsIPresShell.h"
 #include "nsIComponentManager.h"
 #include "nsFrameManager.h"
 #include "nsIStreamListener.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsIDocument.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsGkAtoms.h"
 #include "nsStyleCoord.h"
 #include "nsStyleContext.h"
 #include "nsStyleConsts.h"
 #include "nsFrameSetFrame.h"
 #include "nsIDOMHTMLFrameElement.h"
 #include "nsIDOMHTMLIFrameElement.h"
 #include "nsIDOMXULElement.h"
@@ -669,17 +669,17 @@ nsSubDocumentFrame::Reflow(nsPresContext
 
   nsSize innerSize(aDesiredSize.width, aDesiredSize.height);
   if (IsInline()) {
     innerSize.width  -= aReflowState.mComputedBorderPadding.LeftRight();
     innerSize.height -= aReflowState.mComputedBorderPadding.TopBottom();
   }
 
   if (mInnerView) {
-    nsIViewManager* vm = mInnerView->GetViewManager();
+    nsViewManager* vm = mInnerView->GetViewManager();
     vm->MoveViewTo(mInnerView, offset.x, offset.y);
     vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), innerSize), true);
   }
 
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   if (!ShouldClipSubdocument()) {
     nsIFrame* subdocRootFrame = GetSubdocumentRootFrame();
     if (subdocRootFrame) {
@@ -953,17 +953,17 @@ BeginSwapDocShellsForViews(nsView* aSibl
 }
 
 static void
 InsertViewsInReverseOrder(nsView* aSibling, nsView* aParent)
 {
   NS_PRECONDITION(aParent, "");
   NS_PRECONDITION(!aParent->GetFirstChild(), "inserting into non-empty list");
 
-  nsIViewManager* vm = aParent->GetViewManager();
+  nsViewManager* vm = aParent->GetViewManager();
   while (aSibling) {
     nsView* next = aSibling->GetNextSibling();
     aSibling->SetNextSibling(nullptr);
     // true means 'after' in document order which is 'before' in view order,
     // so this call prepends the child, thus reversing the siblings as we go.
     vm->InsertChild(aParent, aSibling, nullptr, true);
     aSibling = next;
   }
@@ -1087,17 +1087,17 @@ nsSubDocumentFrame::EnsureInnerView()
     return mInnerView;
   }
 
   // create, init, set the parent of the view
   nsView* outerView = GetView();
   NS_ASSERTION(outerView, "Must have an outer view already");
   nsRect viewBounds(0, 0, 0, 0); // size will be fixed during reflow
 
-  nsIViewManager* viewMan = outerView->GetViewManager();
+  nsViewManager* viewMan = outerView->GetViewManager();
   nsView* innerView = viewMan->CreateView(viewBounds, outerView);
   if (!innerView) {
     NS_ERROR("Could not create inner view");
     return nullptr;
   }
   mInnerView = innerView;
   viewMan->InsertChild(outerView, innerView, nullptr, true);
 
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -85,17 +85,17 @@ static const char kPrintingPromptService
 #include "nsContentUtils.h"
 #include "nsIPresShell.h"
 #include "nsLayoutUtils.h"
 #include "mozilla/Preferences.h"
 
 #include "nsViewsCID.h"
 #include "nsWidgetsCID.h"
 #include "nsIDeviceContextSpec.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsView.h"
 #include "nsRenderingContext.h"
 
 #include "nsIPageSequenceFrame.h"
 #include "nsIURL.h"
 #include "nsIContentViewerEdit.h"
 #include "nsIContentViewerFile.h"
 #include "nsIMarkupDocumentViewer.h"
@@ -3788,17 +3788,17 @@ DumpViews(nsIDocShell* aDocShell, FILE* 
 {
   NS_ASSERTION(aDocShell, "Pointer is null!");
   NS_ASSERTION(out, "Pointer is null!");
 
   if (nullptr != aDocShell) {
     fprintf(out, "docshell=%p \n", aDocShell);
     nsIPresShell* shell = nsPrintEngine::GetPresShellFor(aDocShell);
     if (shell) {
-      nsIViewManager* vm = shell->GetViewManager();
+      nsViewManager* vm = shell->GetViewManager();
       if (vm) {
         nsView* root = vm->GetRootView();
         if (root) {
           root->List(out);
         }
       }
     }
     else {
--- a/layout/printing/nsPrintObject.h
+++ b/layout/printing/nsPrintObject.h
@@ -7,17 +7,17 @@
 
 #include "mozilla/Attributes.h"
 
 // Interfaces
 #include "nsCOMPtr.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
 #include "nsStyleSet.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDocShell.h"
 #include "nsIDocument.h"
 #include "nsIDocShellTreeOwner.h"
 
 class nsPresContext;
 
 // nsPrintObject Document Type
 enum PrintObjectType  {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3};
@@ -41,17 +41,17 @@ public:
 
   // Data Members
   nsCOMPtr<nsIDocShell>    mDocShell;
   nsCOMPtr<nsIDocShellTreeOwner> mTreeOwner;
   nsCOMPtr<nsIDocument>    mDocument;
 
   nsRefPtr<nsPresContext>  mPresContext;
   nsCOMPtr<nsIPresShell>   mPresShell;
-  nsCOMPtr<nsIViewManager> mViewManager;
+  nsCOMPtr<nsViewManager> mViewManager;
 
   nsCOMPtr<nsIContent>     mContent;
   PrintObjectType  mFrameType;
   
   nsTArray<nsPrintObject*> mKids;
   nsPrintObject*   mParent;
   bool             mHasBeenPrinted;
   bool             mDontPrint;
--- a/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp
+++ b/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp
@@ -16,17 +16,17 @@
 #include "nsIAtom.h"
 #include "nsQuickSort.h"
 
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 
 #include "nsIPresShell.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIFrame.h"
 
 #include "nsILayoutDebugger.h"
 #include "nsLayoutCID.h"
 static NS_DEFINE_CID(kLayoutDebuggerCID, NS_LAYOUT_DEBUGGER_CID);
 
 #include "nsISelectionController.h"
 #include "mozilla/dom/Element.h"
@@ -50,17 +50,17 @@ pres_shell(nsIDocShell *aDocShell)
     nsCOMPtr<nsIContentViewer> cv = doc_viewer(aDocShell);
     if (!cv)
         return nullptr;
     nsCOMPtr<nsIPresShell> result;
     cv->GetPresShell(getter_AddRefs(result));
     return result.forget();
 }
 
-static nsIViewManager*
+static nsViewManager*
 view_manager(nsIDocShell *aDocShell)
 {
     nsCOMPtr<nsIPresShell> shell(pres_shell(aDocShell));
     if (!shell)
         return nullptr;
     return shell->GetViewManager();
 }
 
@@ -428,17 +428,17 @@ nsLayoutDebuggingTools::DumpFrames()
 }
 
 static
 void
 DumpViewsRecur(nsIDocShell* aDocShell, FILE* out)
 {
 #ifdef DEBUG
     fprintf(out, "docshell=%p \n", static_cast<void*>(aDocShell));
-    nsCOMPtr<nsIViewManager> vm(view_manager(aDocShell));
+    nsCOMPtr<nsViewManager> vm(view_manager(aDocShell));
     if (vm) {
         nsView* root = vm->GetRootView();
         if (root) {
             root->List(out);
         }
     }
     else {
         fputs("null view manager\n", out);
@@ -519,17 +519,17 @@ nsLayoutDebuggingTools::DumpReflowStats(
 #endif
     }
 #endif
     return NS_OK;
 }
 
 void nsLayoutDebuggingTools::ForceRefresh()
 {
-    nsCOMPtr<nsIViewManager> vm(view_manager(mDocShell));
+    nsCOMPtr<nsViewManager> vm(view_manager(mDocShell));
     if (!vm)
         return;
     nsView* root = vm->GetRootView();
     if (root) {
         vm->InvalidateView(root);
     }
 }
 
--- a/layout/tools/layout-debug/src/nsRegressionTester.cpp
+++ b/layout/tools/layout-debug/src/nsRegressionTester.cpp
@@ -20,17 +20,17 @@
 #include "nsIContentViewer.h"
 #include "nsIContentViewerFile.h"
 #include "nsIFrame.h"
 #include "nsStyleStruct.h"
 #include "nsIFrameUtil.h"
 #include "nsLayoutCID.h"
 #include "nsNetUtil.h"
 #include "nsIFile.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsView.h"
 
 
 
 static NS_DEFINE_CID(kFrameUtilCID, NS_FRAME_UTIL_CID);
 
 
 nsRegressionTester::nsRegressionTester()
--- a/layout/xul/base/src/nsBoxFrame.cpp
+++ b/layout/xul/base/src/nsBoxFrame.cpp
@@ -36,17 +36,17 @@
 #include "nsDOMTouchEvent.h"
 #include "nsStyleContext.h"
 #include "nsPresContext.h"
 #include "nsCOMPtr.h"
 #include "nsINameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsHTMLParts.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsView.h"
 #include "nsIPresShell.h"
 #include "nsCSSRendering.h"
 #include "nsIServiceManager.h"
 #include "nsBoxLayout.h"
 #include "nsSprocketLayout.h"
 #include "nsIScrollableFrame.h"
 #include "nsWidgetsCID.h"
--- a/layout/xul/base/src/nsDeckFrame.cpp
+++ b/layout/xul/base/src/nsDeckFrame.cpp
@@ -15,17 +15,17 @@
 #include "nsPresContext.h"
 #include "nsIContent.h"
 #include "nsCOMPtr.h"
 #include "nsINameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsHTMLParts.h"
 #include "nsIPresShell.h"
 #include "nsCSSRendering.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsBoxLayoutState.h"
 #include "nsStackLayout.h"
 #include "nsDisplayList.h"
 #include "nsContainerFrame.h"
 
 #ifdef ACCESSIBILITY
 #include "nsAccessibilityService.h"
 #endif
--- a/layout/xul/base/src/nsLeafBoxFrame.cpp
+++ b/layout/xul/base/src/nsLeafBoxFrame.cpp
@@ -15,17 +15,17 @@
 #include "nsCOMPtr.h"
 #include "nsGkAtoms.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 #include "nsIContent.h"
 #include "nsINameSpaceManager.h"
 #include "nsBoxLayoutState.h"
 #include "nsWidgetsCID.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsContainerFrame.h"
 #include "nsDisplayList.h"
 
 //
 // NS_NewLeafBoxFrame
 //
 // Creates a new Toolbar frame and returns it
 //
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -17,17 +17,17 @@
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMNodeList.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsIScrollableFrame.h"
 #include "nsScrollbarFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsStyleContext.h"
 #include "nsFontMetrics.h"
 #include "nsITimer.h"
 #include "nsAutoPtr.h"
 #include "nsStyleSet.h"
 #include "nsPIBoxObject.h"
 #include "nsINodeInfo.h"
 #include "nsLayoutUtils.h"
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -7,17 +7,17 @@
 #include "nsMenuPopupFrame.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsIAtom.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 #include "nsCSSRendering.h"
 #include "nsINameSpaceManager.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsWidgetsCID.h"
 #include "nsMenuFrame.h"
 #include "nsMenuBarFrame.h"
 #include "nsPopupSetFrame.h"
 #include "nsEventDispatcher.h"
 #include "nsPIDOMWindow.h"
 #include "nsIDOMScreen.h"
 #include "nsIPresShell.h"
@@ -120,17 +120,17 @@ nsMenuPopupFrame::Init(nsIContent*      
 
   rv = CreatePopupView();
   NS_ENSURE_SUCCESS(rv, rv);
 
   // XXX Hack. The popup's view should float above all other views,
   // so we use the nsView::SetFloating() to tell the view manager
   // about that constraint.
   nsView* ourView = GetView();
-  nsIViewManager* viewManager = ourView->GetViewManager();
+  nsViewManager* viewManager = ourView->GetViewManager();
   viewManager->SetViewFloating(ourView, true);
 
   mPopupType = ePopupTypePanel;
   nsIDocument* doc = aContent->OwnerDoc();
   int32_t namespaceID;
   nsCOMPtr<nsIAtom> tag = doc->BindingManager()->ResolveTag(aContent, &namespaceID);
   if (namespaceID == kNameSpaceID_XUL) {
     if (tag == nsGkAtoms::menupopup || tag == nsGkAtoms::popup)
@@ -454,17 +454,17 @@ nsMenuPopupFrame::LayoutPopup(nsBoxLayou
     // If the size of the popup changed, apply any size constraints.
     nsIWidget* widget = view->GetWidget();
     if (widget) {
       SetSizeConstraints(pc, widget, minSize, maxSize);
     }
   }
 
   if (isOpen) {
-    nsIViewManager* viewManager = view->GetViewManager();
+    nsViewManager* viewManager = view->GetViewManager();
     nsRect rect = GetRect();
     rect.x = rect.y = 0;
     viewManager->ResizeView(view, rect);
 
     viewManager->SetViewVisibility(view, nsViewVisibility_kShow);
     mPopupState = ePopupOpenAndVisible;
     nsContainerFrame::SyncFrameViewProperties(pc, this, nullptr, view, 0);
   }
@@ -789,17 +789,17 @@ nsMenuPopupFrame::HidePopup(bool aDesele
 
   LockMenuUntilClosed(false);
 
   mIsOpenChanged = false;
   mCurrentMenu = nullptr; // make sure no current menu is set
   mHFlip = mVFlip = false;
 
   nsView* view = GetView();
-  nsIViewManager* viewManager = view->GetViewManager();
+  nsViewManager* viewManager = view->GetViewManager();
   viewManager->SetViewVisibility(view, nsViewVisibility_kHide);
 
   FireDOMEvent(NS_LITERAL_STRING("DOMMenuInactive"), mContent);
 
   // XXX, bug 137033, In Windows, if mouse is outside the window when the menupopup closes, no
   // mouse_enter/mouse_exit event will be fired to clear current hover state, we should clear it manually.
   // This code may not the best solution, but we can leave it here until we find the better approach.
   NS_ASSERTION(mContent->IsElement(), "How do we have a non-element?");
@@ -1914,17 +1914,17 @@ nsMenuPopupFrame::SetConsumeRollupEvent(
  */
 nsresult
 nsMenuPopupFrame::CreatePopupView()
 {
   if (HasView()) {
     return NS_OK;
   }
 
-  nsIViewManager* viewManager = PresContext()->GetPresShell()->GetViewManager();
+  nsViewManager* viewManager = PresContext()->GetPresShell()->GetViewManager();
   NS_ASSERTION(nullptr != viewManager, "null view manager");
 
   // Create a view
   nsView* parentView = viewManager->GetRootView();
   nsViewVisibility visibility = nsViewVisibility_kHide;
   int32_t zIndex = INT32_MAX;
   bool    autoZIndex = false;
 
--- a/layout/xul/base/src/nsMenuPopupFrame.h
+++ b/layout/xul/base/src/nsMenuPopupFrame.h
@@ -85,17 +85,17 @@ enum FlipStyle {
 //  nsMenuPopupFrame.h, nsListControlFrame.cpp, listbox.xml, tree.xml
 //  need to find a good place to put them together.
 //  if someone changes one, please also change the other.
 
 #define CONTEXT_MENU_OFFSET_PIXELS 2
 
 nsIFrame* NS_NewMenuPopupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
-class nsIViewManager;
+class nsViewManager;
 class nsView;
 class nsMenuPopupFrame;
 
 class nsMenuPopupFrame : public nsBoxFrame, public nsMenuParent
 {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsMenuPopupFrame)
   NS_DECL_QUERYFRAME
--- a/layout/xul/base/src/nsXULPopupManager.cpp
+++ b/layout/xul/base/src/nsXULPopupManager.cpp
@@ -15,17 +15,17 @@
 #include "nsIDOMEvent.h"
 #include "nsIDOMXULElement.h"
 #include "nsIXULDocument.h"
 #include "nsIXULTemplateBuilder.h"
 #include "nsEventDispatcher.h"
 #include "nsEventStateManager.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsLayoutUtils.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIComponentManager.h"
 #include "nsITimer.h"
 #include "nsFocusManager.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShell.h"
 #include "nsPIDOMWindow.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIBaseWindow.h"
@@ -2257,17 +2257,17 @@ nsXULPopupHidingEvent::Run()
 
 NS_IMETHODIMP
 nsXULMenuCommandEvent::Run()
 {
   nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
   if (!pm)
     return NS_OK;
 
-  // The order of the nsIViewManager and nsIPresShell COM pointers is
+  // The order of the nsViewManager and nsIPresShell COM pointers is
   // important below.  We want the pres shell to get released before the
   // associated view manager on exit from this function.
   // See bug 54233.
   // XXXndeakin is this still needed?
 
   nsCOMPtr<nsIContent> popup;
   nsMenuFrame* menuFrame = do_QueryFrame(mMenu->GetPrimaryFrame());
   nsWeakFrame weakFrame(menuFrame);
@@ -2290,17 +2290,17 @@ nsXULMenuCommandEvent::Run()
         popup = popupFrame->GetContent();
         break;
       }
       frame = frame->GetParent();
     }
 
     nsPresContext* presContext = menuFrame->PresContext();
     nsCOMPtr<nsIPresShell> shell = presContext->PresShell();
-    nsCOMPtr<nsIViewManager> kungFuDeathGrip = shell->GetViewManager();
+    nsCOMPtr<nsViewManager> kungFuDeathGrip = shell->GetViewManager();
 
     // Deselect ourselves.
     if (mCloseMenuMode != CloseMenuMode_None)
       menuFrame->SelectMenu(false);
 
     nsAutoHandlingUserInputStatePusher userInpStatePusher(mUserInput, nullptr,
                                                           shell->GetDocument());
     nsContentUtils::DispatchXULCommand(mMenu, mIsTrusted, nullptr, shell,
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -34,17 +34,17 @@
 #include "nsIDOMXULElement.h"
 #include "nsIDocument.h"
 #include "mozilla/css/StyleRule.h"
 #include "nsCSSRendering.h"
 #include "nsIXULTemplateBuilder.h"
 #include "nsXPIDLString.h"
 #include "nsContainerFrame.h"
 #include "nsView.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsWidgetsCID.h"
 #include "nsBoxFrame.h"
 #include "nsBoxObject.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsBoxLayoutState.h"
 #include "nsTreeContentView.h"
 #include "nsTreeUtils.h"
--- a/view/public/Makefile.in
+++ b/view/public/Makefile.in
@@ -9,15 +9,15 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= view
 
 EXPORTS		= \
 		nsView.h \
-		nsIViewManager.h \
+		nsViewManager.h \
 		nsViewsCID.h \
 		nsIScrollPositionListener.h \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/view/public/nsView.h
+++ b/view/public/nsView.h
@@ -15,17 +15,16 @@
 #include "nsWidgetInitData.h"
 #include "nsRegion.h"
 #include "nsCRT.h"
 #include "nsIFactory.h"
 #include "nsEvent.h"
 #include "nsIWidgetListener.h"
 #include <stdio.h>
 
-class nsIViewManager;
 class nsViewManager;
 class nsIWidget;
 class nsIFrame;
 
 // Enumerated type to indicate the visibility of a layer.
 // hide - the layer is not shown.
 // show - the layer is shown irrespective of the visibility of 
 //        the layer's parent.
@@ -54,34 +53,34 @@ enum nsViewVisibility {
  *
  * Views are NOT reference counted. Use the Destroy() member function to
  * destroy a view.
  *
  * The lifetime of the view hierarchy is bounded by the lifetime of the
  * view manager that owns the views.
  *
  * Most of the methods here are read-only. To set the corresponding properties
- * of a view, go through nsIViewManager.
+ * of a view, go through nsViewManager.
  */
 
 class nsView MOZ_FINAL : public nsIWidgetListener
 {
 public:
   friend class nsViewManager;
 
   NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
 
   /**
    * Get the view manager which "owns" the view.
    * This method might require some expensive traversal work in the future. If you can get the
    * view manager from somewhere else, do that instead.
    * @result the view manager
    */
-  nsIViewManager* GetViewManager() const
-  { return reinterpret_cast<nsIViewManager*>(mViewManager); }
+  nsViewManager* GetViewManager() const
+  { return reinterpret_cast<nsViewManager*>(mViewManager); }
   nsViewManager* GetViewManagerInternal() const { return mViewManager; }
 
   /**
    * Find the view for the given widget, if there is one.
    * @return the view the widget belongs to, or null if the widget doesn't
    * belong to any view.
    */
   static nsView* GetViewFor(nsIWidget* aWidget);
@@ -455,23 +454,23 @@ private:
   void NotifyEffectiveVisibilityChanged(bool aEffectivelyVisible);
 
   // Update the cached RootViewManager for all view manager descendents,
   // If the hierarchy is being removed, aViewManagerParent points to the view
   // manager for the hierarchy's old parent, and will have its mouse grab
   // released if it points to any view in this view hierarchy.
   void InvalidateHierarchy(nsViewManager *aViewManagerParent);
 
-  nsViewManager     *mViewManager;
+  nsViewManager    *mViewManager;
   nsView           *mParent;
-  nsIWidget         *mWindow;
+  nsIWidget        *mWindow;
   nsView           *mNextSibling;
   nsView           *mFirstChild;
-  nsIFrame          *mFrame;
-  nsRegion          *mDirtyRegion;
+  nsIFrame         *mFrame;
+  nsRegion         *mDirtyRegion;
   int32_t           mZIndex;
   nsViewVisibility  mVis;
   // position relative our parent view origin but in our appunits
   nscoord           mPosX, mPosY;
   // relative to parent, but in our appunits
   nsRect            mDimBounds;
   // in our appunits
   nsPoint           mViewToWidgetOffset;
rename from view/public/nsIViewManager.h
rename to view/public/nsViewManager.h
--- a/view/public/nsIViewManager.h
+++ b/view/public/nsViewManager.h
@@ -1,126 +1,145 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsIViewManager_h___
-#define nsIViewManager_h___
+#ifndef nsViewManager_h___
+#define nsViewManager_h___
 
 #include "nscore.h"
 #include "nsView.h"
 #include "nsEvent.h"
+#include "nsCOMPtr.h"
+#include "nsCRT.h"
+#include "nsITimer.h"
+#include "prtime.h"
+#include "prinrval.h"
+#include "nsVoidArray.h"
+#include "nsThreadUtils.h"
+#include "nsIPresShell.h"
+#include "nsDeviceContext.h"
 
 class nsIWidget;
 struct nsRect;
 class nsRegion;
 class nsDeviceContext;
 class nsIPresShell;
+class nsView;
 
 #define NS_IVIEWMANAGER_IID \
 { 0x540610a6, 0x4fdd, 0x4ae3, \
   { 0x9b, 0xdb, 0xa6, 0x4d, 0x8b, 0xca, 0x02, 0x0f } }
 
-class nsIViewManager : public nsISupports
+class nsViewManager : public nsISupports
 {
 public:
+  friend class nsView;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IVIEWMANAGER_IID)
+
+  NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
+
+  NS_DECL_ISUPPORTS
+
+  nsViewManager();
+  virtual ~nsViewManager();
+
   /**
    * Initialize the ViewManager
    * Note: this instance does not hold a reference to the presshell
    * because it holds a reference to this instance.
    * @result The result of the initialization, NS_OK if no errors
    */
-  NS_IMETHOD  Init(nsDeviceContext* aContext) = 0;
+  NS_IMETHOD  Init(nsDeviceContext* aContext);
 
   /**
    * Create an ordinary view
    * @param aBounds initial bounds for view
    *        XXX We should eliminate this parameter; you can set the bounds after CreateView
    * @param aParent intended parent for view. this is not actually set in the
    *        nsView through this method. it is only used by the initialization
    *        code to walk up the view tree, if necessary, to find resources.
    *        XXX We should eliminate this parameter!
    * @param aVisibilityFlag initial visibility state of view
    *        XXX We should eliminate this parameter; you can set it after CreateView
    * @result The new view
    */
   NS_IMETHOD_(nsView*) CreateView(const nsRect& aBounds,
                                    const nsView* aParent,
-                                   nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow) = 0;
+                                   nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow);
 
   /**
    * Get the root of the view tree.
    * @result the root view
    */
-  NS_IMETHOD_(nsView*) GetRootView() = 0;
+  NS_IMETHOD_(nsView*) GetRootView() { return mRootView; }
 
   /**
    * Set the root of the view tree. Does not destroy the current root view.
    * aView may have a parent view managed by a different view manager.
    * aView may have a widget (anything but printing) or may not (printing).
    * @param aView view to set as root
    */
-  NS_IMETHOD  SetRootView(nsView *aView) = 0;
+  NS_IMETHOD  SetRootView(nsView *aView);
 
   /**
    * Get the dimensions of the root window. The dimensions are in
    * twips
    * @param aWidth out parameter for width of window in twips
    * @param aHeight out parameter for height of window in twips
    */
-  NS_IMETHOD  GetWindowDimensions(nscoord *aWidth, nscoord *aHeight) = 0;
+  NS_IMETHOD  GetWindowDimensions(nscoord *aWidth, nscoord *aHeight);
 
   /**
    * Set the dimensions of the root window.
    * Called if the root window is resized. The dimensions are in
    * twips
    * @param aWidth of window in twips
    * @param aHeight of window in twips
    */
-  NS_IMETHOD  SetWindowDimensions(nscoord aWidth, nscoord aHeight) = 0;
+  NS_IMETHOD  SetWindowDimensions(nscoord aWidth, nscoord aHeight);
 
   /**
    * Do any resizes that are pending.
    */
-  NS_IMETHOD  FlushDelayedResize(bool aDoReflow) = 0;
+  NS_IMETHOD  FlushDelayedResize(bool aDoReflow);
 
   /**
    * Called to inform the view manager that the entire area of a view
    * is dirty and needs to be redrawn.
    * @param aView view to paint. should be root view
    */
-  NS_IMETHOD  InvalidateView(nsView *aView) = 0;
+  NS_IMETHOD  InvalidateView(nsView *aView);
 
   /**
    * Called to inform the view manager that some portion of a view is dirty and
    * needs to be redrawn. The rect passed in should be in the view's coordinate
    * space. Does not check for paint suppression.
    * @param aView view to paint. should be root view
    * @param rect rect to mark as damaged
    */
-  NS_IMETHOD  InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect) = 0;
+  NS_IMETHOD  InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect);
 
   /**
    * Called to inform the view manager that it should invalidate all views.
    */
-  NS_IMETHOD  InvalidateAllViews() = 0;
+  NS_IMETHOD  InvalidateAllViews();
 
   /**
    * Called to dispatch an event to the appropriate view. Often called
    * as a result of receiving a mouse or keyboard event from the widget
    * event system.
    * @param aEvent event to dispatch
    * @param aViewTarget dispatch the event to this view
    * @param aStatus event handling status
    */
   NS_IMETHOD  DispatchEvent(nsGUIEvent *aEvent,
-      nsView* aViewTarget, nsEventStatus* aStatus) = 0;
+      nsView* aViewTarget, nsEventStatus* aStatus);
 
   /**
    * Given a parent view, insert another view as its child.
    * aSibling and aAbove control the "document order" for the insertion.
    * If aSibling is null, the view is inserted at the end of the document order
    * if aAfter is true, otherwise it is inserted at the beginning.
    * If aSibling is non-null, then if aAfter is true, the view is inserted
    * after the sibling in document order (appearing above the sibling unless
@@ -128,65 +147,67 @@ public:
    * If it is false, the view is inserted before the sibling.
    * The view manager generates the appopriate dirty regions.
    * @param aParent parent view
    * @param aChild child view
    * @param aSibling sibling view
    * @param aAfter after or before in the document order
    */
   NS_IMETHOD  InsertChild(nsView *aParent, nsView *aChild, nsView *aSibling,
-                          bool aAfter) = 0;
+                          bool aAfter);
+
+  NS_IMETHOD InsertChild(nsView *aParent, nsView *aChild, int32_t aZIndex);
 
   /**
    * Remove a specific child view from its parent. This will NOT remove its placeholder
    * if there is one.
    * The view manager generates the appropriate dirty regions.
    * @param aParent parent view
    * @param aChild child view
    */
-  NS_IMETHOD  RemoveChild(nsView *aChild) = 0;
+  NS_IMETHOD  RemoveChild(nsView *aChild);
 
   /**
    * Move a view to the specified position, provided in parent coordinates.
    * The new position is the (0, 0) origin for the view's coordinate system.
    * The view's bounds may extend above or to the left of this point.
    * The view manager generates the appropriate dirty regions.
    * @param aView view to move
    * @param aX x value for new view position
    * @param aY y value for new view position
    */
-  NS_IMETHOD  MoveViewTo(nsView *aView, nscoord aX, nscoord aY) = 0;
+  NS_IMETHOD  MoveViewTo(nsView *aView, nscoord aX, nscoord aY);
 
   /**
    * Resize a view. In addition to setting the width and height, you can
    * set the x and y of its bounds relative to its position. Negative x and y
    * will let the view extend above and to the left of the (0,0) point in its
    * coordinate system.
    * The view manager generates the appropriate dirty regions.
    * @param aView view to move
    * @param the new bounds relative to the current position
    * @param RepaintExposedAreaOnly
    *     if true Repaint only the expanded or contracted region,
    *     if false Repaint the union of the old and new rectangles.
    */
   NS_IMETHOD  ResizeView(nsView *aView, const nsRect &aRect,
-                         bool aRepaintExposedAreaOnly = false) = 0;
+                         bool aRepaintExposedAreaOnly = false);
 
   /**
    * Set the visibility of a view. Hidden views have the effect of hiding
    * their descendants as well. This does not affect painting, so layout
    * is responsible for ensuring that content in hidden views is not
    * painted nor handling events. It does affect the visibility of widgets;
    * if a view is hidden, descendant views with widgets have their widgets
    * hidden.
    * The view manager generates the appropriate dirty regions.
    * @param aView view to change visibility state of
    * @param visible new visibility state
    */
-  NS_IMETHOD  SetViewVisibility(nsView *aView, nsViewVisibility aVisible) = 0;
+  NS_IMETHOD  SetViewVisibility(nsView *aView, nsViewVisibility aVisible);
 
   /**
    * Set the z-index of a view. Positive z-indices mean that a view
    * is above its parent in z-order. Negative z-indices mean that a
    * view is below its parent.
    * The view manager generates the appropriate dirty regions.
    * @param aAutoZIndex indicate that the z-index of a view is "auto". An "auto" z-index
    * means that the view does not define a new stacking context,
@@ -194,118 +215,245 @@ public:
    * relative to the view's siblings.
    * @param aView view to change z depth of
    * @param aZindex explicit z depth
    * @param aTopMost used when this view is z-index:auto to compare against 
    *        other z-index:auto views.
    *        true if the view should be topmost when compared with 
    *        other z-index:auto views.
    */
-  NS_IMETHOD  SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex, bool aTopMost = false) = 0;
+  NS_IMETHOD  SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex, bool aTopMost = false);
 
   /**
    * Set whether the view "floats" above all other views,
    * which tells the compositor not to consider higher views in
    * the view hierarchy that would geometrically intersect with
    * this view. This is a hack, but it fixes some problems with
    * views that need to be drawn in front of all other views.
    */
-  NS_IMETHOD  SetViewFloating(nsView *aView, bool aFloatingView) = 0;
+  NS_IMETHOD  SetViewFloating(nsView *aView, bool aFloatingView);
 
   /**
    * Set the presshell associated with this manager
    * @param aPresShell - new presshell
    */
-  virtual void SetPresShell(nsIPresShell *aPresShell) = 0;
+  virtual void SetPresShell(nsIPresShell *aPresShell) { mPresShell = aPresShell; }
 
   /**
    * Get the pres shell associated with this manager
    */
-  virtual nsIPresShell* GetPresShell() = 0;
+  virtual nsIPresShell* GetPresShell() { return mPresShell; }
 
   /**
    * Get the device context associated with this manager
    * @result device context
    */
-  NS_IMETHOD  GetDeviceContext(nsDeviceContext *&aContext) = 0;
+  NS_IMETHOD  GetDeviceContext(nsDeviceContext *&aContext);
 
   /**
    * A stack class for disallowing changes that would enter painting. For
    * example, popup widgets shouldn't be resized during reflow, since doing so
    * might cause synchronous painting inside reflow which is forbidden.
    * While refresh is disabled, widget geometry changes are deferred and will
    * be handled later, either from the refresh driver or from an NS_WILL_PAINT
    * event.
    * We don't want to defer widget geometry changes all the time. Resizing a
    * popup from script doesn't need to be deferred, for example, especially
    * since popup widget geometry is observable from script and expected to
    * update synchronously.
    */
   class NS_STACK_CLASS AutoDisableRefresh {
   public:
-    AutoDisableRefresh(nsIViewManager* aVM) {
+    AutoDisableRefresh(nsViewManager* aVM) {
       if (aVM) {
         mRootVM = aVM->IncrementDisableRefreshCount();
       }
     }
     ~AutoDisableRefresh() {
       if (mRootVM) {
         mRootVM->DecrementDisableRefreshCount();
       }
     }
   private:
     AutoDisableRefresh(const AutoDisableRefresh& aOther);
     const AutoDisableRefresh& operator=(const AutoDisableRefresh& aOther);
 
-    nsCOMPtr<nsIViewManager> mRootVM;
+    nsCOMPtr<nsViewManager> mRootVM;
   };
 
 private:
   friend class AutoDisableRefresh;
 
-  virtual nsIViewManager* IncrementDisableRefreshCount() = 0;
-  virtual void DecrementDisableRefreshCount() = 0;
+  virtual nsViewManager* IncrementDisableRefreshCount();
+  virtual void DecrementDisableRefreshCount();
 
 public:
   /**
    * Retrieve the widget at the root of the nearest enclosing
    * view manager whose root view has a widget.
    */
-  NS_IMETHOD GetRootWidget(nsIWidget **aWidget) = 0;
+  NS_IMETHOD GetRootWidget(nsIWidget **aWidget);
 
   /**
    * Indicate whether the viewmanager is currently painting
    *
    * @param aPainting true if the viewmanager is painting
    *                  false otherwise
    */
-  NS_IMETHOD IsPainting(bool& aIsPainting)=0;
+  NS_IMETHOD IsPainting(bool& aIsPainting);
 
   /**
    * Retrieve the time of the last user event. User events
    * include mouse and keyboard events. The viewmanager
    * saves the time of the last user event.
    *
    * @param aTime Last user event time in microseconds
    */
-  NS_IMETHOD GetLastUserEventTime(uint32_t& aTime)=0;
+  NS_IMETHOD GetLastUserEventTime(uint32_t& aTime);
 
   /**
    * Find the nearest display root view for the view aView. This is the view for
    * the nearest enclosing popup or the root view for the root document.
    */
   static nsView* GetDisplayRootFor(nsView* aView);
 
   /**
    * Flush the accumulated dirty region to the widget and update widget
    * geometry.
    */
-  virtual void ProcessPendingUpdates()=0;
+  virtual void ProcessPendingUpdates();
 
   /**
    * Just update widget geometry without flushing the dirty region
    */
-  virtual void UpdateWidgetGeometry() = 0;
+  virtual void UpdateWidgetGeometry();
+
+  uint32_t AppUnitsPerDevPixel() const
+  {
+    return mContext->AppUnitsPerDevPixel();
+  }
+  nsView* GetRootViewImpl() const { return mRootView; }
+
+private:
+  static uint32_t gLastUserEventTime;
+
+  /* Update the cached RootViewManager pointer on this view manager. */
+  void InvalidateHierarchy();
+  void FlushPendingInvalidates();
+
+  void ProcessPendingUpdatesForView(nsView *aView,
+                                    bool aFlushDirtyRegion = true);
+  void FlushDirtyRegionToWidget(nsView* aView);
+  /**
+   * Call WillPaint() on all view observers under this vm root.
+   */
+  void CallWillPaintOnObservers(bool aWillSendDidPaint);
+  void ReparentChildWidgets(nsView* aView, nsIWidget *aNewWidget);
+  void ReparentWidgets(nsView* aView, nsView *aParent);
+  void InvalidateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedRegion);
+
+  void InvalidateViews(nsView *aView);
+
+  // aView is the view for aWidget and aRegion is relative to aWidget.
+  void Refresh(nsView *aView, const nsIntRegion& aRegion, bool aWillSendDidPaint);
+
+  void InvalidateRectDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut);
+  void InvalidateHorizontalBandDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut,
+                                          nscoord aY1, nscoord aY2, bool aInCutOut);
+
+  // Utilities
+
+  bool IsViewInserted(nsView *aView);
+
+  /**
+   * Intersects aRect with aView's bounds and then transforms it from aView's
+   * coordinate system to the coordinate system of the widget attached to
+   * aView.
+   */
+  nsIntRect ViewToWidget(nsView *aView, const nsRect &aRect) const;
+
+  void DoSetWindowDimensions(nscoord aWidth, nscoord aHeight);
+
+  bool IsPainting() const {
+    return RootViewManager()->mPainting;
+  }
+
+  void SetPainting(bool aPainting) {
+    RootViewManager()->mPainting = aPainting;
+  }
+
+  nsresult InvalidateView(nsView *aView, const nsRect &aRect);
+
+  nsViewManager* RootViewManager() const { return mRootViewManager; }
+  bool IsRootVM() const { return this == RootViewManager(); }
+
+  // Whether synchronous painting is allowed at the moment. For example,
+  // widget geometry changes can cause synchronous painting, so they need to
+  // be deferred while refresh is disabled.
+  bool IsPaintingAllowed() { return RootViewManager()->mRefreshDisableCount == 0; }
+
+  void WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint);
+  bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion,
+                   uint32_t aFlags);
+  void DidPaintWindow();
+
+  // Call this when you need to let the viewmanager know that it now has
+  // pending updates.
+  void PostPendingUpdate();
+
+  nsRefPtr<nsDeviceContext> mContext;
+  nsIPresShell   *mPresShell;
+
+  // The size for a resize that we delayed until the root view becomes
+  // visible again.
+  nsSize            mDelayedResize;
+
+  nsView           *mRootView;
+  // mRootViewManager is a strong ref unless it equals |this|.  It's
+  // never null (if we have no ancestors, it will be |this|).
+  nsViewManager   *mRootViewManager;
+
+  // The following members should not be accessed directly except by
+  // the root view manager.  Some have accessor functions to enforce
+  // this, as noted.
+
+  int32_t           mRefreshDisableCount;
+  // Use IsPainting() and SetPainting() to access mPainting.
+  bool              mPainting;
+  bool              mRecursiveRefreshPending;
+  bool              mHasPendingWidgetGeometryChanges;
+  bool              mInScroll;
+
+  //from here to public should be static and locked... MMP
+  static int32_t           mVMCount;        //number of viewmanagers
+
+  //list of view managers
+  static nsVoidArray       *gViewManagers;
 };
 
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIViewManager, NS_IVIEWMANAGER_IID)
+NS_DEFINE_STATIC_IID_ACCESSOR(nsViewManager, NS_IVIEWMANAGER_IID)
+
+
+/**
+   Invalidation model:
+
+   1) Callers call into the view manager and ask it to invalidate a view.
+
+   2) The view manager finds the "right" widget for the view, henceforth called
+      the root widget.
 
-#endif  // nsIViewManager_h___
+   3) The view manager traverses descendants of the root widget and for each
+      one that needs invalidation stores the rect to invalidate on the widget's
+      view (batching).
+
+   4) The dirty region is flushed to the right widget when
+      ProcessPendingUpdates is called from the RefreshDriver.
+
+   It's important to note that widgets associated to views outside this view
+   manager can end up being invalidated during step 3.  Therefore, the end of a
+   view update batch really needs to traverse the entire view tree, to ensure
+   that those invalidates happen.
+
+   To cope with this, invalidation processing and should only happen on the
+   root viewmanager.
+*/
+
+#endif  // nsViewManager_h___
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -1001,14 +1001,14 @@ nsView::HandleEvent(nsGUIEvent* aEvent, 
     nsIWidgetListener* listener = aEvent->widget->GetAttachedWidgetListener();
     view = listener ? listener->GetView() : nullptr;
   }
   else {
     view = GetViewFor(aEvent->widget);
   }
 
   if (view) {
-    nsCOMPtr<nsIViewManager> vm = view->GetViewManager();
+    nsCOMPtr<nsViewManager> vm = view->GetViewManager();
     vm->DispatchEvent(aEvent, view, &result);
   }
 
   return result;
 }
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -117,17 +117,17 @@ nsViewManager::~nsViewManager()
     NS_ASSERTION(gViewManagers != nullptr, "About to delete null gViewManagers");
     delete gViewManagers;
     gViewManagers = nullptr;
   }
 
   mPresShell = nullptr;
 }
 
-NS_IMPL_ISUPPORTS1(nsViewManager, nsIViewManager)
+NS_IMPL_ISUPPORTS1(nsViewManager, nsViewManager)
 
 // We don't hold a reference to the presentation context because it
 // holds a reference to us.
 NS_IMETHODIMP nsViewManager::Init(nsDeviceContext* aContext)
 {
   NS_PRECONDITION(nullptr != aContext, "null ptr");
 
   if (nullptr == aContext) {
@@ -151,22 +151,16 @@ nsViewManager::CreateView(const nsRect& 
     v->SetParent(const_cast<nsView*>(aParent));
     v->SetPosition(aBounds.x, aBounds.y);
     nsRect dim(0, 0, aBounds.width, aBounds.height);
     v->SetDimensions(dim, false);
   }
   return v;
 }
 
-NS_IMETHODIMP_(nsView*)
-nsViewManager::GetRootView()
-{
-  return mRootView;
-}
-
 NS_IMETHODIMP nsViewManager::SetRootView(nsView *aView)
 {
   NS_PRECONDITION(!aView || aView->GetViewManager() == this,
                   "Unexpected viewmanager on root view");
   
   // Do NOT destroy the current root view. It's the caller's responsibility
   // to destroy it
   mRootView = aView;
@@ -273,17 +267,17 @@ static nsRegion ConvertRegionBetweenView
   nsRegion out = aIn;
   out.MoveBy(aFromView->GetOffsetTo(aToView));
   out = out.ConvertAppUnitsRoundOut(
     aFromView->GetViewManagerInternal()->AppUnitsPerDevPixel(),
     aToView->GetViewManagerInternal()->AppUnitsPerDevPixel());
   return out;
 }
 
-nsView* nsIViewManager::GetDisplayRootFor(nsView* aView)
+nsView* nsViewManager::GetDisplayRootFor(nsView* aView)
 {
   nsView *displayRoot = aView;
   for (;;) {
     nsView *displayParent = displayRoot->GetParent();
     if (!displayParent)
       return displayRoot;
 
     if (displayRoot->GetFloating() && !displayParent->GetFloating())
@@ -566,17 +560,17 @@ nsViewManager::InvalidateWidgetArea(nsVi
 static bool
 ShouldIgnoreInvalidation(nsViewManager* aVM)
 {
   while (aVM) {
     nsIPresShell* shell = aVM->GetPresShell();
     if (!shell || shell->ShouldIgnoreInvalidation()) {
       return true;
     }
-    nsView* view = aVM->GetRootViewImpl()->GetParent();
+    nsView* view = aVM->GetRootView()->GetParent();
     aVM = view ? view->GetViewManagerInternal() : nullptr;
   }
   return false;
 }
 
 nsresult nsViewManager::InvalidateView(nsView *aView, const nsRect &aRect)
 {
   // If painting is suppressed in the presshell or an ancestor drop all
@@ -1102,17 +1096,17 @@ NS_IMETHODIMP nsViewManager::SetViewZInd
 
 NS_IMETHODIMP nsViewManager::GetDeviceContext(nsDeviceContext *&aContext)
 {
   aContext = mContext;
   NS_IF_ADDREF(aContext);
   return NS_OK;
 }
 
-nsIViewManager*
+nsViewManager*
 nsViewManager::IncrementDisableRefreshCount()
 {
   if (!IsRootVM()) {
     return RootViewManager()->IncrementDisableRefreshCount();
   }
 
   ++mRefreshDisableCount;
 
deleted file mode 100644
--- a/view/src/nsViewManager.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsViewManager_h___
-#define nsViewManager_h___
-#include "nsCOMPtr.h"
-#include "nsIViewManager.h"
-#include "nsCRT.h"
-#include "nsITimer.h"
-#include "prtime.h"
-#include "prinrval.h"
-#include "nsVoidArray.h"
-#include "nsThreadUtils.h"
-#include "nsIPresShell.h"
-#include "nsDeviceContext.h"
-
-
-/**
-   Invalidation model:
-
-   1) Callers call into the view manager and ask it to invalidate a view.
-   
-   2) The view manager finds the "right" widget for the view, henceforth called
-      the root widget.
-
-   3) The view manager traverses descendants of the root widget and for each
-      one that needs invalidation stores the rect to invalidate on the widget's
-      view (batching).
-
-   4) The dirty region is flushed to the right widget when
-      ProcessPendingUpdates is called from the RefreshDriver.
-
-   It's important to note that widgets associated to views outside this view
-   manager can end up being invalidated during step 3.  Therefore, the end of a
-   view update batch really needs to traverse the entire view tree, to ensure
-   that those invalidates happen.
-
-   To cope with this, invalidation processing and should only happen on the
-   root viewmanager.
-*/
-
-class nsViewManager : public nsIViewManager {
-public:
-  nsViewManager();
-
-  NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
-
-  NS_DECL_ISUPPORTS
-
-  NS_IMETHOD  Init(nsDeviceContext* aContext);
-
-  NS_IMETHOD_(nsView*) CreateView(const nsRect& aBounds,
-                                   const nsView* aParent,
-                                   nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow);
-
-  NS_IMETHOD_(nsView*) GetRootView();
-  NS_IMETHOD  SetRootView(nsView *aView);
-
-  NS_IMETHOD  GetWindowDimensions(nscoord *width, nscoord *height);
-  NS_IMETHOD  SetWindowDimensions(nscoord width, nscoord height);
-  NS_IMETHOD  FlushDelayedResize(bool aDoReflow);
-
-  NS_IMETHOD  InvalidateView(nsView *aView);
-  NS_IMETHOD  InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect);
-  NS_IMETHOD  InvalidateAllViews();
-
-  NS_IMETHOD  DispatchEvent(nsGUIEvent *aEvent,
-      nsView* aTargetView, nsEventStatus* aStatus);
-
-  NS_IMETHOD  InsertChild(nsView *parent, nsView *child, nsView *sibling,
-                          bool above);
-
-  NS_IMETHOD  InsertChild(nsView *parent, nsView *child,
-                          int32_t zindex);
-
-  NS_IMETHOD  RemoveChild(nsView *parent);
-
-  NS_IMETHOD  MoveViewTo(nsView *aView, nscoord aX, nscoord aY);
-
-  NS_IMETHOD  ResizeView(nsView *aView, const nsRect &aRect, bool aRepaintExposedAreaOnly = false);
-
-  NS_IMETHOD  SetViewFloating(nsView *aView, bool aFloating);
-
-  NS_IMETHOD  SetViewVisibility(nsView *aView, nsViewVisibility aVisible);
-
-  NS_IMETHOD  SetViewZIndex(nsView *aView, bool aAuto, int32_t aZIndex, bool aTopMost=false);
-
-  virtual void SetPresShell(nsIPresShell *aPresShell) { mPresShell = aPresShell; }
-  virtual nsIPresShell* GetPresShell() { return mPresShell; }
-
-  NS_IMETHOD  GetDeviceContext(nsDeviceContext *&aContext);
-
-  virtual nsIViewManager* IncrementDisableRefreshCount();
-  virtual void DecrementDisableRefreshCount();
-
-  NS_IMETHOD GetRootWidget(nsIWidget **aWidget);
- 
-  NS_IMETHOD IsPainting(bool& aIsPainting);
-  NS_IMETHOD GetLastUserEventTime(uint32_t& aTime);
-  static uint32_t gLastUserEventTime;
-
-  /* Update the cached RootViewManager pointer on this view manager. */
-  void InvalidateHierarchy();
-
-  virtual void ProcessPendingUpdates();
-  virtual void UpdateWidgetGeometry();
-
-protected:
-  virtual ~nsViewManager();
-
-private:
-
-  void FlushPendingInvalidates();
-  void ProcessPendingUpdatesForView(nsView *aView,
-                                    bool aFlushDirtyRegion = true);
-  void FlushDirtyRegionToWidget(nsView* aView);
-  /**
-   * Call WillPaint() on all view observers under this vm root.
-   */
-  void CallWillPaintOnObservers(bool aWillSendDidPaint);
-  void ReparentChildWidgets(nsView* aView, nsIWidget *aNewWidget);
-  void ReparentWidgets(nsView* aView, nsView *aParent);
-  void InvalidateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedRegion);
-
-  void InvalidateViews(nsView *aView);
-
-  // aView is the view for aWidget and aRegion is relative to aWidget.
-  void Refresh(nsView *aView, const nsIntRegion& aRegion, bool aWillSendDidPaint);
-
-  void InvalidateRectDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut);
-  void InvalidateHorizontalBandDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut,
-                                          nscoord aY1, nscoord aY2, bool aInCutOut);
-
-  // Utilities
-
-  bool IsViewInserted(nsView *aView);
-
-  /**
-   * Intersects aRect with aView's bounds and then transforms it from aView's
-   * coordinate system to the coordinate system of the widget attached to
-   * aView.
-   */
-  nsIntRect ViewToWidget(nsView *aView, const nsRect &aRect) const;
-
-  void DoSetWindowDimensions(nscoord aWidth, nscoord aHeight);
-
-  bool IsPainting() const {
-    return RootViewManager()->mPainting;
-  }
-
-  void SetPainting(bool aPainting) {
-    RootViewManager()->mPainting = aPainting;
-  }
-
-  nsresult InvalidateView(nsView *aView, const nsRect &aRect);
-
-public: // NOT in nsIViewManager, so private to the view module
-  nsView* GetRootViewImpl() const { return mRootView; }
-  nsViewManager* RootViewManager() const { return mRootViewManager; }
-  bool IsRootVM() const { return this == RootViewManager(); }
-
-  // Whether synchronous painting is allowed at the moment. For example,
-  // widget geometry changes can cause synchronous painting, so they need to
-  // be deferred while refresh is disabled.
-  bool IsPaintingAllowed() { return RootViewManager()->mRefreshDisableCount == 0; }
-
-  void WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint);
-  bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion,
-                   uint32_t aFlags);
-  void DidPaintWindow();
-
-  // Call this when you need to let the viewmanager know that it now has
-  // pending updates.
-  void PostPendingUpdate();
-
-  uint32_t AppUnitsPerDevPixel() const
-  {
-    return mContext->AppUnitsPerDevPixel();
-  }
-
-private:
-  nsRefPtr<nsDeviceContext> mContext;
-  nsIPresShell   *mPresShell;
-
-  // The size for a resize that we delayed until the root view becomes
-  // visible again.
-  nsSize            mDelayedResize;
-
-  nsView           *mRootView;
-  // mRootViewManager is a strong ref unless it equals |this|.  It's
-  // never null (if we have no ancestors, it will be |this|).
-  nsViewManager     *mRootViewManager;
-
-  // The following members should not be accessed directly except by
-  // the root view manager.  Some have accessor functions to enforce
-  // this, as noted.
-  
-  int32_t           mRefreshDisableCount;
-  // Use IsPainting() and SetPainting() to access mPainting.
-  bool              mPainting;
-  bool              mRecursiveRefreshPending;
-  bool              mHasPendingWidgetGeometryChanges;
-  bool              mInScroll;
-
-  //from here to public should be static and locked... MMP
-  static int32_t           mVMCount;        //number of viewmanagers
-
-  //list of view managers
-  static nsVoidArray       *gViewManagers;
-};
-
-#endif /* nsViewManager_h___ */
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -18,17 +18,17 @@ using mozilla::dom::ContentChild;
 using mozilla::unused;
 
 #include "nsAppShell.h"
 #include "nsIdleService.h"
 #include "nsWindow.h"
 #include "nsIObserverService.h"
 #include "nsFocusManager.h"
 #include "nsIWidgetListener.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 
 #include "nsRenderingContext.h"
 #include "nsIDOMSimpleGestureEvent.h"
 #include "nsDOMTouchEvent.h"
 
 #include "nsGkAtoms.h"
 #include "nsWidgetsCID.h"
 #include "nsGfxCIID.h"
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -18,17 +18,17 @@
 
 #include "nsObjCExceptions.h"
 #include "nsCOMPtr.h"
 #include "nsToolkit.h"
 #include "nsCRT.h"
 
 #include "nsFontMetrics.h"
 #include "nsIRollupListener.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIFile.h"
 #include "nsILocalFileMac.h"
 #include "nsGfxCIID.h"
 #include "nsIDOMSimpleGestureEvent.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsThemeConstants.h"
 #include "nsIWidgetListener.h"
--- a/widget/gtk2/nsDragService.cpp
+++ b/widget/gtk2/nsDragService.cpp
@@ -26,17 +26,17 @@
 
 #include "gfxASurface.h"
 #include "gfxXlibSurface.h"
 #include "gfxContext.h"
 #include "nsImageToPixbuf.h"
 #include "nsPresContext.h"
 #include "nsIDocument.h"
 #include "nsISelection.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIFrame.h"
 
 // This sets how opaque the drag image is
 #define DRAG_IMAGE_ALPHA_LEVEL 0.5
 
 // These values are copied from GtkDragResult (rather than using GtkDragResult
 // directly) so that this code can be compiled against versions of GTK+ that
 // do not have GtkDragResult.
@@ -264,17 +264,17 @@ GetGtkWindow(nsIDOMDocument *aDocument)
     nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDocument);
     if (!doc)
         return NULL;
 
     nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
     if (!presShell)
         return NULL;
 
-    nsCOMPtr<nsIViewManager> vm = presShell->GetViewManager();
+    nsCOMPtr<nsViewManager> vm = presShell->GetViewManager();
     if (!vm)
         return NULL;
 
     nsCOMPtr<nsIWidget> widget;
     vm->GetRootWidget(getter_AddRefs(widget));
     if (!widget)
         return NULL;
 
--- a/widget/gtk2/nsNativeThemeGTK.cpp
+++ b/widget/gtk2/nsNativeThemeGTK.cpp
@@ -7,17 +7,17 @@
 #include "nsThemeConstants.h"
 #include "gtkdrawing.h"
 
 #include "nsIObserverService.h"
 #include "nsIServiceManager.h"
 #include "nsIFrame.h"
 #include "nsIPresShell.h"
 #include "nsIContent.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsINameSpaceManager.h"
 #include "nsGfxCIID.h"
 #include "nsTransform2D.h"
 #include "nsMenuFrame.h"
 #include "prlink.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsRenderingContext.h"
 #include "nsGkAtoms.h"
@@ -70,17 +70,17 @@ nsNativeThemeGTK::Observe(nsISupports *a
 
 void
 nsNativeThemeGTK::RefreshWidgetWindow(nsIFrame* aFrame)
 {
   nsIPresShell *shell = GetPresShell(aFrame);
   if (!shell)
     return;
 
-  nsIViewManager* vm = shell->GetViewManager();
+  nsViewManager* vm = shell->GetViewManager();
   if (!vm)
     return;
  
   vm->InvalidateAllViews();
 }
 
 static bool IsFrameContentNodeInNamespace(nsIFrame *aFrame, uint32_t aNamespace)
 {
--- a/widget/tests/TestWinTSF.cpp
+++ b/widget/tests/TestWinTSF.cpp
@@ -60,17 +60,17 @@ template<class T> class nsReadingIterato
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLBodyElement.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsIDOMElement.h"
 #include "nsISelectionController.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsTArray.h"
 #include "nsGUIEvent.h"
 
 #ifndef MOZILLA_INTERNAL_API
 #undef nsString_h___
 #undef nsAString_h___
 #undef nsReadableUtils_h___
 #endif
@@ -3139,17 +3139,17 @@ TestApp::GetWidget(nsIWidget** aWidget)
   }
 
   nsCOMPtr<nsIPresShell> presShell;
   rv = docShell->GetPresShell(getter_AddRefs(presShell));
   if (NS_FAILED(rv) || !presShell) {
     return false;
   }
 
-  nsCOMPtr<nsIViewManager> viewManager = presShell->GetViewManager();
+  nsCOMPtr<nsViewManager> viewManager = presShell->GetViewManager();
   if (!viewManager) {
     return false;
   }
 
   rv = viewManager->GetRootWidget(aWidget);
   return (NS_SUCCEEDED(rv) && aWidget);
 }
 
--- a/widget/xpwidgets/nsBaseDragService.cpp
+++ b/widget/xpwidgets/nsBaseDragService.cpp
@@ -13,17 +13,17 @@
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsCOMPtr.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIFrame.h"
 #include "nsIDocument.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
-#include "nsIViewManager.h"
+#include "nsViewManager.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMDragEvent.h"
 #include "nsISelection.h"
 #include "nsISelectionPrivate.h"
 #include "nsPresContext.h"
 #include "nsIDOMDataTransfer.h"
 #include "nsICanvasElementExternal.h"
 #include "nsIImageLoadingContent.h"