summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-06-01 18:32:37 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-06-01 18:32:37 +0100
commitc6d7f24987a90bc61e408c4249a6a212276b4174 (patch)
tree75a3f5478618e0e583db6f168193e7645c012dda /src/select/propget.h
parent89a4d061a46490d5fad3792a565a1a0114c400e0 (diff)
downloadlibcss-c6d7f24987a90bc61e408c4249a6a212276b4174.tar.gz
libcss-c6d7f24987a90bc61e408c4249a6a212276b4174.tar.bz2
Add support for CSS3 overflow-x and overflow-y properties.
Now, overflow is a shorthand property setting both overflow-x and overflow-y. The getter for the computed overflow has been removed, and replaced with two for overflow-x and overflow-y.
Diffstat (limited to 'src/select/propget.h')
-rw-r--r--src/select/propget.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/select/propget.h b/src/select/propget.h
index 7fff136..b124cfe 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -1338,22 +1338,39 @@ static inline uint8_t get_padding_left(
#undef PADDING_LEFT_SHIFT
#undef PADDING_LEFT_INDEX
-#define OVERFLOW_INDEX 21
-#define OVERFLOW_SHIFT 0
-#define OVERFLOW_MASK 0x7
-static inline uint8_t get_overflow(
+#define OVERFLOW_X_INDEX 21
+#define OVERFLOW_X_SHIFT 0
+#define OVERFLOW_X_MASK 0x7
+static inline uint8_t get_overflow_x(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OVERFLOW_INDEX];
- bits &= OVERFLOW_MASK;
- bits >>= OVERFLOW_SHIFT;
+ uint8_t bits = style->bits[OVERFLOW_X_INDEX];
+ bits &= OVERFLOW_X_MASK;
+ bits >>= OVERFLOW_X_SHIFT;
/* 3bits: type */
return bits;
}
-#undef OVERFLOW_MASK
-#undef OVERFLOW_SHIFT
-#undef OVERFLOW_INDEX
+#undef OVERFLOW_X_MASK
+#undef OVERFLOW_X_SHIFT
+#undef OVERFLOW_X_INDEX
+
+#define OVERFLOW_Y_INDEX 34
+#define OVERFLOW_Y_SHIFT 5
+#define OVERFLOW_Y_MASK 0xe0
+static inline uint8_t get_overflow_y(
+ const css_computed_style *style)
+{
+ uint8_t bits = style->bits[OVERFLOW_Y_INDEX];
+ bits &= OVERFLOW_Y_MASK;
+ bits >>= OVERFLOW_Y_SHIFT;
+
+ /* 3bits: type */
+ return bits;
+}
+#undef OVERFLOW_Y_MASK
+#undef OVERFLOW_Y_SHIFT
+#undef OVERFLOW_Y_INDEX
#define POSITION_INDEX 22
#define POSITION_SHIFT 0