MathMLUnderOverElement.cpp [plain text]
#include "config.h"
#include "MathMLUnderOverElement.h"
#if ENABLE(MATHML)
#include "RenderMathMLUnderOver.h"
namespace WebCore {
using namespace MathMLNames;
inline MathMLUnderOverElement::MathMLUnderOverElement(const QualifiedName& tagName, Document& document)
: MathMLScriptsElement(tagName, document)
{
}
Ref<MathMLUnderOverElement> MathMLUnderOverElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new MathMLUnderOverElement(tagName, document));
}
const MathMLElement::BooleanValue& MathMLUnderOverElement::accent()
{
return cachedBooleanAttribute(accentAttr, m_accent);
}
const MathMLElement::BooleanValue& MathMLUnderOverElement::accentUnder()
{
return cachedBooleanAttribute(accentunderAttr, m_accentUnder);
}
void MathMLUnderOverElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == accentAttr)
m_accent = std::nullopt;
else if (name == accentunderAttr)
m_accentUnder = std::nullopt;
MathMLElement::parseAttribute(name, value);
}
RenderPtr<RenderElement> MathMLUnderOverElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
{
ASSERT(hasTagName(munderTag) || hasTagName(moverTag) || hasTagName(munderoverTag));
return createRenderer<RenderMathMLUnderOver>(*this, WTFMove(style));
}
}
#endif // ENABLE(MATHML)