Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Issue 2337373002: Update composition underline start/end constraints. (Closed)
Patch Set: Sync to head. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698