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

LibWeb: Replace FlexStyleValue with ShorthandStyleValue

We still need the custom parsing and to_string() logic, but nothing
else. :^)
This commit is contained in:
Sam Atkins 2023-09-19 16:26:23 +01:00 committed by Sam Atkins
parent a72788b889
commit aa45b3dfe3
11 changed files with 44 additions and 106 deletions

View file

@ -40,7 +40,6 @@
#include <LibWeb/CSS/StyleValues/EasingStyleValue.h>
#include <LibWeb/CSS/StyleValues/FilterValueListStyleValue.h>
#include <LibWeb/CSS/StyleValues/FlexFlowStyleValue.h>
#include <LibWeb/CSS/StyleValues/FlexStyleValue.h>
#include <LibWeb/CSS/StyleValues/FontStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h>
@ -800,14 +799,6 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
}
if (property_id == CSS::PropertyID::Flex) {
if (value.is_flex()) {
auto const& flex = value.as_flex();
set_longhand_property(CSS::PropertyID::FlexGrow, flex.grow());
set_longhand_property(CSS::PropertyID::FlexShrink, flex.shrink());
set_longhand_property(CSS::PropertyID::FlexBasis, flex.basis());
return;
}
set_longhand_property(CSS::PropertyID::FlexGrow, value);
set_longhand_property(CSS::PropertyID::FlexShrink, value);
set_longhand_property(CSS::PropertyID::FlexBasis, value);