diff --git a/src/document/renderer.c b/src/document/renderer.c index 1bb3dca0b..1a464c936 100644 --- a/src/document/renderer.c +++ b/src/document/renderer.c @@ -329,8 +329,6 @@ render_document(struct view_state *vs, struct document_view *doc_view, if (document) { doc_view->document = document; } else { - struct form *form; - document = init_document(cached, options); if (!document) return; doc_view->document = document; @@ -362,12 +360,6 @@ render_document(struct view_state *vs, struct document_view *doc_view, #ifdef CONFIG_CSS document->css_magic = get_document_css_magic(document); #endif - if (doc_view->reload) { - foreach (form, document->forms) { - do_reset_form(doc_view, form); - } - doc_view->reload = 0; - } } #ifdef CONFIG_ECMASCRIPT if (!vs->ecmascript_fragile) diff --git a/src/document/view.h b/src/document/view.h index 0eacb72f1..4c07b0039 100644 --- a/src/document/view.h +++ b/src/document/view.h @@ -25,7 +25,6 @@ struct document_view { int last_x, last_y; /* last pos of window */ int depth; unsigned int used:1; - unsigned int reload:1; }; #define get_old_current_link(doc_view) \ diff --git a/src/session/session.c b/src/session/session.c index 2637c065f..07e54b1f5 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -1199,8 +1199,13 @@ reload(struct session *ses, enum cache_mode cache_mode) struct location *loc = cur_loc(ses); struct file_to_load *ftl; struct document_view *doc_view = current_frame(ses); + struct document *document = doc_view->document; + struct form *form; - doc_view->reload = 1; + assert(document); + foreach (form, document->forms) { + do_reset_form(doc_view, form); + } #ifdef CONFIG_ECMASCRIPT loc->vs.ecmascript_fragile = 1;