Backed out changeset bad6c063b01f (bug 932274) for build bustage

This commit is contained in:
Wes Kocher 2013-11-04 14:40:50 -08:00
parent 6aea58d822
commit faf6d0ae9f
14 changed files with 48 additions and 88 deletions

View File

@ -441,7 +441,7 @@ nsFrameLoader::ReallyStartLoadingInternal()
}
}
if (mRemoteBrowserShown || ShowRemoteFrame(ScreenIntSize(0, 0))) {
if (mRemoteBrowserShown || ShowRemoteFrame(nsIntSize(0, 0))) {
// FIXME get error codes from child
mRemoteBrowser->LoadURL(mURIToLoad);
} else {
@ -828,7 +828,7 @@ nsFrameLoader::Show(int32_t marginWidth, int32_t marginHeight,
nsIntSize size = frame->GetSubdocumentSize();
if (mRemoteFrame) {
return ShowRemoteFrame(ScreenIntSize(size.width, size.height), frame);
return ShowRemoteFrame(size, frame);
}
nsView* view = frame->EnsureInnerView();
@ -918,7 +918,7 @@ nsFrameLoader::MarginsChanged(uint32_t aMarginWidth,
}
bool
nsFrameLoader::ShowRemoteFrame(const ScreenIntSize& size,
nsFrameLoader::ShowRemoteFrame(const nsIntSize& size,
nsSubDocumentFrame *aFrame)
{
NS_ASSERTION(mRemoteFrame, "ShowRemote only makes sense on remote frames.");
@ -1839,8 +1839,7 @@ nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame *aIFrame)
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;
}
@ -2457,7 +2456,7 @@ nsFrameLoader::SetRemoteBrowser(nsITabParent* aTabParent)
mRemoteFrame = true;
mRemoteBrowser = static_cast<TabParent*>(aTabParent);
mChildID = mRemoteBrowser ? mRemoteBrowser->Manager()->ChildID() : 0;
ShowRemoteFrame(ScreenIntSize(0, 0));
ShowRemoteFrame(nsIntSize(0, 0));
}
void

View File

@ -375,7 +375,7 @@ private:
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,

View File

@ -23,10 +23,10 @@ public:
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:

View File

@ -6,7 +6,6 @@
#include "gfxImageSurface.h"
#include "gfxPattern.h"
#include "nsICanvasRenderingContextInternal.h"
#include "gfx2DGlue.h"
using namespace mozilla::ipc;
@ -23,7 +22,7 @@ void DocumentRendererParent::SetCanvasContext(nsICanvasRenderingContextInternal*
mCanvasContext = ctx;
}
void DocumentRendererParent::DrawToCanvas(const gfx::IntSize& aSize,
void DocumentRendererParent::DrawToCanvas(const nsIntSize& aSize,
const nsCString& aData)
{
if (!mCanvas || !mCanvasContext)
@ -31,7 +30,7 @@ void DocumentRendererParent::DrawToCanvas(const gfx::IntSize& aSize,
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);
@ -50,7 +49,7 @@ void DocumentRendererParent::DrawToCanvas(const gfx::IntSize& aSize,
}
bool
DocumentRendererParent::Recv__delete__(const gfx::IntSize& renderedSize,
DocumentRendererParent::Recv__delete__(const nsIntSize& renderedSize,
const nsCString& data)
{
DrawToCanvas(renderedSize, data);

View File

@ -32,6 +32,7 @@ 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";
@ -42,10 +43,8 @@ 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 {
@ -318,13 +317,13 @@ child:
* 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;
@ -413,7 +412,7 @@ child:
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

View File

@ -7,7 +7,7 @@ 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 {
@ -18,7 +18,7 @@ protocol PDocumentRenderer
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

View File

@ -70,7 +70,6 @@
#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")
@ -1408,12 +1407,12 @@ TabChild::CancelCachedFileDescriptorCallback(
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) {
@ -1440,7 +1439,7 @@ TabChild::RecvShow(const ScreenIntSize& size)
}
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;
@ -1452,7 +1451,8 @@ TabChild::RecvUpdateDimensions(const nsRect& rect, const ScreenIntSize& size, co
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);
@ -1927,7 +1927,7 @@ TabChild::AllocPDocumentRendererChild(const nsRect& documentRect,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const gfx::IntSize& renderSize)
const nsIntSize& renderSize)
{
return new DocumentRendererChild();
}
@ -1946,7 +1946,7 @@ TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const gfx::IntSize& renderSize)
const nsIntSize& renderSize)
{
DocumentRendererChild *render = static_cast<DocumentRendererChild *>(actor);
@ -1965,7 +1965,7 @@ TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
documentRect, transform,
bgcolor,
renderFlags, flushLayout,
ThebesIntSize(renderSize), data);
renderSize, data);
if (!ret)
return true; // silently ignore

View File

@ -208,8 +208,8 @@ public:
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);
@ -246,7 +246,7 @@ public:
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,
@ -254,7 +254,7 @@ public:
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&,
@ -407,7 +407,7 @@ private:
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

View File

@ -56,7 +56,6 @@
#include "JavaScriptParent.h"
#include "TabChild.h"
#include "nsNetCID.h"
#include "gfx2DGlue.h"
#include <algorithm>
using namespace mozilla::dom;
@ -449,7 +448,7 @@ TabParent::LoadURL(nsIURI* aURI)
}
void
TabParent::Show(const ScreenIntSize& size)
TabParent::Show(const nsIntSize& size)
{
// sigh
mShown = true;
@ -460,7 +459,7 @@ TabParent::Show(const ScreenIntSize& size)
}
void
TabParent::UpdateDimensions(const nsRect& rect, const ScreenIntSize& size)
TabParent::UpdateDimensions(const nsRect& rect, const nsIntSize& size)
{
if (mIsDestroyed) {
return;
@ -478,7 +477,8 @@ TabParent::UpdateDimensions(const nsRect& rect, const ScreenIntSize& size)
unused << SendUpdateDimensions(mRect, mDimensions, mOrientation);
if (RenderFrameParent* rfp = GetRenderFrame()) {
rfp->NotifyDimensionsChanged(mDimensions);
rfp->NotifyDimensionsChanged(ScreenIntSize::FromUnknownSize(
gfx::IntSize(mDimensions.width, mDimensions.height)));
}
}
}
@ -557,7 +557,7 @@ TabParent::AllocPDocumentRendererParent(const nsRect& documentRect,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const gfx::IntSize& renderSize)
const nsIntSize& renderSize)
{
return new DocumentRendererParent();
}
@ -1578,8 +1578,9 @@ TabParent::RecvPRenderFrameConstructor(PRenderFrameParent* actor,
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;

View File

@ -183,8 +183,8 @@ public:
// 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);
@ -211,7 +211,7 @@ public:
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*
@ -318,7 +318,7 @@ protected:
int32_t mEventCaptureDepth;
nsRect mRect;
ScreenIntSize mDimensions;
nsIntSize mDimensions;
ScreenOrientation mOrientation;
float mDPI;
CSSToLayoutDeviceScale mDefaultScale;

View File

@ -431,42 +431,6 @@ struct ParamTraits< mozilla::gfx::IntPointTyped<T> >
}
};
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>
{

View File

@ -100,7 +100,7 @@ struct SurfaceDescriptorGralloc {
* 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
@ -144,7 +144,7 @@ struct RGBImage {
struct MemoryImage {
uintptr_t data;
IntSize size;
gfxIntSize size;
uint32_t stride;
uint32_t format;
};

View File

@ -13,7 +13,6 @@
#include "gfxPlatform.h"
#include "gfxSharedQuartzSurface.h"
#include "gfx2DGlue.h"
using namespace mozilla::gl;
@ -42,7 +41,7 @@ ShadowLayerForwarder::PlatformOpenDescriptor(OpenMode aMode,
nsRefPtr<gfxASurface> surf =
new gfxQuartzSurface((unsigned char*)image.data(),
ThebesIntSize(image.size()),
image.size(),
image.stride(),
format);
return surf.forget();

View File

@ -33,7 +33,6 @@
#include "nsSize.h" // for nsIntSize
#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc
#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc
#include "gfx2DGlue.h"
struct nsIntPoint;
@ -647,7 +646,7 @@ ShadowLayerForwarder::OpenDescriptor(OpenMode aMode,
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();