diff options
author | Rob Kendrick (fatigue) <rjek@netsurf-browser.org> | 2012-11-04 11:20:31 +0000 |
---|---|---|
committer | Rob Kendrick (fatigue) <rjek@netsurf-browser.org> | 2012-11-04 11:20:31 +0000 |
commit | ba2a0fd72349668e41209028d2cf732702033963 (patch) | |
tree | 0be878c097d758343e05871f414511400e13d684 | |
parent | df088a4ba9880a4e38e15d23bfed7e46fd97e7f3 (diff) | |
parent | 8de9e1907759de5de7ded43573417b2f2e471c04 (diff) | |
download | netsurf-ba2a0fd72349668e41209028d2cf732702033963.tar.gz netsurf-ba2a0fd72349668e41209028d2cf732702033963.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
-rw-r--r-- | content/fetchers/curl.c | 5 | ||||
-rw-r--r-- | gtk/compat.c | 8 | ||||
-rw-r--r-- | javascript/jsapi/dom.bnd | 15 | ||||
-rw-r--r-- | javascript/jsapi/htmlcollection.bnd | 8 | ||||
-rw-r--r-- | javascript/jsapi/htmldocument.bnd | 6 | ||||
-rw-r--r-- | javascript/jsapi/htmlelement.bnd | 16 | ||||
-rw-r--r-- | javascript/jsapi/nodelist.bnd | 6 | ||||
-rw-r--r-- | javascript/jsapi/window.bnd | 2 |
8 files changed, 46 insertions, 20 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c index f33dfde50..e40d18a3e 100644 --- a/content/fetchers/curl.c +++ b/content/fetchers/curl.c @@ -194,8 +194,11 @@ void fetch_curl_register(void) SETOPT(CURLOPT_VERBOSE, 0); } SETOPT(CURLOPT_ERRORBUFFER, fetch_error_buffer); - if (nsoption_bool(suppress_curl_debug)) + if (nsoption_bool(suppress_curl_debug)) { SETOPT(CURLOPT_DEBUGFUNCTION, fetch_curl_ignore_debug); + } else { + SETOPT(CURLOPT_VERBOSE, 1); + } SETOPT(CURLOPT_WRITEFUNCTION, fetch_curl_data); SETOPT(CURLOPT_HEADERFUNCTION, fetch_curl_header); SETOPT(CURLOPT_PROGRESSFUNCTION, fetch_curl_progress); diff --git a/gtk/compat.c b/gtk/compat.c index 98e4de3ad..3c3bf9b2c 100644 --- a/gtk/compat.c +++ b/gtk/compat.c @@ -213,6 +213,12 @@ GtkAdjustment *nsgtk_layout_get_hadjustment(GtkLayout *layout) #endif } +static void nsgtk_layout_set_adjustment_step_increment(GtkAdjustment *adj, + int value) +{ + gtk_adjustment_set_step_increment(adj, value); +} + void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj) { #if GTK_CHECK_VERSION(3,0,0) @@ -220,6 +226,7 @@ void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj) #else gtk_layout_set_hadjustment(layout, adj); #endif + nsgtk_layout_set_adjustment_step_increment(adj, 8); } void nsgtk_layout_set_vadjustment(GtkLayout *layout, GtkAdjustment *adj) @@ -229,6 +236,7 @@ void nsgtk_layout_set_vadjustment(GtkLayout *layout, GtkAdjustment *adj) #else gtk_layout_set_vadjustment(layout, adj); #endif + nsgtk_layout_set_adjustment_step_increment(adj, 8); } GtkWidget *nsgtk_hbox_new(gboolean homogeneous, gint spacing) diff --git a/javascript/jsapi/dom.bnd b/javascript/jsapi/dom.bnd index 14068ba2e..fdf1f253a 100644 --- a/javascript/jsapi/dom.bnd +++ b/javascript/jsapi/dom.bnd @@ -13,6 +13,7 @@ operation getElementById %{ } 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; } @@ -37,16 +38,14 @@ operation getElementsByTagName %{ return JS_FALSE; } - LOG(("here")); - 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; } - LOG(("nodelist %p", nodelist)); if (/*collection*/nodelist != NULL) { - /* jsret = jsapi_new_HTMLCollection(cx, + /*jsret = jsapi_new_HTMLCollection(cx, NULL, NULL, collection, @@ -65,8 +64,14 @@ getter textContent %{ dom_string *content; exc = dom_node_get_text_content(private->node, &content); - if ((exc == DOM_NO_ERR) && (content != NULL)) { + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } + + if (content != NULL) { jsret = JS_NewStringCopyN(cx, dom_string_data(content), dom_string_length(content)); + dom_string_unref(content); + } %} diff --git a/javascript/jsapi/htmlcollection.bnd b/javascript/jsapi/htmlcollection.bnd index a7947cd29..f4a11549b 100644 --- a/javascript/jsapi/htmlcollection.bnd +++ b/javascript/jsapi/htmlcollection.bnd @@ -82,4 +82,10 @@ operation namedItem %{ jsret = jsapi_new_HTMLElement(cx, NULL, NULL, (dom_element *)domnode, private->htmlc); } - %} +%} + +api finalise %{ + if (private != NULL) { + dom_html_collection_unref(private->collection); + } +%} diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd index c90114162..4cc4971fb 100644 --- a/javascript/jsapi/htmldocument.bnd +++ b/javascript/jsapi/htmldocument.bnd @@ -38,3 +38,9 @@ binding document { interface Document; /* Web IDL interface to generate */ } + +api finalise %{ + if (private != NULL) { + dom_node_unref(private->node); + } +%} diff --git a/javascript/jsapi/htmlelement.bnd b/javascript/jsapi/htmlelement.bnd index 596bb7de0..83941c1b7 100644 --- a/javascript/jsapi/htmlelement.bnd +++ b/javascript/jsapi/htmlelement.bnd @@ -34,18 +34,12 @@ binding htmlelement { interface HTMLElement; /* Web IDL interface to generate */ - /* private members: - * - stored in private context structure. - * - passed as parameters to constructor and stored automatically. - * - are *not* considered for property getters/setters. - * - * internal members: - * - value stored in private context structure - * - not passed to constructor - * - must be instantiated by constructor - * - are considered for property getters/setters. - */ private "dom_element *" node; private "struct html_content *" htmlc; } +api finalise %{ + if (private != NULL) { + dom_node_unref(private->node); + } +%}
\ No newline at end of file diff --git a/javascript/jsapi/nodelist.bnd b/javascript/jsapi/nodelist.bnd index 710536dcf..d6e9fe941 100644 --- a/javascript/jsapi/nodelist.bnd +++ b/javascript/jsapi/nodelist.bnd @@ -63,5 +63,9 @@ operation item %{ } %} - +api finalise %{ + if (private != NULL) { + dom_nodelist_unref(private->nodelist); + } +%} diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd index 6f5e1af47..bf3f1700d 100644 --- a/javascript/jsapi/window.bnd +++ b/javascript/jsapi/window.bnd @@ -126,7 +126,7 @@ api new %{ private->document = jsapi_new_Document(cx, NULL, newobject, - htmlc->document, + (dom_document *)dom_node_ref(htmlc->document), htmlc); if (private->document == NULL) { free(private); |