mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Add word spacing to tab size correctly
We should be adding the computed value for word spacing not letter spacing twice.
This commit is contained in:
parent
1b82cb43c2
commit
2f41be733f
Notes:
github-actions[bot]
2024-10-28 21:56:26 +00:00
Author: https://github.com/kostyafarber
Commit: 2f41be733f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1999
3 changed files with 59 additions and 1 deletions
|
@ -266,7 +266,7 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next_without_lookahead(
|
|||
auto computed_word_spacing = text_node.computed_values().word_spacing();
|
||||
|
||||
auto letter_spacing = computed_letter_spacing.resolved(resolution_context).to_px(text_node);
|
||||
auto word_spacing = computed_letter_spacing.resolved(resolution_context).to_px(text_node);
|
||||
auto word_spacing = computed_word_spacing.resolved(resolution_context).to_px(text_node);
|
||||
|
||||
return CSSPixels::nearest_value_for(tab_number * (chunk.font->glyph_width(' ') + word_spacing.to_float() + letter_spacing.to_float()));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue