diff options
author | Keisuke Kuroyanagi <ksk@google.com> | 2016-02-08 23:52:55 +0900 |
---|---|---|
committer | Keisuke Kuroyanagi <ksk@google.com> | 2016-03-18 14:39:09 +0900 |
commit | f0bb87b7c40efeeaee58d4c7b767961c9800463e (patch) | |
tree | 56f150bb5a756611e85ecd2dfdae70184cdf0186 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | cc63de4ff7ad1b52d78b3a82929f11767b879790 (diff) |
Improve selection handle behavior for bidi text.
A point on a direction boundary can be mapped to two offset and
one offset on a direction boundary can be mapped to two points.
Previously, paragraph's primary direction is always used for deciding
offset and coordinates; thus, handle movement around a direction
boundary is often nonintuitive.
With this CL:
1. For selection end handle, direction of character at offset - 1 is
used for deciding handle shape and position.
2. For getting offset from coordinates, previous offset is used to
minimize the offset delta and primary .
3. For getting coordinates form offset, new logic chooses primary or
secondary horizontal coordinate depending on the current run
direction and paragraph direction.
4. When a handle passes another one because it passes a direction
boundary, new logic keeps the handle at the run boundary instead of
minimizing the selection.
Bug: 19199637
Bug: 21480356
Bug: 21649994
Change-Id: I2a7e87ad08416f4bd01a5f68e006240f77d9036b
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions