summaryrefslogtreecommitdiff
path: root/content/handlers/html/box.h
diff options
context:
space:
mode:
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
*