mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
LibWeb: Fix vertical position of top table caption
Setting the top of the table coordinate should not consider the top padding and margin of the caption, just the bottom and content height.
This commit is contained in:
parent
902e76baff
commit
66c92ebe3d
3 changed files with 43 additions and 1 deletions
|
@ -91,7 +91,7 @@ CSSPixels TableFormattingContext::run_caption_layout(LayoutMode layout_mode, CSS
|
|||
caption_context->resolve_vertical_box_model_metrics(child_box);
|
||||
auto const& caption_state = m_state.get(child_box);
|
||||
if (phase == CSS::CaptionSide::Top) {
|
||||
m_state.get_mutable(table_box()).set_content_y(caption_state.margin_box_height());
|
||||
m_state.get_mutable(table_box()).set_content_y(caption_state.content_height() + caption_state.margin_box_bottom());
|
||||
} else {
|
||||
m_state.get_mutable(child_box).set_content_y(
|
||||
m_state.get(table_box()).margin_box_height() + caption_state.margin_box_top());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue