From 54268f630795108ae11552b3acc79e2f6afa0887 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 11 Feb 2009 15:40:52 +0000 Subject: Handle as much of clip as we can svn path=/trunk/libcss/; revision=6433 --- src/select/properties.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/select/properties.c b/src/select/properties.c index 21ef8b5..fac2ec5 100644 --- a/src/select/properties.c +++ b/src/select/properties.c @@ -538,12 +538,38 @@ static css_error cascade_clip(uint32_t opv, css_style *style, css_computed_clip_rect rect = { 0, 0, 0, 0, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX }; - UNUSED(style); - if (isInherit(opv) == false) { switch (getValue(opv) & CLIP_SHAPE_MASK) { case CLIP_SHAPE_RECT: /** \todo clip rect can't store auto values */ + if (getValue(opv) & CLIP_RECT_TOP_AUTO) { + } else { + rect.top = *((css_fixed *) style->bytecode); + advance_bytecode(style, sizeof(css_fixed)); + rect.tunit = *((uint32_t *) style->bytecode); + advance_bytecode(style, sizeof(uint32_t)); + } + if (getValue(opv) & CLIP_RECT_RIGHT_AUTO) { + } else { + rect.right = *((css_fixed *) style->bytecode); + advance_bytecode(style, sizeof(css_fixed)); + rect.runit = *((uint32_t *) style->bytecode); + advance_bytecode(style, sizeof(uint32_t)); + } + if (getValue(opv) & CLIP_RECT_BOTTOM_AUTO) { + } else { + rect.bottom = *((css_fixed *) style->bytecode); + advance_bytecode(style, sizeof(css_fixed)); + rect.bunit = *((uint32_t *) style->bytecode); + advance_bytecode(style, sizeof(uint32_t)); + } + if (getValue(opv) & CLIP_RECT_LEFT_AUTO) { + } else { + rect.left = *((css_fixed *) style->bytecode); + advance_bytecode(style, sizeof(css_fixed)); + rect.lunit = *((uint32_t *) style->bytecode); + advance_bytecode(style, sizeof(uint32_t)); + } break; case CLIP_AUTO: value = CSS_CLIP_AUTO; -- cgit v1.2.3