summaryrefslogtreecommitdiff
path: root/src/select/propset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/propset.h')
-rw-r--r--src/select/propset.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/select/propset.h b/src/select/propset.h
index c202ce7..d5db8e0 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -220,6 +220,28 @@ static inline css_error set_break_after(
#undef BREAK_AFTER_SHIFT
#undef BREAK_AFTER_INDEX
+#define BREAK_BEFORE_INDEX 12
+#define BREAK_BEFORE_SHIFT 4
+#define BREAK_BEFORE_MASK (0xf << 4)
+static inline css_error set_break_before(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_BEFORE_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_BEFORE_MASK) |
+ ((type & 0xf) << BREAK_BEFORE_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_BEFORE_MASK
+#undef BREAK_BEFORE_SHIFT
+#undef BREAK_BEFORE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc