[skottie] Fix range selector handling of empty lines

Range selectors operating in the line domain need accurate line-index
to fragment-span mapping.

But the text shaper does not emit any fragments for empty lines, and
the current map builder gets confused and generates incomplete maps.

E.g. for something like "\r\r\rfoo\r\r" we get line {offset, count}
tuples of

  {0,0}
  {0,3}

instead of expected

  {0,0}
  {0,0}
  {0,0}
  {0,3}
  {3,0}
  {3,0}

To fix, update SkottieShaper to emit empty fragments for empty lines.

Change-Id: Ia40562d4b39dc6c55a139ff79df94291407a6a31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/588737
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2 files changed