1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibWeb: Parse @font-face rules

This is very limited for now, only caring about `font-family` and `src`.
This commit is contained in:
Sam Atkins 2022-03-28 20:32:28 +01:00 committed by Andreas Kling
parent 804b8c85e8
commit 6672c19c93
2 changed files with 146 additions and 32 deletions

View file

@ -188,6 +188,8 @@ private:
[[nodiscard]] Optional<GeneralEnclosed> parse_general_enclosed(TokenStream<StyleComponentValueRule>&);
RefPtr<CSSRule> parse_font_face_rule(TokenStream<StyleComponentValueRule>&);
[[nodiscard]] RefPtr<CSSRule> convert_to_rule(NonnullRefPtr<StyleRule>);
[[nodiscard]] RefPtr<PropertyOwningCSSStyleDeclaration> convert_to_style_declaration(Vector<DeclarationOrAtRule> declarations);
[[nodiscard]] Optional<StyleProperty> convert_to_style_property(StyleDeclarationRule const&);
@ -339,6 +341,7 @@ private:
Optional<Supports::Feature> parse_supports_feature(TokenStream<StyleComponentValueRule>&);
static bool has_ignored_vendor_prefix(StringView);
static bool is_builtin(StringView);
ParsingContext m_context;