Bug 35683

Summary: [Qt] QWebView Transparency fails when Flash Plugin is initialized under Ubuntu 9.04 & 9.10
Product: WebKit Reporter: Tor Arne Vestbø <vestbo>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: hausmann, jturcotte, kent.hansen
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 35962    

Tor Arne Vestbø
Reported 2010-03-03 07:14:42 PST
This bug report originated from issue QTBUG-5144 http://bugreports.qt.nokia.com/browse/QTBUG-5144 --- Description --- When a webview is set transparent, normal html content will be displayed on a transparent background. Once a flash player instance is loaded in the webview the transparency of the flash content is preserved, but the webview will not be transparent anymore. The Application output also throws an error: <p>(&lt;unknown&gt;:3122): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed</p> <p>This bug seems only to be Linux specific since it does not appear under windows or mac osx. This bug has been reproduced under Ubuntu 9.04 and 9.10 with Qt 4.5.3 aswell as 4.6.0 beta 1.</p> <p>&#8212; Example Code</p> <p>QWebView *webView = new QWebView();<br/> webView-&gt;settings()-&gt;setAttribute(QWebSettings::PluginsEnabled, true);</p> <p>webView-&gt;setFixedSize(500,500);<br/> webView-&gt;setWindowFlags(Qt::FramelessWindowHint);</p> <p>QPalette palette = webView-&gt;palette();<br/> palette.setBrush(QPalette::Base, Qt::transparent);<br/> webView-&gt;page()-&gt;setPalette(palette);<br/> webView-&gt;setAttribute(Qt::WA_OpaquePaintEvent, false);<br/> webView-&gt;setAttribute(Qt::WA_TranslucentBackground, true);</p> <p>QString filePath = "mySWF.swf";<br/> QString applicationName = "myExample";</p> <p>QString htmlTemplate = QString( "&lt;html&gt;"<br/> "&lt;body style =\"margin: 0 0 0 0;\" &gt;"<br/> "&lt;object&gt;"<br/> " &lt;embed "<br/> " src = \"%1\" "<br/> " name = \"%2\" "<br/> " flashvars = \"apppath=%3\" "<br/> " width = \"500\" "<br/> " height = \"500\" "<br/> " menu = \"true\" "<br/> " quality = \"best\" "<br/> //" bgcolor = \"#666666\""<br/> " seamlesstabbing = \"true\" "<br/> " wmode = \"transparent\"" // window, opaque, transparent, direct, gpu<br/> " allowfullscreen = \"true\""<br/> " allowscriptaccess = \"always\""<br/> " allownetworking = \"all\""<br/> " type=\"application/x-shockwave-flash\"&gt; "<br/> " &lt;/embed&gt;"<br/> "&lt;/object&gt; "<br/> "&lt;/body&gt;&lt;/html&gt;")<br/> .arg(filePath)<br/> .arg(QApplication::applicationDirPath())<br/> .arg(applicationName);</p> <p>webView-&gt;setWindowTitle(applicationName);<br/> webView-&gt;setHtml(htmlTemplate);<br/> webView-&gt;show();</p>
Attachments
Kent Hansen
Comment 1 2010-03-17 08:04:49 PDT
(K)ubuntu 9.10, r55986, Qt 4.7: (process:12843): Gtk-CRITICAL **: gtk_clipboard_get_for_display: assertion `display != NULL' failed Adobe Flash Player: gtk_clipboard_get(GDK_SELECTION_PRIMARY); failed. Trying to call gtk_init(0,0); and then a white view. No transparency. Same with 4.6. WebKit shipped with Qt 4.5: (process:12965): Gtk-CRITICAL **: gtk_clipboard_get_for_display: assertion `display != NULL' failed Adobe Flash Player: gtk_clipboard_get(GDK_SELECTION_PRIMARY); failed. Trying to call gtk_init(0,0); (<unknown>:12965): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed and then a black view. No transparency. On Mac I don't see anything with r55986 & 4.7.
Simon Hausmann
Comment 2 2010-03-17 15:58:14 PDT
I think this is a WONTFIX ;( If I understand/guess correctly ;) then the WebView will get backed up by an X11 window - due to the windowed x11embed'ed plugin. At that point there's no transparency unless you have ARGB visuals.
Jocelyn Turcotte
Comment 3 2010-04-26 04:03:17 PDT
Resolving as won't fix.
Note You need to log in before you can comment on or make changes to this bug.