From 9c918930289b18dbfd4bb44081891d5780105bfd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 13 Jul 2011 13:20:26 +0000 Subject: Fix selection for non-gui browser windows (iframes). Selection no longer uses current_redraw_browser. Fix long-standing selection bugs on platforms that use action on release behaviour. svn path=/trunk/netsurf/; revision=12598 --- content/content.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 1f7003404..c3f8d7855 100644 --- a/content/content.c +++ b/content/content.c @@ -676,6 +676,22 @@ void content_close(hlcache_handle *h) } +/** + * Find this content's selection context, if it has one. + */ + +struct selection *content_get_selection(hlcache_handle *h) +{ + struct content *c = hlcache_handle_get_content(h); + assert(c != 0); + + if (c->handler->get_selection != NULL) + return c->handler->get_selection(c); + else + return NULL; +} + + void content_add_error(struct content *c, const char *token, unsigned int line) { -- cgit v1.2.3