Change NGInlineNodeEditor::SetTextWithOffset() to use character diff instead of offsets
This patch changes |NGInlineNodeEditor| to reuse |ShapeResult| before and after changed region by equality of substring instead of calculating it from offsets to handle generated line break markers, e.g. leading spaces in pre-wrap, and increase chance to reuse, e.g. replacing "abc" with "abX", before this patch we reuse nothing but after this patch we reuse "ab". This patch also gets rid of |NGInlineNodeData::can_use_flag_editing_| because we don't use it. Bug: 1131315 Change-Id: Ic4471340245522ced6b2a4d3d8bf43b23a2ff077 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437831 Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#812062}
Showing
This diff is collapsed.
Please register or sign in to comment