diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index 82a493ac87c..d53eca5446f 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -1021,7 +1021,7 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size, mRemoteBrowserInitialized = true; } } else { - nsRect dimensions; + nsIntRect dimensions; NS_ENSURE_SUCCESS(GetWindowDimensions(dimensions), false); // Don't show remote iframe if we are waiting for the completion of reflow. @@ -1877,7 +1877,7 @@ nsFrameLoader::CheckForRecursiveLoad(nsIURI* aURI) } nsresult -nsFrameLoader::GetWindowDimensions(nsRect& aRect) +nsFrameLoader::GetWindowDimensions(nsIntRect& aRect) { // Need to get outer window position here nsIDocument* doc = mOwnerContent->GetDocument(); @@ -1917,7 +1917,7 @@ nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame *aIFrame) if (mRemoteFrame) { if (mRemoteBrowser) { nsIntSize size = aIFrame->GetSubdocumentSize(); - nsRect dimensions; + nsIntRect dimensions; NS_ENSURE_SUCCESS(GetWindowDimensions(dimensions), NS_ERROR_FAILURE); mRemoteBrowser->UpdateDimensions(dimensions, size); } diff --git a/content/base/src/nsFrameLoader.h b/content/base/src/nsFrameLoader.h index 08a05914573..6384b4b499e 100644 --- a/content/base/src/nsFrameLoader.h +++ b/content/base/src/nsFrameLoader.h @@ -370,7 +370,7 @@ private: nsresult EnsureMessageManager(); // Properly retrieves documentSize of any subdocument type. - nsresult GetWindowDimensions(nsRect& aRect); + nsresult GetWindowDimensions(nsIntRect& aRect); // Updates the subdocument position and size. This gets called only // when we have our own in-process DocShell. diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index af21e3ca82e..fb24f9d89d2 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -406,7 +406,7 @@ child: CacheFileDescriptor(nsString path, FileDescriptor fd); - UpdateDimensions(nsRect rect, nsIntSize size, ScreenOrientation orientation) compress; + UpdateDimensions(nsIntRect rect, nsIntSize size, ScreenOrientation orientation) compress; UpdateFrame(FrameMetrics frame); diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index f7e51bf67b9..2bfed37c7ba 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1743,16 +1743,13 @@ TabChild::RecvShow(const nsIntSize& size) } bool -TabChild::RecvUpdateDimensions(const nsRect& rect, const nsIntSize& size, const ScreenOrientation& orientation) +TabChild::RecvUpdateDimensions(const nsIntRect& 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; + mOuterRect = rect; bool initialSizing = !HasValidInnerSize() && (size.width != 0 && size.height != 0); diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 35447c3a197..ec55dc6a5ef 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -318,7 +318,7 @@ public: const FileDescriptor& aFileDescriptor) MOZ_OVERRIDE; virtual bool RecvShow(const nsIntSize& size) MOZ_OVERRIDE; - virtual bool RecvUpdateDimensions(const nsRect& rect, + virtual bool RecvUpdateDimensions(const nsIntRect& rect, const nsIntSize& size, const ScreenOrientation& orientation) MOZ_OVERRIDE; virtual bool RecvUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics) MOZ_OVERRIDE; diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index a5e166ea787..1ec2a3116ff 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -560,7 +560,7 @@ TabParent::Show(const nsIntSize& size) } void -TabParent::UpdateDimensions(const nsRect& rect, const nsIntSize& size) +TabParent::UpdateDimensions(const nsIntRect& rect, const nsIntSize& size) { if (mIsDestroyed) { return; diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index f7c81ea7105..1ee0c3002b9 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -208,7 +208,7 @@ public: // message-sending functions under a layer of indirection and // eating the return values void Show(const nsIntSize& size); - void UpdateDimensions(const nsRect& rect, const nsIntSize& size); + void UpdateDimensions(const nsIntRect& rect, const nsIntSize& size); void UpdateFrame(const layers::FrameMetrics& aFrameMetrics); void UIResolutionChanged(); void AcknowledgeScrollUpdate(const ViewID& aScrollId, const uint32_t& aScrollGeneration); @@ -374,7 +374,7 @@ protected: // The number of event series we're currently capturing. int32_t mEventCaptureDepth; - nsRect mRect; + nsIntRect mRect; nsIntSize mDimensions; ScreenOrientation mOrientation; float mDPI;