#ifndef EllipsisBox_h
#define EllipsisBox_h
#include "InlineElementBox.h"
#include "RenderBlockFlow.h"
namespace WebCore {
class HitTestRequest;
class HitTestResult;
class EllipsisBox final : public InlineElementBox {
public:
EllipsisBox(RenderBlockFlow&, const AtomicString& ellipsisStr, InlineFlowBox* parent, int width, int height, int y, bool firstLine, bool isVertical, InlineBox* markupBox);
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override;
void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
IntRect selectionRect();
RenderBlockFlow& blockFlow() const { return toRenderBlockFlow(InlineBox::renderer()); }
private:
void paintMarkupBox(PaintInfo&, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, const RenderStyle&);
virtual int height() const { return m_height; }
virtual RenderObject::SelectionState selectionState() { return m_selectionState; }
void paintSelection(GraphicsContext*, const LayoutPoint&, const RenderStyle&, const Font&);
InlineBox* markupBox() const;
bool m_shouldPaintMarkupBox;
int m_height;
AtomicString m_str;
RenderObject::SelectionState m_selectionState;
};
}
#endif // EllipsisBox_h