Title: [87509] trunk/Source/WebKit2
- Revision
- 87509
- Author
- [email protected]
- Date
- 2011-05-27 07:19:07 -0700 (Fri, 27 May 2011)
Log Message
2011-05-26 Jeff Miller <[email protected]>
Reviewed by Alexey Proskuryakov.
Add a key handling logging channel for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=61588
Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
* Platform/Logging.cpp:
(WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
* Platform/Logging.h: Added LogKeyHandling channel.
* UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
(WebKit::webKeyboardEventTypeString): Added to support logging.
(WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
(WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (87508 => 87509)
--- trunk/Source/WebKit2/ChangeLog 2011-05-27 14:02:26 UTC (rev 87508)
+++ trunk/Source/WebKit2/ChangeLog 2011-05-27 14:19:07 UTC (rev 87509)
@@ -1,3 +1,22 @@
+2011-05-26 Jeff Miller <[email protected]>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add a key handling logging channel for WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=61588
+
+ Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
+ I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
+
+ * Platform/Logging.cpp:
+ (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
+ * Platform/Logging.h: Added LogKeyHandling channel.
+
+ * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
+ (WebKit::webKeyboardEventTypeString): Added to support logging.
+ (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
+ (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
+
2011-05-26 Chris Fleizach <[email protected]>
Reviewed by Darin Adler.
Modified: trunk/Source/WebKit2/Platform/Logging.cpp (87508 => 87509)
--- trunk/Source/WebKit2/Platform/Logging.cpp 2011-05-27 14:02:26 UTC (rev 87508)
+++ trunk/Source/WebKit2/Platform/Logging.cpp 2011-05-27 14:19:07 UTC (rev 87509)
@@ -35,6 +35,7 @@
WTFLogChannel LogTextInput = { 0x00000004, "WebKit2LogLevel", WTFLogChannelOff };
WTFLogChannel LogView = { 0x00000008, "WebKit2LogLevel", WTFLogChannelOff };
WTFLogChannel LogIconDatabase = { 0x00000010, "WebKit2LogLevel", WTFLogChannelOff };
+WTFLogChannel LogKeyHandling = { 0x00000020, "WebKit2LogLevel", WTFLogChannelOff };
#if !PLATFORM(MAC)
void initializeLogChannel(WTFLogChannel* channel)
@@ -52,6 +53,7 @@
initializeLogChannel(&LogContextMenu);
initializeLogChannel(&LogIconDatabase);
+ initializeLogChannel(&LogKeyHandling);
initializeLogChannel(&LogSessionState);
initializeLogChannel(&LogTextInput);
initializeLogChannel(&LogView);
Modified: trunk/Source/WebKit2/Platform/Logging.h (87508 => 87509)
--- trunk/Source/WebKit2/Platform/Logging.h 2011-05-27 14:02:26 UTC (rev 87508)
+++ trunk/Source/WebKit2/Platform/Logging.h 2011-05-27 14:19:07 UTC (rev 87509)
@@ -38,6 +38,7 @@
extern WTFLogChannel LogContextMenu;
extern WTFLogChannel LogIconDatabase;
+extern WTFLogChannel LogKeyHandling;
extern WTFLogChannel LogSessionState;
extern WTFLogChannel LogTextInput;
extern WTFLogChannel LogView;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (87508 => 87509)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-05-27 14:02:26 UTC (rev 87508)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-05-27 14:19:07 UTC (rev 87509)
@@ -32,6 +32,7 @@
#include "DownloadProxy.h"
#include "DrawingAreaProxy.h"
#include "FindIndicator.h"
+#include "Logging.h"
#include "MessageID.h"
#include "NativeWebKeyboardEvent.h"
#include "NativeWebMouseEvent.h"
@@ -90,7 +91,7 @@
#include <wtf/RefCountedLeakCounter.h>
#endif
-// This controls what strategy we use for mouse wheel coalesing.
+// This controls what strategy we use for mouse wheel coalescing.
#define MERGE_WHEEL_EVENTS 1
#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process()->connection())
@@ -105,6 +106,29 @@
static WTF::RefCountedLeakCounter webPageProxyCounter("WebPageProxy");
#endif
+#if !LOG_DISABLED
+static const char* webKeyboardEventTypeString(WebEvent::Type type)
+{
+ switch (type) {
+ case WebEvent::KeyDown:
+ return "KeyDown";
+
+ case WebEvent::KeyUp:
+ return "KeyUp";
+
+ case WebEvent::RawKeyDown:
+ return "RawKeyDown";
+
+ case WebEvent::Char:
+ return "Char";
+
+ default:
+ ASSERT_NOT_REACHED();
+ return "<unknown>";
+ }
+}
+#endif // !LOG_DISABLED
+
PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)
{
return adoptRef(new WebPageProxy(pageClient, process, pageGroup, pageID));
@@ -901,6 +925,8 @@
{
if (!isValid())
return;
+
+ LOG(KeyHandling, "WebPageProxy::handleKeyboardEvent: %s", webKeyboardEventTypeString(event.type()));
m_keyEventQueue.append(event);
@@ -2709,6 +2735,8 @@
case WebEvent::KeyUp:
case WebEvent::RawKeyDown:
case WebEvent::Char: {
+ LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));
+
NativeWebKeyboardEvent event = m_keyEventQueue.first();
MESSAGE_CHECK(type == event.type());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes