mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
LibWeb: Replace to_px() with to_px_or_zero() in InlineFormattingContext
to_px() usage should be avoided because it might leak saturated (infinite) values into layout calculations.
This commit is contained in:
parent
4646867a9f
commit
fce4801460
7 changed files with 29 additions and 21 deletions
|
@ -37,7 +37,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
CSSPixels available_width_for_current_line() const { return m_available_width_for_current_line; }
|
||||
AvailableSize available_width_for_current_line() const { return m_available_width_for_current_line; }
|
||||
|
||||
void update_last_line();
|
||||
|
||||
|
@ -61,7 +61,7 @@ private:
|
|||
InlineFormattingContext& m_context;
|
||||
LayoutState& m_layout_state;
|
||||
LayoutState::UsedValues& m_containing_block_state;
|
||||
CSSPixels m_available_width_for_current_line { 0 };
|
||||
AvailableSize m_available_width_for_current_line { AvailableSize::make_indefinite() };
|
||||
CSSPixels m_current_y { 0 };
|
||||
CSSPixels m_max_height_on_current_line { 0 };
|
||||
CSSPixels m_text_indent { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue