Webclient not ready for multiple native browser implementations.

RESOLVED FIXED

Status

Core Graveyard
Java APIs to WebShell
P3
normal
RESOLVED FIXED
17 years ago
5 years ago

People

(Reporter: edburns, Assigned: edburns)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(6 attachments)

(Assignee)

Description

17 years ago
need to extract jni_util stuff into separate lib for use in src_moz and src_ie.
(Assignee)

Comment 1

17 years ago
This change creates a new directory, java/webclient/src_share, that
contains the code that will be used in both src_moz and src_ie, and any
other native browser wrapping implementations.

Here are the steps I followed to implement this change.

1. Create a new directory java/webclient/src_share

2. Move all jni_util*.* files from src_moz into src_share

3. Make it so src_share compiles into a new .lib

   src_share has no netscape dependencies.  Any functionality that
   depended on ns dependencies was kept in src_moz.  In this case, we
   have a function prototype only in src_share, with the implementation
   in src_moz.  We did this for nsHashtable.  The other trick was for
   things in WebShellInitContext that had nothing to do with Netscape.
   This case was accomodated by creating a new struct, ShareInitContext,
   that contains all WebShellInitContext members that have nothing to do
   with Netscape.  Currently this is just jobject propertiesClass.  I
   modified the WebShellInitContext struct to contain a ShareContext
   struct as its last member.  There are two new methods in jni_util.h
   that allow for the initialization and deallocation of the members of
   the ShareContext struct.

4. Make it so src_moz uses the new .lib to provide the jni_util behavior

  a. Create ns_util* files that include ../src_share/jni_util* files
  appropriately.

  The only tricky part was for things in jni_util.h that 

Here's the list of files in this change.

cvs -z3 -n update (in directory D:\Projects\mozilla\java\webclient)
cvs server: Updating .
M Makefile.win // added src_share to DIRS
M src_moz/BookmarksImpl.cpp             // include ns_util instead of jni_util
M src_moz/CBrowserContainer.cpp         // include ns_util instead of jni_util
M src_moz/CBrowserContainer.h           // include ns_util instead of jni_util
M src_moz/CurrentPageImpl.cpp           // include ns_util instead of jni_util
M src_moz/HistoryImpl.cpp               // include ns_util instead of jni_util
M src_moz/Makefile.win                  // include ns_util instead of jni_util
M src_moz/NativeEventThread.cpp         // include ns_util instead of jni_util
M src_moz/NavigationImpl.cpp            // include ns_util instead of jni_util
M src_moz/RDFEnumeration.cpp            // include ns_util instead of jni_util
M src_moz/RDFTreeNode.cpp               // include ns_util instead of jni_util
M src_moz/WindowControlImpl.cpp         // include ns_util instead of jni_util
                                        // also use new util_InitShareContext
                                        // function
M src_moz/WrapperFactoryImpl.cpp        // include ns_util instead of jni_util
R src_moz/jni_util.cpp                  // moved to ../src_share
R src_moz/jni_util.h                    // moved to ../src_share
R src_moz/jni_util_export.cpp           // moved to ../src_share
R src_moz/jni_util_export.h             // moved to ../src_share
M src_moz/nsActions.cpp                 // include ns_util instead of jni_util
                                        // also use new 
util_DeallocateShareContext
M src_moz/nsActions.h                   // include ns_util instead of jni_util
A src_moz/ns_util.cpp                   // include jni_util.h
A src_moz/ns_util.h                     // include jni_util.h, changes to
                                        // WebshellInitContext struct
A src_moz/ns_util_export.cpp            // provide impls for methods in 
                                        // jni_util_export.h

A src_share/Makefile.win
A src_share/bal_util.cpp                
A src_share/bal_util.h                  
A src_share/jni_util.cpp                
A src_share/jni_util.h
A src_share/jni_util_export.cpp
A src_share/jni_util_export.h

*****CVS exited normally with code 0*****

Status: NEW → ASSIGNED
(Assignee)

Comment 2

17 years ago
Created attachment 12282 [details]
Fix for this bug.  Untar into a fresh webclient directory.
(Assignee)

Comment 3

17 years ago
Checked this in yesterday.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

17 years ago
Ashu discovered a problem on the outbound side.  Reopened.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 5

17 years ago
Here's the checkin message for the new fix:

M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar 
classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java 
src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp 
src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u 
classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java 
src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp 
src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.  

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.
Blocks: 33333
(Assignee)

Comment 6

17 years ago
Created attachment 12700 [details]
Fix for the re-open of this bug.
(Assignee)

Comment 7

17 years ago
Created attachment 12701 [details] [diff] [review]
Diffs for the fix for the re-open
(Assignee)

Comment 8

17 years ago
The original abstraction is complete.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED
(Assignee)

Comment 9

17 years ago
Further abstraction is necessary to accomodate listeners.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

17 years ago
Blocks: 49293
(Assignee)

Comment 10

17 years ago
This would be the checkin message for the fix of the most recent reop of this bug.

Files in this checkin

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

cvs diff -u src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h
src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change moves out listener constants and other support data from
src_moz into src_share to enable it to be used in src_ie.

tar -cvf 47357.tar src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h
src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h
No longer blocks: 49293
(Assignee)

Comment 11

17 years ago
Created attachment 13032 [details] [diff] [review]
diff -u for the second reop of this bug.
(Assignee)

Comment 12

17 years ago
Created attachment 13033 [details] [diff] [review]
Patch for second reop
(Assignee)

Comment 13

17 years ago
Created attachment 13034 [details]
tar.gz of changed files for reop.
(Assignee)

Comment 14

17 years ago
Added bug 49293 to block list.
Blocks: 49293
(Assignee)

Comment 15

17 years ago
Fix checked in.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED
Component: Java APIs to WebShell → Java APIs to WebShell
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.