mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Merge branch 'master' into chris/palette-mapped-plotters
This commit is contained in:
commit
a46c5ae09f
@ -52,16 +52,16 @@ else
|
||||
|
||||
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0 libcurl libcares openssl)
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags tre libhubbub libcss)
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags tre libdom libcss)
|
||||
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs libxml-2.0 libcurl libcares openssl)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs tre libhubbub libcss)
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs tre libdom libcss)
|
||||
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
|
||||
|
||||
ifeq ($(SUBTARGET),os3)
|
||||
LDFLAGS += -liconv
|
||||
else
|
||||
LDFLAGS += -lauto
|
||||
LDFLAGS += -lauto -lpbl
|
||||
endif
|
||||
|
||||
EXETARGET := NetSurf
|
||||
|
@ -208,7 +208,7 @@ bool bitmap_test_opaque(void *bitmap)
|
||||
|
||||
for(a=0;a<p;a+=4)
|
||||
{
|
||||
if ((*bmi & 0x000000ffU) != 0x000000ffU) return false;
|
||||
if ((*bmi & 0xff000000U) != 0xff000000U) return false;
|
||||
bmi++;
|
||||
}
|
||||
return true;
|
||||
@ -328,6 +328,8 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
|
||||
IDoMethod(dto, PDTM_READPIXELARRAY, bitmap_get_buffer(bm),
|
||||
PBPAFMT_RGBA, bitmap_get_rowstride(bm), 0, 0,
|
||||
bmh->bmh_Width, bmh->bmh_Height);
|
||||
|
||||
bitmap_set_opaque(bm, bitmap_test_opaque(bm));
|
||||
}
|
||||
DisposeDTObject(dto);
|
||||
}
|
||||
|
@ -159,6 +159,8 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c)
|
||||
bm_buffer, bm_format, bitmap_get_rowstride(bitmap),
|
||||
0, 0, c->width, c->height);
|
||||
|
||||
bitmap_set_opaque(bitmap, bitmap_test_opaque(bitmap));
|
||||
|
||||
DisposeDTObject(dto);
|
||||
}
|
||||
else return NULL;
|
||||
|
@ -2824,7 +2824,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
GA_ID, GID_ICON,
|
||||
SPACE_MinWidth, 16,
|
||||
SPACE_MinHeight, 16,
|
||||
SPACE_Transparent, TRUE,
|
||||
SPACE_Transparent, FALSE,
|
||||
// SPACE_RenderHook, &g->shared->favicon_hook,
|
||||
SpaceEnd,
|
||||
CHILD_WeightedWidth,0,
|
||||
@ -2850,7 +2850,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
GA_ID, GID_SEARCH_ICON,
|
||||
SPACE_MinWidth, 16,
|
||||
SPACE_MinHeight, 16,
|
||||
SPACE_Transparent, TRUE,
|
||||
SPACE_Transparent, FALSE,
|
||||
SPACE_RenderHook, &g->shared->search_ico_hook,
|
||||
SpaceEnd,
|
||||
CHILD_WeightedWidth,0,
|
||||
@ -3830,8 +3830,8 @@ void gui_window_set_icon(struct gui_window *g, hlcache_handle *icon)
|
||||
{
|
||||
GetAttr(SPACE_AreaBox, g->shared->objects[GID_ICON], (ULONG *)&bbox);
|
||||
|
||||
EraseRect(g->shared->win->RPort, bbox->Left, bbox->Top,
|
||||
bbox->Left+16, bbox->Top+16);
|
||||
RefreshGList((struct Gadget *)g->shared->objects[GID_ICON],
|
||||
g->shared->win, NULL, 1);
|
||||
|
||||
if(bm)
|
||||
{
|
||||
|
@ -115,7 +115,40 @@ static JSClass jsclass_document =
|
||||
|
||||
static JSBool JSAPI_NATIVE(getElementById, JSContext *cx, uintN argc, jsval *vp)
|
||||
{
|
||||
JSAPI_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
JSString* u16_txt;
|
||||
char *txt;
|
||||
unsigned long txtlen;
|
||||
struct html_content *htmlc;
|
||||
dom_string *idstr;
|
||||
dom_element *idelement;
|
||||
|
||||
htmlc = JS_GetInstancePrivate(cx, JS_THIS_OBJECT(cx,vp), &jsclass_document, NULL);
|
||||
if (htmlc == NULL)
|
||||
return JS_FALSE;
|
||||
|
||||
if (htmlc->document == NULL) {
|
||||
/* no document available, this is obviously a problem
|
||||
* for finding elements
|
||||
*/
|
||||
JSAPI_SET_RVAL(cx, vp, JSVAL_NULL);
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
if (!JS_ConvertArguments(cx, argc, JSAPI_ARGV(cx, vp), "S", &u16_txt))
|
||||
return JS_FALSE;
|
||||
|
||||
JSString_to_char(u16_txt, txt, txtlen);
|
||||
|
||||
dom_string_create((unsigned char*)txt, txtlen, &idstr);
|
||||
|
||||
dom_document_get_element_by_id(htmlc->document, idstr, &idelement);
|
||||
|
||||
if (idelement==NULL) {
|
||||
JSAPI_SET_RVAL(cx, vp, JSVAL_NULL);
|
||||
} else {
|
||||
/* create element object and return it*/
|
||||
}
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
@ -334,7 +334,8 @@ html_create_html_data(html_content *c, const http_parameter *params)
|
||||
/* Create the parser binding */
|
||||
c->parser = dom_hubbub_parser_create(c->encoding,
|
||||
true,
|
||||
nsoption_bool(enable_javascript),
|
||||
nsoption_bool(enable_javascript),
|
||||
&c->document,
|
||||
NULL,
|
||||
html_process_script,
|
||||
c);
|
||||
@ -347,6 +348,7 @@ html_create_html_data(html_content *c, const http_parameter *params)
|
||||
c->parser = dom_hubbub_parser_create(c->encoding,
|
||||
true,
|
||||
nsoption_bool(enable_javascript),
|
||||
&c->document,
|
||||
NULL,
|
||||
html_process_script,
|
||||
c);
|
||||
@ -449,6 +451,7 @@ html_process_encoding_change(struct content *c,
|
||||
html->parser = dom_hubbub_parser_create(html->encoding,
|
||||
true,
|
||||
nsoption_bool(enable_javascript),
|
||||
&html->document,
|
||||
NULL,
|
||||
html_process_script,
|
||||
html);
|
||||
@ -468,6 +471,8 @@ html_process_encoding_change(struct content *c,
|
||||
html->parser = dom_hubbub_parser_create(html->encoding,
|
||||
true,
|
||||
nsoption_bool(enable_javascript),
|
||||
&html->document,
|
||||
|
||||
NULL,
|
||||
html_process_script,
|
||||
html);
|
||||
@ -1966,7 +1971,8 @@ html_begin_conversion(html_content *htmlc)
|
||||
union content_msg_data msg_data;
|
||||
|
||||
/** @todo Improve processing of errors */
|
||||
msg_data.error = messages_get("NoMemory");
|
||||
LOG(("Parsing failed"));
|
||||
msg_data.error = messages_get("ParsingFail");
|
||||
content_broadcast(&htmlc->base, CONTENT_MSG_ERROR, msg_data);
|
||||
|
||||
return false;
|
||||
@ -1975,23 +1981,15 @@ html_begin_conversion(html_content *htmlc)
|
||||
/* complete script execution */
|
||||
html_scripts_exec(htmlc);
|
||||
|
||||
htmlc->document = dom_hubbub_parser_get_document(htmlc->parser);
|
||||
|
||||
if (htmlc->document == NULL) {
|
||||
LOG(("Parsing failed"));
|
||||
msg_data.error = messages_get("ParsingFail");
|
||||
content_broadcast(&htmlc->base, CONTENT_MSG_ERROR, msg_data);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* quirks mode */
|
||||
exc = dom_document_get_quirks_mode(htmlc->document, &htmlc->quirks);
|
||||
if (exc != DOM_NO_ERR) {
|
||||
LOG(("error retrieving quirks"));
|
||||
/** @todo should this be fatal to the conversion? */
|
||||
}
|
||||
|
||||
LOG(("quirks set to %d", htmlc->quirks));
|
||||
|
||||
|
||||
/* get encoding */
|
||||
if (htmlc->encoding == NULL) {
|
||||
const char *encoding;
|
||||
encoding = dom_hubbub_parser_get_encoding(htmlc->parser,
|
||||
|
Loading…
Reference in New Issue
Block a user