mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:07:34 +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())
|
if (!source.url.is_valid())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto path = source.url.path();
|
if (source.url.protocol() != "data") {
|
||||||
if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
|
auto path = source.url.path();
|
||||||
&& !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
|
if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
|
||||||
continue;
|
&& !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
candidate_url = source.url;
|
candidate_url = source.url;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue