diff options
author | bptato <nincsnevem662@gmail.com> | 2025-02-14 17:58:37 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-02-14 17:58:37 +0100 |
commit | 1ee2f67e1d7b2f8d164047a1250033de6aa7f3fb (patch) | |
tree | bb1fcba5a54e3393e4114e598d6388abf0b54af3 /src/css/layout.nim | |
parent | dd1a49d2beab7445e903ab0acc29414d690f1977 (diff) | |
download | chawan-1ee2f67e1d7b2f8d164047a1250033de6aa7f3fb.tar.gz |
csstree, cssvalues: add non-numeric counters, japanese-formal
plus refactor a bit
Diffstat (limited to 'src/css/layout.nim')
-rw-r--r-- | src/css/layout.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/css/layout.nim b/src/css/layout.nim index ba74b2bd..fb82aab7 100644 --- a/src/css/layout.nim +++ b/src/css/layout.nim @@ -628,7 +628,7 @@ proc alignLine(fstate: var FlowState) = elif iastate.ibox of InlineBlockBox: let ibox = InlineBlockBox(iastate.ibox) # Add the offset to avoid destroying margins (etc.) of the block. - ibox.box.state.offset += iastate.offset + BlockBox(ibox.children[0]).state.offset += iastate.offset elif iastate.ibox of InlineImageBox: let ibox = InlineImageBox(iastate.ibox) ibox.imgstate.offset = iastate.offset @@ -777,7 +777,7 @@ proc finishLine(fstate: var FlowState; istate: var InlineState; wrap: bool; # b) `box' has resolved its y offset, so the float can already # be positioned. # We check whether our y offset has been positioned as follows: - # * save marginTarget in FlowState at layoutBlock's start + # * save marginTarget in FlowState at layoutFlow's start # * if our saved marginTarget and bctx's marginTarget no longer # point to the same object, that means our (or an ancestor's) # offset has been resolved, i.e. we can position floats already. @@ -1703,7 +1703,7 @@ proc layoutOuterBlock(fstate: var FlowState; child: BlockBox; )) proc layoutInlineBlock(fstate: var FlowState; ibox: InlineBlockBox) = - let box = ibox.box + let box = BlockBox(ibox.children[0]) if box.computed{"position"} in PositionAbsoluteFixed: # Absolute is a bit of a special case in inline: while the spec # *says* it should blockify, absolutely positioned inline-blocks are |