summaryrefslogtreecommitdiff
path: root/content/handlers/html/box.h
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2020-01-08 15:51:18 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2020-01-08 15:51:18 +0000
commiteba213195070847cd7352f039956cf832a40e9e0 (patch)
tree3035a223ac3e55a7441e2215bfff0bf606b563e2 /content/handlers/html/box.h
parent6f31a5cb88ddcb222867dd1f825848600e49c611 (diff)
downloadnetsurf-tlsa/flex.tar.gz
netsurf-tlsa/flex.tar.bz2
WIP: flextlsa/flex
Diffstat (limited to 'content/handlers/html/box.h')
-rw-r--r--content/handlers/html/box.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/content/handlers/html/box.h b/content/handlers/html/box.h
index 8ab2875a0..fbe7cb0f1 100644
--- a/content/handlers/html/box.h
+++ b/content/handlers/html/box.h
@@ -118,7 +118,8 @@ typedef enum {
BOX_TABLE_ROW_GROUP,
BOX_FLOAT_LEFT, BOX_FLOAT_RIGHT,
BOX_INLINE_BLOCK, BOX_BR, BOX_TEXT,
- BOX_INLINE_END, BOX_NONE
+ BOX_INLINE_END, BOX_NONE,
+ BOX_FLEX, BOX_INLINE_FLEX,
} box_type;
@@ -389,6 +390,19 @@ static inline bool box_is_first_child(struct box *b)
return (b->parent == NULL || b == b->parent->children);
}
+static inline unsigned box_count_children(const struct box *b)
+{
+ const struct box *c = b->children;
+ unsigned count = 0;
+
+ while (c != NULL) {
+ count++;
+ c = c->next;
+ }
+
+ return count;
+}
+
/**
* Retrieve the box for a dom node, if there is one
*