From 8f3c96035f22a16459ad7c8996c280a015f0d2f5 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 12 Feb 2025 21:15:38 +0100 Subject: layout: separate out tree construction logic For now, the skeleton remains in layout. Eventually it should be lazily constructed during the actual layout pass (thereby making layout "single-pass" (sometimes :p)) The end goal is to do it all in styledNode.children, so that caching can be as simple as "next box = find next matching cached box ?? make new". This does mean that the internal structure of cached boxes will always have to be reconstructed, but I don't see a better way. (I suppose it still remains possible to optimize out the unnecessary layout pass when only a repaint is needed (e.g. color change) by modifying computed values in-place.) --- src/server/buffer.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/server/buffer.nim') diff --git a/src/server/buffer.nim b/src/server/buffer.nim index f2e1d560..d20b73fe 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -13,6 +13,7 @@ import chame/tags import config/config import css/box import css/cascade +import css/csstree import css/layout import css/lunit import css/render -- cgit