From a3737b84a9ab76421cca972139b2ec5a6572ab72 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 10 Jan 2014 15:21:06 +0000 Subject: 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. --- src/select/propget.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/select/propget.h') diff --git a/src/select/propget.h b/src/select/propget.h index 15fef05..0f32e8c 100644 --- a/src/select/propget.h +++ b/src/select/propget.h @@ -1832,20 +1832,20 @@ static inline uint8_t get_page_break_inside( #define ORPHANS_MASK 0x1 static inline uint8_t get_orphans( const css_computed_style *style, - css_fixed *count) + int32_t *orphans) { if (style->page != NULL) { uint8_t bits = style->page->bits[ORPHANS_INDEX]; bits &= ORPHANS_MASK; bits >>= ORPHANS_SHIFT; - *count = style->page->orphans; + *orphans = style->page->orphans; /* 1bit: type */ return bits; } - *count = INTTOFIX(2); + *orphans = 2; return CSS_ORPHANS_SET; } #undef ORPHANS_MASK @@ -1857,20 +1857,20 @@ static inline uint8_t get_orphans( #define WIDOWS_MASK 0x2 static inline uint8_t get_widows( const css_computed_style *style, - css_fixed *count) + int32_t *widows) { if (style->page != NULL) { uint8_t bits = style->page->bits[WIDOWS_INDEX]; bits &= WIDOWS_MASK; bits >>= WIDOWS_SHIFT; - *count = style->page->orphans; + *widows = style->page->widows; /* 1bit: type */ return bits; } - *count = INTTOFIX(2); + *widows = 2; return CSS_WIDOWS_SET; } #undef WIDOWS_MASK -- cgit v1.2.3