diff options
Diffstat (limited to 'src/select/propget.h')
-rw-r--r-- | src/select/propget.h | 312 |
1 files changed, 252 insertions, 60 deletions
diff --git a/src/select/propget.h b/src/select/propget.h index b124cfe..08ed0f4 100644 --- a/src/select/propget.h +++ b/src/select/propget.h @@ -18,7 +18,7 @@ #define LETTER_SPACING_SHIFT 2 #define LETTER_SPACING_MASK 0xfc static inline uint8_t get_letter_spacing( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { if (style->uncommon != NULL) { @@ -72,7 +72,7 @@ static inline uint8_t get_outline_color( #define OUTLINE_WIDTH_SHIFT 1 #define OUTLINE_WIDTH_MASK 0xfe static inline uint8_t get_outline_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { if (style->uncommon != NULL) { @@ -106,7 +106,7 @@ static inline uint8_t get_outline_width( #define BORDER_SPACING_SHIFT1 0 #define BORDER_SPACING_MASK1 0xff static inline uint8_t get_border_spacing( - const css_computed_style *style, + const css_computed_style *style, css_fixed *hlength, css_unit *hunit, css_fixed *vlength, css_unit *vunit) { @@ -117,7 +117,7 @@ static inline uint8_t get_border_spacing( /* 1 bit: type */ if (bits == CSS_BORDER_SPACING_SET) { - uint8_t bits1 = + uint8_t bits1 = style->uncommon->bits[BORDER_SPACING_INDEX1]; bits1 &= BORDER_SPACING_MASK1; bits1 >>= BORDER_SPACING_SHIFT1; @@ -150,7 +150,7 @@ static inline uint8_t get_border_spacing( #define WORD_SPACING_SHIFT 2 #define WORD_SPACING_MASK 0xfc static inline uint8_t get_word_spacing( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { if (style->uncommon != NULL) { @@ -199,7 +199,7 @@ static inline uint8_t get_writing_mode( #define COUNTER_INCREMENT_SHIFT 1 #define COUNTER_INCREMENT_MASK 0x2 static inline uint8_t get_counter_increment( - const css_computed_style *style, + const css_computed_style *style, const css_computed_counter **counters) { if (style->uncommon != NULL) { @@ -223,7 +223,7 @@ static inline uint8_t get_counter_increment( #define COUNTER_RESET_SHIFT 0 #define COUNTER_RESET_MASK 0x1 static inline uint8_t get_counter_reset( - const css_computed_style *style, + const css_computed_style *style, const css_computed_counter **counters) { if (style->uncommon != NULL) { @@ -247,7 +247,7 @@ static inline uint8_t get_counter_reset( #define CURSOR_SHIFT 3 #define CURSOR_MASK 0xf8 static inline uint8_t get_cursor( - const css_computed_style *style, + const css_computed_style *style, lwc_string ***urls) { if (style->uncommon != NULL) { @@ -277,7 +277,7 @@ static inline uint8_t get_cursor( #define CLIP_SHIFT2 0 #define CLIP_MASK2 0xff static inline uint8_t get_clip( - const css_computed_style *style, + const css_computed_style *style, css_computed_clip_rect *rect) { if (style->uncommon != NULL) { @@ -287,7 +287,7 @@ static inline uint8_t get_clip( /* 6bits: trblyy : top | right | bottom | left | type */ if ((bits & 0x3) == CSS_CLIP_RECT) { - uint8_t bits1; + uint8_t bits1; rect->left_auto = (bits & 0x4); rect->bottom_auto = (bits & 0x8); @@ -342,11 +342,203 @@ static inline uint8_t get_clip( #undef CLIP_SHIFT #undef CLIP_INDEX +#define COLUMN_COUNT_INDEX 8 +#define COLUMN_COUNT_SHIFT 6 +#define COLUMN_COUNT_MASK 0xc0 +static inline uint8_t get_column_count( + const css_computed_style *style, int32_t *count) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_COUNT_INDEX]; + bits &= COLUMN_COUNT_MASK; + bits >>= COLUMN_COUNT_SHIFT; + + /* 2bits: tt : type */ + *count = style->uncommon->column_count; + + return bits; + } + + return CSS_COLUMN_COUNT_AUTO; +} +#undef COLUMN_COUNT_MASK +#undef COLUMN_COUNT_SHIFT +#undef COLUMN_COUNT_INDEX + +#define COLUMN_FILL_INDEX 8 +#define COLUMN_FILL_SHIFT 4 +#define COLUMN_FILL_MASK 0x30 +static inline uint8_t get_column_fill( + const css_computed_style *style) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_FILL_INDEX]; + bits &= COLUMN_FILL_MASK; + bits >>= COLUMN_FILL_SHIFT; + + /* 2bits: type */ + return bits; + } + + return CSS_COLUMN_FILL_BALANCE; +} +#undef COLUMN_FILL_MASK +#undef COLUMN_FILL_SHIFT +#undef COLUMN_FILL_INDEX + +#define COLUMN_GAP_INDEX 9 +#define COLUMN_GAP_SHIFT 2 +#define COLUMN_GAP_MASK 0xfc +static inline uint8_t get_column_gap( + const css_computed_style *style, + css_fixed *length, css_unit *unit) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_GAP_INDEX]; + bits &= COLUMN_GAP_MASK; + bits >>= COLUMN_GAP_SHIFT; + + /* 6bits: uuuutt : units | type */ + if ((bits & 0x3) == CSS_COLUMN_GAP_SET) { + *length = style->uncommon->column_gap; + *unit = bits >> 2; + } + + return (bits & 0x3); + } + + return CSS_COLUMN_GAP_NORMAL; +} +#undef COLUMN_GAP_MASK +#undef COLUMN_GAP_SHIFT +#undef COLUMN_GAP_INDEX + +#define COLUMN_RULE_COLOR_INDEX 9 +#define COLUMN_RULE_COLOR_SHIFT 0 +#define COLUMN_RULE_COLOR_MASK 0x3 +static inline uint8_t get_column_rule_color( + const css_computed_style *style, + css_color *color) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_RULE_COLOR_INDEX]; + bits &= COLUMN_RULE_COLOR_MASK; + bits >>= COLUMN_RULE_COLOR_SHIFT; + + /* 2bits: type */ + *color = style->uncommon->column_rule_color; + + return bits; + } + + *color = 0; + return CSS_COLUMN_RULE_COLOR_CURRENT_COLOR; +} +#undef COLUMN_RULE_COLOR_MASK +#undef COLUMN_RULE_COLOR_SHIFT +#undef COLUMN_RULE_COLOR_INDEX + +#define COLUMN_RULE_STYLE_INDEX 8 +#define COLUMN_RULE_STYLE_SHIFT 0 +#define COLUMN_RULE_STYLE_MASK 0xf +static inline uint8_t get_column_rule_style( + const css_computed_style *style) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_RULE_STYLE_INDEX]; + bits &= COLUMN_RULE_STYLE_MASK; + bits >>= COLUMN_RULE_STYLE_SHIFT; + + /* 4bits: type */ + return bits; + } + + return CSS_COLUMN_RULE_STYLE_NONE; +} +#undef COLUMN_RULE_STYLE_MASK +#undef COLUMN_RULE_STYLE_SHIFT +#undef COLUMN_RULE_STYLE_INDEX + +#define COLUMN_RULE_WIDTH_INDEX 10 +#define COLUMN_RULE_WIDTH_SHIFT 1 +#define COLUMN_RULE_WIDTH_MASK 0xfe +static inline uint8_t get_column_rule_width( + const css_computed_style *style, + css_fixed *length, css_unit *unit) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_RULE_WIDTH_INDEX]; + bits &= COLUMN_RULE_WIDTH_MASK; + bits >>= COLUMN_RULE_WIDTH_SHIFT; + + /* 7bits: uuuuttt : units | type */ + if ((bits & 0x7) == CSS_COLUMN_RULE_WIDTH_WIDTH) { + *length = style->uncommon->column_rule_width; + *unit = bits >> 3; + } + + return (bits & 0x7); + } + + return CSS_COLUMN_RULE_WIDTH_MEDIUM; +} +#undef COLUMN_RULE_WIDTH_MASK +#undef COLUMN_RULE_WIDTH_SHIFT +#undef COLUMN_RULE_WIDTH_INDEX + +#define COLUMN_SPAN_INDEX 11 +#define COLUMN_SPAN_SHIFT 6 +#define COLUMN_SPAN_MASK 0xc0 +static inline uint8_t get_column_span( + const css_computed_style *style) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_SPAN_INDEX]; + bits &= COLUMN_SPAN_MASK; + bits >>= COLUMN_SPAN_SHIFT; + + /* 2bits: type */ + return bits; + } + + return CSS_COLUMN_SPAN_NONE; +} +#undef COLUMN_SPAN_MASK +#undef COLUMN_SPAN_SHIFT +#undef COLUMN_SPAN_INDEX + +#define COLUMN_WIDTH_INDEX 11 +#define COLUMN_WIDTH_SHIFT 0 +#define COLUMN_WIDTH_MASK 0x3f +static inline uint8_t get_column_width( + const css_computed_style *style, + css_fixed *length, css_unit *unit) +{ + if (style->uncommon != NULL) { + uint8_t bits = style->uncommon->bits[COLUMN_WIDTH_INDEX]; + bits &= COLUMN_WIDTH_MASK; + bits >>= COLUMN_WIDTH_SHIFT; + + /* 6bits: uuuutt : units | type */ + if ((bits & 0x3) == CSS_COLUMN_WIDTH_SET) { + *length = style->uncommon->column_width; + *unit = bits >> 2; + } + + return (bits & 0x3); + } + + return CSS_COLUMN_WIDTH_AUTO; +} +#undef COLUMN_WIDTH_MASK +#undef COLUMN_WIDTH_SHIFT +#undef COLUMN_WIDTH_INDEX + #define CONTENT_INDEX 7 #define CONTENT_SHIFT 0 #define CONTENT_MASK 0x3 static inline uint8_t get_content( - const css_computed_style *style, + const css_computed_style *style, const css_computed_content_item **content) { if (style->uncommon != NULL) { @@ -370,7 +562,7 @@ static inline uint8_t get_content( #define VERTICAL_ALIGN_SHIFT 0 #define VERTICAL_ALIGN_MASK 0xff static inline uint8_t get_vertical_align( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[VERTICAL_ALIGN_INDEX]; @@ -393,7 +585,7 @@ static inline uint8_t get_vertical_align( #define FONT_SIZE_SHIFT 0 #define FONT_SIZE_MASK 0xff static inline uint8_t get_font_size( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[FONT_SIZE_INDEX]; @@ -416,7 +608,7 @@ static inline uint8_t get_font_size( #define BORDER_TOP_WIDTH_SHIFT 1 #define BORDER_TOP_WIDTH_MASK 0xfe static inline uint8_t get_border_top_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[BORDER_TOP_WIDTH_INDEX]; @@ -439,7 +631,7 @@ static inline uint8_t get_border_top_width( #define BORDER_RIGHT_WIDTH_SHIFT 1 #define BORDER_RIGHT_WIDTH_MASK 0xfe static inline uint8_t get_border_right_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[BORDER_RIGHT_WIDTH_INDEX]; @@ -462,7 +654,7 @@ static inline uint8_t get_border_right_width( #define BORDER_BOTTOM_WIDTH_SHIFT 1 #define BORDER_BOTTOM_WIDTH_MASK 0xfe static inline uint8_t get_border_bottom_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[BORDER_BOTTOM_WIDTH_INDEX]; @@ -485,7 +677,7 @@ static inline uint8_t get_border_bottom_width( #define BORDER_LEFT_WIDTH_SHIFT 1 #define BORDER_LEFT_WIDTH_MASK 0xfe static inline uint8_t get_border_left_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[BORDER_LEFT_WIDTH_INDEX]; @@ -508,7 +700,7 @@ static inline uint8_t get_border_left_width( #define BACKGROUND_IMAGE_SHIFT 0 #define BACKGROUND_IMAGE_MASK 0x1 static inline uint8_t get_background_image( - const css_computed_style *style, + const css_computed_style *style, lwc_string **url) { uint8_t bits = style->bits[BACKGROUND_IMAGE_INDEX]; @@ -528,7 +720,7 @@ static inline uint8_t get_background_image( #define COLOR_SHIFT 0 #define COLOR_MASK 0x1 static inline uint8_t get_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[COLOR_INDEX]; @@ -548,7 +740,7 @@ static inline uint8_t get_color( #define LIST_STYLE_IMAGE_SHIFT 0 #define LIST_STYLE_IMAGE_MASK 0x1 static inline uint8_t get_list_style_image( - const css_computed_style *style, + const css_computed_style *style, lwc_string **url) { uint8_t bits = style->bits[LIST_STYLE_IMAGE_INDEX]; @@ -568,7 +760,7 @@ static inline uint8_t get_list_style_image( #define QUOTES_SHIFT 0 #define QUOTES_MASK 0x1 static inline uint8_t get_quotes( - const css_computed_style *style, + const css_computed_style *style, lwc_string ***quotes) { uint8_t bits = style->bits[QUOTES_INDEX]; @@ -588,7 +780,7 @@ static inline uint8_t get_quotes( #define TOP_SHIFT 2 #define TOP_MASK 0xfc static inline uint8_t get_top( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[TOP_INDEX]; @@ -621,7 +813,7 @@ static inline uint8_t get_top_bits( #define RIGHT_SHIFT 2 #define RIGHT_MASK 0xfc static inline uint8_t get_right( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[RIGHT_INDEX]; @@ -654,7 +846,7 @@ static inline uint8_t get_right_bits( #define BOTTOM_SHIFT 2 #define BOTTOM_MASK 0xfc static inline uint8_t get_bottom( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[BOTTOM_INDEX]; @@ -687,7 +879,7 @@ static inline uint8_t get_bottom_bits( #define LEFT_SHIFT 2 #define LEFT_MASK 0xfc static inline uint8_t get_left( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[LEFT_INDEX]; @@ -720,7 +912,7 @@ static inline uint8_t get_left_bits( #define BORDER_TOP_COLOR_SHIFT 0 #define BORDER_TOP_COLOR_MASK 0x3 static inline uint8_t get_border_top_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[BORDER_TOP_COLOR_INDEX]; @@ -740,7 +932,7 @@ static inline uint8_t get_border_top_color( #define BORDER_RIGHT_COLOR_SHIFT 0 #define BORDER_RIGHT_COLOR_MASK 0x3 static inline uint8_t get_border_right_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[BORDER_RIGHT_COLOR_INDEX]; @@ -760,7 +952,7 @@ static inline uint8_t get_border_right_color( #define BORDER_BOTTOM_COLOR_SHIFT 0 #define BORDER_BOTTOM_COLOR_MASK 0x3 static inline uint8_t get_border_bottom_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[BORDER_BOTTOM_COLOR_INDEX]; @@ -780,7 +972,7 @@ static inline uint8_t get_border_bottom_color( #define BORDER_LEFT_COLOR_SHIFT 0 #define BORDER_LEFT_COLOR_MASK 0x3 static inline uint8_t get_border_left_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[BORDER_LEFT_COLOR_INDEX]; @@ -800,7 +992,7 @@ static inline uint8_t get_border_left_color( #define HEIGHT_SHIFT 2 #define HEIGHT_MASK 0xfc static inline uint8_t get_height( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[HEIGHT_INDEX]; @@ -823,7 +1015,7 @@ static inline uint8_t get_height( #define LINE_HEIGHT_SHIFT 2 #define LINE_HEIGHT_MASK 0xfc static inline uint8_t get_line_height( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[LINE_HEIGHT_INDEX]; @@ -831,7 +1023,7 @@ static inline uint8_t get_line_height( bits >>= LINE_HEIGHT_SHIFT; /* 6bits: uuuutt : units | type */ - if ((bits & 0x3) == CSS_LINE_HEIGHT_NUMBER || + if ((bits & 0x3) == CSS_LINE_HEIGHT_NUMBER || (bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) { *length = style->line_height; } @@ -850,7 +1042,7 @@ static inline uint8_t get_line_height( #define BACKGROUND_COLOR_SHIFT 0 #define BACKGROUND_COLOR_MASK 0x3 static inline uint8_t get_background_color( - const css_computed_style *style, + const css_computed_style *style, css_color *color) { uint8_t bits = style->bits[BACKGROUND_COLOR_INDEX]; @@ -870,7 +1062,7 @@ static inline uint8_t get_background_color( #define Z_INDEX_SHIFT 0 #define Z_INDEX_MASK 0x3 static inline uint8_t get_z_index( - const css_computed_style *style, + const css_computed_style *style, int32_t *z_index) { uint8_t bits = style->bits[Z_INDEX_INDEX]; @@ -890,7 +1082,7 @@ static inline uint8_t get_z_index( #define MARGIN_TOP_SHIFT 2 #define MARGIN_TOP_MASK 0xfc static inline uint8_t get_margin_top( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MARGIN_TOP_INDEX]; @@ -913,7 +1105,7 @@ static inline uint8_t get_margin_top( #define MARGIN_RIGHT_SHIFT 2 #define MARGIN_RIGHT_MASK 0xfc static inline uint8_t get_margin_right( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MARGIN_RIGHT_INDEX]; @@ -936,7 +1128,7 @@ static inline uint8_t get_margin_right( #define MARGIN_BOTTOM_SHIFT 2 #define MARGIN_BOTTOM_MASK 0xfc static inline uint8_t get_margin_bottom( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MARGIN_BOTTOM_INDEX]; @@ -959,7 +1151,7 @@ static inline uint8_t get_margin_bottom( #define MARGIN_LEFT_SHIFT 2 #define MARGIN_LEFT_MASK 0xfc static inline uint8_t get_margin_left( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MARGIN_LEFT_INDEX]; @@ -1050,7 +1242,7 @@ static inline uint8_t get_direction( #define MAX_HEIGHT_SHIFT 2 #define MAX_HEIGHT_MASK 0xfc static inline uint8_t get_max_height( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MAX_HEIGHT_INDEX]; @@ -1073,7 +1265,7 @@ static inline uint8_t get_max_height( #define MAX_WIDTH_SHIFT 2 #define MAX_WIDTH_MASK 0xfc static inline uint8_t get_max_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MAX_WIDTH_INDEX]; @@ -1096,7 +1288,7 @@ static inline uint8_t get_max_width( #define WIDTH_SHIFT 2 #define WIDTH_MASK 0xfc static inline uint8_t get_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[WIDTH_INDEX]; @@ -1170,7 +1362,7 @@ static inline uint8_t get_font_style( #define MIN_HEIGHT_SHIFT 3 #define MIN_HEIGHT_MASK 0xf8 static inline uint8_t get_min_height( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MIN_HEIGHT_INDEX]; @@ -1193,7 +1385,7 @@ static inline uint8_t get_min_height( #define MIN_WIDTH_SHIFT 3 #define MIN_WIDTH_MASK 0xf8 static inline uint8_t get_min_width( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[MIN_WIDTH_INDEX]; @@ -1250,7 +1442,7 @@ static inline uint8_t get_clear( #define PADDING_TOP_SHIFT 3 #define PADDING_TOP_MASK 0xf8 static inline uint8_t get_padding_top( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[PADDING_TOP_INDEX]; @@ -1273,7 +1465,7 @@ static inline uint8_t get_padding_top( #define PADDING_RIGHT_SHIFT 3 #define PADDING_RIGHT_MASK 0xf8 static inline uint8_t get_padding_right( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[PADDING_RIGHT_INDEX]; @@ -1296,7 +1488,7 @@ static inline uint8_t get_padding_right( #define PADDING_BOTTOM_SHIFT 3 #define PADDING_BOTTOM_MASK 0xf8 static inline uint8_t get_padding_bottom( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[PADDING_BOTTOM_INDEX]; @@ -1319,7 +1511,7 @@ static inline uint8_t get_padding_bottom( #define PADDING_LEFT_SHIFT 3 #define PADDING_LEFT_MASK 0xf8 static inline uint8_t get_padding_left( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[PADDING_LEFT_INDEX]; @@ -1393,7 +1585,7 @@ static inline uint8_t get_position( #define OPACITY_SHIFT 2 #define OPACITY_MASK 0x04 static inline uint8_t get_opacity( - const css_computed_style *style, + const css_computed_style *style, css_fixed *opacity) { uint8_t bits = style->bits[OPACITY_INDEX]; @@ -1432,7 +1624,7 @@ static inline uint8_t get_text_transform( #define TEXT_INDENT_SHIFT 3 #define TEXT_INDENT_MASK 0xf8 static inline uint8_t get_text_indent( - const css_computed_style *style, + const css_computed_style *style, css_fixed *length, css_unit *unit) { uint8_t bits = style->bits[TEXT_INDENT_INDEX]; @@ -1475,7 +1667,7 @@ static inline uint8_t get_white_space( #define BACKGROUND_POSITION_SHIFT1 0 #define BACKGROUND_POSITION_MASK1 0xff static inline uint8_t get_background_position( - const css_computed_style *style, + const css_computed_style *style, css_fixed *hlength, css_unit *hunit, css_fixed *vlength, css_unit *vunit) { @@ -1561,7 +1753,7 @@ static inline uint8_t get_text_decoration( #define FONT_FAMILY_SHIFT 0 #define FONT_FAMILY_MASK 0x7 static inline uint8_t get_font_family( - const css_computed_style *style, + const css_computed_style *style, lwc_string ***names) { uint8_t bits = style->bits[FONT_FAMILY_INDEX]; @@ -1801,7 +1993,7 @@ static inline uint8_t get_page_break_after( #undef PAGE_BREAK_AFTER_MASK #undef PAGE_BREAK_AFTER_SHIFT #undef PAGE_BREAK_AFTER_INDEX - + #define PAGE_BREAK_BEFORE_INDEX 0 #define PAGE_BREAK_BEFORE_SHIFT 3 #define PAGE_BREAK_BEFORE_MASK 0x38 @@ -1816,13 +2008,13 @@ static inline uint8_t get_page_break_before( /* 3bits: type */ return bits; } - + return CSS_PAGE_BREAK_BEFORE_AUTO; } #undef PAGE_BREAK_BEFORE_MASK #undef PAGE_BREAK_BEFORE_SHIFT #undef PAGE_BREAK_BEFORE_INDEX - + #define PAGE_BREAK_INSIDE_INDEX 0 #define PAGE_BREAK_INSIDE_SHIFT 6 #define PAGE_BREAK_INSIDE_MASK 0xc0 @@ -1855,13 +2047,13 @@ static inline uint8_t get_orphans( uint8_t bits = style->page->bits[ORPHANS_INDEX]; bits &= ORPHANS_MASK; bits >>= ORPHANS_SHIFT; - + *orphans = style->page->orphans; - + /* 1bit: type */ return bits; } - + *orphans = 2; return CSS_ORPHANS_SET; } @@ -1880,13 +2072,13 @@ static inline uint8_t get_widows( uint8_t bits = style->page->bits[WIDOWS_INDEX]; bits &= WIDOWS_MASK; bits >>= WIDOWS_SHIFT; - + *widows = style->page->widows; - + /* 1bit: type */ return bits; } - + *widows = 2; return CSS_WIDOWS_SET; } |