LibWeb: Actually, don't align all inline content to alphabetic baseline

This essentially reverts 1b46a52cfc
and adds more tests.

The reverted change was an incorrect workaround for the real issue,
which was that we weren't creating anonymous wrapper boxes around inline
children of table-cell boxes.

Now that this has been fixed, we can go back to aligning text properly.
This commit is contained in:
Andreas Kling 2025-02-25 20:37:10 +01:00 committed by Andreas Kling
commit 47f5da7523
Notes: github-actions[bot] 2025-02-25 22:56:46 +00:00
5 changed files with 112 additions and 4 deletions

View file

@ -286,10 +286,6 @@ void LineBuilder::update_last_line()
auto alphabetic_baseline = m_current_block_offset + line_box_baseline - fragment.baseline() + effective_box_top_offset;
// NOTE: Plain inline text content is always on the alphabetic baseline.
if (!fragment.is_atomic_inline())
return alphabetic_baseline;
switch (vertical_align) {
case CSS::VerticalAlign::Baseline:
return alphabetic_baseline;