summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-11 15:40:52 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-11 15:40:52 +0000
commit54268f630795108ae11552b3acc79e2f6afa0887 (patch)
treebf8b36f428d3e65aabbe16efbfe78b658e0452d3
parent08d4a63ce511519ed61ddf1851de630464929bd7 (diff)
downloadlibcss-54268f630795108ae11552b3acc79e2f6afa0887.tar.gz
libcss-54268f630795108ae11552b3acc79e2f6afa0887.tar.bz2
Handle as much of clip as we can
svn path=/trunk/libcss/; revision=6433
-rw-r--r--src/select/properties.c30
1 files 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;