mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
layout: Expand text clipping boundaries based on the largest advance in run (#42403)
Servo does not yet calculate the ink overflow area, as this sort of thing is usually a result of `contain: paint` which Servo does not support yet. We just need to ensure that text clipping is large enough to contain the ink of all of the glyphs in the run. This change just expands the rectangle based on glyph advances by 2 times the largest advance, which should be big enough for most glyphs. This is a big of a workaround until we have support for `contain: paint`. Testing: - This change adds a Servo-specific test to ensure glyphs are fully inked. While this test would run just fine in other browsers, it isn't very useful to them as this is test is very specific to the way that Servo draws glyphs. - This also fixes a variety of existing WPT tests. Fixes: #41413. 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
@@ -253,6 +253,19 @@
|
||||
{}
|
||||
]
|
||||
],
|
||||
"text-advance-less-than-ink-clipping.html": [
|
||||
"a726bd2881ff7cb29a9e68f8e7f1fae728b9382e",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/_mozilla/appearance/text-advance-less-than-ink-clipping-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"textarea-caret-following-linebreak.html": [
|
||||
"55bc06e372e9ce8ad4d62d368a644c1f1cd3ffd9",
|
||||
[
|
||||
@@ -8324,6 +8337,10 @@
|
||||
[]
|
||||
]
|
||||
},
|
||||
"text-advance-less-than-ink-clipping-ref.html": [
|
||||
"af9ec609b175040a66756fb6ce00d81a2e5707ec",
|
||||
[]
|
||||
],
|
||||
"textarea-caret-following-linebreak-ref.html": [
|
||||
"f424853f243ff0fe4c43506db800b51afc294113",
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user