summaryrefslogtreecommitdiff
path: root/src/select/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-02 23:34:05 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-02 23:34:05 +0000
commite131db27301b24bce8dbc67c406de2e2f8a35960 (patch)
tree9aa30c3180df051a83d5a6476b119ecb92f9c713 /src/select/properties.c
parent3c4fb30258f596943ec1d4c91bc1ef8ad3b13d30 (diff)
downloadlibcss-e131db27301b24bce8dbc67c406de2e2f8a35960.tar.gz
libcss-e131db27301b24bce8dbc67c406de2e2f8a35960.tar.bz2
12 more.
svn path=/trunk/libcss/; revision=6679
Diffstat (limited to 'src/select/properties.c')
-rw-r--r--src/select/properties.c188
1 files changed, 188 insertions, 0 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index 5df4286..fc44fb1 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -461,6 +461,22 @@ css_error initial_border_top_color(css_computed_style *style)
return set_border_top_color(style, CSS_BORDER_COLOR_COLOR, 0);
}
+css_error compose_border_top_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color;
+
+ if (css_computed_border_top_color(child, &color) ==
+ CSS_BORDER_COLOR_INHERIT) {
+ uint8_t p = css_computed_border_top_color(parent, &color);
+
+ return set_border_top_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_right_color(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -473,6 +489,22 @@ css_error initial_border_right_color(css_computed_style *style)
return set_border_right_color(style, CSS_BORDER_COLOR_COLOR, 0);
}
+css_error compose_border_right_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color;
+
+ if (css_computed_border_right_color(child, &color) ==
+ CSS_BORDER_COLOR_INHERIT) {
+ uint8_t p = css_computed_border_right_color(parent, &color);
+
+ return set_border_right_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_bottom_color(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -485,6 +517,22 @@ css_error initial_border_bottom_color(css_computed_style *style)
return set_border_bottom_color(style, CSS_BORDER_COLOR_COLOR, 0);
}
+css_error compose_border_bottom_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color;
+
+ if (css_computed_border_bottom_color(child, &color) ==
+ CSS_BORDER_COLOR_INHERIT) {
+ uint8_t p = css_computed_border_bottom_color(parent, &color);
+
+ return set_border_bottom_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_left_color(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -497,6 +545,22 @@ css_error initial_border_left_color(css_computed_style *style)
return set_border_left_color(style, CSS_BORDER_COLOR_COLOR, 0);
}
+css_error compose_border_left_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color;
+
+ if (css_computed_border_left_color(child, &color) ==
+ CSS_BORDER_COLOR_INHERIT) {
+ uint8_t p = css_computed_border_left_color(parent, &color);
+
+ return set_border_left_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_top_style(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -508,6 +572,19 @@ css_error initial_border_top_style(css_computed_style *style)
return set_border_top_style(style, CSS_BORDER_STYLE_NONE);
}
+css_error compose_border_top_style(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_border_top_style(child) ==
+ CSS_BORDER_STYLE_INHERIT) {
+ return set_border_top_style(result,
+ css_computed_border_top_style(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_right_style(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -519,6 +596,19 @@ css_error initial_border_right_style(css_computed_style *style)
return set_border_right_style(style, CSS_BORDER_STYLE_NONE);
}
+css_error compose_border_right_style(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_border_right_style(child) ==
+ CSS_BORDER_STYLE_INHERIT) {
+ return set_border_right_style(result,
+ css_computed_border_right_style(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_bottom_style(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -530,6 +620,19 @@ css_error initial_border_bottom_style(css_computed_style *style)
return set_border_bottom_style(style, CSS_BORDER_STYLE_NONE);
}
+css_error compose_border_bottom_style(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_border_bottom_style(child) ==
+ CSS_BORDER_STYLE_INHERIT) {
+ return set_border_bottom_style(result,
+ css_computed_border_bottom_style(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_left_style(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -541,6 +644,19 @@ css_error initial_border_left_style(css_computed_style *style)
return set_border_left_style(style, CSS_BORDER_STYLE_NONE);
}
+css_error compose_border_left_style(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_border_left_style(child) ==
+ CSS_BORDER_STYLE_INHERIT) {
+ return set_border_left_style(result,
+ css_computed_border_left_style(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_top_width(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -553,6 +669,24 @@ css_error initial_border_top_width(css_computed_style *style)
0, CSS_UNIT_PX);
}
+css_error compose_border_top_width(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_fixed length = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ if (css_computed_border_top_width(child, &length, &unit) ==
+ CSS_BORDER_WIDTH_INHERIT) {
+ uint8_t p = css_computed_border_top_width(parent,
+ &length, &unit);
+
+ return set_border_top_width(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_right_width(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -565,6 +699,24 @@ css_error initial_border_right_width(css_computed_style *style)
0, CSS_UNIT_PX);
}
+css_error compose_border_right_width(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_fixed length = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ if (css_computed_border_right_width(child, &length, &unit) ==
+ CSS_BORDER_WIDTH_INHERIT) {
+ uint8_t p = css_computed_border_right_width(parent,
+ &length, &unit);
+
+ return set_border_right_width(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_bottom_width(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -577,6 +729,24 @@ css_error initial_border_bottom_width(css_computed_style *style)
0, CSS_UNIT_PX);
}
+css_error compose_border_bottom_width(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_fixed length = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ if (css_computed_border_bottom_width(child, &length, &unit) ==
+ CSS_BORDER_WIDTH_INHERIT) {
+ uint8_t p = css_computed_border_bottom_width(parent,
+ &length, &unit);
+
+ return set_border_bottom_width(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_border_left_width(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -589,6 +759,24 @@ css_error initial_border_left_width(css_computed_style *style)
0, CSS_UNIT_PX);
}
+css_error compose_border_left_width(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_fixed length = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ if (css_computed_border_left_width(child, &length, &unit) ==
+ CSS_BORDER_WIDTH_INHERIT) {
+ uint8_t p = css_computed_border_left_width(parent,
+ &length, &unit);
+
+ return set_border_left_width(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_bottom(uint32_t opv, css_style *style,
css_select_state *state)
{