Index: third_party/WebKit/Source/core/layout/line/InlineTextBox.h |
diff --git a/third_party/WebKit/Source/core/layout/line/InlineTextBox.h b/third_party/WebKit/Source/core/layout/line/InlineTextBox.h |
index 511c7e4faac00fd655e8a7d7ba900e709f032e63..b257c936a15f2abaf2d1e24222cb2517a55cf2e7 100644 |
--- a/third_party/WebKit/Source/core/layout/line/InlineTextBox.h |
+++ b/third_party/WebKit/Source/core/layout/line/InlineTextBox.h |
@@ -35,6 +35,15 @@ namespace blink { |
class DocumentMarker; |
class GraphicsContext; |
+// The two truncation values below are used as tokens representing truncation |
+// state for the text box, are intended to be relative to |m_start|, and are set |
+// directly into |m_truncation|. In the case where there is some truncation of |
+// the text but it is not full, |m_truncation| is set to the character offset |
+// from |m_start| representing the characters that are not truncated. |
+// |
+// Thus the maximum possible length of the text displayed before an ellipsis in |
+// a single InlineTextBox is |USHRT_MAX - 2| to allow for the no-truncation and |
+// full-truncation states. |
const unsigned short cNoTruncation = USHRT_MAX; |
const unsigned short cFullTruncation = USHRT_MAX - 1; |