mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/CSS: Add method to parse <declaration-value>
This has an extra parameter to allow stopping at the first comma token, which we need for var() and attr()'s "argument grammar". Co-authored-by: Tim Ledbetter <tim.ledbetter@ladybird.org>
This commit is contained in:
parent
26acd897bf
commit
b417d13a7b
Notes:
github-actions[bot]
2025-07-09 15:45:51 +00:00
Author: https://github.com/AtkinsSJ
Commit: b417d13a7b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5226
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 61 additions and 0 deletions
|
@ -138,6 +138,12 @@ public:
|
|||
|
||||
[[nodiscard]] LengthOrCalculated parse_as_sizes_attribute(DOM::Element const& element, HTML::HTMLImageElement const* img = nullptr);
|
||||
|
||||
enum class StopAtComma : u8 {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
static Optional<Vector<ComponentValue>> parse_declaration_value(TokenStream<ComponentValue>&, StopAtComma = StopAtComma::No);
|
||||
|
||||
private:
|
||||
Parser(ParsingParams const&, Vector<Token>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue