Re: IE's AND EVERYONE ELSE'S object implementation problems (was RE: Baby Steps or Backwards Steps?)

On 8/21/07, Robert Burns <rob@robburns.com> wrote:
>
> On Aug 21, 2007, at 7:19 PM, Michael A. Puls II wrote:
>
> > On 8/21/07, Robert Burns <rob@robburns.com> wrote:
> >>
> >> On Aug 21, 2007, at 6:43 PM, Michael A. Puls II wrote:
> >>
> >>> On 8/21/07, L. David Baron <dbaron@dbaron.org> wrote:
> >>>> On Tuesday 2007-08-21 09:08 -0500, Robert Burns wrote:
> >>>>>  • Mozilla (2.0.0.6): Still images work fine: both small and
> >>>>> large.
> >>>>> Time-based media does not load except for the audio track, which
> >>>>> plays automatically on load.
> >>>>
> >>>> Object handling has been significantly rewritten on the trunk.  Try
> >>>> the latest Gran Paradiso alpha if you want to get a sense of
> >>>> current
> >>>> Mozilla behavior:
> >>>>   http://www.mozilla.org/projects/granparadiso/
> >>>
> >>> Yes. As in example:
> >>>
> >>> <object type="application/x-mplayer2" data="image.gif" width="300"
> >>> height="300"></object>
> >>>
> >>> FF2 would load the wmp plugin and have the wmp embed the image,
> >>> where
> >>> as in FF3 (and Opera), the type is ignored and the server type is
> >>> honored.
> >>
> >> But how do these latest versions work with the example I posted?
> >> [1][2]
> >
> > Works fine except that FF doesn't have default width and height styles
> > for plugins, so if you don't specify the dimensions, you can't see
> > them.
> >
> > FWIW, I like how Opera does goes with  a default width and height if
> > they're not specified.
>
> No, I don't think Opera or iCab are going with a default width and
> height. It looks to me like their extracting the intrinsic dimensions
> of the media and using that. That to me is what the behavior should
> be for all browsers.

For native handlers, Opera can figure out the intrinsic dimensions and
use those if none are specified on the object, which is good.

For plugins in Opera, it's a different story. If you don't specify the
width and height on the object, the object will be 150 x 150. The only
way that it won't be is if the loaded plugin detects the dimensions of
the media it's loading itself and resizes itself, but I'm not sure
what plugins do that.

For example:
<object type="application/x-mplayer2">wmp</object>
<object type="application/x-java-applet">java</object>
<object type="video/quicktime">quicktime</object>
<object type="application/x-shockwave-flash">flash</object>
<object type="audio/x-pn-realaudio-plugin">realplayer</object>
<object type="video/divx">divx</object>
<object type="application/x-vlc-plugin">videolan</object>
<object type="application/x-xstandard">xstandard</object>
<object type="application/x-tcl">tcl</object>

<script>
window.onload = function() {
    var obj = document.getElementsByTagName("object");
    for (var i = 0; i < obj.length; ++i) {
        alert(getComputedStyle(obj[i], null).getPropertyValue("width"));
        alert(getComputedStyle(obj[i], null).getPropertyValue("height"));
    }
};
</script>

In Opera, (assuming you have all those plugins), you'll get 150px for
every one. Now, even if you give the plugin a 400 x 400 video to load
for example, it'll still show as 150 x 150 unless the plugin resizes
itself on its own.

If so, FF would need something like (made up):

object:loaded { width: 150px; height: 150px;} in its default style sheet.

(I could be mistaken, but that's how it appears to me.)

-- 
Michael

Received on Wednesday, 22 August 2007 03:45:27 UTC