diff options
author | bptato <nincsnevem662@gmail.com> | 2022-07-17 13:03:50 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-07-17 13:03:50 +0200 |
commit | 7cdb8c1b679431b1be52c9fbb19b67445a0bb588 (patch) | |
tree | 6baedc5ddd3a68ffd9825f76cb853a9940292b6e /src/layout/engine.nim | |
parent | 2496c52449169f0caaba086ca3098b11708e5ba2 (diff) | |
download | chawan-7cdb8c1b679431b1be52c9fbb19b67445a0bb588.tar.gz |
Fix forms
Diffstat (limited to 'src/layout/engine.nim')
-rw-r--r-- | src/layout/engine.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 1596add2..a449f6a3 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -640,7 +640,7 @@ proc getListItemBox(computed: CSSComputedValues, listItemCounter: int): ListItem result.computed = computed.copyProperties() result.marker = getMarkerBox(computed, listItemCounter) -func getInputBox(parent: BoxBuilder, input: HTMLInputElement, viewport: Viewport): InlineBoxBuilder = +func getInputBox(parent: BoxBuilder, input: HTMLInputElement): InlineBoxBuilder = let textbox = parent.getTextBox() textbox.node = input textbox.text.add(input.inputString()) @@ -702,7 +702,6 @@ proc generateFromElem(box: BlockBoxBuilder, styledNode: StyledNode, blockgroup: proc generateInlineBoxes(box: BlockBoxBuilder, styledNode: StyledNode, blockgroup: var seq[BoxBuilder], viewport: Viewport) = var ibox: InlineBoxBuilder = nil - var listItemCounter = 1 # ordinal value of current list for child in styledNode.children: @@ -712,7 +711,7 @@ proc generateInlineBoxes(box: BlockBoxBuilder, styledNode: StyledNode, blockgrou of STYLED_TEXT: if ibox == nil: ibox = getTextBox(styledNode.computed) - ibox.node = child.node + ibox.node = styledNode.node ibox.text.add(child.text) flush_ibox @@ -722,7 +721,6 @@ proc generateBlockBox(styledNode: StyledNode, viewport: Viewport): BlockBoxBuild let box = getBlockBox(styledNode.computed) var blockgroup: seq[BoxBuilder] var ibox: InlineBoxBuilder = nil - var listItemCounter = 1 # ordinal value of current list for child in styledNode.children: @@ -734,7 +732,7 @@ proc generateBlockBox(styledNode: StyledNode, viewport: Viewport): BlockBoxBuild if canGenerateAnonymousInline(blockgroup, box.computed, child.text): if ibox == nil: ibox = getTextBox(styledNode.computed) - ibox.node = child.node + ibox.node = styledNode.node ibox.text.add(child.text) flush_ibox |