<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>35683</bug_id>
          
          <creation_ts>2010-03-03 07:14:42 -0800</creation_ts>
          <short_desc>[Qt] QWebView Transparency fails when Flash Plugin is initialized under Ubuntu 9.04 &amp; 9.10</short_desc>
          <delta_ts>2010-04-26 04:03:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35962</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tor Arne Vestbø">vestbo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>jturcotte</cc>
    
    <cc>kent.hansen</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>195556</commentid>
    <comment_count>0</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2010-03-03 07:14:42 -0800</bug_when>
    <thetext>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:

&lt;p&gt;(&amp;lt;unknown&amp;gt;:3122): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)&apos; failed&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&amp;#8212; Example Code&lt;/p&gt;

&lt;p&gt;QWebView *webView = new QWebView();&lt;br/&gt;
webView-&amp;gt;settings()-&amp;gt;setAttribute(QWebSettings::PluginsEnabled, true);&lt;/p&gt;

&lt;p&gt;webView-&amp;gt;setFixedSize(500,500);&lt;br/&gt;
webView-&amp;gt;setWindowFlags(Qt::FramelessWindowHint);&lt;/p&gt;

&lt;p&gt;QPalette palette = webView-&amp;gt;palette();&lt;br/&gt;
palette.setBrush(QPalette::Base, Qt::transparent);&lt;br/&gt;
webView-&amp;gt;page()-&amp;gt;setPalette(palette);&lt;br/&gt;
webView-&amp;gt;setAttribute(Qt::WA_OpaquePaintEvent, false);&lt;br/&gt;
webView-&amp;gt;setAttribute(Qt::WA_TranslucentBackground, true);&lt;/p&gt;

&lt;p&gt;QString filePath = &quot;mySWF.swf&quot;;&lt;br/&gt;
QString applicationName = &quot;myExample&quot;;&lt;/p&gt;

&lt;p&gt;QString htmlTemplate = QString( &quot;&amp;lt;html&amp;gt;&quot;&lt;br/&gt;
                                &quot;&amp;lt;body style =\&quot;margin: 0 0 0 0;\&quot; &amp;gt;&quot;&lt;br/&gt;
                                &quot;&amp;lt;object&amp;gt;&quot;&lt;br/&gt;
                                &quot;	&amp;lt;embed &quot;&lt;br/&gt;
                                &quot;		src = \&quot;%1\&quot; &quot;&lt;br/&gt;
                                &quot;		name = \&quot;%2\&quot; &quot;&lt;br/&gt;
                                &quot;		flashvars = \&quot;apppath=%3\&quot; &quot;&lt;br/&gt;
                                &quot;		width = \&quot;500\&quot; &quot;&lt;br/&gt;
                                &quot;		height = \&quot;500\&quot; &quot;&lt;br/&gt;
                                &quot;		menu = \&quot;true\&quot; &quot;&lt;br/&gt;
                                &quot;		quality = \&quot;best\&quot; &quot;&lt;br/&gt;
                                //&quot;		bgcolor = \&quot;#666666\&quot;&quot;&lt;br/&gt;
                                &quot;		seamlesstabbing = \&quot;true\&quot; &quot;&lt;br/&gt;
                                &quot;		wmode = \&quot;transparent\&quot;&quot; // window, opaque, transparent, direct, gpu&lt;br/&gt;
                                &quot;		allowfullscreen = \&quot;true\&quot;&quot;&lt;br/&gt;
                                &quot;		allowscriptaccess = \&quot;always\&quot;&quot;&lt;br/&gt;
                                &quot;		allownetworking = \&quot;all\&quot;&quot;&lt;br/&gt;
                                &quot;		type=\&quot;application/x-shockwave-flash\&quot;&amp;gt; &quot;&lt;br/&gt;
                                &quot;	&amp;lt;/embed&amp;gt;&quot;&lt;br/&gt;
                                &quot;&amp;lt;/object&amp;gt; &quot;&lt;br/&gt;
                                &quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;)&lt;br/&gt;
                                .arg(filePath)&lt;br/&gt;
                                .arg(QApplication::applicationDirPath())&lt;br/&gt;
                                .arg(applicationName);&lt;/p&gt;

&lt;p&gt;webView-&amp;gt;setWindowTitle(applicationName);&lt;br/&gt;
webView-&amp;gt;setHtml(htmlTemplate);&lt;br/&gt;
webView-&amp;gt;show();&lt;/p&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>200787</commentid>
    <comment_count>1</comment_count>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-03-17 08:04:49 -0700</bug_when>
    <thetext>(K)ubuntu 9.10, r55986, Qt 4.7:

(process:12843): Gtk-CRITICAL **: gtk_clipboard_get_for_display: assertion `display != NULL&apos; 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&apos; failed
Adobe Flash Player: gtk_clipboard_get(GDK_SELECTION_PRIMARY); failed. Trying to call gtk_init(0,0);

(&lt;unknown&gt;:12965): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)&apos; failed

and then a black view. No transparency.

On Mac I don&apos;t see anything with r55986 &amp; 4.7.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201018</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-03-17 15:58:14 -0700</bug_when>
    <thetext>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&apos;ed plugin. At that point there&apos;s no transparency unless you have ARGB visuals.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>216989</commentid>
    <comment_count>3</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2010-04-26 04:03:17 -0700</bug_when>
    <thetext>Resolving as won&apos;t fix.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>