From b1342796448c01515d8dcb4d992f804a5f2f4fb4 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 20 Aug 2012 22:02:37 +0100 Subject: Allow the presence of form inputs to be obtained without knowledge of html content internals. --- render/html.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 17ca80184..8d64fdf7d 100644 --- a/render/html.c +++ b/render/html.c @@ -2670,6 +2670,23 @@ html_get_contextual_content(struct content *c, box->usemap, box_x, box_y, x, y, &target)); } + if (box->gadget) { + switch (box->gadget->type) { + case GADGET_TEXTBOX: + case GADGET_TEXTAREA: + case GADGET_PASSWORD: + data->form_features = CTX_FORM_TEXT; + break; + + case GADGET_FILE: + data->form_features = CTX_FORM_FILE; + break; + + default: + data->form_features = CTX_FORM_NONE; + break; + } + } } } -- cgit v1.2.3