skia/skia/62ca6919c36cdc2c54b67867ab6650bb4bba47b6 Reland "[skparagraph] Fix bidirectional placeholder layout"
This relands https://skia-review.googlesource.com/c/skia/+/1366676,
reverted in https://skia-review.googlesource.com/c/skia/+/1384836.
Lay out placeholder runs in the visual order produced by the Unicode
bidirectional algorithm instead of substituting their source order.
Return placeholder boxes in logical insertion order so clients can still
associate each box with the corresponding inline object.
Translate placeholder glyph positions from their shaping origin to the
visual run position when hit testing, avoiding a duplicated offset.
Add regression coverage for RTL and mixed-direction placeholders,
different widths, reflow, maxLines, range boxes and caret boundaries.
Cover Russian, Arabic and mixed-script text using Roboto and Noto Naskh
Arabic from the existing skparagraph font asset. No new fonts are
needed.
Use UNIX_ONLY_TEST for the four regression tests.
Bug: https://github.com/flutter/flutter/issues/54400
Change-Id: I0c6dad15b20e7a8efd62db61568212f2cda9ea8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1385796
Reviewed-by: Florin Malita <fmalita@google.com>
Auto-Submit: Igor Molchanov <me@molchanovia.dev>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
4 files changed