My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 527: Offscreen rendering does not respect Flash wmode when set to transparent
7 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  May 2012


Sign in to add a comment
 
Reported by faceinja...@gmail.com, Feb 14, 2012
What steps will reproduce the problem?
1. Create a Flash movie with a transparent background.
2. Embed it in an HTML page along the lines of <embed ... wmode="transparent">
3. Create a CEF browser with a CefWindowInfo enabling offscreen rendering and transparent painting.
4. Load the HTML page in the browser and retrieve the results from offscreen rendering.

What is the expected output? What do you see instead?

The expectation is that the web page in which the Flash is embedded will show through. Instead, the Flash is rendered with a black background, completely obscuring the web page.

What version of the product are you using? On what operating system?

CEF 1.963.439 on Windows 7 Professional 64-bit

Please provide any additional information below.

This problem does not manifest when offscreen rendering is disabled. The offending code can be found in BrowserWebViewDelegate::createPlugin in lib_cef/browser_webview_delegate.cc. When browser_->IsWindowRenderingDisabled() is true, force_windowless will be true, and this code will be run:

      if (flash) {
        new_names[size] = "wmode";
        new_values[size] = "opaque";
      } else if (silverlight) {
        new_names[size] = "windowless";
        new_values[size] = "true";
      }

This bashes over any "wmode" that may have been set in the HTML page. This is incorrect, since both "opaque" and "transparent" are valid windowless rendering modes. Indeed, simply changing "opaque" to "transparent" will allow the rendering of a transparent Flash to take place correctly. I have verified this by building a modified version of CEF with this change, though obviously it is not an optimal solution, since it would force all opaque Flashes to be transparent, just the opposite of what now occurs. It does show that the issue is not with rendering transparent flashes offscreen, just with how "wmode" is being handled by CEF.

This issue (https://code.google.com/p/chromiumembedded/issues/detail?id=214) has a link to this patch for berkelium (https://github.com/sirikata/berkelium/blob/chromium8/patches/chromium_wmode_opaque.patch) that identifies the right way to do this, I think. First, the incoming names and values should be checked to see if "wmode" is set to "transparent" or "opaque." If it is, no modification is necessary; it does not need to be forced windowless because it already is windowless. Only if the "wmode" is not "opaque" or "transparent" should the "wmode" be forced to "opaque." Windowed Flashes cannot be transparent anyway (as far as I am aware), so "opaque" should be the correct default when the "wmode" must be forced to a windowless mode, since any "wmode" other than "transparent" seems to imply full opacity.

Apr 2, 2012
Project Member #1 magreenb...@gmail.com
(No comment was entered for this change.)
Status: Accepted
May 22, 2012
Project Member #2 magreenb...@gmail.com
Thanks, fixed in revision 640.

Here's an example URL for testing wmode="transparent":
http://www.communitymx.com/content/source/E5141/wmodetrans.htm
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting