Title: [232151] trunk/Source/WebKit
- Revision
- 232151
- Author
- [email protected]
- Date
- 2018-05-24 02:41:17 -0700 (Thu, 24 May 2018)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (232150 => 232151)
--- trunk/Source/WebKit/ChangeLog 2018-05-24 08:54:37 UTC (rev 232150)
+++ trunk/Source/WebKit/ChangeLog 2018-05-24 09:41:17 UTC (rev 232151)
@@ -1,5 +1,16 @@
2018-05-24 Carlos Garcia Campos <[email protected]>
+ 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:
+
+2018-05-24 Carlos Garcia Campos <[email protected]>
+
WebDriver: implement maximize, minimize and fullscreen window commands
https://bugs.webkit.org/show_bug.cgi?id=180398
Modified: trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp (232150 => 232151)
--- trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp 2018-05-24 08:54:37 UTC (rev 232150)
+++ trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp 2018-05-24 09:41:17 UTC (rev 232151)
@@ -81,15 +81,31 @@
g_signal_handlers_disconnect_matched(m_context.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);
}
+bool InputMethodFilter::isViewFocused() const
+{
+#if ENABLE(API_TESTS)
+ ASSERT(m_page || m_testingMode);
+ if (m_testingMode)
+ return true;
+#else
+ ASSERT(m_page);
+#endif
+ return m_page->isViewFocused();
+}
+
void InputMethodFilter::setEnabled(bool enabled)
{
+#if ENABLE(API_TESTS)
+ ASSERT(m_page || m_testingMode);
+#else
ASSERT(m_page);
+#endif
// Notify focus out before changing the m_enabled.
if (!enabled)
notifyFocusedOut();
m_enabled = enabled;
- if (enabled && m_page->isViewFocused())
+ if (enabled && isViewFocused())
notifyFocusedIn();
}
Modified: trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.h (232150 => 232151)
--- trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.h 2018-05-24 08:54:37 UTC (rev 232150)
+++ trunk/Source/WebKit/UIProcess/gtk/InputMethodFilter.h 2018-05-24 09:41:17 UTC (rev 232151)
@@ -93,6 +93,8 @@
void confirmCurrentComposition();
void cancelContextComposition();
+ bool isViewFocused() const;
+
#if ENABLE(API_TESTS)
void logHandleKeyboardEventForTesting(GdkEventKey*, const String&, EventFakedForComposition);
void logHandleKeyboardEventWithCompositionResultsForTesting(GdkEventKey*, ResultsToSend, EventFakedForComposition);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes