diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2018-01-03 23:58:18 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-01-05 13:49:51 +0000 |
commit | 6be6fa1b2197ffe6e511c5eff9abe14d883f8478 (patch) | |
tree | 6059c45898a74fe06300f73f4cd75b3571fd2c75 /render/html_interaction.c | |
parent | a67973f312b7cba8a6d56f9841a542a731a9ddb4 (diff) | |
download | netsurf-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_interaction.c')
-rw-r--r-- | render/html_interaction.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c index 30adaa080..2d14ed2ae 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -208,7 +208,7 @@ static size_t html_selection_drag_end(struct html_content *html, if (box) { plot_font_style_t fstyle; - font_plot_style_from_css(box->style, &fstyle); + font_plot_style_from_css(&html->len_ctx, box->style, &fstyle); guit->layout->position(&fstyle, box->text, box->length, dx, &idx, &pixel_offset); @@ -415,7 +415,8 @@ void html_mouse_action(struct content *c, struct browser_window *bw, size_t idx; plot_font_style_t fstyle; - font_plot_style_from_css(box->style, &fstyle); + font_plot_style_from_css(&html->len_ctx, + box->style, &fstyle); guit->layout->position(&fstyle, box->text, box->length, @@ -649,7 +650,8 @@ void html_mouse_action(struct content *c, struct browser_window *bw, text_box = box; text_box_x = box_x; } - } while ((box = box_at_point(box, x, y, &box_x, &box_y)) != NULL); + } while ((box = box_at_point(&html->len_ctx, box, x, y, + &box_x, &box_y)) != NULL); /* use of box_x, box_y, or content below this point is probably a * mistake; they will refer to the last box returned by box_at_point */ @@ -910,8 +912,8 @@ void html_mouse_action(struct content *c, struct browser_window *bw, int pixel_offset; size_t idx; - font_plot_style_from_css(text_box->style, - &fstyle); + font_plot_style_from_css(&html->len_ctx, + text_box->style, &fstyle); guit->layout->position(&fstyle, text_box->text, |