LibWeb: Add generic int_from_style_value method

Reduces duplication in line with `number_from_style_value`,
`string_from_style_value` etc
This commit is contained in:
Callum Law
2026-02-04 19:34:33 +13:00
committed by Sam Atkins
parent 31158ef448
commit 32b9ff21df
Notes: github-actions[bot] 2026-02-23 11:24:15 +00:00
7 changed files with 27 additions and 49 deletions

View File

@@ -894,6 +894,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
computed_values.set_text_anchor(computed_style.text_anchor());
// FIXME: Support calc()
if (auto const& column_count = computed_style.property(CSS::PropertyID::ColumnCount); column_count.is_integer())
computed_values.set_column_count(CSS::ColumnCount::make_integer(column_count.as_integer().integer()));