summaryrefslogtreecommitdiff
path: root/content/handlers/html
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-12-14 22:19:21 +0000
committerMichael Drake <mdrake.unique@gmail.com>2022-12-14 22:53:35 +0000
commitfbc4f141f7957cf03ccd4e6de1ee44b869956611 (patch)
tree39b8710d7870cd5052970d893886cb80bc9e3b3f /content/handlers/html
parent25acf1a5dd778aa82a828a2138bf33af20fb81dc (diff)
downloadnetsurf-fbc4f141f7957cf03ccd4e6de1ee44b869956611.tar.gz
netsurf-fbc4f141f7957cf03ccd4e6de1ee44b869956611.tar.bz2
html: layout: Helpers to get cross/main box size
Diffstat (limited to 'content/handlers/html')
-rw-r--r--content/handlers/html/layout_internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/content/handlers/html/layout_internal.h b/content/handlers/html/layout_internal.h
index 736778933..d094462ec 100644
--- a/content/handlers/html/layout_internal.h
+++ b/content/handlers/html/layout_internal.h
@@ -258,6 +258,20 @@ static inline int *lh__box_size_cross_ptr(
return horizontal ? &b->height : &b->width;
}
+static inline int lh__box_size_main(
+ bool horizontal,
+ const struct box *b)
+{
+ return horizontal ? b->width : b->height;
+}
+
+static inline int lh__box_size_cross(
+ bool horizontal,
+ const struct box *b)
+{
+ return horizontal ? b->height : b->width;
+}
+
static inline bool lh__box_size_cross_is_auto(
bool horizontal,
struct box *b)