From f7d2392b6c29a5491a5db0d9023a4d01c6704da4 Mon Sep 17 00:00:00 2001 From: Mathis Wiehl Date: Sat, 18 Mar 2023 12:44:45 +0100 Subject: LibWeb: Consider deprecated application/font-woff mime type Though deprecated by IANA, `application/font-woff` is still in active use as a MIME type for WOFF fonts by web servers throughout the wild web. --- Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland') diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index e974f23f3a..2f02bcaaba 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -102,7 +102,7 @@ private: auto mime_type = resource()->mime_type(); if (mime_type == "font/ttf"sv || mime_type == "application/x-font-ttf"sv) return TRY(OpenType::Font::try_load_from_externally_owned_memory(resource()->encoded_data())); - if (mime_type == "font/woff"sv) + if (mime_type == "font/woff"sv || mime_type == "application/font-woff"sv) return TRY(WOFF::Font::try_load_from_externally_owned_memory(resource()->encoded_data())); auto ttf = OpenType::Font::try_load_from_externally_owned_memory(resource()->encoded_data()); if (!ttf.is_error()) -- cgit v1.2.3