diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 18701f5cb26..18c54827f58 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -3323,7 +3323,8 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresContext* aPre NS_NewFloatingItemWrapperFrame(&newFrame); // Initialize the frame - newFrame->Init(*aPresContext, aContent, aParentFrame, aStyleContext, nsnull); + newFrame->Init(*aPresContext, aContent, aState.mFloatedItems.containingBlock, + aStyleContext, nsnull); // See if we need to create a view nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, newFrame, diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 18701f5cb26..18c54827f58 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3323,7 +3323,8 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresContext* aPre NS_NewFloatingItemWrapperFrame(&newFrame); // Initialize the frame - newFrame->Init(*aPresContext, aContent, aParentFrame, aStyleContext, nsnull); + newFrame->Init(*aPresContext, aContent, aState.mFloatedItems.containingBlock, + aStyleContext, nsnull); // See if we need to create a view nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, newFrame,