summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-12-30 00:34:26 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-12-30 00:34:26 +0000
commit1353585036eac67feeffdda4de20d91f036c1576 (patch)
tree70b313ef005a4d7945bccaf86ed499d0b3ff77fe /render
parent98b451ffaeedf9f5b0d4ab249c9f8eb216988eb1 (diff)
downloadnetsurf-1353585036eac67feeffdda4de20d91f036c1576.tar.gz
netsurf-1353585036eac67feeffdda4de20d91f036c1576.tar.bz2
Implement form targets (fix 1619094)
svn path=/trunk/netsurf/; revision=3125
Diffstat (limited to 'render')
-rw-r--r--render/form.c3
-rw-r--r--render/form.h3
-rw-r--r--render/html.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/render/form.c b/render/form.c
index b9aa654a0..191985694 100644
--- a/render/form.c
+++ b/render/form.c
@@ -38,7 +38,7 @@ static char *form_acceptable_charset(struct form *form);
* \return a new structure, or 0 on memory exhaustion
*/
-struct form *form_new(char *action, form_method method, char *charset,
+struct form *form_new(char *action, char *target, form_method method, char *charset,
char *doc_charset)
{
struct form *form;
@@ -47,6 +47,7 @@ struct form *form_new(char *action, form_method method, char *charset,
if (!form)
return 0;
form->action = action;
+ form->target = target;
form->method = method;
form->accept_charsets = charset;
form->document_charset = doc_charset;
diff --git a/render/form.h b/render/form.h
index f691eea8f..edc7fb68f 100644
--- a/render/form.h
+++ b/render/form.h
@@ -30,6 +30,7 @@ typedef enum {
/** HTML form. */
struct form {
char *action; /**< Absolute URL to submit to. */
+ char *target; /**< Target to submit to. */
form_method method; /**< Method and enctype. */
char *accept_charsets; /**< Charset to submit form in */
char *document_charset; /**< Charset of document containing form */
@@ -103,7 +104,7 @@ struct form_successful_control {
struct form_successful_control *next; /**< Next in linked list. */
};
-struct form *form_new(char *action, form_method method, char *charset,
+struct form *form_new(char *action, char *target, form_method method, char *charset,
char *doc_charset);
struct form_control *form_new_control(form_control_type type);
void form_add_control(struct form *form, struct form_control *control);
diff --git a/render/html.c b/render/html.c
index c00bf0948..ddf097cb3 100644
--- a/render/html.c
+++ b/render/html.c
@@ -503,7 +503,8 @@ bool html_head(struct content *c, xmlNode *head)
for (node = head->children; node != 0; node = node->next) {
if (node->type != XML_ELEMENT_NODE)
continue;
-
+
+ LOG(("Node: %s", node->name));
if (!c->title && strcmp(node->name, "title") == 0) {
xmlChar *title = xmlNodeGetContent(node);
if (!title)