diff --git a/layout/base/crashtests/469861-1.xhtml b/layout/base/crashtests/469861-1.xhtml new file mode 100644 index 000000000000..6a7888b62fdb --- /dev/null +++ b/layout/base/crashtests/469861-1.xhtml @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/layout/base/crashtests/469861-2.xhtml b/layout/base/crashtests/469861-2.xhtml new file mode 100644 index 000000000000..295f2c61d41d --- /dev/null +++ b/layout/base/crashtests/469861-2.xhtml @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index ba8a88fa4c13..cd45ba3b1e0e 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -245,6 +245,8 @@ load 468578-1.xhtml load 468645-1.xhtml load 468645-2.xhtml load 468645-3.xhtml +load 469861-1.xhtml +load 469861-2.xhtml load 471594-1.xhtml load 479114-1.html load 477333-1.xhtml diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 321dcf7601ce..f867d74e978c 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -4629,7 +4629,10 @@ nsCSSFrameConstructor::FindMathMLData(nsIContent* aContent, // Handle specially, because it sometimes produces inlines if (aTag == nsGkAtoms::math) { - if (aStyleContext->GetStyleDisplay()->mDisplay == NS_STYLE_DISPLAY_BLOCK) { + // This needs to match the test in EnsureBlockDisplay in + // nsRuleNode.cpp. Though the behavior here for the display:table + // case is pretty weird... + if (aStyleContext->GetStyleDisplay()->IsBlockOutside()) { static const FrameConstructionData sBlockMathData = FCDATA_DECL(FCDATA_FORCE_NULL_ABSPOS_CONTAINER | FCDATA_WRAP_KIDS_IN_BLOCKS, diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 48e8f10e7271..217da2abbc3b 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -151,6 +151,8 @@ static void EnsureBlockDisplay(PRUint8& display) // do not muck with these at all - already blocks // This is equivalent to nsStyleDisplay::IsBlockOutside. (XXX Maybe we // should just call that?) + // This needs to match the check done in + // nsCSSFrameConstructor::FindMathMLData for . break; case NS_STYLE_DISPLAY_INLINE_TABLE :