Changeset 205092 in webkit


Ignore:
Timestamp:
Aug 27, 2016, 5:36:05 PM (9 years ago)
Author:
Simon Fraser
Message:

Add more Editing logging
https://bugs.webkit.org/show_bug.cgi?id=161287

Reviewed by Darin Adler.

Add logging which tracks how key events get from the UI process to the
web process, and down to form fields.

  • editing/Editor.cpp:

(WebCore::Editor::handleTextEvent):
(WebCore::Editor::appliedEditing):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertTextAndNotifyAccessibility):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::didEditInnerTextValue):

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTextInputEvent):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r205088 r205092  
     12016-08-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add more Editing logging
     4        https://bugs.webkit.org/show_bug.cgi?id=161287
     5
     6        Reviewed by Darin Adler.
     7
     8        Add logging which tracks how key events get from the UI process to the
     9        web process, and down to form fields.
     10
     11        * editing/Editor.cpp:
     12        (WebCore::Editor::handleTextEvent):
     13        (WebCore::Editor::appliedEditing):
     14        * editing/TypingCommand.cpp:
     15        (WebCore::TypingCommand::insertText):
     16        (WebCore::TypingCommand::insertTextAndNotifyAccessibility):
     17        * html/HTMLTextFormControlElement.cpp:
     18        (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
     19        * page/EventHandler.cpp:
     20        (WebCore::EventHandler::keyEvent):
     21        (WebCore::EventHandler::handleTextInputEvent):
     22
    1232016-08-27  Sam Weinig  <sam@webkit.org>
    224
  • trunk/Source/WebCore/editing/Editor.cpp

    r204508 r205092  
    6363#include "KeyboardEvent.h"
    6464#include "KillRing.h"
     65#include "Logging.h"
    6566#include "MainFrame.h"
    6667#include "ModifySelectionListLevel.h"
     
    198199bool Editor::handleTextEvent(TextEvent* event)
    199200{
     201    LOG(Editing, "Editor %p handleTextEvent (data %s)", this, event->data().utf8().data());
     202
    200203    // Default event handling for Drag and Drop will be handled by DragController
    201204    // so we leave the event for it.
     
    10341037void Editor::appliedEditing(PassRefPtr<CompositeEditCommand> cmd)
    10351038{
     1039    LOG(Editing, "Editor %p appliedEditing", this);
     1040
    10361041    document().updateLayout();
    10371042
  • trunk/Source/WebCore/editing/TypingCommand.cpp

    r203322 r205092  
    3939#include "InsertParagraphSeparatorCommand.h"
    4040#include "InsertTextCommand.h"
     41#include "Logging.h"
    4142#include "MathMLElement.h"
    4243#include "RenderElement.h"
     
    167168    RefPtr<Frame> frame = document.frame();
    168169    ASSERT(frame);
     170
     171    LOG(Editing, "TypingCommand::insertText (text %s)", text.utf8().data());
    169172
    170173    VisibleSelection currentSelection = frame->selection().selection();
     
    381384void TypingCommand::insertTextAndNotifyAccessibility(const String &text, bool selectInsertedText)
    382385{
     386    LOG(Editing, "TypingCommand %p insertTextAndNotifyAccessibility (text %s, selectInsertedText %d)", this, text.utf8().data(), selectInsertedText);
     387
    383388    AccessibilityReplacedText replacedText(frame().selection().selection());
    384389    insertText(text, selectInsertedText);
  • trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp

    r203324 r205092  
    3939#include "HTMLNames.h"
    4040#include "HTMLParserIdioms.h"
     41#include "Logging.h"
    4142#include "NodeTraversal.h"
    4243#include "Page.h"
     
    109110    if (!isTextFormControl())
    110111        return;
     112
     113    LOG(Editing, "HTMLTextFormControlElement %p didEditInnerTextValue", this);
    111114
    112115    m_lastChangeWasUserEdit = true;
  • trunk/Source/WebCore/page/EventHandler.cpp

    r204560 r205092  
    6464#include "InspectorInstrumentation.h"
    6565#include "KeyboardEvent.h"
     66#include "Logging.h"
    6667#include "MainFrame.h"
    6768#include "MouseEvent.h"
     
    30143015    RefPtr<FrameView> protector(m_frame.view());
    30153016
     3017    LOG(Editing, "EventHandler %p keyEvent (text %s keyIdentifier %s)", this, initialKeyEvent.text().utf8().data(), initialKeyEvent.keyIdentifier().utf8().data());
     3018
    30163019#if ENABLE(FULLSCREEN_API)
    30173020    if (m_frame.document()->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(initialKeyEvent))
     
    35373540bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEvent, TextEventInputType inputType)
    35383541{
     3542    LOG(Editing, "EventHandler %p handleTextInputEvent (text %s)", this, text.utf8().data());
     3543
    35393544    // Platforms should differentiate real commands like selectAll from text input in disguise (like insertNewline),
    35403545    // and avoid dispatching text input events from keydown default handlers.
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r205004 r205092  
    19591959
    19601960    m_process->responsivenessTimer().start();
    1961     if (m_keyEventQueue.size() == 1) // Otherwise, sent from DidReceiveEvent message handler.
     1961    if (m_keyEventQueue.size() == 1) { // Otherwise, sent from DidReceiveEvent message handler.
     1962        LOG(KeyHandling, " UI process: sent keyEvent from handleKeyboardEvent");
    19621963        m_process->send(Messages::WebPage::KeyEvent(event), m_pageID);
     1964    }
    19631965}
    19641966
     
    48584860    case WebEvent::RawKeyDown:
    48594861    case WebEvent::Char: {
    4860         LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s", webKeyboardEventTypeString(type));
     4862        LOG(KeyHandling, "WebPageProxy::didReceiveEvent: %s (queue empty %d)", webKeyboardEventTypeString(type), m_keyEventQueue.isEmpty());
    48614863
    48624864        MESSAGE_CHECK(!m_keyEventQueue.isEmpty());
     
    48654867        MESSAGE_CHECK(type == event.type());
    48664868
    4867         if (!m_keyEventQueue.isEmpty())
     4869        if (!m_keyEventQueue.isEmpty()) {
     4870            LOG(KeyHandling, " UI process: sent keyEvent from didReceiveEvent");
    48684871            m_process->send(Messages::WebPage::KeyEvent(m_keyEventQueue.first()), m_pageID);
    4869         else {
     4872        } else {
    48704873            if (auto* automationSession = process().processPool().automationSession())
    48714874                automationSession->keyboardEventsFlushedForPage(*this);
Note: See TracChangeset for help on using the changeset viewer.