haikuwebkit/LayoutTests/mathml/out-of-flow-in-token-crash-...

25 lines
295 B
Plaintext
Raw Permalink Normal View History

ASSERTION FAILED: !renderer->needsLayout() in WebCore::RenderBlock::checkPositionedObjectsNeedLayout with MathML https://bugs.webkit.org/show_bug.cgi?id=178865 Patch by Frederic Wang <fwang@igalia.com> on 2017-11-15 Reviewed by Manuel Rego Casasnovas. Source/WebCore: MathML token elements can contain HTML elements and hence MathML elements can contain out-of-flow positioned descendants. Also all MathML elements can be containing block and hence should position their out-of-flow positioned descendants before calling clearNeedsLayout(). This patch does that in all places in the MathML renderer classes, except a few of them: - RenderMathMLSpace, which can not have descendants. - RenderMathMLToken and RenderMathMLOperator, since they will use the layout implementation of RenderMathMLBlock when they contain non-text children. The patch also fixes an ASSERTION failure in WebCore::RenderBlock::checkPositionedObjectsNeedLayout due to some descendants that are not laid out. Test: mathml/out-of-flow-in-token-crash.html * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::layoutBlock): Call layoutPositionedObjects. (WebCore::RenderMathMLBlock::layoutInvalidMarkup): Ditto and pass the relayoutChildren boolean. * rendering/mathml/RenderMathMLBlock.h: Add a relayoutChildren boolean to layoutInvalidMarkup. * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::layoutBlock): Pass the relayoutChildren boolean to layoutInvalidMarkup and call layoutPositionedObjects. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::layoutBlock): Ditto. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::layoutBlock): Ditto. * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::layoutBlock): Ditto. * rendering/mathml/RenderMathMLMenclose.cpp: (WebCore::RenderMathMLMenclose::layoutBlock): Call layoutPositionedObjects. * rendering/mathml/RenderMathMLPadded.cpp: (WebCore::RenderMathMLPadded::layoutBlock): Ditto. * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::layoutBlock): Ditto. LayoutTests: Add a test to trigger various clearNeedsLayout() in a MathML containing block with out-of-flow positioned descendants. * mathml/out-of-flow-in-token-crash-expected.txt: Added. * mathml/out-of-flow-in-token-crash.html: Added. Canonical link: https://commits.webkit.org/195774@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-15 20:07:51 +00:00
This test passes if it does not crash
RenderMathMLFenced
RenderMathMLFraction
RenderMathMLMath
RenderMathMLMenclose
RenderMathMLOperator
RenderMathMLPadded
RenderMathMLRoot
RenderMathMLRow
RenderMathMLScripts
RenderMathMLToken
RenderMathMLUnderOver
RenderMathMLBlock (invalid markup)