summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.c13
-rw-r--r--content/hlcache.c8
-rw-r--r--content/hlcache.h3
3 files changed, 6 insertions, 18 deletions
diff --git a/content/content.c b/content/content.c
index 621f15cb1..0ea929ae7 100644
--- a/content/content.c
+++ b/content/content.c
@@ -248,7 +248,7 @@ const char * const content_status_name[] = {
struct handler_entry {
bool (*create)(struct content *c, const http_parameter *params);
bool (*process_data)(struct content *c, char *data, unsigned int size);
- bool (*convert)(struct content *c, int width, int height);
+ bool (*convert)(struct content *c);
void (*reformat)(struct content *c, int width, int height);
void (*destroy)(struct content *c);
void (*stop)(struct content *c);
@@ -344,7 +344,7 @@ static const struct handler_entry handler_map[] = {
#endif
#ifdef WITH_NS_SVG
{svg_create, 0, svg_convert,
- 0, svg_destroy, 0, svg_redraw, 0, 0, 0, true},
+ svn_reformat, svg_destroy, 0, svg_redraw, 0, 0, 0, true},
#endif
#ifdef WITH_RSVG
{rsvg_create, rsvg_process_data, rsvg_convert,
@@ -356,7 +356,7 @@ static const struct handler_entry handler_map[] = {
static nserror content_llcache_callback(llcache_handle *llcache,
const llcache_event *event, void *pw);
-static void content_convert(struct content *c, int width, int height);
+static void content_convert(struct content *c);
static void content_update_status(struct content *c);
@@ -537,7 +537,7 @@ nserror content_llcache_callback(llcache_handle *llcache,
content_set_status(c, messages_get("Converting"), source_size);
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
- content_convert(c, c->width, c->height);
+ content_convert(c);
}
break;
case LLCACHE_EVENT_ERROR:
@@ -635,7 +635,7 @@ void content_update_status(struct content *c)
* be destroyed and must no longer be used.
*/
-void content_convert(struct content *c, int width, int height)
+void content_convert(struct content *c)
{
union content_msg_data msg_data;
@@ -649,9 +649,8 @@ void content_convert(struct content *c, int width, int height)
LOG(("content %s (%p)", llcache_handle_get_url(c->llcache), c));
c->locked = true;
- c->available_width = width;
if (handler_map[c->type].convert) {
- if (!handler_map[c->type].convert(c, width, height)) {
+ if (!handler_map[c->type].convert(c)) {
c->status = CONTENT_STATUS_ERROR;
c->locked = false;
return;
diff --git a/content/hlcache.c b/content/hlcache.c
index 38c581f7f..d18a76b6c 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -73,7 +73,6 @@ static void hlcache_content_callback(struct content *c,
/* See hlcache.h for documentation */
nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
const char *referer, llcache_post_data *post,
- uint32_t width, uint32_t height,
hlcache_handle_callback cb, void *pw,
hlcache_child_context *child, hlcache_handle **result)
{
@@ -98,8 +97,6 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
ctx->child.quirks = child->quirks;
}
- /** \todo What happens with width/height? */
-
ctx->handle->cb = cb;
ctx->handle->pw = pw;
@@ -275,11 +272,6 @@ nserror hlcache_find_content(hlcache_retrieval_ctx *ctx)
event.type = CONTENT_MSG_LOADING;
ctx->handle->cb(ctx->handle, &event, ctx->handle->pw);
- /** \todo Reflow content to new width
- if (content_get_available_width(ctx->handle) != width)
- content_reformat(ctx->handle, width, height);
- */
-
if (ctx->handle->cb != NULL) {
event.type = CONTENT_MSG_READY;
ctx->handle->cb(ctx->handle, &event,
diff --git a/content/hlcache.h b/content/hlcache.h
index fb6ba219c..7c4f05290 100644
--- a/content/hlcache.h
+++ b/content/hlcache.h
@@ -60,8 +60,6 @@ typedef nserror (*hlcache_handle_callback)(hlcache_handle *handle,
* \param flags Object retrieval flags
* \param referer Referring URL, or NULL if none
* \param post POST data, or NULL for a GET request
- * \param width Available width for content
- * \param height Available height for content
* \param cb Callback to handle object events
* \param pw Pointer to client-specific data for callback
* \param child Child retrieval context, or NULL for top-level content
@@ -78,7 +76,6 @@ typedef nserror (*hlcache_handle_callback)(hlcache_handle *handle,
*/
nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
const char *referer, llcache_post_data *post,
- uint32_t width, uint32_t height,
hlcache_handle_callback cb, void *pw,
hlcache_child_context *child, hlcache_handle **result);