Commit 435f1a32 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2010-12-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>

        Reviewed by Martin Robinson.

        Full page size flash plugins do not show in all situations
        https://bugs.webkit.org/show_bug.cgi?id=47742

        This patch moves the plugin widget size allocation after the
        NPP_SetWindow is called with the effect that the resize of Flash
        content no longer result in grey flash. This seems logical since the
        widget tree cannot be fully constructed before the plugin receives
        the new container window.

        Test: manual-tests/plugins/gtk-windowed-grey-glitch.html

        * plugins/gtk/PluginViewGtk.cpp:
        (WebCore::PluginView::setNPWindowIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2a3ea472
2010-12-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Reviewed by Martin Robinson.
Full page size flash plugins do not show in all situations
https://bugs.webkit.org/show_bug.cgi?id=47742
This patch moves the plugin widget size allocation after the
NPP_SetWindow is called with the effect that the resize of Flash
content no longer result in grey flash. This seems logical since the
widget tree cannot be fully constructed before the plugin receives
the new container window.
Test: manual-tests/plugins/gtk-windowed-grey-glitch.html
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::setNPWindowIfNeeded):
2010-12-08 David Hyatt <hyatt@apple.com>
Reviewed by Simon Fraser.
......
<html>
<script type="text/javascript">
function openFullScreenFlash() {
window.open("test.swf","","width=200,height=200");
}
</script>
<head>
<title>Test grey glitch with fullscreen Flash animation (but 47742)</title>
</head>
<body>
<p>This manual test is used to test <a href="https://bugs.webkit.org/show_bug.cgi?id=47742">bug 47742</a>.</p>
<ul>
<li>1. Click on the button to open popup with full screen flash animation.</li>
<li>2. Make sure the popup content is not grey.</li>
<li>3. Resize the popup. </li>
<li>4. Make sure the resize does not produce grey flash (especially when scaling down).</li>
</ul>
<input type="button" value="Open fullscreen Flash" onclick="openFullScreenFlash();"/>
</body>
</html>
......@@ -492,15 +492,6 @@ void PluginView::setNPWindowIfNeeded()
m_npWindow.clipRect.top = max(0, m_clipRect.y());
m_npWindow.clipRect.right = m_clipRect.x() + m_clipRect.width();
m_npWindow.clipRect.bottom = m_clipRect.y() + m_clipRect.height();
GtkAllocation allocation = { m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height() };
gtk_widget_size_allocate(platformPluginWidget(), &allocation);
#if defined(XP_UNIX)
if (!m_needsXEmbed) {
gtk_xtbin_set_position(GTK_XTBIN(platformPluginWidget()), m_windowRect.x(), m_windowRect.y());
gtk_xtbin_resize(platformPluginWidget(), m_windowRect.width(), m_windowRect.height());
}
#endif
} else {
m_npWindow.x = 0;
m_npWindow.y = 0;
......@@ -519,6 +510,17 @@ void PluginView::setNPWindowIfNeeded()
m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow);
setCallingPlugin(false);
PluginView::setCurrentPluginView(0);
if (m_isWindowed) {
GtkAllocation allocation = { m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height() };
gtk_widget_size_allocate(platformPluginWidget(), &allocation);
#if defined(XP_UNIX)
if (!m_needsXEmbed) {
gtk_xtbin_set_position(GTK_XTBIN(platformPluginWidget()), m_windowRect.x(), m_windowRect.y());
gtk_xtbin_resize(platformPluginWidget(), m_windowRect.width(), m_windowRect.height());
}
#endif
}
}
void PluginView::setParentVisible(bool visible)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment