summaryrefslogtreecommitdiff
path: root/riscos/thumbnail.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-03-15 00:00:45 +0000
committerVincent Sanders <vince@kyllikki.org>2015-03-15 00:00:45 +0000
commit8a99b045bc48e0c5eb89129ea8ee034c72b955de (patch)
treef2dabbca020b91b41ab3f476fca1ed2378f8ced2 /riscos/thumbnail.c
parent52b50db3a6f1d52b3c9e18b36121f487c09de906 (diff)
downloadnetsurf-8a99b045bc48e0c5eb89129ea8ee034c72b955de.tar.gz
netsurf-8a99b045bc48e0c5eb89129ea8ee034c72b955de.tar.bz2
Remove url from content thumbnailers API
The content thumbnailers for each frontend were being provided the contents url. This was only ever used to call the urldb thumbnail setting API. This changes it so the single callsite that passed a valid url adds the bitmap to that url itself in desktop_history.c instead of forcing every frontend to require the urldb API. Additionally the old API could pass the url as NULL which was causing asserts where this was not an expected parameter value. Because of this this fixes bug #2286 which was also present in the monkey frontend as both called nsurl_access() on the url without the NULL check and caused an assertion.
Diffstat (limited to 'riscos/thumbnail.c')
-rw-r--r--riscos/thumbnail.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/riscos/thumbnail.c b/riscos/thumbnail.c
index e259686f8..603c328b8 100644
--- a/riscos/thumbnail.c
+++ b/riscos/thumbnail.c
@@ -36,7 +36,6 @@
#include "utils/log.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "content/urldb.h"
#include "desktop/plotters.h"
#include "desktop/thumbnail.h"
#include "image/bitmap.h"
@@ -79,8 +78,7 @@ static void thumbnail_restore_output(struct thumbnail_save_area *save_area);
* \param bitmap the bitmap to draw to
* \param url the URL the thumbnail belongs to, or NULL
*/
-bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
- nsurl *url)
+bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap)
{
struct thumbnail_save_area *save_area;
osspriteop_area *sprite_area = NULL;
@@ -150,9 +148,6 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
return false;
}
- /* register the thumbnail with the URL */
- if (url)
- urldb_set_thumbnail(url, bitmap);
bitmap_modified(bitmap);
return true;
}