RenderTextLineBoxes.h [plain text]
#ifndef RenderTextLineBoxes_h
#define RenderTextLineBoxes_h
#include "LayoutRect.h"
#include "RenderObject.h"
#include "VisiblePosition.h"
namespace WebCore {
class InlineTextBox;
class RenderStyle;
class RenderText;
class RenderTextLineBoxes {
public:
RenderTextLineBoxes();
InlineTextBox* first() const { return m_first; }
InlineTextBox* last() const { return m_last; }
InlineTextBox* createAndAppendLineBox(RenderText&);
void extract(InlineTextBox&);
void attach(InlineTextBox&);
void remove(InlineTextBox&);
void removeAllFromParent(RenderText&);
void deleteAll();
void dirtyAll();
bool dirtyRange(RenderText&, unsigned start, unsigned end, int lengthDelta);
InlineTextBox* findNext(int offset, int& position) const;
bool hasRenderedText() const;
int caretMinOffset() const;
int caretMaxOffset(const RenderText&) const;
enum OffsetType { CaretOffset, CharacterOffset };
bool containsOffset(const RenderText&, unsigned, OffsetType) const;
unsigned countCharacterOffsetsUntil(unsigned) const;
VisiblePosition positionForPoint(const RenderText&, const LayoutPoint&) const;
void setSelectionState(RenderText&, RenderObject::SelectionState);
LayoutRect selectionRectForRange(unsigned start, unsigned end);
void collectSelectionRectsForRange(unsigned start, unsigned end, Vector<LayoutRect>& rects);
IntRect boundingBox(const RenderText&) const;
IntPoint firstRunLocation() const;
LayoutRect visualOverflowBoundingBox(const RenderText&) const;
Vector<IntRect> absoluteRects(const LayoutPoint& accumulatedOffset) const;
Vector<IntRect> absoluteRectsForRange(const RenderText&, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const;
enum ClippingOption { NoClipping, ClipToEllipsis };
Vector<FloatQuad> absoluteQuads(const RenderText&, bool* wasFixed, ClippingOption) const;
Vector<FloatQuad> absoluteQuadsForRange(const RenderText&, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const;
#if !ASSERT_DISABLED
~RenderTextLineBoxes();
#endif
#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
void invalidateParentChildLists();
#endif
private:
void checkConsistency() const;
InlineTextBox* m_first;
InlineTextBox* m_last;
};
}
#endif