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

LibWeb: Make sure we always apply size constraints in IFC

Pre-compute the effective containing block width in the IFC constructor
and use that throughout.
This commit is contained in:
Andreas Kling 2022-07-09 20:56:59 +02:00
parent 7713198e9c
commit e78282aebb
3 changed files with 29 additions and 22 deletions

View file

@ -30,11 +30,14 @@ public:
float leftmost_x_offset_at(float y) const;
float available_space_for_line(float y) const;
float effective_containing_block_width() const { return m_effective_containing_block_width; }
private:
void generate_line_boxes(LayoutMode);
void apply_justification_to_fragments(FormattingState::NodeState const& containing_block_state, CSS::TextJustify, LineBox&, bool is_last_line);
void apply_justification_to_fragments(CSS::TextJustify, LineBox&, bool is_last_line);
FormattingState::NodeState const& m_containing_block_state;
float m_effective_containing_block_width { 0 };
};
}