about summary refs log tree commit diff stats
path: root/src/css/box.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-01-25 19:52:18 +0100
committerbptato <nincsnevem662@gmail.com>2025-01-25 23:36:31 +0100
commit9f67b297d5436d3a1f597eb561c09d7db2d0a01a (patch)
tree64b07e5d9ff38b9a6bd6438156a7b0c20fe46c98 /src/css/box.nim
parentf3157ce10a01e0bfa71803547b5dc8fe4d5425df (diff)
downloadchawan-9f67b297d5436d3a1f597eb561c09d7db2d0a01a.tar.gz
layout: do not generate anonymous inline boxes
Anonymous inline boxes were blocking progress on layout caching, so they
are now gone.  Instead, we handle them in layoutInline (which meanwhile
has spaghettified to beyond comprehension...  now it's a special case
of inner BlockBox (kind of?) - incredibly, it still passes tests :P)

This seems to match what major browsers do as well; some test cases were
updated to reflect the "improved" rendering this brings.

Next I'd like to remove anonymous table boxes by generating them in
cascade.  Then it should be straightforward enough to at least reuse
flow roots on relayout.

(And clean up flow layout...)
Diffstat (limited to 'src/css/box.nim')
-rw-r--r--src/css/box.nim4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/css/box.nim b/src/css/box.nim
index 37d9a2d3..6ec56c38 100644
--- a/src/css/box.nim
+++ b/src/css/box.nim
@@ -39,9 +39,6 @@ type
     # bottom margin result
     marginBottom*: LUnit
 
-  SplitType* = enum
-    stSplitStart, stSplitEnd
-
   Area* = object
     offset*: Offset
     size*: Size
@@ -59,7 +56,6 @@ type
     render*: BoxRenderState
     computed*: CSSValues
     node*: Element
-    splitType*: set[SplitType]
     case t*: InlineBoxType
     of ibtParent:
       children*: seq[InlineBox]