summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c
index 13308af2b..dda268204 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1527,8 +1527,8 @@ void layout_find_dimensions(int available_width, int viewport_height,
if (wtype == CSS_WIDTH_SET) {
if (unit == CSS_UNIT_PCT) {
- *width = (FIXTOFLT(value) * available_width)
- / 100;
+ *width = FPCT_OF_INT_TOINT(
+ value, available_width);
} else {
*width = FIXTOINT(nscss_len2px(value, unit,
style));