summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-05 01:22:13 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-05 01:22:13 +0000
commit72e7e01db7bd56dd3eeef04f6ea25e9f95522966 (patch)
treeaddca40d21908649d05646fe226090c5a516a6c6 /src
parentc99a8f7965961a4335f305e0696f60b537e6551e (diff)
downloadlibcss-72e7e01db7bd56dd3eeef04f6ea25e9f95522966.tar.gz
libcss-72e7e01db7bd56dd3eeef04f6ea25e9f95522966.tar.bz2
5 more.
svn path=/trunk/libcss/; revision=6703
Diffstat (limited to 'src')
-rw-r--r--src/select/properties.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index f5e32bf..a931ce9 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -2838,6 +2838,17 @@ css_error initial_overflow(css_computed_style *style)
return set_overflow(style, CSS_OVERFLOW_VISIBLE);
}
+css_error compose_overflow(const css_computed_style *parent,
+ const css_computed_style *child,
+ css_computed_style *result)
+{
+ if (css_computed_overflow(child) == CSS_OVERFLOW_INHERIT) {
+ return set_overflow(result, css_computed_overflow(parent));
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_padding_top(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2849,6 +2860,23 @@ css_error initial_padding_top(css_computed_style *style)
return set_padding_top(style, CSS_PADDING_SET, 0, CSS_UNIT_PX);
}
+css_error compose_padding_top(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_padding_top(child, &length, &unit) ==
+ CSS_PADDING_INHERIT) {
+ uint8_t p = css_computed_padding_top(parent, &length, &unit);
+
+ return set_padding_top(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_padding_right(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2860,6 +2888,23 @@ css_error initial_padding_right(css_computed_style *style)
return set_padding_right(style, CSS_PADDING_SET, 0, CSS_UNIT_PX);
}
+css_error compose_padding_right(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_padding_right(child, &length, &unit) ==
+ CSS_PADDING_INHERIT) {
+ uint8_t p = css_computed_padding_right(parent, &length, &unit);
+
+ return set_padding_right(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_padding_bottom(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2871,6 +2916,23 @@ css_error initial_padding_bottom(css_computed_style *style)
return set_padding_bottom(style, CSS_PADDING_SET, 0, CSS_UNIT_PX);
}
+css_error compose_padding_bottom(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_padding_bottom(child, &length, &unit) ==
+ CSS_PADDING_INHERIT) {
+ uint8_t p = css_computed_padding_bottom(parent, &length, &unit);
+
+ return set_padding_bottom(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_padding_left(uint32_t opv, css_style *style,
css_select_state *state)
{
@@ -2882,6 +2944,23 @@ css_error initial_padding_left(css_computed_style *style)
return set_padding_left(style, CSS_PADDING_SET, 0, CSS_UNIT_PX);
}
+css_error compose_padding_left(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_padding_left(child, &length, &unit) ==
+ CSS_PADDING_INHERIT) {
+ uint8_t p = css_computed_padding_left(parent, &length, &unit);
+
+ return set_padding_left(result, p, length, unit);
+ }
+
+ return CSS_OK;
+}
+
css_error cascade_page_break_after(uint32_t opv, css_style *style,
css_select_state *state)
{