Make TextIterator abort when ::first-letter contains multiple leading spaces

When TextIterator is passed with iteration range fulled contained in
the leading collapsed whitespaces of ::first-letter, it currently doesn't
stop in the first letter part, but advances to remaining text with
invalid parameters.

This patch fixes it by fixing an existing stop condition:
- Old condition: stop if the current text box starts at iteration range end
- New condition: stop if the current text box start at or after the
  iteration range end. The condition is also written in a more intuitive

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I2768d41ec5e792353023ca77749575383020ae18
Reviewed-by: Yoshifumi Inoue <>
Commit-Queue: Xiaocheng Hu <>
Cr-Commit-Position: refs/heads/master@{#575644}
2 files changed