summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins/win
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/plugins/win')
-rw-r--r--WebCore/plugins/win/PluginMessageThrottlerWin.cpp4
-rw-r--r--WebCore/plugins/win/PluginViewWin.cpp17
2 files changed, 9 insertions, 12 deletions
diff --git a/WebCore/plugins/win/PluginMessageThrottlerWin.cpp b/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
index 46fee62..dd1f05b 100644
--- a/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
+++ b/WebCore/plugins/win/PluginMessageThrottlerWin.cpp
@@ -45,9 +45,9 @@ static const double MessageThrottleTimeInterval = 0.016;
static const double MessageDirectProcessingInterval = 0.005;
PluginMessageThrottlerWin::PluginMessageThrottlerWin(PluginView* pluginView)
- : m_back(0)
+ : m_pluginView(pluginView)
+ , m_back(0)
, m_front(0)
- , m_pluginView(pluginView)
, m_lastMessageTime(0)
, m_messageThrottleTimer(this, &PluginMessageThrottlerWin::messageThrottleTimerFired)
{
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;