mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:27:34 +00:00
LibWeb: Remove bogus line box width adjustment
This basically reverts 95715f0c8f
, as it
was totally wrong for text-align:center and text-align:right.
This commit is contained in:
parent
7dae895704
commit
ef33a40b99
1 changed files with 0 additions and 9 deletions
|
@ -158,11 +158,6 @@ void LineBuilder::update_last_line()
|
||||||
return line_box_baseline;
|
return line_box_baseline;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
// Now we're going to align our fragments on the inline axis.
|
|
||||||
// We need to remember how much the last fragment on the line was moved by this process,
|
|
||||||
// since that is used to compute the final width of the entire line box.
|
|
||||||
float last_fragment_x_adjustment = 0;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < line_box.fragments().size(); ++i) {
|
for (size_t i = 0; i < line_box.fragments().size(); ++i) {
|
||||||
auto& fragment = line_box.fragments()[i];
|
auto& fragment = line_box.fragments()[i];
|
||||||
|
|
||||||
|
@ -195,7 +190,6 @@ void LineBuilder::update_last_line()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
last_fragment_x_adjustment = new_fragment_x - fragment.offset().x();
|
|
||||||
fragment.set_offset({ new_fragment_x, new_fragment_y });
|
fragment.set_offset({ new_fragment_x, new_fragment_y });
|
||||||
|
|
||||||
bottom = max(bottom, new_fragment_y + fragment.height() + fragment.border_box_bottom());
|
bottom = max(bottom, new_fragment_y + fragment.height() + fragment.border_box_bottom());
|
||||||
|
@ -214,9 +208,6 @@ void LineBuilder::update_last_line()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!line_box.fragments().is_empty())
|
|
||||||
line_box.m_width += last_fragment_x_adjustment;
|
|
||||||
|
|
||||||
line_box.m_bottom = bottom;
|
line_box.m_bottom = bottom;
|
||||||
line_box.m_baseline = line_box_baseline;
|
line_box.m_baseline = line_box_baseline;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue