Commit 6ba845ca authored by andersca@apple.com's avatar andersca@apple.com

Deliver mouse and wheel events to plug-ins

https://bugs.webkit.org/show_bug.cgi?id=42988

Reviewed by Sam Weinig.

* Shared/WebEvent.h:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::deltaX):
(WebKit::WebMouseEvent::deltaY):
(WebKit::WebMouseEvent::deltaZ):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
Add deltaX, deltaY and deltaZ member variables to WebMosueEvent.

* WebKit2.xcodeproj/project.pbxproj:
Rename NetscapePluginMac.cpp to NetscapePluginMac.mm.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NPP_HandleEvent):
Add NPP_ wrapper.

(WebKit::NetscapePlugin::handleMouseEvent):
(WebKit::NetscapePlugin::handleWheelEvent):
Call the platform variants.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added.
(WebKit::modifierFlags):
(WebKit::buttonNumber):
(WebKit::initializeMouseEvent):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
Create an NPCocoaEvent and send it to the plug-in.

(WebKit::NetscapePlugin::platformHandleWheelEvent):
Ditto.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
Get the current WebEvent and send it to the plug-in if necessary.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::currentEvent):
(WebKit::CurrentEvent::CurrentEvent):
(WebKit::CurrentEvent::~CurrentEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
* WebProcess/WebPage/WebPage.h:
Add RAII object for keeping track of the current event.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7c5d40d2
......@@ -23,6 +23,57 @@
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
2010-07-26 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Deliver mouse and wheel events to plug-ins
https://bugs.webkit.org/show_bug.cgi?id=42988
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::deltaX):
(WebKit::WebMouseEvent::deltaY):
(WebKit::WebMouseEvent::deltaZ):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
Add deltaX, deltaY and deltaZ member variables to WebMosueEvent.
* WebKit2.xcodeproj/project.pbxproj:
Rename NetscapePluginMac.cpp to NetscapePluginMac.mm.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NPP_HandleEvent):
Add NPP_ wrapper.
(WebKit::NetscapePlugin::handleMouseEvent):
(WebKit::NetscapePlugin::handleWheelEvent):
Call the platform variants.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added.
(WebKit::modifierFlags):
(WebKit::buttonNumber):
(WebKit::initializeMouseEvent):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
Create an NPCocoaEvent and send it to the plug-in.
(WebKit::NetscapePlugin::platformHandleWheelEvent):
Ditto.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
Get the current WebEvent and send it to the plug-in if necessary.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::currentEvent):
(WebKit::CurrentEvent::CurrentEvent):
(WebKit::CurrentEvent::~CurrentEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
* WebProcess/WebPage/WebPage.h:
Add RAII object for keeping track of the current event.
2010-07-26 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -120,13 +120,16 @@ public:
{
}
WebMouseEvent(Type type, Button button, int x, int y, int globalX, int globalY, int clickCount, Modifiers modifiers, double timestamp)
WebMouseEvent(Type type, Button button, int x, int y, int globalX, int globalY, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp)
: WebEvent(type, modifiers, timestamp)
, m_button(button)
, m_positionX(x)
, m_positionY(y)
, m_globalPositionX(globalX)
, m_globalPositionY(globalY)
, m_deltaX(deltaX)
, m_deltaY(deltaY)
, m_deltaZ(deltaZ)
, m_clickCount(clickCount)
{
ASSERT(isMouseEventType(type));
......@@ -137,6 +140,9 @@ public:
int positionY() const { return m_positionY; }
int globalPositionX() const { return m_globalPositionX; }
int globalPositionY() const { return m_globalPositionY; }
float deltaX() const { return m_deltaX; }
float deltaY() const { return m_deltaY; }
float deltaZ() const { return m_deltaZ; }
int clickCount() const { return m_clickCount; }
void encode(CoreIPC::ArgumentEncoder& encoder) const
......@@ -160,6 +166,9 @@ private:
int m_positionY;
int m_globalPositionX;
int m_globalPositionY;
float m_deltaX;
float m_deltaY;
float m_deltaZ;
int m_clickCount;
};
......
......@@ -963,11 +963,14 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSView *windo
int positionY = position.y;
int globalPositionX = globalPosition.x;
int globalPositionY = globalPosition.y;
float deltaX = [event deltaX];
float deltaY = [event deltaY];
float deltaZ = [event deltaZ];
int clickCount = clickCountForEvent(event);
WebEvent::Modifiers modifiers = modifiersForEvent(event);
double timestamp = [event timestamp];
return WebMouseEvent(type, button, positionX, positionY, globalPositionX, globalPositionY, clickCount, modifiers, timestamp);
return WebMouseEvent(type, button, positionX, positionY, globalPositionX, globalPositionY, deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp);
}
WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windowView)
......
......@@ -403,7 +403,7 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(HWND hWnd, UINT message, WPAR
int clickCount = WebKit::clickCount(type, button, positionX, positionY, timestamp);
WebEvent::Modifiers modifiers = modifiersForEvent(wParam);
return WebMouseEvent(type, button, positionX, positionY, globalPositionX, globalPositionY, clickCount, modifiers, timestamp);
return WebMouseEvent(type, button, positionX, positionY, globalPositionX, globalPositionY, 0, 0, 0, clickCount, modifiers, timestamp);
}
WebWheelEvent WebEventFactory::createWebWheelEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
......
......@@ -73,7 +73,7 @@
1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */; };
1AADE6FF10D855FC00D3D63D /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AADE6FE10D855FC00D3D63D /* ApplicationServices.framework */; };
1AE117F611DBB30900981615 /* ProcessLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE117F511DBB30900981615 /* ProcessLauncher.cpp */; };
1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.cpp */; };
1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */; };
1AEFCC1211D01F96008219D3 /* PluginInfoStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEFCC1011D01F96008219D3 /* PluginInfoStore.h */; };
1AEFCC1311D01F96008219D3 /* PluginInfoStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AEFCC1111D01F96008219D3 /* PluginInfoStore.cpp */; };
1AEFCCBD11D02C5E008219D3 /* PluginInfoStoreMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEFCCBC11D02C5E008219D3 /* PluginInfoStoreMac.mm */; };
......@@ -358,7 +358,7 @@
1AA5889111EE70400061B882 /* NetscapePluginStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePluginStream.cpp; sourceTree = "<group>"; };
1AADE6FE10D855FC00D3D63D /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; };
1AE117F511DBB30900981615 /* ProcessLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessLauncher.cpp; sourceTree = "<group>"; };
1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePluginMac.cpp; sourceTree = "<group>"; };
1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetscapePluginMac.mm; sourceTree = "<group>"; };
1AEFCC1011D01F96008219D3 /* PluginInfoStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginInfoStore.h; sourceTree = "<group>"; };
1AEFCC1111D01F96008219D3 /* PluginInfoStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginInfoStore.cpp; sourceTree = "<group>"; };
1AEFCCBC11D02C5E008219D3 /* PluginInfoStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginInfoStoreMac.mm; sourceTree = "<group>"; };
......@@ -708,7 +708,7 @@
1A6FBA0111E6812B00DB1371 /* mac */ = {
isa = PBXGroup;
children = (
1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.cpp */,
1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */,
1A6FBA0211E6813E00DB1371 /* NetscapePluginModuleMac.cpp */,
);
path = mac;
......@@ -1401,7 +1401,7 @@
0F5265BC11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm in Sources */,
1A6FBA2B11E6862700DB1371 /* NetscapeBrowserFuncs.cpp in Sources */,
1A6FBD2911E69BC200DB1371 /* NetscapePlugin.cpp in Sources */,
1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.cpp in Sources */,
1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
1A6FB90C11E66FBC00DB1371 /* NetscapePluginModule.cpp in Sources */,
1A6FBA0311E6813E00DB1371 /* NetscapePluginModuleMac.cpp in Sources */,
1AA5889311EE70400061B882 /* NetscapePluginStream.cpp in Sources */,
......
......@@ -95,4 +95,14 @@ void DummyPlugin::streamDidFail(uint64_t streamID, bool wasCancelled)
{
}
bool DummyPlugin::handleMouseEvent(const WebMouseEvent&)
{
return false;
}
bool DummyPlugin::handleWheelEvent(const WebWheelEvent&)
{
return false;
}
} // namespace WebKit
......@@ -54,7 +54,9 @@ private:
virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
virtual void streamDidFinishLoading(uint64_t streamID);
virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
virtual bool handleMouseEvent(const WebMouseEvent&);
virtual bool handleWheelEvent(const WebWheelEvent&);
virtual PluginController* controller();
};
......
......@@ -205,6 +205,11 @@ int32_t NetscapePlugin::NPP_Write(NPStream* stream, int32_t offset, int32_t len,
return m_pluginModule->pluginFuncs().write(&m_npp, stream, offset, len, buffer);
}
int16_t NetscapePlugin::NPP_HandleEvent(void* event)
{
return m_pluginModule->pluginFuncs().event(&m_npp, event);
}
void NetscapePlugin::NPP_URLNotify(const char* url, NPReason reason, void* notifyData)
{
m_pluginModule->pluginFuncs().urlnotify(&m_npp, url, reason, notifyData);
......@@ -408,6 +413,16 @@ void NetscapePlugin::streamDidFail(uint64_t streamID, bool wasCancelled)
pluginStream->didFail(wasCancelled);
}
bool NetscapePlugin::handleMouseEvent(const WebMouseEvent& mouseEvent)
{
return platformHandleMouseEvent(mouseEvent);
}
bool NetscapePlugin::handleWheelEvent(const WebWheelEvent& wheelEvent)
{
return platformHandleWheelEvent(wheelEvent);
}
PluginController* NetscapePlugin::controller()
{
return m_pluginController;
......
......@@ -74,9 +74,9 @@ public:
NPError NPP_NewStream(NPMIMEType, NPStream*, NPBool seekable, uint16_t* stype);
NPError NPP_DestroyStream(NPStream*, NPReason);
void NPP_StreamAsFile(NPStream*, const char* filename);
int32_t NPP_WriteReady(NPStream*);
int32_t NPP_Write(NPStream*, int32_t offset, int32_t len, void* buffer);
int16_t NPP_HandleEvent(void* event);
void NPP_URLNotify(const char* url, NPReason, void* notifyData);
NPError NPP_GetValue(NPPVariable, void *value);
......@@ -92,6 +92,9 @@ private:
bool platformPostInitialize();
void platformPaint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
bool platformHandleMouseEvent(const WebMouseEvent&);
bool platformHandleWheelEvent(const WebWheelEvent&);
// Plugin
virtual bool initialize(PluginController*, const Parameters&);
virtual void destroy();
......@@ -105,6 +108,8 @@ private:
virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
virtual void streamDidFinishLoading(uint64_t streamID);
virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
virtual bool handleMouseEvent(const WebMouseEvent&);
virtual bool handleWheelEvent(const WebWheelEvent&);
virtual PluginController* controller();
......@@ -145,6 +150,17 @@ inline bool NetscapePlugin::platformPostInitialize()
inline void NetscapePlugin::platformPaint(WebCore::GraphicsContext*, const WebCore::IntRect&)
{
}
bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent&)
{
return false;
}
bool NetscapePlugin::platformHandleWheelEvent(const WebWheelEvent&)
{
return false;
}
#endif
} // namespace WebKit
......
......@@ -25,6 +25,8 @@
#include "NetscapePlugin.h"
#include <AppKit/AppKit.h>
#include "WebEvent.h"
#include <WebCore/GraphicsContext.h>
using namespace WebCore;
......@@ -136,7 +138,7 @@ void NetscapePlugin::platformPaint(GraphicsContext* context, const IntRect& dirt
event.data.draw.width = dirtyRect.width();
event.data.draw.height = dirtyRect.height();
m_pluginModule->pluginFuncs().event(&m_npp, &event);
NPP_HandleEvent(&event);
break;
}
......@@ -145,4 +147,112 @@ void NetscapePlugin::platformPaint(GraphicsContext* context, const IntRect& dirt
}
}
static uint32_t modifierFlags(const WebEvent& event)
{
uint32_t modifiers = 0;
if (event.shiftKey())
modifiers |= NSShiftKeyMask;
if (event.controlKey())
modifiers |= NSControlKeyMask;
if (event.altKey())
modifiers |= NSAlternateKeyMask;
if (event.metaKey())
modifiers |= NSCommandKeyMask;
return modifiers;
}
static int32_t buttonNumber(WebMouseEvent::Button button)
{
switch (button) {
case WebMouseEvent::NoButton:
case WebMouseEvent::LeftButton:
return 0;
case WebMouseEvent::RightButton:
return 1;
case WebMouseEvent::MiddleButton:
return 2;
}
ASSERT_NOT_REACHED();
return -1;
}
static NPCocoaEvent initializeMouseEvent(const WebMouseEvent& mouseEvent, const WebCore::IntPoint& pluginLocation)
{
NPCocoaEventType eventType;
switch (mouseEvent.type()) {
case WebEvent::MouseDown:
eventType = NPCocoaEventMouseDown;
break;
case WebEvent::MouseUp:
eventType = NPCocoaEventMouseUp;
break;
case WebEvent::MouseMove:
if (mouseEvent.button() == WebMouseEvent::NoButton)
eventType = NPCocoaEventMouseMoved;
else
eventType = NPCocoaEventMouseDragged;
break;
default:
ASSERT_NOT_REACHED();
return NPCocoaEvent();
}
NPCocoaEvent event = initializeEvent(eventType);
event.data.mouse.modifierFlags = modifierFlags(mouseEvent);
event.data.mouse.pluginX = mouseEvent.positionX() - pluginLocation.x();
event.data.mouse.pluginY = mouseEvent.positionY() - pluginLocation.y();
event.data.mouse.buttonNumber = buttonNumber(mouseEvent.button());
event.data.mouse.clickCount = mouseEvent.clickCount();
event.data.mouse.deltaX = mouseEvent.deltaX();
event.data.mouse.deltaY = mouseEvent.deltaY();
event.data.mouse.deltaZ = mouseEvent.deltaZ();
return event;
}
bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent& mouseEvent)
{
switch (m_eventModel) {
case NPEventModelCocoa: {
NPCocoaEvent event = initializeMouseEvent(mouseEvent, m_frameRect.location());
return NPP_HandleEvent(&event);
}
default:
ASSERT_NOT_REACHED();
}
return false;
}
bool NetscapePlugin::platformHandleWheelEvent(const WebWheelEvent& wheelEvent)
{
switch (m_eventModel) {
case NPEventModelCocoa: {
NPCocoaEvent event = initializeEvent(NPCocoaEventScrollWheel);
event.data.mouse.modifierFlags = modifierFlags(wheelEvent);
event.data.mouse.pluginX = wheelEvent.positionX() - m_frameRect.x();
event.data.mouse.pluginY = wheelEvent.positionY() - m_frameRect.y();
event.data.mouse.buttonNumber = 0;
event.data.mouse.clickCount = 0;
event.data.mouse.deltaX = wheelEvent.deltaX();
event.data.mouse.deltaY = wheelEvent.deltaY();
event.data.mouse.deltaZ = 0;
return NPP_HandleEvent(&event);
}
default:
ASSERT_NOT_REACHED();
}
return false;
}
} // namespace WebKit
......@@ -37,6 +37,9 @@ namespace WebCore {
namespace WebKit {
class WebMouseEvent;
class WebWheelEvent;
class PluginController;
class Plugin : public RefCounted<Plugin> {
......@@ -86,6 +89,12 @@ public:
// Tells the plug-in that a stream has failed to load, either because of network errors or because the load was cancelled.
virtual void streamDidFail(uint64_t streamID, bool wasCancelled) = 0;
// Tells the plug-in to handle the passed in mouse event. The plug-in should return true if it processed the event.
virtual bool handleMouseEvent(const WebMouseEvent&) = 0;
// Tells the plug-in to handle the passed in wheel event. The plug-in should return true if it processed the event.
virtual bool handleWheelEvent(const WebWheelEvent&) = 0;
// Returns the plug-in controller for this plug-in.
// FIXME: We could just have the controller be a member variable of Plugin.
virtual PluginController* controller() = 0;
......
......@@ -26,6 +26,8 @@
#include "PluginView.h"
#include "Plugin.h"
#include "WebEvent.h"
#include "WebPage.h"
#include <WebCore/DocumentLoader.h>
#include <WebCore/Event.h>
#include <WebCore/FrameLoadRequest.h>
......@@ -318,9 +320,26 @@ void PluginView::setParent(ScrollView* scrollView)
viewGeometryDidChange();
}
void PluginView::handleEvent(Event*)
void PluginView::handleEvent(Event* event)
{
// FIXME: Implement.
const WebEvent* currentEvent = WebPage::currentEvent();
if (!currentEvent)
return;
bool didHandleEvent = false;
if ((event->type() == eventNames().mousemoveEvent && currentEvent->type() == WebEvent::MouseMove)
|| (event->type() == eventNames().mousedownEvent && currentEvent->type() == WebEvent::MouseDown)
|| (event->type() == eventNames().mouseupEvent && currentEvent->type() == WebEvent::MouseUp)) {
// We have a mouse event.
didHandleEvent = m_plugin->handleMouseEvent(static_cast<const WebMouseEvent&>(*currentEvent));
} else if (event->type() == eventNames().mousewheelEvent && currentEvent->type() == WebEvent::Wheel) {
// We have a wheel event.
didHandleEvent = m_plugin->handleWheelEvent(static_cast<const WebWheelEvent&>(*currentEvent));
}
if (didHandleEvent)
event->setDefaultHandled();
}
void PluginView::viewGeometryDidChange()
......
......@@ -277,8 +277,37 @@ void WebPage::drawRect(GraphicsContext& graphicsContext, const IntRect& rect)
// Events
static const WebEvent* g_currentEvent = 0;
// FIXME: WebPage::currentEvent is used by the plug-in code to avoid having to convert from DOM events back to
// WebEvents. When we get the event handling sorted out, this should go away and the Widgets should get the correct
// platform events passed to the event handler code.
const WebEvent* WebPage::currentEvent()
{
return g_currentEvent;
}
class CurrentEvent {
public:
explicit CurrentEvent(const WebEvent& event)
: m_previousCurrentEvent(g_currentEvent)
{
g_currentEvent = &event;
}
~CurrentEvent()
{
g_currentEvent = m_previousCurrentEvent;
}
private:
const WebEvent* m_previousCurrentEvent;
};
void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
{
CurrentEvent currentEvent(mouseEvent);
WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(mouseEvent.type())));
if (!m_mainFrame->coreFrame()->view())
......@@ -304,6 +333,8 @@ void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
void WebPage::wheelEvent(const WebWheelEvent& wheelEvent)
{
CurrentEvent currentEvent(wheelEvent);
WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(wheelEvent.type())));
if (!m_mainFrame->coreFrame()->view())
return;
......@@ -314,6 +345,8 @@ void WebPage::wheelEvent(const WebWheelEvent& wheelEvent)
void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
{
CurrentEvent currentEvent(keyboardEvent);
WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(keyboardEvent.type())));
if (!m_mainFrame->coreFrame()->view())
......
......@@ -54,6 +54,7 @@ namespace WebCore {
namespace WebKit {
class DrawingArea;
class WebEvent;
class WebFrame;
class WebKeyboardEvent;
class WebMouseEvent;
......@@ -109,6 +110,8 @@ public:
void exitAcceleratedCompositingMode();
#endif
static const WebEvent* currentEvent();
private:
WebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
......
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