mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
LibWeb: Account for Calculated
in Length methods
We were ignoring this in a couple of places.
This commit is contained in:
parent
64f112c4ea
commit
a07fed4e53
2 changed files with 14 additions and 6 deletions
|
@ -112,15 +112,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
String to_string() const
|
||||
{
|
||||
if (is_auto())
|
||||
return "auto";
|
||||
return String::formatted("{}{}", m_value, unit_name());
|
||||
}
|
||||
String to_string() const;
|
||||
|
||||
bool operator==(const Length& other) const
|
||||
{
|
||||
if (is_calculated())
|
||||
return m_calculated_style == other.m_calculated_style;
|
||||
return m_type == other.m_type && m_value == other.m_value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue