зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1331509 - Rearrange TabChild::RecvShow to make it a bit more obvious how InitRenderingState can be extracted. r=dvander
MozReview-Commit-ID: AnOnBd5Wqs9 --HG-- extra : rebase_source : 9fa73430c72c3fd6030b98a3dec385ef6eb5e1cf
This commit is contained in:
Родитель
ecefef8143
Коммит
77bdba2eb7
|
@ -1224,15 +1224,11 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
|
|||
const bool& aParentIsActive,
|
||||
const nsSizeMode& aSizeMode)
|
||||
{
|
||||
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
|
||||
|
||||
mPuppetWidget->SetSizeMode(aSizeMode);
|
||||
if (mDidFakeShow) {
|
||||
ApplyShowInfo(aInfo);
|
||||
RecvParentActivated(aParentIsActive);
|
||||
return IPC_OK();
|
||||
}
|
||||
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
|
||||
bool res = true;
|
||||
|
||||
mPuppetWidget->SetSizeMode(aSizeMode);
|
||||
if (!mDidFakeShow) {
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(WebNavigation());
|
||||
if (!baseWindow) {
|
||||
NS_ERROR("WebNavigation() doesn't QI to nsIBaseWindow");
|
||||
|
@ -1242,15 +1238,16 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
|
|||
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aRenderFrame);
|
||||
|
||||
baseWindow->SetVisibility(true);
|
||||
res = InitTabChildGlobal();
|
||||
}
|
||||
|
||||
bool res = InitTabChildGlobal();
|
||||
ApplyShowInfo(aInfo);
|
||||
RecvParentActivated(aParentIsActive);
|
||||
ApplyShowInfo(aInfo);
|
||||
RecvParentActivated(aParentIsActive);
|
||||
|
||||
if (!res) {
|
||||
return IPC_FAIL_NO_REASON(this);
|
||||
}
|
||||
return IPC_OK();
|
||||
if (!res) {
|
||||
return IPC_FAIL_NO_REASON(this);
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
|
Загрузка…
Ссылка в новой задаче