1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge branch 'master' of git+ssh://pasky.or.cz/srv/git/elinks

This commit is contained in:
Witold Filipczyk 2010-08-08 09:47:01 +02:00 committed by Witold Filipczyk
commit 885ffc9d40
7 changed files with 53 additions and 0 deletions

View File

@ -437,6 +437,10 @@ Muhamad Faizal <faizal@mfaizal.net>
Nalin Dahyabhai <nalin@redhat.com>
Fixed occasional destroying of read buffer on Alpha
Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Rudimentary support for the HTML5 media elements, <video> and
<audio>.
Nuno Miguel Rodrigues <nmr@europa.net.dhis.org>
UnixWare console fix

2
NEWS
View File

@ -69,6 +69,8 @@ Miscellaneous:
* enhancement: Add ``Search contents'' button to the cache manager with
which one can search through the cache items' data rather than their
metadata.
* enhancement: Add rudimentary support for the HTML5 media elements,
<video> and <audio>.
* link against lua51 not lua50
* configure options to link against libmozjs of xulrunner
* using iconv for some multibyte charsets. It works if the terminal codepage

View File

@ -407,6 +407,27 @@ html_applet(struct html_context *html_context, unsigned char *a,
mem_free(code);
}
void
html_audio(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{
unsigned char *url;
/* This just places a link where a audio element would be. */
url = get_url_val(a, "src", html_context->doc_cp);
if (!url) return;
html_focusable(html_context, a);
put_link_line("Audio: ", basename(url), url,
html_context->options->framename, html_context);
html_skip(html_context, a);
mem_free(url);
}
static void
html_iframe_do(unsigned char *a, unsigned char *object_src,
struct html_context *html_context)
@ -530,7 +551,26 @@ html_embed(struct html_context *html_context, unsigned char *a,
mem_free_set(&object_src, NULL);
}
void
html_video(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{
unsigned char *url;
/* This just places a link where a video element would be. */
url = get_url_val(a, "src", html_context->doc_cp);
if (!url) return;
html_focusable(html_context, a);
put_link_line("Video: ", basename(url), url,
html_context->options->framename, html_context);
html_skip(html_context, a);
mem_free(url);
}
/* Link types:

View File

@ -14,6 +14,8 @@ element_handler_T html_iframe;
element_handler_T html_img;
element_handler_T html_link;
element_handler_T html_object;
element_handler_T html_audio;
element_handler_T html_video;
element_handler_T html_embed;
#endif

View File

@ -429,6 +429,7 @@ static struct element_info elements[] = {
{"ABBR", html_italic, NULL, 0, ET_NESTABLE },
{"ADDRESS", html_address, NULL, 2, ET_NESTABLE },
{"APPLET", html_applet, NULL, 1, ET_NON_PAIRABLE},
{"AUDIO", html_audio, NULL, 1, ET_NON_PAIRABLE},
{"B", html_bold, NULL, 0, ET_NESTABLE },
{"BASE", html_base, NULL, 0, ET_NON_PAIRABLE},
{"BASEFONT", html_font, NULL, 0, ET_NON_PAIRABLE},
@ -496,6 +497,7 @@ static struct element_info elements[] = {
{"TT", html_tt, NULL, 0, ET_NON_NESTABLE},
{"U", html_underline, NULL, 0, ET_NESTABLE },
{"UL", html_ul, NULL, 2, ET_NESTABLE },
{"VIDEO", html_video, NULL, 1, ET_NON_PAIRABLE},
{"XMP", html_xmp, html_xmp_close, 2, ET_NESTABLE },
{NULL, NULL, NULL, 0, ET_NESTABLE },
};

View File

@ -14,6 +14,7 @@
#include "bfu/dialog.h"
#include "cache/cache.h"
#include "config/options.h"
#include "cookies/cookies.h"
#include "dialogs/menu.h"
#include "dialogs/status.h"

View File

@ -2,6 +2,8 @@
#define EL__ECMASCRIPT_SPIDERMONKEY_H
struct ecmascript_interpreter;
struct form_view;
struct form_state;
struct string;
void *spidermonkey_get_interpreter(struct ecmascript_interpreter *interpreter);