LibWeb: Return letter-spacing computed value as CSSPixels

This commit is contained in:
Tim Ledbetter 2025-09-09 09:56:53 +01:00 committed by Sam Atkins
commit 099247d502
Notes: github-actions[bot] 2025-09-10 15:15:10 +00:00
5 changed files with 18 additions and 18 deletions

View file

@ -527,7 +527,7 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next_without_lookahead(
}
CSS::CalculationResolutionContext calculation_context { .length_resolution_context = CSS::Length::ResolutionContext::for_layout_node(text_node) };
auto letter_spacing = text_node.computed_values().letter_spacing().resolved(calculation_context).map([&](auto& it) { return it.to_px(text_node); }).value_or(0);
auto letter_spacing = text_node.computed_values().letter_spacing();
// FIXME: We should apply word spacing to all word-separator characters not just breaking tabs
auto word_spacing = text_node.computed_values().word_spacing().resolved(text_node, CSS::Length::make_px(chunk.font->glyph_width(' ')).to_px(text_node)).absolute_length_to_px();