1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16: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,15 +1,15 @@
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 784x113.15625 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 782x113.15625 [BFC] children: not-inline
Box <table.ambox> at (9,9) content-size 780x111.15625 table-box [TFC] children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 784x113.15625 [BFC] children: not-inline
Box <table.ambox> at (9,9) content-size 784x111.15625 table-box [TFC] children: not-inline
BlockContainer <(anonymous)> (not painted) children: inline
TextNode <#text>
Box <tbody> at (9,9) content-size 774x107.15625 table-row-group children: not-inline
Box <tr> at (11,11) content-size 774x107.15625 table-row children: not-inline
Box <tbody> at (9,9) content-size 778x107.15625 table-row-group children: not-inline
Box <tr> at (11,11) content-size 778x107.15625 table-row children: not-inline
BlockContainer <td.mbox-image> at (12,39.578125) content-size 50x50 table-cell [BFC] children: not-inline
BlockContainer <div.mbox-image-div> at (12,39.578125) content-size 50x50 children: not-inline
BlockContainer <td.mbox-text> at (66,12) content-size 720x105.15625 table-cell [BFC] children: inline
BlockContainer <td.mbox-text> at (66,12) content-size 724x105.15625 table-cell [BFC] children: inline
line 0 width: 689.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 1, length: 84, rect: [66,12 689.640625x17.46875]
"In a scene set in a lawyer's office, the lawyer sits alone and bounces a rubber ball"