Andreas Kling
0608de8c12
LibWeb: Rename Layout::Box::size() to content_size()
...
This property represents the CSS content size, so let's reduce ambiguity
by using the spec terminology.
We also bring a bunch of related functions along for the ride.
2022-02-06 01:07:47 +01:00
Andreas Kling
b60e19fd34
LibWeb: Make LineBuilder assign height to empty line boxes
...
This ensures that <br> produces empty line boxes with the line-height
property as their height.
2022-01-23 01:36:13 +01:00
Andreas Kling
70a56d21dc
LibWeb: Don't do horizontal inline line layout twice for last line
...
After pruning empty last line boxes, we now avoid re-running the
horizontal fragment positioning step, since that would be wasted work.
2022-01-23 01:22:41 +01:00
Andreas Kling
ba49dc82e0
LibWeb: Align inline-level boxes to the baseline of the line box
...
Vertical inline alignment is still very unsophisticated, but let's at
least put everything within each line on the same baseline.
2022-01-23 01:22:41 +01:00
Andreas Kling
2b631cde45
LibWeb: Avoid creating an empty first line box in block containers
2022-01-23 01:22:41 +01:00
Andreas Kling
251b2f49a2
LibWeb: Make LineBuilder respect LayoutMode::OnlyRequiredLineBreaks
...
In this layout mode, we should only break when forced (e.g by an
explicit <br> tag.) This is used when determining intrinsic sizes.)
2022-01-23 01:22:41 +01:00
Andreas Kling
d3adc94ce8
LibWeb: Dimension inline-block boxes before deciding about line breaks
...
We won't know if we need to break before the inline-block box until
after we've dimensioned it.
2022-01-23 01:22:41 +01:00
Andreas Kling
00bde9ca51
LibWeb: Add Layout::LineBuilder class for incremental line box layout
...
This class will be used to place items on lines incrementally instead of
the current two-phase approach.
2022-01-23 01:22:41 +01:00