about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-15 21:13:03 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-15 21:16:12 +0100
commite5afb660476c97c97259a72cf4d6f3bbfdbff9fe (patch)
tree107829f7474b726e48d1255d581f5a023d84773f /src
parent1718e2a7c1852a1bc3722d1a42a18b7a6ab2d879 (diff)
downloadchawan-e5afb660476c97c97259a72cf4d6f3bbfdbff9fe.tar.gz
layout: also propagate xminwidth from table caption
this is necessary too, now that I think of it

(well, table caption sizing is still half-broken, but that's a problem
for another day...)
Diffstat (limited to 'src')
-rw-r--r--src/css/layout.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/css/layout.nim b/src/css/layout.nim
index 1539e5c1..a833126c 100644
--- a/src/css/layout.nim
+++ b/src/css/layout.nim
@@ -2179,6 +2179,7 @@ proc layoutCaption(tctx: TableContext; parent, box: BlockBox) =
     box.state.offset.y += table.state.size.h
   parent.state.size.h += outerHeight
   parent.state.size.w = max(parent.state.size.w, outerWidth)
+  parent.state.xminwidth = max(parent.state.xminwidth, box.state.xminwidth)
 
 # Table layout. We try to emulate w3m's behavior here:
 # 1. Calculate minimum and preferred width of each column