mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibHTML: A tiny bit of work towards block layout.
This commit is contained in:
parent
fc9a1a1328
commit
e423bb4901
2 changed files with 21 additions and 1 deletions
|
@ -24,6 +24,7 @@ public:
|
|||
bool is_initial() const { return type() == Type::Initial; }
|
||||
|
||||
virtual String to_string() const = 0;
|
||||
virtual Length to_length() const { return {}; }
|
||||
|
||||
protected:
|
||||
explicit StyleValue(Type);
|
||||
|
@ -60,7 +61,10 @@ public:
|
|||
}
|
||||
virtual ~LengthStyleValue() override {}
|
||||
|
||||
String to_string() const override { return m_length.to_string(); }
|
||||
virtual String to_string() const override { return m_length.to_string(); }
|
||||
virtual Length to_length() const override { return m_length; }
|
||||
|
||||
const Length& length() const { return m_length; }
|
||||
|
||||
private:
|
||||
explicit LengthStyleValue(const Length& length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue