netsurf: branch master updated. 2bea506f837c9a1e9c12c448eb206e067770819c

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Wed Nov 14 02:10:32 GMT 2012


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/2bea506f837c9a1e9c12c448eb206e067770819c
...commit http://git.netsurf-browser.org/netsurf.git/commit/2bea506f837c9a1e9c12c448eb206e067770819c
...tree http://git.netsurf-browser.org/netsurf.git/tree/2bea506f837c9a1e9c12c448eb206e067770819c

The branch, master has been updated
       via  2bea506f837c9a1e9c12c448eb206e067770819c (commit)
      from  9acba6cbcc6dc807b93ad34b8e8b4e430ee7d5b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/2bea506f837c9a1e9c12c448eb206e067770819c
commit 2bea506f837c9a1e9c12c448eb206e067770819c
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    add Node interface binding just to get the prototype

diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript
index eff2052..2a33565 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_node := javascript/jsapi/node.bnd
 
 # 1: input file
 # 2: output file
diff --git a/javascript/jsapi/binding.h b/javascript/jsapi/binding.h
index c6a460c..6400217 100644
--- a/javascript/jsapi/binding.h
+++ b/javascript/jsapi/binding.h
@@ -143,4 +143,9 @@ JSObject *jsapi_new_Text(JSContext *cx,
 				dom_text *node,
 				struct html_content *htmlc);
 
+JSObject *jsapi_InitClass_Node(JSContext *cx, JSObject *parent);
+JSObject *jsapi_new_Node(JSContext *cx,
+				JSObject *prototype,
+				JSObject *parent);
+
 #endif
diff --git a/javascript/jsapi/node.bnd b/javascript/jsapi/node.bnd
new file mode 100644
index 0000000..bcf0ef7
--- /dev/null
+++ b/javascript/jsapi/node.bnd
@@ -0,0 +1,34 @@
+/* Binding to generate Node interface
+ *
+ * Copyright 2012 Vincent Sanders <vince at netsurf-browser.org>
+ *
+ * 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 "dom.idl";
+
+hdrcomment "Copyright 2012 Vincent Sanders <vince at netsurf-browser.org>";
+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 <dom/dom.h>
+        
+#include "utils/config.h"
+#include "utils/log.h"
+
+#include "javascript/jsapi.h"
+#include "javascript/jsapi/binding.h"
+
+%}
+
+binding node {
+    type js_libdom; /* the binding type */
+
+    interface Node; /* Web IDL interface to generate */
+}
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 45541fa..767b94f 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -135,6 +135,11 @@ api init %{
 		return NULL;
 	}
 
+	user_proto = jsapi_InitClass_Node(cx, prototype);
+	if (user_proto == NULL) {
+		return NULL;
+	}
+
 %}
 
 api new %{


-----------------------------------------------------------------------

Summary of changes:
 Makefile.sources.javascript             |    1 +
 javascript/jsapi/binding.h              |    5 +++++
 javascript/jsapi/{text.bnd => node.bnd} |   21 +++++----------------
 javascript/jsapi/window.bnd             |    5 +++++
 4 files changed, 16 insertions(+), 16 deletions(-)
 copy javascript/jsapi/{text.bnd => node.bnd} (68%)

diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript
index eff2052..2a33565 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_node := javascript/jsapi/node.bnd
 
 # 1: input file
 # 2: output file
diff --git a/javascript/jsapi/binding.h b/javascript/jsapi/binding.h
index c6a460c..6400217 100644
--- a/javascript/jsapi/binding.h
+++ b/javascript/jsapi/binding.h
@@ -143,4 +143,9 @@ JSObject *jsapi_new_Text(JSContext *cx,
 				dom_text *node,
 				struct html_content *htmlc);
 
+JSObject *jsapi_InitClass_Node(JSContext *cx, JSObject *parent);
+JSObject *jsapi_new_Node(JSContext *cx,
+				JSObject *prototype,
+				JSObject *parent);
+
 #endif
diff --git a/javascript/jsapi/text.bnd b/javascript/jsapi/node.bnd
similarity index 68%
copy from javascript/jsapi/text.bnd
copy to javascript/jsapi/node.bnd
index 42791d0..bcf0ef7 100644
--- a/javascript/jsapi/text.bnd
+++ b/javascript/jsapi/node.bnd
@@ -1,4 +1,4 @@
-/* Binding to generate Text interface
+/* Binding to generate Node interface
  *
  * Copyright 2012 Vincent Sanders <vince at netsurf-browser.org>
  *
@@ -8,9 +8,7 @@
  *         http://www.opensource.org/licenses/mit-license
  */
 
-#include "dom.bnd"
-
-webidlfile "html.idl";
+webidlfile "dom.idl";
 
 hdrcomment "Copyright 2012 Vincent Sanders <vince at netsurf-browser.org>";
 hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/";
@@ -20,7 +18,7 @@ hdrcomment "        http://www.opensource.org/licenses/mit-license";
 preamble %{
 
 #include <dom/dom.h>
-
+        
 #include "utils/config.h"
 #include "utils/log.h"
 
@@ -29,17 +27,8 @@ preamble %{
 
 %}
 
-binding text {
+binding node {
     type js_libdom; /* the binding type */
 
-    interface Text; /* Web IDL interface to generate */
-
-    private "dom_text *" node;
-    private "struct html_content *" htmlc; 
+    interface Node; /* Web IDL interface to generate */
 }
-
-api finalise %{
-        if (private != NULL) {
-                dom_node_unref(private->node);
-        }
-%}
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 45541fa..767b94f 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -135,6 +135,11 @@ api init %{
 		return NULL;
 	}
 
+	user_proto = jsapi_InitClass_Node(cx, prototype);
+	if (user_proto == NULL) {
+		return NULL;
+	}
+
 %}
 
 api new %{


-- 
NetSurf Browser



More information about the netsurf-commits mailing list