Bug 1064843 part 9 - Change nsCSSFrameConstructor::CreatePlaceholderFrameFor to accept parent style context. r=dbaron

This commit is contained in:
Xidorn Quan 2016-01-28 10:11:00 +11:00
parent 291cbbe2de
commit c922be5727
2 changed files with 7 additions and 5 deletions

View File

@ -1201,11 +1201,12 @@ nsFrameConstructorState::AddChild(nsIFrame* aNewFrame,
if (placeholderType) {
NS_ASSERTION(frameItems != &aFrameItems,
"Putting frame in-flow _and_ want a placeholder?");
nsStyleContext* parentContext = aStyleContext->GetParent();
nsIFrame* placeholderFrame =
nsCSSFrameConstructor::CreatePlaceholderFrameFor(mPresShell,
aContent,
aNewFrame,
aStyleContext,
parentContext,
aParentFrame,
nullptr,
placeholderType);
@ -2905,13 +2906,13 @@ nsIFrame*
nsCSSFrameConstructor::CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
nsIContent* aContent,
nsIFrame* aFrame,
nsStyleContext* aStyleContext,
nsStyleContext* aParentStyle,
nsContainerFrame* aParentFrame,
nsIFrame* aPrevInFlow,
nsFrameState aTypeBit)
{
RefPtr<nsStyleContext> placeholderStyle = aPresShell->StyleSet()->
ResolveStyleForNonElement(aStyleContext->GetParent());
ResolveStyleForNonElement(aParentStyle);
// The placeholder frame gets a pseudo style context
nsPlaceholderFrame* placeholderFrame =
@ -8702,7 +8703,8 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
nsIFrame* oofContFrame =
CreateContinuingFrame(aPresContext, oofFrame, aParentFrame);
newFrame =
CreatePlaceholderFrameFor(shell, content, oofContFrame, styleContext,
CreatePlaceholderFrameFor(shell, content, oofContFrame,
styleContext->GetParent(),
aParentFrame, aFrame,
aFrame->GetStateBits() & PLACEHOLDER_TYPE_MASK);
} else if (nsGkAtoms::fieldSetFrame == frameType) {

View File

@ -1270,7 +1270,7 @@ protected:
static nsIFrame* CreatePlaceholderFrameFor(nsIPresShell* aPresShell,
nsIContent* aContent,
nsIFrame* aFrame,
nsStyleContext* aStyleContext,
nsStyleContext* aParentStyle,
nsContainerFrame* aParentFrame,
nsIFrame* aPrevInFlow,
nsFrameState aTypeBit);