LibWeb/CSS: Bring previous CSSRule parsing up to standard

GCPtrs instead of raw pointers, and logging when the media rule is
invalid.
This commit is contained in:
Sam Atkins 2024-08-09 14:42:45 +01:00 committed by Andreas Kling
commit 80a20be176
Notes: github-actions[bot] 2024-08-10 08:38:46 +00:00
3 changed files with 22 additions and 12 deletions

View file

@ -215,13 +215,13 @@ private:
Optional<GeneralEnclosed> parse_general_enclosed(TokenStream<ComponentValue>&);
CSSRule* parse_font_face_rule(TokenStream<ComponentValue>&);
JS::GCPtr<CSSFontFaceRule> parse_font_face_rule(TokenStream<ComponentValue>&);
template<typename T>
Vector<ParsedFontFace::Source> parse_font_face_src(TokenStream<T>&);
CSSRule* convert_to_rule(NonnullRefPtr<Rule>);
CSSMediaRule* convert_to_media_rule(NonnullRefPtr<Rule>);
JS::GCPtr<CSSRule> convert_to_rule(NonnullRefPtr<Rule>);
JS::GCPtr<CSSMediaRule> convert_to_media_rule(Rule&);
JS::GCPtr<CSSKeyframesRule> convert_to_keyframes_rule(Rule&);
JS::GCPtr<CSSImportRule> convert_to_import_rule(Rule&);
JS::GCPtr<CSSNamespaceRule> convert_to_namespace_rule(Rule&);