Closed Bug 224129 Opened 21 years ago Closed 17 years ago

On Mac, applet tags with width or height as percentage causes lossage.

Categories

(Core Graveyard :: Java: OJI, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: craiga, Assigned: joshua.xia)

References

Details

(Keywords: platform-parity)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031026 Firebird/0.7
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031026 Firebird/0.7

I have a number of pages with applet tags that have the width and height
parameters set to "100%".  When I open these pages the the applet does not load
 .  The following is logged in the java console. 

java.util.MissingResourceException: Can't find resource for bundle
sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
	at java.util.ResourceBundle.getObject(ResourceBundle.java:377)
	at java.util.ResourceBundle.getString(ResourceBundle.java:349)
	at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:37)
	at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:699)
	at sun.applet.AppletPanel.init(AppletPanel.java:180)
	at sun.plugin.AppletViewer.init(AppletViewer.java:498)
	at
com.apple.mrj.JavaEmbedding.JE_AppletViewerPanel.init(JE_AppletViewerPanel.java:48)
	at com.apple.mrj.JavaEmbedding.JE_AppletViewer.<init>(JE_AppletViewer.java:152)
	at
com.apple.mrj.JavaEmbedding.JE_AppletViewerFactory.createAppletViewer(JE_AppletViewerFactory.java:81)
	at
com.apple.mrj.JavaEmbedding.JE_AppletViewer.createWithAttributes(JE_AppletViewer.java:424)
	at com.apple.mrj.JavaEmbedding.JavaEmbedding.createApplet(JavaEmbedding.java:429)

If I change both the width and height to plain integers the applets will load
correctly but any percentage value causes the problem.

Interestingly, a lightly colored frame is drawn in the window and this frame
seems correctly sized (I've tried at 95% for example).

I'm running Panther (OS X 10.3)

Reproducible: Always

Steps to Reproduce:
1.Open a page with an applet tag with the width and/or height parameter set to a
percentage value (e.g. "100%")


Actual Results:  
The applet does not load.

Expected Results:  
The applet should load and run.

This bug happens with Netscape 7.1, Mozilla 1.5, Mozilla Firebird 0.7.1.

This bug DOES NOT happen with Camino 0.7.0, or Internet Exploiter 5.2 (Both of
which use the same Java Plugin (1.3.1)).
This can't be Java implemented plugins
Assignee: idk → joshua.xia
Component: Java-Implemented Plugins → Java: OJI
Could you point to a test page?  Is this an MRJ problem only?  Or also a problem
on OSes other than MacOS?

*** This bug has been marked as a duplicate of 211530 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
This is not a dup unless the page is in standards mode, and even then I'd not
expect Java exceptions....

Reporter, what is the doctype on the page?
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** Bug 224205 has been marked as a duplicate of this bug. ***
I had tried to re-open this with the following comment but bugzilla would not 
let me.  I resubmited it at bug 224205, which can be closed if this remains 
open. 
 
 -------------------------- 
 
This bug had been marked as a duplicate of 211530 which was marked as 
INVALID.  That would seem to indicate that this bug is invalid.  By what logic 
is this so?  
  
The HTML (4.01) spec defines that value of an attribute as a length which,    
"...may either be a pixel [count]; or a percentage of the available space". So    
clearly percentage values should be allowed.   The bug is reproducable on    
multiple systems so it's unlikley to be a configuration problem.    
    
This seems to be an OS-X problem (tested on both 10.2 and 10.3).    
The test cases both work correctly on Linux with Firebird 0.7. 
 
---------- 
 
The test cases 1 and 2 have no doctype specified but adding one makes no 
difference.   See:  http://homepage.mac.com/qeygh/applet3.html 
Keywords: pp
The test cases are: 
 
http://homepage.mac.com/qeygh/applet1.html --- works 
http://homepage.mac.com/qeygh/applet2.html --- fails 
Keywords: pp
Keywords: pp
I can confirm the described behaviour. This bug affects Mac OS X only.
This bug prevents E*Trade's MarketCaster applet from running, so there is a real
world case for this.  They use 100% for height.  They do not declare a doctype.
 According to the page properties rendering is in Quirks mode.

It would be great if someone with access would confirm this bug.
> They use 100% for height.  They do not declare a doctype.

URL?  Or attach the testcase to this bug using
http://bugzilla.mozilla.org/attachment.cgi?bugid=224129&action=enter ?

> It would be great if someone with access would confirm this bug.

Confirming it requires an actual testcase showing the bug.
Hi,

Unfortunately it's a member only feature (streams real time stock quotes for
your portfolio).  The test case in Comment #7 (second link) fails just as well
however.

