Simplify RenderedPosition equivalence relationship
RenderedPosition defines an "equivalence" relationship that, when we have two adjacent inline boxes, the following two RPs are considered equivalent: - RP at the rightmost offset in the left-hand-side box - RP at the leftmost offset in the right-hand-side box However, with RenderedPosition being used only in SelectionController for bidi adjustment, such general operation isn't needed: - There's no need to check equivalence for RPs that are not at bidi boundaries - For RPs at bidi boundaries, we can move the RP to the box with higher bidi level, and then compare the RPs directly Therefore, this patch changes RP's constructor that, if an RP is created at bidi boundary, make sure it's in the box with higher bidi level. In this way, there's no need to define equivalence, and existing call sites can simply check equality. This is a preparation patch for implementing same bidi adjustment in layout NG. Bug: 811502 Change-Id: Ic4171e60efb47a31a9f1916a185953c1fc660bb7 Reviewed-on: https://chromium-review.googlesource.com/1052988 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/master@{#557768}
Showing
Please register or sign in to comment