mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
layout: Properly count characters when segmenting IFC text (#42399)
There was a bug where characters were not properly counted when segmeting IFC text. Immediately incrementing the `current_character_index` meant that the count was always one character off. This character count is mainly used for drawing selections and really matters when multiple text segments are in a single IFC. This change fixes that by counting characters in the same way we were counting byte indices for the text. Testing: This change adds a Servo-specific WPT-style test. As it is quite difficult to reproduce the correct display in a different way, a mismatch test is used. Since this is mainly about appearance and is very specific to our implementation the test is Servo-specific. Fixes: #42354. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
17
tests/wpt/mozilla/meta/MANIFEST.json
vendored
17
tests/wpt/mozilla/meta/MANIFEST.json
vendored
@@ -136,6 +136,19 @@
|
||||
},
|
||||
"reftest": {
|
||||
"appearance": {
|
||||
"input-text-caret-mixed-language.html": [
|
||||
"9fd52d39a076d9d03876efd93af30402e17e5ee0",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/_mozilla/appearance/input-text-caret-mixed-language-ref.html",
|
||||
"!="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"input-textual-definite-width.html": [
|
||||
"59f1797fab3d1889bbcb7863178c6c5ef9e54f19",
|
||||
[
|
||||
@@ -8269,6 +8282,10 @@
|
||||
[]
|
||||
],
|
||||
"appearance": {
|
||||
"input-text-caret-mixed-language-ref.html": [
|
||||
"ff0b91f2a8857fdefa4a8a3d7d75e06e53e699cf",
|
||||
[]
|
||||
],
|
||||
"input-textual-definite-width-ref.html": [
|
||||
"7a256be23b3c084bb8477d7380a8b1801ec07f05",
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user