summaryrefslogtreecommitdiff
path: root/render/html_interaction.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-23 23:32:21 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-23 23:32:21 +0100
commit974a4a21e16a2da85a66aae9b80eeca15ca26dd6 (patch)
tree4433113896c8f5aec5a3f4130b50f9a73075907c /render/html_interaction.c
parentcdd53bcffb00819360b3e62ef41de6607aca2c76 (diff)
downloadnetsurf-974a4a21e16a2da85a66aae9b80eeca15ca26dd6.tar.gz
netsurf-974a4a21e16a2da85a66aae9b80eeca15ca26dd6.tar.bz2
split out the layout glyph sizing and splitting API
This refactors the core "font" sizing API to be handled through gui function tables similar to every other core/frontend calling API.
Diffstat (limited to 'render/html_interaction.c')
-rw-r--r--render/html_interaction.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 397ce46c2..19e19f6ef 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -19,7 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* User interaction with a CONTENT_HTML (implementation).
*/
@@ -42,9 +43,9 @@
#include "desktop/selection.h"
#include "desktop/textarea.h"
#include "desktop/textinput.h"
-#include "desktop/font.h"
#include "javascript/js.h"
#include "desktop/gui_misc.h"
+#include "desktop/gui_layout.h"
#include "desktop/gui_internal.h"
#include "render/box.h"
@@ -209,8 +210,8 @@ static size_t html_selection_drag_end(struct html_content *html,
font_plot_style_from_css(box->style, &fstyle);
- nsfont.font_position_in_string(&fstyle, box->text, box->length,
- dx, &idx, &pixel_offset);
+ guit->layout->position(&fstyle, box->text, box->length,
+ dx, &idx, &pixel_offset);
idx += box->byte_offset;
}
@@ -416,9 +417,9 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
font_plot_style_from_css(box->style, &fstyle);
- nsfont.font_position_in_string(&fstyle,
- box->text, box->length,
- dx, &idx, &pixel_offset);
+ guit->layout->position(&fstyle,
+ box->text, box->length,
+ dx, &idx, &pixel_offset);
selection_track(&html->sel, mouse,
box->byte_offset + idx);
@@ -910,12 +911,12 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
font_plot_style_from_css(text_box->style,
&fstyle);
- nsfont.font_position_in_string(&fstyle,
- text_box->text,
- text_box->length,
- x - text_box_x,
- &idx,
- &pixel_offset);
+ guit->layout->position(&fstyle,
+ text_box->text,
+ text_box->length,
+ x - text_box_x,
+ &idx,
+ &pixel_offset);
if (selection_click(&html->sel, mouse,
text_box->byte_offset + idx)) {