Fix apply styles with range to support graphemes

This CL is adding support for graphemes with the RenderText styles.

The range of a style needs to be enlarge to the whole grapheme. Otherwise,
we can get cases where an emoji or a ligature can be split apart
during the ItemizeText(...) phase.

Bug: 1020841
Change-Id: I8e6e49c5d6250a907d8d4ed5a13dc8b16421592e
Commit-Queue: Etienne Bergeron <>
Reviewed-by: Alexei Svitkine <>
Reviewed-by: Robert Liao <>
Cr-Commit-Position: refs/heads/master@{#714051}
3 files changed