mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Fix bogus inline-block check in line box layout
When checking if a line box fragment "isn't just dumb inline content", we were checking "is replaced or inline-block". What we really need to be checking is "is replaced or inline-outside-but-not-flow-inside". So now we check that. This fixes an issue where inline-flex boxes were given incorrect extra height due to being treated as regular text for purposes of line height calculation.
This commit is contained in:
parent
20711c76b7
commit
42538b5375
Notes:
sideshowbarker
2024-07-17 05:48:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/42538b5375
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ void LineBuilder::update_last_line()
|
|||
float bottom_of_inline_box = 0;
|
||||
{
|
||||
// FIXME: Support inline-table elements.
|
||||
if (fragment.layout_node().is_replaced_box() || fragment.layout_node().is_inline_block()) {
|
||||
if (fragment.layout_node().is_replaced_box() || (fragment.layout_node().display().is_inline_outside() && !fragment.layout_node().display().is_flow_inside())) {
|
||||
auto const& fragment_box_state = m_layout_state.get(static_cast<Box const&>(fragment.layout_node()));
|
||||
top_of_inline_box = fragment.offset().y() - fragment_box_state.margin_box_top();
|
||||
bottom_of_inline_box = fragment.offset().y() + fragment_box_state.content_height() + fragment_box_state.margin_box_bottom();
|
||||
|
|
Loading…
Reference in a new issue