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. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. |
5 * All rights reserved. | 5 * All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/layout/api/LineLayoutText.h" | 28 #include "core/layout/api/LineLayoutText.h" |
29 #include "core/layout/api/SelectionState.h" | 29 #include "core/layout/api/SelectionState.h" |
30 #include "core/layout/line/InlineBox.h" | 30 #include "core/layout/line/InlineBox.h" |
31 #include "platform/text/TextRun.h" | 31 #include "platform/text/TextRun.h" |
32 #include "wtf/Forward.h" | 32 #include "wtf/Forward.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class DocumentMarker; | 36 class DocumentMarker; |
37 class GraphicsContext; | 37 class GraphicsContext; |
| 38 class TextMatchMarker; |
38 | 39 |
39 // The two truncation values below are used as tokens representing truncation | 40 // The two truncation values below are used as tokens representing truncation |
40 // state for the text box, are intended to be relative to |m_start|, and are set | 41 // state for the text box, are intended to be relative to |m_start|, and are set |
41 // directly into |m_truncation|. In the case where there is some truncation of | 42 // directly into |m_truncation|. In the case where there is some truncation of |
42 // the text but it is not full, |m_truncation| is set to the character offset | 43 // the text but it is not full, |m_truncation| is set to the character offset |
43 // from |m_start| representing the characters that are not truncated. | 44 // from |m_start| representing the characters that are not truncated. |
44 // | 45 // |
45 // Thus the maximum possible length of the text displayed before an ellipsis in | 46 // Thus the maximum possible length of the text displayed before an ellipsis in |
46 // a single InlineTextBox is |USHRT_MAX - 2| to allow for the no-truncation and | 47 // a single InlineTextBox is |USHRT_MAX - 2| to allow for the no-truncation and |
47 // full-truncation states. | 48 // full-truncation states. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void selectionStartEnd(int& sPos, int& ePos) const; | 137 void selectionStartEnd(int& sPos, int& ePos) const; |
137 | 138 |
138 virtual void paintDocumentMarker(GraphicsContext&, | 139 virtual void paintDocumentMarker(GraphicsContext&, |
139 const LayoutPoint& boxOrigin, | 140 const LayoutPoint& boxOrigin, |
140 const DocumentMarker&, | 141 const DocumentMarker&, |
141 const ComputedStyle&, | 142 const ComputedStyle&, |
142 const Font&, | 143 const Font&, |
143 bool grammar) const; | 144 bool grammar) const; |
144 virtual void paintTextMatchMarkerForeground(const PaintInfo&, | 145 virtual void paintTextMatchMarkerForeground(const PaintInfo&, |
145 const LayoutPoint& boxOrigin, | 146 const LayoutPoint& boxOrigin, |
146 const DocumentMarker&, | 147 const TextMatchMarker&, |
147 const ComputedStyle&, | 148 const ComputedStyle&, |
148 const Font&) const; | 149 const Font&) const; |
149 virtual void paintTextMatchMarkerBackground(const PaintInfo&, | 150 virtual void paintTextMatchMarkerBackground(const PaintInfo&, |
150 const LayoutPoint& boxOrigin, | 151 const LayoutPoint& boxOrigin, |
151 const DocumentMarker&, | 152 const TextMatchMarker&, |
152 const ComputedStyle&, | 153 const ComputedStyle&, |
153 const Font&) const; | 154 const Font&) const; |
154 | 155 |
155 void move(const LayoutSize&) final; | 156 void move(const LayoutSize&) final; |
156 | 157 |
157 protected: | 158 protected: |
158 void paint(const PaintInfo&, | 159 void paint(const PaintInfo&, |
159 const LayoutPoint&, | 160 const LayoutPoint&, |
160 LayoutUnit lineTop, | 161 LayoutUnit lineTop, |
161 LayoutUnit lineBottom) const override; | 162 LayoutUnit lineBottom) const override; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion | 239 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion |
239 : TextRun::ForbidTrailingExpansion); | 240 : TextRun::ForbidTrailingExpansion); |
240 } | 241 } |
241 }; | 242 }; |
242 | 243 |
243 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); | 244 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); |
244 | 245 |
245 } // namespace blink | 246 } // namespace blink |
246 | 247 |
247 #endif // InlineTextBox_h | 248 #endif // InlineTextBox_h |
OLD | NEW |