Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove offset_ from RangeSelectionAdjuster::RenderedPosition
|RangeSelectionAdjuster::RenderedPosition::offset_| is a redundant member of the class. It is used at only two places and can be replaced: 1. In GetPosition(), where the RenderedPosition must be at bidi boundary, in which case |offset_| is implied by |bidi_boundary_type_|. 2. In operator==(). However, - If |inline_box_| or |bidi_boundary_type_| of the two operands differ, we don't need to compare |offset_| - If |bidi_boundary_type_| is not |kNotBoundary|, |offset_| is implied and doesn't need to be compared - If |bidi_boundary_type_| is |kNotBoundary| (for both operands), we can early-stop the bidi adjustment, and still don't need the exact value of |offset_| Hence, this patch removes the member, and modifies the two use sites accordingly. This patch also helps generalizing |RangeSelectionAdjuster| for LayoutNG, where we don't necessarily have an offset on |NGPaintFragment|. Bug: 811502 Change-Id: I14bd6236073dcf262c34f98209d57871665f463c Reviewed-on: https://chromium-review.googlesource.com/1070471 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#561247}
- Loading branch information