Make InlineContents traverse flat tree for previous and next
Currently, InlineContents creation and previous/next movement are done by different implementations: - When creating from a position, it traverses the flat tree until finding a node in a usable block flow; - When moving previous/next, it traverses the layout tree until finding a useable block flow. Since these operations are very similar, this patch change the latter to also traverse on flat tree and share the traversal algorithm to reduce duplicated logic. This also makes it easier to change TextOffsetMapping not to cross text control boundaries (*). (*) crrev.com/c/1327962 Bug: 901492 Change-Id: If7c3dd262903c1a0f81166f729614a8d810f5d27 Reviewed-on: https://chromium-review.googlesource.com/c/1327531Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Yoichi Osato <yoichio@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#606748}
Showing
Please register or sign in to comment