1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

bug 620: reset forms before reload, not after.

The idea by Kalle Olavi Niemitalo.
This commit is contained in:
Witold Filipczyk 2007-03-26 19:21:23 +02:00 committed by Witold Filipczyk
parent 1655de5699
commit 182812352b
3 changed files with 6 additions and 10 deletions

View File

@ -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)

View File

@ -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) \

View File

@ -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;