diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
commit | 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 (patch) | |
tree | 0287b1a69d84492c901e8bc820e635e7133809a0 /Source/WebKit2/WebProcess/WebPage/WebPage.cpp | |
parent | 682ab87480e7757346802ce7f54cfdbdfeb2339e (diff) | |
download | qtwebkit-79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4.tar.gz |
Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147)
New snapshot that includes Win32 debug build fix (use SVGAllInOne)
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index ff94102c6..953e9b046 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. + * Copyright (C) 2012 Intel Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -47,6 +48,7 @@ #include "WebBackForwardListItem.h" #include "WebBackForwardListProxy.h" #include "WebChromeClient.h" +#include "WebColorChooser.h" #include "WebContextMenu.h" #include "WebContextMenuClient.h" #include "WebContextMessages.h" @@ -124,6 +126,10 @@ #endif #endif +#if ENABLE(WEB_INTENTS) +#include "IntentData.h" +#endif + #if PLATFORM(MAC) #include "BuiltInPDFView.h" #endif @@ -206,6 +212,9 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters) , m_tapHighlightController(this) #endif #endif +#if ENABLE(INPUT_TYPE_COLOR) + , m_activeColorChooser(0) +#endif #if ENABLE(GEOLOCATION) , m_geolocationPermissionRequestManager(this) #endif @@ -631,6 +640,13 @@ void WebPage::close() m_activeOpenPanelResultListener = 0; } +#if ENABLE(INPUT_TYPE_COLOR) + if (m_activeColorChooser) { + m_activeColorChooser->disconnectFromPage(); + m_activeColorChooser = 0; + } +#endif + m_sandboxExtensionTracker.invalidate(); m_underlayPage = nullptr; @@ -1423,9 +1439,7 @@ void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent) if (!handled) handled = performDefaultBehaviorForKeyEvent(keyboardEvent); - // The receiving end relies on DidReceiveEvent and InterpretQueuedKeyEvent arriving in the same order they are sent - // (for keyboard events.) We set the DispatchMessageEvenWhenWaitingForSyncReply flag to ensure consistent ordering. - connection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(keyboardEvent.type()), handled), m_pageID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply); + sendSync(Messages::WebPageProxy::DidReceiveKeyEvent(static_cast<uint32_t>(keyboardEvent.type()), handled), Messages::WebPageProxy::DidReceiveKeyEvent::Reply()); } void WebPage::keyEventSyncForTesting(const WebKeyboardEvent& keyboardEvent, bool& handled) @@ -1914,6 +1928,17 @@ void WebPage::forceRepaint(uint64_t callbackID) send(Messages::WebPageProxy::VoidCallback(callbackID)); } +#if ENABLE(WEB_INTENTS) +void WebPage::deliverIntentToFrame(uint64_t frameID, const IntentData& intentData) +{ + WebFrame* frame = WebProcess::shared().webFrame(frameID); + if (!frame) + return; + + frame->deliverIntent(intentData); +} +#endif + void WebPage::preferencesDidChange(const WebPreferencesStore& store) { WebPreferencesStore::removeTestRunnerOverrides(); @@ -2315,6 +2340,23 @@ void WebPage::setActivePopupMenu(WebPopupMenu* menu) m_activePopupMenu = menu; } +#if ENABLE(INPUT_TYPE_COLOR) +void WebPage::setActiveColorChooser(WebColorChooser* colorChooser) +{ + m_activeColorChooser = colorChooser; +} + +void WebPage::didEndColorChooser() +{ + m_activeColorChooser->didEndChooser(); +} + +void WebPage::didChooseColor(const WebCore::Color& color) +{ + m_activeColorChooser->didChooseColor(color); +} +#endif + void WebPage::setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener> openPanelResultListener) { m_activeOpenPanelResultListener = openPanelResultListener; |