#ifndef RenderBR_h
#define RenderBR_h
#include "RenderText.h"
namespace WebCore {
class Position;
class RenderBR : public RenderText {
public:
RenderBR(Node*);
virtual ~RenderBR();
virtual const char* renderName() const { return "RenderBR"; }
virtual IntRect selectionRectForRepaint(RenderBoxModelObject* , bool ) { return IntRect(); }
virtual float width(unsigned , unsigned , const Font&, float , HashSet<const SimpleFontData*>* = 0 , GlyphOverflow* = 0) const { return 0; }
virtual float width(unsigned , unsigned , float , bool = false , HashSet<const SimpleFontData*>* = 0 , GlyphOverflow* = 0) const { return 0; }
int lineHeight(bool firstLine) const;
virtual bool isBR() const { return true; }
virtual int caretMinOffset() const;
virtual int caretMaxOffset() const;
virtual unsigned caretMaxRenderedOffset() const;
virtual VisiblePosition positionForPoint(const IntPoint&);
protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
private:
mutable int m_lineHeight;
};
inline RenderBR* toRenderBR(RenderObject* object)
{
ASSERT(!object || object->isBR());
return static_cast<RenderBR*>(object);
}
inline const RenderBR* toRenderBR(const RenderObject* object)
{
ASSERT(!object || object->isBR());
return static_cast<const RenderBR*>(object);
}
void toRenderBR(const RenderBR*);
}
#endif // RenderBR_h