From 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jun 2012 13:35:59 +0200 Subject: Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147) New snapshot that includes Win32 debug build fix (use SVGAllInOne) --- Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 48 +++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp') 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(keyboardEvent.type()), handled), m_pageID, CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply); + sendSync(Messages::WebPageProxy::DidReceiveKeyEvent(static_cast(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 openPanelResultListener) { m_activeOpenPanelResultListener = openPanelResultListener; -- cgit v1.2.1