Fix bug 354144 -- absolute positioning against the ICB is broken. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@212339 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1946,6 +1946,7 @@ nsCSSFrameConstructor::nsCSSFrameConstructor(nsIDocument *aDocument,
|
||||
, mUpdateCount(0)
|
||||
, mQuotesDirty(PR_FALSE)
|
||||
, mCountersDirty(PR_FALSE)
|
||||
, mInitialContainingBlockIsAbsPosContainer(PR_FALSE)
|
||||
{
|
||||
if (!gGotXBLFormPrefs) {
|
||||
gGotXBLFormPrefs = PR_TRUE;
|
||||
@@ -4643,6 +4644,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
|
||||
*aNewFrame = contentFrame;
|
||||
|
||||
mInitialContainingBlock = contentFrame;
|
||||
mInitialContainingBlockIsAbsPosContainer = PR_FALSE;
|
||||
|
||||
// if it was a table then we don't need to process our children.
|
||||
if (!docElemIsTable) {
|
||||
@@ -4655,6 +4657,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
|
||||
PRBool haveFirstLetterStyle, haveFirstLineStyle;
|
||||
HaveSpecialBlockStyle(aDocElement, styleContext,
|
||||
&haveFirstLetterStyle, &haveFirstLineStyle);
|
||||
mInitialContainingBlockIsAbsPosContainer = PR_TRUE;
|
||||
aState.PushAbsoluteContainingBlock(contentFrame, absoluteSaveState);
|
||||
aState.PushFloatContainingBlock(contentFrame, floatSaveState,
|
||||
haveFirstLetterStyle,
|
||||
@@ -8332,8 +8335,9 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame)
|
||||
return AdjustAbsoluteContainingBlock(mPresShell->GetPresContext(),
|
||||
containingBlock);
|
||||
|
||||
// If we didn't find it, then there isn't one.
|
||||
return nsnull;
|
||||
// If we didn't find it, then use the initial containing block if it
|
||||
// supports abs pos kids.
|
||||
return mInitialContainingBlockIsAbsPosContainer ? mInitialContainingBlock : nsnull;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@@ -10075,6 +10079,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
|
||||
|
||||
if (mInitialContainingBlock == childFrame) {
|
||||
mInitialContainingBlock = nsnull;
|
||||
mInitialContainingBlockIsAbsPosContainer = PR_FALSE;
|
||||
}
|
||||
|
||||
if (haveFLS && mInitialContainingBlock) {
|
||||
|
||||
@@ -1051,8 +1051,9 @@ private:
|
||||
nsQuoteList mQuoteList;
|
||||
nsCounterManager mCounterManager;
|
||||
PRUint16 mUpdateCount;
|
||||
PRPackedBool mQuotesDirty;
|
||||
PRPackedBool mCountersDirty;
|
||||
PRPackedBool mQuotesDirty : 1;
|
||||
PRPackedBool mCountersDirty : 1;
|
||||
PRPackedBool mInitialContainingBlockIsAbsPosContainer : 1;
|
||||
|
||||
nsRevocableEventPtr<RestyleEvent> mRestyleEvent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user