1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00
serenity/Userland/Libraries/LibWeb
Mathis Wiehl 3a45bba4e0 LibWeb: Load alternative font urls if others fail
We don't support all parts of the font formats we assume as "supported"
in the CSS parser. For example, if an open type font has a CFF table, we
reject loading it. This meant that until now, when such an
unsupported-supported font url was first in the list of urls, we
couldn't load it at all, even when we would support a later url.

To resolve that, try loading all font urls one after each other, in case
we are not able to load the higher priority one.

This also resolves a FIXME related to spec compliant url prioritization.
Our CSS parser already filters and prioritizes font src urls in
compliance with the spec. However, we still had to resort to brittle
file extension matching, because some websites don't set the `format`
and if the first url in a src list happened to be one we don't support,
the font could not be loaded at all. This now is unnecessary because we
can try and discard the urls instead.
2023-03-18 13:47:51 +01:00
..
ARIA Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Bindings LibWeb: Move initialization of the MainThreadVM to WebContent's main() 2023-03-17 16:39:08 +00:00
Cookie Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Crypto LibWeb: Move code that generates uuid into separate function 2023-03-16 13:17:37 -04:00
CSS LibWeb: Load alternative font urls if others fail 2023-03-18 13:47:51 +01:00
DOM LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
DOMParsing LibWeb: Fix a few const-ness issues 2023-03-06 13:05:43 +00:00
Encoding LibWeb/WebIDL: Store SimpleException message as a String{,View} variant 2023-03-03 19:50:36 +00:00
Fetch LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
FileAPI LibWeb: Fix a few const-ness issues 2023-03-06 13:05:43 +00:00
Geometry LibWeb/WebIDL: Store SimpleException message as a String{,View} variant 2023-03-03 19:50:36 +00:00
HighResolutionTime LibWeb/HighResolutionTime: Add IDL typedef for DOMHighResTimeStamp 2023-03-06 23:57:25 +00:00
HTML LibJS: Propagate errors from VM creation 2023-03-17 16:39:08 +00:00
Infra LibWeb: Use equals_ignoring_ascii_case() in infra helper 2023-03-10 13:15:44 +01:00
IntersectionObserver LibWeb: Make factory method of IntersectionObserver fallible 2023-02-22 09:55:33 +01:00
Layout LibWeb: Treat flex item's cyclic percentage cross size as auto 2023-03-18 00:26:19 +01:00
Loader LibWeb: Don't treat erroring subresource loads as success 2023-03-15 23:29:00 +01:00
MimeSniff LibWeb/Infra: Rename to_ascii_{{lower,upper}_case => {lower,upper}case} 2023-03-04 22:42:42 +00:00
NavigationTiming LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
Page LibWeb+LibWebView+WebContent+Ladybird: Add IPC call that opens new tab 2023-03-16 13:17:37 -04:00
Painting LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
Platform LibWeb: Convert Platform::Timer to JS::SafeFunction 2023-03-07 11:51:12 +00:00
ReferrerPolicy LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
RequestIdleCallback LibWeb/HTML: Port Window.requestIdleCallback() to IDL 2023-03-07 23:33:34 +00:00
ResizeObserver LibWeb: Make factory method of ResizeObserver::ResizeObserver fallible 2023-02-22 09:55:33 +01:00
Scripts LibWeb: Store stylesheet sources as StringViews 2023-02-19 00:51:16 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibWeb: Make factory method of Selection::Selection fallible 2023-02-22 09:55:33 +01:00
Streams LibWeb: Propagate error in factory method of Streams::ReadableStream 2023-02-22 09:55:33 +01:00
SVG Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Make factory methods of UIEvents::WheelEvent fallible 2023-02-22 09:55:33 +01:00
URL LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
WebAssembly LibWeb: Remove remaining WebAssemblyObject data to the namespace file 2023-03-16 19:39:17 +00:00
WebDriver LibWeb+WebContent+WebDriver: Add WebDriver endpoint to open new window 2023-03-16 13:17:37 -04:00
WebGL LibWeb: Port WebGLContextEvent to new String 2023-03-05 18:25:59 +00:00
WebIDL LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
WebSockets LibWeb: Port MessageEvent to new String 2023-03-05 18:25:59 +00:00
XHR LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
XML LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CMakeLists.txt LibWeb: Remove remaining WebAssemblyObject data to the namespace file 2023-03-16 19:39:17 +00:00
Dump.cpp LibWeb: Stop polluting layout tree dumps with TextNode memory addresses 2023-03-12 18:10:32 +01:00
Dump.h LibWeb: Fix ignored .to_string() errors in Web::dump_sheet() 2023-01-12 23:29:57 +00:00
FontCache.cpp LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
FontCache.h LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
Forward.h LibWeb: Port WebAssembly.Table to IDL 2023-03-16 13:54:16 +01:00
idl_files.cmake LibWeb: Port the WebAssembly namespace to IDL 2023-03-16 19:39:17 +00:00
Namespace.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Namespace.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
PixelUnits.h LibWeb: Use type-correct hashing and formatting functions for pixels 2023-01-21 10:36:14 +01:00
TreeNode.h LibJS+LibWeb: Move headers around to allow including Value from Cell 2023-01-29 00:02:45 +00:00