diff --git a/Libraries/LibWeb/Layout/Node.cpp b/Libraries/LibWeb/Layout/Node.cpp index d513d84db76..2fb0063f79d 100644 --- a/Libraries/LibWeb/Layout/Node.cpp +++ b/Libraries/LibWeb/Layout/Node.cpp @@ -118,8 +118,6 @@ Box const* Node::containing_block() const auto const* ancestor = parent(); while (ancestor && !ancestor->can_contain_boxes_with_position_absolute()) ancestor = ancestor->parent(); - while (ancestor && ancestor->is_anonymous()) - ancestor = nearest_ancestor_capable_of_forming_a_containing_block(*ancestor); return static_cast(ancestor); } diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-tables/absolute-tables-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-tables/absolute-tables-006.html new file mode 100644 index 00000000000..3b89d4fc1c3 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-tables/absolute-tables-006.html @@ -0,0 +1,35 @@ + + + + + + + + +

Test passes if there is a filled green square.

+ + +
+ diff --git a/Tests/LibWeb/Text/expected/abspos-child-inside-abspos-table.txt b/Tests/LibWeb/Text/expected/abspos-child-inside-abspos-table.txt new file mode 100644 index 00000000000..ce5a342f77b --- /dev/null +++ b/Tests/LibWeb/Text/expected/abspos-child-inside-abspos-table.txt @@ -0,0 +1 @@ +PASS (did not crash) diff --git a/Tests/LibWeb/Text/input/abspos-child-inside-abspos-table.html b/Tests/LibWeb/Text/input/abspos-child-inside-abspos-table.html new file mode 100644 index 00000000000..66ef73006b1 --- /dev/null +++ b/Tests/LibWeb/Text/input/abspos-child-inside-abspos-table.html @@ -0,0 +1,12 @@ + + +
+