[Webkit-unassigned] [Bug 35683] New: [Qt] QWebView Transparency fails when Flash Plugin is initialized under Ubuntu 9.04 & 9.10

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 3 07:14:42 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=35683

           Summary: [Qt] QWebView Transparency fails when Flash Plugin is
                    initialized under Ubuntu 9.04 & 9.10
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vestbo at webkit.org


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>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list