Repository navigation
Commit f326a1e
[skparagraph] Report a hit on the ellipsis or hyphen as upstream
TextLine::getGlyphPositionAtCoordinate returns the end of the line's
text for a hit on the ellipsis or on a rendered soft hyphen, but with
downstream affinity. For a soft hyphen that position is also the start
of the next line, and for an ellipsis it's past the line's text, so:
- getClosestUTF16GlyphInfoAt returns the next line's first glyph for a
hit on the hyphen, and no glyph at all for a hit on the ellipsis.
- Flutter's Paragraph.getLineBoundary puts a hit on the hyphen on the
next line.
Return upstream instead, as for a hit past the end of any other line.
For "international" broken after the soft hyphen, a hit on the
hyphen now returns {6, upstream}, and its glyph is the soft hyphen
[5, 6) instead of the "n" [6, 7). For "abcdef" ellipsized to "abc...",
a hit on the ellipsis returns {3, upstream} and the glyph "c" [2, 3).
This came up in flutter/flutter#195366, where
WebParagraph now returns upstream here too.
[email protected], [email protected]
Bug: flutter/flutter#189234
Change-Id: If514d73dd39fd4a6cb17633d6818e496ade07ca8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1406081
Commit-Queue: Julia Lavrova <[email protected]>
Reviewed-by: Julia Lavrova <[email protected]>
Reviewed-by: Alexis Cruz-Ayala <[email protected]>1 parent ce0b85b commit f326a1e
2 files changed
Lines changed: 61 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
| 1598 | + | |
| 1599 | + | |
1598 | 1600 | | |
1599 | | - | |
| 1601 | + | |
1600 | 1602 | | |
1601 | 1603 | | |
1602 | 1604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11466 | 11466 | | |
11467 | 11467 | | |
11468 | 11468 | | |
| 11469 | + | |
| 11470 | + | |
| 11471 | + | |
| 11472 | + | |
| 11473 | + | |
| 11474 | + | |
| 11475 | + | |
| 11476 | + | |
| 11477 | + | |
| 11478 | + | |
| 11479 | + | |
| 11480 | + | |
| 11481 | + | |
| 11482 | + | |
| 11483 | + | |
| 11484 | + | |
| 11485 | + | |
| 11486 | + | |
| 11487 | + | |
| 11488 | + | |
| 11489 | + | |
| 11490 | + | |
| 11491 | + | |
| 11492 | + | |
| 11493 | + | |
| 11494 | + | |
| 11495 | + | |
| 11496 | + | |
| 11497 | + | |
| 11498 | + | |
| 11499 | + | |
| 11500 | + | |
| 11501 | + | |
| 11502 | + | |
| 11503 | + | |
| 11504 | + | |
| 11505 | + | |
| 11506 | + | |
| 11507 | + | |
| 11508 | + | |
| 11509 | + | |
| 11510 | + | |
| 11511 | + | |
| 11512 | + | |
| 11513 | + | |
| 11514 | + | |
| 11515 | + | |
| 11516 | + | |
| 11517 | + | |
| 11518 | + | |
| 11519 | + | |
| 11520 | + | |
| 11521 | + | |
| 11522 | + | |
| 11523 | + | |
| 11524 | + | |
| 11525 | + | |
| 11526 | + | |
11469 | 11527 | | |
11470 | 11528 | | |
11471 | 11529 | | |
| |||
0 commit comments