Backed out changeset bad6c063b01f (bug 932274) for build bustage
authorWes Kocher <wkocher@mozilla.com>
Mon, 04 Nov 2013 14:40:50 -0800
changeset 153436 6e221af28de237792c2a19ce2974656b0395a714
parent 153435 6213c08f1ba1b2d4ee34d835b6b7425e81640331
child 153437 a9f2271cc2af990df7be676e76064c13036483d0
child 153520 5ba522ec7f89657b8d4f4c66c9582a69ee85c3dc
push id35800
push userkwierso@gmail.com
push dateMon, 04 Nov 2013 22:41:21 +0000
treeherdermozilla-inbound@6e221af28de2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs932274
milestone28.0a1
backs outbad6c063b01f64a18986a847d71346cacf51a788
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset bad6c063b01f (bug 932274) for build bustage
content/base/src/nsFrameLoader.cpp
content/base/src/nsFrameLoader.h
content/canvas/public/DocumentRendererParent.h
content/canvas/src/DocumentRendererParent.cpp
dom/ipc/PBrowser.ipdl
dom/ipc/PDocumentRenderer.ipdl
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
gfx/ipc/GfxMessageUtils.h
gfx/layers/ipc/LayersSurfaces.ipdlh
gfx/layers/ipc/ShadowLayerUtilsMac.cpp
gfx/layers/ipc/ShadowLayers.cpp
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -436,17 +436,17 @@ nsFrameLoader::ReallyStartLoadingInterna
       TryRemoteBrowser();
 
       if (!mRemoteBrowser) {
         NS_WARNING("Couldn't create child process for iframe.");
         return NS_ERROR_FAILURE;
       }
     }
 
-    if (mRemoteBrowserShown || ShowRemoteFrame(ScreenIntSize(0, 0))) {
+    if (mRemoteBrowserShown || ShowRemoteFrame(nsIntSize(0, 0))) {
       // FIXME get error codes from child
       mRemoteBrowser->LoadURL(mURIToLoad);
     } else {
       NS_WARNING("[nsFrameLoader] ReallyStartLoadingInternal tried but couldn't show remote browser.\n");
     }
 
     return NS_OK;
   }
@@ -823,17 +823,17 @@ nsFrameLoader::Show(int32_t marginWidth,
                                     NS_FRAME_IS_DIRTY);
       }
       return true;
     }
   }
 
   nsIntSize size = frame->GetSubdocumentSize();
   if (mRemoteFrame) {
-    return ShowRemoteFrame(ScreenIntSize(size.width, size.height), frame);
+    return ShowRemoteFrame(size, frame);
   }
 
   nsView* view = frame->EnsureInnerView();
   if (!view)
     return false;
 
   nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mDocShell);
   NS_ASSERTION(baseWindow, "Found a nsIDocShell that isn't a nsIBaseWindow.");
@@ -913,17 +913,17 @@ nsFrameLoader::MarginsChanged(uint32_t a
   // Trigger a restyle if there's a prescontext
   nsRefPtr<nsPresContext> presContext;
   mDocShell->GetPresContext(getter_AddRefs(presContext));
   if (presContext)
     presContext->RebuildAllStyleData(nsChangeHint(0));
 }
 
 bool
-nsFrameLoader::ShowRemoteFrame(const ScreenIntSize& size,
+nsFrameLoader::ShowRemoteFrame(const nsIntSize& size,
                                nsSubDocumentFrame *aFrame)
 {
   NS_ASSERTION(mRemoteFrame, "ShowRemote only makes sense on remote frames.");
 
   if (!mRemoteBrowser) {
     TryRemoteBrowser();
 
     if (!mRemoteBrowser) {
@@ -1834,18 +1834,17 @@ nsFrameLoader::GetWindowDimensions(nsRec
 NS_IMETHODIMP
 nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame *aIFrame)
 {
   if (mRemoteFrame) {
     if (mRemoteBrowser) {
       nsIntSize size = aIFrame->GetSubdocumentSize();
       nsRect dimensions;
       NS_ENSURE_SUCCESS(GetWindowDimensions(dimensions), NS_ERROR_FAILURE);
-      mRemoteBrowser->UpdateDimensions(dimensions,
-                                       ScreenIntSize(size.width, size.height));
+      mRemoteBrowser->UpdateDimensions(dimensions, size);
     }
     return NS_OK;
   }
   return UpdateBaseWindowPositionAndSize(aIFrame);
 }
 
 nsresult
 nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame)
@@ -2452,17 +2451,17 @@ nsFrameLoader::GetChildID(uint64_t* aChi
 void
 nsFrameLoader::SetRemoteBrowser(nsITabParent* aTabParent)
 {
   MOZ_ASSERT(!mRemoteBrowser);
   MOZ_ASSERT(!mCurrentRemoteFrame);
   mRemoteFrame = true;
   mRemoteBrowser = static_cast<TabParent*>(aTabParent);
   mChildID = mRemoteBrowser ? mRemoteBrowser->Manager()->ChildID() : 0;
-  ShowRemoteFrame(ScreenIntSize(0, 0));
+  ShowRemoteFrame(nsIntSize(0, 0));
 }
 
 void
 nsFrameLoader::SetDetachedSubdocView(nsView* aDetachedViews,
                                      nsIDocument* aContainerDoc)
 {
   mDetachedSubdocViews = aDetachedViews;
   mContainerDocWhileDetached = aContainerDoc;
--- a/content/base/src/nsFrameLoader.h
+++ b/content/base/src/nsFrameLoader.h
@@ -370,17 +370,17 @@ private:
   nsresult CheckURILoad(nsIURI* aURI);
   void FireErrorEvent();
   nsresult ReallyStartLoadingInternal();
 
   // Return true if remote browser created; nothing else to do
   bool TryRemoteBrowser();
 
   // Tell the remote browser that it's now "virtually visible"
-  bool ShowRemoteFrame(const mozilla::ScreenIntSize& size,
+  bool ShowRemoteFrame(const nsIntSize& size,
                        nsSubDocumentFrame *aFrame = nullptr);
 
   bool AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem,
                               nsIDocShellTreeOwner* aOwner,
                               int32_t aParentType,
                               nsIDocShellTreeNode* aParentNode);
 
   nsIAtom* TypeAttrName() const {
--- a/content/canvas/public/DocumentRendererParent.h
+++ b/content/canvas/public/DocumentRendererParent.h
@@ -18,20 +18,20 @@ namespace ipc {
 class DocumentRendererParent : public PDocumentRendererParent
 {
 public:
     DocumentRendererParent();
     virtual ~DocumentRendererParent();
 
     void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
 			  gfxContext* ctx);
-    void DrawToCanvas(const gfx::IntSize& renderedSize,
+    void DrawToCanvas(const nsIntSize& renderedSize,
 		      const nsCString& aData);
 
-    virtual bool Recv__delete__(const gfx::IntSize& renderedSize,
+    virtual bool Recv__delete__(const nsIntSize& renderedSize,
                                 const nsCString& data);
 
 private:
     nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
     nsRefPtr<gfxContext> mCanvasContext;
 
     DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
 };
--- a/content/canvas/src/DocumentRendererParent.cpp
+++ b/content/canvas/src/DocumentRendererParent.cpp
@@ -1,42 +1,41 @@
 /* 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 "mozilla/ipc/DocumentRendererParent.h"
 #include "gfxImageSurface.h"
 #include "gfxPattern.h"
 #include "nsICanvasRenderingContextInternal.h"
-#include "gfx2DGlue.h"
 
 using namespace mozilla::ipc;
 
 DocumentRendererParent::DocumentRendererParent()
 {}
 
 DocumentRendererParent::~DocumentRendererParent()
 {}
 
 void DocumentRendererParent::SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
                                               gfxContext* ctx)
 {
     mCanvas = aCanvas;
     mCanvasContext = ctx;
 }
 
-void DocumentRendererParent::DrawToCanvas(const gfx::IntSize& aSize,
+void DocumentRendererParent::DrawToCanvas(const nsIntSize& aSize,
                                           const nsCString& aData)
 {
     if (!mCanvas || !mCanvasContext)
         return;
 
     nsRefPtr<gfxImageSurface> surf =
         new gfxImageSurface(reinterpret_cast<uint8_t*>(const_cast<nsCString&>(aData).BeginWriting()),
-                            ThebesIntSize(aSize),
+                            gfxIntSize(aSize.width, aSize.height),
                             aSize.width * 4,
                             gfxImageFormatARGB32);
     nsRefPtr<gfxPattern> pat = new gfxPattern(surf);
 
     gfxRect rect(gfxPoint(0, 0), gfxSize(aSize.width, aSize.height));
     mCanvasContext->NewPath();
     mCanvasContext->PixelSnappedRectangleAndSetPattern(rect, pat);
     mCanvasContext->Fill();
@@ -45,14 +44,14 @@ void DocumentRendererParent::DrawToCanva
     // likely to go away shortly
     mCanvasContext->SetColor(gfxRGBA(1,1,1,1));
 
     gfxRect damageRect = mCanvasContext->UserToDevice(rect);
     mCanvas->Redraw(damageRect);
 }
 
 bool
-DocumentRendererParent::Recv__delete__(const gfx::IntSize& renderedSize,
+DocumentRendererParent::Recv__delete__(const nsIntSize& renderedSize,
                                        const nsCString& data)
 {
     DrawToCanvas(renderedSize, data);
     return true;
 }
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -27,30 +27,29 @@ using FrameMetrics::ViewID from "FrameMe
 using mozilla::layout::ScrollingBehavior from "mozilla/layout/RenderFrameUtils.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
 using nscolor from "nsColor.h";
 using class mozilla::WidgetCompositionEvent from "ipc/nsGUIEventIPC.h";
 using struct nsIMEUpdatePreference from "nsIWidget.h";
 using struct nsIntPoint from "nsPoint.h";
 using struct nsIntRect from "nsRect.h";
+using struct nsIntSize from "nsSize.h";
 using class mozilla::WidgetKeyboardEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetWheelEvent from "ipc/nsGUIEventIPC.h";
 using struct nsRect from "nsRect.h";
 using class mozilla::WidgetSelectionEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetTextEvent from "ipc/nsGUIEventIPC.h";
 using class mozilla::WidgetTouchEvent from "ipc/nsGUIEventIPC.h";
 using struct mozilla::dom::RemoteDOMEvent from "mozilla/dom/TabMessageUtils.h";
 using mozilla::dom::ScreenOrientation from "mozilla/dom/ScreenOrientation.h";
 using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
-using CSSIntPoint from "Units.h";
-using CSSToScreenScale from "Units.h";
-using ScreenIntSize from "Units.h";
-using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
+using mozilla::CSSIntPoint from "Units.h";
+using mozilla::CSSToScreenScale from "Units.h";
 
 namespace mozilla {
 namespace dom {
 
 intr protocol PBrowser
 {
     manager PContent;
 
@@ -313,23 +312,23 @@ child:
      * Notify the remote browser that it has been Show()n on this
      * side, with the given |visibleRect|.  This message is expected
      * to trigger creation of the remote browser's "widget".
      *
      * |Show()| and |Move()| take IntSizes rather than Rects because
      * content processes always render to a virtual <0, 0> top-left
      * point.
      */
-    Show(ScreenIntSize size);
+    Show(nsIntSize size);
 
     LoadURL(nsCString uri);
 
     CacheFileDescriptor(nsString path, FileDescriptor fd);
 
-    UpdateDimensions(nsRect rect, ScreenIntSize size, ScreenOrientation orientation) compress;
+    UpdateDimensions(nsRect rect, nsIntSize size, ScreenOrientation orientation) compress;
 
     UpdateFrame(FrameMetrics frame) compress;
 
     /**
      * Requests handling of a double tap. |point| is in CSS pixels, relative to
      * the scroll offset. This message is expected to round-trip back to
      * ZoomToRect() with a rect indicating where we should zoom to.
      */
@@ -408,17 +407,17 @@ child:
      * default background color |bgcolor|.  |renderFlags| are the
      * nsIPresShell::RenderDocument() flags to use on the remote side,
      * and if true, |flushLayout| will do just that before rendering
      * the document.  The rendered image will be of size |renderSize|.
      */
     PDocumentRenderer(nsRect documentRect, gfxMatrix transform,
                       nsString bgcolor,
                       uint32_t renderFlags, bool flushLayout,
-                      IntSize renderSize);
+                      nsIntSize renderSize);
 
     /**
      * Sent by the chrome process when it no longer wants this remote
      * <browser>.  The child side cleans up in response, then
      * finalizing its death by sending back __delete__() to the
      * parent.
      */
     Destroy();
--- a/dom/ipc/PDocumentRenderer.ipdl
+++ b/dom/ipc/PDocumentRenderer.ipdl
@@ -2,24 +2,24 @@
 /* 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 protocol PBrowser;
 
 include "mozilla/GfxMessageUtils.h";
 
-using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
+using struct nsIntSize from "nsSize.h";
 
 namespace mozilla {
 namespace ipc {
 
 protocol PDocumentRenderer
 {
   manager PBrowser;
 
 parent:
     // Returns the width and height, in pixels, of the returned ARGB32 data.
-    __delete__(IntSize renderedSize, nsCString data);
+    __delete__(nsIntSize renderedSize, nsCString data);
 };
 
 } // namespace ipc
 } // namespace mozilla
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -65,17 +65,16 @@
 #include "PCOMContentPermissionRequestChild.h"
 #include "PuppetWidget.h"
 #include "StructuredCloneUtils.h"
 #include "nsViewportInfo.h"
 #include "JavaScriptChild.h"
 #include "APZCCallbackHelper.h"
 #include "nsILoadContext.h"
 #include "ipc/nsGUIEventIPC.h"
-#include "gfx2DGlue.h"
 
 #define BROWSER_ELEMENT_CHILD_SCRIPT \
     NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js")
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 using namespace mozilla::ipc;
@@ -1403,22 +1402,22 @@ TabChild::CancelCachedFileDescriptorCall
 
     // Set this flag so that we will close the file descriptor when it arrives.
     info->mCanceled = true;
 }
 
 void
 TabChild::DoFakeShow()
 {
-  RecvShow(ScreenIntSize(0, 0));
+  RecvShow(nsIntSize(0, 0));
   mDidFakeShow = true;
 }
 
 bool
-TabChild::RecvShow(const ScreenIntSize& size)
+TabChild::RecvShow(const nsIntSize& size)
 {
 
     if (mDidFakeShow) {
         return true;
     }
 
     nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mWebNav);
     if (!baseWindow) {
@@ -1435,29 +1434,30 @@ TabChild::RecvShow(const ScreenIntSize& 
     }
 
     baseWindow->SetVisibility(true);
 
     return InitTabChildGlobal();
 }
 
 bool
-TabChild::RecvUpdateDimensions(const nsRect& rect, const ScreenIntSize& size, const ScreenOrientation& orientation)
+TabChild::RecvUpdateDimensions(const nsRect& rect, const nsIntSize& size, const ScreenOrientation& orientation)
 {
     if (!mRemoteFrame) {
         return true;
     }
 
     mOuterRect.x = rect.x;
     mOuterRect.y = rect.y;
     mOuterRect.width = rect.width;
     mOuterRect.height = rect.height;
 
     mOrientation = orientation;
-    mInnerSize = size;
+    mInnerSize = ScreenIntSize::FromUnknownSize(
+      gfx::IntSize(size.width, size.height));
     mWidget->Resize(0, 0, size.width, size.height,
                     true);
 
     nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(mWebNav);
     baseWin->SetPositionAndSize(0, 0, size.width, size.height,
                                 true);
 
     HandlePossibleViewportChange();
@@ -1922,17 +1922,17 @@ TabChild::DispatchWidgetEvent(WidgetGUIE
 }
 
 PDocumentRendererChild*
 TabChild::AllocPDocumentRendererChild(const nsRect& documentRect,
                                       const gfxMatrix& transform,
                                       const nsString& bgcolor,
                                       const uint32_t& renderFlags,
                                       const bool& flushLayout,
-                                      const gfx::IntSize& renderSize)
+                                      const nsIntSize& renderSize)
 {
     return new DocumentRendererChild();
 }
 
 bool
 TabChild::DeallocPDocumentRendererChild(PDocumentRendererChild* actor)
 {
     delete actor;
@@ -1941,17 +1941,17 @@ TabChild::DeallocPDocumentRendererChild(
 
 bool
 TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
                                            const nsRect& documentRect,
                                            const gfxMatrix& transform,
                                            const nsString& bgcolor,
                                            const uint32_t& renderFlags,
                                            const bool& flushLayout,
-                                           const gfx::IntSize& renderSize)
+                                           const nsIntSize& renderSize)
 {
     DocumentRendererChild *render = static_cast<DocumentRendererChild *>(actor);
 
     nsCOMPtr<nsIWebBrowser> browser = do_QueryInterface(mWebNav);
     if (!browser)
         return true; // silently ignore
     nsCOMPtr<nsIDOMWindow> window;
     if (NS_FAILED(browser->GetContentDOMWindow(getter_AddRefs(window))) ||
@@ -1960,17 +1960,17 @@ TabChild::RecvPDocumentRendererConstruct
         return true; // silently ignore
     }
 
     nsCString data;
     bool ret = render->RenderDocument(window,
                                       documentRect, transform,
                                       bgcolor,
                                       renderFlags, flushLayout,
-                                      ThebesIntSize(renderSize), data);
+                                      renderSize, data);
     if (!ret)
         return true; // silently ignore
 
     return PDocumentRendererChild::Send__delete__(actor, renderSize, data);
 }
 
 PContentDialogChild*
 TabChild::AllocPContentDialogChild(const uint32_t&,
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -203,18 +203,18 @@ public:
                                     const nsAString& aMessage,
                                     const mozilla::dom::StructuredCloneData& aData,
                                     JS::Handle<JSObject *> aCpows) MOZ_OVERRIDE;
 
     virtual bool RecvLoadURL(const nsCString& uri);
     virtual bool RecvCacheFileDescriptor(const nsString& aPath,
                                          const FileDescriptor& aFileDescriptor)
                                          MOZ_OVERRIDE;
-    virtual bool RecvShow(const ScreenIntSize& size);
-    virtual bool RecvUpdateDimensions(const nsRect& rect, const ScreenIntSize& size, const ScreenOrientation& orientation);
+    virtual bool RecvShow(const nsIntSize& size);
+    virtual bool RecvUpdateDimensions(const nsRect& rect, const nsIntSize& size, const ScreenOrientation& orientation);
     virtual bool RecvUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics);
     virtual bool RecvHandleDoubleTap(const CSSIntPoint& aPoint);
     virtual bool RecvHandleSingleTap(const CSSIntPoint& aPoint);
     virtual bool RecvHandleLongTap(const CSSIntPoint& aPoint);
     virtual bool RecvActivate();
     virtual bool RecvDeactivate();
     virtual bool RecvMouseEvent(const nsString& aType,
                                 const float&    aX,
@@ -241,25 +241,25 @@ public:
     virtual bool RecvAsyncMessage(const nsString& aMessage,
                                   const ClonedMessageData& aData,
                                   const InfallibleTArray<CpowEntry>& aCpows);
 
     virtual PDocumentRendererChild*
     AllocPDocumentRendererChild(const nsRect& documentRect, const gfxMatrix& transform,
                                 const nsString& bgcolor,
                                 const uint32_t& renderFlags, const bool& flushLayout,
-                                const gfx::IntSize& renderSize);
+                                const nsIntSize& renderSize);
     virtual bool DeallocPDocumentRendererChild(PDocumentRendererChild* actor);
     virtual bool RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
                                                   const nsRect& documentRect,
                                                   const gfxMatrix& transform,
                                                   const nsString& bgcolor,
                                                   const uint32_t& renderFlags,
                                                   const bool& flushLayout,
-                                                  const gfx::IntSize& renderSize);
+                                                  const nsIntSize& renderSize);
 
     virtual PContentDialogChild* AllocPContentDialogChild(const uint32_t&,
                                                           const nsCString&,
                                                           const nsCString&,
                                                           const InfallibleTArray<int>&,
                                                           const InfallibleTArray<nsString>&);
     virtual bool DeallocPContentDialogChild(PContentDialogChild* aDialog);
     static void ParamsToArrays(nsIDialogParamBlock* aParams,
@@ -402,17 +402,17 @@ private:
 
     enum FrameScriptLoading { DONT_LOAD_SCRIPTS, DEFAULT_LOAD_SCRIPTS };
     bool InitTabChildGlobal(FrameScriptLoading aScriptLoading = DEFAULT_LOAD_SCRIPTS);
     bool InitRenderingState();
     void DestroyWindow();
     void SetProcessNameToAppName();
     bool ProcessUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics);
 
-    // Call RecvShow(ScreenIntSize(0, 0)) and block future calls to RecvShow().
+    // Call RecvShow(nsIntSize(0, 0)) and block future calls to RecvShow().
     void DoFakeShow();
 
     // Wrapper for nsIDOMWindowUtils.setCSSViewport(). This updates some state
     // variables local to this class before setting it.
     void SetCSSViewport(const CSSSize& aSize);
 
     // Recalculates the display state, including the CSS
     // viewport. This should be called whenever we believe the
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -51,17 +51,16 @@
 #include "nsPrintfCString.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "private/pprio.h"
 #include "StructuredCloneUtils.h"
 #include "JavaScriptParent.h"
 #include "TabChild.h"
 #include "nsNetCID.h"
-#include "gfx2DGlue.h"
 #include <algorithm>
 
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 using namespace mozilla::layers;
 using namespace mozilla::layout;
 using namespace mozilla::services;
 using namespace mozilla::widget;
@@ -444,28 +443,28 @@ TabParent::LoadURL(nsIURI* aURI)
                     new OpenFileAndSendFDRunnable(path, this);
                 openFileRunnable->Dispatch();
             }
         }
     }
 }
 
 void
-TabParent::Show(const ScreenIntSize& size)
+TabParent::Show(const nsIntSize& size)
 {
     // sigh
     mShown = true;
     mDimensions = size;
     if (!mIsDestroyed) {
       unused << SendShow(size);
     }
 }
 
 void
-TabParent::UpdateDimensions(const nsRect& rect, const ScreenIntSize& size)
+TabParent::UpdateDimensions(const nsRect& rect, const nsIntSize& size)
 {
   if (mIsDestroyed) {
     return;
   }
   hal::ScreenConfiguration config;
   hal::GetCurrentScreenConfiguration(&config);
   ScreenOrientation orientation = config.orientation();
 
@@ -473,17 +472,18 @@ TabParent::UpdateDimensions(const nsRect
       mDimensions != size || !mRect.IsEqualEdges(rect)) {
     mUpdatedDimensions = true;
     mRect = rect;
     mDimensions = size;
     mOrientation = orientation;
 
     unused << SendUpdateDimensions(mRect, mDimensions, mOrientation);
     if (RenderFrameParent* rfp = GetRenderFrame()) {
-      rfp->NotifyDimensionsChanged(mDimensions);
+      rfp->NotifyDimensionsChanged(ScreenIntSize::FromUnknownSize(
+        gfx::IntSize(mDimensions.width, mDimensions.height)));
     }
   }
 }
 
 void
 TabParent::UpdateFrame(const FrameMetrics& aFrameMetrics)
 {
   if (!mIsDestroyed) {
@@ -552,17 +552,17 @@ TabParent::SetDocShell(nsIDocShell *aDoc
 }
 
 PDocumentRendererParent*
 TabParent::AllocPDocumentRendererParent(const nsRect& documentRect,
                                         const gfxMatrix& transform,
                                         const nsString& bgcolor,
                                         const uint32_t& renderFlags,
                                         const bool& flushLayout,
-                                        const gfx::IntSize& renderSize)
+                                        const nsIntSize& renderSize)
 {
     return new DocumentRendererParent();
 }
 
 bool
 TabParent::DeallocPDocumentRendererParent(PDocumentRendererParent* actor)
 {
     delete actor;
@@ -1573,18 +1573,19 @@ TabParent::RecvBrowserFrameOpenWindow(PB
 
 bool
 TabParent::RecvPRenderFrameConstructor(PRenderFrameParent* actor,
                                        ScrollingBehavior* scrolling,
                                        TextureFactoryIdentifier* factoryIdentifier,
                                        uint64_t* layersId)
 {
   RenderFrameParent* rfp = GetRenderFrame();
-  if (mDimensions != ScreenIntSize() && rfp) {
-    rfp->NotifyDimensionsChanged(mDimensions);
+  if (mDimensions != nsIntSize() && rfp) {
+    rfp->NotifyDimensionsChanged(ScreenIntSize::FromUnknownSize(
+      gfx::IntSize(mDimensions.width, mDimensions.height)));
   }
 
   return true;
 }
 
 bool
 TabParent::RecvZoomToRect(const CSSRect& aRect)
 {
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -178,18 +178,18 @@ public:
       return true;
     }
 
 
     void LoadURL(nsIURI* aURI);
     // XXX/cjones: it's not clear what we gain by hiding these
     // message-sending functions under a layer of indirection and
     // eating the return values
-    void Show(const ScreenIntSize& size);
-    void UpdateDimensions(const nsRect& rect, const ScreenIntSize& size);
+    void Show(const nsIntSize& size);
+    void UpdateDimensions(const nsRect& rect, const nsIntSize& size);
     void UpdateFrame(const layers::FrameMetrics& aFrameMetrics);
     void HandleDoubleTap(const CSSIntPoint& aPoint);
     void HandleSingleTap(const CSSIntPoint& aPoint);
     void HandleLongTap(const CSSIntPoint& aPoint);
     void Activate();
     void Deactivate();
 
     bool MapEventCoordinatesForChildProcess(mozilla::WidgetEvent* aEvent);
@@ -206,17 +206,17 @@ public:
     bool SendMouseWheelEvent(mozilla::WidgetWheelEvent& event);
     bool SendRealKeyEvent(mozilla::WidgetKeyboardEvent& event);
     bool SendRealTouchEvent(WidgetTouchEvent& event);
 
     virtual PDocumentRendererParent*
     AllocPDocumentRendererParent(const nsRect& documentRect, const gfxMatrix& transform,
                                  const nsString& bgcolor,
                                  const uint32_t& renderFlags, const bool& flushLayout,
-                                 const gfx::IntSize& renderSize);
+                                 const nsIntSize& renderSize);
     virtual bool DeallocPDocumentRendererParent(PDocumentRendererParent* actor);
 
     virtual PContentPermissionRequestParent*
     AllocPContentPermissionRequestParent(const nsCString& aType, const nsCString& aAccess, const IPC::Principal& aPrincipal);
     virtual bool DeallocPContentPermissionRequestParent(PContentPermissionRequestParent* actor);
 
     virtual POfflineCacheUpdateParent* AllocPOfflineCacheUpdateParent(
             const URIParams& aManifestURI,
@@ -313,17 +313,17 @@ protected:
     nsAutoString mIMECompositionText;
     uint32_t mIMECompositionStart;
     uint32_t mIMESeqno;
 
     // The number of event series we're currently capturing.
     int32_t mEventCaptureDepth;
 
     nsRect mRect;
-    ScreenIntSize mDimensions;
+    nsIntSize mDimensions;
     ScreenOrientation mOrientation;
     float mDPI;
     CSSToLayoutDeviceScale mDefaultScale;
     bool mShown;
     bool mUpdatedDimensions;
 
 private:
     already_AddRefed<nsFrameLoader> GetFrameLoader() const;
--- a/gfx/ipc/GfxMessageUtils.h
+++ b/gfx/ipc/GfxMessageUtils.h
@@ -426,52 +426,16 @@ struct ParamTraits< mozilla::gfx::IntPoi
 
   static bool Read(const Message* msg, void** iter, paramType* result)
   {
     return (ReadParam(msg, iter, &result->x) &&
             ReadParam(msg, iter, &result->y));
   }
 };
 
-template<class T>
-struct ParamTraits< mozilla::gfx::SizeTyped<T> >
-{
-  typedef mozilla::gfx::SizeTyped<T> paramType;
-
-  static void Write(Message* msg, const paramType& param)
-  {
-    WriteParam(msg, param.width);
-    WriteParam(msg, param.height);
-  }
-
-  static bool Read(const Message* msg, void** iter, paramType* result)
-  {
-    return (ReadParam(msg, iter, &result->width) &&
-            ReadParam(msg, iter, &result->height));
-  }
-};
-
-template<class T>
-struct ParamTraits< mozilla::gfx::IntSizeTyped<T> >
-{
-  typedef mozilla::gfx::IntSizeTyped<T> paramType;
-
-  static void Write(Message* msg, const paramType& param)
-  {
-    WriteParam(msg, param.width);
-    WriteParam(msg, param.height);
-  }
-
-  static bool Read(const Message* msg, void** iter, paramType* result)
-  {
-    return (ReadParam(msg, iter, &result->width) &&
-            ReadParam(msg, iter, &result->height));
-  }
-};
-
 template<>
 struct ParamTraits<mozilla::gfx::Size>
 {
   typedef mozilla::gfx::Size paramType;
 
   static void Write(Message* msg, const paramType& param)
   {
     WriteParam(msg, param.width);
--- a/gfx/layers/ipc/LayersSurfaces.ipdlh
+++ b/gfx/layers/ipc/LayersSurfaces.ipdlh
@@ -95,17 +95,17 @@ struct NewSurfaceDescriptorGralloc {
 // XXX - soon to be removed
 struct SurfaceDescriptorGralloc {
   PGrallocBuffer buffer;
   /**
    * android::GraphicBuffer has a size information. But there are cases
    * that GraphicBuffer's size and actual video's size are different.
    * Extra size member is necessary. See Bug 850566.
    */
-  IntSize size;
+  nsIntSize size;
 
   /**
    * We can have one source producing gralloc buffers and sharing them
    * with another source that may also produce its own gralloc buffers.
    * This happens for camera preview buffers sent to video code.  When
    * that happens, the producer can mark the buffer as "external" to
    * prevent its consumer from mistakenly freeing the buffer.
    */
@@ -139,17 +139,17 @@ struct RGBImage {
   Shmem data;
   nsIntRect picture;
   uint32_t rgbFormat;
   uint64_t owner;
 };
 
 struct MemoryImage {
   uintptr_t data;
-  IntSize size;
+  gfxIntSize size;
   uint32_t stride;
   uint32_t format;
 };
 
 /**
  * Used for shmem-backed YCbCr and (flavors of) RGBA textures
  */
 struct SurfaceDescriptorShmem {
--- a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp
@@ -8,17 +8,16 @@
 #include "mozilla/layers/PLayerTransaction.h"
 #include "mozilla/layers/ShadowLayers.h"
 #include "mozilla/layers/LayerManagerComposite.h"
 #include "mozilla/layers/CompositorTypes.h"
 
 #include "gfxPlatform.h"
 
 #include "gfxSharedQuartzSurface.h"
-#include "gfx2DGlue.h"
 
 using namespace mozilla::gl;
 
 namespace mozilla {
 namespace layers {
 
 bool
 ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
@@ -37,17 +36,17 @@ ShadowLayerForwarder::PlatformOpenDescri
     return gfxSharedQuartzSurface::Open(aSurface.get_Shmem());
   } else if (aSurface.type() == SurfaceDescriptor::TMemoryImage) {
     const MemoryImage& image = aSurface.get_MemoryImage();
     gfxImageFormat format
       = static_cast<gfxImageFormat>(image.format());
 
     nsRefPtr<gfxASurface> surf =
       new gfxQuartzSurface((unsigned char*)image.data(),
-                           ThebesIntSize(image.size()),
+                           image.size(),
                            image.stride(),
                            format);
     return surf.forget();
 
   }
   return nullptr;
 }
 
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -28,17 +28,16 @@
 #include "mozilla/layers/TextureClient.h"  // for TextureClient
 #include "mozilla/mozalloc.h"           // for operator new, etc
 #include "nsAutoPtr.h"                  // for nsRefPtr, getter_AddRefs, etc
 #include "nsDebug.h"                    // for NS_ABORT_IF_FALSE, etc
 #include "nsRect.h"                     // for nsIntRect
 #include "nsSize.h"                     // for nsIntSize
 #include "nsTArray.h"                   // for nsAutoTArray, nsTArray, etc
 #include "nsXULAppAPI.h"                // for XRE_GetProcessType, etc
-#include "gfx2DGlue.h"
 
 struct nsIntPoint;
 
 using namespace mozilla::ipc;
 using namespace mozilla::gl;
 using namespace mozilla::dom;
 
 namespace mozilla {
@@ -642,17 +641,17 @@ ShadowLayerForwarder::OpenDescriptor(Ope
                                rgbFormat);
     return surf.forget();
   }
   case SurfaceDescriptor::TMemoryImage: {
     const MemoryImage& image = aSurface.get_MemoryImage();
     gfxImageFormat format
       = static_cast<gfxImageFormat>(image.format());
     surf = new gfxImageSurface((unsigned char *)image.data(),
-                               ThebesIntSize(image.size()),
+                               image.size(),
                                image.stride(),
                                format);
     return surf.forget();
   }
   default:
     NS_ERROR("unexpected SurfaceDescriptor type!");
     return nullptr;
   }