summaryrefslogtreecommitdiff
path: root/src/select/properties/column_fill.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-11-06 12:29:43 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-11-07 12:22:40 +0000
commitd250b1019c669478cf462b64ca060e7aedb5def1 (patch)
tree037d3f00e3c4e0f5714f55e3b6f159e41f349a03 /src/select/properties/column_fill.c
parent121504a4a2b0f8d1e16e507ca71916479c0e5c69 (diff)
downloadlibcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.gz
libcss-d250b1019c669478cf462b64ca060e7aedb5def1.tar.bz2
Implement selection for column-fill property.
Diffstat (limited to 'src/select/properties/column_fill.c')
-rw-r--r--src/select/properties/column_fill.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/select/properties/column_fill.c b/src/select/properties/column_fill.c
index 2322c03..9b4f1e0 100644
--- a/src/select/properties/column_fill.c
+++ b/src/select/properties/column_fill.c
@@ -17,20 +17,24 @@
css_error css__cascade_column_fill(uint32_t opv, css_style *style,
css_select_state *state)
{
+ uint16_t value = CSS_COLUMN_FILL_INHERIT;
+
UNUSED(style);
if (isInherit(opv) == false) {
switch (getValue(opv)) {
case COLUMN_FILL_BALANCE:
+ value = CSS_COLUMN_FILL_BALANCE;
+ break;
case COLUMN_FILL_AUTO:
- /** \todo convert to public values */
+ value = CSS_COLUMN_FILL_AUTO;
break;
}
}
if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
isInherit(opv))) {
- /** \todo set computed elevation */
+ return set_column_fill(state->computed, value);
}
return CSS_OK;
@@ -39,27 +43,24 @@ css_error css__cascade_column_fill(uint32_t opv, css_style *style,
css_error css__set_column_fill_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_column_fill(style, hint->status);
}
css_error css__initial_column_fill(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_column_fill(state->computed, CSS_COLUMN_FILL_BALANCE);
}
css_error css__compose_column_fill(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_column_fill(child);
- return CSS_OK;
+ if (type == CSS_COLUMN_FILL_INHERIT) {
+ type = get_column_fill(parent);
+ }
+
+ return set_column_fill(result, type);
}