Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Webclient 2.0 alpha 5 release: win32 binary with netbeans project
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
edburns  
View profile  
 More options Feb 23 2007, 4:17 pm
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: 23 Feb 2007 13:17:49 -0800
Local: Fri, Feb 23 2007 4:17 pm
Subject: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
I'm happy to report that I have produced another binary of webclient,
the first that works with an off-the-shelf xulrunner.    Right now I
only have a win32 binary, and I'd love to get some people to try it.

I have updated the instructions and it should work right out of the
box.

Please visit: http://www.mozilla.org/projects/blackwood/webclient/release-notes/#2_...

for details.

Sincerely,

Ed


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Feb 24 2007, 9:41 am
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: 24 Feb 2007 06:41:31 -0800
Local: Sat, Feb 24 2007 9:41 am
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
On Feb 23, 4:17 pm, "edburns" <edbu...@gmail.com> wrote:

> I'm happy to report that I have produced another binary of webclient,
> the first that works with an off-the-shelf xulrunner.    Right now I
> only have a win32 binary, and I'd love to get some people to try it.

> I have updated the instructions and it should work right out of the
> box.

> Please visit:http://www.mozilla.org/projects/blackwood/webclient/release-notes/#2_...

> for details.

I just tested this on Windows XP Home Edition SP2 and found that the
test that calls
currentPage2.printPreview() fails on that platform, while it succeeds
on Windows 2000
Professional.

Please modify CurrentPageTest.java to remove the printPreview test.

I'll file a bug and modify the binary asap.

Ed


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Feb 27 2007, 11:43 am
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: 27 Feb 2007 08:43:27 -0800
Local: Tues, Feb 27 2007 11:43 am
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
I have added a non-ide build file so you no longer are required to
have netbeans in order to run the test browser and automated tests.

The new binary is available at  <http://www.mozilla.org/projects/
blackwood/webclient/release-notes/2_0_alpha_5.html>.

Ed


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Mar 5 2007, 10:38 pm
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: 5 Mar 2007 19:38:02 -0800
Local: Mon, Mar 5 2007 10:38 pm
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
I've created a new package, org.mozilla.mcp:  Mozilla Control
Program.  This package contains features that take webclient toward
providing a first class browser automated testing capability similar
to what HtmlUnit provides, however in this case there is a real
browser underneath.

It would be nice to just have HtmlUnit *use* webclient in this way,
but I don't think that's realistic given the binary constraints of
webclient.  To that end, I'm investigating what the best integration
strategy is for MCP.  Two options:

1. Just create MCP as a new API on top of webclient, optimized for
ease of use in testing Ajax applications.

2. Look for some way to leverage the HtmlUnit API so that an HTMLUnit
test has its browsing capability provided by webclient.

The first step was to add the ability to get the X and Y coordinates
of an arbitrary DOM node, which can be found by id.  Oddly, this
didn't appear to be in the core W3C dom spec so I implemented it with
smaug on #developers help.  Here is the change-bundle:

M dist/mcp-test/src/test/java/cardemo/CarDemoTest.java

- Underpinnings for "clickElementWithId"

M dom/jni/Makefile.in

- depend on layout, for nsIBoxObject.  Thanks smaug.

M dom/jni/javaDOMGlobals.h

- copy over WC_ITOA macro

M dom/jni/org_mozilla_dom_ElementImpl.cpp

- add support for special attributes screenX, screenY, clientX,
clientY

M webclient/build-tests.xml

- compile the CarDemoTest

M webclient/classes_spec/org/mozilla/mcp/MCP.java

- add getElementInCurrentPageById()

M webclient/test/automated/src/classes/org/mozilla/webclient/
DOMTest.java

- exercise new features in dom ElementImpl.

I'm working toward an alpha 6 release.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
petr.cioc...@gmail.com  
View profile  
 More options Mar 13 2007, 4:59 am
Newsgroups: mozilla.dev.embedding
From: Petr.Cioc...@gmail.com
Date: 13 Mar 2007 01:59:35 -0700
Local: Tues, Mar 13 2007 4:59 am
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
Hi,

first - thanks for your great work on embeding mozilla into java.
I want to try your new version of webclient on WindowsXP-SP2 -
Webclient 2.0 alpha 5 - Depends on xulrunner 1.5.0.9.
I follow your instalation instructions (non-ide version), but I have
some problems. I install the recomended xulrunner 1.5.0.9 and
Webclient 2.0 alpha 5 but:

1) its not possible to run any testcase on my Sun JDK1.5.0.9 - The
UnsupportedClass Version Exception occured in my console -  Your class
version is 50, but the JDK1.5.x use the 49.  I eliminate this problem
by use of SunJDK1.6.x version - it works without this problem.

2) When I try to run the Non-Ide build script - I obtain the following
Exception:

Can't init test browser, exception: java.lang.ClassNotFoundException:
I:\XUL_RUNNER\bin\webclient.dll: Can't find dependent libraries I:
\XUL_RUNNER\bin\webclient.dll: Can't find dependent libraries
 Webclient has not been initialized.
 Exception in thread "main" java.lang.NullPointerException
     at
org.mozilla.webclient.test.TestBrowser.addNotify(TestBrowser.java:55)
     at java.awt.Container.addNotify(Container.java:2592)
     at javax.swing.JComponent.addNotify(JComponent.java:4665)
     at java.awt.Container.addNotify(Container.java:2592)
     at javax.swing.JComponent.addNotify(JComponent.java:4665)
     at java.awt.Container.addNotify(Container.java:2592)
     at javax.swing.JComponent.addNotify(JComponent.java:4665)
     at javax.swing.JRootPane.addNotify(JRootPane.java:735)
     at java.awt.Container.addNotify(Container.java:2592)
     at java.awt.Window.addNotify(Window.java:635)
     at java.awt.Frame.addNotify(Frame.java:469)
     at java.awt.Window.pack(Window.java:663)
     at org.mozilla.webclient.test.TestBrowser.main(TestBrowser.java:
123)

I don´t known, which libraries ? What is wrong. My GRE xulrunner
1.5.0.9 is registered in WinXP registry, the comlete instalation of
XULRUNNER is on referenced path, all DLL from Webclient was copied by
build script to XULRUNNER directory. So now I don´t know, how to solve
this problem.
Can you help me ? What should I check in my enviroment ?

Thanks for any idea...

Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Mar 13 2007, 2:34 am
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: Mon, 12 Mar 2007 23:34:26 -0700
Local: Tues, Mar 13 2007 2:34 am
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project

> I'm working toward an alpha 6 release.

When I sat down to do the final round of testing on the alpha 6
release, I found
that a thread safety assertion was causing a crash on the optimized
build.

Turns out JavaDOM required a bit of a rewrite to ensure this assertion
did not fire.  If you are interested, I blogged about it at <http://
weblogs.java.net/blog/edburns/archive/2007/03/compilllers_are.html>.

I'm now back at the same place I was Friday morning, but this time
I think I am free of thread safety assertions.

I'll produce this binary using JDK 1.5.0_11 instead of 1.6.0, so you
laggards can run
it!.

Ed


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Mar 30 2007, 10:37 am
Newsgroups: mozilla.dev.embedding
From: "edburns" <edbu...@gmail.com>
Date: 30 Mar 2007 07:37:20 -0700
Local: Fri, Mar 30 2007 10:37 am
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
The Alpha 6 release is out.  You can get it from
http://www.mozilla.org/projects/blackwood/webclient/release-notes/2_0...

Also, I wrote an article for TheServerSide showing how to use MCP to
test Ajax apps.  That's available at

http://www.theserverside.com/news/thread.tss?thread_id=44676

Please share feedback here.  I've tested the binary on windows 2000
and XP, but I don't have a Vista license.

Can anyone tell me if it works there?

Ed


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Apr 20 2007, 11:22 pm
Newsgroups: mozilla.dev.embedding
From: edburns <edbu...@gmail.com>
Date: 20 Apr 2007 20:22:51 -0700
Local: Fri, Apr 20 2007 11:22 pm
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
Finally, I have an automated test that exercises DynaFaces and jMaki.

If you don't know what those two things are, check out
<http://developers.sun.com/web/swdp/>.

Anyhow, it was a real pain to keep these two things working together
as
jMaki rapidly evolved.  Now at least we can have an automated test to
catch regressions.

SECTION: Changes

A dist/mcp-test/src/main/java/jsf_jmaki/JsfjMaki.java
A dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java

- The automated test and the netbeans empty main class.

M dom/classes/org/mozilla/dom/util/DOMTreeDumper.java

- Introduce preorder traversal callback facility

M webclient/classes_spec/org/mozilla/mcp/MCP.java

- add methods

+    public List<Element> getAnchors(String id) {

+    public List<Element> getAnchors() {

+    public List<Element> getChildElementsWithTagName(Element root,
+            final String tagName) {

+    public List<Element> getChildElementsWithTagName(String id,
+            final String tagName) {

+    public void clickElement(String id) {

+    public void blockingClickElement(Element element) {

SECTION: Diffs

Index: dom/classes/org/mozilla/dom/util/DOMTreeDumper.java
===================================================================
RCS file: /cvsroot/mozilla/java/dom/classes/org/mozilla/dom/util/
DOMTreeDumper.java,v
retrieving revision 1.2
diff -u -r1.2 DOMTreeDumper.java
--- dom/classes/org/mozilla/dom/util/DOMTreeDumper.java 6 Mar 2007
22:03:42 -0000  1.2
+++ dom/classes/org/mozilla/dom/util/DOMTreeDumper.java 21 Apr 2007
03:16:51 -0000
@@ -24,6 +24,7 @@
 import java.io.PrintStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import org.w3c.dom.DOMException;

 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -233,34 +234,60 @@
         dbg("finished dumping...");
         return baos.toString();
     }
-

-    private Element findElementWithName(Element start, String name) {
-        Element result = null;
+    public void preorderTreeWalk(Node start,
+            TreeTraversalCallBack callback, Object closure) {
+        try {
+            doPreorderTreeWalk(start, callback, closure);
+        } catch (AbortTraversalException ex) {
+            return;
+        }
+    }
+
+
+    private void doPreorderTreeWalk(Node start,
+            TreeTraversalCallBack callback, Object closure)
+            throws AbortTraversalException {
+        callback.takeActionOnNode(start, closure);
+        NodeList children = start.getChildNodes();
         Node child = null;
-        String elementName = start.getAttribute("name");
-        if (null != elementName && elementName.equals(name)) {
-            return start;
+        int length = 0;
+        boolean hasChildren = ((children != null) &&
+                ((length = children.getLength()) > 0));
+        if (!hasChildren) {
+            return;
         }
-        else {
-            NodeList children = start.getChildNodes();
-            int length = 0;
-            boolean hasChildren = ((children != null) &&
-                    ((length = children.getLength()) > 0));
-            if (!hasChildren) {
-                return result;
-            }
-            for (int i=0; i < length; i++) {
-                child = children.item(i);
-                result = null;
-                if (child instanceof Element) {
-                    result = findElementWithName((Element) child,
name);
-                }
-                if (null != result) {
-                    break;
+        for (int i=0; i < length; i++) {
+            child = children.item(i);
+            doPreorderTreeWalk(child, callback, closure);
+       }
+    }
+
+    private Element findElementWithName(Element start, final String
name) {
+        TreeTraversalCallBack callback = new TreeTraversalCallBack()
{
+
+            public void takeActionOnNode(Node node, Object closure)
+              throws AbortTraversalException {
+                Element element = null;
+                if (node instanceof Element) {
+                    element = (Element) node;
+                    String elementName =
element.getAttribute("name");
+                    if (null != elementName &&
elementName.equals(name)) {
+                        this.setResult(node);
+                        throw new AbortTraversalException("Found
result");
+                    }
                 }
             }
-       }
+
+        };
+
+        Element result = null;
+
+        this.preorderTreeWalk(start, callback, name);
+        Object obj = callback.getResult();
+        if (obj instanceof Element) {
+            result = (Element)obj;
+        }

         return result;
     }
@@ -280,4 +307,29 @@
            System.out.println(name + ": " + str);
        }
     }
+
+    public static abstract class TreeTraversalCallBack {
+        public abstract void takeActionOnNode(Node node, Object
closure)
+throws AbortTraversalException;
+
+        private Object result;
+
+        public Object getResult() {
+            return result;
+        }
+
+        public void setResult(Object result) {
+            this.result = result;
+        }
+    }
+
+    public static class AbortTraversalException extends
RuntimeException {
+        private Object closure;
+        public AbortTraversalException(Object closure) {
+            this.closure = closure;
+        }
+        public Object getClosure() {
+            return closure;
+        }
+    }
 }
Index: webclient/classes_spec/org/mozilla/mcp/MCP.java
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/classes_spec/org/mozilla/mcp/
MCP.java,v
retrieving revision 1.8
diff -u -r1.8 MCP.java
--- webclient/classes_spec/org/mozilla/mcp/MCP.java     14 Mar 2007
21:02:13 -0000  1.8
+++ webclient/classes_spec/org/mozilla/mcp/MCP.java     21 Apr 2007
03:16:51 -0000
@@ -33,11 +33,15 @@
 import java.awt.event.KeyListener;
 import java.awt.event.MouseListener;
 import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.mozilla.dom.util.DOMTreeDumper;
+import org.mozilla.dom.util.DOMTreeDumper.AbortTraversalException;
+import org.mozilla.dom.util.DOMTreeDumper.TreeTraversalCallBack;
 import org.mozilla.webclient.BrowserControl;
 import org.mozilla.webclient.BrowserControlCanvas;
 import org.mozilla.webclient.BrowserControlFactory;
@@ -49,6 +53,7 @@
 import org.mozilla.webclient.WebclientEvent;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;

 /**
  * <p>The main class for the Mozilla Control Program.  Please see <a
@@ -110,6 +115,9 @@
     }

     private void openLatch() {
+        if (null == latch) {
+            return;
+        }
         if (null != latch || 1 != latch.getCount()) {
             latch.countDown();
             latch = null;
@@ -405,6 +413,79 @@

         return result;
     }
+
+    /**
+
+     * <p>Given an argument <code>id</code>, return a List of DOM
+     * <code>Element</code> instances that are HTML anchors that are
+     * direct or indirect children of the element with that <code>id</
code>.
+     */
+    public List<Element> getAnchors(String id) {
+        List<Element> result = getChildElementsWithTagName(id, "a");
+        return result;
+    }
+
+    /**
+
+     * <p>Return a List of DOM
+     * <code>Element</code> instances that are HTML anchors that are
+     * present in the document.
+     * If no such elements exist,
+     * <code>null</code> is returned.</p>
+     */
+    public List<Element> getAnchors() {
+        Element root =
getCurrentPage().getDOM().getDocumentElement();
+        List<Element> result = getChildElementsWithTagName(root,
"a");
+        return result;
+    }
+
+    /**
+
+     * <p>Return a List of DOM <code>Element</code> instances whose
+     * tagName attribute is equal to the argument <code>tagName</
code>.
+     * If no such elements exist,
+     * <code>null</code> is returned.</p>
+     */
+
+    public List<Element> getChildElementsWithTagName(Element root,
+            final String tagName) {
+        List<Element> results = new ArrayList<Element>();
+        if (null != root) {
+            TreeTraversalCallBack callback = new
TreeTraversalCallBack() {
+                public void takeActionOnNode(Node node, Object
closure)
+                throws AbortTraversalException {
+                    List<Element> list = (List<Element>) closure;
+                    Element element = null;
+                    if (node instanceof Element) {
+                        element = (Element) node;
+                        String nodeTagName = element.getTagName();
+                        if (null != nodeTagName &&
nodeTagName.equalsIgnoreCase(tagName)){
+                            list.add(element);
+                        }
+                    }
+                }
+            };
+            getDOMTreeDumper().preorderTreeWalk(root, callback,
results);
+        }
+
+        return results;
+    }
+    /**
+
+     * <p>Return a List of DOM <code>Element</code> instances whose
+     * tagName attribute is equal to the argument <code>tagName</
code>.
+     * If no such elements exist,
+     * <code>null</code> is returned.</p>
+     */
+
+    public List<Element> getChildElementsWithTagName(String id,
+            final String tagName) {
+        List<Element> results = null;
+        Element root = findElement(id);
+        results = getChildElementsWithTagName(root, tagName);
+
+        return results;
+    }

     /**

@@ -432,9 +513,9 @@

     */

-    public void clickElement(String id) {
-        Element element = findElement(id);
+    public void clickElement(Element element) {
         String clientX = null, clientY = null;
+        String id = element.getAttribute("id");
         if (null != element) {
             clientX = element.getAttribute("clientX");
...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options May 4 2007, 1:22 pm
Newsgroups: mozilla.dev.embedding
From: edburns <edbu...@gmail.com>
Date: 4 May 2007 10:22:05 -0700
Local: Fri, May 4 2007 1:22 pm
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
Ahead of JavaOne next week, here is Webclient 2.0 alpha 8

M dist/build.xml

- do Alpha 8 release

- Copy artifacts to local www for dist via CVS.

A dist/webclient-pom.xml

- Create Maven POM for error free artifact resolution

M dist/mcp-test/src/test/java/cardemo/CarDemoTest.java

- Update clientIds

- Use new package for WebclientTestCase

M dist/mcp-test/src/test/java/jsf_jmaki/JsfjMakiTest.java

- Use new timeout mechanism.

- Use new package for WebclientTestCase

M dist/netbeans/build.xml
M dist/netbeans/nbproject/project.properties

- alpha 8

M webclient/build-tests.xml

- remove cardemo from automated test run

M webclient/classes_spec/org/mozilla/mcp/MCP.java
A webclient/classes_spec/org/mozilla/mcp/TimeoutHandler.java

- Generalized timeout mechanism

A webclient/classes_spec/org/mozilla/mcp/CompareFiles.java
A webclient/classes_spec/org/mozilla/mcp/THTTPD.java
A webclient/classes_spec/org/mozilla/mcp/junit/
TestLogStrings.properties
A webclient/classes_spec/org/mozilla/mcp/junit/WebclientTestCase.java
A webclient/classes_spec/org/mozilla/mcp/junit/package.html
R webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java
R webclient/test/automated/src/classes/org/mozilla/webclient/
CompareFiles.java
R webclient/test/automated/src/classes/org/mozilla/webclient/
TestLogStrings.properties
R webclient/test/automated/src/classes/org/mozilla/webclient/
WebclientTestCase.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
BookmarksTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
BrowserControlFactoryTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
CurrentPageTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
DOMTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
DocumentLoadListenerTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
HistoryTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
KeyListenerTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
MouseListenerTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
NavigationTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
PreferencesTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
ProfileManagerTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/
WindowCreatorTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/impl/
WebclientFactoryImplTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/impl/
wrapper_native/TestGtkBrowserControlCanvas.java
M webclient/test/automated/src/classes/org/mozilla/webclient/impl/
wrapper_native/WrapperFactoryImplTest.java

- New package for mcp JUnit support


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
edburns  
View profile  
 More options Jun 10 2007, 12:39 pm
Newsgroups: mozilla.dev.embedding
From: edburns <edbu...@gmail.com>
Date: Sun, 10 Jun 2007 09:39:34 -0700
Local: Sun, Jun 10 2007 12:39 pm
Subject: Re: Webclient 2.0 alpha 5 release: win32 binary with netbeans project
At long last, I have webclient running on Mac OSX.  I only have a
PowerBook G4, so the only binary I can produce is for the PowerPC.
Perhaps someone lucky enough to own a MacBookPro can produce a binary
for me on that processor architecture.

Many thanks to the generous folks on #developers, in particular,
timeless,
cbarrett, sdwilsh, and jhpedemonte.

Here are the changes.

SECTION: Changes

M dist/build.xml

- propogate clean on mac os x

- On mac os x, there is .jnilib and also .dylib

M dom/build.xml

- propogate make on mac os x

M webclient/build.xml

- new file for javah on mac

- propogate clobber_all on mac

M webclient/classes_spec/org/mozilla/webclient/
BrowserControlCanvas.java

- get the tree lock before calling to native code to get the native
window

A webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
CocoaAppKitThreadDelegatingNativeEventThread.java

- Allows running arbitrary code on the AppKit thread.  Prevents Thread
  Safety assertions.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
CocoaBrowserControlCanvas.java

- adhere to informal protocol to create NativeEventThread

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
ImplObjectNative.java

- use NativeEventThread.instance.isNativeEventThread()

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
NativeEventThread.java

- implement isNativeEventThread()

M webclient/src_moz/Makefile.in

- turn on objc-exceptions on mac os x

M webclient/src_moz/NativeBrowserControl.cpp
M webclient/src_moz/NativeBrowserControl.h

- work with cocoa

M webclient/src_moz/NativeEventThread.cpp
M webclient/src_moz/cocoa/CocoaBrowserControlCanvas.h
M webclient/src_moz/cocoa/CocoaBrowserControlCanvasImpl.cpp

- two methods to run arbitrary code on the AppKit thread

M webclient/src_moz/cocoa/CocoaBrowserControlCanvas.mm
M webclient/test/manual/src/classes/org/mozilla/webclient/test/
TestBrowser.java

SECTION: Diffs

Index: dist/build.xml
===================================================================
RCS file: /cvsroot/mozilla/java/dist/build.xml,v
retrieving revision 1.24
diff -u -r1.24 build.xml
--- dist/build.xml      4 Jun 2007 17:10:02 -0000       1.24
+++ dist/build.xml      10 Jun 2007 16:11:31 -0000
@@ -97,6 +97,25 @@
   </target>

   <target name="clean">
+    <condition property="platform" value="win32">
+      <and>
+        <os family="windows" />
+      </and>
+    </condition>
+
+    <condition property="platform" value="macosx-ppc">
+      <and>
+        <os name="Mac OS X" />
+      </and>
+    </condition>
+
+
+    <condition property="platform" value="linux">
+      <and>
+        <os family="unix" />
+      </and>
+    </condition>
+
     <delete file="${objdir}/${name}_${version}_${platform}.zip"  />
     <delete dir="${dist.base}" />
   </target>
@@ -249,7 +268,7 @@
     <copy todir="${dist.home}/bin"
          file="${objdir}/java/dom/jni/${so.prefix}javadomjni.$
{jni.extension}" />
     <copy todir="${dist.home}/bin"
-          file="${objdir}/java/webclient/src_moz/${so.prefix}${name}.$
{so.extension}" />
+          file="${objdir}/java/webclient/src_moz/${so.prefix}${name}.$
{jni.extension}" />

   </target>

Index: dom/build.xml
===================================================================
RCS file: /cvsroot/mozilla/java/dom/build.xml,v
retrieving revision 1.9
diff -u -r1.9 build.xml
--- dom/build.xml       24 May 2007 04:16:58 -0000      1.9
+++ dom/build.xml       10 Jun 2007 16:11:32 -0000
@@ -107,7 +107,7 @@
                      executable="make"/>
     <exec os="Windows 2000" dir="${objdir.native.path}/jni"
executable="make"
                      failonerror="yes"/>
-    <exec os="Mac OS X" dir="${objdir.native.path}/src"
failonerror="yes"
+    <exec os="Mac OS X" dir="${objdir.native.path}/jni"
failonerror="yes"
                      executable="make"/>

   </target>
@@ -176,6 +176,12 @@
       <arg line="clobber_all"/>
     </exec>

+    <exec os="Mac OS X" dir="${objdir.native.path}/jni"
failonerror="yes"
+                     executable="make">
+      <arg line="clobber_all"/>
+    </exec>
+
+
     <delete>
       <fileset dir="" includes="**/*.ilk"/>
     </delete>
Index: webclient/build.xml
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/build.xml,v
retrieving revision 1.34
diff -u -r1.34 build.xml
--- webclient/build.xml 24 May 2007 04:16:58 -0000      1.34
+++ webclient/build.xml 10 Jun 2007 16:11:32 -0000
@@ -194,7 +194,7 @@
     <mkdir dir="${objdir.native.path}/src_moz/cocoa" />

     <javah destdir="${objdir.native.path}/src_moz/cocoa"
-
class="org.mozilla.webclient.impl.wrapper_native.CocoaBrowserControlCanvas" >
+
class="org.mozilla.webclient.impl.wrapper_native.CocoaBrowserControlCanvas, org.mozilla.webclient.impl.wrapper_native.CocoaAppKitThreadDelegatingNative EventThread">
       <classpath refid="compile.classpath"/>
     </javah>

@@ -343,6 +343,12 @@
                      failonerror="yes">
       <arg line="clobber_all"/>
     </exec>
+
+    <exec os="Mac OS X" dir="${objdir.native.path}/src_moz"
executable="make"
+                     failonerror="yes">
+      <arg line="clobber_all"/>
+    </exec>
+
     <exec os="Windows 2000" dir="${objdir.native.path}/src_ie"
executable="make"
                      failonerror="yes">
       <arg line="clobber_all"/>
Index: webclient/classes_spec/org/mozilla/webclient/
BrowserControlCanvas.java
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/classes_spec/org/mozilla/
webclient/BrowserControlCanvas.java,v
retrieving revision 1.9
diff -u -r1.9 BrowserControlCanvas.java
--- webclient/classes_spec/org/mozilla/webclient/
BrowserControlCanvas.java       1 Dec 2004 03:21:22 -0000       1.9
+++ webclient/classes_spec/org/mozilla/webclient/
BrowserControlCanvas.java       10 Jun 2007 16:11:32 -0000
@@ -141,25 +141,30 @@
        super.addNotify();

        windowRelativeBounds = new Rectangle();
+        if (0 != nativeWindow) {
+            return;
+        }
+
+        synchronized (getTreeLock()) {
+            //Create the Native gtkWindow and it's container and
+            //get a handle to this widget
+            nativeWindow = getWindow();
+
+            try {
+                Rectangle r = new
Rectangle(getBoundsRelativeToWindow());
+                Assert.assert_it(null != webShell);

-    //Create the Native gtkWindow and it's container and
-    //get a handle to this widget
-       nativeWindow = getWindow();
-
-       try {
-               Rectangle r = new Rectangle(getBoundsRelativeToWindow());
-        Assert.assert_it(null != webShell);
-
-        WindowControl wc = (WindowControl)
-
webShell.queryInterface(BrowserControl.WINDOW_CONTROL_NAME);
-        //This createWindow call sets in motion the creation of the
-        //nativeInitContext and the creation of the Mozilla embedded
-        //webBrowser
-        wc.createWindow(nativeWindow, r);
-       } catch (Exception e) {
-               System.out.println(e.toString());
-               return;
-       }
+                WindowControl wc = (WindowControl)
+
webShell.queryInterface(BrowserControl.WINDOW_CONTROL_NAME);
+                //This createWindow call sets in motion the creation
of the
+                //nativeInitContext and the creation of the Mozilla
embedded
+                //webBrowser
+                wc.createWindow(nativeWindow, r);
+            } catch (Exception e) {
+                System.out.println(e.toString());
+                return;
+            }
+        }

        initializeOK = true;
        webShellCount++;
Index: webclient/classes_spec/org/mozilla/webclient/impl/
wrapper_native/CocoaBrowserControlCanvas.java
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/classes_spec/org/mozilla/
webclient/impl/wrapper_native/CocoaBrowserControlCanvas.java,v
retrieving revision 1.5
diff -u -r1.5 CocoaBrowserControlCanvas.java
--- webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
CocoaBrowserControlCanvas.java  12 Mar 2007 20:39:22 -0000      1.5
+++ webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/
CocoaBrowserControlCanvas.java  10 Jun 2007 16:11:32 -0000
@@ -28,10 +28,11 @@

 import org.mozilla.webclient.BrowserControlCanvas;

-import org.mozilla.util.ReturnRunnable;
-import org.mozilla.webclient.impl.wrapper_native.NativeEventThread;
-
 import java.awt.*;
+import java.util.logging.Logger;
+import org.mozilla.util.Log;
+import org.mozilla.util.ReturnRunnable;
+import org.mozilla.webclient.impl.WrapperFactory;

 /**
  *
@@ -39,13 +40,20 @@
  */
 public class CocoaBrowserControlCanvas extends BrowserControlCanvas {

+    public static final String LOG =
"org.mozilla.webclient.impl.wrapper_native.CocoaBrowserControlCanvas";
+
+    public static final Logger LOGGER = Log.getLogger(LOG);
+
+
     /** Creates a new instance of CocoaBrowserControlCanvas */
     public CocoaBrowserControlCanvas() {
     }

     //New method for obtaining access to the Native Peer handle
     private native int getHandleToPeer();
-    private native void paintMe(Graphics g);
+
+    private boolean didGetWindow = false;
+    private int nativeView = 0;

        /**
         * Obtain the native window handle for this
@@ -54,40 +62,29 @@
         * @returns The native window handle.
         */
     protected int getWindow() {
-       Integer result = (Integer)
-           NativeEventThread.instance.pushBlockingReturnRunnable(new
ReturnRunnable(){
-                   public Object run() {
-                       Integer result =
-                           new Integer(CocoaBrowserControlCanvas.this.getHandleToPeer());
-                       return result;
-                   }
-                    public String toString() {
-                        return "WCRunnable.getHandleToPeer";
-                    }
+        if (!didGetWindow) {
+            Integer result = (Integer)
+            NativeEventThread.instance.pushBlockingReturnRunnable(new
ReturnRunnable(){
+                public Object run() {
+                    Integer result =
+                            new
...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google