mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +00:00
LibWeb: Treat percentage width/height as "auto" more consistently in BFC
Since we can't resolve percentage sizes against an indefinitely-sized containing block, treat the sizes as "auto" in all these cases.
This commit is contained in:
parent
71ca857b67
commit
54e0e85581
2 changed files with 45 additions and 14 deletions
|
@ -49,6 +49,19 @@ public:
|
|||
|
||||
void layout_block_level_box(Box const&, BlockContainer const&, LayoutMode, float& bottom_of_lowest_margin_box);
|
||||
|
||||
static bool should_treat_width_as_auto(Box const&, LayoutState const&);
|
||||
static bool should_treat_height_as_auto(Box const&, LayoutState const&);
|
||||
|
||||
bool should_treat_width_as_auto(Box const& box) const
|
||||
{
|
||||
return should_treat_width_as_auto(box, m_state);
|
||||
}
|
||||
|
||||
bool should_treat_height_as_auto(Box const& box) const
|
||||
{
|
||||
return should_treat_height_as_auto(box, m_state);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool is_block_formatting_context() const final { return true; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue