LibWeb: Simplify handling of unicode-range descriptor

We know that this is always a `StyleValueList`
This commit is contained in:
Callum Law 2025-11-29 15:53:22 +13:00 committed by Sam Atkins
parent 47bed173b4
commit 3ab0bdf4fd
Notes: github-actions[bot] 2025-12-01 10:18:11 +00:00

View file

@ -126,12 +126,8 @@ ParsedFontFace ParsedFontFace::from_descriptors(CSSFontFaceDescriptors const& de
Vector<Gfx::UnicodeRange> unicode_ranges;
if (auto value = descriptors.descriptor_or_initial_value(DescriptorID::UnicodeRange)) {
if (value->is_unicode_range()) {
unicode_ranges.append(value->as_unicode_range().unicode_range());
} else if (value->is_value_list()) {
for (auto const& range : value->as_value_list().values())
unicode_ranges.append(range->as_unicode_range().unicode_range());
}
for (auto const& range : value->as_value_list().values())
unicode_ranges.append(range->as_unicode_range().unicode_range());
}
Optional<Percentage> ascent_override;