about summary refs log tree commit diff stats
path: root/src/css/stylednode.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-12 01:24:18 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-12 01:24:33 +0200
commit0db193e65412804f30bf40d586d000c7599b8d24 (patch)
treee2e4e55b4708e03af935bae70003c306efc925cc /src/css/stylednode.nim
parent37c144fea89bf02a449666128ac2ca8f85f2a985 (diff)
downloadchawan-0db193e65412804f30bf40d586d000c7599b8d24.tar.gz
css: clean up a bit
Diffstat (limited to 'src/css/stylednode.nim')
-rw-r--r--src/css/stylednode.nim31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/css/stylednode.nim b/src/css/stylednode.nim
index 1b3a645b..127ce41c 100644
--- a/src/css/stylednode.nim
+++ b/src/css/stylednode.nim
@@ -125,16 +125,6 @@ proc addDependency*(styledNode: StyledNode; dep: Element; t: DependencyType) =
   if dep notin styledNode.depends[t]:
     styledNode.depends[t].add(dep)
 
-func newStyledElement*(parent: StyledNode; element: Element;
-    computed: CSSComputedValues; reg: DependencyInfo): StyledNode =
-  return StyledNode(
-    t: stElement,
-    computed: computed,
-    node: element,
-    parent: parent,
-    depends: reg
-  )
-
 func newStyledElement*(parent: StyledNode; element: Element): StyledNode =
   return StyledNode(t: stElement, node: element, parent: parent)
 
@@ -143,16 +133,6 @@ func newStyledElement*(element: Element): StyledNode =
   return StyledNode(t: stElement, node: element)
 
 func newStyledElement*(parent: StyledNode; pseudo: PseudoElem;
-    computed: CSSComputedValues; reg: DependencyInfo): StyledNode =
-  return StyledNode(
-    t: stElement,
-    computed: computed,
-    pseudo: pseudo,
-    parent: parent,
-    depends: reg
-  )
-
-func newStyledElement*(parent: StyledNode; pseudo: PseudoElem;
     computed: CSSComputedValues): StyledNode =
   return StyledNode(
     t: stElement,
@@ -167,6 +147,11 @@ func newStyledText*(parent: StyledNode; text: Text): StyledNode =
 func newStyledText*(text: string): StyledNode =
   return StyledNode(t: stText, node: CharacterData(data: text))
 
-func newStyledReplacement*(parent: StyledNode; content: CSSContent):
-    StyledNode =
-  return StyledNode(t: stReplacement, parent: parent, content: content)
+func newStyledReplacement*(parent: StyledNode; content: CSSContent;
+    pseudo: PseudoElem): StyledNode =
+  return StyledNode(
+    t: stReplacement,
+    parent: parent,
+    content: content,
+    pseudo: pseudo
+  )