summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index b2cf16b..7fff136 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -603,6 +603,16 @@ static inline uint8_t get_top(
return (bits & 0x3);
}
+static inline uint8_t get_top_bits(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[TOP_INDEX];
+ bits &= TOP_MASK;
+ bits >>= TOP_SHIFT;
+
+ /* 6bits: uuuutt : units | type */
+ return bits;
+}
#undef TOP_MASK
#undef TOP_SHIFT
#undef TOP_INDEX
@@ -626,6 +636,16 @@ static inline uint8_t get_right(
return (bits & 0x3);
}
+static inline uint8_t get_right_bits(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[RIGHT_INDEX];
+ bits &= RIGHT_MASK;
+ bits >>= RIGHT_SHIFT;
+
+ /* 6bits: uuuutt : units | type */
+ return bits;
+}
#undef RIGHT_MASK
#undef RIGHT_SHIFT
#undef RIGHT_INDEX
@@ -649,6 +669,16 @@ static inline uint8_t get_bottom(
return (bits & 0x3);
}
+static inline uint8_t get_bottom_bits(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[BOTTOM_INDEX];
+ bits &= BOTTOM_MASK;
+ bits >>= BOTTOM_SHIFT;
+
+ /* 6bits: uuuutt : units | type */
+ return bits;
+}
#undef BOTTOM_MASK
#undef BOTTOM_SHIFT
#undef BOTTOM_INDEX
@@ -672,6 +702,16 @@ static inline uint8_t get_left(
return (bits & 0x3);
}
+static inline uint8_t get_left_bits(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[LEFT_INDEX];
+ bits &= LEFT_MASK;
+ bits >>= LEFT_SHIFT;
+
+ /* 6bits: uuuutt : units | type */
+ return bits;
+}
#undef LEFT_MASK
#undef LEFT_SHIFT
#undef LEFT_INDEX