Граф коммитов

762 Коммитов

Автор SHA1 Сообщение Дата
edburns%acm.org 6bab1ca228 Preferences.java
- Add javadoc describing the cookie property
2005-01-19 14:01:24 +00:00
edburns%acm.org 9fb266f016 ? build.test
? hs_err_pid2436.log
? junit.properties
? logfile.txt
? src_moz/webclient.ilk
? src_moz/webclient.pdb
? src_moz/win32/org_mozilla_webclient_impl_wrapper_0005fnative_Win32BrowserControlCanvas.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_BookmarksImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_CurrentPageImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_EventRegistrationImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_HistoryImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_ISupportsPeer.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_NativeEventThread.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_NavigationImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_PreferencesImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_ProfileManagerImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_RDFEnumeration.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_RDFTreeNode.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_WindowControlImpl.h
? src_share/org_mozilla_webclient_impl_wrapper_0005fnative_WrapperFactoryImpl.h
? src_share/wc_share.pdb
? test/automated/src/classes/org/mozilla/webclient/.nbattrs
M test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java
2005-01-19 13:33:31 +00:00
edburns%acm.org 270cb5fed7 This checkin has the basic functionality of NewWindowListener
re-implemented using the new event model.  It's a bit cleaner.

Next step is to uncomment the selection check at the end of
WindowCreatorTest.java.  This code currently causes the VM to crash.  I
also plan to do some testing on the chrome flags.

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

- deprecate {add,remove}NewWindowListener(), replace with
  setNewWindowListener().

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

- added BrowserControl property, which the user sets into the event.

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

- change newWindowListeners List ivar to newWindowListener ivar.

- fix {add,remove}NewWindowListener() to leverage setNewWindowListener()

- change nativeEventOccurred() to return an int instead of void.

- add boolean property nativeSetNewWindowListenerAttached()

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

- modify pushBlockingWCRunnable() to execute the runnable right away if
  we're already on the NativeEventThread.  This is necessary to allow
  re-entrancy.

M src_moz/EmbedEventListener.cpp
M src_moz/EmbedEventListener.h

- expose the mEventRegistration ivar via a getter.

M src_moz/EventRegistrationImpl.cpp
M src_moz/NativeBrowserControl.cpp
M src_moz/NativeBrowserControl.h

- add nativeSetNewWindowListenerAttached(), which calls through and sets
  it on the NativeBrowserControl.

M src_moz/WindowCreator.cpp

- implement CreateChromeWindow2, which is called when the browser needs
  a new window.

M src_share/jni_util.cpp
M src_share/jni_util.h

- change util_SendEventToJava() to return int.

M test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java
2005-01-18 15:20:52 +00:00
edburns%acm.org 38f5048bb9 This checkin provides a sketch of how I plan to re-implement the
NewWindowListener mechanism.  Next step will be to continue to try to
get it working.

A test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java
A test/automated/src/test/WindowCreatorTest0.html
A test/automated/src/test/WindowCreatorTest1.html

- new test, currently fails.

M build-tests.xml

- add new test, non-running

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

- prep for NewWindowListener

M src_moz/WindowCreator.cpp

- sketch implementation plan.  In WindowCreator.CreateChromeWindow2:

+        /*
+          Block this thread.
+
+          Call back into java and ask the user to create a top level
+          window and hand it, or an added child of it, to us.  Call this
+          thing the userWindow.
+
+          Create a new BrowserControl, get its BrowserControlCanvas and
+          make it be a child of the userWindow.
+
+          Set the userWindow and the BrowserControlCanvas to visible ==
+          true.  This is necessary to get the cause the underlying
+          mozilla window to be created.
+
+          java returns the C++ nativeBrowserControl to us.  Cast it to a
+          native NativeBrowserControl C++ object instance.  If the
+          nsIURI is non-null, cause the new window to navigate to that
+          URI.  Return the NativeBrowserControl's EmbedWindow instance,
+          which is an impl of nsIWebBrowserChrome.
+
+          I'm not sure if it's safe to do all this on the same thread on
+          which mozilla calls us.  I hope so.
+        */
2005-01-11 07:02:12 +00:00
edburns%acm.org 1726aadd2c This correctly implements the keyListener logic. I had the mapping
between mozilla concepts and java concepts wrong before.  The correct
mapping is:

Mozilla concept       Java concept

KeyDown               keyPressed
KeyUp                 keyReleased
KeyPress              keyTyped

KeyCode               keyCode
CharCode              keyChar

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

- Force the keyCode to be VK_UNDEFINED if this is a KEY_TYPED event.

- For security, log any exceptions thrown during ctor of KeyEvent.

M webclient/src_moz/EmbedEventListener.cpp

- remove unused automatic vars.

M webclient/src_moz/NavigationImpl.cpp

- roll back change done by Brian Ryner, since it doesn't make sense
  under mozilla 1.7.

M webclient/src_share/jni_util.cpp

- reverse mapping of CHAR_CODE and KEY_CODE to their java counterparts.

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

- Add in some code to make it easier to run this testcase in a manual
  fashion.
2004-12-01 15:46:23 +00:00
edburns%acm.org aa73c2bbe9 This checkin enables the KeyListener feature.
A webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java
A webclient/test/automated/src/test/KeyListenerTest1.html
M webclient/build-tests.xml

- add new testcase

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

- allow KeyListeners to be added and removed.

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

- Lazily create listener lists.

- Change the contract of queueEvent() to discard null events silently.

- Add createKeyEvent() method.

M webclient/src_moz/EmbedEventListener.cpp

- new mask names and values, DOMDOMKeyListener_maskNames,
  DOMKeyListener_maskValues.

- flesh out Key*() events.

- add addKeyEventDataToProperties.

- use eventType to discern how to populate the properties, with either key or
  mouse data.

M webclient/src_moz/EmbedEventListener.h

- key event includes and support methods.

M webclient/src_moz/EmbedProgress.cpp

- honor new last argument to util_InitializeEventMaskValuesFromClass().

M webclient/src_share/jni_util.cpp
M webclient/src_share/jni_util.h

- new constants

+jobject CHAR_CODE;
+jobject KEY_CODE;
+jstring KEY_LISTENER_CLASSNAME;
+char *DOMKeyListener_maskNames[] = {

M webclient/src_share/jni_util_export.cpp
M webclient/src_share/jni_util_export.h

- new last argument to

 util_InitializeEventMaskValuesFromClass(const char *className,
                                         char *maskNames[],
-                                        jlong maskValues[])
+                                        jlong maskValuesLong[],
+                                        jint maskValuesInt[])

  Used when the maskValues are ints, otherwise null.
2004-12-01 03:21:23 +00:00
bryner%brianryner.com 1435145ce6 Reduce do_GetService code bloat further by adding specialized assignment to nsCOMPtr and providing a version with no error pointer. Also make CallGetService work the same way as CallGetComponent does, as far as using frozen/non-frozen interface to service manager. Bug 264456, r=darin. 2004-11-24 22:48:45 +00:00
edburns%acm.org f57814cadd This check-in fixes a long standing problem of not being able to use any
keyboard controls on the embedded browser.  Next step is to re-activate
the keyboard listener features.

M webclient/src_moz/EmbedProgress.cpp

- call TopLevelFocusIn to make sure we get the input focus

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

- copy TopLevelFocus{In,Out}() from EmbedPrivate.
2004-11-07 15:29:10 +00:00
edburns%acm.org b2d3adcfd0 This change-bundle fixes the long standing problem where you couldn't
run webclient at the same time mozilla was running.  It does this by
introducing a new startup command, which must be called before the first
call to BrowserControlFactory.setAppData(), like this:

	BrowserControlFactory.setProfile(startupProfile);
	BrowserControlFactory.setAppData(getBrowserBinDir());

This will cause the startupProfile to be created (if necessary) and used
as webclient's mozilla profile.  If not specified, a "webclient" profile
is created and used.  This profile sticks around on your system.

SECTION: CHANGES

M classes_spec/org/mozilla/webclient/BrowserControlFactory.java
M classes_spec/org/mozilla/webclient/WebclientFactory.java
M classes_spec/org/mozilla/webclient/impl/WebclientFactoryImpl.java

- add setProfile().

M classes_spec/org/mozilla/webclient/impl/WrapperFactory.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java

- add setProfile() and getProfile().

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

- pass the wrapperFactory's profile property to the nativeStartup().

M src_moz/ProfileManagerImpl.cpp

- logic to implement above changes

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

- test that the startupProfile feature works.
2004-11-05 06:40:27 +00:00
edburns%acm.org f81b674fc7 This checkin just adds a little more robustness to the
MouseListenerTest.  Next step will be to solve the problem where you
can't type in text fields in forms, then to implement the key listener
functionality.

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

- at least make sure that all the events do occcur
2004-10-28 13:57:59 +00:00
edburns%acm.org 54fb3331f8 update 2004-10-27 01:38:49 +00:00
edburns%acm.org 34fce317ee update.cvsignore 2004-10-27 01:38:11 +00:00
edburns%acm.org 2f2f7c9a72 This checkin enables MouseListener functionality. You can add a
MouseListener to the EventRegistration or BrowserControlCanvas and be
notified of events on the browser canvas.  You can snoop for onMouseOver
information such as links.  Next step is to cvs remove unused classes
relating to mouse events, for example WCMouseListenerImpl and
WCEventListenerWrapper.

A webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java

- exercise mouseListener added to BrowserControlCanvas and to
  EventRegistration.

M webclient/build-tests.xml

- hook up new test

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

- enable adding the MouseListener from here.

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

- absorb the functionality of WCMouseListenerImpl.  Also need to remove
  WCEventListenerWrapper.

- deal with MouseEvents.

- refactor BrowserToJavaEventPump.run() to handle mouse listeners

M webclient/src_moz/EmbedEventListener.cpp
M webclient/src_moz/EmbedEventListener.h

- absorb functionality from CBrowserContainer relating to mouse events.

M webclient/src_moz/NativeBrowserControl.cpp

- set the EventRegistration into the EmbedEventListener instance.

M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- add mouseover url updating to status bar.
2004-10-27 01:33:57 +00:00
edburns%acm.org f48943b542 Move this forward to leverage the THTTPD services of WebclientTestCase. 2004-10-26 19:33:15 +00:00
edburns%acm.org 91dfc84b6e This checkin enables the mozilla side of mouse and key listener
behavior.  Next step is to enable the java side in test-first design
fashion.

A webclient/src_moz/EmbedEventListener.cpp
A webclient/src_moz/EmbedEventListener.h

- carried over directly from GtkMozEmbed, minus GTK code.

M webclient/src_moz/EmbedProgress.cpp

- call to NativeBrowserControl::ContentStateChange() to hook up listeners.

M webclient/src_moz/Makefile.in

- add new EmbedEventListener.cpp file

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

- new methods for hooking up listeners.
2004-10-23 05:26:08 +00:00
edburns%acm.org 64c3f8af74 This checkin adds request header sniffing. Not sure how useful this is,
but I wanted it for completeness with respect to response header
sniffing.

M webclient/src_moz/EmbedProgress.cpp

- visit request headers on startUrlLoad.

M webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java
M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- exercise new code.
2004-10-20 02:50:44 +00:00
edburns%acm.org 1afd770773 M dist/build.xml
M dist/webclient-dist.xml
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java

- rollback 2.0 alpha b changes.  Thanks to Annie Lau.
2004-10-20 02:16:16 +00:00
edburns%acm.org 59ae00fc36 This checkin removes bookmarks support from webclient by not
initializing the bookmarks engine.  Next step is to work with the
mozilla embedding people to see how I can fix this.  What I'd like to do
is *NOT* use the GRE, but rather use the mozilla suite installation.

SECTION: Changes

M dist/build.xml

- rename release to 2_0_a2b

- made the test run from the mozilla suite installation directory

- clean out the generated batch file or sh file.

M dist/webclient-dist.xml

- made the build.xml generate a batch file, that sets the proper env
  vars, then calls back to this build.xml and executes the
  run.test.browser target.

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

- don't pull in Bookmarks, since it's not in the GRE.

SECTION: Diffs

Index: dist/build.xml
===================================================================
RCS file: /cvsroot/mozilla/java/dist/build.xml,v
retrieving revision 1.4
diff -u -r1.4 build.xml
--- dist/build.xml	15 Oct 2004 16:39:07 -0000	1.4
+++ dist/build.xml	18 Oct 2004 14:03:36 -0000
@@ -30,7 +30,7 @@

   <property name="Name" value="webclient"/>
   <property name="name" value="webclient"/>
-  <property name="version" value="2_0_a2"/>
+  <property name="version" value="2_0_a2b"/>

 <!-- ************ Per user local properties ******************************* -->

@@ -136,9 +136,13 @@
     </zip>
   </target>

-  <target name="test.dist" depends="prepare,clean.dev.build">
-
+  <target name="unzip.dist" depends="prepare">
     <unzip dest="${moz.install.dir}" src="${dist.home}/${name}_${version}_${platform}.zip" />
+  </target>
+
+  <target name="test.dist" depends="prepare">
+
+    <antcall target="unzip.dist" />

     <ant inheritAll="false" dir="${moz.install.dir}"/>

@@ -149,6 +153,8 @@
   <target name="clean.test.dist" depends="props">

     <delete file="${moz.install.dir}/build.xml" />
+    <delete file="${moz.install.dir}/runwc.bat" />
+    <delete file="${moz.install.dir}/runwc.sh" />
     <delete file="${moz.install.dir}/components/${so.prefix}javadom.${so.extension}" />
     <delete file="${moz.install.dir}/${so.prefix}javadomjni.${so.extension}" />
     <delete file="${moz.install.dir}/${so.prefix}${name}.${so.extension}" />
Index: dist/webclient-dist.xml
===================================================================
RCS file: /cvsroot/mozilla/java/dist/webclient-dist.xml,v
retrieving revision 1.2
diff -u -r1.2 webclient-dist.xml
--- dist/webclient-dist.xml	15 Oct 2004 16:39:07 -0000	1.2
+++ dist/webclient-dist.xml	18 Oct 2004 14:03:36 -0000
@@ -3,6 +3,20 @@
   <property environment="myenv" />

   <target name="props">
+    <condition property="is.win32" value="true">
+      <and>
+        <os family="windows" />
+      </and>
+    </condition>
+
+    <condition property="is.unix" value="true">
+      <and>
+        <os family="unix" />
+      </and>
+    </condition>
+
+
+
     <condition property="PATH_SEP" value=";">
       <and>
         <os family="windows" />
@@ -55,7 +69,31 @@

   </target>

-  <target name="main" depends="props">
+  <target name="main" depends="main.win32,main.unix"/>
+
+  <target name="main.win32" depends="props" if="is.win32">
+
+    <delete file="${basedir}/runwc.bat" />
+    <echo file="${basedir}/runwc.bat">
+SET PATH=${java.libpath};%PATH%
+SET NSPR_LOG_MODULES=webclient:4,webclientstub:4
+SET NSPR_LOG_FILE=webclient.log
+ant run.test.browser
+    </echo>
+    <exec command=".\runwc.bat" newenvironment="true" />
+
+  </target>
+
+  <target name="main.unix" depends="props" if="is.unix">
+
+    <delete file="${basedir}/runwc.sh" />
+    <echo file="${basedir}/runwc.sh">
+    </echo>
+
+  </target>
+
+
+  <target name="run.test.browser" depends="props">

     <java newenvironment="true"
           classname="org.mozilla.webclient.test.TestBrowser"
Index: webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java,v
retrieving revision 1.8
diff -u -r1.8 WrapperFactoryImpl.java
--- webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java	17 Jun 2004 21:27:55 -0000	1.8
+++ webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java	18 Oct 2004 14:03:37 -0000
@@ -316,7 +316,8 @@

 			((Service)WrapperFactoryImpl.this.profileManager).startup();
 			((Service)WrapperFactoryImpl.this.prefs).startup();
-			((Service)WrapperFactoryImpl.this.bookmarks).startup();
+			// PENDING(edburns): see Message-ID: <bbf0af98.0410171147.3109d532@posting.google.com> on n.p.m.java
+			// ((Service)WrapperFactoryImpl.this.bookmarks).startup();

 			WrapperFactoryImpl.this.nativeAppSetup(nativeWrapperFactory);
 			return null;
2004-10-18 14:08:22 +00:00
edburns%acm.org 681d2508bf M dist/build.xml
M dist/webclient-dist.xml

- first crack at making this work with a mozilla 1.7 suite install
2004-10-15 16:39:07 +00:00
edburns%acm.org f3fcccc42b ../cvslog.txt 2004-10-10 03:38:04 +00:00
edburns%acm.org d59e6b5d93 cvslog.txt 2004-10-10 02:02:52 +00:00
edburns%acm.org 4278c352a1 update_date 2004-09-30 17:59:45 +00:00
edburns%acm.org aaf9e9d2f5 This change-bundle enables webclient to build and run with mozilla 1.7.
The Preferences unit test currently fails, but the test browser runs.
Next step is to make all the unit tests run, then produce the source and
binary distribution for 2.0 alpha 2.

M dom/jni/javaDOMEventsGlobals.cpp

- use nsString.get() instead of nsString.GetBufferHandle()

M webclient/src_moz/NavigationActionEvents.cpp

- don't use ctor initializer for nsString

M webclient/src_moz/ns_util.cpp

- nsString2.h is gone.
2004-09-29 22:01:26 +00:00
edburns%acm.org 5927247223 This change-bundle adds build.xml rules that produce a binary
distribution of webclient.

Next step is to get mozilla 1.7 building on my machine, then get
webclient to compile with it, then do a 2.0a2 release.

M build.xml

- incorporate re-added dist directory

A dist/build.xml

- create a binary distribution

A dist/webclient-dist.xml

- build.xml file for the test browser in the distribution
2004-09-29 19:53:55 +00:00
edburns%acm.org cadd94c8f8 This checkin implements a response header listener feature.
I have changed the usage contract of the DocumentLoadListener slightly.
Prior to this checkin, calling getEventData() on the DocumentLoadEvent
passed in to your eventDispatched() method returned the URI to which the
event applies.

Now the getEventData() returns a Map.  You must look up the "URI" key to
find the URI to which the event applies.  If your listener is an
instance of PageInfoListener, and your event mask is
END_URL_LOAD_EVENT_MASK, your Map will have an additional entry under
the key "headers".  This entry is another Map representing the response
headers.

DocumentLoadListener:

 * <p>The <code>eventDispatched()</code> method is passed a {@link
 * DocumentLoadEvent} instance.  The <code>type</code> property of the
 * event will be one of the types defined as a <code>public static final
 * int</code> in <code>DocumentLoadEvent</code>.</p>
 *
 * <p>The <code>eventData</code> property of the
 * <code>DocumentLoadEvent</code> instance will be a
 * <code>java.util.Map</code>.  For all <code>EVENT_MASK</code> types in
 * <code>DocumentLoadEvent</code> the map will contain an entry under
 * the key "<code>URI</code>" without the quotes.  This will be the
 * fully qualified URI for the event.</p>
 *
 * <p>For the <code>PROGRESS_URL_LOAD_EVENT_MASK</code> there will be an
 * entry in the map for the key "<code>message</code>".  This will be
 * the progress message from the browser.</p>

PageInfoListener:

 * <p>This {@link DocumentLoadListener} subclass adds the ability to get
 * detailed information on each event. </p>
 *
 * <p>The <code>eventDispatched()</code> method is passed the same thing
 * as in the {@link DocumentLoadListener}.</p>
 *
 * <p>The <code>eventData</code> property of the
 * <code>DocumentLoadEvent</code> instance will be a
 * <code>java.util.Map</code>.  For the
 * <code>END_URL_LOAD_EVENT_MASK</code> type in
 * <code>DocumentLoadEvent</code> the map will contain an entry under
 * the key "<code>URI</code>" without the quotes.  This will be the
 * fully qualified URI for the event.  The map will also contain an
 * entry under the key "<code>headers</code>".  This entry will be a
 * <code>Map</code> of all the response headers.</p>


The next step will be to allow the same procedure to work to discover
the request headers.

Ed

A classes_spec/org/mozilla/webclient/PageInfoListener.java

- marker class for listenening for high fidelity page information.

A src_moz/EventRegistrationImpl.cpp

- add boolean property, capturePageInfo to turn on or off high fidelity
  page information collection.

M build-tests.xml

- add new test, DocumentLoadListenerTest

M build.xml

- added new JNI class, EventRegistrationImpl

M classes_spec/org/mozilla/webclient/CurrentPage2.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java

- rollback previous API for headers discovery

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

- pass thru the capturePageInfo property

- add URIToStringMap, currently not working.

M classes_spec/org/mozilla/webclient/test/EMWindow.java

- call toString() on the eventData, don't cast it to a String.

M src_moz/EmbedProgress.cpp
M src_moz/EmbedProgress.h

- leverage the nsIHttpHeaderVisitor interface to discover the response
  headers.

- add boolean property capturePageInfo

A src_moz/HttpHeaderVisitorImpl.cpp
A src_moz/HttpHeaderVisitorImpl.h

- copy the headers to a Properties object.

M src_moz/Makefile.in

- compile two new files:

+	EventRegistrationImpl.cpp \
+	HttpHeaderVisitorImpl.cpp \

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

- pass the NativeWrapperFactory to our Init() method

- add wrapperFactory getter.

M src_moz/WrapperFactoryImpl.cpp

- pass the nativeWrapperFactory to the NativeBrowserControl's Init method.

M src_share/jni_util.cpp
M src_share/jni_util.h

- new constants: URI, headers

R test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java

- not yet time for this one
A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java

- exercise bare minimum functionality of PageInfoListener

M test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- print out headers.
2004-09-09 20:17:18 +00:00
edburns%acm.org 54ea2297ee This checkin is the start of work for the Http header access feature.
Currently, I'm trying to discover what is the best way to expose this
API in documents that include frames.

I think I'll need more than those two new methods on CurrentPage2.  I'll
probably have some way to get a list of all URLs that comprise the
frameset, including nested framesets.  It's true that you could use the
DOM to derive this, but that's very complicated.  I need something more
lightweight.  In the meantime, I'll check in what I have.

M build-tests.xml

- add commented out CurrentPageTest

M build.xml

- add clean.test target

M classes_spec/org/mozilla/webclient/CurrentPage2.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java

- new methods and no-op impls, so test-first test fails.

+    public Map getRequestHeaders();
+
+    public Map getResponseHeaders();

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

- swallow exceptions thrown by listeners.

M src_moz/EmbedProgress.cpp

- test for existence of httpChannel, so we can visit the headers

M test/automated/src/classes/org/mozilla/util/THTTPD.java

- return a "Server: " header that I can test in the testcase.

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

- add doStartCheck() method.

M test/automated/src/classes/org/mozilla/webclient/NavigationTest.java
M test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java

- push THTTPD stuff to superclass.

A test/automated/src/classes/org/mozilla/webclient/NavigationTest.java

- new testcase, fails.
2004-09-03 19:04:22 +00:00
edburns%acm.org 3ff0689817 Thanks again to Michael Klepikov for these fixes.
M dom/jni/org_mozilla_dom_NodeImpl.cpp

- code around the absence of LowerCaseEqualsLiteral in nsTAString.h.
  I'm surprised the unit tests worked for me all aloung though.

M webclient/build.xml

- make run.test.browser depend on "main"

M webclient/src_moz/EmbedProgress.cpp

- deal with null URL passed to ::OnStateChange

M webclient/src_moz/HistoryImpl.cpp

- Don't cast to PRBool* when you don't need to.

M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- don't swallow the exception from setAppData().
2004-08-03 17:16:57 +00:00
edburns%acm.org 80aa3eb7d3 Author: Michael
r=edburns

M webclient/src_moz/HistoryImpl.cpp

- Incorrectly passing jboolean to mozilla methods, pass PRBool instead.
2004-08-01 19:39:40 +00:00
cbiesinger%web.de ce83542d2a fixing build bustage 2004-07-21 22:09:39 +00:00
cbiesinger%web.de d5bd29aeda Bug 113243 Get rid of (Compare|Equals)WithConversion
r+sr=roc
2004-07-21 20:18:39 +00:00
edburns%acm.org 5765ff8435 replace_jdic_with_webclient 2004-06-29 23:12:29 +00:00
edburns%acm.org 6f412c8751 Ok after this checkin we now have all the functionality of Sun's JDIC
WebBrowser
<https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/browser/WebBrowser.html>, with the following exceptions:

- we're based on mozilla 1.6

- it only works on windows

- we don't have mouse event support

- we only support mozilla, not IE

So, webclient still has a ways to go until we reach its former glory,
but reach it we will.

I'm going to assemble a 2.0 alpha 1 source code only release, including
build instructions, from what we have now.

I'd love it if someone could get the unit tests working on GNU/Linux
again.  I think the problem has to do with our old friend GDKSUPERWIN.

Next step is to assemble the 2.0 alpha 1 source code release!

Ed

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
M webclient/src_moz/NavigationImpl.cpp

- re-enable POST

M webclient/src_moz/EmbedWindow.cpp
M webclient/src_moz/EmbedWindow.h

- expose DocShell post method.

M webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java
M webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java

- test code for POST
2004-06-25 13:59:54 +00:00
edburns%acm.org 588c335a00 Ok after this checkin we now have all the functionality of Sun's JDIC
WebBrowser
<https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/browser/WebBrowser.html>, with the following exceptions:

- we're based on mozilla 1.6

- it only works on windows

- we don't have mouse event support

- we only support mozilla, not IE

So, webclient still has a ways to go until we reach its former glory.
However, I'm going to get together a 2.0 alpha release, including build
instructions, from what we have now.

I'd love it if someone could get the unit tests working on GNU/Linux
again.  I think the problem has to do with our old friend GDKSUPERWIN.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
M webclient/src_moz/NavigationImpl.cpp

- re-enable POST

M webclient/src_moz/EmbedWindow.cpp
M webclient/src_moz/EmbedWindow.h

- expose DocShell post method.

M webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java
M webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java

- test code for POST
2004-06-24 16:23:42 +00:00
edburns%acm.org f230524ab5 Next really will be to get POST working.
A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerImpl.java

- Forgot to add this.

M classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M src_moz/HistoryImpl.cpp

- push through can{back,forward}(), forward().

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

- exercise new methods.
2004-06-23 19:58:12 +00:00
edburns%acm.org 0b089bb85a Got "back()" working. Next will be to get forward(), and can{Back,Forward}.
A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerImpl.java
A test/automated/src/classes/org/mozilla/webclient/HistoryTest.java
A test/automated/src/test/HistoryTest0.html
A test/automated/src/test/HistoryTest1.html
A test/automated/src/test/HistoryTest2.html
A test/automated/src/test/HistoryTest3.html

- new test content.

M classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M src_moz/HistoryImpl.cpp

- expose back() method
M src_moz/Makefile.in

M test/automated/src/classes/org/mozilla/util/THTTPD.java

- added way for the server to return the content type of the document

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

- pulled out DocumentLoadListener into a separate class.
2004-06-23 19:21:07 +00:00
edburns%acm.org 37987a4b25 This enables "refresh". Next step will be to enable history next and
back.

M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
M src_moz/NavigationImpl.cpp

- push thru "refresh" behavior.

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

- move test HTTPD server out so it can be used by all tests in suite.

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

- make getBrowserBinDir() static.
2004-06-23 17:08:23 +00:00
edburns%acm.org a01abb2142 This checkin verifies that loading documents over HTTP works as
expected.

M src_moz/Makefile.in

- added WindowWatcher to compilation

M src_moz/NativeBrowserControl.cpp

- turn on our WindowWatcher.  Still need to flesh this out, but it
  seemed to be necessary for http to work.

M src_moz/WindowCreator.cpp
M src_moz/WindowCreator.h

- return to compilation

M src_moz/WrapperFactoryImpl.cpp

- hack to workaround bug posted to n.p.m.e by me today regarding
  nsIOService::SetOffline(TRUE) being called.  The workaround is to
  manually call nsIOService::SetOffline(FALSE) *after* the point in time
  where the "TRUE" call is made.

M test/automated/src/classes/org/mozilla/util/THTTPD.java

- tweaks to make this suitable for JUnit testing.

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

- all navigation tests work.
2004-06-22 19:23:23 +00:00
edburns%acm.org 5d8b14ab9a Accidentally removed running testcases. 2004-06-18 14:17:28 +00:00
edburns%acm.org 3d944e6dd3 Implement a trivial HTTP server to test http file loads, and what do you
know, I find that selection doesn't work.  Hmm.  Well, let's hear it for
test first.

Naturally, the next step is to fix the new NavigationTest.testHttpLoad().

A test/automated/src/test/HttpNavigationTest.txt

- data file for testHttpLoad().

A test/automated/src/classes/org/mozilla/util/THTTPD.java

- trivial HTTP server that suits my needs.

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

- added commented out testHttpLoad().  It breaks.

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

- remove emacs mode line.
2004-06-18 13:53:14 +00:00
edburns%acm.org 1221ac1626 Correctly load the GtkBrowserControlCanvas. 2004-06-17 21:27:55 +00:00
edburns%acm.org 0b67283d43 Remove ^M 2004-06-17 21:20:30 +00:00
edburns%acm.org 529b8262f9 This checkin enables Navigation.stop() to work.
I'm working towards getting equivalent functionality to
<https://jdic.dev.java.net/nonav/documentation/javadoc/jdic/org/jdesktop/jdic/browser/WebBrowser.html>
working by JavaOne SF 2004.  At this point, all that remains are
refresh(), back(), forward(), and post().  All but post() are trivial.

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

- remove "blocking" methods since we don't need them now that we have
  DocumentLoadListener working again.

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

- remove "blocking" methods since we don't need them now that we have
  DocumentLoadListener working again.

- implement stop().

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

- throw IllegalStateException if you try to get a BrowserControl
  instance after appTerminate() has been called.

- throw IllegalStateException if appTerminate() is called more than
  once.

M src_moz/NavigationImpl.cpp

- call through to stop

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

- test first test for stop.
2004-06-16 14:37:34 +00:00
edburns%acm.org 085320b768 This checkin makes DocumentLoadListener be fully functional for the
file:/// and LoadFromStream cases.  There were some problems:

1. RandomHTMLInputStream was never returning -1 from available, even
   when there was no more data to be read.

2. the available ivars in InputStreamShim were PRUint32, and needed to
   be PRInt32 to accomodate the -1.

3. InputStreamShim wasn't looking for the -1 from java, and it was
   incorrectly returning NS_ERROR_NOT_AVAILABLE in that case, when it
   should have been returning NS_OK if there was more data for Mozilla.

4. The testcase had a deadlock: it tried to remove the
   DocumentLoadListener from the DocumentLoadListener callback.  I had
   to move this outside of the listener callback.

M src_moz/InputStreamShim.cpp
M src_moz/InputStreamShim.h

- make available be a signed int.

- correctly handle the case when java says, "no more data available".

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

- avoid deadlock by moving the call to removeDocumentLoadListener()
   outside of the listener itself.

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

- make sure to return -1 from available() when we have no more data.
2004-06-14 15:34:42 +00:00
edburns%acm.org 5b66e8950f M classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java
- Major enhancement of this class.  Framework for all
  WebclientEventListener subclasses now in place.  This includes a
  separate Theard event queue to send events from mozilla to java so
  that the listener can call back into webclient without fear of
  deadlock.  I had to use semaphores!  Thank you Michael Faiman
  <http://www.cs.uiuc.edu/people/faculty/faiman2.html> who taught my
  operating systems class where I learned semaphores.

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

- use notifyAll() instead of notify, for best practice.

M src_moz/EmbedProgress.cpp

- flesh out rest of DocumentLoadListener code.

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

- comment out code because I can't seem to get the END_DOCUMENT_LOAD
  event to come from mozilla on the LoadFromStream case.  Top men are
  working on it.

Next step is to uncomment the rest of NavigationTest.
2004-06-14 01:44:33 +00:00
edburns%acm.org 21c5637b7d This checkin enables the StartDocumentLoadEvent. Now adding the rest of
the DocumentLoadListener events will be trivial.

Next step: flesh out the rest of the DocumentLoadListener events.
Modify NavigationTest so that it does its selection checking inside the
listeners.  This will probably require creating a Thread, managed by
EventRegistrationImpl, that is used to process callbacks from mozilla
into Java, so that we don't get deadlock.

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

- remove all dependencies on NativeEventThread

