diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-10-29 19:16:55 +0100 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-10-29 20:30:48 +0100 |
commit | 63412372b2a27f7edc18c557b5aa8eb78cb6b5b5 (patch) | |
tree | 48e1a84c1fbb3ca014b681b8f9d4830df467a625 /content/handlers | |
parent | 15b23e1e3c47183c182ca62f6374eab01902179d (diff) | |
download | netsurf-63412372b2a27f7edc18c557b5aa8eb78cb6b5b5.tar.gz netsurf-63412372b2a27f7edc18c557b5aa8eb78cb6b5b5.tar.bz2 |
layout: calculate_mbp_width: Preserve percentage values
Diffstat (limited to 'content/handlers')
-rw-r--r-- | content/handlers/html/layout_internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/handlers/html/layout_internal.h b/content/handlers/html/layout_internal.h index 0c171ef44..39b42b10d 100644 --- a/content/handlers/html/layout_internal.h +++ b/content/handlers/html/layout_internal.h @@ -181,7 +181,7 @@ static inline void calculate_mbp_width( type = margin_funcs[side](style, &value, &unit); if (type == CSS_MARGIN_SET) { if (unit == CSS_UNIT_PCT) { - *frac += FIXTOINT(FDIV(value, F_100)); + *frac += FIXTOFLT(FDIV(value, F_100)); } else { *fixed += FIXTOINT(css_unit_len2device_px( style, unit_len_ctx, @@ -205,7 +205,7 @@ static inline void calculate_mbp_width( if (padding) { padding_funcs[side](style, &value, &unit); if (unit == CSS_UNIT_PCT) { - *frac += FIXTOINT(FDIV(value, F_100)); + *frac += FIXTOFLT(FDIV(value, F_100)); } else { *fixed += FIXTOINT(css_unit_len2device_px( style, unit_len_ctx, |