summaryrefslogtreecommitdiff
path: root/css
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-03-29 22:33:21 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-03-29 22:33:21 +0000
commit9aca901eb1db3b6f373882fe8b707e44959e2ec1 (patch)
treee21e30e702cab909eacdebc067a78dbd17ff8f8f /css
parent2a53c4c811a22b7382f0fd071a2f3ce477594340 (diff)
downloadnetsurf-9aca901eb1db3b6f373882fe8b707e44959e2ec1.tar.gz
netsurf-9aca901eb1db3b6f373882fe8b707e44959e2ec1.tar.bz2
The convert stage of a content's state progression no longer reflows the content to the provided dimensions.
It is now defined as converting the content into a state in which it is ready for use. The user of the content is now responsible for performing an initial reformat (sic) of the content before it can be redrawn. Purge width/height parameters from hlcache_handle_retrieve/content_convert/*_convert APIs. Fix up content handlers affected by the above change in semantics. Ensure that browser_window_callback performs an initial reformat of its content. svn path=/trunk/netsurf/; revision=10207
Diffstat (limited to 'css')
-rw-r--r--css/css.c12
-rw-r--r--css/css.h4
2 files changed, 6 insertions, 10 deletions
diff --git a/css/css.c b/css/css.c
index 6882e7fa8..eff6690ac 100644
--- a/css/css.c
+++ b/css/css.c
@@ -150,18 +150,16 @@ css_error nscss_process_css_data(struct content_css_data *c, char *data,
* Convert a CSS content ready for use
*
* \param c Content to convert
- * \param w Width of area content will be displayed in
- * \param h Height of area content will be displayed in
* \return true on success, false on failure
*/
-bool nscss_convert(struct content *c, int w, int h)
+bool nscss_convert(struct content *c)
{
union content_msg_data msg_data;
uint32_t i;
size_t size;
css_error error;
- error = nscss_convert_css_data(&c->data.css, w, h);
+ error = nscss_convert_css_data(&c->data.css);
if (error != CSS_OK) {
msg_data.error = "?";
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
@@ -198,11 +196,9 @@ bool nscss_convert(struct content *c, int w, int h)
* Convert CSS data ready for use
*
* \param c CSS data to convert
- * \param w Width of area content will be displayed in
- * \param h Height of area content will be displayed in
* \return CSS error
*/
-css_error nscss_convert_css_data(struct content_css_data *c, int w, int h)
+css_error nscss_convert_css_data(struct content_css_data *c)
{
const char *referer;
uint32_t i = 0;
@@ -255,7 +251,7 @@ css_error nscss_convert_css_data(struct content_css_data *c, int w, int h)
i = c->import_count;
c->imports[c->import_count].media = media;
nerror = hlcache_handle_retrieve(lwc_string_data(uri),
- 0, referer, NULL, w, h, nscss_import, c,
+ 0, referer, NULL, nscss_import, c,
&child, &c->imports[c->import_count++].c);
if (error != NSERROR_OK) {
return CSS_NOMEM;
diff --git a/css/css.h b/css/css.h
index 925b4ae40..e82d7e532 100644
--- a/css/css.h
+++ b/css/css.h
@@ -53,7 +53,7 @@ bool nscss_create(struct content *c, const struct http_parameter *params);
bool nscss_process_data(struct content *c, char *data, unsigned int size);
-bool nscss_convert(struct content *c, int w, int h);
+bool nscss_convert(struct content *c);
void nscss_destroy(struct content *c);
@@ -61,7 +61,7 @@ nserror nscss_create_css_data(struct content_css_data *c,
const char *url, const char *charset, bool quirks);
css_error nscss_process_css_data(struct content_css_data *c, char *data,
unsigned int size);
-css_error nscss_convert_css_data(struct content_css_data *c, int w, int h);
+css_error nscss_convert_css_data(struct content_css_data *c);
void nscss_destroy_css_data(struct content_css_data *c);
struct nscss_import *nscss_get_imports(struct hlcache_handle *h, uint32_t *n);