mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Let html_select, html_textarea, and html_script call do_html_select,
do_html_textarea, and do_html_script directly instead of handling them specially in start_element.
This commit is contained in:
parent
08c1cdf9d4
commit
9062c83b51
@ -301,11 +301,10 @@ hid:
|
||||
|
||||
void
|
||||
html_select(struct html_context *html_context, unsigned char *a,
|
||||
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
|
||||
unsigned char *html, unsigned char *eof, unsigned char **end)
|
||||
{
|
||||
/* Note I haven't seen this code in use, do_html_select() seems to take
|
||||
* care of bussiness. --FF */
|
||||
/* It gets called when the "multiple" attribute is set. --jonas */
|
||||
if (!do_html_select(a, html, eof, end, html_context))
|
||||
return;
|
||||
|
||||
unsigned char *al = get_attr_val(a, "name", html_context->options);
|
||||
|
||||
@ -569,9 +568,9 @@ end_parse:
|
||||
|
||||
void
|
||||
html_textarea(struct html_context *html_context, unsigned char *a,
|
||||
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
|
||||
unsigned char *html, unsigned char *eof, unsigned char **end)
|
||||
{
|
||||
INTERNAL("This should be never called");
|
||||
do_html_textarea(a, html, eof, end, html_context);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -161,10 +161,10 @@ html_apply_canvas_bgcolor(struct html_context *html_context)
|
||||
|
||||
void
|
||||
html_script(struct html_context *html_context, unsigned char *a,
|
||||
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
|
||||
unsigned char *html, unsigned char *eof, unsigned char **end)
|
||||
{
|
||||
#ifdef CONFIG_ECMASCRIPT
|
||||
/* We did everything (even possibly html_skip()) in do_html_script(). */
|
||||
do_html_script(html_context, a, html, eof, end);
|
||||
#else
|
||||
html_skip(html_context, a);
|
||||
#endif
|
||||
|
@ -789,16 +789,6 @@ start_element(struct element_info *ei,
|
||||
ln_break(html_context, 2);
|
||||
return html;
|
||||
}
|
||||
if (ei->func == html_select) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
if (!do_html_select(attr, html, eof, &html, html_context))
|
||||
return html;
|
||||
}
|
||||
if (ei->func == html_textarea) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
do_html_textarea(attr, html, eof, &html, html_context);
|
||||
return html;
|
||||
}
|
||||
|
||||
/* Support for <meta refresh="..."> inside <body>. (bug 700) */
|
||||
if (ei->func == html_meta && html_context->was_body) {
|
||||
@ -858,16 +848,6 @@ start_element(struct element_info *ei,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ECMASCRIPT
|
||||
/* We need to have own element in the stack, that's why we waited for
|
||||
* so long. */
|
||||
if (ei->func == html_script) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
if (!do_html_script(html_context, attr, html, eof, &html))
|
||||
return html;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CSS
|
||||
if (html_top.options && html_context->options->css_enable) {
|
||||
/* XXX: We should apply CSS otherwise as well, but that'll need
|
||||
|
Loading…
Reference in New Issue
Block a user