mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibWeb: Don't ignore data: URLs in @font-face src
Since data: URLs don't have a path, we shouldn't be checking for a TTF or WOFF extension. Thanks Timon for pointing this out! :^)
This commit is contained in:
parent
4910cc1879
commit
a60c5166c6
1 changed files with 6 additions and 4 deletions
|
@ -1366,10 +1366,12 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)
|
|||
if (!source.url.is_valid())
|
||||
continue;
|
||||
|
||||
auto path = source.url.path();
|
||||
if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
|
||||
&& !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
|
||||
continue;
|
||||
if (source.url.protocol() != "data") {
|
||||
auto path = source.url.path();
|
||||
if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
|
||||
&& !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
candidate_url = source.url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue