diff options
author | bptato <nincsnevem662@gmail.com> | 2024-09-30 21:10:00 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-09-30 21:10:00 +0200 |
commit | 2fc7517d700e6d772d98b47f179e4bb44638919e (patch) | |
tree | 6b8a8bef5e95bc6d5268f7dfc4129ed608eccc01 /src/css | |
parent | 5ce10f0610cf42e4a579c27e9b17a5f74963b1af (diff) | |
download | chawan-2fc7517d700e6d772d98b47f179e4bb44638919e.tar.gz |
dom: optimize element size, remove importc hack & dead code
This switches CAtom to uint32; it seems better to use the same size on all platforms.
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/stylednode.nim | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/css/stylednode.nim b/src/css/stylednode.nim index 127ce41c..cf9a8a59 100644 --- a/src/css/stylednode.nim +++ b/src/css/stylednode.nim @@ -58,19 +58,19 @@ type template textData*(styledNode: StyledNode): string = CharacterData(styledNode.node).data -# For debugging -func `$`*(node: StyledNode): string = - if node == nil: - return "nil" - case node.t - of stText: - return "#text " & node.textData - of stElement: - if node.node != nil: - return $node.node - return $node.pseudo - of stReplacement: - return "#replacement" +when defined(debug): + func `$`*(node: StyledNode): string = + if node == nil: + return "nil" + case node.t + of stText: + return "#text " & node.textData + of stElement: + if node.node != nil: + return $node.node + return $node.pseudo + of stReplacement: + return "#replacement" iterator branch*(node: StyledNode): StyledNode {.inline.} = var node = node |