mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 17:02:12 +00:00
LibWeb: Remove StyleValue::has/to_integer()
Only NumericStyleValue holds integers. I'm not sure our current distinction between NumericStyleValue holding an integer or non-integer is useful given it always returns a float. :thonk:
This commit is contained in:
parent
4ecf0b7768
commit
5cbf6eb930
5 changed files with 9 additions and 11 deletions
|
@ -395,8 +395,8 @@ int StyleValue::to_font_weight() const
|
|||
return Gfx::FontWeight::Regular;
|
||||
}
|
||||
}
|
||||
if (has_integer()) {
|
||||
return to_integer();
|
||||
if (is_numeric() && as_numeric().has_integer()) {
|
||||
return as_numeric().integer();
|
||||
}
|
||||
if (is_calculated()) {
|
||||
auto maybe_weight = const_cast<CalculatedStyleValue&>(as_calculated()).resolve_integer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue