diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp b/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp index ac5ba7352..ff8b4aa0b 100644 --- a/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp +++ b/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp @@ -27,14 +27,17 @@ #include "config.h" #include "WebPageProxy.h" -#include "NativeWebKeyboardEvent.h" #include "NotImplemented.h" #include "PageClientImpl.h" #include "WebKitWebViewBasePrivate.h" #include "WebPageMessages.h" +#include "WebPasteboardProxy.h" #include "WebProcessProxy.h" -#include <WebCore/UserAgentGtk.h> +#include "WebsiteDataStore.h" +#include <WebCore/PlatformDisplay.h> +#include <WebCore/UserAgent.h> #include <gtk/gtkx.h> +#include <wtf/NeverDestroyed.h> namespace WebKit { @@ -52,34 +55,42 @@ String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent return WebCore::standardUserAgent(applicationNameForUserAgent); } -void WebPageProxy::getEditorCommandsForKeyEvent(const AtomicString& eventType, Vector<WTF::String>& commandsList) +void WebPageProxy::bindAccessibilityTree(const String& plugID) { - // When the keyboard event is started in the WebProcess side (e.g. from the Inspector) - // it will arrive without a GdkEvent associated, so the keyEventQueue will be empty. - if (!m_keyEventQueue.isEmpty()) - m_pageClient.getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList); + m_accessibilityPlugID = plugID; } -void WebPageProxy::bindAccessibilityTree(const String& plugID) +void WebPageProxy::saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&) { - m_accessibilityPlugID = plugID; + notImplemented(); } -void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&) +void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&) { notImplemented(); } -void WebPageProxy::loadRecentSearches(const String&, Vector<String>&) +void WebsiteDataStore::platformRemoveRecentSearches(std::chrono::system_clock::time_point oldestTimeToRemove) { notImplemented(); } +void WebPageProxy::editorStateChanged(const EditorState& editorState) +{ + m_editorState = editorState; + + if (editorState.shouldIgnoreCompositionSelectionChange) + return; + if (m_editorState.selectionIsRange) + WebPasteboardProxy::singleton().setPrimarySelectionOwner(focusedFrame()); + m_pageClient.selectionDidChange(); +} + #if PLUGIN_ARCHITECTURE(X11) typedef HashMap<uint64_t, GtkWidget* > PluginWindowMap; static PluginWindowMap& pluginWindowMap() { - DEFINE_STATIC_LOCAL(PluginWindowMap, map, ()); + static NeverDestroyed<PluginWindowMap> map; return map; } @@ -92,6 +103,7 @@ static gboolean pluginContainerPlugRemoved(GtkSocket* socket) void WebPageProxy::createPluginContainer(uint64_t& windowID) { + RELEASE_ASSERT(WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11); GtkWidget* socket = gtk_socket_new(); g_signal_connect(socket, "plug-removed", G_CALLBACK(pluginContainerPlugRemoved), 0); gtk_container_add(GTK_CONTAINER(viewWidget()), socket); @@ -134,10 +146,10 @@ void WebPageProxy::setInputMethodState(bool enabled) webkitWebViewBaseSetInputMethodState(WEBKIT_WEB_VIEW_BASE(viewWidget()), enabled); } -#if USE(TEXTURE_MAPPER_GL) -void WebPageProxy::setAcceleratedCompositingWindowId(uint64_t nativeWindowId) +#if HAVE(GTK_GESTURES) +void WebPageProxy::getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center) { - process().send(Messages::WebPage::SetAcceleratedCompositingWindowId(nativeWindowId), m_pageID); + process().sendSync(Messages::WebPage::GetCenterForZoomGesture(centerInViewCoordinates), Messages::WebPage::GetCenterForZoomGesture::Reply(center), m_pageID); } #endif |