mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibWeb: Understand the format()
part of a @font-face
's src
This is used to skip downloading fonts in formats that we don't support. Currently we only support TTF as far as I am aware. The parts of a `src` are in a fixed order, unusually, which makes the parsing more nesty instead of loopy.
This commit is contained in:
parent
dbb0b68175
commit
12b8570ce3
4 changed files with 91 additions and 28 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <AK/Result.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
||||
#include <LibWeb/CSS/FontFace.h>
|
||||
#include <LibWeb/CSS/GeneralEnclosed.h>
|
||||
#include <LibWeb/CSS/MediaQuery.h>
|
||||
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
||||
|
@ -204,6 +205,7 @@ private:
|
|||
Optional<GeneralEnclosed> parse_general_enclosed(TokenStream<ComponentValue>&);
|
||||
|
||||
RefPtr<CSSRule> parse_font_face_rule(TokenStream<ComponentValue>&);
|
||||
Vector<FontFace::Source> parse_font_face_src(TokenStream<ComponentValue>&);
|
||||
|
||||
RefPtr<CSSRule> convert_to_rule(NonnullRefPtr<StyleRule>);
|
||||
RefPtr<PropertyOwningCSSStyleDeclaration> convert_to_style_declaration(Vector<DeclarationOrAtRule> declarations);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue