summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/select/properties.c16
-rw-r--r--src/select/propset.h14
-rw-r--r--src/select/select.c1
3 files changed, 16 insertions, 15 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index 42ae10f..bbf24db 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -15,7 +15,7 @@
static css_error cascade_bg_border_color(uint32_t opv, css_style *style,
css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t, css_color));
+ css_error (*fun)(css_computed_style *, uint8_t, css_colour));
static css_error cascade_uri_none(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t,
@@ -613,11 +613,11 @@ css_error cascade_color(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_COLOR_INHERIT;
- css_color color = 0;
+ css_colour color = 0;
if (isInherit(opv) == false) {
value = CSS_COLOR_COLOR;
- color = *((css_color *) style->bytecode);
+ color = *((css_colour *) style->bytecode);
advance_bytecode(style, sizeof(color));
}
@@ -1736,13 +1736,13 @@ css_error cascade_outline_color(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_OUTLINE_COLOR_INHERIT;
- css_color color = 0;
+ css_colour color = 0;
if (isInherit(opv) == false) {
switch (getValue(opv)) {
case OUTLINE_COLOR_SET:
value = CSS_OUTLINE_COLOR_COLOR;
- color = *((css_color *) style->bytecode);
+ color = *((css_colour *) style->bytecode);
advance_bytecode(style, sizeof(color));
break;
case OUTLINE_COLOR_INVERT:
@@ -2900,10 +2900,10 @@ css_error initial_z_index(css_computed_style *style)
******************************************************************************/
css_error cascade_bg_border_color(uint32_t opv, css_style *style,
css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t, css_color))
+ css_error (*fun)(css_computed_style *, uint8_t, css_colour))
{
uint16_t value = CSS_BACKGROUND_COLOR_INHERIT;
- css_color color = 0;
+ css_colour color = 0;
assert(CSS_BACKGROUND_COLOR_INHERIT == CSS_BORDER_COLOR_INHERIT);
assert(CSS_BACKGROUND_COLOR_TRANSPARENT ==
@@ -2917,7 +2917,7 @@ css_error cascade_bg_border_color(uint32_t opv, css_style *style,
break;
case BACKGROUND_COLOR_SET:
value = CSS_BACKGROUND_COLOR_COLOR;
- color = *((css_color *) style->bytecode);
+ color = *((css_colour *) style->bytecode);
advance_bytecode(style, sizeof(color));
break;
}
diff --git a/src/select/propset.h b/src/select/propset.h
index 27860f0..3862076 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -56,7 +56,7 @@ static inline css_error set_letter_spacing(
#define OUTLINE_COLOR_SHIFT 0
#define OUTLINE_COLOR_MASK 0x3
static inline css_error set_outline_color(
- css_computed_style *style, uint8_t type, css_color color)
+ css_computed_style *style, uint8_t type, css_colour color)
{
uint8_t *bits;
@@ -507,7 +507,7 @@ static inline css_error set_background_image(
#define COLOR_MASK 0x1
static inline css_error set_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[COLOR_INDEX];
@@ -637,7 +637,7 @@ static inline css_error set_left(
#define BORDER_TOP_COLOR_MASK 0x3
static inline css_error set_border_top_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[BORDER_TOP_COLOR_INDEX];
@@ -658,7 +658,7 @@ static inline css_error set_border_top_color(
#define BORDER_RIGHT_COLOR_MASK 0x3
static inline css_error set_border_right_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[BORDER_RIGHT_COLOR_INDEX];
@@ -679,7 +679,7 @@ static inline css_error set_border_right_color(
#define BORDER_BOTTOM_COLOR_MASK 0x3
static inline css_error set_border_bottom_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[BORDER_BOTTOM_COLOR_INDEX];
@@ -700,7 +700,7 @@ static inline css_error set_border_bottom_color(
#define BORDER_LEFT_COLOR_MASK 0x3
static inline css_error set_border_left_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[BORDER_LEFT_COLOR_INDEX];
@@ -763,7 +763,7 @@ static inline css_error set_line_height(
#define BACKGROUND_COLOR_MASK 0x3
static inline css_error set_background_color(
css_computed_style *style, uint8_t type,
- css_color color)
+ css_colour color)
{
uint8_t *bits = &style->bits[BACKGROUND_COLOR_INDEX];
diff --git a/src/select/select.c b/src/select/select.c
index 77209ed..a27a0cf 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -291,6 +291,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
* Those properties which are inherited need to be set as inherit.
* Those which are not inherited need to be set to their default value.
*/
+ /** \todo If node is tree root, everything should be defaulted. */
for (i = 0; i < N_OPCODES; i++) {
/* Do nothing if this property is set */
if (state.props[i].set)