Minor comment fix and add TODO. (flutter/engine#7158)

This commit is contained in:
Gary Qian
2018-12-10 14:03:10 -08:00
committed by GitHub
parent f604da6409
commit 398355981c

View File

@@ -479,8 +479,12 @@ void Paragraph::Layout(double width, bool force) {
}
}
// Exclude trailing whitespace from right-justified lines so the last
// visible character in the line will be flush with the right margin.
// TODO(garyq): Make GetRectsForRange return a zero-width box for the
// excluded whitespace such that the caret placement is correct regardless
// of the index being whitespace or not.
// Exclude trailing whitespace from right and center-justified lines so the
// last visible character in the line will be flush with the right margin.
size_t line_end_index =
(paragraph_style_.effective_align() == TextAlign::right ||
paragraph_style_.effective_align() == TextAlign::center)