summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-12-29 21:30:04 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2014-12-29 21:30:04 (GMT)
commit2fc58495a7865170a05e385aa54ca931c0c453c3 (patch)
tree155c9902dbf201792107b90f8de4fcf2a5131a9c
parent7b6641c66fa14b0512ea601cc0d7ea8ca7e8eeab (diff)
downloadlibcss-2fc58495a7865170a05e385aa54ca931c0c453c3.tar.gz
libcss-2fc58495a7865170a05e385aa54ca931c0c453c3.tar.bz2
Fixup break-inside.
-rw-r--r--src/select/properties/break_inside.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/select/properties/break_inside.c b/src/select/properties/break_inside.c
index 58931b3..af0259f 100644
--- a/src/select/properties/break_inside.c
+++ b/src/select/properties/break_inside.c
@@ -17,8 +17,33 @@
css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_break_after_before_inside(opv, style, state,
- set_break_inside);
+ uint16_t value = CSS_BREAK_AFTER_AUTO;
+
+ UNUSED(style);
+
+ if (isInherit(opv) == false) {
+ switch (getValue(opv)) {
+ case BREAK_INSIDE_AUTO:
+ value = CSS_BREAK_AFTER_AUTO;
+ break;
+ case BREAK_INSIDE_AVOID:
+ value = CSS_BREAK_AFTER_AVOID;
+ break;
+ case BREAK_INSIDE_AVOID_PAGE:
+ value = CSS_BREAK_AFTER_AVOID_PAGE;
+ break;
+ case BREAK_INSIDE_AVOID_COLUMN:
+ value = CSS_BREAK_AFTER_AVOID_COLUMN;
+ break;
+ }
+ }
+
+ if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
+ isInherit(opv))) {
+ return set_break_inside(state->computed, value);
+ }
+
+ return CSS_OK;
}
css_error css__set_break_inside_from_hint(const css_hint *hint,