mirror of
https://github.com/servo/servo
synced 2026-05-11 09:26:59 +02:00
This moves the Unicode offset types to the `base` crate and makes them generally more usable throughout the Servo codebase. In addition, they are renamed to use Rust naming and to be a bit more consistent: - `UTF8Bytes` -> `Utf8CodeUnitLength` - `UTF16CodeUnits` -> `Utf16CodeUnitLength` There is also a bit more documentation explaining their use. This is preparation for fixing issues with UTF-16 offsets in editable text fields. Testing: This does not change behavior so existing WPT tests should suffice. Signed-off-by: Martin Robinson <mrobinson@igalia.com>