mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb: Compute final line box width *after* placing all fragments
We were doing this after every fragment instead of after every line.
This commit is contained in:
parent
56ff2c112b
commit
3852168c84
Notes:
sideshowbarker
2024-07-19 01:00:05 +09:00
Author: https://github.com/awesomekling
Commit: 3852168c84
1 changed files with 2 additions and 0 deletions
|
@ -180,7 +180,9 @@ void InlineFormattingContext::run(Box&, LayoutMode layout_mode)
|
||||||
|
|
||||||
if (is<Box>(fragment.layout_node()))
|
if (is<Box>(fragment.layout_node()))
|
||||||
dimension_box_on_line(downcast<Box>(fragment.layout_node()), layout_mode);
|
dimension_box_on_line(downcast<Box>(fragment.layout_node()), layout_mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!line_box.fragments().is_empty()) {
|
||||||
float left_edge = line_box.fragments().first().offset().x();
|
float left_edge = line_box.fragments().first().offset().x();
|
||||||
float right_edge = line_box.fragments().last().offset().x() + line_box.fragments().last().width();
|
float right_edge = line_box.fragments().last().offset().x() + line_box.fragments().last().width();
|
||||||
float final_line_box_width = right_edge - left_edge;
|
float final_line_box_width = right_edge - left_edge;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue