mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb/CSS: Implement "parse with a <syntax>
"
Uses the SyntaxNode tree to parse a list of ComponentValues into some kind of StyleValue.
This commit is contained in:
parent
ded2207762
commit
0a5e8c2865
Notes:
github-actions[bot]
2025-07-16 13:49:04 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0a5e8c2865
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5400
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 140 additions and 7 deletions
|
@ -144,6 +144,8 @@ public:
|
|||
};
|
||||
static Optional<Vector<ComponentValue>> parse_declaration_value(TokenStream<ComponentValue>&, StopAtComma = StopAtComma::No);
|
||||
|
||||
NonnullRefPtr<CSSStyleValue const> parse_with_a_syntax(Vector<ComponentValue> const& input, SyntaxNode const& syntax, Optional<DOM::AbstractElement> const& element = {});
|
||||
|
||||
private:
|
||||
Parser(ParsingParams const&, Vector<Token>);
|
||||
|
||||
|
@ -517,6 +519,8 @@ private:
|
|||
|
||||
NonnullRefPtr<CSSStyleValue const> resolve_unresolved_style_value(DOM::AbstractElement&, GuardedSubstitutionContexts&, PropertyIDOrCustomPropertyName, UnresolvedStyleValue const&);
|
||||
|
||||
RefPtr<CSSStyleValue const> parse_according_to_syntax_node(TokenStream<ComponentValue>& tokens, SyntaxNode const& syntax_node, Optional<DOM::AbstractElement> const& element);
|
||||
|
||||
static bool has_ignored_vendor_prefix(StringView);
|
||||
|
||||
void extract_property(Declaration const&, Parser::PropertiesAndCustomProperties&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue