summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcss/properties.h3
-rw-r--r--src/select/properties.c8
-rw-r--r--test/dump_computed.h16
3 files changed, 21 insertions, 6 deletions
diff --git a/include/libcss/properties.h b/include/libcss/properties.h
index ffc3d06..f496bc9 100644
--- a/include/libcss/properties.h
+++ b/include/libcss/properties.h
@@ -159,7 +159,8 @@ enum css_border_spacing {
enum css_border_color {
CSS_BORDER_COLOR_INHERIT = CSS_BACKGROUND_COLOR_INHERIT,
CSS_BORDER_COLOR_TRANSPARENT = CSS_BACKGROUND_COLOR_TRANSPARENT,
- CSS_BORDER_COLOR_COLOR = CSS_BACKGROUND_COLOR_COLOR
+ CSS_BORDER_COLOR_COLOR = CSS_BACKGROUND_COLOR_COLOR,
+ CSS_BORDER_COLOR_INITIAL = 0x3
};
enum css_border_style {
diff --git a/src/select/properties.c b/src/select/properties.c
index 2d950be..788c102 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -519,7 +519,7 @@ css_error set_border_top_color_from_hint(const css_hint *hint,
css_error initial_border_top_color(css_computed_style *style)
{
- return set_border_top_color(style, CSS_BORDER_COLOR_COLOR, 0);
+ return set_border_top_color(style, CSS_BORDER_COLOR_INITIAL, 0);
}
css_error compose_border_top_color(const css_computed_style *parent,
@@ -553,7 +553,7 @@ css_error set_border_right_color_from_hint(const css_hint *hint,
css_error initial_border_right_color(css_computed_style *style)
{
- return set_border_right_color(style, CSS_BORDER_COLOR_COLOR, 0);
+ return set_border_right_color(style, CSS_BORDER_COLOR_INITIAL, 0);
}
css_error compose_border_right_color(const css_computed_style *parent,
@@ -587,7 +587,7 @@ css_error set_border_bottom_color_from_hint(const css_hint *hint,
css_error initial_border_bottom_color(css_computed_style *style)
{
- return set_border_bottom_color(style, CSS_BORDER_COLOR_COLOR, 0);
+ return set_border_bottom_color(style, CSS_BORDER_COLOR_INITIAL, 0);
}
css_error compose_border_bottom_color(const css_computed_style *parent,
@@ -621,7 +621,7 @@ css_error set_border_left_color_from_hint(const css_hint *hint,
css_error initial_border_left_color(css_computed_style *style)
{
- return set_border_left_color(style, CSS_BORDER_COLOR_COLOR, 0);
+ return set_border_left_color(style, CSS_BORDER_COLOR_INITIAL, 0);
}
css_error compose_border_left_color(const css_computed_style *parent,
diff --git a/test/dump_computed.h b/test/dump_computed.h
index c9aafe9..be6b4bb 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -145,7 +145,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
lwc_string *url = NULL;
css_fixed len1 = 0, len2 = 0;
css_unit unit1 = CSS_UNIT_PX, unit2 = CSS_UNIT_PX;
- css_computed_clip_rect rect;
+ css_computed_clip_rect rect = { 0, 0, 0, 0, CSS_UNIT_PX, CSS_UNIT_PX,
+ CSS_UNIT_PX, CSS_UNIT_PX, true, true,
+ true, true };
const css_computed_content_item *content = NULL;
const css_computed_counter *counter = NULL;
lwc_string **string_list = NULL;
@@ -287,6 +289,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
/* border-top-color */
val = css_computed_border_top_color(style, &color);
switch (val) {
+ case CSS_BORDER_COLOR_INITIAL:
+ wrote = snprintf(ptr, *len, "border-top-color: initial\n");
+ break;
case CSS_BORDER_COLOR_TRANSPARENT:
wrote = snprintf(ptr, *len, "border-top-color: transparent\n");
break;
@@ -303,6 +308,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
/* border-right-color */
val = css_computed_border_right_color(style, &color);
switch (val) {
+ case CSS_BORDER_COLOR_INITIAL:
+ wrote = snprintf(ptr, *len, "border-right-color: initial\n");
+ break;
case CSS_BORDER_COLOR_TRANSPARENT:
wrote = snprintf(ptr, *len,
"border-right-color: transparent\n");
@@ -321,6 +329,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
/* border-bottom-color */
val = css_computed_border_bottom_color(style, &color);
switch (val) {
+ case CSS_BORDER_COLOR_INITIAL:
+ wrote = snprintf(ptr, *len, "border-bottom-color: initial\n");
+ break;
case CSS_BORDER_COLOR_TRANSPARENT:
wrote = snprintf(ptr, *len,
"border-bottom-color: transparent\n");
@@ -339,6 +350,9 @@ static void dump_computed_style(const css_computed_style *style, char *buf,
/* border-left-color */
val = css_computed_border_left_color(style, &color);
switch (val) {
+ case CSS_BORDER_COLOR_INITIAL:
+ wrote = snprintf(ptr, *len, "border-left-color: initial\n");
+ break;
case CSS_BORDER_COLOR_TRANSPARENT:
wrote = snprintf(ptr, *len, "border-left-color: transparent\n");
break;