1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:27:35 +00:00

LibWeb: Don't subtract border from used table width

The used width is already a content width, which doesn't include
borders. Border widths should be subtracted from the specified width
instead, since that initially specifies the total width including
borders, for consistent comparison. Also handle table box padding as an
additional fix.
This commit is contained in:
Andi Gallo 2023-06-25 01:23:36 +00:00 committed by Andreas Kling
parent 1f95a40780
commit 2c4908094c
18 changed files with 133 additions and 86 deletions

View file

@ -1,36 +1,36 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x44.9375 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 206x44.9375 [BFC] children: not-inline
Box <table> at (9,9) content-size 204x42.9375 table-box [TFC] children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 208x44.9375 [BFC] children: not-inline
Box <table> at (9,9) content-size 208x42.9375 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
Box <tbody> at (9,9) content-size 204x42.9375 table-row-group children: not-inline
Box <tr> at (9,9) content-size 204x21.46875 table-row children: not-inline
Box <tbody> at (9,9) content-size 208x42.9375 table-row-group children: not-inline
Box <tr> at (9,9) content-size 208x21.46875 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,11) content-size 176.241651x17.46875 table-cell [BFC] children: inline
BlockContainer <td> at (11,11) content-size 180x17.46875 table-cell [BFC] children: inline
line 0 width: 14.265625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [92,11 14.265625x17.46875]
frag 0 from TextNode start: 0, length: 1, rect: [94,11 14.265625x17.46875]
"A"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (191.241651,11) content-size 19.758348x17.46875 table-cell [BFC] children: inline
BlockContainer <td> at (195,11) content-size 20x17.46875 table-cell [BFC] children: inline
line 0 width: 9.34375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [196.241651,11 9.34375x17.46875]
frag 0 from TextNode start: 0, length: 1, rect: [200,11 9.34375x17.46875]
"B"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
Box <tr> at (9,30.46875) content-size 204x21.46875 table-row children: not-inline
Box <tr> at (9,30.46875) content-size 208x21.46875 table-row children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
BlockContainer <td> at (11,32.46875) content-size 200x17.46875 table-cell [BFC] children: inline
BlockContainer <td> at (11,32.46875) content-size 204x17.46875 table-cell [BFC] children: inline
line 0 width: 10.3125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 1, rect: [106,32.46875 10.3125x17.46875]
frag 0 from TextNode start: 0, length: 1, rect: [108,32.46875 10.3125x17.46875]
"C"
TextNode <#text>
BlockContainer <(anonymous)> (not painted) children: inline