1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibWeb: Store overflow data in the FormattingState

This commit is contained in:
Andreas Kling 2022-02-21 11:22:08 +01:00
parent 92266d2247
commit 2615728d6b
4 changed files with 15 additions and 14 deletions

View file

@ -21,11 +21,12 @@ void FormattingState::commit()
node.box_model().border = { node_state.border_top, node_state.border_right, node_state.border_bottom, node_state.border_left };
node.box_model().margin = { node_state.margin_top, node_state.margin_right, node_state.margin_bottom, node_state.margin_left };
// For boxes, transfer relative offset and size.
// For boxes, transfer relative offset, size, and overflow data.
if (is<Layout::Box>(node)) {
auto& box = static_cast<Layout::Box&>(node);
box.set_offset(node_state.offset);
box.set_content_size(node_state.content_width, node_state.content_height);
box.set_overflow_data(move(node_state.overflow_data));
}
// For block containers, transfer line boxes.