summaryrefslogtreecommitdiff
path: root/render/html_object.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2018-01-03 23:58:18 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2018-01-05 13:49:51 +0000
commit6be6fa1b2197ffe6e511c5eff9abe14d883f8478 (patch)
tree6059c45898a74fe06300f73f4cd75b3571fd2c75 /render/html_object.c
parenta67973f312b7cba8a6d56f9841a542a731a9ddb4 (diff)
downloadnetsurf-6be6fa1b2197ffe6e511c5eff9abe14d883f8478.tar.gz
netsurf-6be6fa1b2197ffe6e511c5eff9abe14d883f8478.tar.bz2
CSS utils: Handle new units in length conversion routines.
This causes a ripple effect of all the callsites needing information they didn't have.
Diffstat (limited to 'render/html_object.c')
-rw-r--r--render/html_object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/render/html_object.c b/render/html_object.c
index e98bdba0b..fb9e7b090 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -227,7 +227,8 @@ html_object_callback(hlcache_handle *object,
if (hunit == CSS_UNIT_PCT) {
l = (width - w) * hpos / INTTOFIX(100);
} else {
- l = FIXTOINT(nscss_len2px(hpos, hunit,
+ l = FIXTOINT(nscss_len2px(&c->len_ctx,
+ hpos, hunit,
box->style));
}
@@ -235,7 +236,8 @@ html_object_callback(hlcache_handle *object,
if (vunit == CSS_UNIT_PCT) {
t = (height - h) * vpos / INTTOFIX(100);
} else {
- t = FIXTOINT(nscss_len2px(vpos, vunit,
+ t = FIXTOINT(nscss_len2px(&c->len_ctx,
+ vpos, vunit,
box->style));
}