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
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903948
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714051}
3 files changed