mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
When we push a pseudo cell frame, the block inside it needs to become the float
containing block. Otherwise, floats inside this cellframe get very confused. Bug 233094 and various dependencies, r+sr=dbaron
This commit is contained in:
parent
3357b06204
commit
409de81840
@ -2977,6 +2977,13 @@ nsCSSFrameConstructor::ConstructTableForeignFrame(nsIPresShell* aPres
|
||||
|
||||
if (!parentFrame) return rv; // if pseudo frame wasn't created
|
||||
|
||||
NS_ASSERTION(parentFrame == aState.mPseudoFrames.mCellInner.mFrame,
|
||||
"Weird parent in ConstructTableForeignFrame");
|
||||
|
||||
// Push the parent as the floater containing block
|
||||
nsFrameConstructorSaveState saveState;
|
||||
aState.PushFloatContainingBlock(parentFrame, saveState, PR_FALSE, PR_FALSE);
|
||||
|
||||
// save the pseudo frame state XXX - why
|
||||
nsPseudoFrames prevPseudoFrames;
|
||||
aState.mPseudoFrames.Reset(&prevPseudoFrames);
|
||||
@ -6061,6 +6068,17 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre
|
||||
}
|
||||
}
|
||||
|
||||
nsFrameConstructorSaveState pseudoSaveState;
|
||||
if (pseudoParent) {
|
||||
// We pushed an anonymous table cell. The inner block of this
|
||||
// needs to become the float containing block. Luckily, it's
|
||||
// hanging about in adjParentFrame!
|
||||
NS_ASSERTION(adjParentFrame == aState.mPseudoFrames.mCellInner.mFrame,
|
||||
"Weird parent frame in ConstructFrameByDisplayType");
|
||||
aState.PushFloatContainingBlock(adjParentFrame, pseudoSaveState,
|
||||
PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
||||
// If this is "body", try propagating its scroll style to the viewport
|
||||
// Note that we need to do this even if the body is NOT scrollable;
|
||||
// it might have dynamically changed from scrollable to not scrollable,
|
||||
|
@ -2977,6 +2977,13 @@ nsCSSFrameConstructor::ConstructTableForeignFrame(nsIPresShell* aPres
|
||||
|
||||
if (!parentFrame) return rv; // if pseudo frame wasn't created
|
||||
|
||||
NS_ASSERTION(parentFrame == aState.mPseudoFrames.mCellInner.mFrame,
|
||||
"Weird parent in ConstructTableForeignFrame");
|
||||
|
||||
// Push the parent as the floater containing block
|
||||
nsFrameConstructorSaveState saveState;
|
||||
aState.PushFloatContainingBlock(parentFrame, saveState, PR_FALSE, PR_FALSE);
|
||||
|
||||
// save the pseudo frame state XXX - why
|
||||
nsPseudoFrames prevPseudoFrames;
|
||||
aState.mPseudoFrames.Reset(&prevPseudoFrames);
|
||||
@ -6061,6 +6068,17 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre
|
||||
}
|
||||
}
|
||||
|
||||
nsFrameConstructorSaveState pseudoSaveState;
|
||||
if (pseudoParent) {
|
||||
// We pushed an anonymous table cell. The inner block of this
|
||||
// needs to become the float containing block. Luckily, it's
|
||||
// hanging about in adjParentFrame!
|
||||
NS_ASSERTION(adjParentFrame == aState.mPseudoFrames.mCellInner.mFrame,
|
||||
"Weird parent frame in ConstructFrameByDisplayType");
|
||||
aState.PushFloatContainingBlock(adjParentFrame, pseudoSaveState,
|
||||
PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
||||
// If this is "body", try propagating its scroll style to the viewport
|
||||
// Note that we need to do this even if the body is NOT scrollable;
|
||||
// it might have dynamically changed from scrollable to not scrollable,
|
||||
|
Loading…
Reference in New Issue
Block a user