netsurf: branch master updated. 7757008433c414974c527c4745e64aa5976d606a

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Mon Nov 19 17:25:58 GMT 2012


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/7757008433c414974c527c4745e64aa5976d606a
...commit http://git.netsurf-browser.org/netsurf.git/commit/7757008433c414974c527c4745e64aa5976d606a
...tree http://git.netsurf-browser.org/netsurf.git/tree/7757008433c414974c527c4745e64aa5976d606a

The branch, master has been updated
       via  7757008433c414974c527c4745e64aa5976d606a (commit)
       via  bb6b546b4be757cd515253cd10eccadf78e9afb6 (commit)
      from  e042008f2b7295243d2e6c72f948febe3cad0516 (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/7757008433c414974c527c4745e64aa5976d606a
commit 7757008433c414974c527c4745e64aa5976d606a
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    add window enumeration test

diff --git a/test/js/event-onload.html b/test/js/event-onload.html
new file mode 100644
index 0000000..aede985
--- /dev/null
+++ b/test/js/event-onload.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<title>createTextNode onload example</title>
+
+<script type="text/javascript">
+
+function addTextNode()
+{
+var newtext = document.createTextNode(" Some text added dynamically. ");
+var para = document.getElementById("p1");
+para.appendChild(newtext);
+}
+
+</script>
+</head>
+
+<body>
+<div style="border: 1px solid red">
+<p id="p1">First line of paragraph.<br /></p>
+</div><br />
+
+<button onclick="addTextNode();">add another textNode.</button>
+
+<script>
+window.onload = addTextNode;
+</script>
+
+</body>
+</html>
diff --git a/test/js/index.html b/test/js/index.html
index 7500870..7a17c95 100644
--- a/test/js/index.html
+++ b/test/js/index.html
@@ -8,6 +8,7 @@
 <h2>Window</h2>
 <ul>
 <li><a href="window.lately.html">location</a></li>
+<li><a href="window-enumerate.html">enumerate</a></li>
 </ul>
 
 <h2>Document write</h2>
diff --git a/test/js/window-enumerate.html b/test/js/window-enumerate.html
new file mode 100644
index 0000000..92a3111
--- /dev/null
+++ b/test/js/window-enumerate.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<title>window interface enumeration</title>
+<link rel="stylesheet" type="text/css" href="tst.css">
+</head>
+<body>
+<h1>window interface enumeration</h1>
+
+<script>
+function output(x,y) {
+    document.body.appendChild(document.createTextNode(x));
+    document.body.appendChild(document.createTextNode("("));
+    if (y != undefined) {
+        document.body.appendChild(document.createTextNode(y.length));
+    }
+    document.body.appendChild(document.createTextNode(") = "));
+    document.body.appendChild(document.createTextNode(y));
+    document.body.appendChild(document.createElement('br'));
+}
+
+for(var key in window) {
+    output(key, window[key]);
+}
+</script>
+</body>
+</html>


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

    cleanup formatting in binding files

diff --git a/javascript/jsapi/console.bnd b/javascript/jsapi/console.bnd
index 6aef9dc..7c34845 100644
--- a/javascript/jsapi/console.bnd
+++ b/javascript/jsapi/console.bnd
@@ -30,18 +30,6 @@ binding navigator {
 
     interface Console; /* 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.
-     */
-    internal "void *" gui_console;
 }
 
 operation log %{
diff --git a/javascript/jsapi/location.bnd b/javascript/jsapi/location.bnd
index c83fe46..db7a247 100644
--- a/javascript/jsapi/location.bnd
+++ b/javascript/jsapi/location.bnd
@@ -30,24 +30,13 @@ preamble %{
 %}
 
 binding location {
-    type js_libdom; /* the binding type */
-
-    interface Location; /* 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.
-     */
+	type js_libdom; /* the binding type */
+
+	interface Location; /* Web IDL interface to generate */
+
 	private "struct browser_window *" bw;
 }
 
 operation reload %{
-  browser_window_reload(private->bw, false);
+	browser_window_reload(private->bw, false);
 %}
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 767b94f..c4e6e88 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -23,15 +23,9 @@ binding window {
 
 	interface Window; /* Web IDL interface to generate */
 
-	/* private are parameters to constructor stored in private
-         *  context structure.
-         *
-         * internal are value stored in private context structure but not
-         *  passed to constructor but are considered for property 
-         *  getters/setters.
-         */
 	private "struct browser_window *" bw;
 	private "struct html_content *" htmlc;
+
 	internal "JSObject *" document;
 	internal "JSObject *" navigator;
 	internal "JSObject *" console;


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

Summary of changes:
 javascript/jsapi/console.bnd                       |   12 --------
 javascript/jsapi/location.bnd                      |   21 +++-----------
 javascript/jsapi/window.bnd                        |    8 +-----
 test/js/event-onload.html                          |   29 ++++++++++++++++++++
 test/js/index.html                                 |    1 +
 ...cument-enumerate.html => window-enumerate.html} |    8 +++---
 6 files changed, 40 insertions(+), 39 deletions(-)
 create mode 100644 test/js/event-onload.html
 copy test/js/{dom-document-enumerate.html => window-enumerate.html} (79%)

diff --git a/javascript/jsapi/console.bnd b/javascript/jsapi/console.bnd
index 6aef9dc..7c34845 100644
--- a/javascript/jsapi/console.bnd
+++ b/javascript/jsapi/console.bnd
@@ -30,18 +30,6 @@ binding navigator {
 
     interface Console; /* 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.
-     */
-    internal "void *" gui_console;
 }
 
 operation log %{
diff --git a/javascript/jsapi/location.bnd b/javascript/jsapi/location.bnd
index c83fe46..db7a247 100644
--- a/javascript/jsapi/location.bnd
+++ b/javascript/jsapi/location.bnd
@@ -30,24 +30,13 @@ preamble %{
 %}
 
 binding location {
-    type js_libdom; /* the binding type */
-
-    interface Location; /* 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.
-     */
+	type js_libdom; /* the binding type */
+
+	interface Location; /* Web IDL interface to generate */
+
 	private "struct browser_window *" bw;
 }
 
 operation reload %{
-  browser_window_reload(private->bw, false);
+	browser_window_reload(private->bw, false);
 %}
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 767b94f..c4e6e88 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -23,15 +23,9 @@ binding window {
 
 	interface Window; /* Web IDL interface to generate */
 
-	/* private are parameters to constructor stored in private
-         *  context structure.
-         *
-         * internal are value stored in private context structure but not
-         *  passed to constructor but are considered for property 
-         *  getters/setters.
-         */
 	private "struct browser_window *" bw;
 	private "struct html_content *" htmlc;
+
 	internal "JSObject *" document;
 	internal "JSObject *" navigator;
 	internal "JSObject *" console;
diff --git a/test/js/event-onload.html b/test/js/event-onload.html
new file mode 100644
index 0000000..aede985
--- /dev/null
+++ b/test/js/event-onload.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<title>createTextNode onload example</title>
+
+<script type="text/javascript">
+
+function addTextNode()
+{
+var newtext = document.createTextNode(" Some text added dynamically. ");
+var para = document.getElementById("p1");
+para.appendChild(newtext);
+}
+
+</script>
+</head>
+
+<body>
+<div style="border: 1px solid red">
+<p id="p1">First line of paragraph.<br /></p>
+</div><br />
+
+<button onclick="addTextNode();">add another textNode.</button>
+
+<script>
+window.onload = addTextNode;
+</script>
+
+</body>
+</html>
diff --git a/test/js/index.html b/test/js/index.html
index 7500870..7a17c95 100644
--- a/test/js/index.html
+++ b/test/js/index.html
@@ -8,6 +8,7 @@
 <h2>Window</h2>
 <ul>
 <li><a href="window.lately.html">location</a></li>
+<li><a href="window-enumerate.html">enumerate</a></li>
 </ul>
 
 <h2>Document write</h2>
diff --git a/test/js/dom-document-enumerate.html b/test/js/window-enumerate.html
similarity index 79%
copy from test/js/dom-document-enumerate.html
copy to test/js/window-enumerate.html
index 18146ab..92a3111 100644
--- a/test/js/dom-document-enumerate.html
+++ b/test/js/window-enumerate.html
@@ -1,10 +1,10 @@
 <html>
 <head>
-<title>document interface enumeration</title>
+<title>window interface enumeration</title>
 <link rel="stylesheet" type="text/css" href="tst.css">
 </head>
 <body>
-<h1>Document interface enumeration</h1>
+<h1>window interface enumeration</h1>
 
 <script>
 function output(x,y) {
@@ -18,8 +18,8 @@ function output(x,y) {
     document.body.appendChild(document.createElement('br'));
 }
 
-for(var key in document) {
-    output(key, document[key]);
+for(var key in window) {
+    output(key, window[key]);
 }
 </script>
 </body>


-- 
NetSurf Browser



More information about the netsurf-commits mailing list