⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 232151 in webkit


Ignore:
Timestamp:
May 24, 2018, 2:41:17 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Unreviewed. Fix GTK+ input method unit tests after r232049.

Unit tests don't use a WebPageProxy.

  • UIProcess/gtk/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::isViewFocused const):
(WebKit::InputMethodFilter::setEnabled):

  • UIProcess/gtk/InputMethodFilter.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232150 r232151  
     12018-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Unreviewed. Fix GTK+ input method unit tests after r232049.
     4
     5        Unit tests don't use a WebPageProxy.
     6
     7        * UIProcess/gtk/InputMethodFilter.cpp:
     8        (WebKit::InputMethodFilter::isViewFocused const):
     9        (WebKit::InputMethodFilter::setEnabled):
     10        * UIProcess/gtk/InputMethodFilter.h:
     11
    1122018-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp

    r232049 r232151  
    8282}
    8383
     84bool InputMethodFilter::isViewFocused() const
     85{
     86#if ENABLE(API_TESTS)
     87    ASSERT(m_page || m_testingMode);
     88    if (m_testingMode)
     89        return true;
     90#else
     91    ASSERT(m_page);
     92#endif
     93    return m_page->isViewFocused();
     94}
     95
    8496void InputMethodFilter::setEnabled(bool enabled)
    8597{
    86     ASSERT(m_page);
     98#if ENABLE(API_TESTS)
     99    ASSERT(m_page || m_testingMode);
     100#else
     101    ASSERT(m_page);
     102#endif
    87103
    88104    // Notify focus out before changing the m_enabled.
    … …  
    90106        notifyFocusedOut();
    91107    m_enabled = enabled;
    92     if (enabled && m_page->isViewFocused())
     108    if (enabled && isViewFocused())
    93109        notifyFocusedIn();
    94110}
  • trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.h

    r206985 r232151  
    9494    void cancelContextComposition();
    9595
     96    bool isViewFocused() const;
     97
    9698#if ENABLE(API_TESTS)
    9799    void logHandleKeyboardEventForTesting(GdkEventKey*, const String&, EventFakedForComposition);
Note: See TracChangeset for help on using the changeset viewer.