|
@@ -661,43 +661,6 @@ private:
|
|
NonnullOwnPtr<CalcSum> m_expression;
|
|
NonnullOwnPtr<CalcSum> m_expression;
|
|
};
|
|
};
|
|
|
|
|
|
-class FlexStyleValue final : public StyleValueWithDefaultOperators<FlexStyleValue> {
|
|
|
|
-public:
|
|
|
|
- static ValueComparingNonnullRefPtr<FlexStyleValue> create(
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> grow,
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> shrink,
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> basis)
|
|
|
|
- {
|
|
|
|
- return adopt_ref(*new FlexStyleValue(move(grow), move(shrink), move(basis)));
|
|
|
|
- }
|
|
|
|
- virtual ~FlexStyleValue() override = default;
|
|
|
|
-
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> grow() const { return m_properties.grow; }
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> shrink() const { return m_properties.shrink; }
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> basis() const { return m_properties.basis; }
|
|
|
|
-
|
|
|
|
- virtual ErrorOr<String> to_string() const override;
|
|
|
|
-
|
|
|
|
- bool properties_equal(FlexStyleValue const& other) const { return m_properties == other.m_properties; };
|
|
|
|
-
|
|
|
|
-private:
|
|
|
|
- FlexStyleValue(
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> grow,
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> shrink,
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> basis)
|
|
|
|
- : StyleValueWithDefaultOperators(Type::Flex)
|
|
|
|
- , m_properties { .grow = move(grow), .shrink = move(shrink), .basis = move(basis) }
|
|
|
|
- {
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- struct Properties {
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> grow;
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> shrink;
|
|
|
|
- ValueComparingNonnullRefPtr<StyleValue> basis;
|
|
|
|
- bool operator==(Properties const&) const = default;
|
|
|
|
- } m_properties;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
class FlexFlowStyleValue final : public StyleValueWithDefaultOperators<FlexFlowStyleValue> {
|
|
class FlexFlowStyleValue final : public StyleValueWithDefaultOperators<FlexFlowStyleValue> {
|
|
public:
|
|
public:
|
|
static ValueComparingNonnullRefPtr<FlexFlowStyleValue> create(ValueComparingNonnullRefPtr<StyleValue> flex_direction, ValueComparingNonnullRefPtr<StyleValue> flex_wrap)
|
|
static ValueComparingNonnullRefPtr<FlexFlowStyleValue> create(ValueComparingNonnullRefPtr<StyleValue> flex_direction, ValueComparingNonnullRefPtr<StyleValue> flex_wrap)
|