Make LayoutText::GetTextBoxInfo() not to crash ellipsis for content of ::after
This patch makes |LayoutText::GetTextBoxInfo()| explicitly ignores generated text, e.g. ellipsis, instead of using fragment tree structure with |IsHiddenForPaint()|. Before this patch, text fragment for ellipsis is skipped by using tree structure: 1. fragment for original text marked hidden for paint 2. fragment for trunated text 3. fragment for ellipsis When |GetTextBoxInfo()| vistis fragment#2, it stops processing then it doesn't process a fragment for ellipsis. However, for ellipsis for one character ::after, tree is 1. fragment for ::after 2. fragment for ellipsis Then |GetTextBoxInfo()| handles ellipsis fragment and calls offset mapping with text offset 0 and 1 of ellipsis text in text fragment instead of text content of |NGInlineNodeData|. This causes |GetTextBoxInfo()| processes invalid mapping result then crashes. Bug: 1003413 Change-Id: I210738f609e78854d1d1887e1a5afa93aea40b64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808628 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#697139}
Showing
Please register or sign in to comment