mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 784908: Part 2: Add a call to UpdateDimensions when a tab is first created r=cjones
This commit is contained in:
parent
4b01b719b1
commit
3b4d96b28a
@ -83,6 +83,7 @@ TabParent::TabParent(mozIApplication* aApp, bool aIsBrowserElement)
|
||||
, mIMECompositionStart(0)
|
||||
, mIMESeqno(0)
|
||||
, mEventCaptureDepth(0)
|
||||
, mDimensions(0, 0)
|
||||
, mDPI(0)
|
||||
, mIsBrowserElement(aIsBrowserElement)
|
||||
, mShown(false)
|
||||
@ -229,6 +230,7 @@ TabParent::Show(const nsIntSize& size)
|
||||
{
|
||||
// sigh
|
||||
mShown = true;
|
||||
mDimensions = size;
|
||||
unused << SendShow(size);
|
||||
}
|
||||
|
||||
@ -239,6 +241,7 @@ TabParent::UpdateDimensions(const nsRect& rect, const nsIntSize& size)
|
||||
if (RenderFrameParent* rfp = GetRenderFrame()) {
|
||||
rfp->NotifyDimensionsChanged(size.width, size.height);
|
||||
}
|
||||
mDimensions = size;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1172,6 +1175,21 @@ TabParent::RecvBrowserFrameOpenWindow(PBrowserParent* aOpener,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvPRenderFrameConstructor(PRenderFrameParent* actor,
|
||||
ScrollingBehavior* scrolling,
|
||||
LayersBackend* backend,
|
||||
int32_t* maxTextureSize,
|
||||
uint64_t* layersId)
|
||||
{
|
||||
RenderFrameParent* rfp = GetRenderFrame();
|
||||
if (mDimensions != nsIntSize() && rfp) {
|
||||
rfp->NotifyDimensionsChanged(mDimensions.width, mDimensions.height);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvZoomToRect(const gfxRect& aRect)
|
||||
{
|
||||
|
@ -94,6 +94,11 @@ public:
|
||||
|
||||
virtual bool RecvMoveFocus(const bool& aForward);
|
||||
virtual bool RecvEvent(const RemoteDOMEvent& aEvent);
|
||||
virtual bool RecvPRenderFrameConstructor(PRenderFrameParent* actor,
|
||||
ScrollingBehavior* scrolling,
|
||||
LayersBackend* backend,
|
||||
int32_t* maxTextureSize,
|
||||
uint64_t* layersId);
|
||||
virtual bool RecvBrowserFrameOpenWindow(PBrowserParent* aOpener,
|
||||
const nsString& aURL,
|
||||
const nsString& aName,
|
||||
@ -269,6 +274,7 @@ protected:
|
||||
// The number of event series we're currently capturing.
|
||||
int32_t mEventCaptureDepth;
|
||||
|
||||
nsIntSize mDimensions;
|
||||
float mDPI;
|
||||
bool mIsBrowserElement;
|
||||
bool mShown;
|
||||
|
Loading…
Reference in New Issue
Block a user