From 9c03cdd883e4fafabddfa355cdaf675d56596b0c Mon Sep 17 00:00:00 2001 From: bptato Date: Thu, 16 Jan 2025 20:20:03 +0100 Subject: css: reduce StyledNode use Eventually the tree should be collapsed into the DOM, and StyledNode should be created on the stack. --- src/css/box.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/css/box.nim') diff --git a/src/css/box.nim b/src/css/box.nim index c161316a..37d9a2d3 100644 --- a/src/css/box.nim +++ b/src/css/box.nim @@ -1,6 +1,6 @@ import css/cssvalues import css/lunit -import css/stylednode +import html/dom import types/bitmap type @@ -58,13 +58,13 @@ type state*: InlineBoxState render*: BoxRenderState computed*: CSSValues - node*: StyledNode + node*: Element splitType*: set[SplitType] case t*: InlineBoxType of ibtParent: children*: seq[InlineBox] of ibtText: - text*: StyledNode # note: this has no parent. + text*: CharacterData # note: this has no parent. of ibtNewline: discard of ibtBitmap: @@ -112,7 +112,7 @@ type state*: BoxLayoutState # layout output -> render input render*: BoxRenderState # render output computed*: CSSValues - node*: StyledNode + node*: Element inline*: InlineBox children*: seq[BlockBox] -- cgit