summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-12-29 18:19:22 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-12-29 19:06:20 +0000
commit30833a1ad59bc1f20a4995b23d2794be17227b51 (patch)
tree696fa80bc1fc9fcb5f20c9f283682e13bf91caf0 /src/select/propget.h
parent8bce7365823f887113c73af46ecdfee6322653f9 (diff)
downloadlibcss-30833a1ad59bc1f20a4995b23d2794be17227b51.tar.gz
libcss-30833a1ad59bc1f20a4995b23d2794be17227b51.tar.bz2
Add break-after property support.
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index d4ec329..756a7b3 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -144,6 +144,28 @@ static inline uint8_t get_border_spacing(
#undef BORDER_SPACING_SHIFT
#undef BORDER_SPACING_INDEX
+#define BREAK_AFTER_INDEX 12
+#define BREAK_AFTER_SHIFT 0
+#define BREAK_AFTER_MASK 0xf
+static inline uint8_t get_break_after(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_AFTER_INDEX];
+ bits &= BREAK_AFTER_MASK;
+ bits >>= BREAK_AFTER_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_AFTER_AUTO;
+}
+#undef BREAK_AFTER_MASK
+#undef BREAK_AFTER_SHIFT
+#undef BREAK_AFTER_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc