Changeset 87509 in webkit


Ignore:
Timestamp:
May 27, 2011 7:19:07 AM (13 years ago)
Author:
jeffm@apple.com
Message:

2011-05-26 Jeff Miller <jeffm@apple.com>

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.
Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r87458 r87509  
     12011-05-26  Jeff Miller  <jeffm@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Add a key handling logging channel for WebKit2
     6        https://bugs.webkit.org/show_bug.cgi?id=61588
     7       
     8        Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
     9        I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
     10
     11        * Platform/Logging.cpp:
     12        (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
     13        * Platform/Logging.h: Added LogKeyHandling channel.
     14
     15        * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
     16        (WebKit::webKeyboardEventTypeString): Added to support logging.
     17        (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
     18        (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
     19
    1202011-05-26  Chris Fleizach  <cfleizach@apple.com>
    221
  • trunk/Source/WebKit2/Platform/Logging.cpp

    r81920 r87509  
    3636WTFLogChannel LogView         = { 0x00000008, "WebKit2LogLevel", WTFLogChannelOff };
    3737WTFLogChannel LogIconDatabase = { 0x00000010, "WebKit2LogLevel", WTFLogChannelOff };
     38WTFLogChannel LogKeyHandling  = { 0x00000020, "WebKit2LogLevel", WTFLogChannelOff };
    3839
    3940#if !PLATFORM(MAC)
     
    5354    initializeLogChannel(&LogContextMenu);
    5455    initializeLogChannel(&LogIconDatabase);
     56    initializeLogChannel(&LogKeyHandling);
    5557    initializeLogChannel(&LogSessionState);
    5658    initializeLogChannel(&LogTextInput);
  • trunk/Source/WebKit2/Platform/Logging.h

    r81920 r87509  
    3939extern WTFLogChannel LogContextMenu;
    4040extern WTFLogChannel LogIconDatabase;
     41extern WTFLogChannel LogKeyHandling;
    4142extern WTFLogChannel LogSessionState;
    4243extern WTFLogChannel LogTextInput;
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r87253 r87509  
    3333#include "DrawingAreaProxy.h"
    3434#include "FindIndicator.h"
     35#include "Logging.h"
    3536#include "MessageID.h"
    3637#include "NativeWebKeyboardEvent.h"
     
    9192#endif
    9293
    93 // This controls what strategy we use for mouse wheel coalesing.
     94// This controls what strategy we use for mouse wheel coalescing.
    9495#define MERGE_WHEEL_EVENTS 1
    9596
     
    105106static WTF::RefCountedLeakCounter webPageProxyCounter("WebPageProxy");
    106107#endif
     108
     109#if !LOG_DISABLED
     110static const char* webKeyboardEventTypeString(WebEvent::Type type)
     111{
     112    switch (type) {
     113    case WebEvent::KeyDown:
     114        return "KeyDown";
     115   
     116    case WebEvent::KeyUp:
     117        return "KeyUp";
     118   
     119    case WebEvent::RawKeyDown:
     120        return "RawKeyDown";
     121   
     122    case WebEvent::Char:
     123        return "Char";
     124   
     125    default:
     126        ASSERT_NOT_REACHED();
     127        return "<unknown>";
     128    }
     129}
     130#endif // !LOG_DISABLED
    107131
    108132PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)
     
    902926    if (!isValid())
    903927        return;
     928   
     929    LOG(KeyHandling, "WebPageProxy::handleKeyboardEvent: %s", webKeyboardEventTypeString(event.type()));
    904930
    905931    m_keyEventQueue.append(event);
     
    27102736    case WebEvent::RawKeyDown:
    27112737    case WebEvent::Char: {
     2738        LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));
     2739
    27122740        NativeWebKeyboardEvent event = m_keyEventQueue.first();
    27132741        MESSAGE_CHECK(type == event.type());
Note: See TracChangeset for help on using the changeset viewer.