summaryrefslogtreecommitdiffstats
path: root/WebCore/mathml
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/mathml')
-rw-r--r--WebCore/mathml/MathMLInlineContainerElement.cpp26
-rw-r--r--WebCore/mathml/RenderMathMLOperator.cpp2
-rw-r--r--WebCore/mathml/RenderMathMLRoot.cpp10
-rw-r--r--WebCore/mathml/RenderMathMLSquareRoot.cpp12
4 files changed, 19 insertions, 31 deletions
diff --git a/WebCore/mathml/MathMLInlineContainerElement.cpp b/WebCore/mathml/MathMLInlineContainerElement.cpp
index 8b3f43e..eb579d2 100644
--- a/WebCore/mathml/MathMLInlineContainerElement.cpp
+++ b/WebCore/mathml/MathMLInlineContainerElement.cpp
@@ -56,30 +56,30 @@ PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(co
RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- if (hasLocalName(MathMLNames::mrowTag))
+ if (hasLocalName(mrowTag))
return new (arena) RenderMathMLRow(this);
- else if (hasLocalName(MathMLNames::msubTag))
+ if (hasLocalName(msubTag))
return new (arena) RenderMathMLSubSup(this);
- else if (hasLocalName(MathMLNames::msupTag))
+ if (hasLocalName(msupTag))
return new (arena) RenderMathMLSubSup(this);
- else if (hasLocalName(MathMLNames::msubsupTag))
+ if (hasLocalName(msubsupTag))
return new (arena) RenderMathMLSubSup(this);
- else if (hasLocalName(MathMLNames::moverTag))
+ if (hasLocalName(moverTag))
return new (arena) RenderMathMLUnderOver(this);
- else if (hasLocalName(MathMLNames::munderTag))
+ if (hasLocalName(munderTag))
return new (arena) RenderMathMLUnderOver(this);
- else if (hasLocalName(MathMLNames::munderoverTag))
+ if (hasLocalName(munderoverTag))
return new (arena) RenderMathMLUnderOver(this);
- else if (hasLocalName(MathMLNames::mfracTag))
+ if (hasLocalName(mfracTag))
return new (arena) RenderMathMLFraction(this);
- else if (hasLocalName(MathMLNames::msqrtTag))
+ if (hasLocalName(msqrtTag))
return new (arena) RenderMathMLSquareRoot(this);
- else if (hasLocalName(MathMLNames::mrootTag))
+ if (hasLocalName(mrootTag))
return new (arena) RenderMathMLRoot(this);
- else if (hasLocalName(MathMLNames::mfencedTag))
+ if (hasLocalName(mfencedTag))
return new (arena) RenderMathMLFenced(this);
- else
- return new (arena) RenderMathMLBlock(this);
+
+ return new (arena) RenderMathMLBlock(this);
}
}
diff --git a/WebCore/mathml/RenderMathMLOperator.cpp b/WebCore/mathml/RenderMathMLOperator.cpp
index 72c997b..7f039b9 100644
--- a/WebCore/mathml/RenderMathMLOperator.cpp
+++ b/WebCore/mathml/RenderMathMLOperator.cpp
@@ -162,7 +162,7 @@ void RenderMathMLOperator::updateFromElement()
// Check for a stretchable character.
if (!stretchDisabled && firstChar) {
- const int maxIndex = sizeof(stretchyCharacters) / sizeof(stretchyCharacters[0]);
+ const int maxIndex = WTF_ARRAY_LENGTH(stretchyCharacters);
for (index++; index < maxIndex; index++) {
if (stretchyCharacters[index].character == firstChar) {
isStretchy = true;
diff --git a/WebCore/mathml/RenderMathMLRoot.cpp b/WebCore/mathml/RenderMathMLRoot.cpp
index ba60c9f..f0a7abb 100644
--- a/WebCore/mathml/RenderMathMLRoot.cpp
+++ b/WebCore/mathml/RenderMathMLRoot.cpp
@@ -167,9 +167,7 @@ void RenderMathMLRoot::paint(PaintInfo& info, int tx, int ty)
// draw to end
root.addLineTo(leftEnd);
- info.context->beginPath();
- info.context->addPath(root);
- info.context->strokePath();
+ info.context->strokePath(root);
info.context->save();
@@ -181,8 +179,6 @@ void RenderMathMLRoot::paint(PaintInfo& info, int tx, int ty)
mask.addLineTo(topLeft);
mask.addLineTo(FloatPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
- info.context->beginPath();
- info.context->addPath(mask);
info.context->clip(mask);
// Draw the thick part of the root.
@@ -193,9 +189,7 @@ void RenderMathMLRoot::paint(PaintInfo& info, int tx, int ty)
line.moveTo(bottomLeft);
line.addLineTo(topLeft);
- info.context->beginPath();
- info.context->addPath(line);
- info.context->strokePath();
+ info.context->strokePath(line);
info.context->restore();
diff --git a/WebCore/mathml/RenderMathMLSquareRoot.cpp b/WebCore/mathml/RenderMathMLSquareRoot.cpp
index 862d8a4..1285acd 100644
--- a/WebCore/mathml/RenderMathMLSquareRoot.cpp
+++ b/WebCore/mathml/RenderMathMLSquareRoot.cpp
@@ -132,10 +132,8 @@ void RenderMathMLSquareRoot::paint(PaintInfo& info, int tx, int ty)
root.addLineTo(topLeft);
// draw to end
root.addLineTo(leftEnd);
-
- info.context->beginPath();
- info.context->addPath(root);
- info.context->strokePath();
+
+ info.context->strokePath(root);
info.context->save();
@@ -147,8 +145,6 @@ void RenderMathMLSquareRoot::paint(PaintInfo& info, int tx, int ty)
mask.addLineTo(topLeft);
mask.addLineTo(FloatPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
- info.context->beginPath();
- info.context->addPath(mask);
info.context->clip(mask);
// Draw the thick part of the root.
@@ -159,9 +155,7 @@ void RenderMathMLSquareRoot::paint(PaintInfo& info, int tx, int ty)
line.moveTo(bottomLeft);
line.addLineTo(topLeft);
- info.context->beginPath();
- info.context->addPath(line);
- info.context->strokePath();
+ info.context->strokePath(line);
info.context->restore();