mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Simplify handling of unicode-range descriptor
We know that this is always a `StyleValueList`
This commit is contained in:
parent
47bed173b4
commit
3ab0bdf4fd
Notes:
github-actions[bot]
2025-12-01 10:18:11 +00:00
Author: https://github.com/Calme1709
Commit: 3ab0bdf4fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue