mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-20 00:14:06 +03:00
layout: calculate_mbp_width: Preserve percentage values
This commit is contained in:
parent
15b23e1e3c
commit
63412372b2
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user