diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-10 15:59:06 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-10 15:59:06 +0000 |
commit | 4600e9ac013226a63e0dd68a47cde9b75cd3c452 (patch) | |
tree | 698a6850aefa9b831b2951cc6f00d6e65821e69b /src/select/propget.h | |
parent | 7a74cd0bca6c300b9cc3cd2880c8b8822307b293 (diff) | |
download | libcss-4600e9ac013226a63e0dd68a47cde9b75cd3c452.tar.gz libcss-4600e9ac013226a63e0dd68a47cde9b75cd3c452.tar.bz2 |
Remove 9.7 handling from get_display. Delete get_display_static. Remove duplication in css_computed_display.
Diffstat (limited to 'src/select/propget.h')
-rw-r--r-- | src/select/propget.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/select/propget.h b/src/select/propget.h index 0f32e8c..b2cf16b 100644 --- a/src/select/propget.h +++ b/src/select/propget.h @@ -1453,46 +1453,6 @@ static inline uint8_t get_background_position( #define DISPLAY_SHIFT 2 #define DISPLAY_MASK 0x7c static inline uint8_t get_display( - const css_computed_style *style, bool root) -{ - uint8_t position; - uint8_t bits = style->bits[DISPLAY_INDEX]; - bits &= DISPLAY_MASK; - bits >>= DISPLAY_SHIFT; - - /* Return computed display as per $9.7 */ - position = css_computed_position(style); - - /* 5bits: type */ - if (bits == CSS_DISPLAY_NONE) - return bits; /* 1. */ - - if ((position == CSS_POSITION_ABSOLUTE || - position == CSS_POSITION_FIXED) /* 2. */ || - css_computed_float(style) != CSS_FLOAT_NONE /* 3. */ || - root /* 4. */) { - if (bits == CSS_DISPLAY_INLINE_TABLE) { - return CSS_DISPLAY_TABLE; - } else if (bits == CSS_DISPLAY_INLINE || - bits == CSS_DISPLAY_RUN_IN || - bits == CSS_DISPLAY_TABLE_ROW_GROUP || - bits == CSS_DISPLAY_TABLE_COLUMN || - bits == CSS_DISPLAY_TABLE_COLUMN_GROUP || - bits == CSS_DISPLAY_TABLE_HEADER_GROUP || - bits == CSS_DISPLAY_TABLE_FOOTER_GROUP || - bits == CSS_DISPLAY_TABLE_ROW || - bits == CSS_DISPLAY_TABLE_CELL || - bits == CSS_DISPLAY_TABLE_CAPTION || - bits == CSS_DISPLAY_INLINE_BLOCK) { - return CSS_DISPLAY_BLOCK; - } - } - - /* 5. */ - return bits; -} - -static inline uint8_t get_display_static( const css_computed_style *style) { uint8_t bits = style->bits[DISPLAY_INDEX]; |