mirror of
https://github.com/RGBCube/serenity
synced 2025-07-17 07:17:35 +00:00
LibWeb: Remove unused StyleProperties::length_or_fallback function
This commit is contained in:
parent
586a7dca88
commit
e338a0656d
2 changed files with 0 additions and 14 deletions
|
@ -85,19 +85,6 @@ CSS::Size StyleProperties::size_value(CSS::PropertyID id) const
|
||||||
return CSS::Size::make_auto();
|
return CSS::Size::make_auto();
|
||||||
}
|
}
|
||||||
|
|
||||||
Length StyleProperties::length_or_fallback(CSS::PropertyID id, Length const& fallback) const
|
|
||||||
{
|
|
||||||
auto value = property(id);
|
|
||||||
|
|
||||||
if (value->is_calculated())
|
|
||||||
return Length::make_calculated(value->as_calculated());
|
|
||||||
|
|
||||||
if (value->has_length())
|
|
||||||
return value->to_length();
|
|
||||||
|
|
||||||
return fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
LengthPercentage StyleProperties::length_percentage_or_fallback(CSS::PropertyID id, LengthPercentage const& fallback) const
|
LengthPercentage StyleProperties::length_percentage_or_fallback(CSS::PropertyID id, LengthPercentage const& fallback) const
|
||||||
{
|
{
|
||||||
return length_percentage(id).value_or(fallback);
|
return length_percentage(id).value_or(fallback);
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
RefPtr<StyleValue> maybe_null_property(CSS::PropertyID) const;
|
RefPtr<StyleValue> maybe_null_property(CSS::PropertyID) const;
|
||||||
|
|
||||||
CSS::Size size_value(CSS::PropertyID) const;
|
CSS::Size size_value(CSS::PropertyID) const;
|
||||||
Length length_or_fallback(CSS::PropertyID, Length const& fallback) const;
|
|
||||||
LengthPercentage length_percentage_or_fallback(CSS::PropertyID, LengthPercentage const& fallback) const;
|
LengthPercentage length_percentage_or_fallback(CSS::PropertyID, LengthPercentage const& fallback) const;
|
||||||
Optional<LengthPercentage> length_percentage(CSS::PropertyID) const;
|
Optional<LengthPercentage> length_percentage(CSS::PropertyID) const;
|
||||||
LengthBox length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id, const CSS::Length& default_value) const;
|
LengthBox length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id, const CSS::Length& default_value) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue