1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

LibWeb: Make computed flex-grow and flex-shrink always available

These values are not allowed to be absent (auto/none/etc) so we don't
need to use Optional<float> for them. This simplifies some things.
This commit is contained in:
Andreas Kling 2021-10-19 15:22:08 +02:00
parent 19eda59359
commit 07f15aa550
6 changed files with 32 additions and 40 deletions

View file

@ -264,8 +264,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
if (flex_basis.has_value())
computed_values.set_flex_basis(flex_basis.value());
computed_values.set_flex_grow_factor(specified_style.flex_grow_factor());
computed_values.set_flex_shrink_factor(specified_style.flex_shrink_factor());
computed_values.set_flex_grow(specified_style.flex_grow());
computed_values.set_flex_shrink(specified_style.flex_shrink());
auto justify_content = specified_style.justify_content();
if (justify_content.has_value())