diff --git a/Libraries/LibWeb/Layout/FormattingContext.cpp b/Libraries/LibWeb/Layout/FormattingContext.cpp index b7d3882890e..db4f4e7f684 100644 --- a/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -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; diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/keyword-sizes-on-abspos.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/keyword-sizes-on-abspos.txt new file mode 100644 index 00000000000..d90c2bf9bee --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/keyword-sizes-on-abspos.txt @@ -0,0 +1,66 @@ +Harness status: OK + +Found 60 tests + +34 Pass +26 Fail +Pass .test 1 +Pass .test 2 +Fail .test 3 +Pass .test 4 +Pass .test 5 +Pass .test 6 +Pass .test 7 +Fail .test 8 +Pass .test 9 +Fail .test 10 +Pass .test 11 +Pass .test 12 +Fail .test 13 +Pass .test 14 +Fail .test 15 +Pass .test 16 +Pass .test 17 +Pass .test 18 +Pass .test 19 +Pass .test 20 +Pass .test 21 +Pass .test 22 +Pass .test 23 +Pass .test 24 +Fail .test 25 +Pass .test 26 +Pass .test 27 +Pass .test 28 +Pass .test 29 +Fail .test 30 +Pass .test 31 +Fail .test 32 +Fail .test 33 +Fail .test 34 +Pass .test 35 +Pass .test 36 +Fail .test 37 +Fail .test 38 +Fail .test 39 +Fail .test 40 +Pass .test 41 +Fail .test 42 +Fail .test 43 +Fail .test 44 +Fail .test 45 +Pass .test 46 +Pass .test 47 +Pass .test 48 +Pass .test 49 +Pass .test 50 +Pass .test 51 +Fail .test 52 +Fail .test 53 +Fail .test 54 +Fail .test 55 +Pass .test 56 +Fail .test 57 +Fail .test 58 +Fail .test 59 +Fail .test 60 \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-sizing/keyword-sizes-on-abspos.html b/Tests/LibWeb/Text/input/wpt-import/css/css-sizing/keyword-sizes-on-abspos.html new file mode 100644 index 00000000000..4cfe345fdf7 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-sizing/keyword-sizes-on-abspos.html @@ -0,0 +1,306 @@ + +Keyword sizes on absolutely positioned box + + + + + + + + + +
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+
+
XX XX
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ + + + +