Bug 1153023 - Convert TabParent::mChromeOffset to a LayoutDeviceIntPoint. r=billm

This commit is contained in:
Kartikaya Gupta
2015-04-21 10:33:56 -04:00
parent 3b1d4f76f8
commit 15a83d407e
6 changed files with 8 additions and 9 deletions

View File

@@ -549,7 +549,7 @@ child:
CacheFileDescriptor(nsString path, FileDescriptor fd);
UpdateDimensions(nsIntRect rect, ScreenIntSize size, ScreenOrientation orientation,
nsIntPoint chromeDisp) compress;
LayoutDeviceIntPoint chromeDisp) compress;
UpdateFrame(FrameMetrics frame);

View File

@@ -2018,7 +2018,7 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
bool
TabChild::RecvUpdateDimensions(const nsIntRect& rect, const ScreenIntSize& size,
const ScreenOrientation& orientation, const nsIntPoint& chromeDisp)
const ScreenOrientation& orientation, const LayoutDeviceIntPoint& chromeDisp)
{
if (!mRemoteFrame) {
return true;

View File

@@ -322,7 +322,7 @@ public:
virtual bool RecvUpdateDimensions(const nsIntRect& rect,
const ScreenIntSize& size,
const ScreenOrientation& orientation,
const nsIntPoint& chromeDisp) override;
const LayoutDeviceIntPoint& chromeDisp) override;
virtual bool RecvUpdateFrame(const layers::FrameMetrics& aFrameMetrics) override;
virtual bool RecvRequestFlingSnap(const ViewID& aScrollId,
const CSSPoint& aDestination) override;
@@ -487,7 +487,7 @@ public:
bool DeallocPPluginWidgetChild(PPluginWidgetChild* aActor) override;
nsresult CreatePluginWidget(nsIWidget* aParent, nsIWidget** aOut);
nsIntPoint GetChromeDisplacement() { return mChromeDisp; };
LayoutDeviceIntPoint GetChromeDisplacement() { return mChromeDisp; };
bool IPCOpen() { return mIPCOpen; }
@@ -625,7 +625,7 @@ private:
bool mHasValidInnerSize;
bool mDestroyed;
// Position of tab, relative to parent widget (typically the window)
nsIntPoint mChromeDisp;
LayoutDeviceIntPoint mChromeDisp;
TabId mUniqueId;
float mDPI;
double mDefaultScale;

View File

@@ -270,7 +270,6 @@ TabParent::TabParent(nsIContentParent* aManager,
, mDPI(0)
, mDefaultScale(0)
, mUpdatedDimensions(false)
, mChromeOffset(0, 0)
, mManager(aManager)
, mMarkedDestroying(false)
, mIsDestroyed(false)
@@ -920,7 +919,7 @@ TabParent::UpdateDimensions(const nsIntRect& rect, const ScreenIntSize& size)
hal::ScreenConfiguration config;
hal::GetCurrentScreenConfiguration(&config);
ScreenOrientation orientation = config.orientation();
nsIntPoint chromeOffset = -LayoutDevicePixel::ToUntyped(GetChildProcessOffset());
LayoutDeviceIntPoint chromeOffset = -GetChildProcessOffset();
nsCOMPtr<nsIWidget> widget = GetWidget();
nsIntRect contentRect = rect;

View File

@@ -480,7 +480,7 @@ protected:
float mDPI;
CSSToLayoutDeviceScale mDefaultScale;
bool mUpdatedDimensions;
nsIntPoint mChromeOffset;
LayoutDeviceIntPoint mChromeOffset;
private:
already_AddRefed<nsFrameLoader> GetFrameLoader(bool aUseCachedFrameLoaderAfterDestroy = false) const;

View File

@@ -1115,7 +1115,7 @@ PuppetWidget::GetChromeDimensions()
NS_WARNING("PuppetWidget without Tab does not have chrome information.");
return nsIntPoint();
}
return GetOwningTabChild()->GetChromeDisplacement();
return LayoutDeviceIntPoint::ToUntyped(GetOwningTabChild()->GetChromeDisplacement());
}
nsIntPoint