This project is archived and is in readonly mode.

#473 ✓resolved
Brenton

Swiff - default wMode should be 'window,' not 'transparent'

Reported by Brenton | November 14th, 2008 @ 07:58 PM | in 1.3.0 rc2 (closed)

The default wMode for Utilities.Swiff is transparent. It should be window.

There are two reasons for this:

  • The default if you don't specify a wmode in HTML is window. Changing the expected default behavior is rarely a good thing.

-Transparent is bad for the web. Setting wmode to transparent changes the way Flash interacts with the browser. Flash will continue to run at full-throttle even if it is in a background tab when transparent is set. The abuse of transparent leads to a slow experience for many web users.

There are certainly situations where transparent is necessary, but most of the time window works just fine. Resetting wmode back to window reduces the number of sites that abuse transparent wmode and leads to a faster web for us all. =)

Citation: http://www.kaourantin.net/2008/0... -Tinic Uro, a performance specialist on the Flash Player team

Comments and changes to this ticket

  • Brenton

    Brenton January 29th, 2009 @ 03:01 AM

    • Assigned user changed from “Valerio” to “Yuffster”

    I made a patch! =)

  • Valerio

    Valerio January 29th, 2009 @ 07:12 AM

    • Tag changed from leak, optimization, swiff, wmode to leak, optimization, patch, swiff, wmode
    • Assigned user changed from “Yuffster” to “Valerio”
  • Valerio

    Valerio February 18th, 2009 @ 03:46 AM

    • State changed from “new” to “open”
  • Fábio M. Costa

    Fábio M. Costa June 10th, 2010 @ 01:56 AM

    • State changed from “open” to “wontfix”

    This won't change, ppl comming to mootools won't be able to get transparent background at first and may get frustrated. Not to mention that it can break the visual of sites out there.

  • Brenton

    Brenton June 10th, 2010 @ 02:16 AM

    SWFs aren't supposed to have transparent stages. It's a feature that some people use, but it's certainly not default behavior. I'm a bit baffled that your justification is that "ppl comming to mootools won't be able to get transparent background at first and may get frustrated." Honestly, as a Flash user I find it more frustrating and confusing that the default behavior in MooTools is different than the default behavior for the embed tag. It's definitely unintuitive.

    I will agree that there could be cases of existing MooTools users relying on transparent being the default. If they upgraded, they'd have to explicitly request transparency.

    You've no doubt heard Flash get thrown under the bus lately. Plenty of HTML5 supports are spreading FUD about Flash. They're complaining about Flash's resource usage, especially as the mobile web becomes more popular. Ignorant decisions like MooTools choice of wmode lead to poorly-performing sites and frustrated end-users. Honestly, I suspect there are more MooTools developers wasting resources unnecessarily with a transparent wmode than there are who rely on transparent and don't know how to set the wmode explicitly.

  • Fábio M. Costa

    Fábio M. Costa June 10th, 2010 @ 02:35 AM

    Thank you Brendon. The opinion i just gave was all mine, i didn't talk to anybody about this.
    I hope people will read your points and consider the change. I'll talk to them.
    I just meant that we don't want to change too much from 1.2 to 1.3.
    Peace.

  • Brenton

    Brenton June 10th, 2010 @ 02:41 AM

    Thanks. Can we please drop the wontfix tag until this has been properly considered?

  • Fábio M. Costa

    Fábio M. Costa June 10th, 2010 @ 02:44 AM

    • State changed from “wontfix” to “open”

    Sure, sure.

  • gonchuki

    gonchuki June 10th, 2010 @ 05:15 PM

    this looks much like another case where the compatibility layer can retain old functionality, and implement an improved (and more desirable) default on Moo.
    Transparent/Opaque are always more expensive as the flash runtime have to do composition between its output and what's behind it. You can check this article from a Flash Player dev that shows how transparent/opaque will affect the rendering of Flash 10.1 on the Mac -> http://www.kaourantin.net/2010/02/core-animation.html (this also applies to the general case, composing flash over the background === slow)

  • Fábio M. Costa

    Fábio M. Costa June 11th, 2010 @ 03:45 AM

    • Milestone changed from 2.0 to 1.3.0 rc2

    OK Brenton, applied your patch, let's wait for the pull:

    http://github.com/fabiomcosta/mootools-core/commit/72b7cf65a1fe4df8...

    Thanks again.

  • Thomas Aylott

    Thomas Aylott July 7th, 2010 @ 01:34 AM

    • State changed from “open” to “resolved”
    • Milestone order changed from “0” to “0”
  • Fábio M. Costa

    Fábio M. Costa July 7th, 2010 @ 01:40 AM

    cool, changed for 1.3. Thanks again.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Attachments

Referenced by

Pages