diff options
Diffstat (limited to 'WebCore/mathml/RenderMathMLFenced.cpp')
-rw-r--r-- | WebCore/mathml/RenderMathMLFenced.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/WebCore/mathml/RenderMathMLFenced.cpp b/WebCore/mathml/RenderMathMLFenced.cpp index 6c0bb0b..a304fa4 100644 --- a/WebCore/mathml/RenderMathMLFenced.cpp +++ b/WebCore/mathml/RenderMathMLFenced.cpp @@ -40,6 +40,8 @@ namespace WebCore { using namespace MathMLNames; enum Braces { OpeningBraceChar = 0x28, ClosingBraceChar = 0x29 }; + +static const float gOperatorPadding = 0.1f; RenderMathMLFenced::RenderMathMLFenced(Node* fenced) : RenderMathMLRow(fenced) @@ -67,7 +69,7 @@ void RenderMathMLFenced::updateFromElement() if (!isSpaceOrNewline(separators[i])) characters.append(separators[i]); } - m_separators = !separators.length() ? 0 : StringImpl::create(characters.data() , characters.size()); + m_separators = !characters.size() ? 0 : StringImpl::create(characters.data() , characters.size()); } else { // The separator defaults to a single comma. m_separators = StringImpl::create(","); @@ -82,8 +84,7 @@ RefPtr<RenderStyle> RenderMathMLFenced::makeOperatorStyle() RefPtr<RenderStyle> newStyle = RenderStyle::create(); newStyle->inheritFrom(style()); newStyle->setDisplay(INLINE_BLOCK); - newStyle->setHeight(Length(100.0, Percent)); - newStyle->setVerticalAlign(MIDDLE); + newStyle->setPaddingRight(Length(static_cast<int>(gOperatorPadding * style()->fontSize()), Fixed)); return newStyle; } @@ -158,6 +159,8 @@ void RenderMathMLFenced::layout() setNeedsLayoutAndPrefWidthsRecalc(); markContainingBlocksForLayout(); RenderBlock::layout(); + + setNeedsLayout(false); } } |