diff options
Diffstat (limited to 'content/handlers/html')
-rw-r--r-- | content/handlers/html/layout_internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/handlers/html/layout_internal.h b/content/handlers/html/layout_internal.h index 974f49348..c6eb56d6e 100644 --- a/content/handlers/html/layout_internal.h +++ b/content/handlers/html/layout_internal.h @@ -184,6 +184,19 @@ static inline bool lh__flex_main_is_horizontal(const struct box *flex) } } +static inline bool lh__flex_direction_reversed(const struct box *flex) +{ + switch (css_computed_flex_direction(flex->style)) { + default: /* Fallthrough. */ + case CSS_FLEX_DIRECTION_ROW_REVERSE: /* Fallthrough. */ + case CSS_FLEX_DIRECTION_COLUMN_REVERSE: + return true; + case CSS_FLEX_DIRECTION_ROW: /* Fallthrough. */ + case CSS_FLEX_DIRECTION_COLUMN: + return false; + } +} + static inline int lh__non_auto_margin(const struct box *b, enum box_side side) { return (b->margin[side] == AUTO) ? 0 : b->margin[side]; |