Of possible interest: I just discovered that with the new Java Embedding Plugin
the second applet works, so there is a possible work-around.
> The test case in Comment #7 (second link) fails just as well however.

With what Mozilla build?  It works just fine here with a current Linux trunk
build.  The layout code that handles percent heights is identical on Linux and
OSX.  So if this is in fact an OSX-specific bug (per comment 8) then someone
with OSX who knows about Java needs to look at it.
Both Mozilla 1.7RC1 and Firefox 0.8 fail for me with the posted exception on Mac
OS X 10.3.3, but work fine on my Win2K and Linux boxes.
Summary: applet tags with width or height as percentage causes lossage. → On Mac, applet tags with width or height as percentage causes lossage.
Actually, some other browsers show the same bug.  However, regardless it
definitely should work in % when a CSS is used.  i.e.

<html>
<head>
<title>Example</title>
</head>
<body scroll="no" bgcolor="#ffffff" style="margin:0px 0px 0px 0px;border:0px none">
<applet 
style="border:0px none;margin:0px 0px 0px 0px;width:100%;height:100%;"
code="DjVuApplet.class" codebase="/java/" archive="javadjvu.jar" width="720"
height="480">
<param name="data" value="/papers/sdiut-2001/index.djvu">
A Java Enabled browser is required to view this page.
</applet></body></html>

However, a MacOSX user reported that in firefox, this page appeared at the
720x480 size.  So used the following workaround on my website:

<html>
<head>
<title>Example</title>
</head>
<body scroll="no" bgcolor="#ffffff" style="margin:0px 0px 0px 0px;border:0px none">
<script language="JavaScript"><!--
var uri="/papers/sdiut-2001/index.djvu";
var width=720, height=480;
var quote='"';
if(window && window.innerWidth)
{
  width=window.innerWidth;
  height=window.innerHeight;
}
else if(document.body && document.body.clientWidth)
{
  width=document.body.clientWidth;
  height=document.body.clientHeight;
}
document.writeln("<applet ");
document.writeln("style="+quote+"border:0px none;margin:0px 0px 0px
0px;width:100%;height:100%;"+quote+" code="+quote+"DjVuApplet.class"+quote+"
codebase="+quote+"/java/"+quote+" archive="+quote+"javadjvu.jar"+quote+"
width="+quote+(width-12)+quote+" height="+quote+(height-12)+quote+">");
document.writeln("<param name="+quote+"data"+quote+" value="+quote+uri+quote+">");
document.writeln("A Java Enabled browser is required to view this page.");
document.write("</applet>");
// --> </script><noscript>
<applet 
style="border:0px none;margin:0px 0px 0px 0px;width:100%;height:100%;"
code="DjVuApplet.class" codebase="/java/" archive="javadjvu.jar" width="720"
height="480">
<param name="data" value="/papers/sdiut-2001/index.djvu">
A Java Enabled browser is required to view this page.
</applet></noscript></body></html>

Bill
Same thing on Linux FC3 with FF 1.02 : APPLET tag's 'height' attribute, if
expressed in percentage, is ignored and defaults to something like 100px while
it works correctly for pixels. The same is true for object/embedded tags once
Sun's HtmlConverter has been applied.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Still an issue?
It's still an issue using Apple's Java Applet.plugin (using Firefox 1.0.7 and
a recent 1.8 branch build).  But the Java Embedding Plugin seems to fix the
problem.

I tested with the two URLs in comment #7.

stephen writes "The JEP never had this problem, and (as far as I can tell) neither did the MRJ Plugin Carbon.  Only Apple's old Java 1.3.1 plugin ever had it (and possibly still does)."

so take this to  mean mozilla not at fault
=> invalid
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago17 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.