mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-21 07:29:53 +00:00
LibWeb: Return letter-spacing
computed value as CSSPixels
This commit is contained in:
parent
c677b64773
commit
099247d502
Notes:
github-actions[bot]
2025-09-10 15:15:10 +00:00
Author: https://github.com/tcl3
Commit: 099247d502
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6137
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/Calme1709
Reviewed-by: https://github.com/gmta ✅
5 changed files with 18 additions and 18 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue