From 1b8f9daa51c901119d4dc27f82fb993fc8378bd0 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 2 Jan 2013 17:19:32 +0000 Subject: [PATCH 1/6] Initial implementation of document.createComment Improve robustness of jsobject to libdom object conversion in appendChild --- Makefile.sources.javascript | 1 + javascript/jsapi/comment.bnd | 47 ++++++++++ javascript/jsapi/dom.bnd | 31 +++++-- javascript/jsapi/htmldocument.bnd | 137 ++++++++++++++++++------------ javascript/jsapi/htmlelement.bnd | 4 +- javascript/jsapi/navigator.bnd | 1 - javascript/jsapi/text.bnd | 4 +- javascript/jsapi/window.bnd | 9 +- 8 files changed, 168 insertions(+), 66 deletions(-) create mode 100644 javascript/jsapi/comment.bnd diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript index 4633e9d0d..bcdd68501 100644 --- a/Makefile.sources.javascript +++ b/Makefile.sources.javascript @@ -20,6 +20,7 @@ JSAPI_BINDING_location := javascript/jsapi/location.bnd JSAPI_BINDING_htmlcollection := javascript/jsapi/htmlcollection.bnd JSAPI_BINDING_nodelist := javascript/jsapi/nodelist.bnd JSAPI_BINDING_text := javascript/jsapi/text.bnd +JSAPI_BINDING_comment := javascript/jsapi/comment.bnd JSAPI_BINDING_node := javascript/jsapi/node.bnd JSAPI_BINDING_event := javascript/jsapi/event.bnd diff --git a/javascript/jsapi/comment.bnd b/javascript/jsapi/comment.bnd new file mode 100644 index 000000000..580f5cbed --- /dev/null +++ b/javascript/jsapi/comment.bnd @@ -0,0 +1,47 @@ +/* Binding to generate Comment interface + * + * Copyright 2012 Vincent Sanders + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * Released under the terms of the MIT License, + * http://www.opensource.org/licenses/mit-license + */ + + +webidlfile "html.idl"; + +hdrcomment "Copyright 2012 Vincent Sanders "; +hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/"; +hdrcomment "Released under the terms of the MIT License,"; +hdrcomment " http://www.opensource.org/licenses/mit-license"; + +preamble %{ + +#include + +#include "utils/config.h" +#include "utils/log.h" +#include "render/html_internal.h" +#include "javascript/jsapi.h" + +#include "comment.h" + +%} + +#include "dom.bnd" + +binding comment { + type js_libdom; /* the binding type */ + + interface Comment; /* Web IDL interface to generate */ + + private "dom_comment *" node; + private "struct html_content *" htmlc; +} + +api finalise %{ + if (private != NULL) { + dom_node_unref(private->node); + } +%} diff --git a/javascript/jsapi/dom.bnd b/javascript/jsapi/dom.bnd index e781b330c..b6f7cf440 100644 --- a/javascript/jsapi/dom.bnd +++ b/javascript/jsapi/dom.bnd @@ -10,6 +10,12 @@ webidlfile "dom.idl"; +preamble %{ +#include "comment.h" +#include "text.h" +#include "htmlelement.h" +%} + /* interface Node members */ getter nodeType %{ @@ -74,7 +80,7 @@ getter textContent %{ } %} - +/* interface Node { Node appendChild(Node node); } */ operation appendChild %{ struct dom_node *result = NULL; dom_exception exc; @@ -82,23 +88,32 @@ operation appendChild %{ struct jsclass_private *node_private; dom_node_type node_type; - JSLOG("appending %p", node); - + /* @todo: make this a distinct function jsapiobject_to_domnode() */ /* CAUTION this expects all Node objects private pointers to * have private->node in the same place */ - /* text */ - node_private = JS_GetInstancePrivate(cx, node, &JSClass_Text, NULL); - if (node_private == NULL) { + if (node == NULL) { + node_private = NULL; + } else { /* element */ node_private = JS_GetInstancePrivate(cx, node, &JSClass_HTMLElement, NULL); + if (node_private == NULL) { + /* text */ + node_private = JS_GetInstancePrivate(cx, node, &JSClass_Text, NULL); + if (node_private == NULL) { + /* comment */ + node_private = JS_GetInstancePrivate(cx, node, &JSClass_Comment, NULL); + } + } } - if (node_private == NULL) { - /* type error? */ + /* should cause Error: NOT_FOUND_ERR: DOM Exception 8 */ + JSLOG("Error: NOT_FOUND_ERR: DOM Exception 8"); return JS_FALSE; } + JSLOG("appending %p", node); + /* append the found element */ exc = dom_node_append_child(private->node, node_private->node, &result); if (exc != DOM_NO_ERR) { diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd index ddf408a9f..021694e17 100644 --- a/javascript/jsapi/htmldocument.bnd +++ b/javascript/jsapi/htmldocument.bnd @@ -8,8 +8,6 @@ * http://www.opensource.org/licenses/mit-license */ -#include "dom.bnd" - webidlfile "html.idl"; hdrcomment "Copyright 2012 Vincent Sanders "; @@ -20,7 +18,7 @@ hdrcomment " http://www.opensource.org/licenses/mit-license"; preamble %{ #include - + #include "utils/config.h" #include "utils/log.h" #include "utils/corestrings.h" @@ -38,6 +36,8 @@ preamble %{ %} +#include "dom.bnd" + binding document { type js_libdom; /* the binding type */ @@ -47,10 +47,10 @@ binding document { * context structure. */ private "dom_document *" node; - private "struct html_content *" htmlc; + private "struct html_content *" htmlc; /** location instantiated on first use */ - property unshared location; + property unshared location; /* events through a single interface */ property unshared type EventHandler; @@ -70,9 +70,9 @@ getter location %{ /* already created - return it */ return JS_TRUE; } - jsret = jsapi_new_Location(cx, - NULL, - NULL, + jsret = jsapi_new_Location(cx, + NULL, + NULL, llcache_handle_get_url(private->htmlc->base.llcache), private->htmlc); %} @@ -110,7 +110,7 @@ getter documentElement %{ /* document (html) element */ exc = dom_document_get_document_element(private->node, (void *)&element); - if (exc != DOM_NO_ERR) { + if (exc != DOM_NO_ERR) { return JS_FALSE; } @@ -122,11 +122,11 @@ getter documentElement %{ getter head %{ dom_node *element; dom_node *head; - dom_exception exc; + dom_exception exc; /* document (html) element */ exc = dom_document_get_document_element(private->node, &element); - if (exc != DOM_NO_ERR) { + if (exc != DOM_NO_ERR) { return JS_FALSE; } @@ -142,13 +142,13 @@ getter head %{ getter body %{ dom_node *element; dom_node *body; - dom_exception exc; + dom_exception exc; JSLOG("Getting your body"); /* document (html) element */ exc = dom_document_get_document_element(private->node, &element); - if (exc != DOM_NO_ERR) { + if (exc != DOM_NO_ERR) { return JS_FALSE; } @@ -167,58 +167,58 @@ getter body %{ operation getElementById %{ dom_string *elementId_dom; dom_element *element; - dom_exception exc; + dom_exception exc; exc = dom_string_create((unsigned char*)elementId, elementId_len, &elementId_dom); - if (exc != DOM_NO_ERR) { - return JS_FALSE; - } + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } exc = dom_document_get_element_by_id(private->node, elementId_dom, &element); - dom_string_unref(elementId_dom); - if (exc != DOM_NO_ERR) { - return JS_FALSE; - } + dom_string_unref(elementId_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } - if (element != NULL) { - jsret = jsapi_new_HTMLElement(cx, NULL, NULL, element, private->htmlc); - } + if (element != NULL) { + jsret = jsapi_new_HTMLElement(cx, NULL, NULL, element, private->htmlc); + } %} -/* +/* * * Dom 4 says this should return a htmlcollection, libdom currently - * returns DOM 3 spec of a nodelist + * returns DOM 3 spec of a nodelist */ operation getElementsByTagName %{ dom_string *localName_dom; - /* dom_html_collection *collection;*/ - dom_nodelist *nodelist; - dom_exception exc; + /* dom_html_collection *collection;*/ + dom_nodelist *nodelist; + dom_exception exc; exc = dom_string_create((uint8_t *)localName, localName_len, &localName_dom); - if (exc != DOM_NO_ERR) { - return JS_FALSE; - } + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } - exc = dom_document_get_elements_by_tag_name(private->node, localName_dom, /*&collection*/&nodelist); - dom_string_unref(localName_dom); - if (exc != DOM_NO_ERR) { - return JS_FALSE; - } + exc = dom_document_get_elements_by_tag_name(private->node, localName_dom, /*&collection*/&nodelist); + dom_string_unref(localName_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } - if (/*collection*/nodelist != NULL) { - /*jsret = jsapi_new_HTMLCollection(cx, - NULL, - NULL, - collection, - private->htmlc);*/ - jsret = jsapi_new_NodeList(cx, - NULL, - NULL, - nodelist, - private->htmlc); - } + if (/*collection*/nodelist != NULL) { + /*jsret = jsapi_new_HTMLCollection(cx, + NULL, + NULL, + collection, + private->htmlc);*/ + jsret = jsapi_new_NodeList(cx, + NULL, + NULL, + nodelist, + private->htmlc); + } %} @@ -228,10 +228,10 @@ operation write %{ } %} -/* in dom Document */ +/* interface Document (dom) { Text createTextNode(DOMString data); } */ operation createTextNode %{ dom_string *data_dom; - dom_exception exc; + dom_exception exc; dom_text *text; if (data != NULL) { @@ -255,10 +255,43 @@ operation createTextNode %{ %} +/* interface Document (dom) { Comment createComment(DOMString data); } */ +operation createComment %{ + dom_string *data_dom; + dom_exception exc; + dom_comment *comment; + + if (data != NULL) { + + JSLOG("Creating string \"%s\"", data); + exc = dom_string_create((unsigned char*)data, + data_len, + &data_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } + + JSLOG("Creating comment object for dom string \"%s\"", + dom_string_data(comment)); + exc = dom_document_create_comment(private->node, + data_dom, + &comment); + dom_string_unref(data_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } + + jsret = jsapi_new_Comment(cx, NULL, NULL, comment, private->htmlc); + } + + JSLOG("returning jsobject %p", jsret); + +%} + /* in dom Document */ operation createElement %{ dom_string *localName_dom; - dom_exception exc; + dom_exception exc; dom_element *element; if (localName != NULL) { diff --git a/javascript/jsapi/htmlelement.bnd b/javascript/jsapi/htmlelement.bnd index 48ebbdb64..5e22f7e7d 100644 --- a/javascript/jsapi/htmlelement.bnd +++ b/javascript/jsapi/htmlelement.bnd @@ -8,8 +8,6 @@ * http://www.opensource.org/licenses/mit-license */ -#include "dom.bnd" - webidlfile "html.idl"; hdrcomment "Copyright 2012 Vincent Sanders "; @@ -34,6 +32,8 @@ preamble %{ %} +#include "dom.bnd" + binding htmlelement { type js_libdom; /* the binding type */ diff --git a/javascript/jsapi/navigator.bnd b/javascript/jsapi/navigator.bnd index d040edec2..2fb0c2d0a 100644 --- a/javascript/jsapi/navigator.bnd +++ b/javascript/jsapi/navigator.bnd @@ -8,7 +8,6 @@ * http://www.opensource.org/licenses/mit-license */ -#include "dom.bnd" webidlfile "html.idl"; diff --git a/javascript/jsapi/text.bnd b/javascript/jsapi/text.bnd index 6b4352116..eb17a943e 100644 --- a/javascript/jsapi/text.bnd +++ b/javascript/jsapi/text.bnd @@ -8,7 +8,6 @@ * http://www.opensource.org/licenses/mit-license */ -#include "dom.bnd" webidlfile "html.idl"; @@ -27,10 +26,11 @@ preamble %{ #include "javascript/jsapi.h" #include "text.h" -#include "htmlelement.h" %} +#include "dom.bnd" + binding text { type js_libdom; /* the binding type */ diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd index 288b5b3d8..937c150db 100644 --- a/javascript/jsapi/window.bnd +++ b/javascript/jsapi/window.bnd @@ -8,7 +8,6 @@ * http://www.opensource.org/licenses/mit-license */ -#include "dom.bnd" webidlfile "html.idl"; @@ -35,12 +34,15 @@ preamble %{ #include "nodelist.h" #include "htmldocument.h" #include "text.h" +#include "comment.h" #include "htmlelement.h" #include "window.h" #include "location.h" %} +#include "dom.bnd" + binding window { type js_libdom; /* the binding type */ @@ -150,6 +152,11 @@ api init %{ return NULL; } + user_proto = jsapi_InitClass_Comment(cx, prototype); + if (user_proto == NULL) { + return NULL; + } + user_proto = jsapi_InitClass_Node(cx, prototype); if (user_proto == NULL) { return NULL; From bb10e7131f615b9266d7a1996f561637286e2839 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 2 Jan 2013 22:43:29 +0000 Subject: [PATCH 2/6] use a prologue section in the node binding to abstract out javascrip dom node to libdom node conversion --- javascript/jsapi/dom.bnd | 74 +++++++++++++++++++++---------- javascript/jsapi/htmldocument.bnd | 2 +- javascript/jsapi/window.bnd | 35 +++++++-------- 3 files changed, 69 insertions(+), 42 deletions(-) diff --git a/javascript/jsapi/dom.bnd b/javascript/jsapi/dom.bnd index b6f7cf440..3fc7f9ed1 100644 --- a/javascript/jsapi/dom.bnd +++ b/javascript/jsapi/dom.bnd @@ -16,6 +16,51 @@ preamble %{ #include "htmlelement.h" %} + +prologue %{ +/* CAUTION this expects all javascript Node objects private pointers + * to have private->node in the same place. + */ +static struct dom_node *jsnode_to_domnode(JSContext *cx, JSObject *jsnode) +{ + struct jsclass_private *jsnode_private; + + if (jsnode == NULL) { + return NULL; + } + + /* element */ + jsnode_private = JS_GetInstancePrivate(cx, + jsnode, + &JSClass_HTMLElement, + NULL); + if (jsnode_private != NULL) { + return (struct dom_node *)jsnode_private->node; + } + + /* text */ + jsnode_private = JS_GetInstancePrivate(cx, + jsnode, + &JSClass_Text, + NULL); + if (jsnode_private != NULL) { + return (struct dom_node *)jsnode_private->node; + } + + /* comment */ + jsnode_private = JS_GetInstancePrivate(cx, + jsnode, + &JSClass_Comment, + NULL); + if (jsnode_private != NULL) { + return (struct dom_node *)jsnode_private->node; + } + + return NULL; +} + +%} + /* interface Node members */ getter nodeType %{ @@ -82,41 +127,24 @@ getter textContent %{ /* interface Node { Node appendChild(Node node); } */ operation appendChild %{ + struct dom_node *domnode; /* dom node from js input node */ struct dom_node *result = NULL; dom_exception exc; - - struct jsclass_private *node_private; dom_node_type node_type; - /* @todo: make this a distinct function jsapiobject_to_domnode() */ - /* CAUTION this expects all Node objects private pointers to - * have private->node in the same place - */ - if (node == NULL) { - node_private = NULL; - } else { - /* element */ - node_private = JS_GetInstancePrivate(cx, node, &JSClass_HTMLElement, NULL); - if (node_private == NULL) { - /* text */ - node_private = JS_GetInstancePrivate(cx, node, &JSClass_Text, NULL); - if (node_private == NULL) { - /* comment */ - node_private = JS_GetInstancePrivate(cx, node, &JSClass_Comment, NULL); - } - } - } - if (node_private == NULL) { + domnode = jsnode_to_domnode(cx, node); + if (domnode == NULL) { /* should cause Error: NOT_FOUND_ERR: DOM Exception 8 */ JSLOG("Error: NOT_FOUND_ERR: DOM Exception 8"); return JS_FALSE; } - JSLOG("appending %p", node); + JSLOG("appending js node %p (dom %p)", node, domnode); /* append the found element */ - exc = dom_node_append_child(private->node, node_private->node, &result); + exc = dom_node_append_child(private->node, domnode, &result); if (exc != DOM_NO_ERR) { + JSLOG("Error: DOM Exception (libdom append child)"); return JS_FALSE; } diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd index 021694e17..8d5c69eb5 100644 --- a/javascript/jsapi/htmldocument.bnd +++ b/javascript/jsapi/htmldocument.bnd @@ -272,7 +272,7 @@ operation createComment %{ } JSLOG("Creating comment object for dom string \"%s\"", - dom_string_data(comment)); + dom_string_data(data_dom)); exc = dom_document_create_comment(private->node, data_dom, &comment); diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd index 937c150db..bba1eb7db 100644 --- a/javascript/jsapi/window.bnd +++ b/javascript/jsapi/window.bnd @@ -10,6 +10,7 @@ webidlfile "html.idl"; +webidlfile "dom.idl"; hdrcomment "Copyright 2012 Vincent Sanders "; hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/"; @@ -19,7 +20,7 @@ hdrcomment " http://www.opensource.org/licenses/mit-license"; preamble %{ #include - + #include "utils/config.h" #include "utils/log.h" #include "utils/corestrings.h" @@ -41,8 +42,6 @@ preamble %{ %} -#include "dom.bnd" - binding window { type js_libdom; /* the binding type */ @@ -109,7 +108,7 @@ api init %{ return NULL; /* Initialises all the user javascript classes to make their - * prototypes available. + * prototypes available. */ /** @todo should we be managing these prototype objects ourselves */ user_proto = jsapi_InitClass_Document(cx, prototype); @@ -173,16 +172,16 @@ api new %{ /* @todo sort out windows that are not globals */ assert(parent == NULL); - /* the window object is the global so its prototype *is* the instance */ - newobject = prototype; + /* the window object is the global so its prototype *is* the instance */ + newobject = prototype; /* instantiate the subclasses off the window global */ private->document = jsapi_new_Document(cx, - NULL, - newobject, - (dom_document *)dom_node_ref(htmlc->document), - htmlc); - if (private->document == NULL) { + NULL, + newobject, + (dom_document *)dom_node_ref(htmlc->document), + htmlc); + if (private->document == NULL) { free(private); return NULL; } @@ -219,7 +218,7 @@ operation prompt %{ /* boolean dispatchEvent(Event event); */ operation dispatchEvent %{ /* this implementation is unique to the window object as it is - * not a "real" dom node. + * not a "real" dom node. */ /* caution, this must match the struct generated from event.bnd */ @@ -249,7 +248,7 @@ operation dispatchEvent %{ jsret = JS_CallFunctionValue(cx, NULL, eventval, 1, event_argv, &event_rval); } } - } + } %} getter location %{ @@ -268,18 +267,18 @@ getter self %{ getter EventHandler %{ /* this implementation is unique to the window object as it is - * not a dom node. + * not a dom node. */ - JSLOG("propname[%d]=\"%s\"", + JSLOG("propname[%d]=\"%s\"", tinyid, jsclass_properties[tinyid].name); %} setter EventHandler %{ /* this implementation is unique to the window object as it is - * not a dom node. + * not a dom node. */ - JSLOG("propname[%d]=\"%s\"", - tinyid, + JSLOG("propname[%d]=\"%s\"", + tinyid, jsclass_properties[tinyid].name); %} From beffd9e481e9192730266f09bd5c27bf386d0e52 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 2 Jan 2013 23:13:28 +0000 Subject: [PATCH 3/6] search for teh correct script type in the defer callback. Should fix SF bug #3599063 --- render/html_script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/html_script.c b/render/html_script.c index 9edd08cf2..9c14e84ce 100644 --- a/render/html_script.c +++ b/render/html_script.c @@ -212,7 +212,7 @@ convert_script_defer_cb(hlcache_handle *script, /* Find script */ for (i = 0, s = parent->scripts; i != parent->scripts_count; i++, s++) { - if (s->type == HTML_SCRIPT_ASYNC && s->data.handle == script) + if (s->type == HTML_SCRIPT_DEFER && s->data.handle == script) break; } From 924f8844d4e94f56232d70b25a925731ab19a84c Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 3 Jan 2013 00:28:51 +0000 Subject: [PATCH 4/6] Treat cookies from HTTP and HTTPS as identical. --- content/urldb.c | 47 ++++++++++++++++++++++++++------------------- utils/corestrings.c | 3 +++ utils/corestrings.h | 1 + 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/content/urldb.c b/content/urldb.c index e3cc1d73d..050dbf650 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -2410,9 +2410,9 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) const char *path; char *ret; lwc_string *scheme; + bool target_is_secure; time_t now; int i; - bool match; assert(url != NULL); @@ -2425,7 +2425,15 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) if (!p) return NULL; - scheme = p->scheme; + scheme = nsurl_get_component(url, NSURL_SCHEME); + if (scheme == NULL) + scheme = lwc_string_ref(corestring_lwc_http); + + if (lwc_string_caseless_isequal(scheme, corestring_lwc_https, + &target_is_secure) != lwc_error_ok) + return NULL; + + lwc_string_unref(scheme); matched_cookies = malloc(matched_cookies_size * sizeof(struct cookie_internal_data *)); @@ -2484,11 +2492,7 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) /* cookie has expired => ignore */ continue; - if (c->secure && lwc_string_isequal( - q->scheme, - corestring_lwc_https, - &match) && - match == false) + if (c->secure && target_is_secure == false) /* secure cookie for insecure host. * ignore */ continue; @@ -2523,11 +2527,7 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) /* cookie has expired => ignore */ continue; - if (c->secure && lwc_string_isequal( - q->scheme, - corestring_lwc_https, - &match) && - match == false) + if (c->secure && target_is_secure == false) /* Secure cookie for insecure server * => ignore */ continue; @@ -2567,10 +2567,7 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) /* paths don't match => ignore */ continue; - if (c->secure && lwc_string_isequal(p->scheme, - corestring_lwc_https, - &match) && - match == false) + if (c->secure && target_is_secure == false) /* Secure cookie for insecure server * => ignore */ continue; @@ -2601,10 +2598,7 @@ char *urldb_get_cookie(nsurl *url, bool include_http_only) /* paths don't match => ignore */ continue; - if (c->secure && lwc_string_isequal(scheme, - corestring_lwc_https, - &match) && - match == false) + if (c->secure && target_is_secure == false) /* secure cookie for insecure host. ignore */ continue; @@ -2698,6 +2692,19 @@ bool urldb_set_cookie(const char *header, nsurl *url, nsurl *referer) return false; } + /* If HTTPS, store cookie using HTTP */ + if (lwc_string_caseless_isequal(scheme, corestring_lwc_https, + &match) != lwc_error_ok) { + lwc_string_unref(scheme); + nsurl_unref(urlt); + return false; + } + + if (match) { + lwc_string_unref(scheme); + scheme = lwc_string_ref(corestring_lwc_http); + } + path = nsurl_get_component(url, NSURL_PATH); if (path == NULL) { lwc_string_unref(scheme); diff --git a/utils/corestrings.c b/utils/corestrings.c index 9fee96d6e..19ffcd148 100644 --- a/utils/corestrings.c +++ b/utils/corestrings.c @@ -58,6 +58,7 @@ lwc_string *corestring_lwc_head; lwc_string *corestring_lwc_hidden; lwc_string *corestring_lwc_hr; lwc_string *corestring_lwc_html; +lwc_string *corestring_lwc_http; lwc_string *corestring_lwc_https; lwc_string *corestring_lwc_iframe; lwc_string *corestring_lwc_image; @@ -272,6 +273,7 @@ void corestrings_fini(void) CSS_LWC_STRING_UNREF(hidden); CSS_LWC_STRING_UNREF(hr); CSS_LWC_STRING_UNREF(html); + CSS_LWC_STRING_UNREF(http); CSS_LWC_STRING_UNREF(https); CSS_LWC_STRING_UNREF(iframe); CSS_LWC_STRING_UNREF(image); @@ -506,6 +508,7 @@ nserror corestrings_init(void) CSS_LWC_STRING_INTERN(hidden); CSS_LWC_STRING_INTERN(hr); CSS_LWC_STRING_INTERN(html); + CSS_LWC_STRING_INTERN(http); CSS_LWC_STRING_INTERN(https); CSS_LWC_STRING_INTERN(iframe); CSS_LWC_STRING_INTERN(image); diff --git a/utils/corestrings.h b/utils/corestrings.h index 08d254501..74c3faa82 100644 --- a/utils/corestrings.h +++ b/utils/corestrings.h @@ -62,6 +62,7 @@ extern lwc_string *corestring_lwc_head; extern lwc_string *corestring_lwc_hidden; extern lwc_string *corestring_lwc_hr; extern lwc_string *corestring_lwc_html; +extern lwc_string *corestring_lwc_http; extern lwc_string *corestring_lwc_https; extern lwc_string *corestring_lwc_iframe; extern lwc_string *corestring_lwc_image; From 568a9c2b8fdbaf92af6661b8eb4c0efef74a1179 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 3 Jan 2013 00:33:36 +0000 Subject: [PATCH 5/6] Remove junk "http_equiv" string. --- utils/corestrings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/corestrings.c b/utils/corestrings.c index 19ffcd148..4be9871ce 100644 --- a/utils/corestrings.c +++ b/utils/corestrings.c @@ -641,7 +641,7 @@ nserror corestrings_init(void) CSS_DOM_STRING_INTERN(href); CSS_DOM_STRING_INTERN(hreflang); CSS_DOM_STRING_INTERN(hspace); - CSS_DOM_STRING_INTERN(http_equiv); + /* http-equiv: see below */ CSS_DOM_STRING_INTERN(id); CSS_DOM_STRING_INTERN(input); CSS_DOM_STRING_INTERN(invalid); From 0c56340897f5c73b5b6952dd288cdd9839a2b0ac Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Thu, 3 Jan 2013 00:41:11 +0000 Subject: [PATCH 6/6] Fix typo. --- riscos/scripts/Run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscos/scripts/Run b/riscos/scripts/Run index 5f59b7ffa..d3b9988e8 100644 --- a/riscos/scripts/Run +++ b/riscos/scripts/Run @@ -93,7 +93,7 @@ RMEnsure Iconv 0.11 Error NetSurf requires Iconv 0.11 or later. This can be down | Ensure CryptRandom RMEnsure CryptRandom 0.12 NetSurfRMLoad System:Modules.CryptRand -RMEnsure CryptRandom 0.12 Error NetSurf requires CryptRandom 0.12 or later. This can be downloaded form http://www.riscos.info/index.php/CryptRandom +RMEnsure CryptRandom 0.12 Error NetSurf requires CryptRandom 0.12 or later. This can be downloaded from http://www.riscos.info/index.php/CryptRandom | Disable SpecialFX, if present Set NetSurf$SpecialFX 1