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 Bugs | Assignee: | 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ø
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>(<unknown>: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>— Example Code</p>
<p>QWebView *webView = new QWebView();<br/>
webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);</p>
<p>webView->setFixedSize(500,500);<br/>
webView->setWindowFlags(Qt::FramelessWindowHint);</p>
<p>QPalette palette = webView->palette();<br/>
palette.setBrush(QPalette::Base, Qt::transparent);<br/>
webView->page()->setPalette(palette);<br/>
webView->setAttribute(Qt::WA_OpaquePaintEvent, false);<br/>
webView->setAttribute(Qt::WA_TranslucentBackground, true);</p>
<p>QString filePath = "mySWF.swf";<br/>
QString applicationName = "myExample";</p>
<p>QString htmlTemplate = QString( "<html>"<br/>
"<body style =\"margin: 0 0 0 0;\" >"<br/>
"<object>"<br/>
" <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\"> "<br/>
" </embed>"<br/>
"</object> "<br/>
"</body></html>")<br/>
.arg(filePath)<br/>
.arg(QApplication::applicationDirPath())<br/>
.arg(applicationName);</p>
<p>webView->setWindowTitle(applicationName);<br/>
webView->setHtml(htmlTemplate);<br/>
webView->show();</p>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kent Hansen
(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
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
Resolving as won't fix.