fabriciocs / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Attribute styleclass is not applied in FireFox #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Code at http://www.kroix.com/swfO/class.html displays correctly in IE6 &
7, but not Firefox
2.
3.

What is the expected output? What do you see instead?
Expected: Blue box with green line (as per IE), instead movie displays
transparent and div is not the specified class color.

What version of the product are you using? On what operating system?
SWFObject v2.0 rc4
IE6, 7
FF 2
Windows XP Pro SP2

Please provide any additional information below.

Original issue reported on code.google.com by goo...@hockeyclubhouse.com on 4 Mar 2008 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by bobbyvandersluis on 5 Mar 2008 at 9:02

GoogleCodeExporter commented 9 years ago
Thanks for the test page, this is great to reproduce/debug this issue!

Here's what I found.

Everything is written correctly into the web page. Your definition:

var flashvars = {};
var params = {};
params.wmode = "transparent";
var attributes = {};
attributes.styleclass = "testClass";
swfobject.embedSWF("test.swf", "testDiv", "430", "100", "8.0.0", false, 
flashvars, params, attributes);

Results in the following DOM snippet:

<object id="testDiv" class="testClass" width="430" height="100" 
type="application/x-shockwave-flash" 
data="test.swf">
<param name="wmode" value="transparent"/>
</object>

Only Firefox seems to have issues rendering this :-(

Also when you resize your window to a small size that makes the scrolbars move 
over your SWF, or open a tab 
and switch forth and back a bit, you can see all kinds of artefacts written 
behind your SWF.

So my conclusion is that Firefox has issues rendering wmode="transparent" 
correctly in some cases.

I don't think that from our point of view we can do much about this issue, 
besides submitting it to the Mozilla 
folks (my request is to keep your test page online for a while, so they can use 
it for their tests).

Original comment by bobbyvandersluis on 5 Mar 2008 at 9:45

GoogleCodeExporter commented 9 years ago
On a second thought, maybe the Mozilla interpretation is correct.

I mean, how much sense does the testcase make, when you explicitly define that 
your SWF has a transparent 
background-color, but in the end it doesn't have a transparent bg after all.

If you set a bg color on any container element (e.g. BODY or explicit DIV 
element) both the transparency and the 
bg 'shine through' work fine.

Original comment by bobbyvandersluis on 5 Mar 2008 at 10:58

GoogleCodeExporter commented 9 years ago
And to add: the height was applied already as it should be via the styleclass 
attribute.

Original comment by bobbyvandersluis on 5 Mar 2008 at 11:00

GoogleCodeExporter commented 9 years ago
The div is transparent, the white of the body does shine through, but if you 
apply a
class to the replaced div, inline or otherwise, the class and/or styles are not
applied... Even if you apply styles to the div directly and not through the 
attributes...

Original comment by goo...@hockeyclubhouse.com on 5 Mar 2008 at 4:21

GoogleCodeExporter commented 9 years ago
Incorrect, only the style rules for the bg are not applied, e.g. the height is.
Furthermore, in the DOM everything is written correctly.

Any styles applied to the DIV directly will be thrown away, because the DIV is
entirely replaced by the OBJECT element and only inherits the ID.

And I don't think that it is a Firefox bug, it is merely a specific 
interpretation.

Original comment by bobbyvandersluis on 5 Mar 2008 at 4:33