summaryrefslogtreecommitdiff
path: root/src/select/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 20:05:04 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 20:05:04 +0000
commit5429e0ccc289a4538f81fcde0495d27f0cb7a758 (patch)
tree1ec98a93dfdf2986011aa012e7980fb48304d378 /src/select/properties.c
parentca3293e0332bbd9fe63d6cd6bc215f048132bd08 (diff)
downloadlibcss-5429e0ccc289a4538f81fcde0495d27f0cb7a758.tar.gz
libcss-5429e0ccc289a4538f81fcde0495d27f0cb7a758.tar.bz2
Fix clip: rect() with auto sides
svn path=/trunk/libcss/; revision=6514
Diffstat (limited to 'src/select/properties.c')
-rw-r--r--src/select/properties.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/select/properties.c b/src/select/properties.c
index ea81120..d084bc5 100644
--- a/src/select/properties.c
+++ b/src/select/properties.c
@@ -540,13 +540,14 @@ static css_error cascade_clip(uint32_t opv, css_style *style,
{
uint16_t value = CSS_CLIP_INHERIT;
css_computed_clip_rect rect = { 0, 0, 0, 0,
- CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX };
+ CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
+ false, false, false, false };
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) {
+ rect.top_auto = true;
} else {
rect.top = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(css_fixed));
@@ -554,6 +555,7 @@ static css_error cascade_clip(uint32_t opv, css_style *style,
advance_bytecode(style, sizeof(uint32_t));
}
if (getValue(opv) & CLIP_RECT_RIGHT_AUTO) {
+ rect.right_auto = true;
} else {
rect.right = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(css_fixed));
@@ -561,6 +563,7 @@ static css_error cascade_clip(uint32_t opv, css_style *style,
advance_bytecode(style, sizeof(uint32_t));
}
if (getValue(opv) & CLIP_RECT_BOTTOM_AUTO) {
+ rect.bottom_auto = true;
} else {
rect.bottom = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(css_fixed));
@@ -568,6 +571,7 @@ static css_error cascade_clip(uint32_t opv, css_style *style,
advance_bytecode(style, sizeof(uint32_t));
}
if (getValue(opv) & CLIP_RECT_LEFT_AUTO) {
+ rect.left_auto = true;
} else {
rect.left = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(css_fixed));
@@ -591,7 +595,8 @@ static css_error cascade_clip(uint32_t opv, css_style *style,
static css_error initial_clip(css_computed_style *style)
{
css_computed_clip_rect rect = { 0, 0, 0, 0,
- CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX };
+ CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
+ false, false, false, false };
return set_clip(style, CSS_CLIP_AUTO, &rect);
}