Fix DCHECK failure in ShapeResult::StartIndexForResult
When no glyphs are found in the source text to shape, and if HarfBuzzShaper decided not to create a run instead of creating an empty run, ShapeIndexForResult does not work. This patch fixes the situation by creating an empty run. Note, in order to avoid the risk of the synthesized run affects existing layout, it creates only when the start is not zero. Only LayoutNG uses this case. Bug: 794149 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: Id3980fc4bb0f76cf86d08be138ca2876618f7423 Reviewed-on: https://chromium-review.googlesource.com/842603Reviewed-by:Emil A Eklund <eae@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#526081}
Showing
Please register or sign in to comment