зеркало из https://github.com/mozilla/gecko-dev.git
Bug 852501 part 17. Make ConstructRootFrame infallible. r=dholbert
This commit is contained in:
Родитель
4b08d55e3f
Коммит
ecaf1673f9
|
@ -2500,11 +2500,10 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
|||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsCSSFrameConstructor::ConstructRootFrame(nsIFrame** aNewFrame)
|
||||
nsIFrame*
|
||||
nsCSSFrameConstructor::ConstructRootFrame()
|
||||
{
|
||||
AUTO_LAYOUT_PHASE_ENTRY_POINT(mPresShell->GetPresContext(), FrameC);
|
||||
NS_PRECONDITION(aNewFrame, "null out param");
|
||||
|
||||
nsStyleSet *styleSet = mPresShell->StyleSet();
|
||||
|
||||
|
@ -2543,8 +2542,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIFrame** aNewFrame)
|
|||
mFixedContainingBlock->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
mFixedContainingBlock->MarkAsAbsoluteContainingBlock();
|
||||
|
||||
*aNewFrame = viewportFrame;
|
||||
return NS_OK;
|
||||
return viewportFrame;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -73,8 +73,7 @@ private:
|
|||
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy) MOZ_DELETE;
|
||||
|
||||
public:
|
||||
// XXXbz this method needs to actually return errors!
|
||||
nsresult ConstructRootFrame(nsIFrame** aNewFrame);
|
||||
nsIFrame* ConstructRootFrame();
|
||||
|
||||
nsresult ReconstructDocElementHierarchy();
|
||||
|
||||
|
|
|
@ -1701,7 +1701,7 @@ PresShell::Initialize(nscoord aWidth, nscoord aHeight)
|
|||
if (!rootFrame) {
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
mFrameConstructor->BeginUpdate();
|
||||
mFrameConstructor->ConstructRootFrame(&rootFrame);
|
||||
rootFrame = mFrameConstructor->ConstructRootFrame();
|
||||
mFrameConstructor->SetRootFrame(rootFrame);
|
||||
mFrameConstructor->EndUpdate();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче