Bug 1373767 part 1: Always make nsMathMLmathBlockFrame a block formatting context. r=bz

(This makes it behave a bit more like a normal CSS block, and it ensures that
it can provide a float manager to its descendants.)

MozReview-Commit-ID: FmnQYjzD2eD

--HG--
extra : rebase_source : 6e02bff6786fe4e4146339908c5f2e1becd3a929
This commit is contained in:
Daniel Holbert 2017-07-13 15:34:20 -07:00
Родитель b58bf562de
Коммит 8ee548e499
4 изменённых файлов: 26 добавлений и 2 удалений

Просмотреть файл

@ -5297,7 +5297,6 @@ nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
// is not a suitable block.
nsContainerFrame* blockFrame =
NS_NewMathMLmathBlockFrame(mPresShell, blockContext);
blockFrame->AddStateBits(NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS);
InitAndRestoreFrame(aState, aContent, aParentFrame, blockFrame);
ReparentFrames(this, blockFrame, aBlockItems, false);

Просмотреть файл

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
math {
position: fixed;
}
div {
transform: translateZ(0px);
}
body {
display: -moz-grid;
}
</style>
</head>
<body>
<div>
<math></math>
</div>
</body>
</html>

Просмотреть файл

@ -65,4 +65,5 @@ load 947557-1.html
load 973322-1.xhtml
load 1028521-1.xhtml
load 1061027.html
load 1373767-1.html
load 1376158.html

Просмотреть файл

@ -1549,7 +1549,9 @@ nsMathMLContainerFrame::ReportInvalidChildError(nsAtom* aChildTag)
nsContainerFrame*
NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsMathMLmathBlockFrame(aContext);
auto newFrame = new (aPresShell) nsMathMLmathBlockFrame(aContext);
newFrame->AddStateBits(NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS);
return newFrame;
}
NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmathBlockFrame)