mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 20:35:06 +00:00
LibHTML: Implement basic block height computation
..and add vertical box properties to the layout tree dumps.
This commit is contained in:
parent
70eca3b500
commit
fc43cf929d
4 changed files with 72 additions and 18 deletions
|
@ -61,6 +61,14 @@ public:
|
|||
|
||||
Display display() const;
|
||||
|
||||
Length length_or_fallback(const StringView& property_name, const Length& fallback)
|
||||
{
|
||||
auto value = property(property_name);
|
||||
if (!value.has_value())
|
||||
return fallback;
|
||||
return value.value()->to_length();
|
||||
}
|
||||
|
||||
protected:
|
||||
explicit StyledNode(const Node*);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue