1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:47:45 +00:00

LibWeb: Make LineBuilder aware of the current LayoutMode

This will allow us to override the available space correctly when doing
intrinsic sizing.
This commit is contained in:
Andreas Kling 2022-03-18 14:39:07 +01:00
parent 915ee66bd6
commit 28642de6ed
3 changed files with 5 additions and 3 deletions

View file

@ -15,7 +15,7 @@ class LineBuilder {
AK_MAKE_NONMOVABLE(LineBuilder);
public:
LineBuilder(InlineFormattingContext&, FormattingState&);
LineBuilder(InlineFormattingContext&, FormattingState&, LayoutMode);
~LineBuilder();
void break_line();
@ -44,6 +44,7 @@ private:
InlineFormattingContext& m_context;
FormattingState& m_formatting_state;
FormattingState::NodeState& m_containing_block_state;
LayoutMode m_layout_mode {};
float m_available_width_for_current_line { 0 };
float m_current_y { 0 };
float m_max_height_on_current_line { 0 };