MathMLPresentationElement.h [plain text]
#pragma once
#if ENABLE(MATHML)
#include "MathMLElement.h"
namespace WebCore {
class MathMLPresentationElement : public MathMLElement {
WTF_MAKE_ISO_ALLOCATED(MathMLPresentationElement);
public:
static Ref<MathMLPresentationElement> create(const QualifiedName& tagName, Document&);
protected:
MathMLPresentationElement(const QualifiedName& tagName, Document&);
void parseAttribute(const QualifiedName&, const AtomString&) override;
static bool isPhrasingContent(const Node&);
static bool isFlowContent(const Node&);
static Optional<bool> toOptionalBool(const BooleanValue& value) { return value == BooleanValue::Default ? WTF::nullopt : Optional<bool>(value == BooleanValue::True); }
const BooleanValue& cachedBooleanAttribute(const QualifiedName&, Optional<BooleanValue>&);
static Length parseMathMLLength(const String&);
const Length& cachedMathMLLength(const QualifiedName&, Optional<Length>&);
virtual bool acceptsMathVariantAttribute() { return false; }
Optional<MathVariant> specifiedMathVariant() final;
Optional<MathVariant> m_mathVariant;
private:
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
bool isPresentationMathML() const final { return true; }
static Length parseNumberAndUnit(const StringView&);
static Length parseNamedSpace(const StringView&);
static MathVariant parseMathVariantAttribute(const AtomString& attributeValue);
};
}
#endif // ENABLE(MATHML)