mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Parse CSS fit-content(<length-percentage>) values
Before this change, we only parsed fit-content as a standalone keyword, but CSS-SIZING-3 added it as a function as well. I don't know of anything else in CSS that is overloaded like this, so it ends up looking a little awkward in the implementation. Note that a lot of code had already been prepped for fit-content values to have an argument, we just weren't parsing it.
This commit is contained in:
parent
6fc19ec059
commit
8ab61843be
Notes:
github-actions[bot]
2025-02-26 23:45:14 +00:00
Author: https://github.com/awesomekling
Commit: 8ab61843be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3706
Reviewed-by: https://github.com/AtkinsSJ
25 changed files with 185 additions and 67 deletions
|
@ -106,6 +106,7 @@ public:
|
|||
Easing,
|
||||
Edge,
|
||||
FilterValueList,
|
||||
FitContent,
|
||||
Flex,
|
||||
FontVariant,
|
||||
Frequency,
|
||||
|
@ -216,6 +217,10 @@ public:
|
|||
FilterValueListStyleValue const& as_filter_value_list() const;
|
||||
FilterValueListStyleValue& as_filter_value_list() { return const_cast<FilterValueListStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_filter_value_list()); }
|
||||
|
||||
[[nodiscard]] bool is_fit_content() const { return type() == Type::FitContent; }
|
||||
[[nodiscard]] FitContentStyleValue const& as_fit_content() const;
|
||||
[[nodiscard]] FitContentStyleValue& as_fit_content() { return const_cast<FitContentStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_fit_content()); }
|
||||
|
||||
bool is_flex() const { return type() == Type::Flex; }
|
||||
FlexStyleValue const& as_flex() const;
|
||||
FlexStyleValue& as_flex() { return const_cast<FlexStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_flex()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue