layout: Properly size absolutely positioned tables (#32447)

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-06-07 18:21:08 +02:00 committed by GitHub
parent 764021751d
commit 674edb4df0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 60 deletions

View file

@ -630,7 +630,19 @@ impl HoistedAbsolutelyPositionedBox {
&containing_block_for_children,
&containing_block.into(),
);
let block_size = size.auto_is(|| independent_layout.content_block_size);
let (block_size, inline_size) =
match independent_layout.content_inline_size_for_table {
Some(inline_size) => (
independent_layout.content_block_size.into(),
inline_size.into(),
),
None => (
size.auto_is(|| independent_layout.content_block_size),
inline_size,
),
};
Result {
content_size: LogicalVec2 {
inline: inline_size,

View file

@ -2,23 +2,11 @@
[.item 1]
expected: FAIL
[.item 2]
expected: FAIL
[.item 3]
expected: FAIL
[.item 4]
expected: FAIL
[.item 5]
expected: FAIL
[.item 6]
expected: FAIL
[.item 7]
expected: FAIL
[.item 8]
expected: FAIL

View file

@ -2,23 +2,11 @@
[.item 1]
expected: FAIL
[.item 2]
expected: FAIL
[.item 3]
expected: FAIL
[.item 4]
expected: FAIL
[.item 5]
expected: FAIL
[.item 6]
expected: FAIL
[.item 7]
expected: FAIL
[.item 8]
expected: FAIL

View file

@ -1,9 +0,0 @@
[position-absolute-table-001.html]
[table size is interpreted as minimum width]
expected: FAIL
[table size border-box interpreted as minimum width]
expected: FAIL
[table size content-box interpreted as minimum width]
expected: FAIL

View file

@ -1,12 +0,0 @@
[absolute-tables-002.html]
[.table 1]
expected: FAIL
[.table 2]
expected: FAIL
[.table 3]
expected: FAIL
[.table 4]
expected: FAIL

View file

@ -1,12 +0,0 @@
[absolute-tables-004.html]
[.table 1]
expected: FAIL
[.table 2]
expected: FAIL
[.table 3]
expected: FAIL
[.table 4]
expected: FAIL

View file

@ -1,6 +1,6 @@
[absolute-tables-005.html]
[.table 1]
[.table 3]
expected: FAIL
[.table 2]
[.table 4]
expected: FAIL