- introduce dependency on BrowserControlCanvas (needed for future
  MouseListener) work.

- {add,remove}DocumentLoadListener() now just a matter of
  adding/removing to List.

- add nativeEventOccurred() method, called from native code

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

- remove dependency on BrowserControlCanvas

- removed nativeEventOccurred

M src_moz/EmbedProgress.cpp

- delete the global ref in the dtor.

- create the global ref in SetEventRegistration().

- call back to Java on startDocumentLoad.

M src_moz/NativeBrowserControl.cpp

- initialize our string constants.

M src_share/jni_util.cpp
M src_share/jni_util.h

- alter the signature of util_SendEventToJava

-void util_SendEventToJava(JNIEnv *yourEnv, jobject nativeEventThread,
-                          jobject webclientEventListener,
+void util_SendEventToJava(JNIEnv *yourEnv, jobject eventRegistrationImpl,
                           jstring eventListenerClassName,
                           jlong eventType, jobject eventData)

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

- show that the DocumentLoadListener gets called.
2004-06-12 05:46:48 +00:00
edburns%acm.org 75269ca669 This checkin is the next step for getting DocumentLoadListener to work.
I now have the new architecture for pumping events from mozilla back
into java.  I've added a sequence diagram to
<http://www.mozilla.org/projects/blackwood/webclient/design/20040306-webclient-2_0.zargo>
and updated the private API class diagram.

The next step will be to have the EmbedProgress::On* methods call back
to EventRegistration.nativeEventOccured.

M src_moz/EmbedProgress.cpp
M src_moz/EmbedProgress.h

- make this class maintain a reference to the java EventRegistration
  instance for this BrowserControl

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

- make this class maintain a reference to the java BrowserControl instance.

M src_moz/WindowControlImpl.cpp

- push the java BrowserControl to the NativeBrowserControl on Realize().

M src_moz/WrapperFactoryImpl.cpp
M src_moz/ns_globals.h

- expose gImplementedInterfaces in ns_globals.h
2004-06-11 15:55:48 +00:00
edburns%acm.org 12c89364a4 This checkin is the first step to making DocumentLoadListener work
again.  It provides the native class that implements
nsIWebProgressListener, which I've copied form gtk_moz_embed, so it's
gotta be good.  The next step will be to hook this up to the java side.

A src_moz/EmbedProgress.h
A src_moz/EmbedProgress.cpp

- mostly copied from GTKMOZEMBED

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

- remove javadoc reference to non-existing method

M src_moz/EmbedWindow.cpp
M src_moz/EmbedWindow.h

- expose AddWebBrowserListener method.

M src_moz/InputStreamShim.cpp

- make FileInputStream testcase run

M src_moz/Makefile.in
M src_moz/NativeBrowserControl.cpp
M src_moz/NativeBrowserControl.h

- add EmbedProgress

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

- Make this test run
2004-06-10 16:30:00 +00:00
edburns%acm.org 8b674e0a55 This change-bundle applies Darin Fisher's astute observation that CVS
version 1.9 of InputStreamShim.cpp didn't correctly implement
QueryInterface.  Fixing that allowed me to discover that the system
wants to call ::ReadSegments, so I had to implement that.  Now the
RandomHTMLInputStream case works, but the garden variety FileInputStream
case does not.  Since the FileInputStream case is generally easier to
debug, I'll check in what I have now and continue with this last case
tomorrow.

M src_moz/InputStreamShim.cpp
M src_moz/InputStreamShim.h

- made this correctly implement nsIAsyncInputStream.

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

- comment out the FileInputStream case.
2004-06-03 14:28:41 +00:00
edburns%acm.org 75dba2edd1 This checkin demonstrates that navigation.loadFromStream() works, at
least in the case of a FileInputStream.  I still can't get the
RandomHTMLInputStream to work.  I'm still waiting on a response from
Darin Fisher on that one.

M build-tests.xml

- comment in all tests

M classes_spec/org/mozilla/webclient/Navigation2.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java

- add loadFromStreamBlocking, until we have DocumentLoadListener working

M src_moz/InputStreamShim.cpp
M src_moz/InputStreamShim.h

- rollback the nsIAsyncInputStream changes.

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

- test from a FileInputStream

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

- Allow notification when read completes.
2004-06-02 17:26:49 +00:00
edburns%acm.org 8cd025ef1b M build-tests.xml
- comment in all tests

M classes_spec/org/mozilla/webclient/Navigation2.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java

- add loadFromStreamBlocking, until we have DocumentLoadListener working

M src_moz/InputStreamShim.cpp
M src_moz/InputStreamShim.h

- rollback the nsIAsyncInputStream changes.

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

- test from a FileInputStream

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

- Allow notification when read completes.
2004-06-02 14:31:24 +00:00