mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:27:45 +00:00
LibWeb/CSS: Revert to PercentageOr::resolve() to be templated
In 4bc38300ad
this function was modified
to accept only Angle instead of being templated, with the purpose of
preventing Length from being passed.
This change reverts the function to being templated but adds a
constraint specifically forbidding Length. This adjustment will allow
for the future use of Frequency, Number, Time, etc., if we would want.
This commit is contained in:
parent
be7538961b
commit
9b7b97b2f6
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ public:
|
|||
return resolved(layout_node, reference_value).to_px(layout_node);
|
||||
}
|
||||
|
||||
Angle resolved(Layout::Node const& layout_node, Angle reference_value) const
|
||||
T resolved(Layout::Node const& layout_node, T reference_value) const
|
||||
requires(!IsSame<T, Length>)
|
||||
{
|
||||
return m_value.visit(
|
||||
[&](T const& t) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue