[LayoutNG] Work around the crash with 'text-transform' on ::first-letter

'text-transform' may make LayoutText::GetText() longer than the original
DOM text node, and result in out-of-range offsets that are not properly
handled.

This patch works around that in one of the crash sites so that it
doesn't crash.

Bug: 923446
Change-Id: Iadf7d3ee1e9dc5ac03f181cd3f37d11d65bca1fc
Reviewed-on: https://chromium-review.googlesource.com/c/1450737
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628952}
1 file changed