mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 09:06:08 +00:00
LibWeb: Don't add range data for FontCascadeList with no Unicode ranges
This fixes a bunch of WPT crashes in /html/canvas/offscreen/text/
This commit is contained in:
parent
9f7447f546
commit
a4fb21308d
Notes:
github-actions[bot]
2025-07-15 08:07:50 +00:00
Author: https://github.com/awesomekling
Commit: a4fb21308d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5446
Reviewed-by: https://github.com/tcl3
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ void FontCascadeList::add(NonnullRefPtr<Font const> font)
|
|||
|
||||
void FontCascadeList::add(NonnullRefPtr<Font const> font, Vector<UnicodeRange> unicode_ranges)
|
||||
{
|
||||
if (unicode_ranges.is_empty()) {
|
||||
m_fonts.append({ move(font), {} });
|
||||
return;
|
||||
}
|
||||
u32 lowest_code_point = 0xFFFFFFFF;
|
||||
u32 highest_code_point = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue