summaryrefslogtreecommitdiffstats
path: root/WebCore/mathml/RenderMathMLFenced.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:02:20 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:41 +0100
commita94275402997c11dd2e778633dacf4b7e630a35d (patch)
treee66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/mathml/RenderMathMLFenced.cpp
parent09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff)
downloadexternal_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/mathml/RenderMathMLFenced.cpp')
-rw-r--r--WebCore/mathml/RenderMathMLFenced.cpp9
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);
}
}