summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/handlers/html/html.c12
-rw-r--r--content/handlers/html/interaction.c1
-rw-r--r--content/handlers/html/private.h9
-rw-r--r--content/handlers/text/textplain.c14
-rw-r--r--content/handlers/text/textplain.h8
5 files changed, 2 insertions, 42 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 23d607823..33320aa7b 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2383,15 +2383,3 @@ error:
return error;
}
-
-
-/* exported function documented in html/private.h */
-struct browser_window *html_get_browser_window(struct content *c)
-{
- html_content *html = (html_content *) c;
-
- assert(c != NULL);
- assert(c->handler == &html_content_handler);
-
- return html->bw;
-}
diff --git a/content/handlers/html/interaction.c b/content/handlers/html/interaction.c
index f2eae70df..0a963dd54 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -1220,6 +1220,7 @@ default_mouse_action(html_content *html,
&pixel_offset);
if (selection_click(&html->sel,
+ html->bw,
mouse,
mas->text.box->byte_offset + idx)) {
/* key presses must be directed at the
diff --git a/content/handlers/html/private.h b/content/handlers/html/private.h
index dde61c2a9..ff20be837 100644
--- a/content/handlers/html/private.h
+++ b/content/handlers/html/private.h
@@ -230,15 +230,6 @@ void html__redraw_a_box(html_content *htmlc, struct box *box);
/**
- * Get the browser window containing an HTML content
- *
- * \param c HTML content
- * \return the browser window
- */
-struct browser_window *html_get_browser_window(struct content *c);
-
-
-/**
* Complete conversion of an HTML document
*
* \param htmlc Content to convert
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index 501ba1d34..534b91d93 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -706,7 +706,7 @@ textplain_mouse_action(struct content *c,
browser_window_set_drag_type(bw, DRAGGING_NONE, NULL);
idx = textplain_offset_from_coords(c, x, y, dir);
- if (selection_click(&text->sel, mouse, idx)) {
+ if (selection_click(&text->sel, text->bw, mouse, idx)) {
if (selection_dragging(&text->sel)) {
browser_window_set_drag_type(bw,
@@ -1634,15 +1634,3 @@ textplain_get_raw_data(struct content *c,
return text->utf8_data + start;
}
-
-
-/* exported interface documented in html/textplain.h */
-struct browser_window *textplain_get_browser_window(struct content *c)
-{
- textplain_content *text = (textplain_content *) c;
-
- assert(c != NULL);
- assert(c->handler == &textplain_content_handler);
-
- return text->bw;
-}
diff --git a/content/handlers/text/textplain.h b/content/handlers/text/textplain.h
index a2cfb5e00..716397acc 100644
--- a/content/handlers/text/textplain.h
+++ b/content/handlers/text/textplain.h
@@ -73,12 +73,4 @@ void textplain_coords_from_range(struct content *c,
char *textplain_get_raw_data(struct content *c, unsigned start, unsigned end, size_t *plen);
-/**
- * Get the browser window containing a textplain content
- *
- * \param[in] c text/plain content
- * \return the browser window
- */
-struct browser_window *textplain_get_browser_window(struct content *c);
-
#endif