mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Apply 'min-width' and 'max-width' constraints to replaced boxes
This is definitely not 100% correct but I tried implementing the basic algorithms described in CSS 2.2. It's good enough to render the penguin on @linusg's homepage at the right size. :^)
This commit is contained in:
parent
63067ada68
commit
b60801a9ba
3 changed files with 120 additions and 37 deletions
|
@ -58,6 +58,9 @@ protected:
|
|||
float preferred_minimum_width { 0 };
|
||||
};
|
||||
|
||||
static float tentative_width_for_replaced_element(const ReplacedBox&, const CSS::Length& width);
|
||||
static float tentative_height_for_replaced_element(const ReplacedBox&, const CSS::Length& width);
|
||||
|
||||
ShrinkToFitResult calculate_shrink_to_fit_widths(Box&);
|
||||
|
||||
FormattingContext* m_parent { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue