зеркало из https://github.com/mozilla/gecko-dev.git
Don't allow first-letter on the block inside a mathml table cell. Bug 398510, r+sr+a=roc
This commit is contained in:
Родитель
9339d8e5be
Коммит
0578f2967b
|
@ -4013,12 +4013,18 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsFrameConstructorState& aState,
|
|||
nsCSSAnonBoxes::cellContent, aStyleContext);
|
||||
|
||||
// Create a block frame that will format the cell's content
|
||||
PRBool isBlock;
|
||||
#ifdef MOZ_MATHML
|
||||
if (kNameSpaceID_MathML == aNameSpaceID)
|
||||
if (kNameSpaceID_MathML == aNameSpaceID) {
|
||||
aNewCellInnerFrame = NS_NewMathMLmtdInnerFrame(mPresShell, innerPseudoStyle);
|
||||
isBlock = PR_FALSE;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
aNewCellInnerFrame = NS_NewTableCellInnerFrame(mPresShell, innerPseudoStyle);
|
||||
isBlock = PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (NS_UNLIKELY(!aNewCellInnerFrame)) {
|
||||
|
@ -4031,18 +4037,22 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsFrameConstructorState& aState,
|
|||
|
||||
if (!aIsPseudo) {
|
||||
PRBool haveFirstLetterStyle, haveFirstLineStyle;
|
||||
ShouldHaveSpecialBlockStyle(aContent, aStyleContext,
|
||||
&haveFirstLetterStyle, &haveFirstLineStyle);
|
||||
if (isBlock) {
|
||||
ShouldHaveSpecialBlockStyle(aContent, aStyleContext,
|
||||
&haveFirstLetterStyle, &haveFirstLineStyle);
|
||||
}
|
||||
|
||||
// The block frame is a float container
|
||||
nsFrameConstructorSaveState floatSaveState;
|
||||
aState.PushFloatContainingBlock(aNewCellInnerFrame, floatSaveState,
|
||||
haveFirstLetterStyle, haveFirstLineStyle);
|
||||
if (isBlock) {
|
||||
aState.PushFloatContainingBlock(aNewCellInnerFrame, floatSaveState,
|
||||
haveFirstLetterStyle, haveFirstLineStyle);
|
||||
}
|
||||
|
||||
// Process the child content
|
||||
nsFrameItems childItems;
|
||||
rv = ProcessChildren(aState, aContent, aNewCellInnerFrame,
|
||||
PR_TRUE, childItems, PR_TRUE);
|
||||
PR_TRUE, childItems, PR_FALSE);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
// Clean up
|
||||
|
|
|
@ -6290,6 +6290,7 @@ nsBlockFrame::SetInitialChildList(nsIAtom* aListName,
|
|||
pseudo == nsCSSAnonBoxes::fieldsetContent ||
|
||||
pseudo == nsCSSAnonBoxes::scrolledContent ||
|
||||
pseudo == nsCSSAnonBoxes::columnContent) &&
|
||||
!IsFrameOfType(eMathML) &&
|
||||
nsRefPtr<nsStyleContext>(GetFirstLetterStyle(presContext)) != nsnull;
|
||||
NS_ASSERTION(haveFirstLetterStyle ==
|
||||
((mState & NS_BLOCK_HAS_FIRST_LETTER_STYLE) != 0),
|
||||
|
|
Загрузка…
Ссылка в новой задаче