2007-12-17 Jon Honeycutt <jhoneycutt@apple.com>
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 19:48:29 +0000 (19:48 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 19:48:29 +0000 (19:48 +0000)
        Reviewed by Darin.

        <rdar://problem/5651291> REGRESSION: Flash content doesn't display
        (www.adobe.com)

        We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
        NPEvent*
        (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
        (WebCore::PluginViewWin::handleKeyboardEvent): same
        (WebCore::PluginViewWin::handleMouseEvent): same
        * plugins/win/PluginViewWin.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28816 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/plugins/win/PluginViewWin.cpp
WebCore/plugins/win/PluginViewWin.h

index 02d5a4e6a8df5cd900e7c790c6968d7e079363cb..937c39c9f396cc9b8d860751c44b9d8d04e75083 100644 (file)
@@ -1,3 +1,20 @@
+2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
+
+        Reviewed by Darin.
+
+        <rdar://problem/5651291> REGRESSION: Flash content doesn't display
+        (www.adobe.com)
+
+        We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
+
+        * plugins/win/PluginViewWin.cpp:
+        (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
+        NPEvent*
+        (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
+        (WebCore::PluginViewWin::handleKeyboardEvent): same
+        (WebCore::PluginViewWin::handleMouseEvent): same
+        * plugins/win/PluginViewWin.h:
+
 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index c4087e892f94383e89c0888a419626d4b7fe055d..ae2cb0ccc56074e0a205d7c15c8ede44ff13bab4 100644 (file)
@@ -438,14 +438,14 @@ void PluginViewWin::paintMissingPluginIcon(GraphicsContext* context, const IntRe
     context->restore();
 }
 
-bool PluginViewWin::dispatchNPEvent(NPEvent* npEvent)
+bool PluginViewWin::dispatchNPEvent(NPEvent& npEvent)
 {
     if (!m_plugin->pluginFuncs()->event)
         return true;
 
     bool shouldPop = false;
 
-    if (m_plugin->pluginFuncs()->version < NPVERS_HAS_POPUPS_ENABLED_STATE && isWindowsMessageUserGesture(npEvent->event)) {
+    if (m_plugin->pluginFuncs()->version < NPVERS_HAS_POPUPS_ENABLED_STATE && isWindowsMessageUserGesture(npEvent.event)) {
         pushPopupsEnabledState(true);
         shouldPop = true;
     }
@@ -502,7 +502,7 @@ void PluginViewWin::paint(GraphicsContext* context, const IntRect& rect)
     npEvent.lParam = reinterpret_cast<uint32>(&windowpos);
     npEvent.wParam = 0;
 
-    dispatchNPEvent(&npEvent);
+    dispatchNPEvent(npEvent);
 
     setNPWindowRect(frameGeometry());
 
@@ -513,7 +513,7 @@ void PluginViewWin::paint(GraphicsContext* context, const IntRect& rect)
     // ignores it so we just pass null.
     npEvent.lParam = 0;
 
-    dispatchNPEvent(&npEvent);
+    dispatchNPEvent(npEvent);
 
     context->releaseWindowsContext(hdc);
 }
@@ -533,7 +533,7 @@ void PluginViewWin::handleKeyboardEvent(KeyboardEvent* event)
     }
 
     KJS::JSLock::DropAllLocks;
-    if (!dispatchNPEvent(&npEvent))
+    if (!dispatchNPEvent(npEvent))
         event->setDefaultHandled();
 }
 
@@ -605,7 +605,7 @@ void PluginViewWin::handleMouseEvent(MouseEvent* event)
     HCURSOR currentCursor = ::GetCursor();
 
     KJS::JSLock::DropAllLocks;
-    if (!dispatchNPEvent(&npEvent))
+    if (!dispatchNPEvent(npEvent))
         event->setDefaultHandled();
 
     // Currently, Widget::setCursor is always called after this function in EventHandler.cpp
index 878d3dee854e05730d874d4d8f330e6630ae7704..d946d8b16c35809b3fecf4f559d8403d25a181b1 100644 (file)
@@ -172,7 +172,7 @@ namespace WebCore {
         void popPopupsStateTimerFired(Timer<PluginViewWin>*);
         Timer<PluginViewWin> m_popPopupsStateTimer;
 
-        bool dispatchNPEvent(NPEvent*);
+        bool dispatchNPEvent(NPEvent&);
         OwnPtr<PluginMessageThrottlerWin> m_messageThrottler;
 
         void updateWindow() const;