summaryrefslogtreecommitdiff
path: root/src/select/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-04 00:56:17 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-04 00:56:17 +0000
commite9323b050926b2a9fd53a0b7e407eab8b88451bf (patch)
treeb7860b8b5f0c1ef8345896c1f75ac2aba9c46352 /src/select/properties.c
parenta35c7908699740e26e4e702fd25de4ff01346445 (diff)
downloadlibcss-e9323b050926b2a9fd53a0b7e407eab8b88451bf.tar.gz
libcss-e9323b050926b2a9fd53a0b7e407eab8b88451bf.tar.bz2
4 more.
svn path=/trunk/libcss/; revision=6689
Diffstat (limited to 'src/select/properties.c')
-rw-r--r--src/select/properties.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index a9bf222..d28e29c 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -835,6 +835,19 @@ css_error initial_caption_side(css_computed_style *style)
return set_caption_side(style, CSS_CAPTION_SIDE_TOP);
}
+css_error compose_caption_side(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_caption_side(child) ==
+ CSS_CAPTION_SIDE_INHERIT) {
+ return set_caption_side(result,
+ css_computed_caption_side(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_clear(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -871,6 +884,17 @@ css_error initial_clear(css_computed_style *style)
return set_clear(style, CSS_CLEAR_NONE);
}
+css_error compose_clear(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_clear(child) == CSS_CLEAR_INHERIT) {
+ return set_clear(result, css_computed_clear(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_clip(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -937,6 +961,24 @@ css_error initial_clip(css_computed_style *style)
return set_clip(style, CSS_CLIP_AUTO, &rect);
}
+css_error compose_clip(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_computed_clip_rect rect = { 0, 0, 0, 0,
+ CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
+ false, false, false, false };
+
+ if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ css_computed_clip(child, &rect) ==
+ CSS_CLIP_INHERIT) {
+ uint8_t p = css_computed_clip(parent, &rect);
+ return set_clip(result, p, &rect);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_color(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -961,6 +1003,21 @@ css_error initial_color(css_computed_style *style)
return set_color(style, CSS_COLOR_COLOR, 0);
}
+css_error compose_color(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ css_colour color;
+
+ if (css_computed_color(child, &color) == CSS_COLOR_INHERIT) {
+ uint8_t p = css_computed_color(parent, &color);
+
+ return set_color(result, p, color);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_content(uint32_t opv, css_style *style,
css_select_state *state)
{