Unify base/extent and start/end in VisbileSelectionTemplate
This patch unifies base/extent and start/end in |VisbileSelectionTemplate| to simplify |VisbileSelectionTemplate| for improving code health. Before this patch, base/extent were used for holding start position of granularity expansion and non-visibly shrunk positions, e.g. start/end hold |Most{Back,For}wardCaretPostion()|. After this patch base/extent and start/end are identical with considering direction, in forward selection base == start and extent == end, in backward selection base == end and extent == start. For changes in "TypeCommand.cpp" and "SelectionController.cpp" are canceling |Most{Back,For}wardCaretPostion()| of start/end for checking equality, for example: "|<b>foo</>" (most backward caret position) vs. "<b>|foo</b>" (most forward position). Note: |VisiblePosition| is tend to be most backward caret position. Following patch will get rid of |start_| and |end_| from |VisbileSelectionTemplate|. Note: Changes for "TypeCommand.cpp" are for "undo-delete-boundary.html": Changes for "SelectionController.cpp" are for "selection-bidi.html": Bug: 230267 Change-Id: I255cbeb331a1da36ae6a569ce7bfd9c59b018eab Reviewed-on: https://chromium-review.googlesource.com/569507Reviewed-by:Yoichi Osato <yoichio@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#486716}
Showing
Please register or sign in to comment