mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +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
|
@ -30,7 +30,7 @@ public:
|
|||
bool is_empty_or_ends_in_whitespace() const;
|
||||
bool is_empty() const { return m_fragments.is_empty() && !m_has_break; }
|
||||
|
||||
CSSPixels original_available_width() const { return m_original_available_width; }
|
||||
AvailableSize original_available_width() const { return m_original_available_width; }
|
||||
|
||||
CSSPixelRect const& absolute_rect() const { return m_absolute_rect; }
|
||||
void set_absolute_rect(CSSPixelRect const& rect) { m_absolute_rect = rect; }
|
||||
|
@ -49,7 +49,7 @@ private:
|
|||
CSSPixels m_baseline { 0 };
|
||||
|
||||
// The amount of available width that was originally available when creating this line box. Used for text justification.
|
||||
CSSPixels m_original_available_width { 0 };
|
||||
AvailableSize m_original_available_width { AvailableSize::make_indefinite() };
|
||||
|
||||
bool m_has_break { false };
|
||||
bool m_has_forced_break { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue