summaryrefslogtreecommitdiff
path: root/src/select/propget.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-01-10 15:21:06 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-01-10 15:21:06 +0000
commita3737b84a9ab76421cca972139b2ec5a6572ab72 (patch)
tree7c7f4d8e3715ecc80b1a1f9fb42eef9ff654f74e /src/select/propget.h
parentfaf8b75e949c891738fb3a2e404e37c6a76ae252 (diff)
downloadlibcss-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/propget.h')
-rw-r--r--src/select/propget.h12
1 files changed, 6 insertions, 6 deletions
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