From bfeab62b37a701dc82f180e49d26c602f96f96f9 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 6 Feb 2018 21:36:45 +0000 Subject: Fix caret not appearing in XFA Edits. This makes the caret appear (again?), blink, and fixes its positioning to be a little spaced from the last character. Known issue: when the edit is empty, the caret is not necessarily aligned with where the text will be. Bug: chromium:592750 Change-Id: I950b0ea236db8855c6ed50f48ec1935d97e6ccf8 Reviewed-on: https://pdfium-review.googlesource.com/25451 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- xfa/fde/cfde_texteditengine.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xfa/fde') diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp index d085a8d147..75fd103b3c 100644 --- a/xfa/fde/cfde_texteditengine.cpp +++ b/xfa/fde/cfde_texteditengine.cpp @@ -1071,10 +1071,8 @@ std::pair CFDE_TextEditEngine::GetCharacterInfo( if (it->nStart <= start_idx && start_idx < it->nStart + it->nCount) break; } - if (it == text_piece_info_.end()) { - NOTREACHED(); + if (it == text_piece_info_.end()) return {0, CFX_RectF()}; - } return {it->nBidiLevel, GetCharRects(*it)[start_idx - it->nStart]}; } -- cgit v1.2.3