MathMLInlineContainerElement.cpp [plain text]
#include "config.h"
#if ENABLE(MATHML)
#include "MathMLInlineContainerElement.h"
#include "MathMLNames.h"
#include "RenderMathMLBlock.h"
#include "RenderMathMLFraction.h"
#include "RenderMathMLMath.h"
#include "RenderMathMLRoot.h"
#include "RenderMathMLRow.h"
#include "RenderMathMLSquareRoot.h"
#include "RenderMathMLSubSup.h"
#include "RenderMathMLUnderOver.h"
namespace WebCore {
using namespace MathMLNames;
MathMLInlineContainerElement::MathMLInlineContainerElement(const QualifiedName& tagName, Document* document)
: MathMLElement(tagName, document)
{
}
PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(const QualifiedName& tagName, Document* document)
{
return new MathMLInlineContainerElement(tagName, document);
}
RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena *arena, RenderStyle* style)
{
RenderObject* object = 0;
if (hasLocalName(MathMLNames::mrowTag))
object = new (arena) RenderMathMLRow(this);
else if (hasLocalName(MathMLNames::mathTag))
object = new (arena) RenderMathMLMath(this);
else if (hasLocalName(MathMLNames::msubTag))
object = new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::msupTag))
object = new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::msubsupTag))
object = new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::moverTag))
object = new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::munderTag))
object = new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::munderoverTag))
object = new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::mfracTag))
object = new (arena) RenderMathMLFraction(this);
else if (hasLocalName(MathMLNames::msqrtTag))
object = new (arena) RenderMathMLSquareRoot(this);
else if (hasLocalName(MathMLNames::mrootTag))
object = new (arena) RenderMathMLRoot(this);
else
object = new (arena) RenderMathMLBlock(this);
object->setStyle(style);
return object;
}
}
#endif // ENABLE(MATHML)