mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +00:00
LibWeb: Move and rename CSSStyleValue to StyleValues/StyleValue.{h,cpp}
This reverts 0e3487b9ab
.
Back when I made that change, I thought we could make our StyleValue
classes match the typed-om definitions directly. However, they have
different requirements. Typed-om types need to be mutable and GCed,
whereas StyleValues are immutable and ideally wouldn't require a JS VM.
While I was already making such a cataclysmic change, I've moved it into
the StyleValues directory, because it *not* being there has bothered me
for a long time. 😅
This commit is contained in:
parent
0d8ad0a9fe
commit
c57975c9fd
Notes:
github-actions[bot]
2025-08-08 14:20:54 +00:00
Author: https://github.com/AtkinsSJ
Commit: c57975c9fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775
Reviewed-by: https://github.com/tcl3 ✅
167 changed files with 989 additions and 990 deletions
|
@ -214,12 +214,12 @@ OwnPtr<SyntaxNode> parse_as_syntax(Vector<ComponentValue> const& component_value
|
|||
return AlternativesSyntaxNode::create(move(syntax_components));
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue const> parse_with_a_syntax(ParsingParams const& parsing_params, Vector<ComponentValue> const& input, SyntaxNode const& syntax, Optional<DOM::AbstractElement> const& element)
|
||||
NonnullRefPtr<StyleValue const> parse_with_a_syntax(ParsingParams const& parsing_params, Vector<ComponentValue> const& input, SyntaxNode const& syntax, Optional<DOM::AbstractElement> const& element)
|
||||
{
|
||||
return Parser::create(parsing_params, ""sv).parse_with_a_syntax(input, syntax, element);
|
||||
}
|
||||
|
||||
RefPtr<CSSStyleValue const> Parser::parse_according_to_syntax_node(TokenStream<ComponentValue>& tokens, SyntaxNode const& syntax_node, Optional<DOM::AbstractElement> const& element)
|
||||
RefPtr<StyleValue const> Parser::parse_according_to_syntax_node(TokenStream<ComponentValue>& tokens, SyntaxNode const& syntax_node, Optional<DOM::AbstractElement> const& element)
|
||||
{
|
||||
auto transaction = tokens.begin_transaction();
|
||||
|
||||
|
@ -301,7 +301,7 @@ RefPtr<CSSStyleValue const> Parser::parse_according_to_syntax_node(TokenStream<C
|
|||
}
|
||||
|
||||
// https://drafts.csswg.org/css-values-5/#parse-with-a-syntax
|
||||
NonnullRefPtr<CSSStyleValue const> Parser::parse_with_a_syntax(Vector<ComponentValue> const& input, SyntaxNode const& syntax, Optional<DOM::AbstractElement> const& element)
|
||||
NonnullRefPtr<StyleValue const> Parser::parse_with_a_syntax(Vector<ComponentValue> const& input, SyntaxNode const& syntax, Optional<DOM::AbstractElement> const& element)
|
||||
{
|
||||
// 1. Parse a list of component values from values, and let raw parse be the result.
|
||||
// NB: Already done before this point.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue