OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 InlineTextBox(RenderObject* obj) | 50 InlineTextBox(RenderObject* obj) |
51 : InlineBox(obj) | 51 : InlineBox(obj) |
52 , m_prevTextBox(0) | 52 , m_prevTextBox(0) |
53 , m_nextTextBox(0) | 53 , m_nextTextBox(0) |
54 , m_start(0) | 54 , m_start(0) |
55 , m_len(0) | 55 , m_len(0) |
56 , m_truncation(cNoTruncation) | 56 , m_truncation(cNoTruncation) |
57 { | 57 { |
58 } | 58 } |
59 | 59 |
60 virtual void destroy(RenderArena*) OVERRIDE FINAL; | 60 virtual void destroy() OVERRIDE FINAL; |
61 | 61 |
62 InlineTextBox* prevTextBox() const { return m_prevTextBox; } | 62 InlineTextBox* prevTextBox() const { return m_prevTextBox; } |
63 InlineTextBox* nextTextBox() const { return m_nextTextBox; } | 63 InlineTextBox* nextTextBox() const { return m_nextTextBox; } |
64 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; } | 64 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; } |
65 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; } | 65 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; } |
66 | 66 |
67 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit
.org/show_bug.cgi?id=97264 | 67 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit
.org/show_bug.cgi?id=97264 |
68 unsigned start() const { return m_start; } | 68 unsigned start() const { return m_start; } |
69 unsigned end() const { return m_len ? m_start + m_len - 1 : m_start; } | 69 unsigned end() const { return m_len ? m_start + m_len - 1 : m_start; } |
70 unsigned len() const { return m_len; } | 70 unsigned len() const { return m_len; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 void selectionStartEnd(int& sPos, int& ePos); | 118 void selectionStartEnd(int& sPos, int& ePos); |
119 | 119 |
120 protected: | 120 protected: |
121 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); | 121 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); |
122 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; | 122 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; |
123 | 123 |
124 public: | 124 public: |
125 RenderText* textRenderer() const; | 125 RenderText* textRenderer() const; |
126 | 126 |
127 private: | 127 private: |
128 virtual void deleteLine(RenderArena*) OVERRIDE FINAL; | 128 virtual void deleteLine() OVERRIDE FINAL; |
129 virtual void extractLine() OVERRIDE FINAL; | 129 virtual void extractLine() OVERRIDE FINAL; |
130 virtual void attachLine() OVERRIDE FINAL; | 130 virtual void attachLine() OVERRIDE FINAL; |
131 | 131 |
132 public: | 132 public: |
133 virtual RenderObject::SelectionState selectionState() OVERRIDE FINAL; | 133 virtual RenderObject::SelectionState selectionState() OVERRIDE FINAL; |
134 | 134 |
135 private: | 135 private: |
136 virtual void clearTruncation() OVERRIDE FINAL { m_truncation = cNoTruncation
; } | 136 virtual void clearTruncation() OVERRIDE FINAL { m_truncation = cNoTruncation
; } |
137 virtual float placeEllipsisBox(bool flowIsLTR, float visibleLeftEdge, float
visibleRightEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OV
ERRIDE FINAL; | 137 virtual float placeEllipsisBox(bool flowIsLTR, float visibleLeftEdge, float
visibleRightEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OV
ERRIDE FINAL; |
138 | 138 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 inline RenderText* InlineTextBox::textRenderer() const | 208 inline RenderText* InlineTextBox::textRenderer() const |
209 { | 209 { |
210 return toRenderText(renderer()); | 210 return toRenderText(renderer()); |
211 } | 211 } |
212 | 212 |
213 void alignSelectionRectToDevicePixels(FloatRect&); | 213 void alignSelectionRectToDevicePixels(FloatRect&); |
214 | 214 |
215 } // namespace WebCore | 215 } // namespace WebCore |
216 | 216 |
217 #endif // InlineTextBox_h | 217 #endif // InlineTextBox_h |
OLD | NEW |