2011-04-19 Anders Carlsson Reviewed by Sam Weinig. UI process thinks the page is unresponsive when a plug-in is showing a context menu https://bugs.webkit.org/show_bug.cgi?id=58943 Change the HandleMouseEvent message to have a delayed reply and make the PluginControllerProxy respond to it immediately, before even passing the event to the plug-in. Since it doesn't matter for mouse events whether the plug-in handled them or not we can do this. Another solution could have been to make handleMouseEvent an asynchronous message, but that could mess up the message ordering so this seemed like the least intrusive change. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::handleMouseEvent): * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginControllerProxy.messages.in: 2011-04-19 Anders Carlsson Reviewed by Dan Bernstein. Terminate hung plug-in processes after 45 seconds https://bugs.webkit.org/show_bug.cgi?id=58932 * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::pluginSyncMessageSendTimedOut): Find the plug-in process proxy and terminate it. (WebKit::PluginProcessManager::pluginProcessWithPath): Add new helper function. (WebKit::PluginProcessManager::getOrCreatePluginProcess): Call pluginProcessWithPath. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::terminate): Terminate the process. * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::pluginSyncMessageSendTimedOut): Call PluginProcessManager::pluginSyncMessageSendTimedOut. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: Add PluginSyncMessageSendTimedOut message. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::defaultSyncMessageTimeout): (WebKit::PluginProcessConnection::PluginProcessConnection): Set a sync message timeout on the plug-in process connection. (WebKit::PluginProcessConnection::syncMessageSendTimedOut): Send a message to the web process proxy. 2011-04-19 Alexey Proskuryakov Reviewed by Adele Peterson. WebKit2: Merge SelectionState and TextInputState https://bugs.webkit.org/show_bug.cgi?id=58919 Combined TextInputState and EditorState in one structure, which is updated whenever we get a chance to. There is no sense to keep possibly stale SelectionState data when we have already requested the most recent data synchronously. This also simplifies the code, as we don't need to pass the state around in a separate variable. * GNUmakefile.am: * Scripts/webkit2/messages.py: * Shared/EditorState.h: Copied from Source/WebKit2/Shared/SelectionState.h. (WebKit::EditorState::EditorState): * Shared/SelectionState.h: Removed. * Shared/mac/TextInputState.h: Removed. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::interpretKeyEvent): * UIProcess/API/mac/WKView.mm: (-[WKView validRequestorForSendType:returnType:]): (-[WKView validateUserInterfaceItem:]): (-[WKView shouldDelayWindowOrderingForEvent:]): (-[WKView doCommandBySelector:]): (-[WKView insertText:replacementRange:]): (-[WKView _handleStyleKeyEquivalent:]): (-[WKView _executeSavedKeypressCommands]): (-[WKView inputContext]): (-[WKView hasMarkedText]): (-[WKView unmarkText]): (-[WKView setMarkedText:selectedRange:replacementRange:]): (-[WKView attributedSubstringForProposedRange:actualRange:]): (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): (-[WKView _updateSecureInputState]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::editorStateChanged): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::editorState): (WebKit::WebPageProxy::hasSelectedRange): (WebKit::WebPageProxy::isContentEditable): * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::confirmComposition): (WebKit::WebPageProxy::insertText): (WebKit::WebPageProxy::executeKeypressCommands): (WebKit::WebPageProxy::writeSelectionToPasteboard): (WebKit::WebPageProxy::readSelectionFromPasteboard): (WebKit::WebPageProxy::interpretQueuedKeyEvent): * UIProcess/win/WebView.cpp: (WebKit::WebView::compositionSelectionChanged): (WebKit::WebView::onIMEComposition): (WebKit::WebView::onIMEEndComposition): (WebKit::WebView::onIMERequestCharPosition): (WebKit::WebView::onIMERequest): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::handleEditingKeyboardEvent): (WebKit::WebPage::setComposition): (WebKit::WebPage::confirmComposition): (WebKit::WebPage::insertText): (WebKit::WebPage::executeKeypressCommands): * win/WebKit2.vcproj: 2011-04-19 Alexey Proskuryakov Reviewed by Timothy Hatcher. 100% reproducible crash when right-clicking any element in Web Inspector on any page https://bugs.webkit.org/show_bug.cgi?id=58822 Web Inspector changes selection from JavaScript, and checks in UI process are insufficient when selection is changing asynchronously. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::writeSelectionToPasteboard): Check that there is a selection, matching WK1 and UI process side. Perhaps the check should really be in WebCore, but for now, it's a WebKit responsibility. (WebKit::WebPage::readSelectionFromPasteboard): Same check, for no other reason but consistency. 2011-04-19 Anders Carlsson Reviewed by Sam Weinig. Add syncMessageSendTimedOut CoreIPC Connection::Client member function https://bugs.webkit.org/show_bug.cgi?id=58928 * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForSyncReply): Call syncMessageSendTimedOut. * Platform/CoreIPC/Connection.h: Add syncMessageSendTimedOut to Connection::Client. * PluginProcess/PluginProcess.cpp: * PluginProcess/PluginProcess.h: * PluginProcess/WebProcessConnection.cpp: * PluginProcess/WebProcessConnection.h: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebProcessProxy.h: * WebProcess/Plugins/PluginProcessConnection.cpp: * WebProcess/Plugins/PluginProcessConnection.h: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: Add syncMessageSendTimedOut stubs. 2011-04-19 Anders Carlsson Reviewed by Alexey Proskuryakov. Replace the didFailToSendSyncMessage Connection::Client function with a flag https://bugs.webkit.org/show_bug.cgi?id=58923 * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): Initialize m_shouldExitOnSyncMessageSendFailure to false. (CoreIPC::Connection::setShouldExitOnSyncMessageSendFailure): Set m_didCloseOnConnectionWorkQueueCallback. (CoreIPC::Connection::sendSyncMessage): Call didFailToSendSyncMessage if we fail to send the sync message for some reason. (CoreIPC::Connection::didFailToSendSyncMessage): if m_shouldExitOnSyncMessageSendFailure is true, exit. * Platform/CoreIPC/Connection.h: Remove didFailToSendSyncMessage from Connection::Client. * PluginProcess/PluginProcess.cpp: * PluginProcess/PluginProcess.h: Remove didFailToSendSyncMessage. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initialize): * WebProcess/WebProcess.h: Remove didFailToSendSyncMessage. Call setShouldExitOnSyncMessageSendFailure on our UI process connection. 2011-04-19 Anders Carlsson Reviewed by Sam Weinig. Add a way to set the default sync message timeout for a CoreIPC connection https://bugs.webkit.org/show_bug.cgi?id=58908 * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): Initialize m_defaultSyncMessageTimeout. (CoreIPC::Connection::setDefaultSyncMessageTimeout): Set the m_defaultSyncMessageTimeout member variable. (CoreIPC::Connection::waitForSyncReply): Handle the timeout being one of our two special magic values. * Platform/CoreIPC/Connection.h: Add a DefaultTimeout constant and change the NoTimeout constant to be -1. 2011-04-19 Vsevolod Vlasov Reviewed by Pavel Feldman. Web Inspector: Rename lengthReceived to encodedDataLength/dataLength https://bugs.webkit.org/show_bug.cgi?id=58883 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2011-04-19 Andreas Kling Reviewed by Antonio Gomes. WebKit2: Typo fix in WebPopupMenu::Type. https://bugs.webkit.org/show_bug.cgi?id=58891 Fixed a typo, Seperator -> Separator. Also removed m_ prefix on an argument variable name. * Shared/WebPopupItem.h: * UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::populate): * WebProcess/WebCoreSupport/WebPopupMenu.cpp: (WebKit::WebPopupMenu::populateItems): 2011-04-19 Jon Honeycutt WKContextDownloadURLRequest() should return a WKDownloadRef https://bugs.webkit.org/show_bug.cgi?id=58867 Part of Reviewed by Steve Falkenburg. * UIProcess/API/C/WKContext.cpp: (WKContextDownloadURLRequest): Return the result of calling WebContext::download(). * UIProcess/API/C/WKContext.h: Updated return type of WKContextDownloadURLRequest(). * UIProcess/WebContext.cpp: (WebKit::WebContext::download): Return the DownloadProxy returned by createDownloadProxy(). (WebKit::WebContext::createDownloadProxy): Return the DownloadProxy. * UIProcess/WebContext.h: Changed return type of download() and createDownloadProxy(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): Call the DownloadProxy's downloadID() function to get the ID. 2011-04-18 Jia Pu Reviewed by Mark Rowe. WebKit needs to stop importing https://bugs.webkit.org/show_bug.cgi?id=58798 Use public header instead. * UIProcess/mac/CorrectionPanel.h: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): (WebKit::CorrectionPanel::show): (WebKit::CorrectionPanel::dismissInternal): (WebKit::CorrectionPanel::handleAcceptedReplacement): * UIProcess/mac/TextCheckerMac.mm: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 2011-04-05 Jer Noble Reviewed by Sam Weinig. WebKit2: WKTR should support WebKit2 full screen APIs https://bugs.webkit.org/show_bug.cgi?id=56318 Add a new WKBundlePage API for Full Screen events, and move some of the implementation of WebFullScreenManager into the new InjectedBundlePageFullScreenClient class, so that the default behavior can be overridden by a WKBundlePageFullScreenClient. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::supportsFullScreen): Moved contents into InjectedBundlePageFullScreenClient. (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto. (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetFullScreenClient): Added. (WKBundlePageWillEnterFullScreenForElement): Added. (WKBundlePageDidEnterFullScreenForElement): Added. (WKBundlePageWillExitFullScreenForElement): Added. (WKBundlePageDidExitFullScreenForElement): Added. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: Added. (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen): Added. (WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement): Added. (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Added. * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::initializeInjectedBundleFullScreenClient): Added. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::injectedBundleFullScreenClient): Added. 2011-04-18 Alexey Proskuryakov Reviewed by Maciej Stachowiak. Re-add a null check lost in r83081 https://bugs.webkit.org/show_bug.cgi?id=58846 * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getSelectedRange): 2011-04-18 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Clean up tool-tip/status-bar confusion. https://bugs.webkit.org/show_bug.cgi?id=58844 Tool-tips were incorrectly hooked up to the status bar text. Chrome::setStatusbarText() now correctly causes the QWKPage::statusBarMessage() signal. New API: - QWKPage::toolTipChanged(const QString& toolTip) [signal] QGraphicsWKView will automatically listen for this and set its own toolTip(). * UIProcess/API/qt/ClientImpl.cpp: (qt_wk_setStatusText): * UIProcess/API/qt/ClientImpl.h: * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::QGraphicsWKView): (QGraphicsWKViewPrivate::onToolTipChanged): * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::toolTipChanged): (QWKPage::QWKPage): * UIProcess/API/qt/qwkpage.h: 2011-04-18 Maciej Stachowiak Reviewed by Dan Bernstein. sandbox violation for ~/Library/Dictionaries https://bugs.webkit.org/show_bug.cgi?id=58841 * WebProcess/com.apple.WebProcess.sb: Add to sandbox profile. No obvious harm from allowing this, though it's not 100% clear why it's needed. 2011-04-18 Anders Carlsson Try to fix the Windows build. * Scripts/webkit2/messages.py: 2011-04-18 Anders Carlsson Reviewed by Dan Bernstein. Get rid of WebProcessProxyLegacyMessage https://bugs.webkit.org/show_bug.cgi?id=58825 * GNUmakefile.am: * Platform/CoreIPC/MessageID.h: * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h: Removed. * UIProcess/WebProcessProxy.cpp: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/PluginProcessConnectionManager.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebPage/WebPage.cpp: * win/WebKit2.vcproj: 2011-04-18 Anders Carlsson Fix build. * UIProcess/Plugins/PluginInfoStore.h: 2011-04-18 Anders Carlsson Reviewed by Sam Weinig. Use the message generator for the GetPluginProcessConnection message https://bugs.webkit.org/show_bug.cgi?id=58815 * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): (CoreIPC::handleMessageDelayed): Add helper functions. * UIProcess/Plugins/PluginInfoStore.h: Mark class noncopyable. * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::getPluginProcessConnection): This now takes a delayed reply. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::getPluginProcessConnection): This now takes a delayed reply. (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): (WebKit::PluginProcessProxy::didCreateWebProcessConnection): Call DelayedReply::send. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPluginProcessConnection): This now takes a delayed reply. (WebKit::WebProcessProxy::didReceiveSyncMessage): No need to handle this message here. * UIProcess/WebProcessProxy.messages.in: Add GetPluginProcessConnection message. * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Don't use deprecatedSendSync. 2011-04-18 Anders Carlsson Reviewed by Adam Roben. Finish implementing delayed sync replies in the CoreIPC message generator https://bugs.webkit.org/show_bug.cgi?id=58814 Put the DelayedReply function definitions in the .cpp file and fix bugs found by actually trying to compile the generated files. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-04-18 Anders Carlsson Reviewed by Adam Roben. Reproducible crash in Find on Page, on pages that use accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=58793 Move the call to PageOverlay::setNeedsDisplay() back to WebPage::installPageOverlay; it needs to be called after we've told the drawing area that a page overlay has been installed. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::setPage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): 2011-04-18 Jeff Miller Reviewed by Timothy Hatcher. WKFrameLoadState should be a uint32_t to match our API conventions https://bugs.webkit.org/show_bug.cgi?id=58785 * UIProcess/API/C/WKFrame.h: typedef WKFrameLoadState as a uint32_t and define its values as an anonymous enum. 2011-04-18 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after 84017. * GNUmakefile.am: * Shared/NativeWebMouseEvent.h: (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/gtk/NativeWebMouseEventGtk.cpp: Copied from Source/WebKit2/Shared/NativeWebMouseEvent.h. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * UIProcess/gtk/WebView.cpp: (WebKit::WebView::handleMouseEvent): 2011-04-17 David Kilzer Switch HTTP pipelining from user default to private setting Reviewed by Dan Bernstein. This replaces support for the WebKitEnableHTTPPipelining user default with methods on the WebCore::ResourceRequest class in WebCore, the WebView class in WebKit1, and the WebContext class in WebKit2. It also removes support for the WebKitForceHTTPPipeliningPriorityHigh user default which was not needed. * UIProcess/API/C/WKContext.cpp: (_WKContextSetHTTPPipeliningEnabled): Added. * UIProcess/API/C/WKContextPrivate.h: (_WKContextSetHTTPPipeliningEnabled): Added declaration. * UIProcess/WebContext.cpp: (WebKit::WebContext::setHTTPPipeliningEnabled): Added. (WebKit::WebContext::httpPipeliningEnabled): Added. * UIProcess/WebContext.h: (WebKit::WebContext::setHTTPPipeliningEnabled): Added declaration. (WebKit::WebContext::httpPipeliningEnabled): Added declaration. 2011-04-17 Sam Weinig Reviewed by Geoffrey Garen. Make more strings in WebKit2 localizable https://bugs.webkit.org/show_bug.cgi?id=58757 * UIProcess/API/mac/PDFViewController.mm: (-[WKPDFView menuForEvent:]): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setViewportArguments): (WebKit::PageClientImpl::registerEditCommand): * UIProcess/WebEditCommandProxy.cpp: (WebKit::WebEditCommandProxy::nameForEditAction): * UIProcess/WebEditCommandProxy.h: Use WebCore's localization macro to make more strings localizable. 2011-04-17 Patrick Gansterer Reviewed by Adam Barth. Rename PLATFORM(CA) to USE(CA) https://bugs.webkit.org/show_bug.cgi?id=58742 * WebProcess/WebPage/LayerTreeHost.cpp: * WebProcess/WebPage/win/LayerTreeHostWin.cpp: (WebKit::LayerTreeHost::supportsAcceleratedCompositing): 2011-04-17 Patrick Gansterer Reviewed by Adam Barth. Rename PLATFORM(CG) to USE(CG) https://bugs.webkit.org/show_bug.cgi?id=58729 * Shared/ShareableBitmap.h: * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: * Shared/WebGraphicsContext.cpp: (WebKit::WebGraphicsContext::WebGraphicsContext): * Shared/WebGraphicsContext.h: * Shared/win/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): * UIProcess/win/WebView.cpp: (WebKit::WebView::setFindIndicator): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): (WebKit::WebPage::drawPagesToPDF): * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::platformPreferencesDidChange): * config.h: 2011-04-16 Anders Carlsson Reviewed by Sam Weinig. Crash when NPP_Write returns -1 when writing the manual stream https://bugs.webkit.org/show_bug.cgi?id=58735 If NPP_Write returns -1 we must cancel the stream. * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::deliverDataToPlugin): 2011-04-16 Sam Weinig Reviewed by Simon Fraser. Pages in the PageCache don't have the correct visited link coloring after being restored https://bugs.webkit.org/show_bug.cgi?id=58721 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::visitedLinkStateChanged): (WebKit::WebProcess::allVisitedLinkStateChanged): Mark all pages in the page cache as needing visited link style recalc whenever visited link information changes. 2011-04-15 Daniel Bates Attempt to fix the Qt Linux Release build after changeset 84064 (https://bugs.webkit.org/show_bug.cgi?id=58686). * UIProcess/API/qt/qwkpage_p.h: Remove takeFocus(). 2011-04-15 Shishir Agrawal Reviewed by James Robinson. Add a flag to guard Page Visibility API changes. https://bugs.webkit.org/show_bug.cgi?id=58464 * Configurations/FeatureDefines.xcconfig: 2011-04-15 Jeff Miller Reviewed by Sam Weinig. Add takeFocus callback to WKPageUIClient https://bugs.webkit.org/show_bug.cgi?id=58686 On Windows, we need to handle moving focus out of the web view in the client, so add a takeFocus callback to WKPageUIClient and stop handling taking focus in the framework in WKView.mm on the Mac. * UIProcess/API/C/WKPage.h: Added WKFocusDirection enum and takeFocus to WKPageUIClient. * UIProcess/API/mac/PageClientImpl.h: Removed takeFocus(). * UIProcess/API/mac/PageClientImpl.mm: Removed takeFocus(). * UIProcess/API/mac/WKView.mm: Removed _takeFocus(). * UIProcess/API/mac/WKViewInternal.h: Removed _takeFocus(). * UIProcess/API/qt/ClientImpl.cpp: (qt_wk_takeFocus): Added. * UIProcess/API/qt/ClientImpl.h: Added qt_wk_takeFocus. * UIProcess/API/qt/qwkpage.cpp: Remove takeFocus(). (QWKPage::QWKPage): Added takeFocus() callback. * UIProcess/PageClient.h: Removed takeFocus(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::takeFocus): Call m_uiClient to take focus. * UIProcess/WebPageProxy.h: Pass FocusDirection as a uint32_t to takeFocus(). * UIProcess/WebPageProxy.messages.in: Pass FocusDirection as a uint32_t in TakeFocus message. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::takeFocus): Added. * UIProcess/WebUIClient.h: Added takeFocus(). * UIProcess/win/WebView.cpp: Removed takeFocus(), which was never implemented on Windows. * UIProcess/win/WebView.h: Removed takeFocus(). * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::takeFocus): Pass FocusDirection as a uint32_t in TakeFocus message. 2011-04-15 Alexey Proskuryakov Reviewed by Sam Weinig. WebKit2: Stop using deprecated NSInputManager https://bugs.webkit.org/show_bug.cgi?id=58709 Changed all mouse related functions to give NSInputContext a chance to handle the event, added logging. Removed -rightMouseMoved: method, which was added by accident. * UIProcess/API/mac/WKView.mm: (-[WKView mouseMoved:]): (-[WKView mouseDown:]): (-[WKView mouseUp:]): (-[WKView mouseDragged:]): 2011-04-15 Jon Honeycutt Potential crash getting a JS wrapper. Reviewed by Brian Weinstein. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::jsWrapperForWorld): Ensure that we have a valid m_coreFrame, because it can be cleared by invalidate(). 2011-04-08 Luiz Agostini Reviewed by Kenneth Rohde Christiansen. [Qt] QWebPage MIME type handling inconsistency with other web browsers https://bugs.webkit.org/show_bug.cgi?id=46968 Implementing mime type sniffing based on http://tools.ietf.org/html/draft-abarth-mime-sniff-06. * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext): (WebCore::WebFrameNetworkingContext::MIMESniffingEnabled): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: 2011-04-15 Oliver Hunt GC allocate Structure https://bugs.webkit.org/show_bug.cgi?id=58483 Rolling r83894 r83827 r83810 r83809 r83808 back in with a workaround for the gcc bug seen by the gtk bots * WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::createStructure): * WebProcess/Plugins/Netscape/JSNPObject.h: (WebKit::JSNPObject::createStructure): 2011-04-15 Anders Carlsson Reviewed by Sam Weinig. Add API to get the bundle page overlay fade in fraction. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayFractionFadedIn): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 2011-04-15 Anders Carlsson Reviewed by Dan Bernstein. Fade the find page overlay https://bugs.webkit.org/show_bug.cgi?id=58697 * WebProcess/WebPage/FindController.cpp: Make the color components floats. (WebKit::overlayBackgroundColor): (WebKit::holeShadowColor): (WebKit::holeFillColor): Add helper functions for returning the colors given the fraction faded in. (WebKit::FindController::drawRect): Use the new helper functions. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): Start the fade animation unless we're replacing an already existing page overlay with another. 2011-04-15 Anders Carlsson Fix Windows build. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::fadeAnimationTimerFired): 2011-04-15 Anders Carlsson Reviewed by Sam Weinig. Add the ability for PageOverlays to fade in and out https://bugs.webkit.org/show_bug.cgi?id=58694 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageUninstallPageOverlay): WebPage::uninstallPageOverlay now takes a boolean. Default to false for now. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findString): Pass false to uninstallPageOverlay. (WebKit::FindController::hideFindUI): Pass true to uninstallPageOverlay. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::PageOverlay): Initialize new member variables. (WebKit::PageOverlay::bounds): Get rid of an unnecessary webPage() getter. (WebKit::PageOverlay::setPage): Stop the animation timer. (WebKit::PageOverlay::startFadeInAnimation): Update m_fractionFadedIn and call startFadeAnimation. (WebKit::PageOverlay::startFadeOutAnimation): Ditto. (WebKit::PageOverlay::startFadeAnimation): Initialize m_fadeAnimationStartTime and start the fade animation timer. (WebKit::PageOverlay::fadeAnimationTimerFired): Update m_fractionFadedIn and call setNeedsDisplay(). * WebProcess/WebPage/PageOverlay.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::uninstallPageOverlay): If fadeOut is true, tell the page overlay to start the fade out animation. When the fade animation is complete, the page overlay will uninstall itself. 2011-04-15 Brian Weinstein Reviewed by Adam Roben. Views should be made visible before painting in WM_PRINTCLIENT messages https://bugs.webkit.org/show_bug.cgi?id=58676 * UIProcess/win/WebView.cpp: (WebKit::WebView::onPrintClientEvent): If our view isn't currently visible set it to visible before painting, then reset it back to not visible after painting. (WebKit::WebView::onShowWindowEvent): Call setIsVisible instead of duplicating logic. (WebKit::WebView::setIsVisible): Set the m_isVisible flag and call viewStateDidChange. * UIProcess/win/WebView.h: 2011-04-15 Jon Lee Reviewed by Anders Carlsson. onClick does not function with Add SaveRecentSearches and LoadRecentSearches messages: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPageProxy.h: Message up to the UIProcess for the save/load operations: * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: (WebKit::WebSearchPopupMenu::saveRecentSearches): (WebKit::WebSearchPopupMenu::loadRecentSearches): * WebProcess/WebCoreSupport/WebPopupMenu.h: (WebKit::WebPopupMenu::page): Save the values to disk CFPreference-style: * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::autosaveKey): (WebKit::WebPageProxy::saveRecentSearches): (WebKit::WebPageProxy::loadRecentSearches): Stubbed out for non-CF platforms: * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::saveRecentSearches): (WebKit::WebPageProxy::loadRecentSearches): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::saveRecentSearches): (WebKit::WebPageProxy::loadRecentSearches): 2011-04-14 Alexey Proskuryakov Reviewed by Dan Bernstein. WebKit2: Password field input does not switch to ASCII-compatible source https://bugs.webkit.org/show_bug.cgi?id=58583 The implementation is more modern than what we have in WK1. Instead of returning a null input context (as in non-editable content), we now set page context's properties. * UIProcess/PageClient.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::updateSecureInputState): Forward updateSecureInputState() call from WebPageProxy to WKView. * UIProcess/API/mac/WKView.mm: (-[WKView dealloc]): ASSERT that we didn't somehow leave secure input events enabled. (-[WKView becomeFirstResponder]): Update secure event mode. (-[WKView resignFirstResponder]): Disable secure event mode. (-[WKView setMarkedText:selectedRange:replacementRange:]): Prevent most advanced editing behaviors in password fields, matching NSSecureTextInputField. (-[WKView attributedSubstringForProposedRange:actualRange:]): Disable TSM Document Access in password fields. There is also a check in web process, but it doest't hurt to check twice. (-[WKView _windowDidBecomeKey:]): Call _updateSecureInputState. (-[WKView _windowDidResignKey:]): Call _updateSecureInputState. (-[WKView _updateSecureInputState]): Update secure event mode and allowed input sources. * UIProcess/API/mac/WKViewInternal.h: Added _updateSecureInputState. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::selectionStateChanged): Update secure input state when going in or out a password field. 2011-04-14 Jer Noble Reviewed by Eric Carlson. REGRESSION: Rendering in