From 4f0524c199902b5e363b63c8df40e03ecc2e069b Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 20 Dec 2024 22:37:15 +0100 Subject: box: InlineFragment -> InlineBox It was named "fragment" mainly because I added it back when there was still a separate InlineBox type and I needed another name. Now InlineBox is gone, and I'm tired of typing fragment. --- src/css/box.nim | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/css/box.nim') diff --git a/src/css/box.nim b/src/css/box.nim index 856fd11c..731fac2a 100644 --- a/src/css/box.nim +++ b/src/css/box.nim @@ -48,30 +48,30 @@ type offset*: Offset size*: Size - InlineFragmentState* = object + InlineBoxState* = object startOffset*: Offset # offset of the first word, for position: absolute - areas*: seq[Area] # background that should be painted by fragment + areas*: seq[Area] # background that should be painted by box atoms*: seq[InlineAtom] - InlineFragmentType* = enum - iftParent, iftText, iftNewline, iftBitmap, iftBox + InlineBoxType* = enum + ibtParent, ibtText, ibtNewline, ibtBitmap, ibtBox - InlineFragment* = ref object - state*: InlineFragmentState + InlineBox* = ref object + state*: InlineBoxState render*: BoxRenderState computed*: CSSValues node*: StyledNode splitType*: set[SplitType] - case t*: InlineFragmentType - of iftParent: - children*: seq[InlineFragment] - of iftText: + case t*: InlineBoxType + of ibtParent: + children*: seq[InlineBox] + of ibtText: text*: StyledNode # note: this has no parent. - of iftNewline: + of ibtNewline: discard - of iftBitmap: + of ibtBitmap: bmp*: NetworkBitmap - of iftBox: + of ibtBox: box*: BlockBox Span* = object @@ -88,7 +88,7 @@ type render*: BoxRenderState computed*: CSSValues node*: StyledNode - inline*: InlineFragment + inline*: InlineBox children*: seq[BlockBox] func offset*(x, y: LayoutUnit): Offset = -- cgit 1.4.1-2-gfad0