RenderMathMLFraction.h [plain text]
#ifndef RenderMathMLFraction_h
#define RenderMathMLFraction_h
#if ENABLE(MATHML)
#include "RenderMathMLBlock.h"
namespace WebCore {
class RenderMathMLFraction : public RenderMathMLBlock {
public:
RenderMathMLFraction(Element*);
virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
virtual void updateFromElement();
virtual RenderMathMLOperator* unembellishedOperator();
virtual int firstLineBoxBaseline() const OVERRIDE;
float lineThickness() const { return m_lineThickness; }
virtual void paint(PaintInfo&, const LayoutPoint&);
protected:
virtual void layout();
private:
virtual bool isRenderMathMLFraction() const { return true; }
void fixChildStyle(RenderObject* child);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE;
virtual const char* renderName() const { return "RenderMathMLFraction"; }
float m_lineThickness;
};
inline RenderMathMLFraction* toRenderMathMLFraction(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || (object->isRenderMathMLBlock() && toRenderMathMLBlock(object)->isRenderMathMLFraction()));
return static_cast<RenderMathMLFraction*>(object);
}
inline const RenderMathMLFraction* toRenderMathMLFraction(const RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || (object->isRenderMathMLBlock() && toRenderMathMLBlock(object)->isRenderMathMLFraction()));
return static_cast<const RenderMathMLFraction*>(object);
}
}
#endif // ENABLE(MATHML)
#endif // RenderMathMLFraction_h