summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-05 01:17:34 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-05 01:17:34 +0000
commitc99a8f7965961a4335f305e0696f60b537e6551e (patch)
treefe01d1d2033088e38feaba5d6dee7562a45bc38b /src
parent2118e313c125ef2e88675e33de12b6473118b3db (diff)
downloadlibcss-c99a8f7965961a4335f305e0696f60b537e6551e.tar.gz
libcss-c99a8f7965961a4335f305e0696f60b537e6551e.tar.bz2
4 more.
svn path=/trunk/libcss/; revision=6702
Diffstat (limited to 'src')
-rw-r--r--src/select/properties.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index b2f6ad1..f5e32bf 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -2690,6 +2690,17 @@ css_error initial_orphans(css_computed_style *style)
return CSS_OK;
}
+css_error compose_orphans(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ UNUSED(parent);
+ UNUSED(child);
+ UNUSED(result);
+
+ return CSS_OK;
+}
+
css_error cascade_outline_color(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2721,6 +2732,23 @@ css_error initial_outline_color(css_computed_style *style)
return set_outline_color(style, CSS_OUTLINE_COLOR_INVERT, 0);
}
+css_error compose_outline_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color = 0;
+
+ if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ css_computed_outline_color(child, &color) ==
+ CSS_OUTLINE_COLOR_INHERIT) {
+ uint8_t p = css_computed_outline_color(parent, &color);
+
+ return set_outline_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_outline_style(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2732,6 +2760,18 @@ css_error initial_outline_style(css_computed_style *style)
return set_outline_style(style, CSS_OUTLINE_STYLE_NONE);
}
+css_error compose_outline_style(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_outline_style(child) == CSS_OUTLINE_STYLE_INHERIT) {
+ return set_outline_style(result,
+ css_computed_outline_style(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_outline_width(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2744,6 +2784,24 @@ css_error initial_outline_width(css_computed_style *style)
0, CSS_UNIT_PX);
}
+css_error compose_outline_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 ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ css_computed_outline_width(child, &length, &unit) ==
+ CSS_OUTLINE_WIDTH_INHERIT) {
+ uint8_t p = css_computed_outline_width(parent, &length, &unit);
+
+ return set_outline_width(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_overflow(uint32_t opv, css_style *style,
css_select_state *state)
{