mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
LibWeb: Prevent infinite recursion on abspos w/ intrinsic max-size
We were incorrectly deciding that abspos elements shouldn't treat many max-width and max-height values as `none`. My best understanding is that this was a hack in 2023 for an issue that has been solved since then. By removing the incorrect short-circuit, we stop at least one WPT test from crashing due to infinite recursion and get ourselves +34 passes.
This commit is contained in:
parent
e5d62e9915
commit
f7a7cd9b2b
Notes:
github-actions[bot]
2025-04-24 16:28:19 +00:00
Author: https://github.com/awesomekling
Commit: f7a7cd9b2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4455
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 372 additions and 4 deletions
|
@ -1914,8 +1914,6 @@ bool FormattingContext::should_treat_max_width_as_none(Box const& box, Available
|
|||
return true;
|
||||
if (available_width.is_max_content() && max_width.is_max_content())
|
||||
return true;
|
||||
if (box.is_absolutely_positioned())
|
||||
return false;
|
||||
if (max_width.contains_percentage()) {
|
||||
if (available_width.is_max_content())
|
||||
return true;
|
||||
|
@ -1942,8 +1940,6 @@ bool FormattingContext::should_treat_max_height_as_none(Box const& box, Availabl
|
|||
auto const& max_height = box.computed_values().max_height();
|
||||
if (max_height.is_none())
|
||||
return true;
|
||||
if (box.is_absolutely_positioned())
|
||||
return false;
|
||||
if (max_height.contains_percentage()) {
|
||||
if (available_height.is_min_content())
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue