summaryrefslogtreecommitdiff
path: root/riscos/htmlredraw.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-06-23 20:34:49 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-06-23 20:34:49 +0000
commit05552edb21d010a16c2208f8d6c616e0857f65fb (patch)
tree410f46d65dba68d803b9bc3d57724b60f16ec518 /riscos/htmlredraw.c
parent6720beb2c100ae11855755e6e4d0310b2c6749ac (diff)
downloadnetsurf-05552edb21d010a16c2208f8d6c616e0857f65fb.tar.gz
netsurf-05552edb21d010a16c2208f8d6c616e0857f65fb.tar.bz2
[project @ 2004-06-23 20:34:49 by rjw]
Improved background image positioning. svn path=/import/netsurf/; revision=998
Diffstat (limited to 'riscos/htmlredraw.c')
-rw-r--r--riscos/htmlredraw.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c
index e495c6973..c8758bc58 100644
--- a/riscos/htmlredraw.c
+++ b/riscos/htmlredraw.c
@@ -630,18 +630,14 @@ void html_redraw_background(long xi, long yi, int width, int height,
x = xi;
if (fixed) {
/**\todo fixed background attachments */
- y = yi;
- } else {
- y = yi;
+ x -= 0;
}
/* handle window offset */
- x = xi;
+ y = yi;
if (fixed) {
/**\todo fixed background attachments */
- y = yi;
- } else {
- y = yi;
+ y -= 0;
}
/* handle background-position */
@@ -649,11 +645,11 @@ void html_redraw_background(long xi, long yi, int width, int height,
case CSS_BACKGROUND_POSITION_PERCENT:
multiplier =
box->style->background_position.horz.value.percent / 100;
- x += box->x + (box->width * multiplier) -
+ x += (box->width * multiplier) -
(box->background->width * scale * multiplier);
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- x += box->x + len(&box->style->background_position.horz.value.length, box->style) * scale;
+ x += len(&box->style->background_position.horz.value.length, box->style) * scale;
break;
default:
break;
@@ -663,11 +659,11 @@ void html_redraw_background(long xi, long yi, int width, int height,
case CSS_BACKGROUND_POSITION_PERCENT:
multiplier =
box->style->background_position.vert.value.percent / 100;
- y += box->y + (box->height * multiplier) -
+ y += (box->height * multiplier) -
(box->background->height * scale * multiplier);
break;
case CSS_BACKGROUND_POSITION_LENGTH:
- y += box->y + len(&box->style->background_position.vert.value.length, box->style) * scale;
+ y += len(&box->style->background_position.vert.value.length, box->style) * scale;
break;
default:
break;