summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-05 23:16:21 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-05 23:17:23 +0100
commit66a053da77974bba002ee3f6332b916ce03d2384 (patch)
treecc8d98e607503b8876037cab882c56c5b1d7ef9b /Libraries
parent65e430eee545d9272821a5a5a4f13f0de3786071 (diff)
downloadserenity-66a053da77974bba002ee3f6332b916ce03d2384.zip
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.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/Layout/InlineFormattingContext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Layout/InlineFormattingContext.cpp b/Libraries/LibWeb/Layout/InlineFormattingContext.cpp
index 270a80a97d..9667973461 100644
--- a/Libraries/LibWeb/Layout/InlineFormattingContext.cpp
+++ b/Libraries/LibWeb/Layout/InlineFormattingContext.cpp
@@ -113,7 +113,6 @@ void InlineFormattingContext::run(LayoutMode layout_mode)
auto text_align = containing_block.style().text_align();
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 max_linebox_width = 0;
@@ -166,7 +165,7 @@ void InlineFormattingContext::run(LayoutMode layout_mode)
// Vertically align everyone's bottom to the line.
// 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
&& fragment.is_justifiable_whitespace()