Bug 16717 - mozilla plugin should draw with the visual from the NPWindow
Summary: mozilla plugin should draw with the visual from the NPWindow
Status: RESOLVED FIXED
Alias: None
Product: swfdec
Classification: Unclassified
Component: plugin (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: swfdec ml
QA Contact: swfdec ml
URL:
Whiteboard:
Keywords:
: 17093 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-14 21:45 UTC by Karl Tomlinson
Modified: 2008-08-16 10:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
draw to the visual from the NPWindow (8.04 KB, patch)
2008-07-14 21:45 UTC, Karl Tomlinson
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Tomlinson 2008-07-14 21:45:44 UTC
Created attachment 17678 [details] [review]
draw to the visual from the NPWindow

Currently the swfdec plugin draws with the visual from the browser toplevel window which is not necessarily appropriate for the Drawable of windowless plugins.  This can result in "BadMatch (invalid parameter attributes)" when the depths differ or colour confusion if the depths are the same but color masks differ.

Once this Mozilla bug is fixed, its test case can serve as a test case for this bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=445250

Even without non-unit opacity, it's possible there may be some Xserver/application configurations where the visual on the toplevel window differs from that used within Mozilla, which is gdk_rgb_get_colormap(), or other browser.
Comment 1 Riccardo Magliocchetti 2008-08-16 09:39:34 UTC
Just for reference, this patch break the plugin with webkit gtk 1.0.1, it looks like it is already fixed in webkit svn though: https://bugs.webkit.org/show_bug.cgi?id=19309.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb57e7720 (LWP 6895)]
0xb4bf5742 in plugin_set_window (instance=0xb4c79820, window=0xb4c79828)
    at plugin.c:398
398	    plugin_x11_setup_windowed (instance->pdata, (Window) window->window, 
(gdb) bt full
#0  0xb4bf5742 in plugin_set_window (instance=0xb4c79820, window=0xb4c79828)
    at plugin.c:398
No locals.
#1  0xb73cecdc in WebCore::PluginView::stop (this=0xb4c79700)
    at ../WebCore/plugins/gtk/PluginViewGtk.cpp:289
	streams = {m_impl = {static m_minTableSize = <optimized out>, 
    static m_maxLoad = <optimized out>, static m_minLoad = <optimized out>, 
    m_table = 0x0, m_tableSize = 0, m_tableSizeMask = 0, m_keyCount = 0, 
    m_deletedCount = 0}}
	dropAllLocks = {<WTFNoncopyable::Noncopyable> = {<No data fields>}, 
  m_lockCount = 0}
Comment 2 Riccardo Magliocchetti 2008-08-16 09:52:52 UTC
*** Bug 17093 has been marked as a duplicate of this bug. ***
Comment 3 Pekka Lampila 2008-08-16 10:38:37 UTC
Patch applied in git (373931a2f30088951659d3fb011ef9e6a09e9a36)

Thank you!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.