mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 05:47:36 +00:00
LibWeb: Don't subtract dubious "line spacing" from line y offsets
I'm not sure what this was trying to achieve, but it was moving all line fragments upwards and a lot of things look a lot better if we just stop doing that.
This commit is contained in:
parent
65e430eee5
commit
66a053da77
1 changed files with 1 additions and 2 deletions
|
@ -113,7 +113,6 @@ void InlineFormattingContext::run(LayoutMode layout_mode)
|
||||||
|
|
||||||
auto text_align = containing_block.style().text_align();
|
auto text_align = containing_block.style().text_align();
|
||||||
float min_line_height = containing_block.specified_style().line_height(containing_block);
|
float min_line_height = containing_block.specified_style().line_height(containing_block);
|
||||||
float line_spacing = min_line_height - containing_block.specified_style().font().glyph_height();
|
|
||||||
float content_height = 0;
|
float content_height = 0;
|
||||||
float max_linebox_width = 0;
|
float max_linebox_width = 0;
|
||||||
|
|
||||||
|
@ -166,7 +165,7 @@ void InlineFormattingContext::run(LayoutMode layout_mode)
|
||||||
|
|
||||||
// Vertically align everyone's bottom to the line.
|
// Vertically align everyone's bottom to the line.
|
||||||
// FIXME: Support other kinds of vertical alignment.
|
// FIXME: Support other kinds of vertical alignment.
|
||||||
fragment.set_offset({ roundf(x_offset + fragment.offset().x()), content_height + (max_height - fragment.height()) - (line_spacing / 2) });
|
fragment.set_offset({ roundf(x_offset + fragment.offset().x()), content_height + (max_height - fragment.height()) });
|
||||||
|
|
||||||
if (text_align == CSS::TextAlign::Justify
|
if (text_align == CSS::TextAlign::Justify
|
||||||
&& fragment.is_justifiable_whitespace()
|
&& fragment.is_justifiable_whitespace()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue