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

LibWeb: Add special handling for text-align when applied to tables

This matches what other engines do, and stops table content from being
misaligned.
This commit is contained in:
implicitfield 2023-11-19 13:51:37 +04:00 committed by Andreas Kling
parent a54e62bea0
commit ccea69ad40
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,26 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x220 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x204 children: not-inline
BlockContainer <div> at (8,8) content-size 784x204 children: not-inline
TableWrapper <(anonymous)> at (300,8) content-size 200x204 [BFC] children: not-inline
Box <table> at (301,9) content-size 198x202 table-box [TFC] children: not-inline
Box <tbody> at (301,9) content-size 194x198 table-row-group children: not-inline
Box <tr> at (303,11) content-size 194x198 table-row children: not-inline
BlockContainer <td> at (304,85.265625) content-size 192x49.46875 table-cell [BFC] children: not-inline
BlockContainer <p> at (304,101.265625) content-size 192x17.46875 children: inline
line 0 width: 26.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [304,101.265625 26.25x17.46875]
"left"
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x220]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x204]
PaintableWithLines (BlockContainer<DIV>) [8,8 784x204]
PaintableWithLines (TableWrapper(anonymous)) [300,8 200x204]
PaintableBox (Box<TABLE>) [300,8 200x204]
PaintableBox (Box<TBODY>) [301,9 194x198] overflow: [301,9 196x200]
PaintableBox (Box<TR>) [303,11 194x198]
PaintableWithLines (BlockContainer<TD>) [303,11 194x198]
PaintableWithLines (BlockContainer<P>) [304,101.265625 192x17.46875]
TextPaintable (TextNode<#text>)

View file

@ -0,0 +1,7 @@
<!doctype html><style>
table {
height: 200px;
width: 200px;
border: 1px solid black;
}
</style><div align="center"><table><tbody><tr><td><p>left