/hg/release/icedtea6-1.7: 6 new changesets

Andrew John Hughes gnu_andrew at member.fsf.org
Fri Feb 26 06:07:00 PST 2010


On 26 February 2010 12:37, Andrew John Hughes <gnu_andrew at member.fsf.org> wrote:
> On 26 February 2010 03:59,  <dbhole at icedtea.classpath.org> wrote:
>> changeset 6e4b712d16b6 in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=6e4b712d16b6
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:41:59 2010 -0500
>>
>>        - Import from main line
>>
>>        - Re-designed frame embedding code so that the applet is dynamically
>>        packed into given handle. This increases stability and breaks
>>        reliance on the assumption that the browser will always provide a
>>        handle in a certain sequence.
>>
>>
>> changeset e1aa8a1748cb in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=e1aa8a1748cb
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:43:56 2010 -0500
>>
>>        - Import from main line
>>        - Added tests for JSObject.eval()
>>
>>
>> changeset 969ccd883d23 in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=969ccd883d23
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:45:36 2010 -0500
>>
>>        - Import from main line
>>
>>        - Encode new lines, carriage returns, and other special characters
>>        before sending them to Java side (de-coding code is already in
>>        effect on Java side).
>>
>>
>> changeset cad2a2d3f4cd in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=cad2a2d3f4cd
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:55:12 2010 -0500
>>
>>        - Import from main line
>>
>>        - Centralized and increased timeouts to give slow-loading applets
>>        enough time to load.
>>
>>
>> changeset 58b42ff925ea in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=58b42ff925ea
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:56:45 2010 -0500
>>
>>        - Import from main line
>>
>>        - Fixed IcedTea Bug# 446: Use JDK_UPDATE_VERSION to set the jpi
>>        version.
>>
>>
>> changeset 728d7fbb5008 in /hg/release/icedtea6-1.7
>> details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=728d7fbb5008
>> author: Deepak Bhole <dbhole at redhat.com>
>> date: Thu Feb 25 22:58:15 2010 -0500
>>
>>        - Import from main line
>>
>>        - Fix security permissions related to get/set property, based on
>>        specifications
>>
>>        * plugin/icedteanp/java/sun/applet/PluginMain.java: Add some
>>        javaplugin.* properties that some applets expect.
>>        * rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Implement
>>        allowed property get/set based on specifications.
>>
>>
>> diffstat:
>>
>> 10 files changed, 1184 insertions(+), 933 deletions(-)
>> ChangeLog                                                |   40
>> Makefile.am                                              |    1
>> plugin/icedteanp/IcedTeaNPPlugin.cc                      |   37
>> plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 1874 +++++++-------
>> plugin/icedteanp/java/sun/applet/PluginMain.java         |    4
>> plugin/tests/LiveConnect/PluginTest.java                 |   11
>> plugin/tests/LiveConnect/common.js                       |    3
>> plugin/tests/LiveConnect/index.html                      |    2
>> plugin/tests/LiveConnect/jjs_eval_test.js                |   57
>> rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java |   88
>>
>> diffs (truncated from 2742 to 500 lines):
>>
>> diff -r f4d6e5d2be10 -r 728d7fbb5008 ChangeLog
>> --- a/ChangeLog Wed Feb 24 16:34:02 2010 +0100
>> +++ b/ChangeLog Thu Feb 25 22:58:15 2010 -0500
>> @@ -1,3 +1,43 @@ 2010-02-24 Pavel Tisnovsky  <ptisnovs at re
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * plugin/icedteanp/java/sun/applet/PluginMain.java: Add some javaplugin.*
>> +       properties that some applets expect.
>> +       * rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Implement
>> +       allowed property get/set based on specifications.
>> +
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * Makefile.am: Provide JDK_UPDATE_VERSION when compiling the plugin
>> +       * plugin/icedteanp/IcedTeaNPPlugin.cc: Use JDK_UPDATE_VERSION to set the
>> +       jpi version.
>> +
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Centralized
>> +       and increased timeouts to give slow-loading applets enough time to load.
>> +
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * plugin/icedteanp/IcedTeaNPPlugin.cc
>> +       (plugin_create_applet_tag): Encode new lines, carriage returns, and
>> +       other special characters before sending them to Java side (de-coding
>> +       code is already in effect on Java side).
>> +
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * plugin/tests/LiveConnect/PluginTest.java
>> +       (jjsEvalTest): New function. Calls JSObject.eval() with given string.
>> +       * plugin/tests/LiveConnect/common.js: Added eval test suite as one of the
>> +       run options.
>> +       * plugin/tests/LiveConnect/index.html: Same.
>> +       * plugin/tests/LiveConnect/jjs_eval_test.js: Eval tests.
>> +
>> +2010-02-25  Deepak Bhole <dbhole at redhat.com>
>> +
>> +       * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Re-designed
>> +       frame embedding code so that the applet is dynamically packed into given
>> +       handle.
>> +
>>  2010-02-24 Pavel Tisnovsky  <ptisnovs at redhat.com>
>>        * Makefile.am: Corrected Pulse Audio
>>        library build
>> diff -r f4d6e5d2be10 -r 728d7fbb5008 Makefile.am
>> --- a/Makefile.am       Wed Feb 24 16:34:02 2010 +0100
>> +++ b/Makefile.am       Thu Feb 25 22:58:15 2010 -0500
>> @@ -1499,6 +1499,7 @@ NPPLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedT
>>        mkdir -p $(NPPLUGIN_DIR) && \
>>        cd $(NPPLUGIN_DIR) && \
>>        $(CXX) $(CXXFLAGS) \
>> +         -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
>>          -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
>>          -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
>>          $(GLIB_CFLAGS) \
>> diff -r f4d6e5d2be10 -r 728d7fbb5008 plugin/icedteanp/IcedTeaNPPlugin.cc
>> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc       Wed Feb 24 16:34:02 2010 +0100
>> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc       Thu Feb 25 22:58:15 2010 -0500
>> @@ -107,7 +107,7 @@ exception statement from your version. *
>>   "application/x-java-applet;version=1.4.2:class,jar:IcedTea;"         \
>>   "application/x-java-applet;version=1.5:class,jar:IcedTea;"           \
>>   "application/x-java-applet;version=1.6:class,jar:IcedTea;"           \
>> -  "application/x-java-applet;jpi-version=1.6.0_00:class,jar:IcedTea;"  \
>> +  "application/x-java-applet;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"  \
>>   "application/x-java-bean:class,jar:IcedTea;"                         \
>>   "application/x-java-bean;version=1.1:class,jar:IcedTea;"             \
>>   "application/x-java-bean;version=1.1.1:class,jar:IcedTea;"           \
>> @@ -123,7 +123,7 @@ exception statement from your version. *
>>   "application/x-java-bean;version=1.4.2:class,jar:IcedTea;"           \
>>   "application/x-java-bean;version=1.5:class,jar:IcedTea;"             \
>>   "application/x-java-bean;version=1.6:class,jar:IcedTea;"             \
>> -  "application/x-java-bean;jpi-version=1.6.0_00:class,jar:IcedTea;"    \
>> +  "application/x-java-bean;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"    \
>>   "application/x-java-vm-npruntime::IcedTea;"
>>
>>  #define PLUGIN_URL NS_INLINE_PLUGIN_CONTRACTID_PREFIX NS_JVM_MIME_TYPE
>> @@ -1575,13 +1575,40 @@ plugin_create_applet_tag (int16_t argc,
>>           // characters will pass through the pipe.
>>           if (argv[i] != '\0')
>>             {
>> -              gchar* escaped = NULL;
>> +              // worst case scenario -> all characters are newlines or
>> +              // returns, each of which translates to 5 substitutions
>> +              char* escaped = (char*) calloc(((strlen(argv[i])*5)+1), sizeof(char));
>>
>> -              escaped = g_strescape (argv[i], NULL);
>> +              strcpy(escaped, "");
>> +              for (int j=0; j < strlen(argv[i]); j++)
>> +              {
>> +                  if (argv[i][j] == '\r')
>> +                      strcat(escaped, "&#13;");
>> +                  else if (argv[i][j] == '\n')
>> +                      strcat(escaped, "&#10;");
>> +                  else if (argv[i][j] == '>')
>> +                      strcat(escaped, "&gt;");
>> +                  else if (argv[i][j] == '<')
>> +                      strcat(escaped, "&lt;");
>> +                  else if (argv[i][j] == '&')
>> +                      strcat(escaped, "&amp;");
>> +                  else
>> +                  {
>> +                      char* orig_char = (char*) calloc(2, sizeof(char));
>> +                      orig_char[0] = argv[i][j];
>> +                      orig_char[1] = '\0';
>> +
>> +                      strcat(escaped, orig_char);
>> +
>> +                      free(orig_char);
>> +                      orig_char = NULL;
>> +                  }
>> +              }
>> +
>>               parameters = g_strconcat (parameters, "<PARAM NAME=\"", argn[i],
>>                                         "\" VALUE=\"", escaped, "\">", NULL);
>>
>> -              g_free (escaped);
>> +              free (escaped);
>>               escaped = NULL;
>>             }
>>         }
>> diff -r f4d6e5d2be10 -r 728d7fbb5008 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
>> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java  Wed Feb 24 16:34:02 2010 +0100
>> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java  Thu Feb 25 22:58:15 2010 -0500
>> @@ -91,6 +91,7 @@ import java.net.URI;
>>  import java.net.URI;
>>  import java.net.URL;
>>  import java.security.AccessController;
>> +import java.security.AllPermission;
>>  import java.security.PrivilegedAction;
>>  import java.util.Enumeration;
>>  import java.util.HashMap;
>> @@ -114,18 +115,199 @@ import com.sun.jndi.toolkit.url.UrlUtil;
>>   * Lets us construct one using unix-style one shot behaviors
>>   */
>>
>> - class PluginAppletViewerFactory
>> + class PluginAppletPanelFactory
>>  {
>> -     public PluginAppletViewer createAppletViewer(int identifier,
>> -                                                  long handle, int x, int y,
>> -                                                URL doc, Hashtable atts) {
>> -         PluginAppletViewer pluginappletviewer = new PluginAppletViewer(identifier, handle, x, y, doc, atts, System.out, this);
>> -         return pluginappletviewer;
>> +
>> +     public AppletPanel createPanel(PluginStreamHandler streamhandler,
>> +                                    int identifier,
>> +                                    long handle, int x, int y,
>> +                                    final URL doc, final Hashtable atts) {
>> +
>> +         AppletViewerPanel panel = (AppletViewerPanel) AccessController.doPrivileged(new PrivilegedAction() {
>> +             public Object run() {
>> +                    try {
>> +                        AppletPanel panel = new NetxPanel(doc, atts, false);
>> +                        AppletViewerPanel.debug("Using NetX panel");
>> +                        PluginDebug.debug(atts.toString());
>> +                        return panel;
>> +                    } catch (Exception ex) {
>> +                        AppletViewerPanel.debug("Unable to start NetX applet - defaulting to Sun applet", ex);
>> +                        return new AppletViewerPanel(doc, atts);
>> +                    }
>> +             }
>> +         });
>> +
>> +         double heightFactor = 1.0;
>> +         double widthFactor = 1.0;
>> +
>> +         if (atts.get("heightPercentage") != null) {
>> +             heightFactor = (Integer) atts.get("heightPercentage")/100.0;
>> +         }
>> +
>> +         if (atts.get("widthPercentage") != null) {
>> +             widthFactor = (Integer) atts.get("widthPercentage")/100.0;
>> +         }
>> +
>> +
>> +         // put inside initial 0 handle frame
>> +         PluginAppletViewer.reFrame(null, identifier, System.out,
>> +                 heightFactor, widthFactor, 0, panel);
>> +
>> +         panel.init();
>> +
>> +         // Start the applet
>> +         initEventQueue(panel);
>> +
>> +         // Applet initialized. Find out it's classloader and add it to the list
>> +         String portComponent = doc.getPort() != -1 ? ":" + doc.getPort() : "";
>> +         String codeBase = doc.getProtocol() + "://" + doc.getHost() + portComponent;
>> +
>> +         if (atts.get("codebase") != null) {
>> +             try {
>> +                 URL appletSrcURL = new URL(codeBase + (String) atts.get("codebase"));
>> +                 codeBase = appletSrcURL.getProtocol() + "://" + appletSrcURL.getHost();
>> +             } catch (MalformedURLException mfue) {
>> +                 // do nothing
>> +             }
>> +         }
>> +
>> +
>> +         // Wait for the panel to initialize
>> +         // (happens in a separate thread)
>> +         Applet a;
>> +
>> +         // Wait for panel to come alive
>> +         int maxWait = PluginAppletViewer.APPLET_TIMEOUT; // wait for panel to come alive
>> +         int wait = 0;
>> +         while ((panel == null) || (!((NetxPanel) panel).isAlive() && wait < maxWait)) {
>> +              try {
>> +                  Thread.sleep(50);
>> +                  wait += 50;
>> +              } catch (InterruptedException ie) {
>> +                  ie.printStackTrace();
>> +              }
>> +         }
>> +
>> +         // Wait for the panel to initialize
>> +         // (happens in a separate thread)
>> +         while (panel.getApplet() == null &&
>> +                ((NetxPanel) panel).isAlive()) {
>> +             try {
>> +                 Thread.sleep(50);
>> +                 PluginDebug.debug("Waiting for applet to initialize...");
>> +             } catch (InterruptedException ie) {
>> +                 ie.printStackTrace();
>> +             }
>> +         }
>> +
>> +         a = panel.getApplet();
>> +
>> +         // Still null?
>> +         if (panel.getApplet() == null) {
>> +             streamhandler.write("instance " + identifier + " reference " + -1 + " fatalError " + "Initialization failed");
>> +             return null;
>> +         }
>> +
>> +         PluginDebug.debug("Applet " + a.getClass() + " initialized");
>> +         streamhandler.write("instance " + identifier + " initialized");
>> +
>> +         AppletSecurityContextManager.getSecurityContext(0).associateSrc(((NetxPanel) panel).getAppletClassLoader(), doc);
>> +         AppletSecurityContextManager.getSecurityContext(0).associateInstance(identifier, ((NetxPanel) panel).getAppletClassLoader());
>> +
>> +         return panel;
>>      }
>>
>>      public boolean isStandalone()
>>      {
>>          return false;
>> +     }
>> +
>> +     /**
>> +      * Send the initial set of events to the appletviewer event queue.
>> +      * On start-up the current behaviour is to load the applet and call
>> +      * Applet.init() and Applet.start().
>> +      */
>> +     private void initEventQueue(AppletPanel panel) {
>> +         // appletviewer.send.event is an undocumented and unsupported system
>> +         // property which is used exclusively for testing purposes.
>> +         PrivilegedAction pa = new PrivilegedAction() {
>> +             public Object run() {
>> +                 return System.getProperty("appletviewer.send.event");
>> +             }
>> +         };
>> +         String eventList = (String) AccessController.doPrivileged(pa);
>> +
>> +         if (eventList == null) {
>> +             // Add the standard events onto the event queue.
>> +             panel.sendEvent(AppletPanel.APPLET_LOAD);
>> +             panel.sendEvent(AppletPanel.APPLET_INIT);
>> +             panel.sendEvent(AppletPanel.APPLET_START);
>> +         } else {
>> +             // We're testing AppletViewer.  Force the specified set of events
>> +             // onto the event queue, wait for the events to be processed, and
>> +             // exit.
>> +
>> +             // The list of events that will be executed is provided as a
>> +             // ","-separated list.  No error-checking will be done on the list.
>> +             String [] events = splitSeparator(",", eventList);
>> +
>> +             for (int i = 0; i < events.length; i++) {
>> +                 PluginDebug.debug("Adding event to queue: " + events[i]);
>> +                 if (events[i].equals("dispose"))
>> +                     panel.sendEvent(AppletPanel.APPLET_DISPOSE);
>> +                 else if (events[i].equals("load"))
>> +                     panel.sendEvent(AppletPanel.APPLET_LOAD);
>> +                 else if (events[i].equals("init"))
>> +                     panel.sendEvent(AppletPanel.APPLET_INIT);
>> +                 else if (events[i].equals("start"))
>> +                     panel.sendEvent(AppletPanel.APPLET_START);
>> +                 else if (events[i].equals("stop"))
>> +                     panel.sendEvent(AppletPanel.APPLET_STOP);
>> +                 else if (events[i].equals("destroy"))
>> +                     panel.sendEvent(AppletPanel.APPLET_DESTROY);
>> +                 else if (events[i].equals("quit"))
>> +                     panel.sendEvent(AppletPanel.APPLET_QUIT);
>> +                 else if (events[i].equals("error"))
>> +                     panel.sendEvent(AppletPanel.APPLET_ERROR);
>> +                 else
>> +                     // non-fatal error if we get an unrecognized event
>> +                     PluginDebug.debug("Unrecognized event name: " + events[i]);
>> +             }
>> +
>> +             while (!panel.emptyEventQueue()) ;
>> +         }
>> +     }
>> +
>> +
>> +     /**
>> +      * Split a string based on the presence of a specified separator.  Returns
>> +      * an array of arbitrary length.  The end of each element in the array is
>> +      * indicated by the separator of the end of the string.  If there is a
>> +      * separator immediately before the end of the string, the final element
>> +      * will be empty.  None of the strings will contain the separator.  Useful
>> +      * when separating strings such as "foo/bar/bas" using separator "/".
>> +      *
>> +      * @param sep  The separator.
>> +      * @param s    The string to split.
>> +      * @return     An array of strings.  Each string in the array is determined
>> +      *             by the location of the provided sep in the original string,
>> +      *             s.  Whitespace not stripped.
>> +      */
>> +     private String [] splitSeparator(String sep, String s) {
>> +         Vector v = new Vector();
>> +         int tokenStart = 0;
>> +         int tokenEnd   = 0;
>> +
>> +         while ((tokenEnd = s.indexOf(sep, tokenStart)) != -1) {
>> +             v.addElement(s.substring(tokenStart, tokenEnd));
>> +             tokenStart = tokenEnd+1;
>> +         }
>> +         // Add the final element.
>> +         v.addElement(s.substring(tokenStart));
>> +
>> +         String [] retVal = new String[v.size()];
>> +         v.copyInto(retVal);
>> +         return retVal;
>>      }
>>  }
>>
>> @@ -146,7 +328,7 @@ import com.sun.jndi.toolkit.url.UrlUtil;
>>       */
>>      private static String defaultSaveFile = "Applet.ser";
>>
>> -     private static enum PAV_INIT_STATUS {PRE_INIT, ACTIVE, INACTIVE};
>> +     private static enum PAV_INIT_STATUS {PRE_INIT, IN_INIT, INIT_COMPLETE, INACTIVE};
>>
>>      /**
>>       * The panel in which the applet is being displayed.
>> @@ -163,11 +345,6 @@ import com.sun.jndi.toolkit.url.UrlUtil;
>>       */
>>
>>      PrintStream statusMsgStream;
>> -
>> -     /**
>> -      * For cloning
>> -      */
>> -     PluginAppletViewerFactory factory;
>>
>>      int identifier;
>>
>> @@ -187,204 +364,155 @@ import com.sun.jndi.toolkit.url.UrlUtil;
>>
>>      private double proposedHeightFactor;
>>      private double proposedWidthFactor;
>> +
>> +     private long handle = 0;
>> +     private WindowListener windowEventListener = null;
>> +     private AppletEventListener appletEventListener = null;
>> +
>> +     public static final int APPLET_TIMEOUT = 60000;
>>
>>      /**
>>       * Null constructor to allow instantiation via newInstance()
>>       */
>>      public PluginAppletViewer() {
>>      }
>> -
>> -     /**
>> -      * Create the applet viewer
>> -      */
>> -     public PluginAppletViewer(final int identifier, long handle, int x, int y, final URL doc,
>> -                               final Hashtable atts, PrintStream statusMsgStream,
>> -                               PluginAppletViewerFactory factory) {
>> -         super(handle, true);
>> -       this.factory = factory;
>> -       this.statusMsgStream = statusMsgStream;
>> -         this.identifier = identifier;
>> -         // FIXME: when/where do we remove this?
>> -         PluginDebug.debug ("PARSING: PUTTING " + identifier + " " + this);
>> -         applets.put(identifier, this);
>> +
>> +     public static void reFrame(PluginAppletViewer oldFrame,
>> +                         int identifier, PrintStream statusMsgStream,
>> +                         double heightFactor, double widthFactor, long handle,
>> +                         AppletViewerPanel panel) {
>> +
>> +         PluginDebug.debug("Reframing " + panel);
>>
>> -
>> -         // we intercept height and width specifications here because
>> -         proposedHeightFactor = 1.0;
>> -         proposedWidthFactor = 1.0;
>> +         // SecurityManager MUST be set, and only privileged code may call reFrame()
>> +         System.getSecurityManager().checkPermission(new AllPermission());
>>
>> -         if (atts.get("heightPercentage") != null) {
>> -                proposedHeightFactor = (Integer) atts.get("heightPercentage")/100.0;
>> +         // Same handle => nothing to do
>> +         if (oldFrame != null && handle == oldFrame.handle)
>> +             return;
>> +
>> +         PluginAppletViewer newFrame = new PluginAppletViewer(handle, identifier, statusMsgStream, heightFactor, widthFactor);
>> +         newFrame.panel = panel;
>> +
>> +         if (oldFrame != null) {
>> +             applets.remove(oldFrame.identifier);
>> +             oldFrame.removeWindowListener(oldFrame.windowEventListener);
>> +             panel.removeAppletListener(oldFrame.appletEventListener);
>> +             oldFrame.remove(panel);
>> +             oldFrame.dispose();
>> +         }
>> +
>> +         newFrame.add("Center", panel);
>> +         newFrame.pack();
>> +
>> +         newFrame.appletEventListener = new AppletEventListener(newFrame, newFrame);
>> +         panel.addAppletListener(newFrame.appletEventListener);
>> +
>> +         applets.put(identifier, newFrame);
>> +
>> +         // dispose oldframe if necessary
>> +         if (oldFrame != null) {
>> +             oldFrame.dispose();
>>          }
>>
>> -         if (atts.get("widthPercentage") != null) {
>> -                proposedWidthFactor = (Integer) atts.get("widthPercentage")/100.0;
>> +         PluginDebug.debug(panel + " reframed");
>> +     }
>> +
>> +     /**
>> +      * Create new plugin appletviewer frame
>> +      */
>> +     private PluginAppletViewer(long handle, final int identifier,
>> +                         PrintStream statusMsgStream, double heightFactor,
>> +                         double widthFactor) {
>> +
>> +         super(handle, true);
>> +         this.statusMsgStream = statusMsgStream;
>> +         this.identifier = identifier;
>> +         this.proposedHeightFactor = heightFactor;
>> +         this.proposedWidthFactor = widthFactor;
>> +
>> +         if (!appletPanels.contains(panel))
>> +             appletPanels.addElement(panel);
>> +
>> +         windowEventListener = new WindowAdapter() {
>> +
>> +             public void windowClosing(WindowEvent evt) {
>> +                 appletClose();
>> +             }
>> +
>> +             public void windowIconified(WindowEvent evt) {
>> +                 appletStop();
>> +             }
>> +
>> +             public void windowDeiconified(WindowEvent evt) {
>> +                 appletStart();
>> +             }
>> +         };
>> +
>> +         addWindowListener(windowEventListener);
>> +
>> +     }
>> +
>> +     private static class AppletEventListener implements AppletListener
>> +     {
>> +         final Frame frame;
>> +         final PluginAppletViewer appletViewer;
>> +
>> +         public AppletEventListener(Frame frame, PluginAppletViewer appletViewer)
>> +         {
>> +         this.frame = frame;
>> +         this.appletViewer = appletViewer;
>>          }
>> -
>> -         AccessController.doPrivileged(new PrivilegedAction() {
>> -             public Object run() {
>> -                       try {
>> -                               panel = new NetxPanel(doc, atts, false);
>> -                               AppletViewerPanel.debug("Using NetX panel");
>> -                               PluginDebug.debug(atts.toString());
>> -                       } catch (Exception ex) {
>> -                               AppletViewerPanel.debug("Unable to start NetX applet - defaulting to Sun applet", ex);
>> -                               panel = new AppletViewerPanel(doc, atts);
>> -                       }
>> -                 return null;
>> +
>> +         public void appletStateChanged(AppletEvent evt)
>>
>
> Thanks for doing this, though it shouldn't be necessary to alter the
> changesets when importing (other than ChangeLog merging).
> --
> Andrew :-)
>
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> Support Free Java!
> Contribute to GNU Classpath and the OpenJDK
> http://www.gnu.org/software/classpath
> http://openjdk.java.net
>
> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
> Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
>

Could you set the target milestone to 1.7.1 in Bugzilla for the
appropriate bugs fixed here?

Cheers,
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8



More information about the distro-pkg-dev mailing list