summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-01-24 23:02:37 +0000
committerJames Bursa <james@netsurf-browser.org>2005-01-24 23:02:37 +0000
commit04f0525fbf8e6a35654d31dff0fa5fc98e5f5102 (patch)
treec9a4c6716bab22279b648f08b071d81b29758db3 /content
parent2583180b798193121122921193bdaffb872bde48 (diff)
downloadnetsurf-04f0525fbf8e6a35654d31dff0fa5fc98e5f5102.tar.gz
netsurf-04f0525fbf8e6a35654d31dff0fa5fc98e5f5102.tar.bz2
[project @ 2005-01-24 23:02:37 by bursa]
Reformat pages loaded from memory cache to window width. svn path=/import/netsurf/; revision=1467
Diffstat (limited to 'content')
-rw-r--r--content/content.c4
-rw-r--r--content/fetchcache.c5
-rw-r--r--content/fetchcache.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/content/content.c b/content/content.c
index c9ad560a5..2edec37b0 100644
--- a/content/content.c
+++ b/content/content.c
@@ -414,7 +414,9 @@ bool content_set_type(struct content *c, content_type type,
}
content_remove_user(c, callback, p1, p2);
content_broadcast(clone, CONTENT_MSG_NEWPTR, msg_data);
- fetchcache_go(clone, 0, callback, p1, p2, 0, 0, false);
+ fetchcache_go(clone, 0, callback, p1, p2,
+ clone->width, clone->height,
+ 0, 0, false);
}
}
diff --git a/content/fetchcache.c b/content/fetchcache.c
index bd20d12a3..327a32613 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -123,6 +123,8 @@ struct content * fetchcache(const char *url,
* the new content
* \param p1 user parameter for callback
* \param p2 user parameter for callback
+ * \param width available space
+ * \param height available space
* \param post_urlenc url encoded post data, or 0 if none
* \param post_multipart multipart post data, or 0 if none
* \param cookies send and accept cookies
@@ -134,6 +136,7 @@ void fetchcache_go(struct content *content, char *referer,
void (*callback)(content_msg msg, struct content *c, void *p1,
void *p2, union content_msg_data data),
void *p1, void *p2,
+ int width, int height,
char *post_urlenc,
struct form_successful_control *post_multipart,
bool cookies)
@@ -182,6 +185,8 @@ void fetchcache_go(struct content *content, char *referer,
} else if (content->status == CONTENT_STATUS_DONE) {
callback(CONTENT_MSG_LOADING, content, p1, p2, msg_data);
+ if (content->available_width != width)
+ content_reformat(content, width, height);
if (content_find_user(content, callback, p1, p2))
callback(CONTENT_MSG_READY, content, p1, p2, msg_data);
if (content_find_user(content, callback, p1, p2))
diff --git a/content/fetchcache.h b/content/fetchcache.h
index 68fe3fd7f..5a1794901 100644
--- a/content/fetchcache.h
+++ b/content/fetchcache.h
@@ -35,6 +35,7 @@ void fetchcache_go(struct content *content, char *referer,
void (*callback)(content_msg msg, struct content *c, void *p1,
void *p2, union content_msg_data data),
void *p1, void *p2,
+ int width, int height,
char *post_urlenc,
struct form_successful_control *post_multipart,
bool cookies);