зеркало из https://github.com/mozilla/gecko-dev.git
Bug 993930 - Do not assume TabChild::mInnerSize being (0, 0) means it's never been initialized. r=kats
This commit is contained in:
Родитель
0d4074194a
Коммит
fe94a83a74
|
@ -147,12 +147,6 @@ TabChildBase::InitializeRootMetrics()
|
|||
mLastRootMetrics.SetScrollOffset(CSSPoint(0, 0));
|
||||
}
|
||||
|
||||
bool
|
||||
TabChildBase::HasValidInnerSize()
|
||||
{
|
||||
return (mInnerSize.width != 0) && (mInnerSize.height != 0);
|
||||
}
|
||||
|
||||
void
|
||||
TabChildBase::SetCSSViewport(const CSSSize& aSize)
|
||||
{
|
||||
|
@ -696,6 +690,7 @@ TabChild::TabChild(ContentChild* aManager, const TabContext& aContext, uint32_t
|
|||
, mWaitingTouchListeners(false)
|
||||
, mIgnoreKeyPressEvent(false)
|
||||
, mActiveElementManager(new ActiveElementManager())
|
||||
, mHasValidInnerSize(false)
|
||||
{
|
||||
if (!sActiveDurationMsSet) {
|
||||
Preferences::AddIntVarCache(&sActiveDurationMs,
|
||||
|
@ -1288,6 +1283,12 @@ TabChild::BrowserFrameProvideWindow(nsIDOMWindow* aOpener,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::HasValidInnerSize()
|
||||
{
|
||||
return mHasValidInnerSize;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
PContentPermissionRequestChild*
|
||||
TabChild:: SendPContentPermissionRequestConstructor(PContentPermissionRequestChild* aActor,
|
||||
|
@ -1614,6 +1615,9 @@ TabChild::RecvUpdateDimensions(const nsRect& rect, const nsIntSize& size, const
|
|||
|
||||
bool initialSizing = !HasValidInnerSize()
|
||||
&& (size.width != 0 && size.height != 0);
|
||||
if (initialSizing) {
|
||||
mHasValidInnerSize = true;
|
||||
}
|
||||
|
||||
mOrientation = orientation;
|
||||
mInnerSize = ScreenIntSize::FromUnknownSize(
|
||||
|
|
|
@ -205,7 +205,6 @@ protected:
|
|||
|
||||
nsEventStatus DispatchWidgetEvent(WidgetGUIEvent& event);
|
||||
|
||||
bool HasValidInnerSize();
|
||||
void InitializeRootMetrics();
|
||||
|
||||
mozilla::layers::FrameMetrics ProcessUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics);
|
||||
|
@ -522,6 +521,8 @@ private:
|
|||
bool* aWindowIsNew,
|
||||
nsIDOMWindow** aReturn);
|
||||
|
||||
bool HasValidInnerSize();
|
||||
|
||||
class CachedFileDescriptorInfo;
|
||||
class CachedFileDescriptorCallbackRunnable;
|
||||
|
||||
|
@ -560,6 +561,7 @@ private:
|
|||
|
||||
bool mIgnoreKeyPressEvent;
|
||||
nsRefPtr<ActiveElementManager> mActiveElementManager;
|
||||
bool mHasValidInnerSize;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче