[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 11:27:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d12160b3f3e1c60fcac845db4941ac41f678a8a8
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 26 17:03:31 2010 +0000
Clean up event handling functions
https://bugs.webkit.org/show_bug.cgi?id=42977
Reviewed by Sam Weinig.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/WebPage.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 069ac4b..72133a3 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-26 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Clean up event handling functions
+ https://bugs.webkit.org/show_bug.cgi?id=42977
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::mouseEvent):
+ (WebKit::WebPage::wheelEvent):
+ (WebKit::WebPage::keyEvent):
+ (WebKit::WebPage::didReceiveMessage):
+ * WebProcess/WebPage/WebPage.h:
+
2010-07-25 Darin Adler <darin at apple.com>
Reviewed by Maciej Stachowiak.
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 9df3717..8bbb194 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -277,20 +277,24 @@ void WebPage::drawRect(GraphicsContext& graphicsContext, const IntRect& rect)
// Events
-void WebPage::mouseEvent(const PlatformMouseEvent& event)
+void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
{
+ WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(mouseEvent.type())));
+
if (!m_mainFrame->coreFrame()->view())
return;
- switch (event.eventType()) {
+ PlatformMouseEvent platformMouseEvent = platform(mouseEvent);
+
+ switch (platformMouseEvent.eventType()) {
case WebCore::MouseEventPressed:
- m_mainFrame->coreFrame()->eventHandler()->handleMousePressEvent(event);
+ m_mainFrame->coreFrame()->eventHandler()->handleMousePressEvent(platformMouseEvent);
break;
case WebCore::MouseEventReleased:
- m_mainFrame->coreFrame()->eventHandler()->handleMouseReleaseEvent(event);
+ m_mainFrame->coreFrame()->eventHandler()->handleMouseReleaseEvent(platformMouseEvent);
break;
case WebCore::MouseEventMoved:
- m_mainFrame->coreFrame()->eventHandler()->mouseMoved(event);
+ m_mainFrame->coreFrame()->eventHandler()->mouseMoved(platformMouseEvent);
break;
default:
ASSERT_NOT_REACHED();
@@ -298,20 +302,25 @@ void WebPage::mouseEvent(const PlatformMouseEvent& event)
}
}
-void WebPage::wheelEvent(PlatformWheelEvent& event)
+void WebPage::wheelEvent(const WebWheelEvent& wheelEvent)
{
+ WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(wheelEvent.type())));
if (!m_mainFrame->coreFrame()->view())
return;
- m_mainFrame->coreFrame()->eventHandler()->handleWheelEvent(event);
+ PlatformWheelEvent platformWheelEvent = platform(wheelEvent);
+ m_mainFrame->coreFrame()->eventHandler()->handleWheelEvent(platformWheelEvent);
}
-void WebPage::keyEvent(const PlatformKeyboardEvent& event)
+void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
{
+ WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In(static_cast<uint32_t>(keyboardEvent.type())));
+
if (!m_mainFrame->coreFrame()->view())
return;
- m_page->focusController()->focusedOrMainFrame()->eventHandler()->keyEvent(event);
+ PlatformKeyboardEvent platformKeyboardEvent = platform(keyboardEvent);
+ m_page->focusController()->focusedOrMainFrame()->eventHandler()->keyEvent(platformKeyboardEvent);
}
void WebPage::setActive(bool isActive)
@@ -440,9 +449,7 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
WebMouseEvent event;
if (!arguments.decode(event))
return;
- connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
- PlatformMouseEvent platformEvent = platform(event);
- mouseEvent(platformEvent);
+ mouseEvent(event);
return;
}
case WebPageMessage::PreferencesDidChange: {
@@ -457,18 +464,16 @@ void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Messag
WebWheelEvent event;
if (!arguments.decode(event))
return;
- connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
- PlatformWheelEvent platformEvent = platform(event);
- wheelEvent(platformEvent);
+
+ wheelEvent(event);
return;
}
case WebPageMessage::KeyEvent: {
WebKeyboardEvent event;
if (!arguments.decode(event))
return;
- connection->send(WebPageProxyMessage::DidReceiveEvent, m_pageID, CoreIPC::In((uint32_t)event.type()));
- PlatformKeyboardEvent platformEvent = platform(event);
- keyEvent(platformEvent);
+
+ keyEvent(event);
return;
}
case WebPageMessage::LoadURL: {
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 865556f..aa556fc 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -48,9 +48,6 @@ namespace WebCore {
class GraphicsContext;
class KeyboardEvent;
class Page;
- class PlatformKeyboardEvent;
- class PlatformMouseEvent;
- class PlatformWheelEvent;
class String;
}
@@ -58,6 +55,9 @@ namespace WebKit {
class DrawingArea;
class WebFrame;
+class WebKeyboardEvent;
+class WebMouseEvent;
+class WebWheelEvent;
struct WebPreferencesStore;
class WebPage : public RefCounted<WebPage> {
@@ -126,9 +126,9 @@ private:
void setActive(bool);
void setFocused(bool);
void setIsInWindow(bool);
- void mouseEvent(const WebCore::PlatformMouseEvent&);
- void wheelEvent(WebCore::PlatformWheelEvent&);
- void keyEvent(const WebCore::PlatformKeyboardEvent&);
+ void mouseEvent(const WebMouseEvent&);
+ void wheelEvent(const WebWheelEvent&);
+ void keyEvent(const WebKeyboardEvent&);
void runJavaScriptInMainFrame(const WebCore::String&, uint64_t callbackID);
void getRenderTreeExternalRepresentation(uint64_t callbackID);
void preferencesDidChange(const WebPreferencesStore&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list