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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 : InlineBox(obj) | 44 : InlineBox(obj) |
45 , m_prevTextBox(nullptr) | 45 , m_prevTextBox(nullptr) |
46 , m_nextTextBox(nullptr) | 46 , m_nextTextBox(nullptr) |
47 , m_start(start) | 47 , m_start(start) |
48 , m_len(length) | 48 , m_len(length) |
49 , m_truncation(cNoTruncation) | 49 , m_truncation(cNoTruncation) |
50 { | 50 { |
51 setIsText(true); | 51 setIsText(true); |
52 } | 52 } |
53 | 53 |
54 LineLayoutText lineLayoutItem() const { return LineLayoutText(InlineBox::lin
eLayoutItem()); } | 54 LineLayoutText getLineLayoutItem() const { return LineLayoutText(InlineBox::
getLineLayoutItem()); } |
55 | 55 |
56 void destroy() final; | 56 void destroy() final; |
57 | 57 |
58 InlineTextBox* prevTextBox() const { return m_prevTextBox; } | 58 InlineTextBox* prevTextBox() const { return m_prevTextBox; } |
59 InlineTextBox* nextTextBox() const { return m_nextTextBox; } | 59 InlineTextBox* nextTextBox() const { return m_nextTextBox; } |
60 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; } | 60 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; } |
61 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; } | 61 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; } |
62 | 62 |
63 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit
.org/show_bug.cgi?id=97264 | 63 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit
.org/show_bug.cgi?id=97264 |
64 unsigned start() const { return m_start; } | 64 unsigned start() const { return m_start; } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 protected: | 118 protected: |
119 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU
nit lineBottom) const override; | 119 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU
nit lineBottom) const override; |
120 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom
) override; | 120 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom
) override; |
121 | 121 |
122 private: | 122 private: |
123 void deleteLine() final; | 123 void deleteLine() final; |
124 void extractLine() final; | 124 void extractLine() final; |
125 void attachLine() final; | 125 void attachLine() final; |
126 | 126 |
127 public: | 127 public: |
128 SelectionState selectionState() const final; | 128 SelectionState getSelectionState() const final; |
129 bool hasWrappedSelectionNewline() const; | 129 bool hasWrappedSelectionNewline() const; |
130 float newlineSpaceWidth() const; | 130 float newlineSpaceWidth() const; |
131 | 131 |
132 private: | 132 private: |
133 void setTruncation(unsigned); | 133 void setTruncation(unsigned); |
134 | 134 |
135 void clearTruncation() final; | 135 void clearTruncation() final; |
136 LayoutUnit placeEllipsisBox(bool flowIsLTR, LayoutUnit visibleLeftEdge, Layo
utUnit visibleRightEdge, LayoutUnit ellipsisWidth, LayoutUnit &truncatedWidth, b
ool& foundBox) final; | 136 LayoutUnit placeEllipsisBox(bool flowIsLTR, LayoutUnit visibleLeftEdge, Layo
utUnit visibleRightEdge, LayoutUnit ellipsisWidth, LayoutUnit &truncatedWidth, b
ool& foundBox) final; |
137 | 137 |
138 public: | 138 public: |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 }; | 183 }; |
184 | 184 |
185 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); | 185 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
186 | 186 |
187 void alignSelectionRectToDevicePixels(LayoutRect&); | 187 void alignSelectionRectToDevicePixels(LayoutRect&); |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #endif // InlineTextBox_h | 191 #endif // InlineTextBox_h |
OLD | NEW |