mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
LibWeb: Add Length::is_undefined_or_auto()
Quite often, we want the same behavior in both cases. This allows us to express that with a single method.
This commit is contained in:
parent
abdf36b171
commit
daa88448e1
1 changed files with 1 additions and 0 deletions
|
@ -78,6 +78,7 @@ public:
|
||||||
return resolved(make_px(0), layout_node, reference_for_percent);
|
return resolved(make_px(0), layout_node, reference_for_percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_undefined_or_auto() const { return m_type == Type::Undefined || m_type == Type::Auto; }
|
||||||
bool is_undefined() const { return m_type == Type::Undefined; }
|
bool is_undefined() const { return m_type == Type::Undefined; }
|
||||||
bool is_percentage() const { return m_type == Type::Percentage; }
|
bool is_percentage() const { return m_type == Type::Percentage; }
|
||||||
bool is_auto() const { return m_type == Type::Auto; }
|
bool is_auto() const { return m_type == Type::Auto; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue