summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/select/computed.c82
-rw-r--r--src/select/computed.h30
-rw-r--r--src/select/properties/border_spacing.c6
-rw-r--r--src/select/properties/clip.c6
-rw-r--r--src/select/properties/column_count.c6
-rw-r--r--src/select/properties/column_gap.c6
-rw-r--r--src/select/properties/column_width.c6
-rw-r--r--src/select/properties/content.c6
-rw-r--r--src/select/properties/counter_increment.c6
-rw-r--r--src/select/properties/counter_reset.c6
-rw-r--r--src/select/properties/cursor.c6
-rw-r--r--src/select/properties/letter_spacing.c6
-rw-r--r--src/select/properties/outline_color.c6
-rw-r--r--src/select/properties/outline_width.c6
-rw-r--r--src/select/properties/word_spacing.c6
-rw-r--r--src/select/propget.h354
-rw-r--r--src/select/propset.h402
-rw-r--r--src/select/select.c4
18 files changed, 496 insertions, 454 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index dc632f9..817da31 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -75,59 +75,61 @@ css_error css_computed_style_create(css_computed_style **result)
if (s == NULL)
return CSS_NOMEM;
+ s->bin = UINT32_MAX;
*result = s;
return CSS_OK;
}
/**
- * Destroy a computed style
+ * Destroy an uncommon computed style section
*
* \param style Style to destroy
* \return CSS_OK on success, appropriate error otherwise
*/
-css_error css_computed_style_destroy(css_computed_style *style)
+css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon)
{
- if (style == NULL)
+ if (uncommon == NULL)
return CSS_BADPARM;
- if (style->uncommon != NULL) {
- if (style->uncommon->counter_increment != NULL) {
+
+ if (uncommon != NULL) {
+ if (uncommon->counter_increment != NULL) {
css_computed_counter *c;
- for (c = style->uncommon->counter_increment;
+ for (c = uncommon->counter_increment;
c->name != NULL; c++) {
lwc_string_unref(c->name);
}
- free(style->uncommon->counter_increment);
+ free(uncommon->counter_increment);
}
- if (style->uncommon->counter_reset != NULL) {
+ if (uncommon->counter_reset != NULL) {
css_computed_counter *c;
- for (c = style->uncommon->counter_reset;
+ for (c = uncommon->counter_reset;
c->name != NULL; c++) {
lwc_string_unref(c->name);
}
- free(style->uncommon->counter_reset);
+ free(uncommon->counter_reset);
}
- if (style->uncommon->cursor != NULL) {
+ if (uncommon->cursor != NULL) {
lwc_string **s;
- for (s = style->uncommon->cursor; *s != NULL; s++) {
+ for (s = uncommon->cursor; *s != NULL; s++) {
lwc_string_unref(*s);
}
- free(style->uncommon->cursor);
+ free(uncommon->cursor);
}
- if (style->uncommon->content != NULL) {
+ if (uncommon->content != NULL) {
css_computed_content_item *c;
- for (c = style->uncommon->content;
+ for (c = uncommon->content;
c->type != CSS_COMPUTED_CONTENT_NONE;
c++) {
switch (c->type) {
@@ -152,18 +154,35 @@ css_error css_computed_style_destroy(css_computed_style *style)
}
}
- free(style->uncommon->content);
+ free(uncommon->content);
}
- free(style->uncommon);
+ free(uncommon);
}
+ return CSS_OK;
+}
+
+/**
+ * Destroy a computed style
+ *
+ * \param style Style to destroy
+ * \return CSS_OK on success, appropriate error otherwise
+ */
+css_error css_computed_style_destroy(css_computed_style *style)
+{
+ if (style == NULL)
+ return CSS_BADPARM;
+
+ css__computed_uncommon_destroy(style->i.uncommon);
+
+
if (style->page != NULL) {
free(style->page);
}
- if (style->aural != NULL) {
- free(style->aural);
+ if (style->i.aural != NULL) {
+ free(style->i.aural);
}
if (style->font_family != NULL) {
@@ -186,11 +205,11 @@ css_error css_computed_style_destroy(css_computed_style *style)
free(style->quotes);
}
- if (style->list_style_image != NULL)
- lwc_string_unref(style->list_style_image);
+ if (style->i.list_style_image != NULL)
+ lwc_string_unref(style->i.list_style_image);
- if (style->background_image != NULL)
- lwc_string_unref(style->background_image);
+ if (style->i.background_image != NULL)
+ lwc_string_unref(style->i.background_image);
free(style);
@@ -264,8 +283,8 @@ css_error css_computed_style_compose(const css_computed_style *parent,
for (i = 0; i < CSS_N_PROPERTIES; i++) {
/* Skip any in extension blocks if the block does not exist */
if (prop_dispatch[i].group == GROUP_UNCOMMON &&
- parent->uncommon == NULL &&
- child->uncommon == NULL)
+ parent->i.uncommon == NULL &&
+ child->i.uncommon == NULL)
continue;
if (prop_dispatch[i].group == GROUP_PAGE &&
@@ -273,7 +292,8 @@ css_error css_computed_style_compose(const css_computed_style *parent,
continue;
if (prop_dispatch[i].group == GROUP_AURAL &&
- parent->aural == NULL && child->aural == NULL)
+ parent->i.aural == NULL &&
+ child->i.aural == NULL)
continue;
/* Compose the property */
@@ -444,7 +464,7 @@ uint8_t css_computed_top(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (top == CSS_TOP_AUTO) {
/* Top is auto => -bottom */
- *length = -style->bottom;
+ *length = -style->i.bottom;
*unit = (css_unit) (bottom >> 2);
}
@@ -474,7 +494,7 @@ uint8_t css_computed_right(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (right == CSS_RIGHT_AUTO) {
/* Right is auto => -left */
- *length = -style->left;
+ *length = -style->i.left;
*unit = (css_unit) (left >> 2);
} else {
/** \todo Consider containing block's direction
@@ -508,7 +528,7 @@ uint8_t css_computed_bottom(const css_computed_style *style,
} else if (bottom == CSS_BOTTOM_AUTO ||
(top & 0x3) != CSS_TOP_AUTO) {
/* Bottom is auto or top is not auto => -top */
- *length = -style->top;
+ *length = -style->i.top;
*unit = (css_unit) (top >> 2);
}
@@ -538,7 +558,7 @@ uint8_t css_computed_left(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (left == CSS_LEFT_AUTO) {
/* Left is auto => -right */
- *length = -style->right;
+ *length = -style->i.right;
*unit = (css_unit) (right >> 2);
} else {
/** \todo Consider containing block's direction
@@ -1144,7 +1164,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
/* Uncommon properties */
- if (style->uncommon != NULL) {
+ if (style->i.uncommon != NULL) {
/* Fix up border-spacing */
error = compute_absolute_length_pair(style,
&ex_size.data.length,
diff --git a/src/select/computed.h b/src/select/computed.h
index 0ca01d9..f965993 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -13,7 +13,7 @@
-typedef struct css_computed_uncommon {
+struct css_computed_uncommon_i {
/*
* border_spacing 1 + 2(4) 2(4)
* break_before 4 0
@@ -99,13 +99,20 @@ typedef struct css_computed_uncommon {
css_color column_rule_color;
css_fixed column_rule_width;
css_fixed column_width;
+};
+
+typedef struct css_computed_uncommon {
+ struct css_computed_uncommon_i i;
css_computed_counter *counter_increment;
css_computed_counter *counter_reset;
- lwc_string **cursor;
-
css_computed_content_item *content;
+
+ lwc_string **cursor;
+ struct css_computed_uncommon *next;
+ uint32_t count;
+ uint32_t bin;
} css_computed_uncommon;
typedef struct css_computed_page {
@@ -122,7 +129,7 @@ typedef struct css_computed_page {
int32_t orphans;
} css_computed_page;
-struct css_computed_style {
+struct css_computed_style_i {
/*
* background_attachment 2
* background_repeat 3
@@ -302,15 +309,24 @@ struct css_computed_style {
int32_t z_index;
+ css_computed_uncommon *uncommon;/**< Uncommon properties */
+ void *aural; /**< Aural properties */
+};
+
+struct css_computed_style {
+ struct css_computed_style_i i;
+
lwc_string **font_family;
lwc_string **quotes;
-
- css_computed_uncommon *uncommon;/**< Uncommon properties */
- void *aural; /**< Aural properties */
css_computed_page *page; /**< Page properties */
+ struct css_computed_style *next;
+ uint32_t count;
+ uint32_t bin;
};
+css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
+
css_error css__compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
css_error (*compute_font_size)(void *pw,
diff --git a/src/select/properties/border_spacing.c b/src/select/properties/border_spacing.c
index 1b32747..db7b1f2 100644
--- a/src/select/properties/border_spacing.c
+++ b/src/select/properties/border_spacing.c
@@ -71,10 +71,10 @@ css_error css__compose_border_spacing(const css_computed_style *parent,
uint8_t type = get_border_spacing(child, &hlength, &hunit,
&vlength, &vunit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_BORDER_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_BORDER_SPACING_INHERIT) {
type = get_border_spacing(parent,
&hlength, &hunit, &vlength, &vunit);
diff --git a/src/select/properties/clip.c b/src/select/properties/clip.c
index d98c7eb..cc39d99 100644
--- a/src/select/properties/clip.c
+++ b/src/select/properties/clip.c
@@ -102,10 +102,10 @@ css_error css__compose_clip(const css_computed_style *parent,
false, false, false, false };
uint8_t type = get_clip(child, &rect);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CLIP_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CLIP_INHERIT) {
type = get_clip(parent, &rect);
}
diff --git a/src/select/properties/column_count.c b/src/select/properties/column_count.c
index 92fdec2..4ded377 100644
--- a/src/select/properties/column_count.c
+++ b/src/select/properties/column_count.c
@@ -59,10 +59,10 @@ css_error css__compose_column_count(const css_computed_style *parent,
int32_t count = 0;
uint8_t type = get_column_count(child, &count);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_COUNT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_COUNT_INHERIT) {
type = get_column_count(parent, &count);
}
diff --git a/src/select/properties/column_gap.c b/src/select/properties/column_gap.c
index 641f529..f544f44 100644
--- a/src/select/properties/column_gap.c
+++ b/src/select/properties/column_gap.c
@@ -41,10 +41,10 @@ css_error css__compose_column_gap(const css_computed_style *parent,
css_unit unit = CSS_UNIT_EM;
uint8_t type = get_column_gap(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_GAP_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_GAP_INHERIT) {
type = get_column_gap(parent, &length, &unit);
}
diff --git a/src/select/properties/column_width.c b/src/select/properties/column_width.c
index 45eb7fc..b6550ab 100644
--- a/src/select/properties/column_width.c
+++ b/src/select/properties/column_width.c
@@ -41,10 +41,10 @@ css_error css__compose_column_width(const css_computed_style *parent,
css_unit unit = CSS_UNIT_EM;
uint8_t type = get_column_width(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_WIDTH_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_WIDTH_INHERIT) {
type = get_column_width(parent, &length, &unit);
}
diff --git a/src/select/properties/content.c b/src/select/properties/content.c
index c79dd0d..a9dd211 100644
--- a/src/select/properties/content.c
+++ b/src/select/properties/content.c
@@ -206,13 +206,13 @@ css_error css__compose_content(const css_computed_style *parent,
const css_computed_content_item *items = NULL;
uint8_t type = get_content(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CONTENT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_content_item *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CONTENT_INHERIT) {
type = get_content(parent, &items);
}
diff --git a/src/select/properties/counter_increment.c b/src/select/properties/counter_increment.c
index 429e558..644607b 100644
--- a/src/select/properties/counter_increment.c
+++ b/src/select/properties/counter_increment.c
@@ -56,13 +56,13 @@ css_error css__compose_counter_increment(const css_computed_style *parent,
const css_computed_counter *items = NULL;
uint8_t type = get_counter_increment(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_INCREMENT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_counter *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_INCREMENT_INHERIT) {
type = get_counter_increment(parent, &items);
}
diff --git a/src/select/properties/counter_reset.c b/src/select/properties/counter_reset.c
index ddf54aa..05559f5 100644
--- a/src/select/properties/counter_reset.c
+++ b/src/select/properties/counter_reset.c
@@ -55,13 +55,13 @@ css_error css__compose_counter_reset(const css_computed_style *parent,
const css_computed_counter *items = NULL;
uint8_t type = get_counter_reset(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_RESET_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_counter *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_RESET_INHERIT) {
type = get_counter_reset(parent, &items);
}
diff --git a/src/select/properties/cursor.c b/src/select/properties/cursor.c
index a77d21b..1ca497f 100644
--- a/src/select/properties/cursor.c
+++ b/src/select/properties/cursor.c
@@ -172,13 +172,13 @@ css_error css__compose_cursor(const css_computed_style *parent,
lwc_string **urls = NULL;
uint8_t type = get_cursor(child, &urls);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CURSOR_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_urls = 0;
lwc_string **copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CURSOR_INHERIT) {
type = get_cursor(parent, &urls);
}
diff --git a/src/select/properties/letter_spacing.c b/src/select/properties/letter_spacing.c
index 322efef..cc00100 100644
--- a/src/select/properties/letter_spacing.c
+++ b/src/select/properties/letter_spacing.c
@@ -41,10 +41,10 @@ css_error css__compose_letter_spacing(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_letter_spacing(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_LETTER_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_LETTER_SPACING_INHERIT) {
type = get_letter_spacing(parent, &length, &unit);
}
diff --git a/src/select/properties/outline_color.c b/src/select/properties/outline_color.c
index 36aafd7..2613839 100644
--- a/src/select/properties/outline_color.c
+++ b/src/select/properties/outline_color.c
@@ -65,10 +65,10 @@ css_error css__compose_outline_color(const css_computed_style *parent,
css_color color = 0;
uint8_t type = get_outline_color(child, &color);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_COLOR_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_COLOR_INHERIT) {
type = get_outline_color(parent, &color);
}
diff --git a/src/select/properties/outline_width.c b/src/select/properties/outline_width.c
index 5380179..547c42a 100644
--- a/src/select/properties/outline_width.c
+++ b/src/select/properties/outline_width.c
@@ -41,10 +41,10 @@ css_error css__compose_outline_width(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_outline_width(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_WIDTH_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_WIDTH_INHERIT) {
type = get_outline_width(parent, &length, &unit);
}
diff --git a/src/select/properties/word_spacing.c b/src/select/properties/word_spacing.c
index dd4e1d7..24eda89 100644
--- a/src/select/properties/word_spacing.c
+++ b/src/select/properties/word_spacing.c
@@ -41,10 +41,10 @@ css_error css__compose_word_spacing(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_word_spacing(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_WORD_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_WORD_SPACING_INHERIT) {
type = get_word_spacing(parent, &length, &unit);
}
diff --git a/src/select/propget.h b/src/select/propget.h
index 2a263aa..5552e39 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -21,15 +21,15 @@ static inline uint8_t get_letter_spacing(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[LETTER_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[LETTER_SPACING_INDEX];
bits &= LETTER_SPACING_MASK;
bits >>= LETTER_SPACING_SHIFT;
/* 6bits: uuuutt : unit | type */
if ((bits & 3) == CSS_LETTER_SPACING_SET) {
- *length = style->uncommon->letter_spacing;
+ *length = style->i.uncommon->i.letter_spacing;
*unit = bits >> 2;
}
@@ -49,15 +49,15 @@ static inline uint8_t get_letter_spacing(
static inline uint8_t get_outline_color(
const css_computed_style *style, css_color *color)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[OUTLINE_COLOR_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[OUTLINE_COLOR_INDEX];
bits &= OUTLINE_COLOR_MASK;
bits >>= OUTLINE_COLOR_SHIFT;
/* 2bits: tt : type */
if ((bits & 3) == CSS_OUTLINE_COLOR_COLOR) {
- *color = style->uncommon->outline_color;
+ *color = style->i.uncommon->i.outline_color;
}
return (bits & 3);
@@ -77,15 +77,15 @@ static inline uint8_t get_outline_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[OUTLINE_WIDTH_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[OUTLINE_WIDTH_INDEX];
bits &= OUTLINE_WIDTH_MASK;
bits >>= OUTLINE_WIDTH_SHIFT;
/* 7bits: uuuuttt : unit | type */
if ((bits & 7) == CSS_OUTLINE_WIDTH_WIDTH) {
- *length = style->uncommon->outline_width;
+ *length = style->i.uncommon->i.outline_width;
*unit = bits >> 3;
}
@@ -110,24 +110,24 @@ static inline uint8_t get_border_spacing(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BORDER_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BORDER_SPACING_INDEX];
bits &= BORDER_SPACING_MASK;
bits >>= BORDER_SPACING_SHIFT;
/* 1 bit: type */
if (bits == CSS_BORDER_SPACING_SET) {
uint8_t bits1 =
- style->uncommon->bits[BORDER_SPACING_INDEX1];
+ style->i.uncommon->i.bits[BORDER_SPACING_INDEX1];
bits1 &= BORDER_SPACING_MASK1;
bits1 >>= BORDER_SPACING_SHIFT1;
/* 8bits: hhhhvvvv : hunit | vunit */
- *hlength = style->uncommon->border_spacing[0];
+ *hlength = style->i.uncommon->i.border_spacing[0];
*hunit = bits1 >> 4;
- *vlength = style->uncommon->border_spacing[1];
+ *vlength = style->i.uncommon->i.border_spacing[1];
*vunit = bits1 & 0xf;
}
@@ -152,8 +152,8 @@ static inline uint8_t get_border_spacing(
static inline uint8_t get_break_after(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_AFTER_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_AFTER_INDEX];
bits &= BREAK_AFTER_MASK;
bits >>= BREAK_AFTER_SHIFT;
@@ -174,8 +174,8 @@ static inline uint8_t get_break_after(
static inline uint8_t get_break_before(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_BEFORE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_BEFORE_INDEX];
bits &= BREAK_BEFORE_MASK;
bits >>= BREAK_BEFORE_SHIFT;
@@ -196,8 +196,8 @@ static inline uint8_t get_break_before(
static inline uint8_t get_break_inside(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_INSIDE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_INSIDE_INDEX];
bits &= BREAK_INSIDE_MASK;
bits >>= BREAK_INSIDE_SHIFT;
@@ -219,15 +219,15 @@ static inline uint8_t get_word_spacing(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[WORD_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[WORD_SPACING_INDEX];
bits &= WORD_SPACING_MASK;
bits >>= WORD_SPACING_SHIFT;
/* 6bits: uuuutt : unit | type */
if ((bits & 3) == CSS_WORD_SPACING_SET) {
- *length = style->uncommon->word_spacing;
+ *length = style->i.uncommon->i.word_spacing;
*unit = bits >> 2;
}
@@ -247,8 +247,8 @@ static inline uint8_t get_word_spacing(
static inline uint8_t get_writing_mode(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[WRITING_MODE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[WRITING_MODE_INDEX];
bits &= WRITING_MODE_MASK;
bits >>= WRITING_MODE_SHIFT;
@@ -270,13 +270,13 @@ static inline uint8_t get_counter_increment(
const css_computed_style *style,
const css_computed_counter **counters)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COUNTER_INCREMENT_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COUNTER_INCREMENT_INDEX];
bits &= COUNTER_INCREMENT_MASK;
bits >>= COUNTER_INCREMENT_SHIFT;
/* 1bit: type */
- *counters = style->uncommon->counter_increment;
+ *counters = style->i.uncommon->counter_increment;
return bits;
}
@@ -295,13 +295,13 @@ static inline uint8_t get_counter_reset(
const css_computed_style *style,
const css_computed_counter **counters)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COUNTER_RESET_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COUNTER_RESET_INDEX];
bits &= COUNTER_RESET_MASK;
bits >>= COUNTER_RESET_SHIFT;
/* 1bit: type */
- *counters = style->uncommon->counter_reset;
+ *counters = style->i.uncommon->counter_reset;
return bits;
}
@@ -320,13 +320,13 @@ static inline uint8_t get_cursor(
const css_computed_style *style,
lwc_string ***urls)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CURSOR_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CURSOR_INDEX];
bits &= CURSOR_MASK;
bits >>= CURSOR_SHIFT;
/* 5bits: type */
- *urls = style->uncommon->cursor;
+ *urls = style->i.uncommon->cursor;
return bits;
}
@@ -351,8 +351,8 @@ static inline uint8_t get_clip(
const css_computed_style *style,
css_computed_clip_rect *rect)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CLIP_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CLIP_INDEX];
bits &= CLIP_MASK;
bits >>= CLIP_SHIFT;
@@ -368,33 +368,33 @@ static inline uint8_t get_clip(
if (rect->top_auto == false ||
rect->right_auto == false) {
/* 8bits: ttttrrrr : top | right */
- bits1 = style->uncommon->bits[CLIP_INDEX1];
+ bits1 = style->i.uncommon->i.bits[CLIP_INDEX1];
bits1 &= CLIP_MASK1;
bits1 >>= CLIP_SHIFT1;
} else {
bits1 = 0;
}
- rect->top = style->uncommon->clip[0];
+ rect->top = style->i.uncommon->i.clip[0];
rect->tunit = bits1 >> 4;
- rect->right = style->uncommon->clip[1];
+ rect->right = style->i.uncommon->i.clip[1];
rect->runit = bits1 & 0xf;
if (rect->bottom_auto == false ||
rect->left_auto == false) {
/* 8bits: bbbbllll : bottom | left */
- bits1 = style->uncommon->bits[CLIP_INDEX2];
+ bits1 = style->i.uncommon->i.bits[CLIP_INDEX2];
bits1 &= CLIP_MASK2;
bits1 >>= CLIP_SHIFT2;
} else {
bits1 = 0;
}
- rect->bottom = style->uncommon->clip[2];
+ rect->bottom = style->i.uncommon->i.clip[2];
rect->bunit = bits1 >> 4;
- rect->left = style->uncommon->clip[3];
+ rect->left = style->i.uncommon->i.clip[3];
rect->lunit = bits1 & 0xf;
}
@@ -420,13 +420,13 @@ static inline uint8_t get_clip(
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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_COUNT_INDEX];
bits &= COLUMN_COUNT_MASK;
bits >>= COLUMN_COUNT_SHIFT;
/* 2bits: tt : type */
- *count = style->uncommon->column_count;
+ *count = style->i.uncommon->i.column_count;
return bits;
}
@@ -444,8 +444,8 @@ static inline uint8_t get_column_count(
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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_FILL_INDEX];
bits &= COLUMN_FILL_MASK;
bits >>= COLUMN_FILL_SHIFT;
@@ -467,14 +467,14 @@ 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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.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;
+ *length = style->i.uncommon->i.column_gap;
*unit = bits >> 2;
}
@@ -495,13 +495,13 @@ 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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_RULE_COLOR_INDEX];
bits &= COLUMN_RULE_COLOR_MASK;
bits >>= COLUMN_RULE_COLOR_SHIFT;
/* 2bits: type */
- *color = style->uncommon->column_rule_color;
+ *color = style->i.uncommon->i.column_rule_color;
return bits;
}
@@ -520,8 +520,8 @@ static inline uint8_t get_column_rule_color(
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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_RULE_STYLE_INDEX];
bits &= COLUMN_RULE_STYLE_MASK;
bits >>= COLUMN_RULE_STYLE_SHIFT;
@@ -543,14 +543,14 @@ 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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.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;
+ *length = style->i.uncommon->i.column_rule_width;
*unit = bits >> 3;
}
@@ -570,8 +570,8 @@ static inline uint8_t get_column_rule_width(
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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_SPAN_INDEX];
bits &= COLUMN_SPAN_MASK;
bits >>= COLUMN_SPAN_SHIFT;
@@ -593,14 +593,14 @@ 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];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.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;
+ *length = style->i.uncommon->i.column_width;
*unit = bits >> 2;
}
@@ -621,13 +621,13 @@ static inline uint8_t get_content(
const css_computed_style *style,
const css_computed_content_item **content)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CONTENT_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CONTENT_INDEX];
bits &= CONTENT_MASK;
bits >>= CONTENT_SHIFT;
/* 2bits: type */
- *content = style->uncommon->content;
+ *content = style->i.uncommon->content;
return bits;
}
@@ -646,13 +646,13 @@ static inline uint8_t get_vertical_align(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[VERTICAL_ALIGN_INDEX];
+ uint8_t bits = style->i.bits[VERTICAL_ALIGN_INDEX];
bits &= VERTICAL_ALIGN_MASK;
bits >>= VERTICAL_ALIGN_SHIFT;
/* 8bits: uuuutttt : units | type */
if ((bits & 0xf) == CSS_VERTICAL_ALIGN_SET) {
- *length = style->vertical_align;
+ *length = style->i.vertical_align;
*unit = bits >> 4;
}
@@ -669,13 +669,13 @@ static inline uint8_t get_font_size(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[FONT_SIZE_INDEX];
+ uint8_t bits = style->i.bits[FONT_SIZE_INDEX];
bits &= FONT_SIZE_MASK;
bits >>= FONT_SIZE_SHIFT;
/* 8bits: uuuutttt : units | type */
if ((bits & 0xf) == CSS_FONT_SIZE_DIMENSION) {
- *length = style->font_size;
+ *length = style->i.font_size;
*unit = bits >> 4;
}
@@ -692,13 +692,13 @@ static inline uint8_t get_border_top_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_TOP_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_WIDTH_INDEX];
bits &= BORDER_TOP_WIDTH_MASK;
bits >>= BORDER_TOP_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[0];
+ *length = style->i.border_width[0];
*unit = bits >> 3;
}
@@ -715,13 +715,13 @@ static inline uint8_t get_border_right_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_RIGHT_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
bits &= BORDER_RIGHT_WIDTH_MASK;
bits >>= BORDER_RIGHT_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[1];
+ *length = style->i.border_width[1];
*unit = bits >> 3;
}
@@ -738,13 +738,13 @@ static inline uint8_t get_border_bottom_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
bits &= BORDER_BOTTOM_WIDTH_MASK;
bits >>= BORDER_BOTTOM_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[2];
+ *length = style->i.border_width[2];
*unit = bits >> 3;
}
@@ -761,13 +761,13 @@ static inline uint8_t get_border_left_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_LEFT_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_WIDTH_INDEX];
bits &= BORDER_LEFT_WIDTH_MASK;
bits >>= BORDER_LEFT_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[3];
+ *length = style->i.border_width[3];
*unit = bits >> 3;
}
@@ -784,12 +784,12 @@ static inline uint8_t get_background_image(
const css_computed_style *style,
lwc_string **url)
{
- uint8_t bits = style->bits[BACKGROUND_IMAGE_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_IMAGE_INDEX];
bits &= BACKGROUND_IMAGE_MASK;
bits >>= BACKGROUND_IMAGE_SHIFT;
/* 1bit: type */
- *url = style->background_image;
+ *url = style->i.background_image;
return bits;
}
@@ -804,12 +804,12 @@ static inline uint8_t get_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[COLOR_INDEX];
+ uint8_t bits = style->i.bits[COLOR_INDEX];
bits &= COLOR_MASK;
bits >>= COLOR_SHIFT;
/* 1bit: type */
- *color = style->color;
+ *color = style->i.color;
return bits;
}
@@ -824,12 +824,12 @@ static inline uint8_t get_list_style_image(
const css_computed_style *style,
lwc_string **url)
{
- uint8_t bits = style->bits[LIST_STYLE_IMAGE_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_IMAGE_INDEX];
bits &= LIST_STYLE_IMAGE_MASK;
bits >>= LIST_STYLE_IMAGE_SHIFT;
/* 1bit: type */
- *url = style->list_style_image;
+ *url = style->i.list_style_image;
return bits;
}
@@ -844,7 +844,7 @@ static inline uint8_t get_quotes(
const css_computed_style *style,
lwc_string ***quotes)
{
- uint8_t bits = style->bits[QUOTES_INDEX];
+ uint8_t bits = style->i.bits[QUOTES_INDEX];
bits &= QUOTES_MASK;
bits >>= QUOTES_SHIFT;
@@ -864,13 +864,13 @@ static inline uint8_t get_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[TOP_INDEX];
+ uint8_t bits = style->i.bits[TOP_INDEX];
bits &= TOP_MASK;
bits >>= TOP_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_TOP_SET) {
- *length = style->top;
+ *length = style->i.top;
*unit = bits >> 2;
}
@@ -879,7 +879,7 @@ static inline uint8_t get_top(
static inline uint8_t get_top_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TOP_INDEX];
+ uint8_t bits = style->i.bits[TOP_INDEX];
bits &= TOP_MASK;
bits >>= TOP_SHIFT;
@@ -897,13 +897,13 @@ static inline uint8_t get_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[RIGHT_INDEX];
+ uint8_t bits = style->i.bits[RIGHT_INDEX];
bits &= RIGHT_MASK;
bits >>= RIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_RIGHT_SET) {
- *length = style->right;
+ *length = style->i.right;
*unit = bits >> 2;
}
@@ -912,7 +912,7 @@ static inline uint8_t get_right(
static inline uint8_t get_right_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[RIGHT_INDEX];
+ uint8_t bits = style->i.bits[RIGHT_INDEX];
bits &= RIGHT_MASK;
bits >>= RIGHT_SHIFT;
@@ -930,13 +930,13 @@ static inline uint8_t get_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[BOTTOM_INDEX];
bits &= BOTTOM_MASK;
bits >>= BOTTOM_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_BOTTOM_SET) {
- *length = style->bottom;
+ *length = style->i.bottom;
*unit = bits >> 2;
}
@@ -945,7 +945,7 @@ static inline uint8_t get_bottom(
static inline uint8_t get_bottom_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[BOTTOM_INDEX];
bits &= BOTTOM_MASK;
bits >>= BOTTOM_SHIFT;
@@ -963,13 +963,13 @@ static inline uint8_t get_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[LEFT_INDEX];
+ uint8_t bits = style->i.bits[LEFT_INDEX];
bits &= LEFT_MASK;
bits >>= LEFT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_LEFT_SET) {
- *length = style->left;
+ *length = style->i.left;
*unit = bits >> 2;
}
@@ -978,7 +978,7 @@ static inline uint8_t get_left(
static inline uint8_t get_left_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LEFT_INDEX];
+ uint8_t bits = style->i.bits[LEFT_INDEX];
bits &= LEFT_MASK;
bits >>= LEFT_SHIFT;
@@ -996,12 +996,12 @@ static inline uint8_t get_border_top_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_TOP_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_COLOR_INDEX];
bits &= BORDER_TOP_COLOR_MASK;
bits >>= BORDER_TOP_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[0];
+ *color = style->i.border_color[0];
return bits;
}
@@ -1016,12 +1016,12 @@ static inline uint8_t get_border_right_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_RIGHT_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_COLOR_INDEX];
bits &= BORDER_RIGHT_COLOR_MASK;
bits >>= BORDER_RIGHT_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[1];
+ *color = style->i.border_color[1];
return bits;
}
@@ -1036,12 +1036,12 @@ static inline uint8_t get_border_bottom_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
bits &= BORDER_BOTTOM_COLOR_MASK;
bits >>= BORDER_BOTTOM_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[2];
+ *color = style->i.border_color[2];
return bits;
}
@@ -1056,12 +1056,12 @@ static inline uint8_t get_border_left_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_LEFT_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_COLOR_INDEX];
bits &= BORDER_LEFT_COLOR_MASK;
bits >>= BORDER_LEFT_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[3];
+ *color = style->i.border_color[3];
return bits;
}
@@ -1076,13 +1076,13 @@ static inline uint8_t get_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[HEIGHT_INDEX];
bits &= HEIGHT_MASK;
bits >>= HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_HEIGHT_SET) {
- *length = style->height;
+ *length = style->i.height;
*unit = bits >> 2;
}
@@ -1099,14 +1099,14 @@ static inline uint8_t get_line_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[LINE_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[LINE_HEIGHT_INDEX];
bits &= LINE_HEIGHT_MASK;
bits >>= LINE_HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_LINE_HEIGHT_NUMBER ||
(bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
- *length = style->line_height;
+ *length = style->i.line_height;
}
if ((bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
@@ -1126,12 +1126,12 @@ static inline uint8_t get_background_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BACKGROUND_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_COLOR_INDEX];
bits &= BACKGROUND_COLOR_MASK;
bits >>= BACKGROUND_COLOR_SHIFT;
/* 2bits: type */
- *color = style->background_color;
+ *color = style->i.background_color;
return bits;
}
@@ -1146,12 +1146,12 @@ static inline uint8_t get_z_index(
const css_computed_style *style,
int32_t *z_index)
{
- uint8_t bits = style->bits[Z_INDEX_INDEX];
+ uint8_t bits = style->i.bits[Z_INDEX_INDEX];
bits &= Z_INDEX_MASK;
bits >>= Z_INDEX_SHIFT;
/* 2bits: type */
- *z_index = style->z_index;
+ *z_index = style->i.z_index;
return bits;
}
@@ -1166,13 +1166,13 @@ static inline uint8_t get_margin_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_TOP_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_TOP_INDEX];
bits &= MARGIN_TOP_MASK;
bits >>= MARGIN_TOP_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[0];
+ *length = style->i.margin[0];
*unit = bits >> 2;
}
@@ -1189,13 +1189,13 @@ static inline uint8_t get_margin_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_RIGHT_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_RIGHT_INDEX];
bits &= MARGIN_RIGHT_MASK;
bits >>= MARGIN_RIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[1];
+ *length = style->i.margin[1];
*unit = bits >> 2;
}
@@ -1212,13 +1212,13 @@ static inline uint8_t get_margin_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_BOTTOM_INDEX];
bits &= MARGIN_BOTTOM_MASK;
bits >>= MARGIN_BOTTOM_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[2];
+ *length = style->i.margin[2];
*unit = bits >> 2;
}
@@ -1235,13 +1235,13 @@ static inline uint8_t get_margin_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_LEFT_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_LEFT_INDEX];
bits &= MARGIN_LEFT_MASK;
bits >>= MARGIN_LEFT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[3];
+ *length = style->i.margin[3];
*unit = bits >> 2;
}
@@ -1257,7 +1257,7 @@ static inline uint8_t get_margin_left(
static inline uint8_t get_background_attachment(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BACKGROUND_ATTACHMENT_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
bits &= BACKGROUND_ATTACHMENT_MASK;
bits >>= BACKGROUND_ATTACHMENT_SHIFT;
@@ -1274,7 +1274,7 @@ static inline uint8_t get_background_attachment(
static inline uint8_t get_border_collapse(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_COLLAPSE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_COLLAPSE_INDEX];
bits &= BORDER_COLLAPSE_MASK;
bits >>= BORDER_COLLAPSE_SHIFT;
@@ -1291,7 +1291,7 @@ static inline uint8_t get_border_collapse(
static inline uint8_t get_caption_side(
const css_computed_style *style)
{
- uint8_t bits = style->bits[CAPTION_SIDE_INDEX];
+ uint8_t bits = style->i.bits[CAPTION_SIDE_INDEX];
bits &= CAPTION_SIDE_MASK;
bits >>= CAPTION_SIDE_SHIFT;
@@ -1308,7 +1308,7 @@ static inline uint8_t get_caption_side(
static inline uint8_t get_direction(
const css_computed_style *style)
{
- uint8_t bits = style->bits[DIRECTION_INDEX];
+ uint8_t bits = style->i.bits[DIRECTION_INDEX];
bits &= DIRECTION_MASK;
bits >>= DIRECTION_SHIFT;
@@ -1326,13 +1326,13 @@ static inline uint8_t get_max_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MAX_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[MAX_HEIGHT_INDEX];
bits &= MAX_HEIGHT_MASK;
bits >>= MAX_HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MAX_HEIGHT_SET) {
- *length = style->max_height;
+ *length = style->i.max_height;
*unit = bits >> 2;
}
@@ -1349,13 +1349,13 @@ static inline uint8_t get_max_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MAX_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[MAX_WIDTH_INDEX];
bits &= MAX_WIDTH_MASK;
bits >>= MAX_WIDTH_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MAX_WIDTH_SET) {
- *length = style->max_width;
+ *length = style->i.max_width;
*unit = bits >> 2;
}
@@ -1372,13 +1372,13 @@ static inline uint8_t get_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[WIDTH_INDEX];
+ uint8_t bits = style->i.bits[WIDTH_INDEX];
bits &= WIDTH_MASK;
bits >>= WIDTH_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_WIDTH_SET) {
- *length = style->width;
+ *length = style->i.width;
*unit = bits >> 2;
}
@@ -1394,7 +1394,7 @@ static inline uint8_t get_width(
static inline uint8_t get_empty_cells(
const css_computed_style *style)
{
- uint8_t bits = style->bits[EMPTY_CELLS_INDEX];
+ uint8_t bits = style->i.bits[EMPTY_CELLS_INDEX];
bits &= EMPTY_CELLS_MASK;
bits >>= EMPTY_CELLS_SHIFT;
@@ -1411,7 +1411,7 @@ static inline uint8_t get_empty_cells(
static inline uint8_t get_float(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FLOAT_INDEX];
+ uint8_t bits = style->i.bits[FLOAT_INDEX];
bits &= FLOAT_MASK;
bits >>= FLOAT_SHIFT;
@@ -1428,7 +1428,7 @@ static inline uint8_t get_float(
static inline uint8_t get_font_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[FONT_STYLE_INDEX];
bits &= FONT_STYLE_MASK;
bits >>= FONT_STYLE_SHIFT;
@@ -1446,13 +1446,13 @@ static inline uint8_t get_min_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MIN_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[MIN_HEIGHT_INDEX];
bits &= MIN_HEIGHT_MASK;
bits >>= MIN_HEIGHT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_MIN_HEIGHT_SET) {
- *length = style->min_height;
+ *length = style->i.min_height;
*unit = bits >> 1;
}
@@ -1469,13 +1469,13 @@ static inline uint8_t get_min_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MIN_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[MIN_WIDTH_INDEX];
bits &= MIN_WIDTH_MASK;
bits >>= MIN_WIDTH_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_MIN_WIDTH_SET) {
- *length = style->min_width;
+ *length = style->i.min_width;
*unit = bits >> 1;
}
@@ -1491,7 +1491,7 @@ static inline uint8_t get_min_width(
static inline uint8_t get_background_repeat(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BACKGROUND_REPEAT_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_REPEAT_INDEX];
bits &= BACKGROUND_REPEAT_MASK;
bits >>= BACKGROUND_REPEAT_SHIFT;
@@ -1508,7 +1508,7 @@ static inline uint8_t get_background_repeat(
static inline uint8_t get_clear(
const css_computed_style *style)
{
- uint8_t bits = style->bits[CLEAR_INDEX];
+ uint8_t bits = style->i.bits[CLEAR_INDEX];
bits &= CLEAR_MASK;
bits >>= CLEAR_SHIFT;
@@ -1526,13 +1526,13 @@ static inline uint8_t get_padding_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_TOP_INDEX];
+ uint8_t bits = style->i.bits[PADDING_TOP_INDEX];
bits &= PADDING_TOP_MASK;
bits >>= PADDING_TOP_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[0];
+ *length = style->i.padding[0];
*unit = bits >> 1;
}
@@ -1549,13 +1549,13 @@ static inline uint8_t get_padding_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_RIGHT_INDEX];
+ uint8_t bits = style->i.bits[PADDING_RIGHT_INDEX];
bits &= PADDING_RIGHT_MASK;
bits >>= PADDING_RIGHT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[1];
+ *length = style->i.padding[1];
*unit = bits >> 1;
}
@@ -1572,13 +1572,13 @@ static inline uint8_t get_padding_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[PADDING_BOTTOM_INDEX];
bits &= PADDING_BOTTOM_MASK;
bits >>= PADDING_BOTTOM_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[2];
+ *length = style->i.padding[2];
*unit = bits >> 1;
}
@@ -1595,13 +1595,13 @@ static inline uint8_t get_padding_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_LEFT_INDEX];
+ uint8_t bits = style->i.bits[PADDING_LEFT_INDEX];
bits &= PADDING_LEFT_MASK;
bits >>= PADDING_LEFT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[3];
+ *length = style->i.padding[3];
*unit = bits >> 1;
}
@@ -1617,7 +1617,7 @@ static inline uint8_t get_padding_left(
static inline uint8_t get_overflow_x(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OVERFLOW_X_INDEX];
+ uint8_t bits = style->i.bits[OVERFLOW_X_INDEX];
bits &= OVERFLOW_X_MASK;
bits >>= OVERFLOW_X_SHIFT;
@@ -1634,7 +1634,7 @@ static inline uint8_t get_overflow_x(
static inline uint8_t get_overflow_y(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OVERFLOW_Y_INDEX];
+ uint8_t bits = style->i.bits[OVERFLOW_Y_INDEX];
bits &= OVERFLOW_Y_MASK;
bits >>= OVERFLOW_Y_SHIFT;
@@ -1651,7 +1651,7 @@ static inline uint8_t get_overflow_y(
static inline uint8_t get_position(
const css_computed_style *style)
{
- uint8_t bits = style->bits[POSITION_INDEX];
+ uint8_t bits = style->i.bits[POSITION_INDEX];
bits &= POSITION_MASK;
bits >>= POSITION_SHIFT;
@@ -1669,13 +1669,13 @@ static inline uint8_t get_opacity(
const css_computed_style *style,
css_fixed *opacity)
{
- uint8_t bits = style->bits[OPACITY_INDEX];
+ uint8_t bits = style->i.bits[OPACITY_INDEX];
bits &= OPACITY_MASK;
bits >>= OPACITY_SHIFT;
/* 1bit: t : type */
if ((bits & 0x1) == CSS_OPACITY_SET) {
- *opacity = style->opacity;
+ *opacity = style->i.opacity;
}
return (bits & 0x1);
@@ -1690,7 +1690,7 @@ static inline uint8_t get_opacity(
static inline uint8_t get_text_transform(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_TRANSFORM_INDEX];
+ uint8_t bits = style->i.bits[TEXT_TRANSFORM_INDEX];
bits &= TEXT_TRANSFORM_MASK;
bits >>= TEXT_TRANSFORM_SHIFT;
@@ -1708,13 +1708,13 @@ static inline uint8_t get_text_indent(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[TEXT_INDENT_INDEX];
+ uint8_t bits = style->i.bits[TEXT_INDENT_INDEX];
bits &= TEXT_INDENT_MASK;
bits >>= TEXT_INDENT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_TEXT_INDENT_SET) {
- *length = style->text_indent;
+ *length = style->i.text_indent;
*unit = bits >> 1;
}
@@ -1730,7 +1730,7 @@ static inline uint8_t get_text_indent(
static inline uint8_t get_white_space(
const css_computed_style *style)
{
- uint8_t bits = style->bits[WHITE_SPACE_INDEX];
+ uint8_t bits = style->i.bits[WHITE_SPACE_INDEX];
bits &= WHITE_SPACE_MASK;
bits >>= WHITE_SPACE_SHIFT;
@@ -1752,21 +1752,21 @@ static inline uint8_t get_background_position(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit)
{
- uint8_t bits = style->bits[BACKGROUND_POSITION_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_POSITION_INDEX];
bits &= BACKGROUND_POSITION_MASK;
bits >>= BACKGROUND_POSITION_SHIFT;
/* 1bit: type */
if (bits == CSS_BACKGROUND_POSITION_SET) {
- uint8_t bits1 = style->bits[BACKGROUND_POSITION_INDEX1];
+ uint8_t bits1 = style->i.bits[BACKGROUND_POSITION_INDEX1];
bits1 &= BACKGROUND_POSITION_MASK1;
bits1 >>= BACKGROUND_POSITION_SHIFT1;
/* 8bits: hhhhvvvv : hunit | vunit */
- *hlength = style->background_position[0];
+ *hlength = style->i.background_position[0];
*hunit = bits1 >> 4;
- *vlength = style->background_position[1];
+ *vlength = style->i.background_position[1];
*vunit = bits1 & 0xf;
}
@@ -1785,7 +1785,7 @@ static inline uint8_t get_background_position(
static inline uint8_t get_display(
const css_computed_style *style)
{
- uint8_t bits = style->bits[DISPLAY_INDEX];
+ uint8_t bits = style->i.bits[DISPLAY_INDEX];
bits &= DISPLAY_MASK;
bits >>= DISPLAY_SHIFT;
@@ -1802,7 +1802,7 @@ static inline uint8_t get_display(
static inline uint8_t get_font_variant(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_VARIANT_INDEX];
+ uint8_t bits = style->i.bits[FONT_VARIANT_INDEX];
bits &= FONT_VARIANT_MASK;
bits >>= FONT_VARIANT_SHIFT;
@@ -1819,7 +1819,7 @@ static inline uint8_t get_font_variant(
static inline uint8_t get_text_decoration(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_DECORATION_INDEX];
+ uint8_t bits = style->i.bits[TEXT_DECORATION_INDEX];
bits &= TEXT_DECORATION_MASK;
bits >>= TEXT_DECORATION_SHIFT;
@@ -1837,7 +1837,7 @@ static inline uint8_t get_font_family(
const css_computed_style *style,
lwc_string ***names)
{
- uint8_t bits = style->bits[FONT_FAMILY_INDEX];
+ uint8_t bits = style->i.bits[FONT_FAMILY_INDEX];
bits &= FONT_FAMILY_MASK;
bits >>= FONT_FAMILY_SHIFT;
@@ -1856,7 +1856,7 @@ static inline uint8_t get_font_family(
static inline uint8_t get_border_top_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_TOP_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_STYLE_INDEX];
bits &= BORDER_TOP_STYLE_MASK;
bits >>= BORDER_TOP_STYLE_SHIFT;
@@ -1873,7 +1873,7 @@ static inline uint8_t get_border_top_style(
static inline uint8_t get_border_right_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_RIGHT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_STYLE_INDEX];
bits &= BORDER_RIGHT_STYLE_MASK;
bits >>= BORDER_RIGHT_STYLE_SHIFT;
@@ -1890,7 +1890,7 @@ static inline uint8_t get_border_right_style(
static inline uint8_t get_border_bottom_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
bits &= BORDER_BOTTOM_STYLE_MASK;
bits >>= BORDER_BOTTOM_STYLE_SHIFT;
@@ -1907,7 +1907,7 @@ static inline uint8_t get_border_bottom_style(
static inline uint8_t get_border_left_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_LEFT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_STYLE_INDEX];
bits &= BORDER_LEFT_STYLE_MASK;
bits >>= BORDER_LEFT_STYLE_SHIFT;
@@ -1924,7 +1924,7 @@ static inline uint8_t get_border_left_style(
static inline uint8_t get_font_weight(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_WEIGHT_INDEX];
+ uint8_t bits = style->i.bits[FONT_WEIGHT_INDEX];
bits &= FONT_WEIGHT_MASK;
bits >>= FONT_WEIGHT_SHIFT;
@@ -1941,7 +1941,7 @@ static inline uint8_t get_font_weight(
static inline uint8_t get_list_style_type(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LIST_STYLE_TYPE_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_TYPE_INDEX];
bits &= LIST_STYLE_TYPE_MASK;
bits >>= LIST_STYLE_TYPE_SHIFT;
@@ -1958,7 +1958,7 @@ static inline uint8_t get_list_style_type(
static inline uint8_t get_outline_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OUTLINE_STYLE_INDEX];
+ uint8_t bits = style->i.bits[OUTLINE_STYLE_INDEX];
bits &= OUTLINE_STYLE_MASK;
bits >>= OUTLINE_STYLE_SHIFT;
@@ -1975,7 +1975,7 @@ static inline uint8_t get_outline_style(
static inline uint8_t get_table_layout(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TABLE_LAYOUT_INDEX];
+ uint8_t bits = style->i.bits[TABLE_LAYOUT_INDEX];
bits &= TABLE_LAYOUT_MASK;
bits >>= TABLE_LAYOUT_SHIFT;
@@ -1992,7 +1992,7 @@ static inline uint8_t get_table_layout(
static inline uint8_t get_unicode_bidi(
const css_computed_style *style)
{
- uint8_t bits = style->bits[UNICODE_BIDI_INDEX];
+ uint8_t bits = style->i.bits[UNICODE_BIDI_INDEX];
bits &= UNICODE_BIDI_MASK;
bits >>= UNICODE_BIDI_SHIFT;
@@ -2009,7 +2009,7 @@ static inline uint8_t get_unicode_bidi(
static inline uint8_t get_visibility(
const css_computed_style *style)
{
- uint8_t bits = style->bits[VISIBILITY_INDEX];
+ uint8_t bits = style->i.bits[VISIBILITY_INDEX];
bits &= VISIBILITY_MASK;
bits >>= VISIBILITY_SHIFT;
@@ -2026,7 +2026,7 @@ static inline uint8_t get_visibility(
static inline uint8_t get_list_style_position(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LIST_STYLE_POSITION_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_POSITION_INDEX];
bits &= LIST_STYLE_POSITION_MASK;
bits >>= LIST_STYLE_POSITION_SHIFT;
@@ -2043,7 +2043,7 @@ static inline uint8_t get_list_style_position(
static inline uint8_t get_text_align(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_ALIGN_INDEX];
+ uint8_t bits = style->i.bits[TEXT_ALIGN_INDEX];
bits &= TEXT_ALIGN_MASK;
bits >>= TEXT_ALIGN_SHIFT;
diff --git a/src/select/propset.h b/src/select/propset.h
index 928b9e3..76e4fe6 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -19,54 +19,60 @@
/** Default values are 'initial value', unless the property is inherited,
* in which case it is 'inherit'. */
static const css_computed_uncommon default_uncommon = {
- .bits = {
- (CSS_LETTER_SPACING_INHERIT << 2) |
- CSS_OUTLINE_COLOR_INVERT,
- (CSS_OUTLINE_WIDTH_MEDIUM << 1) |
- CSS_BORDER_SPACING_INHERIT,
- 0,
- (CSS_WORD_SPACING_INHERIT << 2) |
- (CSS_COUNTER_INCREMENT_NONE << 1) |
- CSS_COUNTER_RESET_NONE,
- (CSS_CURSOR_INHERIT << 3) |
- (CSS_WRITING_MODE_INHERIT << 1),
- 0,
- 0,
- (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL,
- (CSS_COLUMN_COUNT_AUTO << 6) |
- (CSS_COLUMN_FILL_BALANCE << 4) |
- (CSS_COLUMN_RULE_STYLE_NONE << 0),
- (CSS_COLUMN_GAP_NORMAL << 2) |
- (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
- (CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
- (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
- (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
- (CSS_BREAK_INSIDE_AUTO)
+ .i = {
+ .bits = {
+ (CSS_LETTER_SPACING_INHERIT << 2) |
+ CSS_OUTLINE_COLOR_INVERT,
+ (CSS_OUTLINE_WIDTH_MEDIUM << 1) |
+ CSS_BORDER_SPACING_INHERIT,
+ 0,
+ (CSS_WORD_SPACING_INHERIT << 2) |
+ (CSS_COUNTER_INCREMENT_NONE << 1) |
+ CSS_COUNTER_RESET_NONE,
+ (CSS_CURSOR_INHERIT << 3) |
+ (CSS_WRITING_MODE_INHERIT << 1),
+ 0,
+ 0,
+ (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL,
+ (CSS_COLUMN_COUNT_AUTO << 6) |
+ (CSS_COLUMN_FILL_BALANCE << 4) |
+ (CSS_COLUMN_RULE_STYLE_NONE << 0),
+ (CSS_COLUMN_GAP_NORMAL << 2) |
+ (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
+ (CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
+ (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
+ (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
+ (CSS_BREAK_INSIDE_AUTO)
+ },
+ .border_spacing = { 0, 0 },
+ .clip = { 0, 0, 0, 0 },
+ .letter_spacing = 0,
+ .outline_color = 0x0,
+ .outline_width = 0,
+ .word_spacing = 0,
+ .column_count = 0,
+ .column_gap = 0,
+ .column_rule_color = 0,
+ .column_rule_width = 0,
+ .column_width = 0
},
- .border_spacing = { 0, 0 },
- .clip = { 0, 0, 0, 0 },
- .letter_spacing = 0,
- .outline_color = 0x0,
- .outline_width = 0,
- .word_spacing = 0,
- .column_count = 0,
- .column_gap = 0,
- .column_rule_color = 0,
- .column_rule_width = 0,
- .column_width = 0,
.counter_increment = NULL,
.counter_reset = NULL,
.content = NULL,
- .cursor = NULL
+ .cursor = NULL,
+ .next = NULL,
+ .count = 0,
+ .bin = UINT32_MAX
};
#define ENSURE_UNCOMMON do { \
- if (style->uncommon == NULL) { \
- style->uncommon = malloc(sizeof(css_computed_uncommon));\
- if (style->uncommon == NULL) \
+ if (style->i.uncommon == NULL) { \
+ style->i.uncommon = malloc( \
+ sizeof(css_computed_uncommon)); \
+ if (style->i.uncommon == NULL) \
return CSS_NOMEM; \
\
- memcpy(style->uncommon, &default_uncommon, \
+ memcpy(style->i.uncommon, &default_uncommon, \
sizeof(css_computed_uncommon)); \
} \
} while(0)
@@ -105,13 +111,13 @@ static inline css_error set_letter_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[LETTER_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[LETTER_SPACING_INDEX];
/* 6bits: uuuutt : unit | type */
*bits = (*bits & ~LETTER_SPACING_MASK) |
(((type & 0x3) | unit << 2) << LETTER_SPACING_SHIFT);
- style->uncommon->letter_spacing = length;
+ style->i.uncommon->i.letter_spacing = length;
return CSS_OK;
}
@@ -129,13 +135,13 @@ static inline css_error set_outline_color(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[OUTLINE_COLOR_INDEX];
+ bits = &style->i.uncommon->i.bits[OUTLINE_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~OUTLINE_COLOR_MASK) |
((type & 0x3) << OUTLINE_COLOR_SHIFT);
- style->uncommon->outline_color = color;
+ style->i.uncommon->i.outline_color = color;
return CSS_OK;
}
@@ -154,13 +160,13 @@ static inline css_error set_outline_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[OUTLINE_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[OUTLINE_WIDTH_INDEX];
/* 7bits: uuuuttt : unit | type */
*bits = (*bits & ~OUTLINE_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << OUTLINE_WIDTH_SHIFT);
- style->uncommon->outline_width = length;
+ style->i.uncommon->i.outline_width = length;
return CSS_OK;
}
@@ -182,20 +188,20 @@ static inline css_error set_border_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BORDER_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[BORDER_SPACING_INDEX];
/* 1 bit: type */
*bits = (*bits & ~BORDER_SPACING_MASK) |
((type & 0x1) << BORDER_SPACING_SHIFT);
- bits = &style->uncommon->bits[BORDER_SPACING_INDEX1];
+ bits = &style->i.uncommon->i.bits[BORDER_SPACING_INDEX1];
/* 8bits: hhhhvvvv : hunit | vunit */
*bits = (((hunit << 4) | vunit) << BORDER_SPACING_SHIFT1);
- style->uncommon->border_spacing[0] = hlength;
- style->uncommon->border_spacing[1] = vlength;
+ style->i.uncommon->i.border_spacing[0] = hlength;
+ style->i.uncommon->i.border_spacing[1] = vlength;
return CSS_OK;
}
@@ -215,7 +221,7 @@ static inline css_error set_break_after(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_AFTER_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_AFTER_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_AFTER_MASK) |
@@ -237,7 +243,7 @@ static inline css_error set_break_before(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_BEFORE_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_BEFORE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_BEFORE_MASK) |
@@ -259,7 +265,7 @@ static inline css_error set_break_inside(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_INSIDE_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_INSIDE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_INSIDE_MASK) |
@@ -282,13 +288,13 @@ static inline css_error set_word_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[WORD_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[WORD_SPACING_INDEX];
/* 6bits: uuuutt : unit | type */
*bits = (*bits & ~WORD_SPACING_MASK) |
(((type & 0x3) | (unit << 2)) << WORD_SPACING_SHIFT);
- style->uncommon->word_spacing = length;
+ style->i.uncommon->i.word_spacing = length;
return CSS_OK;
}
@@ -306,7 +312,7 @@ static inline css_error set_writing_mode(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[WRITING_MODE_INDEX];
+ bits = &style->i.uncommon->i.bits[WRITING_MODE_INDEX];
/* 2bits: type */
*bits = (*bits & ~WRITING_MODE_MASK) |
@@ -331,8 +337,8 @@ static inline css_error set_counter_increment(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COUNTER_INCREMENT_INDEX];
- oldcounters = style->uncommon->counter_increment;
+ bits = &style->i.uncommon->i.bits[COUNTER_INCREMENT_INDEX];
+ oldcounters = style->i.uncommon->counter_increment;
/* 1bit: type */
*bits = (*bits & ~COUNTER_INCREMENT_MASK) |
@@ -341,7 +347,7 @@ static inline css_error set_counter_increment(
for (c = counters; c != NULL && c->name != NULL; c++)
c->name = lwc_string_ref(c->name);
- style->uncommon->counter_increment = counters;
+ style->i.uncommon->counter_increment = counters;
/* Free existing array */
if (oldcounters != NULL) {
@@ -371,8 +377,8 @@ static inline css_error set_counter_reset(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COUNTER_RESET_INDEX];
- oldcounters = style->uncommon->counter_reset;
+ bits = &style->i.uncommon->i.bits[COUNTER_RESET_INDEX];
+ oldcounters = style->i.uncommon->counter_reset;
/* 1bit: type */
*bits = (*bits & ~COUNTER_RESET_MASK) |
@@ -381,7 +387,7 @@ static inline css_error set_counter_reset(
for (c = counters; c != NULL && c->name != NULL; c++)
c->name = lwc_string_ref(c->name);
- style->uncommon->counter_reset = counters;
+ style->i.uncommon->counter_reset = counters;
/* Free existing array */
if (oldcounters != NULL) {
@@ -411,8 +417,8 @@ static inline css_error set_cursor(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[CURSOR_INDEX];
- oldurls = style->uncommon->cursor;
+ bits = &style->i.uncommon->i.bits[CURSOR_INDEX];
+ oldurls = style->i.uncommon->cursor;
/* 5bits: type */
*bits = (*bits & ~CURSOR_MASK) |
@@ -421,7 +427,7 @@ static inline css_error set_cursor(
for (s = urls; s != NULL && *s != NULL; s++)
*s = lwc_string_ref(*s);
- style->uncommon->cursor = urls;
+ style->i.uncommon->cursor = urls;
/* Free existing array */
if (oldurls != NULL) {
@@ -453,7 +459,7 @@ static inline css_error set_clip(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[CLIP_INDEX];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX];
/* 6bits: trblyy : top | right | bottom | left | type */
*bits = (*bits & ~CLIP_MASK) |
@@ -465,20 +471,20 @@ static inline css_error set_clip(
(rect->bottom_auto ? 0x8 : 0) |
(rect->left_auto ? 0x4 : 0)) << CLIP_SHIFT);
- bits = &style->uncommon->bits[CLIP_INDEX1];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX1];
/* 8bits: ttttrrrr : top | right */
*bits = (((rect->tunit << 4) | rect->runit) << CLIP_SHIFT1);
- bits = &style->uncommon->bits[CLIP_INDEX2];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX2];
/* 8bits: bbbbllll : bottom | left */
*bits = (((rect->bunit << 4) | rect->lunit) << CLIP_SHIFT2);
- style->uncommon->clip[0] = rect->top;
- style->uncommon->clip[1] = rect->right;
- style->uncommon->clip[2] = rect->bottom;
- style->uncommon->clip[3] = rect->left;
+ style->i.uncommon->i.clip[0] = rect->top;
+ style->i.uncommon->i.clip[1] = rect->right;
+ style->i.uncommon->i.clip[2] = rect->bottom;
+ style->i.uncommon->i.clip[3] = rect->left;
}
return CSS_OK;
@@ -501,13 +507,13 @@ static inline css_error set_column_count(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_COUNT_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_COUNT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_COUNT_MASK) |
((type & 0x3) << COLUMN_COUNT_SHIFT);
- style->uncommon->column_count = count;
+ style->i.uncommon->i.column_count = count;
return CSS_OK;
}
@@ -525,7 +531,7 @@ static inline css_error set_column_fill(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_FILL_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_FILL_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_FILL_MASK) |
@@ -548,13 +554,13 @@ static inline css_error set_column_gap(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_GAP_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_GAP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~COLUMN_GAP_MASK) |
(((type & 0x3) | (unit << 2)) << COLUMN_GAP_SHIFT);
- style->uncommon->column_gap = length;
+ style->i.uncommon->i.column_gap = length;
return CSS_OK;
}
@@ -573,13 +579,13 @@ static inline css_error set_column_rule_color(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_COLOR_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~COLUMN_RULE_COLOR_MASK) |
((type & 0x3) << COLUMN_RULE_COLOR_SHIFT);
- style->uncommon->column_rule_color = color;
+ style->i.uncommon->i.column_rule_color = color;
return CSS_OK;
}
@@ -597,7 +603,7 @@ static inline css_error set_column_rule_style(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_STYLE_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~COLUMN_RULE_STYLE_MASK) |
@@ -620,13 +626,13 @@ static inline css_error set_column_rule_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~COLUMN_RULE_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << COLUMN_RULE_WIDTH_SHIFT);
- style->uncommon->column_rule_width = length;
+ style->i.uncommon->i.column_rule_width = length;
return CSS_OK;
}
@@ -644,7 +650,7 @@ static inline css_error set_column_span(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_SPAN_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_SPAN_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_SPAN_MASK) |
@@ -667,13 +673,13 @@ static inline css_error set_column_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~COLUMN_WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << COLUMN_WIDTH_SHIFT);
- style->uncommon->column_width = length;
+ style->i.uncommon->i.column_width = length;
return CSS_OK;
}
@@ -695,8 +701,8 @@ static inline css_error set_content(
ENSURE_UNCOMMON;
/* 2bits: type */
- bits = &style->uncommon->bits[CONTENT_INDEX];
- oldcontent = style->uncommon->content;
+ bits = &style->i.uncommon->i.bits[CONTENT_INDEX];
+ oldcontent = style->i.uncommon->content;
*bits = (*bits & ~CONTENT_MASK) |
((type & 0x3) << CONTENT_SHIFT);
@@ -728,7 +734,7 @@ static inline css_error set_content(
}
}
- style->uncommon->content = content;
+ style->i.uncommon->content = content;
/* Free existing array */
if (oldcontent != NULL) {
@@ -773,12 +779,12 @@ static inline css_error set_vertical_align(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[VERTICAL_ALIGN_INDEX];
+ uint8_t *bits = &style->i.bits[VERTICAL_ALIGN_INDEX];
/* 8bits: uuuutttt : units | type */
*bits = (((type & 0xf) | (unit << 4)) << VERTICAL_ALIGN_SHIFT);
- style->vertical_align = length;
+ style->i.vertical_align = length;
return CSS_OK;
}
@@ -791,12 +797,12 @@ static inline css_error set_font_size(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[FONT_SIZE_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_SIZE_INDEX];
/* 8bits: uuuutttt : units | type */
*bits = (((type & 0xf) | (unit << 4)) << FONT_SIZE_SHIFT);
- style->font_size = length;
+ style->i.font_size = length;
return CSS_OK;
}
@@ -810,13 +816,13 @@ static inline css_error set_border_top_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_TOP_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_TOP_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_TOP_WIDTH_SHIFT);
- style->border_width[0] = length;
+ style->i.border_width[0] = length;
return CSS_OK;
}
@@ -831,13 +837,13 @@ static inline css_error set_border_right_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_RIGHT_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_RIGHT_WIDTH_SHIFT);
- style->border_width[1] = length;
+ style->i.border_width[1] = length;
return CSS_OK;
}
@@ -852,13 +858,13 @@ static inline css_error set_border_bottom_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_BOTTOM_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_BOTTOM_WIDTH_SHIFT);
- style->border_width[2] = length;
+ style->i.border_width[2] = length;
return CSS_OK;
}
@@ -873,13 +879,13 @@ static inline css_error set_border_left_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_LEFT_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_LEFT_WIDTH_SHIFT);
- style->border_width[3] = length;
+ style->i.border_width[3] = length;
return CSS_OK;
}
@@ -894,17 +900,17 @@ static inline css_error set_background_image(
css_computed_style *style, uint8_t type,
lwc_string *url)
{
- uint8_t *bits = &style->bits[BACKGROUND_IMAGE_INDEX];
- lwc_string *oldurl = style->background_image;
+ uint8_t *bits = &style->i.bits[BACKGROUND_IMAGE_INDEX];
+ lwc_string *oldurl = style->i.background_image;
/* 1bit: type */
*bits = (*bits & ~BACKGROUND_IMAGE_MASK) |
((type & 0x1) << BACKGROUND_IMAGE_SHIFT);
if (url != NULL) {
- style->background_image = lwc_string_ref(url);
+ style->i.background_image = lwc_string_ref(url);
} else {
- style->background_image = NULL;
+ style->i.background_image = NULL;
}
if (oldurl != NULL)
@@ -923,13 +929,13 @@ static inline css_error set_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[COLOR_INDEX];
/* 1bit: type */
*bits = (*bits & ~COLOR_MASK) |
((type & 0x1) << COLOR_SHIFT);
- style->color = color;
+ style->i.color = color;
return CSS_OK;
}
@@ -944,17 +950,17 @@ static inline css_error set_list_style_image(
css_computed_style *style, uint8_t type,
lwc_string *url)
{
- uint8_t *bits = &style->bits[LIST_STYLE_IMAGE_INDEX];
- lwc_string *oldurl = style->list_style_image;
+ uint8_t *bits = &style->i.bits[LIST_STYLE_IMAGE_INDEX];
+ lwc_string *oldurl = style->i.list_style_image;
/* 1bit: type */
*bits = (*bits & ~LIST_STYLE_IMAGE_MASK) |
((type & 0x1) << LIST_STYLE_IMAGE_SHIFT);
if (url != NULL) {
- style->list_style_image = lwc_string_ref(url);
+ style->i.list_style_image = lwc_string_ref(url);
} else {
- style->list_style_image = NULL;
+ style->i.list_style_image = NULL;
}
if (oldurl != NULL)
@@ -973,7 +979,7 @@ static inline css_error set_quotes(
css_computed_style *style, uint8_t type,
lwc_string **quotes)
{
- uint8_t *bits = &style->bits[QUOTES_INDEX];
+ uint8_t *bits = &style->i.bits[QUOTES_INDEX];
lwc_string **oldquotes = style->quotes;
lwc_string **s;
@@ -1008,13 +1014,13 @@ static inline css_error set_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[TOP_INDEX];
+ uint8_t *bits = &style->i.bits[TOP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~TOP_MASK) |
(((type & 0x3) | (unit << 2)) << TOP_SHIFT);
- style->top = length;
+ style->i.top = length;
return CSS_OK;
}
@@ -1029,13 +1035,13 @@ static inline css_error set_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[RIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~RIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << RIGHT_SHIFT);
- style->right = length;
+ style->i.right = length;
return CSS_OK;
}
@@ -1050,13 +1056,13 @@ static inline css_error set_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[BOTTOM_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~BOTTOM_MASK) |
(((type & 0x3) | (unit << 2)) << BOTTOM_SHIFT);
- style->bottom = length;
+ style->i.bottom = length;
return CSS_OK;
}
@@ -1071,13 +1077,13 @@ static inline css_error set_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[LEFT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~LEFT_MASK) |
(((type & 0x3) | (unit << 2)) << LEFT_SHIFT);
- style->left = length;
+ style->i.left = length;
return CSS_OK;
}
@@ -1092,13 +1098,13 @@ static inline css_error set_border_top_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_TOP_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_TOP_COLOR_MASK) |
((type & 0x3) << BORDER_TOP_COLOR_SHIFT);
- style->border_color[0] = color;
+ style->i.border_color[0] = color;
return CSS_OK;
}
@@ -1113,13 +1119,13 @@ static inline css_error set_border_right_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_RIGHT_COLOR_MASK) |
((type & 0x3) << BORDER_RIGHT_COLOR_SHIFT);
- style->border_color[1] = color;
+ style->i.border_color[1] = color;
return CSS_OK;
}
@@ -1134,13 +1140,13 @@ static inline css_error set_border_bottom_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_BOTTOM_COLOR_MASK) |
((type & 0x3) << BORDER_BOTTOM_COLOR_SHIFT);
- style->border_color[2] = color;
+ style->i.border_color[2] = color;
return CSS_OK;
}
@@ -1155,13 +1161,13 @@ static inline css_error set_border_left_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_LEFT_COLOR_MASK) |
((type & 0x3) << BORDER_LEFT_COLOR_SHIFT);
- style->border_color[3] = color;
+ style->i.border_color[3] = color;
return CSS_OK;
}
@@ -1176,13 +1182,13 @@ static inline css_error set_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << HEIGHT_SHIFT);
- style->height = length;
+ style->i.height = length;
return CSS_OK;
}
@@ -1197,13 +1203,13 @@ static inline css_error set_line_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[LINE_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[LINE_HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~LINE_HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << LINE_HEIGHT_SHIFT);
- style->line_height = length;
+ style->i.line_height = length;
return CSS_OK;
}
@@ -1218,13 +1224,13 @@ static inline css_error set_background_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BACKGROUND_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BACKGROUND_COLOR_MASK) |
((type & 0x3) << BACKGROUND_COLOR_SHIFT);
- style->background_color = color;
+ style->i.background_color = color;
return CSS_OK;
}
@@ -1239,13 +1245,13 @@ static inline css_error set_z_index(
css_computed_style *style, uint8_t type,
int32_t z_index)
{
- uint8_t *bits = &style->bits[Z_INDEX_INDEX];
+ uint8_t *bits = &style->i.bits[Z_INDEX_INDEX];
/* 2bits: type */
*bits = (*bits & ~Z_INDEX_MASK) |
((type & 0x3) << Z_INDEX_SHIFT);
- style->z_index = z_index;
+ style->i.z_index = z_index;
return CSS_OK;
}
@@ -1260,13 +1266,13 @@ static inline css_error set_margin_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_TOP_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_TOP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_TOP_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_TOP_SHIFT);
- style->margin[0] = length;
+ style->i.margin[0] = length;
return CSS_OK;
}
@@ -1281,13 +1287,13 @@ static inline css_error set_margin_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_RIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_RIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_RIGHT_SHIFT);
- style->margin[1] = length;
+ style->i.margin[1] = length;
return CSS_OK;
}
@@ -1302,13 +1308,13 @@ static inline css_error set_margin_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_BOTTOM_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_BOTTOM_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_BOTTOM_SHIFT);
- style->margin[2] = length;
+ style->i.margin[2] = length;
return CSS_OK;
}
@@ -1323,13 +1329,13 @@ static inline css_error set_margin_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_LEFT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_LEFT_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_LEFT_SHIFT);
- style->margin[3] = length;
+ style->i.margin[3] = length;
return CSS_OK;
}
@@ -1343,7 +1349,7 @@ static inline css_error set_margin_left(
static inline css_error set_background_attachment(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BACKGROUND_ATTACHMENT_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
/* 2bits: type */
*bits = (*bits & ~BACKGROUND_ATTACHMENT_MASK) |
@@ -1361,7 +1367,7 @@ static inline css_error set_background_attachment(
static inline css_error set_border_collapse(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_COLLAPSE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_COLLAPSE_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_COLLAPSE_MASK) |
@@ -1379,7 +1385,7 @@ static inline css_error set_border_collapse(
static inline css_error set_caption_side(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[CAPTION_SIDE_INDEX];
+ uint8_t *bits = &style->i.bits[CAPTION_SIDE_INDEX];
/* 2bits: type */
*bits = (*bits & ~CAPTION_SIDE_MASK) |
@@ -1397,7 +1403,7 @@ static inline css_error set_caption_side(
static inline css_error set_direction(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[DIRECTION_INDEX];
+ uint8_t *bits = &style->i.bits[DIRECTION_INDEX];
/* 2bits: type */
*bits = (*bits & ~DIRECTION_MASK) |
@@ -1416,13 +1422,13 @@ static inline css_error set_max_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MAX_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MAX_HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MAX_HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << MAX_HEIGHT_SHIFT);
- style->max_height = length;
+ style->i.max_height = length;
return CSS_OK;
}
@@ -1437,13 +1443,13 @@ static inline css_error set_max_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MAX_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[MAX_WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MAX_WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << MAX_WIDTH_SHIFT);
- style->max_width = length;
+ style->i.max_width = length;
return CSS_OK;
}
@@ -1458,13 +1464,13 @@ static inline css_error set_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << WIDTH_SHIFT);
- style->width = length;
+ style->i.width = length;
return CSS_OK;
}
@@ -1478,7 +1484,7 @@ static inline css_error set_width(
static inline css_error set_empty_cells(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[EMPTY_CELLS_INDEX];
+ uint8_t *bits = &style->i.bits[EMPTY_CELLS_INDEX];
/* 2bits: type */
*bits = (*bits & ~EMPTY_CELLS_MASK) |
@@ -1496,7 +1502,7 @@ static inline css_error set_empty_cells(
static inline css_error set_float(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FLOAT_INDEX];
+ uint8_t *bits = &style->i.bits[FLOAT_INDEX];
/* 2bits: type */
*bits = (*bits & ~FLOAT_MASK) |
@@ -1514,7 +1520,7 @@ static inline css_error set_float(
static inline css_error set_font_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_STYLE_INDEX];
/* 2bits: type */
*bits = (*bits & ~FONT_STYLE_MASK) |
@@ -1533,13 +1539,13 @@ static inline css_error set_min_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MIN_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MIN_HEIGHT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~MIN_HEIGHT_MASK) |
(((type & 0x1) | (unit << 1)) << MIN_HEIGHT_SHIFT);
- style->min_height = length;
+ style->i.min_height = length;
return CSS_OK;
}
@@ -1554,13 +1560,13 @@ static inline css_error set_min_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MIN_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[MIN_WIDTH_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~MIN_WIDTH_MASK) |
(((type & 0x1) | (unit << 1)) << MIN_WIDTH_SHIFT);
- style->min_width = length;
+ style->i.min_width = length;
return CSS_OK;
}
@@ -1574,7 +1580,7 @@ static inline css_error set_min_width(
static inline css_error set_background_repeat(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BACKGROUND_REPEAT_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_REPEAT_INDEX];
/* 3bits: type */
*bits = (*bits & ~BACKGROUND_REPEAT_MASK) |
@@ -1592,7 +1598,7 @@ static inline css_error set_background_repeat(
static inline css_error set_clear(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[CLEAR_INDEX];
+ uint8_t *bits = &style->i.bits[CLEAR_INDEX];
/* 3bits: type */
*bits = (*bits & ~CLEAR_MASK) |
@@ -1611,13 +1617,13 @@ static inline css_error set_padding_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_TOP_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_TOP_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_TOP_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_TOP_SHIFT);
- style->padding[0] = length;
+ style->i.padding[0] = length;
return CSS_OK;
}
@@ -1632,13 +1638,13 @@ static inline css_error set_padding_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_RIGHT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_RIGHT_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_RIGHT_SHIFT);
- style->padding[1] = length;
+ style->i.padding[1] = length;
return CSS_OK;
}
@@ -1653,13 +1659,13 @@ static inline css_error set_padding_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_BOTTOM_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_BOTTOM_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_BOTTOM_SHIFT);
- style->padding[2] = length;
+ style->i.padding[2] = length;
return CSS_OK;
}
@@ -1674,13 +1680,13 @@ static inline css_error set_padding_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_LEFT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_LEFT_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_LEFT_SHIFT);
- style->padding[3] = length;
+ style->i.padding[3] = length;
return CSS_OK;
}
@@ -1694,7 +1700,7 @@ static inline css_error set_padding_left(
static inline css_error set_overflow_x(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OVERFLOW_X_INDEX];
+ uint8_t *bits = &style->i.bits[OVERFLOW_X_INDEX];
/* 3bits: type */
*bits = (*bits & ~OVERFLOW_X_MASK) |
@@ -1712,7 +1718,7 @@ static inline css_error set_overflow_x(
static inline css_error set_overflow_y(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OVERFLOW_Y_INDEX];
+ uint8_t *bits = &style->i.bits[OVERFLOW_Y_INDEX];
/* 3bits: type */
*bits = (*bits & ~OVERFLOW_Y_MASK) |
@@ -1730,7 +1736,7 @@ static inline css_error set_overflow_y(
static inline css_error set_position(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[POSITION_INDEX];
+ uint8_t *bits = &style->i.bits[POSITION_INDEX];
/* 3bits: type */
*bits = (*bits & ~POSITION_MASK) |
@@ -1749,13 +1755,13 @@ static inline css_error set_opacity(
css_computed_style *style,
uint8_t type, css_fixed opacity)
{
- uint8_t *bits = &style->bits[OPACITY_INDEX];
+ uint8_t *bits = &style->i.bits[OPACITY_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~OPACITY_MASK) |
((type & 0x1) << OPACITY_SHIFT);
- style->opacity = opacity;
+ style->i.opacity = opacity;
return CSS_OK;
}
@@ -1769,7 +1775,7 @@ static inline css_error set_opacity(
static inline css_error set_text_transform(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_TRANSFORM_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_TRANSFORM_INDEX];
/* 3bits: type */
*bits = (*bits & ~TEXT_TRANSFORM_MASK) |
@@ -1788,13 +1794,13 @@ static inline css_error set_text_indent(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[TEXT_INDENT_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_INDENT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~TEXT_INDENT_MASK) |
(((type & 0x1) | (unit << 1)) << TEXT_INDENT_SHIFT);
- style->text_indent = length;
+ style->i.text_indent = length;
return CSS_OK;
}
@@ -1808,7 +1814,7 @@ static inline css_error set_text_indent(
static inline css_error set_white_space(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[WHITE_SPACE_INDEX];
+ uint8_t *bits = &style->i.bits[WHITE_SPACE_INDEX];
/* 3bits: type */
*bits = (*bits & ~WHITE_SPACE_MASK) |
@@ -1832,19 +1838,19 @@ static inline css_error set_background_position(
{
uint8_t *bits;
- bits = &style->bits[BACKGROUND_POSITION_INDEX];
+ bits = &style->i.bits[BACKGROUND_POSITION_INDEX];
/* 1 bit: type */
*bits = (*bits & ~BACKGROUND_POSITION_MASK) |
((type & 0x1) << BACKGROUND_POSITION_SHIFT);
- bits = &style->bits[BACKGROUND_POSITION_INDEX1];
+ bits = &style->i.bits[BACKGROUND_POSITION_INDEX1];
/* 8bits: hhhhvvvv : hunit | vunit */
*bits = (((hunit << 4) | vunit) << BACKGROUND_POSITION_SHIFT1);
- style->background_position[0] = hlength;
- style->background_position[1] = vlength;
+ style->i.background_position[0] = hlength;
+ style->i.background_position[1] = vlength;
return CSS_OK;
}
@@ -1860,7 +1866,7 @@ static inline css_error set_background_position(
static inline css_error set_display(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[DISPLAY_INDEX];
+ uint8_t *bits = &style->i.bits[DISPLAY_INDEX];
/* 5bits: type */
*bits = (*bits & ~DISPLAY_MASK) |
@@ -1878,7 +1884,7 @@ static inline css_error set_display(
static inline css_error set_font_variant(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_VARIANT_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_VARIANT_INDEX];
/* 2bits: type */
*bits = (*bits & ~FONT_VARIANT_MASK) |
@@ -1896,7 +1902,7 @@ static inline css_error set_font_variant(
static inline css_error set_text_decoration(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_DECORATION_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_DECORATION_INDEX];
/* 5bits: type */
*bits = (*bits & ~TEXT_DECORATION_MASK) |
@@ -1915,7 +1921,7 @@ static inline css_error set_font_family(
css_computed_style *style, uint8_t type,
lwc_string **names)
{
- uint8_t *bits = &style->bits[FONT_FAMILY_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_FAMILY_INDEX];
lwc_string **oldnames = style->font_family;
lwc_string **s;
@@ -1949,7 +1955,7 @@ static inline css_error set_font_family(
static inline css_error set_border_top_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_TOP_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_TOP_STYLE_MASK) |
@@ -1967,7 +1973,7 @@ static inline css_error set_border_top_style(
static inline css_error set_border_right_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_RIGHT_STYLE_MASK) |
@@ -1985,7 +1991,7 @@ static inline css_error set_border_right_style(
static inline css_error set_border_bottom_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_BOTTOM_STYLE_MASK) |
@@ -2003,7 +2009,7 @@ static inline css_error set_border_bottom_style(
static inline css_error set_border_left_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_LEFT_STYLE_MASK) |
@@ -2021,7 +2027,7 @@ static inline css_error set_border_left_style(
static inline css_error set_font_weight(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_WEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_WEIGHT_INDEX];
/* 4bits: type */
*bits = (*bits & ~FONT_WEIGHT_MASK) |
@@ -2039,7 +2045,7 @@ static inline css_error set_font_weight(
static inline css_error set_list_style_type(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[LIST_STYLE_TYPE_INDEX];
+ uint8_t *bits = &style->i.bits[LIST_STYLE_TYPE_INDEX];
/* 4bits: type */
*bits = (*bits & ~LIST_STYLE_TYPE_MASK) |
@@ -2057,7 +2063,7 @@ static inline css_error set_list_style_type(
static inline css_error set_outline_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OUTLINE_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[OUTLINE_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~OUTLINE_STYLE_MASK) |
@@ -2075,7 +2081,7 @@ static inline css_error set_outline_style(
static inline css_error set_table_layout(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TABLE_LAYOUT_INDEX];
+ uint8_t *bits = &style->i.bits[TABLE_LAYOUT_INDEX];
/* 2bits: type */
*bits = (*bits & ~TABLE_LAYOUT_MASK) |
@@ -2093,7 +2099,7 @@ static inline css_error set_table_layout(
static inline css_error set_unicode_bidi(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[UNICODE_BIDI_INDEX];
+ uint8_t *bits = &style->i.bits[UNICODE_BIDI_INDEX];
/* 2bits: type */
*bits = (*bits & ~UNICODE_BIDI_MASK) |
@@ -2111,7 +2117,7 @@ static inline css_error set_unicode_bidi(
static inline css_error set_visibility(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[VISIBILITY_INDEX];
+ uint8_t *bits = &style->i.bits[VISIBILITY_INDEX];
/* 2bits: type */
*bits = (*bits & ~VISIBILITY_MASK) |
@@ -2129,7 +2135,7 @@ static inline css_error set_visibility(
static inline css_error set_list_style_position(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[LIST_STYLE_POSITION_INDEX];
+ uint8_t *bits = &style->i.bits[LIST_STYLE_POSITION_INDEX];
/* 2bits: type */
*bits = (*bits & ~LIST_STYLE_POSITION_MASK) |
@@ -2147,7 +2153,7 @@ static inline css_error set_list_style_position(
static inline uint8_t set_text_align(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_ALIGN_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_ALIGN_INDEX];
/* 4bits: type */
*bits = (*bits & ~TEXT_ALIGN_MASK) |
diff --git a/src/select/select.c b/src/select/select.c
index ce56def..367c26a 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -1172,7 +1172,7 @@ css_error set_initial(css_select_state *state,
case GROUP_NORMAL:
break;
case GROUP_UNCOMMON:
- if (state->computed->uncommon == NULL)
+ if (state->computed->i.uncommon == NULL)
return CSS_OK;
break;
case GROUP_PAGE:
@@ -1180,7 +1180,7 @@ css_error set_initial(css_select_state *state,
return CSS_OK;
break;
case GROUP_AURAL:
- if (state->computed->aural == NULL)
+ if (state->computed->i.aural == NULL)
return CSS_OK;
break;
}