summaryrefslogtreecommitdiff
path: root/src/select/autogenerated_propset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/autogenerated_propset.h')
-rw-r--r--src/select/autogenerated_propset.h956
1 files changed, 395 insertions, 561 deletions
diff --git a/src/select/autogenerated_propset.h b/src/select/autogenerated_propset.h
index 56ff7c6..198bc1e 100644
--- a/src/select/autogenerated_propset.h
+++ b/src/select/autogenerated_propset.h
@@ -9,15 +9,13 @@
* in which case it is 'inherit'. */
#define ALIGN_CONTENT_INDEX 10
-#define ALIGN_CONTENT_SHIFT 29
-#define ALIGN_CONTENT_MASK 0xe0000000
+#define ALIGN_CONTENT_SHIFT 20
+#define ALIGN_CONTENT_MASK 0x700000
static inline css_error set_align_content(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[ALIGN_CONTENT_INDEX];
+ uint32_t *bits = &style->i.bits[ALIGN_CONTENT_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~ALIGN_CONTENT_MASK) | (((uint32_t)type & 0x7) <<
@@ -30,14 +28,12 @@ static inline css_error set_align_content(css_computed_style *style, uint8_t
#undef ALIGN_CONTENT_MASK
#define ALIGN_ITEMS_INDEX 10
-#define ALIGN_ITEMS_SHIFT 26
-#define ALIGN_ITEMS_MASK 0x1c000000
+#define ALIGN_ITEMS_SHIFT 23
+#define ALIGN_ITEMS_MASK 0x3800000
static inline css_error set_align_items(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[ALIGN_ITEMS_INDEX];
+ uint32_t *bits = &style->i.bits[ALIGN_ITEMS_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~ALIGN_ITEMS_MASK) | (((uint32_t)type & 0x7) <<
@@ -50,14 +46,12 @@ static inline css_error set_align_items(css_computed_style *style, uint8_t type)
#undef ALIGN_ITEMS_MASK
#define ALIGN_SELF_INDEX 10
-#define ALIGN_SELF_SHIFT 23
-#define ALIGN_SELF_MASK 0x3800000
+#define ALIGN_SELF_SHIFT 26
+#define ALIGN_SELF_MASK 0x1c000000
static inline css_error set_align_self(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[ALIGN_SELF_INDEX];
+ uint32_t *bits = &style->i.bits[ALIGN_SELF_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~ALIGN_SELF_MASK) | (((uint32_t)type & 0x7) <<
@@ -69,16 +63,14 @@ static inline css_error set_align_self(css_computed_style *style, uint8_t type)
#undef ALIGN_SELF_SHIFT
#undef ALIGN_SELF_MASK
-#define BACKGROUND_ATTACHMENT_INDEX 11
-#define BACKGROUND_ATTACHMENT_SHIFT 26
-#define BACKGROUND_ATTACHMENT_MASK 0xc000000
+#define BACKGROUND_ATTACHMENT_INDEX 14
+#define BACKGROUND_ATTACHMENT_SHIFT 28
+#define BACKGROUND_ATTACHMENT_MASK 0x30000000
static inline css_error set_background_attachment(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
+ uint32_t *bits = &style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BACKGROUND_ATTACHMENT_MASK) | (((uint32_t)type & 0x3)
@@ -90,16 +82,14 @@ static inline css_error set_background_attachment(css_computed_style *style,
#undef BACKGROUND_ATTACHMENT_SHIFT
#undef BACKGROUND_ATTACHMENT_MASK
-#define BACKGROUND_COLOR_INDEX 11
-#define BACKGROUND_COLOR_SHIFT 22
-#define BACKGROUND_COLOR_MASK 0xc00000
+#define BACKGROUND_COLOR_INDEX 14
+#define BACKGROUND_COLOR_SHIFT 30
+#define BACKGROUND_COLOR_MASK 0xc0000000
static inline css_error set_background_color(css_computed_style *style, uint8_t
type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BACKGROUND_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[BACKGROUND_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BACKGROUND_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -114,15 +104,13 @@ static inline css_error set_background_color(css_computed_style *style, uint8_t
#undef BACKGROUND_COLOR_MASK
#define BACKGROUND_IMAGE_INDEX 14
-#define BACKGROUND_IMAGE_SHIFT 23
-#define BACKGROUND_IMAGE_MASK 0x800000
+#define BACKGROUND_IMAGE_SHIFT 16
+#define BACKGROUND_IMAGE_MASK 0x10000
static inline css_error set_background_image(css_computed_style *style, uint8_t
type, lwc_string *string)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BACKGROUND_IMAGE_INDEX];
+ uint32_t *bits = &style->i.bits[BACKGROUND_IMAGE_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~BACKGROUND_IMAGE_MASK) | (((uint32_t)type & 0x1) <<
@@ -153,9 +141,7 @@ static inline css_error set_background_position(css_computed_style *style,
uint8_t type, css_fixed length_a, css_unit unit_a, css_fixed
length_b, css_unit unit_b)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BACKGROUND_POSITION_INDEX];
+ uint32_t *bits = &style->i.bits[BACKGROUND_POSITION_INDEX];
/* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
*bits = (*bits & ~BACKGROUND_POSITION_MASK) | ((((uint32_t)type & 0x1)
@@ -172,16 +158,14 @@ static inline css_error set_background_position(css_computed_style *style,
#undef BACKGROUND_POSITION_SHIFT
#undef BACKGROUND_POSITION_MASK
-#define BACKGROUND_REPEAT_INDEX 13
-#define BACKGROUND_REPEAT_SHIFT 22
-#define BACKGROUND_REPEAT_MASK 0x1c00000
+#define BACKGROUND_REPEAT_INDEX 10
+#define BACKGROUND_REPEAT_SHIFT 29
+#define BACKGROUND_REPEAT_MASK 0xe0000000
static inline css_error set_background_repeat(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BACKGROUND_REPEAT_INDEX];
+ uint32_t *bits = &style->i.bits[BACKGROUND_REPEAT_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~BACKGROUND_REPEAT_MASK) | (((uint32_t)type & 0x7) <<
@@ -193,16 +177,14 @@ static inline css_error set_background_repeat(css_computed_style *style,
#undef BACKGROUND_REPEAT_SHIFT
#undef BACKGROUND_REPEAT_MASK
-#define BORDER_BOTTOM_COLOR_INDEX 10
-#define BORDER_BOTTOM_COLOR_SHIFT 18
-#define BORDER_BOTTOM_COLOR_MASK 0xc0000
+#define BORDER_BOTTOM_COLOR_INDEX 11
+#define BORDER_BOTTOM_COLOR_SHIFT 0
+#define BORDER_BOTTOM_COLOR_MASK 0x3
static inline css_error set_border_bottom_color(css_computed_style *style,
uint8_t type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BORDER_BOTTOM_COLOR_MASK) | (((uint32_t)type & 0x3)
@@ -216,16 +198,14 @@ static inline css_error set_border_bottom_color(css_computed_style *style,
#undef BORDER_BOTTOM_COLOR_SHIFT
#undef BORDER_BOTTOM_COLOR_MASK
-#define BORDER_BOTTOM_STYLE_INDEX 6
-#define BORDER_BOTTOM_STYLE_SHIFT 0
-#define BORDER_BOTTOM_STYLE_MASK 0xf
+#define BORDER_BOTTOM_STYLE_INDEX 13
+#define BORDER_BOTTOM_STYLE_SHIFT 28
+#define BORDER_BOTTOM_STYLE_MASK 0xf0000000
static inline css_error set_border_bottom_style(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BORDER_BOTTOM_STYLE_MASK) | (((uint32_t)type & 0xf)
@@ -238,15 +218,13 @@ static inline css_error set_border_bottom_style(css_computed_style *style,
#undef BORDER_BOTTOM_STYLE_MASK
#define BORDER_BOTTOM_WIDTH_INDEX 0
-#define BORDER_BOTTOM_WIDTH_SHIFT 8
-#define BORDER_BOTTOM_WIDTH_MASK 0xff00
+#define BORDER_BOTTOM_WIDTH_SHIFT 0
+#define BORDER_BOTTOM_WIDTH_MASK 0xff
static inline css_error set_border_bottom_width(css_computed_style *style,
uint8_t type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~BORDER_BOTTOM_WIDTH_MASK) | ((((uint32_t)type & 0x7)
@@ -261,15 +239,13 @@ static inline css_error set_border_bottom_width(css_computed_style *style,
#undef BORDER_BOTTOM_WIDTH_MASK
#define BORDER_COLLAPSE_INDEX 11
-#define BORDER_COLLAPSE_SHIFT 14
-#define BORDER_COLLAPSE_MASK 0xc000
+#define BORDER_COLLAPSE_SHIFT 2
+#define BORDER_COLLAPSE_MASK 0xc
static inline css_error set_border_collapse(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_COLLAPSE_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_COLLAPSE_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BORDER_COLLAPSE_MASK) | (((uint32_t)type & 0x3) <<
@@ -281,16 +257,14 @@ static inline css_error set_border_collapse(css_computed_style *style, uint8_t
#undef BORDER_COLLAPSE_SHIFT
#undef BORDER_COLLAPSE_MASK
-#define BORDER_LEFT_COLOR_INDEX 10
-#define BORDER_LEFT_COLOR_SHIFT 2
-#define BORDER_LEFT_COLOR_MASK 0xc
+#define BORDER_LEFT_COLOR_INDEX 11
+#define BORDER_LEFT_COLOR_SHIFT 4
+#define BORDER_LEFT_COLOR_MASK 0x30
static inline css_error set_border_left_color(css_computed_style *style,
uint8_t type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_LEFT_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_LEFT_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BORDER_LEFT_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -305,15 +279,13 @@ static inline css_error set_border_left_color(css_computed_style *style,
#undef BORDER_LEFT_COLOR_MASK
#define BORDER_LEFT_STYLE_INDEX 9
-#define BORDER_LEFT_STYLE_SHIFT 19
-#define BORDER_LEFT_STYLE_MASK 0x780000
+#define BORDER_LEFT_STYLE_SHIFT 3
+#define BORDER_LEFT_STYLE_MASK 0x78
static inline css_error set_border_left_style(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_LEFT_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_LEFT_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BORDER_LEFT_STYLE_MASK) | (((uint32_t)type & 0xf) <<
@@ -326,15 +298,13 @@ static inline css_error set_border_left_style(css_computed_style *style,
#undef BORDER_LEFT_STYLE_MASK
#define BORDER_LEFT_WIDTH_INDEX 0
-#define BORDER_LEFT_WIDTH_SHIFT 24
-#define BORDER_LEFT_WIDTH_MASK 0xff000000
+#define BORDER_LEFT_WIDTH_SHIFT 8
+#define BORDER_LEFT_WIDTH_MASK 0xff00
static inline css_error set_border_left_width(css_computed_style *style,
uint8_t type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_LEFT_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_LEFT_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~BORDER_LEFT_WIDTH_MASK) | ((((uint32_t)type & 0x7) | (
@@ -349,15 +319,13 @@ static inline css_error set_border_left_width(css_computed_style *style,
#undef BORDER_LEFT_WIDTH_MASK
#define BORDER_RIGHT_COLOR_INDEX 11
-#define BORDER_RIGHT_COLOR_SHIFT 12
-#define BORDER_RIGHT_COLOR_MASK 0x3000
+#define BORDER_RIGHT_COLOR_SHIFT 6
+#define BORDER_RIGHT_COLOR_MASK 0xc0
static inline css_error set_border_right_color(css_computed_style *style,
uint8_t type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_RIGHT_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_RIGHT_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BORDER_RIGHT_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -371,16 +339,14 @@ static inline css_error set_border_right_color(css_computed_style *style,
#undef BORDER_RIGHT_COLOR_SHIFT
#undef BORDER_RIGHT_COLOR_MASK
-#define BORDER_RIGHT_STYLE_INDEX 13
-#define BORDER_RIGHT_STYLE_SHIFT 28
-#define BORDER_RIGHT_STYLE_MASK 0xf0000000
+#define BORDER_RIGHT_STYLE_INDEX 9
+#define BORDER_RIGHT_STYLE_SHIFT 7
+#define BORDER_RIGHT_STYLE_MASK 0x780
static inline css_error set_border_right_style(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_RIGHT_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_RIGHT_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BORDER_RIGHT_STYLE_MASK) | (((uint32_t)type & 0xf) <<
@@ -393,15 +359,13 @@ static inline css_error set_border_right_style(css_computed_style *style,
#undef BORDER_RIGHT_STYLE_MASK
#define BORDER_RIGHT_WIDTH_INDEX 0
-#define BORDER_RIGHT_WIDTH_SHIFT 0
-#define BORDER_RIGHT_WIDTH_MASK 0xff
+#define BORDER_RIGHT_WIDTH_SHIFT 16
+#define BORDER_RIGHT_WIDTH_MASK 0xff0000
static inline css_error set_border_right_width(css_computed_style *style,
uint8_t type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~BORDER_RIGHT_WIDTH_MASK) | ((((uint32_t)type & 0x7) |
@@ -423,9 +387,7 @@ static inline css_error set_border_spacing(css_computed_style *style, uint8_t
type, css_fixed length_a, css_unit unit_a, css_fixed length_b,
css_unit unit_b)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_SPACING_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_SPACING_INDEX];
/* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
*bits = (*bits & ~BORDER_SPACING_MASK) | ((((uint32_t)type & 0x1) | (
@@ -442,15 +404,13 @@ static inline css_error set_border_spacing(css_computed_style *style, uint8_t
#undef BORDER_SPACING_MASK
#define BORDER_TOP_COLOR_INDEX 11
-#define BORDER_TOP_COLOR_SHIFT 16
-#define BORDER_TOP_COLOR_MASK 0x30000
+#define BORDER_TOP_COLOR_SHIFT 8
+#define BORDER_TOP_COLOR_MASK 0x300
static inline css_error set_border_top_color(css_computed_style *style, uint8_t
type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_TOP_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_TOP_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BORDER_TOP_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -464,16 +424,14 @@ static inline css_error set_border_top_color(css_computed_style *style, uint8_t
#undef BORDER_TOP_COLOR_SHIFT
#undef BORDER_TOP_COLOR_MASK
-#define BORDER_TOP_STYLE_INDEX 7
-#define BORDER_TOP_STYLE_SHIFT 0
-#define BORDER_TOP_STYLE_MASK 0xf
+#define BORDER_TOP_STYLE_INDEX 9
+#define BORDER_TOP_STYLE_SHIFT 11
+#define BORDER_TOP_STYLE_MASK 0x7800
static inline css_error set_border_top_style(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_TOP_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_TOP_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BORDER_TOP_STYLE_MASK) | (((uint32_t)type & 0xf) <<
@@ -486,15 +444,13 @@ static inline css_error set_border_top_style(css_computed_style *style, uint8_t
#undef BORDER_TOP_STYLE_MASK
#define BORDER_TOP_WIDTH_INDEX 0
-#define BORDER_TOP_WIDTH_SHIFT 16
-#define BORDER_TOP_WIDTH_MASK 0xff0000
+#define BORDER_TOP_WIDTH_SHIFT 24
+#define BORDER_TOP_WIDTH_MASK 0xff000000
static inline css_error set_border_top_width(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BORDER_TOP_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[BORDER_TOP_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~BORDER_TOP_WIDTH_MASK) | ((((uint32_t)type & 0x7) | (
@@ -508,16 +464,14 @@ static inline css_error set_border_top_width(css_computed_style *style, uint8_t
#undef BORDER_TOP_WIDTH_SHIFT
#undef BORDER_TOP_WIDTH_MASK
-#define BOTTOM_INDEX 7
+#define BOTTOM_INDEX 3
#define BOTTOM_SHIFT 11
#define BOTTOM_MASK 0x3f800
static inline css_error set_bottom(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BOTTOM_INDEX];
+ uint32_t *bits = &style->i.bits[BOTTOM_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~BOTTOM_MASK) | ((((uint32_t)type & 0x3) | (unit <<
@@ -531,15 +485,13 @@ static inline css_error set_bottom(css_computed_style *style, uint8_t type,
#undef BOTTOM_SHIFT
#undef BOTTOM_MASK
-#define BOX_SIZING_INDEX 10
-#define BOX_SIZING_SHIFT 12
-#define BOX_SIZING_MASK 0x3000
+#define BOX_SIZING_INDEX 11
+#define BOX_SIZING_SHIFT 10
+#define BOX_SIZING_MASK 0xc00
static inline css_error set_box_sizing(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BOX_SIZING_INDEX];
+ uint32_t *bits = &style->i.bits[BOX_SIZING_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~BOX_SIZING_MASK) | (((uint32_t)type & 0x3) <<
@@ -552,14 +504,12 @@ static inline css_error set_box_sizing(css_computed_style *style, uint8_t type)
#undef BOX_SIZING_MASK
#define BREAK_AFTER_INDEX 9
-#define BREAK_AFTER_SHIFT 11
-#define BREAK_AFTER_MASK 0x7800
+#define BREAK_AFTER_SHIFT 15
+#define BREAK_AFTER_MASK 0x78000
static inline css_error set_break_after(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BREAK_AFTER_INDEX];
+ uint32_t *bits = &style->i.bits[BREAK_AFTER_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BREAK_AFTER_MASK) | (((uint32_t)type & 0xf) <<
@@ -572,15 +522,13 @@ static inline css_error set_break_after(css_computed_style *style, uint8_t type)
#undef BREAK_AFTER_MASK
#define BREAK_BEFORE_INDEX 9
-#define BREAK_BEFORE_SHIFT 23
-#define BREAK_BEFORE_MASK 0x7800000
+#define BREAK_BEFORE_SHIFT 19
+#define BREAK_BEFORE_MASK 0x780000
static inline css_error set_break_before(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BREAK_BEFORE_INDEX];
+ uint32_t *bits = &style->i.bits[BREAK_BEFORE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BREAK_BEFORE_MASK) | (((uint32_t)type & 0xf) <<
@@ -592,16 +540,14 @@ static inline css_error set_break_before(css_computed_style *style, uint8_t
#undef BREAK_BEFORE_SHIFT
#undef BREAK_BEFORE_MASK
-#define BREAK_INSIDE_INDEX 5
-#define BREAK_INSIDE_SHIFT 0
-#define BREAK_INSIDE_MASK 0xf
+#define BREAK_INSIDE_INDEX 9
+#define BREAK_INSIDE_SHIFT 23
+#define BREAK_INSIDE_MASK 0x7800000
static inline css_error set_break_inside(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[BREAK_INSIDE_INDEX];
+ uint32_t *bits = &style->i.bits[BREAK_INSIDE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~BREAK_INSIDE_MASK) | (((uint32_t)type & 0xf) <<
@@ -614,15 +560,13 @@ static inline css_error set_break_inside(css_computed_style *style, uint8_t
#undef BREAK_INSIDE_MASK
#define CAPTION_SIDE_INDEX 11
-#define CAPTION_SIDE_SHIFT 4
-#define CAPTION_SIDE_MASK 0x30
+#define CAPTION_SIDE_SHIFT 12
+#define CAPTION_SIDE_MASK 0x3000
static inline css_error set_caption_side(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[CAPTION_SIDE_INDEX];
+ uint32_t *bits = &style->i.bits[CAPTION_SIDE_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~CAPTION_SIDE_MASK) | (((uint32_t)type & 0x3) <<
@@ -635,14 +579,12 @@ static inline css_error set_caption_side(css_computed_style *style, uint8_t
#undef CAPTION_SIDE_MASK
#define CLEAR_INDEX 13
-#define CLEAR_SHIFT 10
-#define CLEAR_MASK 0x1c00
+#define CLEAR_SHIFT 1
+#define CLEAR_MASK 0xe
static inline css_error set_clear(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[CLEAR_INDEX];
+ uint32_t *bits = &style->i.bits[CLEAR_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~CLEAR_MASK) | (((uint32_t)type & 0x7) << CLEAR_SHIFT);
@@ -697,15 +639,13 @@ static inline css_error set_clip(
#undef CLIP_MASK
#define COLOR_INDEX 14
-#define COLOR_SHIFT 18
-#define COLOR_MASK 0x40000
+#define COLOR_SHIFT 17
+#define COLOR_MASK 0x20000
static inline css_error set_color(css_computed_style *style, uint8_t type,
css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[COLOR_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~COLOR_MASK) | (((uint32_t)type & 0x1) << COLOR_SHIFT);
@@ -718,16 +658,14 @@ static inline css_error set_color(css_computed_style *style, uint8_t type,
#undef COLOR_SHIFT
#undef COLOR_MASK
-#define COLUMN_COUNT_INDEX 10
-#define COLUMN_COUNT_SHIFT 0
-#define COLUMN_COUNT_MASK 0x3
+#define COLUMN_COUNT_INDEX 11
+#define COLUMN_COUNT_SHIFT 14
+#define COLUMN_COUNT_MASK 0xc000
static inline css_error set_column_count(css_computed_style *style, uint8_t
type, int32_t integer)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_COUNT_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_COUNT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_COUNT_MASK) | (((uint32_t)type & 0x3) <<
@@ -742,14 +680,12 @@ static inline css_error set_column_count(css_computed_style *style, uint8_t
#undef COLUMN_COUNT_MASK
#define COLUMN_FILL_INDEX 11
-#define COLUMN_FILL_SHIFT 8
-#define COLUMN_FILL_MASK 0x300
+#define COLUMN_FILL_SHIFT 16
+#define COLUMN_FILL_MASK 0x30000
static inline css_error set_column_fill(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_FILL_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_FILL_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_FILL_MASK) | (((uint32_t)type & 0x3) <<
@@ -761,16 +697,14 @@ static inline css_error set_column_fill(css_computed_style *style, uint8_t type)
#undef COLUMN_FILL_SHIFT
#undef COLUMN_FILL_MASK
-#define COLUMN_GAP_INDEX 4
-#define COLUMN_GAP_SHIFT 11
-#define COLUMN_GAP_MASK 0x3f800
+#define COLUMN_GAP_INDEX 3
+#define COLUMN_GAP_SHIFT 18
+#define COLUMN_GAP_MASK 0x1fc0000
static inline css_error set_column_gap(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_GAP_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_GAP_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~COLUMN_GAP_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -784,16 +718,14 @@ static inline css_error set_column_gap(css_computed_style *style, uint8_t type,
#undef COLUMN_GAP_SHIFT
#undef COLUMN_GAP_MASK
-#define COLUMN_RULE_COLOR_INDEX 10
-#define COLUMN_RULE_COLOR_SHIFT 16
-#define COLUMN_RULE_COLOR_MASK 0x30000
+#define COLUMN_RULE_COLOR_INDEX 11
+#define COLUMN_RULE_COLOR_SHIFT 18
+#define COLUMN_RULE_COLOR_MASK 0xc0000
static inline css_error set_column_rule_color(css_computed_style *style,
uint8_t type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_RULE_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_RULE_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_RULE_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -807,16 +739,14 @@ static inline css_error set_column_rule_color(css_computed_style *style,
#undef COLUMN_RULE_COLOR_SHIFT
#undef COLUMN_RULE_COLOR_MASK
-#define COLUMN_RULE_STYLE_INDEX 9
-#define COLUMN_RULE_STYLE_SHIFT 3
-#define COLUMN_RULE_STYLE_MASK 0x78
+#define COLUMN_RULE_STYLE_INDEX 7
+#define COLUMN_RULE_STYLE_SHIFT 0
+#define COLUMN_RULE_STYLE_MASK 0xf
static inline css_error set_column_rule_style(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_RULE_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_RULE_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~COLUMN_RULE_STYLE_MASK) | (((uint32_t)type & 0xf) <<
@@ -835,9 +765,7 @@ static inline css_error set_column_rule_style(css_computed_style *style,
static inline css_error set_column_rule_width(css_computed_style *style,
uint8_t type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_RULE_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_RULE_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~COLUMN_RULE_WIDTH_MASK) | ((((uint32_t)type & 0x7) | (
@@ -851,15 +779,13 @@ static inline css_error set_column_rule_width(css_computed_style *style,
#undef COLUMN_RULE_WIDTH_SHIFT
#undef COLUMN_RULE_WIDTH_MASK
-#define COLUMN_SPAN_INDEX 10
-#define COLUMN_SPAN_SHIFT 10
-#define COLUMN_SPAN_MASK 0xc00
+#define COLUMN_SPAN_INDEX 11
+#define COLUMN_SPAN_SHIFT 20
+#define COLUMN_SPAN_MASK 0x300000
static inline css_error set_column_span(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_SPAN_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_SPAN_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_SPAN_MASK) | (((uint32_t)type & 0x3) <<
@@ -871,16 +797,14 @@ static inline css_error set_column_span(css_computed_style *style, uint8_t type)
#undef COLUMN_SPAN_SHIFT
#undef COLUMN_SPAN_MASK
-#define COLUMN_WIDTH_INDEX 5
+#define COLUMN_WIDTH_INDEX 3
#define COLUMN_WIDTH_SHIFT 25
#define COLUMN_WIDTH_MASK 0xfe000000
static inline css_error set_column_width(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COLUMN_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[COLUMN_WIDTH_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~COLUMN_WIDTH_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -895,8 +819,8 @@ static inline css_error set_column_width(css_computed_style *style, uint8_t
#undef COLUMN_WIDTH_MASK
#define CONTENT_INDEX 11
-#define CONTENT_SHIFT 18
-#define CONTENT_MASK 0xc0000
+#define CONTENT_SHIFT 22
+#define CONTENT_MASK 0xc00000
static inline css_error set_content(
css_computed_style *style, uint8_t type,
css_computed_content_item *content)
@@ -978,15 +902,13 @@ static inline css_error set_content(
#undef CONTENT_MASK
#define COUNTER_INCREMENT_INDEX 14
-#define COUNTER_INCREMENT_SHIFT 20
-#define COUNTER_INCREMENT_MASK 0x100000
+#define COUNTER_INCREMENT_SHIFT 18
+#define COUNTER_INCREMENT_MASK 0x40000
static inline css_error set_counter_increment(css_computed_style *style,
uint8_t type, css_computed_counter *counter_arr)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COUNTER_INCREMENT_INDEX];
+ uint32_t *bits = &style->i.bits[COUNTER_INCREMENT_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~COUNTER_INCREMENT_MASK) | (((uint32_t)type & 0x1) <<
@@ -1016,15 +938,13 @@ static inline css_error set_counter_increment(css_computed_style *style,
#undef COUNTER_INCREMENT_MASK
#define COUNTER_RESET_INDEX 14
-#define COUNTER_RESET_SHIFT 25
-#define COUNTER_RESET_MASK 0x2000000
+#define COUNTER_RESET_SHIFT 19
+#define COUNTER_RESET_MASK 0x80000
static inline css_error set_counter_reset(css_computed_style *style, uint8_t
type, css_computed_counter *counter_arr)
{
- uint32_t *bits;
-
- bits = &style->i.bits[COUNTER_RESET_INDEX];
+ uint32_t *bits = &style->i.bits[COUNTER_RESET_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~COUNTER_RESET_MASK) | (((uint32_t)type & 0x1) <<
@@ -1060,9 +980,7 @@ static inline css_error set_counter_reset(css_computed_style *style, uint8_t
static inline css_error set_cursor(css_computed_style *style, uint8_t type,
lwc_string **string_arr)
{
- uint32_t *bits;
-
- bits = &style->i.bits[CURSOR_INDEX];
+ uint32_t *bits = &style->i.bits[CURSOR_INDEX];
/* 5bits: ttttt : type */
*bits = (*bits & ~CURSOR_MASK) | (((uint32_t)type & 0x1f) <<
@@ -1091,15 +1009,13 @@ static inline css_error set_cursor(css_computed_style *style, uint8_t type,
#undef CURSOR_SHIFT
#undef CURSOR_MASK
-#define DIRECTION_INDEX 14
-#define DIRECTION_SHIFT 28
-#define DIRECTION_MASK 0x30000000
+#define DIRECTION_INDEX 11
+#define DIRECTION_SHIFT 24
+#define DIRECTION_MASK 0x3000000
static inline css_error set_direction(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[DIRECTION_INDEX];
+ uint32_t *bits = &style->i.bits[DIRECTION_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~DIRECTION_MASK) | (((uint32_t)type & 0x3) <<
@@ -1111,15 +1027,13 @@ static inline css_error set_direction(css_computed_style *style, uint8_t type)
#undef DIRECTION_SHIFT
#undef DIRECTION_MASK
-#define DISPLAY_INDEX 3
-#define DISPLAY_SHIFT 0
-#define DISPLAY_MASK 0x1f
+#define DISPLAY_INDEX 8
+#define DISPLAY_SHIFT 3
+#define DISPLAY_MASK 0xf8
static inline css_error set_display(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[DISPLAY_INDEX];
+ uint32_t *bits = &style->i.bits[DISPLAY_INDEX];
/* 5bits: ttttt : type */
*bits = (*bits & ~DISPLAY_MASK) | (((uint32_t)type & 0x1f) <<
@@ -1131,15 +1045,13 @@ static inline css_error set_display(css_computed_style *style, uint8_t type)
#undef DISPLAY_SHIFT
#undef DISPLAY_MASK
-#define EMPTY_CELLS_INDEX 10
-#define EMPTY_CELLS_SHIFT 4
-#define EMPTY_CELLS_MASK 0x30
+#define EMPTY_CELLS_INDEX 11
+#define EMPTY_CELLS_SHIFT 26
+#define EMPTY_CELLS_MASK 0xc000000
static inline css_error set_empty_cells(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[EMPTY_CELLS_INDEX];
+ uint32_t *bits = &style->i.bits[EMPTY_CELLS_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~EMPTY_CELLS_MASK) | (((uint32_t)type & 0x3) <<
@@ -1151,16 +1063,35 @@ static inline css_error set_empty_cells(css_computed_style *style, uint8_t type)
#undef EMPTY_CELLS_SHIFT
#undef EMPTY_CELLS_MASK
-#define FLEX_BASIS_INDEX 4
-#define FLEX_BASIS_SHIFT 25
-#define FLEX_BASIS_MASK 0xfe000000
+#define FILL_OPACITY_INDEX 14
+#define FILL_OPACITY_SHIFT 20
+#define FILL_OPACITY_MASK 0x100000
+
+static inline css_error set_fill_opacity(css_computed_style *style, uint8_t
+ type, css_fixed fixed)
+{
+ uint32_t *bits = &style->i.bits[FILL_OPACITY_INDEX];
+
+ /* 1bit: t : type */
+ *bits = (*bits & ~FILL_OPACITY_MASK) | (((uint32_t)type & 0x1) <<
+ FILL_OPACITY_SHIFT);
+
+ style->i.fill_opacity = fixed;
+
+ return CSS_OK;
+}
+#undef FILL_OPACITY_INDEX
+#undef FILL_OPACITY_SHIFT
+#undef FILL_OPACITY_MASK
+
+#define FLEX_BASIS_INDEX 7
+#define FLEX_BASIS_SHIFT 4
+#define FLEX_BASIS_MASK 0x7f0
static inline css_error set_flex_basis(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLEX_BASIS_INDEX];
+ uint32_t *bits = &style->i.bits[FLEX_BASIS_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~FLEX_BASIS_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1175,15 +1106,13 @@ static inline css_error set_flex_basis(css_computed_style *style, uint8_t type,
#undef FLEX_BASIS_MASK
#define FLEX_DIRECTION_INDEX 13
-#define FLEX_DIRECTION_SHIFT 1
-#define FLEX_DIRECTION_MASK 0xe
+#define FLEX_DIRECTION_SHIFT 4
+#define FLEX_DIRECTION_MASK 0x70
static inline css_error set_flex_direction(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLEX_DIRECTION_INDEX];
+ uint32_t *bits = &style->i.bits[FLEX_DIRECTION_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~FLEX_DIRECTION_MASK) | (((uint32_t)type & 0x7) <<
@@ -1195,16 +1124,14 @@ static inline css_error set_flex_direction(css_computed_style *style, uint8_t
#undef FLEX_DIRECTION_SHIFT
#undef FLEX_DIRECTION_MASK
-#define FLEX_GROW_INDEX 12
-#define FLEX_GROW_SHIFT 0
-#define FLEX_GROW_MASK 0x1
+#define FLEX_GROW_INDEX 14
+#define FLEX_GROW_SHIFT 21
+#define FLEX_GROW_MASK 0x200000
static inline css_error set_flex_grow(css_computed_style *style, uint8_t type,
css_fixed fixed)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLEX_GROW_INDEX];
+ uint32_t *bits = &style->i.bits[FLEX_GROW_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~FLEX_GROW_MASK) | (((uint32_t)type & 0x1) <<
@@ -1225,9 +1152,7 @@ static inline css_error set_flex_grow(css_computed_style *style, uint8_t type,
static inline css_error set_flex_shrink(css_computed_style *style, uint8_t
type, css_fixed fixed)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLEX_SHRINK_INDEX];
+ uint32_t *bits = &style->i.bits[FLEX_SHRINK_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~FLEX_SHRINK_MASK) | (((uint32_t)type & 0x1) <<
@@ -1241,15 +1166,13 @@ static inline css_error set_flex_shrink(css_computed_style *style, uint8_t
#undef FLEX_SHRINK_SHIFT
#undef FLEX_SHRINK_MASK
-#define FLEX_WRAP_INDEX 10
-#define FLEX_WRAP_SHIFT 6
-#define FLEX_WRAP_MASK 0xc0
+#define FLEX_WRAP_INDEX 11
+#define FLEX_WRAP_SHIFT 28
+#define FLEX_WRAP_MASK 0x30000000
static inline css_error set_flex_wrap(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLEX_WRAP_INDEX];
+ uint32_t *bits = &style->i.bits[FLEX_WRAP_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~FLEX_WRAP_MASK) | (((uint32_t)type & 0x3) <<
@@ -1267,9 +1190,7 @@ static inline css_error set_flex_wrap(css_computed_style *style, uint8_t type)
static inline css_error set_float(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FLOAT_INDEX];
+ uint32_t *bits = &style->i.bits[FLOAT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~FLOAT_MASK) | (((uint32_t)type & 0x3) << FLOAT_SHIFT);
@@ -1280,16 +1201,14 @@ static inline css_error set_float(css_computed_style *style, uint8_t type)
#undef FLOAT_SHIFT
#undef FLOAT_MASK
-#define FONT_FAMILY_INDEX 9
-#define FONT_FAMILY_SHIFT 0
-#define FONT_FAMILY_MASK 0x7
+#define FONT_FAMILY_INDEX 13
+#define FONT_FAMILY_SHIFT 7
+#define FONT_FAMILY_MASK 0x380
static inline css_error set_font_family(css_computed_style *style, uint8_t
type, lwc_string **string_arr)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FONT_FAMILY_INDEX];
+ uint32_t *bits = &style->i.bits[FONT_FAMILY_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~FONT_FAMILY_MASK) | (((uint32_t)type & 0x7) <<
@@ -1318,16 +1237,14 @@ static inline css_error set_font_family(css_computed_style *style, uint8_t
#undef FONT_FAMILY_SHIFT
#undef FONT_FAMILY_MASK
-#define FONT_SIZE_INDEX 12
-#define FONT_SIZE_SHIFT 1
-#define FONT_SIZE_MASK 0x3fe
+#define FONT_SIZE_INDEX 1
+#define FONT_SIZE_SHIFT 23
+#define FONT_SIZE_MASK 0xff800000
static inline css_error set_font_size(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FONT_SIZE_INDEX];
+ uint32_t *bits = &style->i.bits[FONT_SIZE_INDEX];
/* 9bits: uuuuutttt : unit | type */
*bits = (*bits & ~FONT_SIZE_MASK) | ((((uint32_t)type & 0xf) | (unit <<
@@ -1341,15 +1258,13 @@ static inline css_error set_font_size(css_computed_style *style, uint8_t type,
#undef FONT_SIZE_SHIFT
#undef FONT_SIZE_MASK
-#define FONT_STYLE_INDEX 11
-#define FONT_STYLE_SHIFT 20
-#define FONT_STYLE_MASK 0x300000
+#define FONT_STYLE_INDEX 10
+#define FONT_STYLE_SHIFT 0
+#define FONT_STYLE_MASK 0x3
static inline css_error set_font_style(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FONT_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[FONT_STYLE_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~FONT_STYLE_MASK) | (((uint32_t)type & 0x3) <<
@@ -1361,16 +1276,14 @@ static inline css_error set_font_style(css_computed_style *style, uint8_t type)
#undef FONT_STYLE_SHIFT
#undef FONT_STYLE_MASK
-#define FONT_VARIANT_INDEX 11
-#define FONT_VARIANT_SHIFT 28
-#define FONT_VARIANT_MASK 0x30000000
+#define FONT_VARIANT_INDEX 10
+#define FONT_VARIANT_SHIFT 2
+#define FONT_VARIANT_MASK 0xc
static inline css_error set_font_variant(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FONT_VARIANT_INDEX];
+ uint32_t *bits = &style->i.bits[FONT_VARIANT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~FONT_VARIANT_MASK) | (((uint32_t)type & 0x3) <<
@@ -1382,15 +1295,13 @@ static inline css_error set_font_variant(css_computed_style *style, uint8_t
#undef FONT_VARIANT_SHIFT
#undef FONT_VARIANT_MASK
-#define FONT_WEIGHT_INDEX 9
-#define FONT_WEIGHT_SHIFT 15
-#define FONT_WEIGHT_MASK 0x78000
+#define FONT_WEIGHT_INDEX 6
+#define FONT_WEIGHT_SHIFT 0
+#define FONT_WEIGHT_MASK 0xf
static inline css_error set_font_weight(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[FONT_WEIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[FONT_WEIGHT_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~FONT_WEIGHT_MASK) | (((uint32_t)type & 0xf) <<
@@ -1402,16 +1313,14 @@ static inline css_error set_font_weight(css_computed_style *style, uint8_t type)
#undef FONT_WEIGHT_SHIFT
#undef FONT_WEIGHT_MASK
-#define HEIGHT_INDEX 6
-#define HEIGHT_SHIFT 25
-#define HEIGHT_MASK 0xfe000000
+#define HEIGHT_INDEX 7
+#define HEIGHT_SHIFT 11
+#define HEIGHT_MASK 0x3f800
static inline css_error set_height(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[HEIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[HEIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~HEIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit <<
@@ -1426,15 +1335,13 @@ static inline css_error set_height(css_computed_style *style, uint8_t type,
#undef HEIGHT_MASK
#define JUSTIFY_CONTENT_INDEX 13
-#define JUSTIFY_CONTENT_SHIFT 4
-#define JUSTIFY_CONTENT_MASK 0x70
+#define JUSTIFY_CONTENT_SHIFT 10
+#define JUSTIFY_CONTENT_MASK 0x1c00
static inline css_error set_justify_content(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[JUSTIFY_CONTENT_INDEX];
+ uint32_t *bits = &style->i.bits[JUSTIFY_CONTENT_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~JUSTIFY_CONTENT_MASK) | (((uint32_t)type & 0x7) <<
@@ -1446,16 +1353,14 @@ static inline css_error set_justify_content(css_computed_style *style, uint8_t
#undef JUSTIFY_CONTENT_SHIFT
#undef JUSTIFY_CONTENT_MASK
-#define LEFT_INDEX 4
-#define LEFT_SHIFT 4
-#define LEFT_MASK 0x7f0
+#define LEFT_INDEX 7
+#define LEFT_SHIFT 18
+#define LEFT_MASK 0x1fc0000
static inline css_error set_left(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LEFT_INDEX];
+ uint32_t *bits = &style->i.bits[LEFT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~LEFT_MASK) | ((((uint32_t)type & 0x3) | (unit << 2))
@@ -1469,16 +1374,14 @@ static inline css_error set_left(css_computed_style *style, uint8_t type,
#undef LEFT_SHIFT
#undef LEFT_MASK
-#define LETTER_SPACING_INDEX 6
-#define LETTER_SPACING_SHIFT 18
-#define LETTER_SPACING_MASK 0x1fc0000
+#define LETTER_SPACING_INDEX 7
+#define LETTER_SPACING_SHIFT 25
+#define LETTER_SPACING_MASK 0xfe000000
static inline css_error set_letter_spacing(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LETTER_SPACING_INDEX];
+ uint32_t *bits = &style->i.bits[LETTER_SPACING_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~LETTER_SPACING_MASK) | ((((uint32_t)type & 0x3) | (
@@ -1492,16 +1395,14 @@ static inline css_error set_letter_spacing(css_computed_style *style, uint8_t
#undef LETTER_SPACING_SHIFT
#undef LETTER_SPACING_MASK
-#define LINE_HEIGHT_INDEX 5
-#define LINE_HEIGHT_SHIFT 11
-#define LINE_HEIGHT_MASK 0x3f800
+#define LINE_HEIGHT_INDEX 6
+#define LINE_HEIGHT_SHIFT 4
+#define LINE_HEIGHT_MASK 0x7f0
static inline css_error set_line_height(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LINE_HEIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[LINE_HEIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~LINE_HEIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1516,15 +1417,13 @@ static inline css_error set_line_height(css_computed_style *style, uint8_t
#undef LINE_HEIGHT_MASK
#define LIST_STYLE_IMAGE_INDEX 14
-#define LIST_STYLE_IMAGE_SHIFT 27
-#define LIST_STYLE_IMAGE_MASK 0x8000000
+#define LIST_STYLE_IMAGE_SHIFT 23
+#define LIST_STYLE_IMAGE_MASK 0x800000
static inline css_error set_list_style_image(css_computed_style *style, uint8_t
type, lwc_string *string)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LIST_STYLE_IMAGE_INDEX];
+ uint32_t *bits = &style->i.bits[LIST_STYLE_IMAGE_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~LIST_STYLE_IMAGE_MASK) | (((uint32_t)type & 0x1) <<
@@ -1547,16 +1446,14 @@ static inline css_error set_list_style_image(css_computed_style *style, uint8_t
#undef LIST_STYLE_IMAGE_SHIFT
#undef LIST_STYLE_IMAGE_MASK
-#define LIST_STYLE_POSITION_INDEX 11
-#define LIST_STYLE_POSITION_SHIFT 6
-#define LIST_STYLE_POSITION_MASK 0xc0
+#define LIST_STYLE_POSITION_INDEX 10
+#define LIST_STYLE_POSITION_SHIFT 4
+#define LIST_STYLE_POSITION_MASK 0x30
static inline css_error set_list_style_position(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LIST_STYLE_POSITION_INDEX];
+ uint32_t *bits = &style->i.bits[LIST_STYLE_POSITION_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~LIST_STYLE_POSITION_MASK) | (((uint32_t)type & 0x3)
@@ -1569,15 +1466,13 @@ static inline css_error set_list_style_position(css_computed_style *style,
#undef LIST_STYLE_POSITION_MASK
#define LIST_STYLE_TYPE_INDEX 8
-#define LIST_STYLE_TYPE_SHIFT 26
-#define LIST_STYLE_TYPE_MASK 0xfc000000
+#define LIST_STYLE_TYPE_SHIFT 8
+#define LIST_STYLE_TYPE_MASK 0x3f00
static inline css_error set_list_style_type(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[LIST_STYLE_TYPE_INDEX];
+ uint32_t *bits = &style->i.bits[LIST_STYLE_TYPE_INDEX];
/* 6bits: tttttt : type */
*bits = (*bits & ~LIST_STYLE_TYPE_MASK) | (((uint32_t)type & 0x3f) <<
@@ -1589,16 +1484,14 @@ static inline css_error set_list_style_type(css_computed_style *style, uint8_t
#undef LIST_STYLE_TYPE_SHIFT
#undef LIST_STYLE_TYPE_MASK
-#define MARGIN_BOTTOM_INDEX 5
-#define MARGIN_BOTTOM_SHIFT 18
-#define MARGIN_BOTTOM_MASK 0x1fc0000
+#define MARGIN_BOTTOM_INDEX 6
+#define MARGIN_BOTTOM_SHIFT 11
+#define MARGIN_BOTTOM_MASK 0x3f800
static inline css_error set_margin_bottom(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MARGIN_BOTTOM_INDEX];
+ uint32_t *bits = &style->i.bits[MARGIN_BOTTOM_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MARGIN_BOTTOM_MASK) | ((((uint32_t)type & 0x3) | (
@@ -1612,16 +1505,14 @@ static inline css_error set_margin_bottom(css_computed_style *style, uint8_t
#undef MARGIN_BOTTOM_SHIFT
#undef MARGIN_BOTTOM_MASK
-#define MARGIN_LEFT_INDEX 7
+#define MARGIN_LEFT_INDEX 6
#define MARGIN_LEFT_SHIFT 18
#define MARGIN_LEFT_MASK 0x1fc0000
static inline css_error set_margin_left(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MARGIN_LEFT_INDEX];
+ uint32_t *bits = &style->i.bits[MARGIN_LEFT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MARGIN_LEFT_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1636,15 +1527,13 @@ static inline css_error set_margin_left(css_computed_style *style, uint8_t
#undef MARGIN_LEFT_MASK
#define MARGIN_RIGHT_INDEX 6
-#define MARGIN_RIGHT_SHIFT 4
-#define MARGIN_RIGHT_MASK 0x7f0
+#define MARGIN_RIGHT_SHIFT 25
+#define MARGIN_RIGHT_MASK 0xfe000000
static inline css_error set_margin_right(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MARGIN_RIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[MARGIN_RIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MARGIN_RIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1658,16 +1547,14 @@ static inline css_error set_margin_right(css_computed_style *style, uint8_t
#undef MARGIN_RIGHT_SHIFT
#undef MARGIN_RIGHT_MASK
-#define MARGIN_TOP_INDEX 1
-#define MARGIN_TOP_SHIFT 0
-#define MARGIN_TOP_MASK 0x7f
+#define MARGIN_TOP_INDEX 5
+#define MARGIN_TOP_SHIFT 4
+#define MARGIN_TOP_MASK 0x7f0
static inline css_error set_margin_top(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MARGIN_TOP_INDEX];
+ uint32_t *bits = &style->i.bits[MARGIN_TOP_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MARGIN_TOP_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1681,16 +1568,14 @@ static inline css_error set_margin_top(css_computed_style *style, uint8_t type,
#undef MARGIN_TOP_SHIFT
#undef MARGIN_TOP_MASK
-#define MAX_HEIGHT_INDEX 3
-#define MAX_HEIGHT_SHIFT 25
-#define MAX_HEIGHT_MASK 0xfe000000
+#define MAX_HEIGHT_INDEX 5
+#define MAX_HEIGHT_SHIFT 11
+#define MAX_HEIGHT_MASK 0x3f800
static inline css_error set_max_height(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MAX_HEIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[MAX_HEIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MAX_HEIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1704,16 +1589,14 @@ static inline css_error set_max_height(css_computed_style *style, uint8_t type,
#undef MAX_HEIGHT_SHIFT
#undef MAX_HEIGHT_MASK
-#define MAX_WIDTH_INDEX 7
-#define MAX_WIDTH_SHIFT 4
-#define MAX_WIDTH_MASK 0x7f0
+#define MAX_WIDTH_INDEX 5
+#define MAX_WIDTH_SHIFT 18
+#define MAX_WIDTH_MASK 0x1fc0000
static inline css_error set_max_width(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MAX_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[MAX_WIDTH_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MAX_WIDTH_MASK) | ((((uint32_t)type & 0x3) | (unit <<
@@ -1727,16 +1610,14 @@ static inline css_error set_max_width(css_computed_style *style, uint8_t type,
#undef MAX_WIDTH_SHIFT
#undef MAX_WIDTH_MASK
-#define MIN_HEIGHT_INDEX 4
-#define MIN_HEIGHT_SHIFT 18
-#define MIN_HEIGHT_MASK 0x1fc0000
+#define MIN_HEIGHT_INDEX 5
+#define MIN_HEIGHT_SHIFT 25
+#define MIN_HEIGHT_MASK 0xfe000000
static inline css_error set_min_height(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MIN_HEIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[MIN_HEIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MIN_HEIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -1750,16 +1631,14 @@ static inline css_error set_min_height(css_computed_style *style, uint8_t type,
#undef MIN_HEIGHT_SHIFT
#undef MIN_HEIGHT_MASK
-#define MIN_WIDTH_INDEX 6
-#define MIN_WIDTH_SHIFT 11
-#define MIN_WIDTH_MASK 0x3f800
+#define MIN_WIDTH_INDEX 4
+#define MIN_WIDTH_SHIFT 4
+#define MIN_WIDTH_MASK 0x7f0
static inline css_error set_min_width(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[MIN_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[MIN_WIDTH_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~MIN_WIDTH_MASK) | ((((uint32_t)type & 0x3) | (unit <<
@@ -1774,15 +1653,13 @@ static inline css_error set_min_width(css_computed_style *style, uint8_t type,
#undef MIN_WIDTH_MASK
#define OPACITY_INDEX 14
-#define OPACITY_SHIFT 19
-#define OPACITY_MASK 0x80000
+#define OPACITY_SHIFT 24
+#define OPACITY_MASK 0x1000000
static inline css_error set_opacity(css_computed_style *style, uint8_t type,
css_fixed fixed)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OPACITY_INDEX];
+ uint32_t *bits = &style->i.bits[OPACITY_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~OPACITY_MASK) | (((uint32_t)type & 0x1) <<
@@ -1796,16 +1673,14 @@ static inline css_error set_opacity(css_computed_style *style, uint8_t type,
#undef OPACITY_SHIFT
#undef OPACITY_MASK
-#define ORDER_INDEX 13
-#define ORDER_SHIFT 0
-#define ORDER_MASK 0x1
+#define ORDER_INDEX 14
+#define ORDER_SHIFT 25
+#define ORDER_MASK 0x2000000
static inline css_error set_order(css_computed_style *style, uint8_t type,
int32_t integer)
{
- uint32_t *bits;
-
- bits = &style->i.bits[ORDER_INDEX];
+ uint32_t *bits = &style->i.bits[ORDER_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~ORDER_MASK) | (((uint32_t)type & 0x1) << ORDER_SHIFT);
@@ -1819,15 +1694,13 @@ static inline css_error set_order(css_computed_style *style, uint8_t type,
#undef ORDER_MASK
#define ORPHANS_INDEX 14
-#define ORPHANS_SHIFT 24
-#define ORPHANS_MASK 0x1000000
+#define ORPHANS_SHIFT 26
+#define ORPHANS_MASK 0x4000000
static inline css_error set_orphans(css_computed_style *style, uint8_t type,
int32_t integer)
{
- uint32_t *bits;
-
- bits = &style->i.bits[ORPHANS_INDEX];
+ uint32_t *bits = &style->i.bits[ORPHANS_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~ORPHANS_MASK) | (((uint32_t)type & 0x1) <<
@@ -1841,16 +1714,14 @@ static inline css_error set_orphans(css_computed_style *style, uint8_t type,
#undef ORPHANS_SHIFT
#undef ORPHANS_MASK
-#define OUTLINE_COLOR_INDEX 11
-#define OUTLINE_COLOR_SHIFT 10
-#define OUTLINE_COLOR_MASK 0xc00
+#define OUTLINE_COLOR_INDEX 10
+#define OUTLINE_COLOR_SHIFT 6
+#define OUTLINE_COLOR_MASK 0xc0
static inline css_error set_outline_color(css_computed_style *style, uint8_t
type, css_color color)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OUTLINE_COLOR_INDEX];
+ uint32_t *bits = &style->i.bits[OUTLINE_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~OUTLINE_COLOR_MASK) | (((uint32_t)type & 0x3) <<
@@ -1864,16 +1735,14 @@ static inline css_error set_outline_color(css_computed_style *style, uint8_t
#undef OUTLINE_COLOR_SHIFT
#undef OUTLINE_COLOR_MASK
-#define OUTLINE_STYLE_INDEX 9
-#define OUTLINE_STYLE_SHIFT 7
-#define OUTLINE_STYLE_MASK 0x780
+#define OUTLINE_STYLE_INDEX 5
+#define OUTLINE_STYLE_SHIFT 0
+#define OUTLINE_STYLE_MASK 0xf
static inline css_error set_outline_style(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OUTLINE_STYLE_INDEX];
+ uint32_t *bits = &style->i.bits[OUTLINE_STYLE_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~OUTLINE_STYLE_MASK) | (((uint32_t)type & 0xf) <<
@@ -1892,9 +1761,7 @@ static inline css_error set_outline_style(css_computed_style *style, uint8_t
static inline css_error set_outline_width(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OUTLINE_WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[OUTLINE_WIDTH_INDEX];
/* 8bits: uuuuuttt : unit | type */
*bits = (*bits & ~OUTLINE_WIDTH_MASK) | ((((uint32_t)type & 0x7) | (
@@ -1909,14 +1776,12 @@ static inline css_error set_outline_width(css_computed_style *style, uint8_t
#undef OUTLINE_WIDTH_MASK
#define OVERFLOW_X_INDEX 13
-#define OVERFLOW_X_SHIFT 16
-#define OVERFLOW_X_MASK 0x70000
+#define OVERFLOW_X_SHIFT 13
+#define OVERFLOW_X_MASK 0xe000
static inline css_error set_overflow_x(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OVERFLOW_X_INDEX];
+ uint32_t *bits = &style->i.bits[OVERFLOW_X_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~OVERFLOW_X_MASK) | (((uint32_t)type & 0x7) <<
@@ -1929,14 +1794,12 @@ static inline css_error set_overflow_x(css_computed_style *style, uint8_t type)
#undef OVERFLOW_X_MASK
#define OVERFLOW_Y_INDEX 13
-#define OVERFLOW_Y_SHIFT 25
-#define OVERFLOW_Y_MASK 0xe000000
+#define OVERFLOW_Y_SHIFT 16
+#define OVERFLOW_Y_MASK 0x70000
static inline css_error set_overflow_y(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[OVERFLOW_Y_INDEX];
+ uint32_t *bits = &style->i.bits[OVERFLOW_Y_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~OVERFLOW_Y_MASK) | (((uint32_t)type & 0x7) <<
@@ -1949,15 +1812,13 @@ static inline css_error set_overflow_y(css_computed_style *style, uint8_t type)
#undef OVERFLOW_Y_MASK
#define PADDING_BOTTOM_INDEX 8
-#define PADDING_BOTTOM_SHIFT 8
-#define PADDING_BOTTOM_MASK 0x3f00
+#define PADDING_BOTTOM_SHIFT 14
+#define PADDING_BOTTOM_MASK 0xfc000
static inline css_error set_padding_bottom(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PADDING_BOTTOM_INDEX];
+ uint32_t *bits = &style->i.bits[PADDING_BOTTOM_INDEX];
/* 6bits: uuuuut : unit | type */
*bits = (*bits & ~PADDING_BOTTOM_MASK) | ((((uint32_t)type & 0x1) | (
@@ -1971,16 +1832,14 @@ static inline css_error set_padding_bottom(css_computed_style *style, uint8_t
#undef PADDING_BOTTOM_SHIFT
#undef PADDING_BOTTOM_MASK
-#define PADDING_LEFT_INDEX 2
-#define PADDING_LEFT_SHIFT 0
-#define PADDING_LEFT_MASK 0x3f
+#define PADDING_LEFT_INDEX 8
+#define PADDING_LEFT_SHIFT 20
+#define PADDING_LEFT_MASK 0x3f00000
static inline css_error set_padding_left(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PADDING_LEFT_INDEX];
+ uint32_t *bits = &style->i.bits[PADDING_LEFT_INDEX];
/* 6bits: uuuuut : unit | type */
*bits = (*bits & ~PADDING_LEFT_MASK) | ((((uint32_t)type & 0x1) | (unit
@@ -1995,15 +1854,13 @@ static inline css_error set_padding_left(css_computed_style *style, uint8_t
#undef PADDING_LEFT_MASK
#define PADDING_RIGHT_INDEX 8
-#define PADDING_RIGHT_SHIFT 14
-#define PADDING_RIGHT_MASK 0xfc000
+#define PADDING_RIGHT_SHIFT 26
+#define PADDING_RIGHT_MASK 0xfc000000
static inline css_error set_padding_right(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PADDING_RIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[PADDING_RIGHT_INDEX];
/* 6bits: uuuuut : unit | type */
*bits = (*bits & ~PADDING_RIGHT_MASK) | ((((uint32_t)type & 0x1) | (
@@ -2017,16 +1874,14 @@ static inline css_error set_padding_right(css_computed_style *style, uint8_t
#undef PADDING_RIGHT_SHIFT
#undef PADDING_RIGHT_MASK
-#define PADDING_TOP_INDEX 8
-#define PADDING_TOP_SHIFT 20
-#define PADDING_TOP_MASK 0x3f00000
+#define PADDING_TOP_INDEX 3
+#define PADDING_TOP_SHIFT 5
+#define PADDING_TOP_MASK 0x7e0
static inline css_error set_padding_top(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PADDING_TOP_INDEX];
+ uint32_t *bits = &style->i.bits[PADDING_TOP_INDEX];
/* 6bits: uuuuut : unit | type */
*bits = (*bits & ~PADDING_TOP_MASK) | ((((uint32_t)type & 0x1) | (unit
@@ -2040,16 +1895,14 @@ static inline css_error set_padding_top(css_computed_style *style, uint8_t
#undef PADDING_TOP_SHIFT
#undef PADDING_TOP_MASK
-#define PAGE_BREAK_AFTER_INDEX 8
-#define PAGE_BREAK_AFTER_SHIFT 0
-#define PAGE_BREAK_AFTER_MASK 0x7
+#define PAGE_BREAK_AFTER_INDEX 13
+#define PAGE_BREAK_AFTER_SHIFT 19
+#define PAGE_BREAK_AFTER_MASK 0x380000
static inline css_error set_page_break_after(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PAGE_BREAK_AFTER_INDEX];
+ uint32_t *bits = &style->i.bits[PAGE_BREAK_AFTER_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~PAGE_BREAK_AFTER_MASK) | (((uint32_t)type & 0x7) <<
@@ -2062,15 +1915,13 @@ static inline css_error set_page_break_after(css_computed_style *style, uint8_t
#undef PAGE_BREAK_AFTER_MASK
#define PAGE_BREAK_BEFORE_INDEX 13
-#define PAGE_BREAK_BEFORE_SHIFT 7
-#define PAGE_BREAK_BEFORE_MASK 0x380
+#define PAGE_BREAK_BEFORE_SHIFT 22
+#define PAGE_BREAK_BEFORE_MASK 0x1c00000
static inline css_error set_page_break_before(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PAGE_BREAK_BEFORE_INDEX];
+ uint32_t *bits = &style->i.bits[PAGE_BREAK_BEFORE_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~PAGE_BREAK_BEFORE_MASK) | (((uint32_t)type & 0x7) <<
@@ -2082,16 +1933,14 @@ static inline css_error set_page_break_before(css_computed_style *style,
#undef PAGE_BREAK_BEFORE_SHIFT
#undef PAGE_BREAK_BEFORE_MASK
-#define PAGE_BREAK_INSIDE_INDEX 11
-#define PAGE_BREAK_INSIDE_SHIFT 24
-#define PAGE_BREAK_INSIDE_MASK 0x3000000
+#define PAGE_BREAK_INSIDE_INDEX 10
+#define PAGE_BREAK_INSIDE_SHIFT 8
+#define PAGE_BREAK_INSIDE_MASK 0x300
static inline css_error set_page_break_inside(css_computed_style *style,
uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[PAGE_BREAK_INSIDE_INDEX];
+ uint32_t *bits = &style->i.bits[PAGE_BREAK_INSIDE_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~PAGE_BREAK_INSIDE_MASK) | (((uint32_t)type & 0x3) <<
@@ -2103,15 +1952,13 @@ static inline css_error set_page_break_inside(css_computed_style *style,
#undef PAGE_BREAK_INSIDE_SHIFT
#undef PAGE_BREAK_INSIDE_MASK
-#define POSITION_INDEX 10
-#define POSITION_SHIFT 20
-#define POSITION_MASK 0x700000
+#define POSITION_INDEX 13
+#define POSITION_SHIFT 25
+#define POSITION_MASK 0xe000000
static inline css_error set_position(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[POSITION_INDEX];
+ uint32_t *bits = &style->i.bits[POSITION_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~POSITION_MASK) | (((uint32_t)type & 0x7) <<
@@ -2124,15 +1971,13 @@ static inline css_error set_position(css_computed_style *style, uint8_t type)
#undef POSITION_MASK
#define QUOTES_INDEX 14
-#define QUOTES_SHIFT 21
-#define QUOTES_MASK 0x200000
+#define QUOTES_SHIFT 27
+#define QUOTES_MASK 0x8000000
static inline css_error set_quotes(css_computed_style *style, uint8_t type,
lwc_string **string_arr)
{
- uint32_t *bits;
-
- bits = &style->i.bits[QUOTES_INDEX];
+ uint32_t *bits = &style->i.bits[QUOTES_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~QUOTES_MASK) | (((uint32_t)type & 0x1) <<
@@ -2161,16 +2006,14 @@ static inline css_error set_quotes(css_computed_style *style, uint8_t type,
#undef QUOTES_SHIFT
#undef QUOTES_MASK
-#define RIGHT_INDEX 3
-#define RIGHT_SHIFT 18
-#define RIGHT_MASK 0x1fc0000
+#define RIGHT_INDEX 4
+#define RIGHT_SHIFT 11
+#define RIGHT_MASK 0x3f800
static inline css_error set_right(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[RIGHT_INDEX];
+ uint32_t *bits = &style->i.bits[RIGHT_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~RIGHT_MASK) | ((((uint32_t)type & 0x3) | (unit << 2))
@@ -2184,16 +2027,35 @@ static inline css_error set_right(css_computed_style *style, uint8_t type,
#undef RIGHT_SHIFT
#undef RIGHT_MASK
+#define STROKE_OPACITY_INDEX 13
+#define STROKE_OPACITY_SHIFT 0
+#define STROKE_OPACITY_MASK 0x1
+
+static inline css_error set_stroke_opacity(css_computed_style *style, uint8_t
+ type, css_fixed fixed)
+{
+ uint32_t *bits = &style->i.bits[STROKE_OPACITY_INDEX];
+
+ /* 1bit: t : type */
+ *bits = (*bits & ~STROKE_OPACITY_MASK) | (((uint32_t)type & 0x1) <<
+ STROKE_OPACITY_SHIFT);
+
+ style->i.stroke_opacity = fixed;
+
+ return CSS_OK;
+}
+#undef STROKE_OPACITY_INDEX
+#undef STROKE_OPACITY_SHIFT
+#undef STROKE_OPACITY_MASK
+
#define TABLE_LAYOUT_INDEX 10
-#define TABLE_LAYOUT_SHIFT 14
-#define TABLE_LAYOUT_MASK 0xc000
+#define TABLE_LAYOUT_SHIFT 10
+#define TABLE_LAYOUT_MASK 0xc00
static inline css_error set_table_layout(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TABLE_LAYOUT_INDEX];
+ uint32_t *bits = &style->i.bits[TABLE_LAYOUT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~TABLE_LAYOUT_MASK) | (((uint32_t)type & 0x3) <<
@@ -2211,9 +2073,7 @@ static inline css_error set_table_layout(css_computed_style *style, uint8_t
static inline css_error set_text_align(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TEXT_ALIGN_INDEX];
+ uint32_t *bits = &style->i.bits[TEXT_ALIGN_INDEX];
/* 4bits: tttt : type */
*bits = (*bits & ~TEXT_ALIGN_MASK) | (((uint32_t)type & 0xf) <<
@@ -2225,16 +2085,14 @@ static inline css_error set_text_align(css_computed_style *style, uint8_t type)
#undef TEXT_ALIGN_SHIFT
#undef TEXT_ALIGN_MASK
-#define TEXT_DECORATION_INDEX 8
-#define TEXT_DECORATION_SHIFT 3
-#define TEXT_DECORATION_MASK 0xf8
+#define TEXT_DECORATION_INDEX 3
+#define TEXT_DECORATION_SHIFT 0
+#define TEXT_DECORATION_MASK 0x1f
static inline css_error set_text_decoration(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TEXT_DECORATION_INDEX];
+ uint32_t *bits = &style->i.bits[TEXT_DECORATION_INDEX];
/* 5bits: ttttt : type */
*bits = (*bits & ~TEXT_DECORATION_MASK) | (((uint32_t)type & 0x1f) <<
@@ -2246,16 +2104,14 @@ static inline css_error set_text_decoration(css_computed_style *style, uint8_t
#undef TEXT_DECORATION_SHIFT
#undef TEXT_DECORATION_MASK
-#define TEXT_INDENT_INDEX 3
-#define TEXT_INDENT_SHIFT 5
-#define TEXT_INDENT_MASK 0x7e0
+#define TEXT_INDENT_INDEX 2
+#define TEXT_INDENT_SHIFT 0
+#define TEXT_INDENT_MASK 0x3f
static inline css_error set_text_indent(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TEXT_INDENT_INDEX];
+ uint32_t *bits = &style->i.bits[TEXT_INDENT_INDEX];
/* 6bits: uuuuut : unit | type */
*bits = (*bits & ~TEXT_INDENT_MASK) | ((((uint32_t)type & 0x1) | (unit
@@ -2269,16 +2125,14 @@ static inline css_error set_text_indent(css_computed_style *style, uint8_t
#undef TEXT_INDENT_SHIFT
#undef TEXT_INDENT_MASK
-#define TEXT_TRANSFORM_INDEX 13
-#define TEXT_TRANSFORM_SHIFT 13
-#define TEXT_TRANSFORM_MASK 0xe000
+#define TEXT_TRANSFORM_INDEX 9
+#define TEXT_TRANSFORM_SHIFT 0
+#define TEXT_TRANSFORM_MASK 0x7
static inline css_error set_text_transform(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TEXT_TRANSFORM_INDEX];
+ uint32_t *bits = &style->i.bits[TEXT_TRANSFORM_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~TEXT_TRANSFORM_MASK) | (((uint32_t)type & 0x7) <<
@@ -2290,16 +2144,14 @@ static inline css_error set_text_transform(css_computed_style *style, uint8_t
#undef TEXT_TRANSFORM_SHIFT
#undef TEXT_TRANSFORM_MASK
-#define TOP_INDEX 7
-#define TOP_SHIFT 25
-#define TOP_MASK 0xfe000000
+#define TOP_INDEX 4
+#define TOP_SHIFT 18
+#define TOP_MASK 0x1fc0000
static inline css_error set_top(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[TOP_INDEX];
+ uint32_t *bits = &style->i.bits[TOP_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~TOP_MASK) | ((((uint32_t)type & 0x3) | (unit << 2))
@@ -2313,16 +2165,14 @@ static inline css_error set_top(css_computed_style *style, uint8_t type,
#undef TOP_SHIFT
#undef TOP_MASK
-#define UNICODE_BIDI_INDEX 11
-#define UNICODE_BIDI_SHIFT 2
-#define UNICODE_BIDI_MASK 0xc
+#define UNICODE_BIDI_INDEX 10
+#define UNICODE_BIDI_SHIFT 12
+#define UNICODE_BIDI_MASK 0x3000
static inline css_error set_unicode_bidi(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[UNICODE_BIDI_INDEX];
+ uint32_t *bits = &style->i.bits[UNICODE_BIDI_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~UNICODE_BIDI_MASK) | (((uint32_t)type & 0x3) <<
@@ -2334,16 +2184,14 @@ static inline css_error set_unicode_bidi(css_computed_style *style, uint8_t
#undef UNICODE_BIDI_SHIFT
#undef UNICODE_BIDI_MASK
-#define VERTICAL_ALIGN_INDEX 1
-#define VERTICAL_ALIGN_SHIFT 23
-#define VERTICAL_ALIGN_MASK 0xff800000
+#define VERTICAL_ALIGN_INDEX 12
+#define VERTICAL_ALIGN_SHIFT 1
+#define VERTICAL_ALIGN_MASK 0x3fe
static inline css_error set_vertical_align(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[VERTICAL_ALIGN_INDEX];
+ uint32_t *bits = &style->i.bits[VERTICAL_ALIGN_INDEX];
/* 9bits: uuuuutttt : unit | type */
*bits = (*bits & ~VERTICAL_ALIGN_MASK) | ((((uint32_t)type & 0xf) | (
@@ -2357,15 +2205,13 @@ static inline css_error set_vertical_align(css_computed_style *style, uint8_t
#undef VERTICAL_ALIGN_SHIFT
#undef VERTICAL_ALIGN_MASK
-#define VISIBILITY_INDEX 11
-#define VISIBILITY_SHIFT 0
-#define VISIBILITY_MASK 0x3
+#define VISIBILITY_INDEX 10
+#define VISIBILITY_SHIFT 14
+#define VISIBILITY_MASK 0xc000
static inline css_error set_visibility(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[VISIBILITY_INDEX];
+ uint32_t *bits = &style->i.bits[VISIBILITY_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~VISIBILITY_MASK) | (((uint32_t)type & 0x3) <<
@@ -2377,15 +2223,13 @@ static inline css_error set_visibility(css_computed_style *style, uint8_t type)
#undef VISIBILITY_SHIFT
#undef VISIBILITY_MASK
-#define WHITE_SPACE_INDEX 13
-#define WHITE_SPACE_SHIFT 19
-#define WHITE_SPACE_MASK 0x380000
+#define WHITE_SPACE_INDEX 8
+#define WHITE_SPACE_SHIFT 0
+#define WHITE_SPACE_MASK 0x7
static inline css_error set_white_space(css_computed_style *style, uint8_t type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[WHITE_SPACE_INDEX];
+ uint32_t *bits = &style->i.bits[WHITE_SPACE_INDEX];
/* 3bits: ttt : type */
*bits = (*bits & ~WHITE_SPACE_MASK) | (((uint32_t)type & 0x7) <<
@@ -2397,16 +2241,14 @@ static inline css_error set_white_space(css_computed_style *style, uint8_t type)
#undef WHITE_SPACE_SHIFT
#undef WHITE_SPACE_MASK
-#define WIDOWS_INDEX 14
-#define WIDOWS_SHIFT 26
-#define WIDOWS_MASK 0x4000000
+#define WIDOWS_INDEX 12
+#define WIDOWS_SHIFT 0
+#define WIDOWS_MASK 0x1
static inline css_error set_widows(css_computed_style *style, uint8_t type,
int32_t integer)
{
- uint32_t *bits;
-
- bits = &style->i.bits[WIDOWS_INDEX];
+ uint32_t *bits = &style->i.bits[WIDOWS_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~WIDOWS_MASK) | (((uint32_t)type & 0x1) <<
@@ -2420,16 +2262,14 @@ static inline css_error set_widows(css_computed_style *style, uint8_t type,
#undef WIDOWS_SHIFT
#undef WIDOWS_MASK
-#define WIDTH_INDEX 3
-#define WIDTH_SHIFT 11
-#define WIDTH_MASK 0x3f800
+#define WIDTH_INDEX 4
+#define WIDTH_SHIFT 25
+#define WIDTH_MASK 0xfe000000
static inline css_error set_width(css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[WIDTH_INDEX];
+ uint32_t *bits = &style->i.bits[WIDTH_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~WIDTH_MASK) | ((((uint32_t)type & 0x3) | (unit << 2))
@@ -2443,16 +2283,14 @@ static inline css_error set_width(css_computed_style *style, uint8_t type,
#undef WIDTH_SHIFT
#undef WIDTH_MASK
-#define WORD_SPACING_INDEX 5
-#define WORD_SPACING_SHIFT 4
-#define WORD_SPACING_MASK 0x7f0
+#define WORD_SPACING_INDEX 1
+#define WORD_SPACING_SHIFT 0
+#define WORD_SPACING_MASK 0x7f
static inline css_error set_word_spacing(css_computed_style *style, uint8_t
type, css_fixed length, css_unit unit)
{
- uint32_t *bits;
-
- bits = &style->i.bits[WORD_SPACING_INDEX];
+ uint32_t *bits = &style->i.bits[WORD_SPACING_INDEX];
/* 7bits: uuuuutt : unit | type */
*bits = (*bits & ~WORD_SPACING_MASK) | ((((uint32_t)type & 0x3) | (unit
@@ -2466,16 +2304,14 @@ static inline css_error set_word_spacing(css_computed_style *style, uint8_t
#undef WORD_SPACING_SHIFT
#undef WORD_SPACING_MASK
-#define WRITING_MODE_INDEX 14
-#define WRITING_MODE_SHIFT 30
-#define WRITING_MODE_MASK 0xc0000000
+#define WRITING_MODE_INDEX 10
+#define WRITING_MODE_SHIFT 16
+#define WRITING_MODE_MASK 0x30000
static inline css_error set_writing_mode(css_computed_style *style, uint8_t
type)
{
- uint32_t *bits;
-
- bits = &style->i.bits[WRITING_MODE_INDEX];
+ uint32_t *bits = &style->i.bits[WRITING_MODE_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~WRITING_MODE_MASK) | (((uint32_t)type & 0x3) <<
@@ -2488,15 +2324,13 @@ static inline css_error set_writing_mode(css_computed_style *style, uint8_t
#undef WRITING_MODE_MASK
#define Z_INDEX_INDEX 10
-#define Z_INDEX_SHIFT 8
-#define Z_INDEX_MASK 0x300
+#define Z_INDEX_SHIFT 18
+#define Z_INDEX_MASK 0xc0000
static inline css_error set_z_index(css_computed_style *style, uint8_t type,
int32_t integer)
{
- uint32_t *bits;
-
- bits = &style->i.bits[Z_INDEX_INDEX];
+ uint32_t *bits = &style->i.bits[Z_INDEX_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~Z_INDEX_MASK) | (((uint32_t)type & 0x3) <<