diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-10 15:21:06 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-10 15:21:06 +0000 |
commit | a3737b84a9ab76421cca972139b2ec5a6572ab72 (patch) | |
tree | 7c7f4d8e3715ecc80b1a1f9fb42eef9ff654f74e /src/select/properties | |
parent | faf8b75e949c891738fb3a2e404e37c6a76ae252 (diff) | |
download | libcss-a3737b84a9ab76421cca972139b2ec5a6572ab72.tar.gz libcss-a3737b84a9ab76421cca972139b2ec5a6572ab72.tar.bz2 |
Various changes for orphans and widows properties:
+ Keep as int internally, rather than css_fixed.
+ Fix get_widows to return widows instead of orphans.
+ Remove duplicate implementations in css_computed_ getters.
Diffstat (limited to 'src/select/properties')
-rw-r--r-- | src/select/properties/orphans.c | 6 | ||||
-rw-r--r-- | src/select/properties/windows.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/select/properties/orphans.c b/src/select/properties/orphans.c index 265c6f5..d5c4937 100644 --- a/src/select/properties/orphans.c +++ b/src/select/properties/orphans.c @@ -23,19 +23,19 @@ css_error css__cascade_orphans(uint32_t opv, css_style *style, css_error css__set_orphans_from_hint(const css_hint *hint, css_computed_style *style) { - return set_orphans(style, hint->status, hint->data.fixed); + return set_orphans(style, hint->status, hint->data.integer); } css_error css__initial_orphans(css_select_state *state) { - return set_orphans(state->computed, CSS_ORPHANS_SET, INTTOFIX(2)); + return set_orphans(state->computed, CSS_ORPHANS_SET, 2); } css_error css__compose_orphans(const css_computed_style *parent, const css_computed_style *child, css_computed_style *result) { - css_fixed count = 0; + int32_t count = 0; uint8_t type = get_orphans(child, &count); if (type == CSS_ORPHANS_INHERIT) { diff --git a/src/select/properties/windows.c b/src/select/properties/windows.c index 3f568cb..916966a 100644 --- a/src/select/properties/windows.c +++ b/src/select/properties/windows.c @@ -23,19 +23,19 @@ css_error css__cascade_widows(uint32_t opv, css_style *style, css_error css__set_widows_from_hint(const css_hint *hint, css_computed_style *style) { - return set_widows(style, hint->status, hint->data.fixed); + return set_widows(style, hint->status, hint->data.integer); } css_error css__initial_widows(css_select_state *state) { - return set_widows(state->computed, CSS_WIDOWS_SET, INTTOFIX(2)); + return set_widows(state->computed, CSS_WIDOWS_SET, 2); } css_error css__compose_widows(const css_computed_style *parent, const css_computed_style *child, css_computed_style *result) { - css_fixed count = 0; + int32_t count = 0; uint8_t type = get_widows(child, &count); if (type == CSS_WIDOWS_INHERIT) { |