Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6661232

Can't dynamically set applet's width and height in Firefox 3

    Details

    • Subcomponent:
    • Introduced In Build:
      b08
    • Introduced In Version:
    • Resolved In Build:
      b13
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Due to the conversion from the OJI to the NPRuntime as the scripting interface for the new Java Plug-In in Firefox 3, and due to the fact that the OJI apparently had special-case handling for this, we can not dynamically set the size of applets in Firefox 3 with the new plug-in.

      In the NPRuntime, the browser queries our scriptable NPObject whenever it tries to access a field or method. If our NPObject indicates that it does have this field or method, then the browser delegates its handling to us. This allows plugins to override the handling of properties in the DOM hierarchy and is apparently standard, longstanding behavior.

      The browser queries our scriptable NPObject (which also mirrors the applet tag in the DOM hierarchy) to see whether it has fields like "width" and "height". Unfortunately due to the fact that java.awt.Applet implements ImageObserver, ImageObserver's WIDTH and HEIGHT static final fields are visible to the JavaScript engine, we claim that we have them, and this prevents our being able to set them in the DOM since we don't want to override the browser's behavior when changing them. Currently we raise a JSException because the width and height are final fields and therefore can not be set.

        Attachments

          Activity

            People

            • Assignee:
              kbr Kenneth Russell (Inactive)
              Reporter:
              kbr Kenneth Russell (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: