Index: Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp |
=================================================================== |
--- Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp (revision 136093) |
+++ Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp (working copy) |
@@ -61,8 +61,12 @@ |
return toRenderBoxModelObject(base); |
} |
-void RenderMathMLSubSup::fixScriptsStyle() |
+void RenderMathMLSubSup::fixAnonymousStyles() |
{ |
+ // Set the base wrapper's style so that baseHeight in layout() will be an unstretched height. |
+ ASSERT(firstChild() && firstChild()->style()->refCount() == 1); |
+ firstChild()->style()->setAlignSelf(AlignFlexStart); |
+ |
ASSERT(m_scripts && m_scripts->style()->refCount() == 1); |
RenderStyle* scriptsStyle = m_scripts->style(); |
scriptsStyle->setFlexDirection(FlowColumn); |
@@ -80,7 +84,8 @@ |
m_scripts = createAnonymousMathMLBlock(); |
RenderMathMLBlock::addChild(m_scripts); |
- fixScriptsStyle(); |
+ |
+ fixAnonymousStyles(); |
} |
if (firstChild()->isEmpty()) |
@@ -93,8 +98,8 @@ |
{ |
RenderMathMLBlock::styleDidChange(diff, oldStyle); |
- if (m_scripts) |
- fixScriptsStyle(); |
+ if (!isEmpty()) |
+ fixAnonymousStyles(); |
} |
RenderMathMLOperator* RenderMathMLSubSup::unembellishedOperator() |