Refactor painting selection in NGTextFragmentPainter
This patch refactors painting selection, as a follow up to the mid-ligature support in r750701 <crrev.com/c/2103968>: 1. Avoid calling |SelectionPaintingStyle| and a few other functions that are needed only when there is a selection, if there is no selection. 2. Collect logic to |SelectionPaintState|. 3. Eliminate |have_selection| and put all state variables to |Optional<SelectionPaintState>|. This patch has no behavior changes. Bug: 1025341, 982194 Change-Id: I1cd52d281c1191d19dd93f0657906733f3ea1af6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108207Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by:
Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#751381}
Showing
This diff is collapsed.
Please register or sign in to comment