mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibWeb: Split RectStyleValue out of StyleValue.{h,cpp}
This commit is contained in:
parent
4bf59c59bb
commit
3a2de67c7b
8 changed files with 67 additions and 33 deletions
|
@ -657,28 +657,6 @@ private:
|
|||
} m_properties;
|
||||
};
|
||||
|
||||
class RectStyleValue : public StyleValueWithDefaultOperators<RectStyleValue> {
|
||||
public:
|
||||
static ValueComparingNonnullRefPtr<RectStyleValue> create(EdgeRect rect);
|
||||
virtual ~RectStyleValue() override = default;
|
||||
|
||||
EdgeRect rect() const { return m_rect; }
|
||||
virtual ErrorOr<String> to_string() const override;
|
||||
virtual bool has_rect() const override { return true; }
|
||||
virtual EdgeRect to_rect() const override { return m_rect; }
|
||||
|
||||
bool properties_equal(RectStyleValue const& other) const { return m_rect == other.m_rect; }
|
||||
|
||||
private:
|
||||
explicit RectStyleValue(EdgeRect rect)
|
||||
: StyleValueWithDefaultOperators(Type::Rect)
|
||||
, m_rect(rect)
|
||||
{
|
||||
}
|
||||
|
||||
EdgeRect m_rect;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue