mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Save layout mode inside formatting context object
FormattingContext::run() does not allow reentrancy, so it's safe to save and access layout mode from FC object. This avoids need to drill it through methods of a formatting context and makes it clear that this value could never be changed after FC construction.
This commit is contained in:
parent
623e358d7a
commit
90b8bfc04c
Notes:
github-actions[bot]
2024-09-11 07:30:59 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 90b8bfc04c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1367
15 changed files with 124 additions and 124 deletions
|
@ -65,8 +65,8 @@ GridFormattingContext::GridTrack GridFormattingContext::GridTrack::create_gap(CS
|
|||
};
|
||||
}
|
||||
|
||||
GridFormattingContext::GridFormattingContext(LayoutState& state, Box const& grid_container, FormattingContext* parent)
|
||||
: FormattingContext(Type::Grid, state, grid_container, parent)
|
||||
GridFormattingContext::GridFormattingContext(LayoutState& state, LayoutMode layout_mode, Box const& grid_container, FormattingContext* parent)
|
||||
: FormattingContext(Type::Grid, layout_mode, state, grid_container, parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1771,7 +1771,7 @@ CSSPixelRect GridFormattingContext::get_grid_area_rect(GridItem const& grid_item
|
|||
return { x_start, y_start, x_end - x_start, y_end - y_start };
|
||||
}
|
||||
|
||||
void GridFormattingContext::run(LayoutMode, AvailableSpace const& available_space)
|
||||
void GridFormattingContext::run(AvailableSpace const& available_space)
|
||||
{
|
||||
m_available_space = available_space;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue