diff options
Diffstat (limited to 'WebCore/plugins/win/PluginViewWin.cpp')
-rw-r--r-- | WebCore/plugins/win/PluginViewWin.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp index 96fa9e4..1765939 100644 --- a/WebCore/plugins/win/PluginViewWin.cpp +++ b/WebCore/plugins/win/PluginViewWin.cpp @@ -524,23 +524,14 @@ void PluginView::paintIntoTransformedContext(HDC hdc) m_npWindow.type = NPWindowTypeDrawable; m_npWindow.window = hdc; - WINDOWPOS windowpos = { 0 }; + WINDOWPOS windowpos = { 0, 0, 0, 0, 0, 0, 0 }; -#if OS(WINCE) IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(frameRect()); windowpos.x = r.x(); windowpos.y = r.y(); windowpos.cx = r.width(); windowpos.cy = r.height(); -#else - IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(frameRect().location()); - - windowpos.x = p.x(); - windowpos.y = p.y(); - windowpos.cx = frameRect().width(); - windowpos.cy = frameRect().height(); -#endif NPEvent npEvent; npEvent.event = WM_WINDOWPOSCHANGED; @@ -610,6 +601,10 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) if (context->paintingDisabled()) return; + // Ensure that we have called SetWindow before we try to paint. + if (!m_haveCalledSetWindow) + setNPWindowRect(frameRect()); + if (m_isWindowed) { #if !OS(WINCE) if (context->shouldIncludeChildWindows()) @@ -815,6 +810,8 @@ void PluginView::setNPWindowRect(const IntRect& rect) m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow); setCallingPlugin(false); + m_haveCalledSetWindow = true; + if (!m_isWindowed) return; |