Просмотр исходного кода

LibWeb: Fix bogus condition when checking CSS font file extensions

Thanks Idan for pointing this out! :^)
Andreas Kling 2 лет назад
Родитель
Сommit
1c0fc75cb6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Userland/Libraries/LibWeb/CSS/StyleComputer.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleComputer.cpp

@@ -1368,7 +1368,7 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet)
 
 
             auto path = source.url.path();
             auto path = source.url.path();
             if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
             if (!path.ends_with(".woff"sv, AK::CaseSensitivity::CaseInsensitive)
-                || path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
+                && !path.ends_with(".ttf"sv, AK::CaseSensitivity::CaseInsensitive)) {
                 continue;
                 continue;
             }
             }