2012-01-24 Carlos Garcia Campos [GTK] Implement DownloadClient in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=72952 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitDownloadClient.cpp: Added. (didStart): Call webkitWebContextDownloadStarted(). (didReceiveResponse): Call webkitDownloadSetResponse() with the received response. (didReceiveData): Call webkitDownloadNotifyProgress(). (decideDestinationWithSuggestedFilename): Call webkitDownloadDecideDestinationWithSuggestedFilename(). (didCreateDestination): Call webkitDownloadDestinationCreated(). (didFail): Call webkitDownloadFailed() or webkitDownloadCancelled() if the download was cancelled before failing. (didCancel): Call webkitDownloadCancelled(). (didFinish): Call webkitDownloadFinished(). (attachDownloadClientToContext): Add implementation for download client callbacks. * UIProcess/API/gtk/WebKitDownloadClient.h: Added. * UIProcess/API/gtk/WebKitError.cpp: (webkit_download_error_quark): Add quark for download errors. * UIProcess/API/gtk/WebKitError.h: * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_class_init): Add download-started signal. (createDefaultWebContext): Initialize the download client. (downloadsMap): HashMap containing download objects for all ongoing download operations. (webkit_web_context_download_uri): Start a new download for the given URI. (webkitWebContextGetOrCreateDownload): Helper function to create a new download object or return the existing one from the downloads map. (webkitWebContextRemoveDownload): Remove the download object from the downloads map. (webkitWebContextDownloadStarted): Emit WebKitWebContext::download-started for the given download object. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/WebKitWebContextPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for downloads. * UIProcess/API/gtk/tests/TestDownloads.cpp: Added. (getWebKit1TestResoucesDir): (testDownloadLocalFile): (testDownloadLocalFileError): (serverCallback): (testDownloadRemoteFile): (testDownloadRemoteFileError): (beforeAll): (afterAll): 2012-01-23 Carlos Garcia Campos [GTK] Add WebKitDownload to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=72949 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitDownload.cpp: Added. (webkitDownloadFinalize): (webkitDownloadGetProperty): (webkitDownloadDecideDestination): (webkit_download_init): (webkit_download_class_init): (webkitDownloadCreate): Create a new WebKitDownload for a given WKDownloadRef. (webkitDownloadSetResponse): Set the network response of the download. (webkitDownloadIsCancelled): Whether the download has been cancelled by the user. (webkitDownloadNotifyProgress): Emit notify::estimated-progress if needed. (webkitDownloadFailed): Emit WebKitDownload::failed with the given error. (webkitDownloadCancelled): Emit WebKitDownload::failed with cancelled error. (webkitDownloadFinished): Emit WebKitDownload::finished. (webkitDownloadDecideDestinationWithSuggestedFilename): Emit WebKitDownload::decide-destination. (webkitDownloadDestinationCreated): Emit WebKitDownload::created-destination. (webkit_download_get_destination): Return the destination URI of the download. (webkit_download_set_destination): Set the destination URI of the download. (webkit_download_get_response): Return the response received by the server. (webkit_download_cancel): Cancel the download. (webkit_download_get_estimated_progress): Return the estimated progress. (webkit_download_get_elapsed_time): Return the time elapsed since the download started. * UIProcess/API/gtk/WebKitDownload.h: Added. * UIProcess/API/gtk/WebKitDownloadPrivate.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitURIResponse.cpp: (webkitURIResponseGetResourceResponse): * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_download_get_type(). * UIProcess/API/gtk/webkit2.h: Include WebKitDownload.h. * UIProcess/API/gtk/webkit2marshal.list: 2012-01-23 Geoffrey Garen JSValue::toString() should return a JSString* instead of a UString https://bugs.webkit.org/show_bug.cgi?id=76861 Reviewed by Gavin Barraclough. Mechanical changes to call value() after calling toString(), to convert from "JS string" (JSString*) to "C++ string" (UString), since toString() no longer returns a "C++ string". * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): 2012-01-23 Jesus Sanchez-Palencia [Qt][WK2] QQuickWebView is initializing touch mode twice while being constructed https://bugs.webkit.org/show_bug.cgi?id=76859 Reviewed by Kenneth Rohde Christiansen. Removing d->initializeTouch() from QQuickWebView::QQuickWebView() since in QQuickWebViewPrivate::initialize() there is a call for setUseTraditionalDesktopBehaviour(false), which will call initializeTouch. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::QQuickWebView): 2012-01-23 Martin Robinson [GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible https://bugs.webkit.org/show_bug.cgi?id=76755 Reviewed by Alejandro G. Castro. Always clear the loading events when loading new content in the load tracking test. In the WebView test correctly handle loading HTML with a URL that isn't "about:blank." * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: (LoadTrackingTest::loadURI): Reset the class state when starting a new load. (LoadTrackingTest::loadHtml): Ditto. (LoadTrackingTest::loadPlainText): Ditto. (LoadTrackingTest::loadRequest): Ditto. * UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions. * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: (assertNormalLoadHappened): No longer clear loading events. The fixture handles that now. (testLoadHtml): Update to reflect new method name. (testLoadPlainText): Ditto. (testLoadRequest): Ditto. (testWebViewReload): Ditto. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::loadHtml): Properly interpret the baseURL parameter. * UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual. 2012-01-23 Alexander Færøy [Qt] Implement SSL error handling QML API. https://bugs.webkit.org/show_bug.cgi?id=76793 Reviewed by Simon Hausmann. This patch implements support for accepting or rejecting invalid SSL certificates from the QML API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::handleCertificateVerificationRequest): (QQuickWebViewExperimental::certificateVerificationDialog): (QQuickWebViewExperimental::setCertificateVerificationDialog): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::certificateVerificationRequest): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtDialogRunner.cpp: (CertificateVerificationDialogContextObject::CertificateVerificationDialogContextObject): (CertificateVerificationDialogContextObject::hostname): (CertificateVerificationDialogContextObject::accept): (CertificateVerificationDialogContextObject::reject): (QtDialogRunner::initForCertificateVerification): * UIProcess/qt/QtDialogRunner.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleCertificateVerificationRequest): * UIProcess/qt/QtPageClient.h: * WebProcess/qt/QtNetworkAccessManager.cpp: (WebKit::QtNetworkAccessManager::QtNetworkAccessManager): (WebKit::QtNetworkAccessManager::onSslErrors): * WebProcess/qt/QtNetworkAccessManager.h: 2012-01-23 David Levin [windows] Convert usages of GetDC to HWndDC Part 2. https://bugs.webkit.org/show_bug.cgi?id=76750 Reviewed by Adam Roben. * Shared/win/ShareableBitmapWin.cpp: (WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr which would do a DeleteDC instead of a ReleaseDC. 2012-01-23 David Levin [windows] Convert usages of GetDC to HWndDC Part 1. https://bugs.webkit.org/show_bug.cgi?id=76744 Reviewed by Adam Roben. * UIProcess/win/WebView.cpp: (WebKit::WebView::flashBackingStoreUpdates): Typical conversion. 2012-01-21 Timothy Hatcher Make WebKit2 remember the height of the Web Inspector when it is docked. https://webkit.org/b/76769 Reviewed by Dan Bernstein. * Shared/WebPreferencesStore.h: Added InspectorAttachedHeight. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight. (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls. 2012-01-20 Viatcheslav Ostapenko [Qt] [WK2] Division by zero error in QtViewportInteractionEngine::setItemRectVisible https://bugs.webkit.org/show_bug.cgi?id=76674 Reviewed by Kenneth Rohde Christiansen. Make sure that itemRect is not empty. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::setItemRectVisible): 2012-01-20 Steve Falkenburg Reviewed by Alexey Proskuryakov. Drag/drop of a file into a WebView on Windows needs to allow access to that file https://bugs.webkit.org/show_bug.cgi?id=76753 The Windows drag/drop code path was missing the code to open a file read exception. Added code to match the Mac version, while allowing directories and multiple files to also be dragged (matching our previous behavior). * UIProcess/win/WebView.cpp: (WebKit::maybeCreateSandboxExtensionFromDragData): Added. (WebKit::WebView::Drop): Add a universal read exception if we're dragging a file into a WebView to open it. 2012-01-20 Jocelyn Turcotte [Qt] Trigger forcing accelerated compositing from the UI process side. https://bugs.webkit.org/show_bug.cgi?id=76296 Reviewed by Noam Rosenthal. Some messages can be sent from the web view to the LayerTreeHost before accelerated compositing is entered on the web process and signaled back. By letting the UI process decide if AC has to be forced, we can create the LayerTreeHostProxy earlier to send messages to the web process while AC is being entered there. This patch also fixes the flow of DidRenderFrame and RenderNextFrame messages by setting the m_waitingForUIProcess flag properly and only send the RenderNextFrame once the painting thread on the UI process is ready to paint. This fixes the first visible content rect message not being received when loading pages from the disk. * Shared/WebPreferencesStore.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::flushLayerChanges): (WebKit::LayerTreeHostProxy::didRenderFrame): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::performScheduledLayerFlush): * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::platformInitialize): 2012-01-20 Sheriff Bot Unreviewed, rolling out r105497. http://trac.webkit.org/changeset/105497 https://bugs.webkit.org/show_bug.cgi?id=76696 Leaking in Qt layout tests and timing out in GTK API tests. (Requested by jturcotte on #webkit). * Shared/WebPreferencesStore.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::platformInitialize): 2012-01-20 Mario Sanchez Prada [GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs https://bugs.webkit.org/show_bug.cgi?id=72589 Reviewed by Martin Robinson. Expose the accessibility hierarchy in the multi-process architecture of WK2 through AtkSocket and AtkPlug. Make the WebView widget return an AtkSocket when calling to gtk_widget_get_accessible(). * GNUmakefile.am: Add new files. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_init): (webkitWebViewBaseGetAccessible): (webkit_web_view_base_class_init): * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Added. (webkitWebViewBaseAccessibleWidgetFinalize): (webkitWebViewBaseAccessibleWidgetDestroyed): (webkitWebViewBaseAccessibleInitialize): (webkitWebViewBaseAccessibleRefStateSet): (webkitWebViewBaseAccessibleGetIndexInParent): (webkit_web_view_base_accessible_init): (webkit_web_view_base_accessible_class_init): (webkitWebViewBaseAccessibleNew): * UIProcess/API/gtk/WebKitWebViewBaseAccessible.h: Added. Make the WebPage create an AtkPlug on its initialization and sending the ID of that plug to the UI process, so it can embed the plug in the socket. Also, take care of all the needed wrapping around the WebCore's accessibility objects, exposing them in the UI process's accessibility hierarchy thanks to the socket-plug connection. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::accessibilityPlugID): * UIProcess/WebPageProxy.messages.in: * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::bindAccessibilityTree): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): * WebProcess/WebPage/gtk/WebPageAccessibilityObject.cpp: Added. (accessibilityRootObjectWrapper): (webPageAccessibilityObjectInitialize): (webPageAccessibilityObjectGetIndexInParent): (webPageAccessibilityObjectGetNChildren): (webPageAccessibilityObjectRefChild): (web_page_accessibility_object_init): (web_page_accessibility_object_class_init): (webPageAccessibilityObjectNew): (webPageAccessibilityObjectRefresh): * WebProcess/WebPage/gtk/WebPageAccessibilityObject.h: Added. * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::platformInitialize): (WebKit::WebPage::updateAccessibilityTree): New unit test for checking accessibility support in WK2GTK. * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp: Added. (loadChangedCallback): Notify the parent process (the test) when ready. (main): * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: Added. (stopTestServer): (sigAbortHandler): (testServerMonitorThreadFunc): (startTestServerMonitor): (startTestServer): (checkAtspiAccessible): (findTestServerApplication): (testAtspiBasicHierarchy): (beforeAll): (afterAll): 2012-01-19 Jocelyn Turcotte [Qt] Public API watch dog auto test. https://bugs.webkit.org/show_bug.cgi?id=73922 Reviewed by Simon Hausmann. This test aims to prevent unintended/unapproved modifications to the public QML API. * UIProcess/API/qt/tests/publicapi/publicapi.pro: Added. * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: Added. (isCheckedEnum): (isCheckedClass): (checkKnownType): (gatherAPI): (tst_publicapi::publicAPI): 2012-01-13 Jocelyn Turcotte [Qt] Trigger forcing accelerated compositing from the UI process side. https://bugs.webkit.org/show_bug.cgi?id=76296 Reviewed by Noam Rosenthal. Some messages can be sent from the web view to the LayerTreeHost before accelerated compositing is entered on the web process and signaled back. By letting the UI process decide if AC has to be forced, we can create the LayerTreeHostProxy earlier to send messages to the web process while AC is being entered there. This fixes the first visible content rect message not being received when loading pages from the disk. * Shared/WebPreferencesStore.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::platformInitialize): 2012-01-20 Alexandru Chiculita CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime https://bugs.webkit.org/show_bug.cgi?id=76444 Reviewed by Nikolas Zimmermann. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCSSCustomFilterEnabled): (WKPreferencesGetCSSCustomFilterEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-01-19 Sam Weinig Replace improper #import with an #include. * UIProcess/Plugins/PluginProcessProxy.cpp: Fixes warnings. 2012-01-18 Sam Weinig Move RunLoop to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=76471 Reviewed by Anders Carlsson. * GNUmakefile.am: * Platform/CoreIPC/Connection.cpp: * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/mac/ConnectionMac.cpp: * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginProcess.cpp: * PluginProcess/PluginProcess.h: * PluginProcess/WebProcessConnection.cpp: * PluginProcess/mac/PluginProcessMainMac.mm: * PluginProcess/qt/PluginProcessMainQt.cpp: * Shared/ChildProcess.cpp: * Shared/ChildProcess.h: * Target.pri: * UIProcess/API/mac/FindIndicatorWindow.h: * UIProcess/API/mac/WKView.mm: * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/Launcher/ThreadLauncher.cpp: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: * UIProcess/Launcher/mac/ThreadLauncherMac.mm: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: * UIProcess/Launcher/win/ProcessLauncherWin.cpp: * UIProcess/Launcher/win/ThreadLauncherWin.cpp: * UIProcess/LayerTreeHostProxy.h: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/ResponsivenessTimer.cpp: * UIProcess/ResponsivenessTimer.h: * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/VisitedLinkProvider.h: * UIProcess/WebConnectionToWebProcess.cpp: * UIProcess/WebConnectionToWebProcess.h: * UIProcess/WebContext.cpp: * UIProcess/win/WebView.cpp: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginStream.h: * WebProcess/Plugins/PluginView.h: * WebProcess/WebConnectionToUIProcess.cpp: * WebProcess/WebConnectionToUIProcess.h: * WebProcess/WebCoreSupport/WebGraphicsLayer.h: * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/EventDispatcher.cpp: * WebProcess/WebPage/PageOverlay.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: (WebKit::WebProcess::runLoop): * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/mac/WebProcessMainMac.mm: * WebProcess/qt/WebProcessMainQt.cpp: * WebProcess/win/WebProcessMainWin.cpp: * win/WebKit2.vcproj: Remove RunLoop code and update #includes. 2012-01-18 Ada Chan Need a WebKit2 API for setting media volume https://bugs.webkit.org/show_bug.cgi?id=76560 Reviewed by Dan Bernstein. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter. (WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter. * Shared/WebPageCreationParameters.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume(). * UIProcess/API/C/WKPagePrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume. (WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume and bail if the page is no longer valid. Otherwise, send a WebPage::SetMediaVolume message to the web process. (WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters. * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters. (WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume(). * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message. 2012-01-19 Carlos Garcia Campos [GTK] WebKit2 GTK+ API public headers are not installed https://bugs.webkit.org/show_bug.cgi?id=76626 Reviewed by Martin Robinson. * GNUmakefile.am: Rename webkit2gtk_headers as libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so that headers are installed during make install. 2012-01-19 Carlos Garcia Campos [GTK] Add print-backgrounds setting to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76616 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): (webkit_settings_get_print_backgrounds): (webkit_settings_set_print_backgrounds): * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): 2012-01-18 Jocelyn Turcotte [Qt] Handle the layers visible rect calculation on the web process. https://bugs.webkit.org/show_bug.cgi?id=74720 Reviewed by Noam Rosenthal. The layers now get their visible rect on the web process through the root layer when the UI process call setVisibleContentRectAndScale, previously only used for the non-composited content layer. The rect is then carried down the layers in the tree which apply it the inverse of their transform before handing it to their tiled backing store. This ensures that new layers get a proper visible rect right on creation, and also that simultaneous visible rect and scale changes are applied synchronously. This patch also uses clampedBoundsOfProjectedQuad instead of mapRect to transform the visible rect correctly for 3D transformed layers. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initializeDesktop): (QQuickWebViewPrivate::initializeTouch): (QQuickWebViewPrivate::updateDesktopViewportSize): (QQuickWebViewPrivate::updateTouchViewportSize): (QQuickWebView::geometryChanged): Make sure that the visible rect is updated for the desktop view as well. * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/LayerTreeHostProxy.h: * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::paintToCurrentGLContext): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setChildren): (WebCore::WebGraphicsLayer::addChild): (WebCore::WebGraphicsLayer::addChildAtIndex): (WebCore::WebGraphicsLayer::addChildAbove): (WebCore::WebGraphicsLayer::addChildBelow): (WebCore::WebGraphicsLayer::replaceChild): (WebCore::WebGraphicsLayer::setMaskLayer): (WebCore::WebGraphicsLayer::syncCompositingState): (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale): (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect): (WebCore::WebGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: * WebProcess/WebPage/LayerTreeHost.messages.in: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale): * WebProcess/WebPage/qt/LayerTreeHostQt.h: 2012-01-18 Jon Lee Another build fix for r105364. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Missing #if. 2012-01-18 Jon Lee Build fix for r105364. Unreviewed. * WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS) (WebKit::WebNotificationManager::initialize): (WebKit::WebNotificationManager::didUpdateNotificationDecision): (WebKit::WebNotificationManager::didRemoveNotificationDecisions): (WebKit::WebNotificationManager::policyForOrigin): 2012-01-18 Jon Lee [WK2] Sync call for notifications permissions causes flashes on gmail.com https://bugs.webkit.org/show_bug.cgi?id=76570 Reviewed by Anders Carlsson and Sam Weinig. The website code figures out the permission level for its security origin by making a JS call (called checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and returns that policy back to the JS. The synchronous nature of this call causes the white flash to appear in certain cases. To fix this, the checkPermission() call is handled all within the web process, instead of going up into the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the notification permissions. Any time the WK client makes a change to the permissions, that gets sent down asynchronously, and the cached copy in WebNotificationManager gets updated. A page's settings may disable notifications altogether. Before, this would have been handled by the WK client, since retrieving the permissions were also handled there. Now that the lookup happens in the web process, we need to add that setting in WebCore. == Update notification permissions to use the security origin's string representation, rather than its database identifier. * UIProcess/Notifications/WebNotification.cpp: (WebKit::WebNotification::WebNotification): * UIProcess/Notifications/WebNotification.h: (WebKit::WebNotification::create): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in initialize() now. (WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in initialize() now. * UIProcess/Notifications/WebNotificationManagerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestNotificationPermission): (WebKit::WebPageProxy::showNotification): * UIProcess/WebPageProxy.h: * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications are enabled. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Only show notification is they are enabled. (WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled. == Remove synchronous message to get policy for a given origin. Instead, use the cached copy in WebNotificationManager. * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy. If it doesn't exist, return NotificationPresenter::PermissionNotAllowed. * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use policyForOrigin(). Remove old WK API function to get the policy. Because this function was the only synchronous message, we remove the sync-message-related functions also. Also, add in some #includes that might have been omitted in prior patches. * UIProcess/API/C/WKNotificationProvider.h: * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel. * UIProcess/Notifications/WebNotificationManagerProxy.h: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin(). * UIProcess/Notifications/WebNotificationProvider.cpp: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the notification manager proxy. == Mechanism for client to update the permissions copy in WebNotificationManager. * WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages didUpdateNotificationDecision and didRemoveNotificationDecisions. * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::initialize): (WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry. (WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry. * UIProcess/Notifications/WebNotificationManagerProxy.h: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy): (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of origins to remove, and send it to the WebNotificationManager. * UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API. * UIProcess/API/C/WKNotificationManager.cpp: (WKNotificationManagerProviderDidUpdateNotificationPolicy): (WKNotificationManagerProviderDidRemoveNotificationPolicies): == Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit from settings. * Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the parameters. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions. * UIProcess/Notifications/WebNotificationProvider.cpp: * UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions. * UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions(). * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization. Similar calls in show() and cancel() are removed in following patch. (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy. Populate with origin string, and whether that origin is allowed to post. If no decision has been made by the user, then there should be no item in this dictionary. * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the permissions, and send it to the web process to initialize the notification manager. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager. * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::initialize): Initialize the permissions copy. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings. == Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956. * Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCreateFromString): (WKSecurityOriginCreateFromDatabaseIdentifier): (WKSecurityOriginCopyToString): Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier() and add WebSecurityOrigin::createFromString(). * Shared/WebSecurityOrigin.h: (WebKit::WebSecurityOrigin::createFromString): (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): (WebKit::WebSecurityOrigin::toString): Added function. Refactor with renamed createFromDatabaseIdentifier() method. * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin): (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins): (WebKit::WebDatabaseManagerProxy::didModifyOrigin): (WebKit::WebDatabaseManagerProxy::didModifyDatabase): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::exceededDatabaseQuota): (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): == Add WK API calls to change notificationsEnabled bit in WebCore::Settings. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetNotificationsEnabled): (WKPreferencesGetNotificationsEnabled): * UIProcess/API/C/WKPreferences.h: 2012-01-18 Anders Carlsson REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time https://bugs.webkit.org/show_bug.cgi?id=76587 Reviewed by Sam Weinig. * UIProcess/cf/WebPageProxyCF.cpp: Change CurrentSessionStateDataVersion back to 2. * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeString): * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::encodeString): Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886. 2012-01-17 Alexey Proskuryakov [Mac] Add a flag telling plug-in if it can enter sandbox https://bugs.webkit.org/show_bug.cgi?id=76467 Reviewed by Anders Carlsson. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Added a private flag. 2012-01-18 Eric Carlson Provide access to user's list of preferred languages https://bugs.webkit.org/show_bug.cgi?id=76138 Reviewed by Alexey Proskuryakov. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode the languages array. (WebKit::WebProcessCreationParameters::decode): Decode the languages array. * Shared/WebProcessCreationParameters.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::languageChanged): Override the WebProcess userPreferredLanguages. (WebKit::WebContext::ensureWebProcess): Initialize parameters.languages. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Override user languages array. (WebKit::WebProcess::userPreferredLanguagesChanged): Ditto. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Define UserPreferredLanguagesChanged. * win/WebKit2.def: Export the new functions. * win/WebKit2CFLite.def: Ditto. 2012-01-18 Luciano Wolf [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink https://bugs.webkit.org/show_bug.cgi?id=76538 Reviewed by Tor Arne Vestbø. The -lrt parameter was coming before -lWebKit2 during linkage. Moved rt lib inclusion from Source/api.pri to WebKit2.pri as it should be aware of its own dependencies instead of letting WebKit guess about. Letting it on api.pri can lead to a wrong parameter's order during linker phase. Ubuntu 11.10 was giving errors about SharedMemory (shm_open and shm_unlink undefined symbols). The issue was fixed with the help of Aloisio Almeida and Lauro Venancio. * WebKit2.pri: 2012-01-18 Carlos Garnacho [GTK] Listen to GDK_SCROLL_MASK https://bugs.webkit.org/show_bug.cgi?id=76529 Set GDK_SCROLL_MASK explicitly, as WebKitWebViewBase does handle scroll events, scrolling currently works because GTK+ happens to send such events to widgets listening to GDK_BUTTON_PRESS_MASK, but this isn't the intended behavior, so it's subject to change. Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): 2012-01-18 Andras Becsi [Qt][WK2] Fix the debug build. Unreviewed. * UIProcess/qt/QtWebPageEventHandler.cpp: (setInputPanelVisible): Remove assertion from non-member function. 2012-01-12 Kenneth Rohde Christiansen [Qt] Zoom in to the focused node only when vkb starts becoming visible https://bugs.webkit.org/show_bug.cgi?id=76174 Reviewed by Simon Hausmann. Remove the old code which always zoomed in when something got focus, even via JavaScript, and replaced it with code checking the state of the Qt input panel. Also make sure that we do not zoom in or request the input panel if the item is not focused. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtPageClient.cpp: * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::~QtWebPageEventHandler): (QtWebPageEventHandler::inputPanelVisibleChanged): * UIProcess/qt/QtWebPageEventHandler.h: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): 2012-01-18 Shinya Kawanaka Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement. https://bugs.webkit.org/show_bug.cgi?id=76241 Reviewed by Dimitri Glazkov. * win/WebKit2.def: Exposed necessary symbols. * win/WebKit2CFLite.def: ditto. 2012-01-17 Hajime Morrita [Internals] Should be able to access corresponding Document object. https://bugs.webkit.org/show_bug.cgi?id=76425 Reviewed by Adam Barth. * win/WebKit2.def: Added exporting symbols. * win/WebKit2CFLite.def: Added exporting symbols. 2012-01-17 Matthew Delaney On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier. Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Init new function. (InitWebCoreSystemInterface): 2012-01-17 Sam Weinig Rename quickLookPreviewItemsAtWindowLocation: to quickLookWithEvent: Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView quickLookWithEvent:]): 2012-01-17 Sam Weinig Add helper macro for forward declaring objective-c classes https://bugs.webkit.org/show_bug.cgi?id=76485 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebDragClient.h: Deploy OBJC_CLASS for a little code reduction. * config.h: Remove duplicate copy of OBJC_CLASS. 2012-01-17 Martin Robinson [GTK] [WK2] WebKitPrivate should include the entire WebKit2 C API https://bugs.webkit.org/show_bug.cgi?id=76345 Reviewed by Gustavo Noronha Silva. Isolate all of the WebKit2 C API includes into WebKitPrivate.h and no longer include anything other than WebKit2.h for the C API. * UIProcess/API/gtk/WebKitBackForwardList.cpp: Use WebKitPrivate.h now. * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto. * UIProcess/API/gtk/WebKitPrivate.h: Add WebKit2.h, WKAPICast.h and WKRetainPtr.h includes. * UIProcess/API/gtk/WebKitSettings.cpp: Use WebKitPrivate.h. * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto. * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto. * UIProcess/API/gtk/WebKitWebView.cpp: Ditto. * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto. * UIProcess/API/gtk/WebKitWindowProperties.cpp: Ditto. 2012-01-17 Alexander Færøy [Qt] Implement HTTP authentication QML API https://bugs.webkit.org/show_bug.cgi?id=75535 Reviewed by Kenneth Rohde Christiansen. This patch implements the QML API for handling HTTP authentication. The implementation uses a syncronous message between the WebProcess and the UIProcess which is called when the authenticationRequired signal is emitted from QNAM. Based in part upon patch by Peter Hartmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::handleAuthenticationRequiredRequest): (QQuickWebViewExperimental::authenticationDialog): (QQuickWebViewExperimental::setAuthenticationDialog): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::authenticationRequiredRequest): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtDialogRunner.cpp: (AuthenticationDialogContextObject::AuthenticationDialogContextObject): (AuthenticationDialogContextObject::hostname): (AuthenticationDialogContextObject::realm): (AuthenticationDialogContextObject::prefilledUsername): (AuthenticationDialogContextObject::accept): (AuthenticationDialogContextObject::reject): (QtDialogRunner::initForAuthentication): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner::username): (QtDialogRunner::password): (QtDialogRunner::onAuthenticationAccepted): * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleAuthenticationRequiredRequest): * UIProcess/qt/QtPageClient.h: * WebProcess/qt/QtNetworkAccessManager.cpp: (WebKit::QtNetworkAccessManager::QtNetworkAccessManager): (WebKit::QtNetworkAccessManager::onAuthenticationRequired): * WebProcess/qt/QtNetworkAccessManager.h: 2012-01-16 Dan Bernstein REGRESSION: Every Safari Reader WKView leaks Reviewed by John Sullivan and Ada Chan. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): Since this method can be called multiple times in a row while [self window] is non-nil, check if there isn’t already an event monitor before adding a new one. 2012-01-16 Anders Carlsson Crash when calling SecItemAdd with a null result pointer https://bugs.webkit.org/show_bug.cgi?id=76407 Reviewed by Brady Eidson. Add null check. * WebProcess/mac/SecItemShimMethods.mm: (WebKit::webSecItemAdd): 2012-01-16 Jon Lee Build fix for r105086. * Configurations/FeatureDefines.xcconfig: 2012-01-16 Zeno Albisser [Qt] Fix QT_VERSION related warnings when building on Mac OS X https://bugs.webkit.org/show_bug.cgi?id=76340 This bug was caused by r104826. As was already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239 we should not use "using namespace WebCore" in header files, because it might cause ambiguous references. This patch reverts the changes from r104826 and r104981 and removes the "using namespace WebCore" statement from two header files. Reviewed by Tor Arne Vestbø. * Shared/WebLayerTreeInfo.h: (WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo): (WebKit::WebLayerAnimation::WebLayerAnimation): * UIProcess/LayerTreeHostProxy.h: (WebKit::LayerTreeHostProxy::layerByID): (WebKit::LayerTreeHostProxy::rootLayer): (WebKit::LayerTreeHostProxy::notifyAnimationStarted): (WebKit::LayerTreeHostProxy::notifySyncRequired): * UIProcess/qt/LayerTreeHostProxyQt.cpp: * WebProcess/WebCoreSupport/WebGraphicsLayer.h: * WebProcess/WebPage/qt/LayerTreeHostQt.h: 2012-01-16 Alexander Færøy [Qt] Remove references to PagePointer in the FrameNetworkingContext https://bugs.webkit.org/show_bug.cgi?id=76342 Reviewed by Simon Hausmann. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createNetworkingContext): * WebProcess/qt/QtNetworkAccessManager.cpp: (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage): * WebProcess/qt/QtNetworkAccessManager.h: 2012-01-14 Dan Bernstein Crash in WebProcess at com.apple.CFNetwork: URLCredentialStorage::CreateCurrentPersistentCredentials + 298 Reviewed by Anders Carlsson. * WebProcess/mac/SecItemShimMethods.mm: (WebKit::initializeSecItemShim): Removed an early return that was accidentally added in r105008. 2012-01-13 Anders Carlsson Delay updating the root compositing layer if the layer tree state is frozen https://bugs.webkit.org/show_bug.cgi?id=76316 Reviewed by Dan Bernstein. When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2012-01-13 Anders Carlsson Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen https://bugs.webkit.org/show_bug.cgi?id=76308 Reviewed by Sam Weinig. Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen): (WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen): (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2012-01-13 Anders Carlsson Disable implicit animations when setting the root compositing layer https://bugs.webkit.org/show_bug.cgi?id=76304 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2012-01-13 Jocelyn Turcotte TextureMapper: Extract layer transform logic to a LayerTransform class. https://bugs.webkit.org/show_bug.cgi?id=76291 Reviewed by Noam Rosenthal. Move the paint call before the visible rect collection to make sure that transforms are computed. This will increase the delay for the visible rects to get to the WebProcess until we move this calculation out of the UI Process. This fixes an assert triggering in LayerTransform::combineTransforms. * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::paintToCurrentGLContext): 2012-01-13 Brent Fulgham [WinCairo] Build correction. * Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h. 2012-01-12 Martin Robinson [GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes https://bugs.webkit.org/show_bug.cgi?id=74478 Reviewed by Gustavo Noronha Silva. Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse. They are the WebCore types they are meant to represent and we will need to expose more information from them in the future to make them useful. Later we can have ResourceResponse generate a SoupMessage lazily if necessary. * GNUmakefile.am: * UIProcess/API/gtk/WebKitURIRequest.cpp: (webkit_uri_request_class_init): Remove the set property vmethod. (webkit_uri_request_new): The URI property is no longer settable. (webkitURIRequestCreateForResourceRequest): Added this private constructor. (webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest. * UIProcess/API/gtk/WebKitURIResponse.cpp: (webkit_uri_response_class_init): Remove the set property vmethod. (webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse. (webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse. (webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse. (webkitURIResponseCreateForResourceResponse): Added this private constructor. * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods. 2012-01-12 No'am Rosenthal [Qt][WK2] WebProcesses crashes when composited reflections/masks are present https://bugs.webkit.org/show_bug.cgi?id=75883 Reviewed by Kenneth Rohde Christiansen. Make sure masks and replica layers can access layerTreeTileClient. Let masks have the right contents/visible rect so that they can render content tiles. Default the mask's size to be the layer's size. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::WebGraphicsLayer): (WebCore::WebGraphicsLayer::setSize): (WebCore::WebGraphicsLayer::setMaskLayer): (WebCore::WebGraphicsLayer::setReplicatedByLayer): (WebCore::WebGraphicsLayer::syncCompositingState): (WebCore::WebGraphicsLayer::setContentsScale): (WebCore::WebGraphicsLayer::setVisibleContentRect): (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect): (WebCore::WebGraphicsLayer::updateTileBuffersRecursively): (WebCore::WebGraphicsLayer::layerTreeTileClient): (WebCore::WebGraphicsLayer::purgeBackingStores): (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded): (WebCore::WebGraphicsLayer::setLayerTreeTileClient): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebCore::WebGraphicsLayer::maskTarget): (WebCore::WebGraphicsLayer::setMaskTarget): 2012-01-12 Kenneth Rohde Christiansen [Qt] Set the input method hints on the QtQuick item https://bugs.webkit.org/show_bug.cgi?id=76169 Reviewed by Simon Hausmann. Set the input method hints given the HTMLElement type and state. * Shared/EditorState.cpp: (WebKit::EditorState::encode): (WebKit::EditorState::decode): * Shared/EditorState.h: (WebKit::EditorState::EditorState): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::updateTextInputState): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2012-01-12 Eunmi Lee [EFL][WK2] Update and show ewk_view with updated webpage. https://bugs.webkit.org/show_bug.cgi?id=76023 Reviewed by Andreas Kling. Update ewk_view with BackingStore image which is rendered webpage image by WebProcess, and show updated image's area when PageClientImpl::setViewNeedsDisplay() is called. The ewk_view_display() function is used to display updated area of evas_object_image and the ewk_view_image_data_set() function is used to set evas_object_image's data with rendered webpage. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::setViewNeedsDisplay): * UIProcess/API/efl/ewk_private.h: Added. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_add): (ewk_view_display): (ewk_view_image_data_set): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): 2012-01-12 Ryuan Choi [EFL][WK2] Network is not available when SOUP is enabled. https://bugs.webkit.org/show_bug.cgi?id=76112 Reviewed by Andreas Kling. ecore_main_loop_glib_integrate should be called to use glib based library such as SOUP. * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): 2012-01-12 Ryuan Choi [EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp https://bugs.webkit.org/show_bug.cgi?id=76115 Reviewed by Andreas Kling. This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS and WebProcessStore.h to have font family preference and WebEditorClient.cpp to use platform specific handleKeyboardEvent(), handleInputMethodKeydown() * Platform/SharedMemory.h: * Shared/WebPreferencesStore.h: * WebProcess/WebCoreSupport/WebEditorClient.cpp: 2012-01-11 Carlos Garcia Campos [GTK] Web process should use the same locale than UI process https://bugs.webkit.org/show_bug.cgi?id=76054 Reviewed by Gustavo Noronha Silva. * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childSetupFunction): Make child process use the same locale than its parent. 2012-01-11 Ryuan Choi [WK2] Share cairo specific codes with EFL port. https://bugs.webkit.org/show_bug.cgi?id=75457 Reviewed by Brent Fulgham. Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share with EFL port. * Shared/WebGraphicsContext.cpp: (WebKit::WebGraphicsContext::WebGraphicsContext): * Shared/WebGraphicsContext.h: 2012-01-11 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=75904 WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all the time -and corresponding- Reviewed by Darin Adler. This patch gets rid of the optional parameter called onlyUpdateScrollbars for WebCore::EventHandler::mouseMoved() and instead moves that functionality into its own function called passMouseMovedEventToScrollbars(). * WebProcess/WebPage/WebPage.cpp: (WebKit::handleMouseEvent): 2012-01-11 Brent Fulgham WinCairo build correction. * UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port. 2012-01-11 Anders Carlsson Webpages flash white when switching between windows https://bugs.webkit.org/show_bug.cgi?id=76080 Reviewed by Dan Bernstein. Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear) * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): Set _windowHasValidBackingStore to false if the new size is different from the old size. (-[WKView viewDidMoveToWindow]): Set _windowHasValidBackingStore to false. (-[WKView _windowDidMiniaturize:]): Set _windowHasValidBackingStore to false. (-[WKView _windowDidChangeBackingProperties:]): Set _windowHasValidBackingStore to false. (-[WKView drawRect:]): Only call drawPageBackground if _windowHasValidBackingStore is false. Set it to true after painting. 2012-01-11 Anders Carlsson Fix the Mac GCC build. Work around the fact that GCC doesn't work very well with Blocks and C++ objets. * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::dispatchFunctionOnQueue): (WebKit::WebProcessProxy::secItemRequest): (WebKit::WebProcessProxy::secKeychainItemRequest): 2012-01-11 No'am Rosenthal [Qt][WK2] Directly-composited images sometimes appear with a wrong geometry https://bugs.webkit.org/show_bug.cgi?id=75882 Reviewed by Simon Hausmann. When assigning a directly composited image to a TextureMapperNode in WebKit2, we take contentsRect() onto account. However, contentsRect() might be changed after the image is already assigned. We have to reassign the image when contentsRect() changes. This is a pretty cheap operation, since the image is already converted to a texture and we simply change the geometric values. * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::syncLayerParameters): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): 2012-01-11 Kenneth Rohde Christiansen [Qt] Add the editor rect to the EditorState https://bugs.webkit.org/show_bug.cgi?id=76053 Reviewed by Simon Hausmann. Also rename some members to match the new Qt naming scheme. * Shared/EditorState.cpp: (WebKit::EditorState::encode): (WebKit::EditorState::decode): * Shared/EditorState.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::inputMethodQuery): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2012-01-11 Gustavo Noronha Silva [GTK] Linking of big binaries should be serialized to avoid thrashing https://bugs.webkit.org/show_bug.cgi?id=75977 Reviewed by Martin Robinson. Added artificial dependencies so that libwebkitgtk is always linked first, libwebkit2gtk second, and WebKitPluginProcess last. Automake unfortunately replaces the whole rule used to build the libraries if the actual name is used to add the dependency, so we use helper variables to work around that. * GNUmakefile.am: 2012-01-11 Ryuan Choi [EFL][WK2] Rename viewObject to viewWidget https://bugs.webkit.org/show_bug.cgi?id=75947 Reviewed by Martin Robinson. Rename viewObject to viewWidget for the EFL port to use WidgetBackingStore which calls viewWidget(). * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::setViewNeedsDisplay): (WebKit::PageClientImpl::viewSize): * UIProcess/API/efl/PageClientImpl.h: (WebKit::PageClientImpl::create): (WebKit::PageClientImpl::viewWidget): * UIProcess/WebPageProxy.h: * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::viewWidget): 2012-01-10 Mark Rowe REGRESSION (r104377): All pages print blank on Snow Leopard / We need to explicitly load PDFKit.framework before using PDFDocument and friends. On SnowLeopard the framework is not necessarily loaded by anything else before we print, which would lead to us failing to allocate the PDFDocument that we use for drawing the content from the web process. Reviewed by Dan Bernstein. * UIProcess/API/mac/WKPrintingView.mm: (pdfKitFrameworkPath): Construct the path to the PDFKit framework. (classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the given class from it. (pdfAnnotationLinkClass): ASSERT that we found the class. (pdfDocumentClass): Ditto. 2012-01-10 Chris Marrin Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work Unreviewed. * WebProcess/WebCoreSupport/WebChromeClient.h: 2012-01-10 Viatcheslav Ostapenko [Qt][WK2]REGRESSION(r102435): It made tst_QQuickWebView::show() crash https://bugs.webkit.org/show_bug.cgi?id=74176 Reviewed by Noam Rosenthal. Check texture mapper exists already in ensureRootLayer to avoid recrecation. Check if root layer was deleted already in purgeGLResources. Added multipleWebViewWindows and multipleWebViews API tests. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::multipleWebViewWindows): (tst_QQuickWebView::multipleWebViews): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::ensureRootLayer): (WebKit::LayerTreeHostProxy::purgeGLResources): 2012-01-10 Ryosuke Niwa Snow Leopard build fix. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: 2012-01-10 Anders Carlsson Hang opening movie that requires authentication https://bugs.webkit.org/show_bug.cgi?id=75989 Reviewed by Sam Weinig. Change the way the keychain calls are processed to avoid deadlocks: 1. When a keychain call is made, the web process sends an asynchronous request message to the UI process, avoiding the need to bounce calls to the main thread (since CoreIPC only allows sending synchronous messages from the main thread). Incidentally, this fixes . 2. The Web Process now waits on the calling thread, (for a condition variable to be signalled) for a reply message. 3. The UI process handles the incoming message request message on the connection work queue and uses dispatch_async to a global dispatch queue where the keychain call is made. We use a global queue to prevent the connection work queue from blocking on the call. 4. The UI process then sends an asynchronous reply message back to the web process. This message is sent from the global dispatch queue. 5. The Web Process handles the reply message on the connection queue, adds the reply to a map and signals the condition variable that the web process is waiting on and the thread that made the keychain call can resume execution. * Shared/mac/SecItemRequestData.cpp: (WebKit::SecItemRequestData::SecItemRequestData): (WebKit::SecItemRequestData::encode): (WebKit::SecItemRequestData::decode): * Shared/mac/SecItemRequestData.h: (WebKit::SecItemRequestData::type): Add a type to SecItemRequestData and encode/decode it. * Shared/mac/SecItemResponseData.h: (WebKit::SecItemResponseData::resultObject): Make this return a reference so we can call leakRef() on it. * Shared/mac/SecKeychainItemRequestData.cpp: (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData): (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData): (WebKit::SecKeychainItemRequestData::attributeList): (WebKit::SecKeychainItemRequestData::encode): (WebKit::SecKeychainItemRequestData::decode): * Shared/mac/SecKeychainItemRequestData.h: (WebKit::SecKeychainItemRequestData::type): Add a type, and put the OwnPtr and OwnArrayPtr in a RefCounted struct so we can correctly copy this object. * UIProcess/WebConnectionToWebProcess.cpp: (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess): Don't open the connection here, the WebProcessProxy object needs to add itself as a queue client before opening. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::disconnect): Remove the WebProcessProxy object from the list of connection queue clients. (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): Call didReceiveWebProcessProxyMessageOnConnectionWorkQueue. (WebKit::WebProcessProxy::didFinishLaunching): Add the WebProcessProxy as a queue client and open the connection. * UIProcess/WebProcessProxy.h: WebProcessProxy should inherit from CoreIPC::Connection::QueueClient. Replace all individual keychain handler functions with two generic functions, secItemRequest and secKeychainItemRequest. * UIProcess/WebProcessProxy.messages.in: Replace individual keychain messages with SecItemRequest and SecKeychainItemRequest messages. * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::handleSecItemRequest): Call the right SecItem function depending on the request type and send back the result. (WebKit::WebProcessProxy::secItemRequest): Dispatch handleSecItemRequest on a global dispatch queue. (WebKit::handleSecKeychainItemRequest): Call the right SecKeychainItem function depending on the request type and send back the result. (WebKit::WebProcessProxy::secKeychainItemRequest): Dispatch handleSecKeychainItemRequest on a global dispatch queue. * WebKit2.xcodeproj/project.pbxproj: Update for added/removed files. * WebProcess/WebProcess.h: Add secItemResponse and secKeychainItemResponse message handlers. * WebProcess/WebProcess.messages.in: Add SecItemResponse and SecKeychainItemResponse messages. * WebProcess/mac/CoreIPCClientRunLoop.h: * WebProcess/mac/CoreIPCClientRunLoop.mm: This is no longer needed. * WebProcess/mac/KeychainItemShimMethods.h: * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::managedAttributeLists): Make this an atomically initialized static. (WebKit::managedAttributeListsMutex): Add an atomically initialized mutex. (WebKit::allocateAttributeListContents): Use the managedAttributeListsMutex to make this function callable from any thread. (WebKit::managedKeychainItemContents): Make this an atomically initialized static. (WebKit::managedKeychainItemContentsMutex): Add an atomically initialized mutex. (WebKit::allocateKeychainItemContentData): Use the managedAttributeListsMutex to make this function callable from any thread. (WebKit::webFreeAttributeListContent): Use locking so this can be called from any thread. (WebKit::webFreeKeychainItemContent): Ditto. (WebKit::responseMap): Add responseMap thread-safe singleton for holding incoming responses. (WebKit::generateSecKeychainItemRequestID): Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity. (WebKit::didReceiveSecKeychainItemResponse): Pass the response over the response map. (WebKit::sendSeqKeychainItemRequest): Send a request message and wait for a response using ResponseMap::waitForResponse. (WebKit::webSecKeychainItemCopyContent): Send a request using sendSeqKeychainItemRequest. (WebKit::webSecKeychainItemCreateFromContent): Ditto. (WebKit::webSecKeychainItemModifyContent): Ditto. * WebProcess/mac/KeychainShimResponseMap.h: New thread-safe helper class that stores a map of responses and lets client wait for a response with a given ID. (KeychainShimResponseMap::waitForResponse): Wait until the response is available in the hash map, then return it. (KeychainShimResponseMap::didReceiveResponse): Add the response to the hash map and signal the condition variable. * WebProcess/mac/SecItemShimMethods.h: * WebProcess/mac/SecItemShimMethods.mm: (WebKit::responseMap): Add responseMap thread-safe singleton for holding incoming responses. (WebKit::generateSecItemRequestID): Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity. (WebKit::didReceiveSecItemResponse): Pass the response over the response map. (WebKit::sendSeqItemRequest): Send a request message and wait for a response using ResponseMap::waitForResponse. (WebKit::webSecItemCopyMatching): Send a request using sendSeqItemRequest. (WebKit::webSecItemAdd): Ditto. (WebKit::webSecItemUpdate): Ditto. (WebKit::webSecItemDelete): Ditto. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::secItemResponse): Call didReceiveSecItemResponse. (WebKit::WebProcess::secKeychainItemResponse): Call didReceiveSecKeychainItemResponse. 2012-01-10 Anders Carlsson DispatchOnConnectionQueue messages should have a Connection parameter https://bugs.webkit.org/show_bug.cgi?id=75986 Reviewed by Adam Roben. Message handlers for messages with the DispatchOnConnectionQueue should have a CoreIPC::Connection parameter, making it easier to send messages back over that connection. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): (CoreIPC::handleMessageOnConnectionQueue): * Scripts/webkit2/messages.py: (async_case_statement): (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::EventDispatcher::gestureEvent): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::pluginProcessCrashed): * WebProcess/WebProcess.h: 2012-01-10 Chris Marrin Turn off the FilterTrigger in WebKit and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=75914 Reviewed by Simon Fraser. Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger. * WebProcess/WebCoreSupport/WebChromeClient.h: (WebKit::WebChromeClient::allowedCompositingTriggers): 2012-01-10 Kenneth Rohde Christiansen Unreviewed potential Mac WK2 build fix. * UIProcess/PageClient.h: forward declare WebGestureEvent. 2012-01-10 Csaba Osztrogonác Unreviewed, rolling out an accidental commit r104569. * Shared/EditorState.cpp: (WebKit::EditorState::encode): (WebKit::EditorState::decode): * Shared/EditorState.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::inputMethodQuery): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2012-01-10 Kenneth Rohde Christiansen Unreviewed potential Mac WK2 build fix. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithGestureEvent): 2012-01-10 Rafael Brandao [Qt][WK2] Add font-related API tests for QWebPreferences https://bugs.webkit.org/show_bug.cgi?id=75739 Reviewed by Zoltan Herczeg. * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: * UIProcess/API/qt/tests/qmltests/common/font-preferences.html: Added. 2012-01-10 Simon Hausmann [Qt] Fix failing WK2 layout tests after r104557 Reviewed by Kenneth Rohde Christiansen. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent): Add missing break to not handle mouseDown as gesture event. 2012-01-10 Kenneth Rohde Christiansen Unreviewed buildfix. * UIProcess/WebPageProxy.h: 2012-01-10 Kenneth Rohde Christiansen Implement the input panel request/close handling Reviewed by Simon Hausmann. With the current patch we only request the input panel as a response to a user tap. Close requests, on the other hand, is always respected. As multiple show/hide requests can happen while processing the tap gesture, input panel visibility changes are postponed until the tap gesture ends. The input panel will become visible if the WebCore editor is in canEdit mode and thus work for content-editable, meaning that it won't close the input panel if you click on a link (eg. editCommand) while in content-editable mode. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleGestureEvent): (WebKit::WebPageProxy::editorStateChanged): (WebKit::WebPageProxy::didReceiveEvent): Add a new doneWithGestureEvent method to the PageClient as well as add a updateTextInputState similar to that of mac. * UIProcess/WebPageProxy.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::updateTextInputState): (QtPageClient::doneWithGestureEvent): Propagate the new events to the Qt EventHandler. * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageEventHandler.cpp: * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::handleSingleTapEvent): (setInputPanelVisible): (QtWebPageEventHandler::updateTextInputState): (QtWebPageEventHandler::doneWithGestureEvent): Handle postponing of the input method visibility change and the actual showing/hiding. 2012-01-10 Eunmi Lee [EFL][WK2] Remove codes to move and resize the clip. https://bugs.webkit.org/show_bug.cgi?id=75428 Reviewed by Andreas Kling. Remove codes to move and resize the clip because clip is not used now. We have to show whole area of evas_object_image so we don't have to clip any area. In the WebKit1 Efl, the clip is used to clip the area to show during weak zoom, so we can use codes to manipulate the clip when we want to implement weak zoom for WebKit2 Efl. * UIProcess/API/efl/ewk_view.cpp: (_ewk_view_smart_calculate): 2012-01-09 Andras Becsi [Qt][WK2] Pinch zoom should affect the page size https://bugs.webkit.org/show_bug.cgi?id=74601 Reviewed by Kenneth Rohde Christiansen. The current implementation uses the scale property of the QQuickWebPage to scale the page in response to pinch gestures. However for layout and anchoring to work correctly in QML, pinching needs to change the page size. This patch applies the pinch scale to the page size and to the transformation matrix of the drawing area. Thus the page item's coordinate system is no longer a direct representation of the WebCore::Page coordinate system and it is no longer suitable as an inertial frame of reference for input events. The event propagation had to be moved to the QQuickWebView and the positions translated to content coordinates when NativeWebEvents are created. Re-landing with fixed event delivery for the test infrastructure. * Shared/NativeWebMouseEvent.h: * Shared/NativeWebTouchEvent.h: * Shared/NativeWebWheelEvent.h: * Shared/qt/NativeWebMouseEventQt.cpp: (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/qt/NativeWebTouchEventQt.cpp: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/qt/NativeWebWheelEventQt.cpp: (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/qt/WebEventFactoryQt.h: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::geometryChanged): (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::paintToCurrentGLContext): (QQuickWebPage::usesTraditionalDesktopBehaviour): (QQuickWebPage::setUsesTraditionalDesktopBehaviour): (QQuickWebPage::eventHandler): (QQuickWebPage::setContentSize): (QQuickWebPage::contentSize): (QQuickWebPage::setContentScale): (QQuickWebPage::contentScale): (QQuickWebPage::transformFromItem): (QQuickWebPage::transformToItem): (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::enableMouseEvents): (QQuickWebViewPrivate::disableMouseEvents): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout): (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate::pageDidRequestScroll): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::PostTransitionState::apply): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::useTraditionalDesktopBehaviour): (QQuickWebView::mapToWebContent): (QQuickWebView::mapRectToWebContent): (QQuickWebView::mapFromWebContent): (QQuickWebView::mapRectFromWebContent): (QQuickWebView::geometryChanged): (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): (QQuickWebView::touchEvent): (QQuickWebView::mousePressEvent): (QQuickWebView::mouseMoveEvent): (QQuickWebView::mouseReleaseEvent): (QQuickWebView::mouseDoubleClickEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): (QQuickWebView::event): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::contentsSize): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit::QtPinchGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): (WebKit::QtViewportInteractionEngine::event): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale): (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): (WebKit::QtViewportInteractionEngine::applyConstraints): (WebKit::QtViewportInteractionEngine::currentCSSScale): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::scaleContent): * UIProcess/qt/QtViewportInteractionEngine.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleSingleTapEvent): (QtWebPageEventHandler::handleDoubleTapEvent): (QtWebPageEventHandler::touchEvent): * UIProcess/qt/QtWebPageEventHandler.h: 2012-01-09 Eunmi Lee [EFL][WK2] Set color_set function to the clipped smart class. https://bugs.webkit.org/show_bug.cgi?id=75286 Reviewed by Andreas Kling. Set _ewk_view_smart_color_set() function to the clipped smart class's color_set, so application can set webpage's background color using evas_object_color_set() API. * UIProcess/API/efl/ewk_view.cpp: (_ewk_view_smart_color_set): (ewk_view_smart_class_init): 2012-01-08 Dan Bernstein REGRESSION (r103859): WKViews leak https://bugs.webkit.org/show_bug.cgi?id=75805 The flags changed event monitor added in r103859 was retaining the WKView (as it references self in the handler block), causing it to leak. * UIProcess/API/mac/WKView.mm: (-[WKView dealloc]): Moved call to remove the flags changed event monitor from here... (-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event monitor to here from... (-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here. 2012-01-06 Mark Rowe REGRESSION (WebKit2): Save as PDF no longer generates links to URLs / WebKit2 printing works by having the web process render the page content to a PDF. The PDF data is then shipped to the UI process which will render it in to the printing graphics context. Links were being lost because the API used to do the rendering of the PDF in to the printing graphics context, CGContextDrawPDFPage, did not preserve the links that were present in the PDF content received from the web process. To fix this we switch to using PDFKit for drawing the PDF in to the printing graphics context. PDFKit provides the ability for us to iterate over the links in the PDF content ourselves and add links in to the printing graphics context. Reviewed by Alexey Proskuryakov. * UIProcess/API/mac/WKPrintingView.h: * UIProcess/API/mac/WKPrintingView.mm: (pdfAnnotationLinkClass): Look up the PDFAnnotationLink class from PDFKit as WebKit2 loads PDFKit lazily. (pdfDocumentClass): Ditto. (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Switch to using the PDFKit equivalents of several types. Iterate over the annotations present in the PDFPage, calling CGPDFContextSetURLForRect for each PDFAnnotationLink that we find. (-[WKPrintingView _drawPreview:]): Create an NSData to feed to PDFDocument. (-[WKPrintingView drawRect:]): Ditto. * WebKit2Prefix.h: Add the usual workaround to make Objective-C exceptions compile when C++ exception handling is disabled. 2012-01-06 Viatcheslav Ostapenko [Qt] [WK2] Minibrowser leaks memory ~6-7Mb per reload https://bugs.webkit.org/show_bug.cgi?id=75746 Reset WebGraphicsLayer::m_layerTreeTileClient of all dependent layers from ~LayerTreeHostQt(). This replaces r103760 which causes leaks of GraphicsLayerTextureMapper objects on UI side. Reviewed by Noam Rosenthal. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::setLayerTreeTileClient): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::~LayerTreeHostQt): 2012-01-06 Alexey Proskuryakov [Mac] Thread verifier assertions when printing https://bugs.webkit.org/show_bug.cgi?id=75738 Reviewed by Sam Weinig. * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView dealloc]): Dealloc in main thread, so that WebFrameProxy doesn't get deref'ed from a secondary one. (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): This method calls out to client, which only expects that on main thread. (-[WKPrintingView knowsPageRange:]): Call _adjustPrintingMarginsForHeaderAndFooter on main thread. 2012-01-06 Alexey Proskuryakov Need to allow SCNetworkReachability service in sandbox profile https://bugs.webkit.org/show_bug.cgi?id=75724 Reviewed by Mark Rowe. * WebProcess/com.apple.WebProcess.sb: 2012-01-06 Benjamin Poulain [Mac] Sort the resources of WebKit2.xcodeproj https://bugs.webkit.org/show_bug.cgi?id=75636 Reviewed by Andreas Kling. * WebKit2.xcodeproj/project.pbxproj: 2012-01-06 Rafael Brandao [Qt][WK2] QQuickWebView breaks when an empty url is loaded https://bugs.webkit.org/show_bug.cgi?id=75445 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::load): * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load an empty url is ignored. 'about:blank' should be used instead to load an empty page. * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2012-01-06 Tor Arne Vestbø [Qt] Move listing of include paths and libs to pri files in sources Includepaths are sometimes modified by non-Qt contributors so keeping them in files inside Sources makes it more likely that they are updated along with project files for the other ports. Using pri files instead of prf files for this also has the benefit that the include() from the main target file can be parsed and followed by Qt Creator -- something that does not work with load(). Dependency from a target to a library through the WEBKIT variable are handled through forwarding-files in Tools/qmake/mkspecs/modules, which set the source root of the module and include the right pri file. Ideally we'd use the variant of include() that takes an optional namespace to read the variables into, or the fromfile() function, but both of these add an overhead of about 40% on the total qmake runtime, due to making a deep copy of all the variables in the project or re-reading all the prf files from scratch. Reviewed by Simon Hausmann. Reviewed by Ossy. * Target.pri: * WebKit2.pri: Renamed from Tools/qmake/mkspecs/features/webkit2.prf. 2012-01-06 Zeno Albisser [Qt][WK2] Add test for application URL schemes. https://bugs.webkit.org/show_bug.cgi?id=74933 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2012-01-05 Dan Bernstein Update copyright strings Reviewed by Mark Rowe. * Info.plist: * PluginProcess/Info.plist: * WebProcess/Info.plist: 2012-01-05 Anders Carlsson Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe https://bugs.webkit.org/show_bug.cgi?id=75667 Reviewed by Kevin Decker. NPRuntimeObjectMap::invalidate is called whenever a plug-in view is destroyed. If invalidate is called for an object map whose plug-in has a null frame, we'd crash. The plug-in will have a null frame if the plug-in view is destroyed because its containing frame has been removed from the document, and if the plug-in view is being destroyed asynchronously due to the plug-in itself calling JavaScript that will remove the frame (see PluginView::unprotectPluginFromDestruction). The reason NPRuntimeObjectMap::invalidate will crash when the frame is null is because we were trying to access the frame's global object, causing a null dereference. The reason we were trying to get at the frame's global object was to create a Strong handle to a JSNPObject so we could stick the object in a vector so we could later iterate over the vector elements and call invalidate() on each JSNPObject which will end up releasing the underlying NPObject. However, it turns out that we don't need to stick the JSNPObject in a vector; we can just get the underlying NPObject directly and stick that in a vector and then iterate over the NPObjects, releasing them. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::invalidate): 2012-01-05 Alexey Proskuryakov REGRESSION (r98912-r99538): Crash in WebKit::WebFrameLoaderClient::didDetectXSS https://bugs.webkit.org/show_bug.cgi?id=75578 Reviewed by Daniel Bates. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame): Check for a correct struct member existence. 2012-01-05 Alexey Proskuryakov WK2: Safari fails to open a PostScript file in Preview from context menu https://bugs.webkit.org/show_bug.cgi?id=75643 Reviewed by Dan Bernstein. * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData): Append ".pdf" to file name when converting data, as suggested file name is created for original MIME type. 2012-01-05 Zeno Albisser [Qt][WK2] Implement custom URL schemes defined in QML. https://bugs.webkit.org/show_bug.cgi?id=74931 Allow creation of custom UrlSchemeDelegates from QML. A UrlSchemeDelegate contains a handler signal that is triggered when a url matching the defined scheme is requested. To allow for this a derivation of QNetworkAccessManager is necessary. The request is then handled in QML/JS and a reply is sent back from the UIProcess to the WebProcess. Reviewed by Kenneth Rohde Christiansen. * Shared/qt/QtNetworkReplyData.cpp: Added. (WebKit::QtNetworkReplyData::QtNetworkReplyData): (WebKit::QtNetworkReplyData::encode): (WebKit::QtNetworkReplyData::decode): * Shared/qt/QtNetworkReplyData.h: Added. * Shared/qt/QtNetworkRequestData.cpp: Added. (WebKit::QtNetworkRequestData::QtNetworkRequestData): (WebKit::QtNetworkRequestData::encode): (WebKit::QtNetworkRequestData::decode): * Shared/qt/QtNetworkRequestData.h: Added. * Target.pri: * UIProcess/API/qt/qquicknetworkreply.cpp: Added. (QQuickNetworkReply::QQuickNetworkReply): (QQuickNetworkReply::contentType): (QQuickNetworkReply::setContentType): (QQuickNetworkReply::operation): (QQuickNetworkReply::setOperation): (QQuickNetworkReply::contentDisposition): (QQuickNetworkReply::setContentDisposition): (QQuickNetworkReply::location): (QQuickNetworkReply::setLocation): (QQuickNetworkReply::lastModified): (QQuickNetworkReply::setLastModified): (QQuickNetworkReply::cookie): (QQuickNetworkReply::setCookie): (QQuickNetworkReply::userAgent): (QQuickNetworkReply::setUserAgent): (QQuickNetworkReply::server): (QQuickNetworkReply::setServer): (QQuickNetworkReply::data): (QQuickNetworkReply::setData): (QQuickNetworkReply::send): (QQuickNetworkReply::networkRequestData): (QQuickNetworkReply::setNetworkRequestData): (QQuickNetworkReply::networkReplyData): * UIProcess/API/qt/qquicknetworkreply_p.h: Added. * UIProcess/API/qt/qquicknetworkrequest_p.h: Added. * UIProcess/API/qt/qquickurlschemedelegate.cpp: Added. (QQuickUrlSchemeDelegate::QQuickUrlSchemeDelegate): (QQuickUrlSchemeDelegate::scheme): (QQuickUrlSchemeDelegate::setScheme): (QQuickUrlSchemeDelegate::request): (QQuickUrlSchemeDelegate::reply): * UIProcess/API/qt/qquickurlschemedelegate_p.h: Added. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::schemeDelegates_At): (QQuickWebViewExperimental::schemeDelegates_Append): (QQuickWebViewExperimental::schemeDelegates_Count): (QQuickWebViewExperimental::schemeDelegates_Clear): (QQuickWebViewExperimental::schemeDelegates): (QQuickWebViewExperimental::invokeApplicationSchemeHandler): (QQuickWebViewExperimental::sendApplicationSchemeReply): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleApplicationSchemeRequest): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::registerApplicationScheme): (WebKit::WebPageProxy::resolveApplicationSchemeRequest): (WebKit::WebPageProxy::sendApplicationSchemeReply): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createNetworkingContext): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::registerApplicationScheme): (WebKit::WebPage::receivedApplicationSchemeRequest): (WebKit::WebPage::applicationSchemeReply): * WebProcess/qt/QtNetworkAccessManager.cpp: Added. (WebKit::QtNetworkAccessManager::QtNetworkAccessManager): (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage): (WebKit::QtNetworkAccessManager::createRequest): (WebKit::QtNetworkAccessManager::registerApplicationScheme): * WebProcess/qt/QtNetworkAccessManager.h: Added. * WebProcess/qt/QtNetworkReply.cpp: Added. (WebKit::QtNetworkReply::QtNetworkReply): (WebKit::QtNetworkReply::setData): (WebKit::QtNetworkReply::setReplyData): (WebKit::QtNetworkReply::readData): (WebKit::QtNetworkReply::bytesAvailable): (WebKit::QtNetworkReply::setHeader): (WebKit::QtNetworkReply::abort): (WebKit::QtNetworkReply::close): (WebKit::QtNetworkReply::setReadBufferSize): (WebKit::QtNetworkReply::canReadLine): (WebKit::QtNetworkReply::finalize): * WebProcess/qt/QtNetworkReply.h: Added. * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2012-01-05 Fady Samuel Move scalePageBy from eventSender to window.internals https://bugs.webkit.org/show_bug.cgi?id=64512 Reviewed by Simon Fraser. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-01-05 Alexander Færøy Pass WebFrame instead of WebCore::Frame to the WebKit2 specific FrameNetworkingContext https://bugs.webkit.org/show_bug.cgi?id=75550 Make the WebKit2 FrameNetworkingContext implementation store the WebFrame instead of the WebCore::Frame as this is needed for the Qt port to implement a.o. HTTP autentication and SSL support. As the WebFrameNetworkingContext is partly shared across all WebKit2 ports, all port specific files have been modified. For the Qt implementation of FrameNetworkingContext, we also set a property to the originatingObject for the page ID. We also switch to using an OwnPtr instead of a raw C++ pointer for the m_originatingObject member. Based on original patch by Peter Hartmann. Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createNetworkingContext): * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h: (WebFrameNetworkingContext::create): (WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: (WebFrameNetworkingContext::create): (WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: (WebKit::WebFrameNetworkingContext::create): (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext): (WebCore::WebFrameNetworkingContext::~WebFrameNetworkingContext): (WebCore::WebFrameNetworkingContext::create): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: (WebFrameNetworkingContext::create): (WebFrameNetworkingContext::WebFrameNetworkingContext): 2012-01-05 Kenneth Rohde Christiansen [Qt] Implement QQuickWebView::inputMethodQuery Reviewed by Simon Hausmann. Implement the current Qt5 queries of inputMethodQuery. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::inputMethodQuery): * UIProcess/API/qt/qquickwebview_p.h: 2012-01-05 Carlos Garcia Campos [GTK] Add methods to get/set the WebView zoom level to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=75248 Reviewed by Gustavo Noronha Silva. It uses the page zoom factor unconditionally for now. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewSetProperty): (webkitWebViewGetProperty): (webkit_web_view_class_init): Add WebKitWebView:zoom-level property. (webkit_web_view_set_zoom_level): Set current zoom level. (webkit_web_view_get_zoom_level): Get current zoom level. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewZoomLevel): (beforeAll): 2012-01-05 Carlos Garcia Campos [GTK] Rename webkit_web_view_load_alternate_html as webkit_web_view_replace_content in WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=75433 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadFail): Use webkit_web_view_replace_content(). (webkitWebViewLoadChanged): Do not emit load-changed signal when replacing content. (webkitWebViewLoadFailed): Do not emit load-failed signal when replacing content. (webkitWebViewSetEstimatedLoadProgress): Do not emit notify::estimated-load-progress signal when replacing content. (webkit_web_view_replace_content): * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: (beforeAll): * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (replaceContentTitleChangedCallback): (replaceContentLoadCallback): (testWebViewReplaceContent): (beforeAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::replaceContent): * UIProcess/API/gtk/tests/WebViewTest.h: 2012-01-05 Keunsoon Lee [WK2][EFL] creating dummy functions for Download class on Efl port. https://bugs.webkit.org/show_bug.cgi?id=75246 dummy functions for Download class on Efl port Reviewed by Hajime Morita. * PlatformEfl.cmake: add new file to compile * WebProcess/Downloads/efl: Added. * WebProcess/Downloads/efl/DownloadEfl.cpp: Added. (WebKit::Download::start): (WebKit::Download::startWithHandle): (WebKit::Download::cancel): (WebKit::Download::platformInvalidate): (WebKit::Download::didDecideDestination): (WebKit::Download::platformDidFinish): (WebKit::Download::receivedCredential): (WebKit::Download::receivedRequestToContinueWithoutCredential): (WebKit::Download::receivedCancellation): (WebKit::Download::useCredential): (WebKit::Download::continueWithoutCredential): (WebKit::Download::cancelAuthenticationChallenge): 2012-01-04 Dan Bernstein Allow WebProcess to launch a client process and become its first WebProcess. This is the WebKit2 part of fixing Debugging WebProcess requires running a UI process first and waiting to attach Reviewed by Anders Carlsson. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Added a newline to stderr output. * UIProcess/Launcher/mac/EnvironmentVariables.cpp: (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Added. Returns the name of the environment variable that optionally tells a UI processs to look for a preexisting web process instead of launching a new one. (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Added. Returns the name of the environment variable that tells a UI process the type of the preexisting web process indicated by the other variable. * UIProcess/Launcher/mac/EnvironmentVariables.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): Changed to look for a preexisting web process if the aforementioned environment variables are set and the preexisting process has not been used yet. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Changed to look for the -client-executable command-line option, and if present, launch the specified executable, setting variables in its environment that tell it to use this preexisting web process, then wait for it to send a send right to its listening port. 2012-01-04 Alexey Proskuryakov First sentence is missing or clipped when printing a inline PDF https://bugs.webkit.org/show_bug.cgi?id=75514 Reviewed by Dan Bernstein. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::headerHeight): (WebKit::WebPageProxy::footerHeight): (WebKit::WebPageProxy::drawHeader): (WebKit::WebPageProxy::drawFooter): Do not ask the client about headers and footers when printing a PDF. 2012-01-04 Alexander Færøy [Qt] Fix test regressions after r104025 https://bugs.webkit.org/show_bug.cgi?id=75545 Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2012-01-04 Andras Becsi REGRESSION(r104028): Broke editing tests and event coordinates in desktop behaviour https://bugs.webkit.org/show_bug.cgi?id=75542 [Qt][WK2] Pinch zoom should affect the page size https://bugs.webkit.org/show_bug.cgi?id=74601 Unreviewed roll-out. * Shared/NativeWebMouseEvent.h: * Shared/NativeWebTouchEvent.h: * Shared/NativeWebWheelEvent.h: * Shared/qt/NativeWebMouseEventQt.cpp: (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/qt/NativeWebTouchEventQt.cpp: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/qt/NativeWebWheelEventQt.cpp: (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/qt/WebEventFactoryQt.h: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::keyPressEvent): (QQuickWebPage::keyReleaseEvent): (QQuickWebPage::inputMethodEvent): (QQuickWebPage::focusInEvent): (QQuickWebPage::focusOutEvent): (QQuickWebPage::mousePressEvent): (QQuickWebPage::mouseMoveEvent): (QQuickWebPage::mouseReleaseEvent): (QQuickWebPage::mouseDoubleClickEvent): (QQuickWebPage::wheelEvent): (QQuickWebPage::hoverEnterEvent): (QQuickWebPage::hoverMoveEvent): (QQuickWebPage::hoverLeaveEvent): (QQuickWebPage::dragMoveEvent): (QQuickWebPage::dragEnterEvent): (QQuickWebPage::dragLeaveEvent): (QQuickWebPage::dropEvent): (QQuickWebPage::geometryChanged): (QQuickWebPage::event): (QQuickWebPage::touchEvent): (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::paintToCurrentGLContext): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::enableMouseEvents): (QQuickWebViewPrivate::disableMouseEvents): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout): (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate::pageDidRequestScroll): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::PostTransitionState::apply): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::useTraditionalDesktopBehaviour): (QQuickWebView::geometryChanged): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::contentsSize): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit::QtPinchGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): (WebKit::QtViewportInteractionEngine::event): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale): (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): (WebKit::QtViewportInteractionEngine::applyConstraints): (WebKit::QtViewportInteractionEngine::currentCSSScale): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::scaleContent): * UIProcess/qt/QtViewportInteractionEngine.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleSingleTapEvent): (QtWebPageEventHandler::handleDoubleTapEvent): (QtWebPageEventHandler::touchEvent): * UIProcess/qt/QtWebPageEventHandler.h: 2012-01-04 Tor Arne Vestbø [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies The custom qmake variable 'WEBKIT' is used for signaling that a target depends in some way on other subproject of the WebKit project. For now this is limited to the set of intermediate libraries: wtf, javascriptcore, webcore, and webkit2. This replaces the previous convension of using load(foo) for just include paths, and CONFIG += foo to also link against foo. Adding a dependency results in additional include paths being available, and potentially linking to the library. This is decided by the build system based on conditions such as what kind of target is being built and the general build config. An advantage to his approach is that it simplifies the individual foo.prf files, for example by allowing us to use INCLUDEPATH += and LIBS += as normal instead of prepending. Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2012-01-03 Andras Becsi [Qt][WK2] Pinch zoom should affect the page size https://bugs.webkit.org/show_bug.cgi?id=74601 Reviewed by Kenneth Rohde Christiansen and Simon Hausmann. The current implementation uses the scale property of the QQuickWebPage to scale the page in response to pinch gestures. However for layout and anchoring to work correctly in QML, pinching needs to change the page size. This patch applies the pinch scale to the page size and to the transformation matrix of the drawing area. Thus the page item's coordinate system is no longer a direct representation of the WebCore::Page coordinate system and it is no longer suitable as an inertial frame of reference for input events. The event propagation had to be moved to the QQuickWebView and the positions translated to content coordinates when NativeWebEvents are created. * Shared/NativeWebMouseEvent.h: * Shared/NativeWebTouchEvent.h: * Shared/NativeWebWheelEvent.h: * Shared/qt/NativeWebMouseEventQt.cpp: (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/qt/NativeWebTouchEventQt.cpp: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/qt/NativeWebWheelEventQt.cpp: (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/qt/WebEventFactoryQt.h: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::geometryChanged): (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::paintToCurrentGLContext): (QQuickWebPage::usesTraditionalDesktopBehaviour): (QQuickWebPage::setUsesTraditionalDesktopBehaviour): (QQuickWebPage::eventHandler): (QQuickWebPage::setContentSize): (QQuickWebPage::contentSize): (QQuickWebPage::setContentScale): (QQuickWebPage::contentScale): (QQuickWebPage::transformFromItem): (QQuickWebPage::transformToItem): (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::enableMouseEvents): (QQuickWebViewPrivate::disableMouseEvents): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout): (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate::pageDidRequestScroll): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::PostTransitionState::apply): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour): (QQuickWebViewExperimental::useTraditionalDesktopBehaviour): (QQuickWebView::mapToWebContent): (QQuickWebView::mapRectToWebContent): (QQuickWebView::mapFromWebContent): (QQuickWebView::mapRectFromWebContent): (QQuickWebView::geometryChanged): (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): (QQuickWebView::touchEvent): (QQuickWebView::mousePressEvent): (QQuickWebView::mouseMoveEvent): (QQuickWebView::mouseReleaseEvent): (QQuickWebView::mouseDoubleClickEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): (QQuickWebView::event): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::contentsSize): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit::QtPinchGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): (WebKit::QtViewportInteractionEngine::event): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale): (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): (WebKit::QtViewportInteractionEngine::applyConstraints): (WebKit::QtViewportInteractionEngine::currentCSSScale): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::scaleContent): * UIProcess/qt/QtViewportInteractionEngine.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleSingleTapEvent): (QtWebPageEventHandler::handleDoubleTapEvent): (QtWebPageEventHandler::touchEvent): * UIProcess/qt/QtWebPageEventHandler.h: 2012-01-03 Kenneth Rohde Christiansen [Qt] Clean up Qt specific part of editorState() Reviewed by Simon Hausmann. Use unsigned instead of int. No need to clone the range as we don't modify it. Support selections which include a composition. If we are not in editable content make sure to use the document element as the scope for calculating the positions and lengths. Remove compositionStart/Length as there cannot be a selection and composition at the same time. Only tested manually as we don't have everything in place yet to properly test this. * Shared/EditorState.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2012-01-04 Mihnea Ovidenie [Mac]Fix build after changeset 103997 https://bugs.webkit.org/show_bug.cgi?id=75530 Reviewed by Andreas Kling. * UIProcess/API/mac/WKView.mm: 2012-01-03 Carlos Garcia Campos [GTK] Scrollbars are drawn behind the window resize grip https://bugs.webkit.org/show_bug.cgi?id=75384 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseNotifyResizerSizeForWindow): Get the size of the main window resize grip and send it to the page proxy if it overlaps with the view. (toplevelWindowResizeGripVisibilityChanged): Call webkitWebViewBaseNotifyResizerSizeForWindow(). (webkitWebViewBaseRealize): Get the toplevel window and connect to notify::resize-grip-visible signal. (webkitWebViewBaseSizeAllocate): Call webkitWebViewBaseNotifyResizerSizeForWindow(). 2012-01-03 Jon Lee Leak of WebNotificationClient when page is destroyed https://bugs.webkit.org/show_bug.cgi?id=74980 Reviewed by Mark Rowe. * WebProcess/WebCoreSupport/WebNotificationClient.cpp: (WebKit::WebNotificationClient::notificationControllerDestroyed): Delete the instance. * WebProcess/WebCoreSupport/WebNotificationClient.h: 2012-01-03 Sam Weinig Remove unnecessary forward declaration of Function https://bugs.webkit.org/show_bug.cgi?id=75485 Reviewed by Dan Bernstein. * Platform/WorkQueue.h: 2012-01-03 Carlos Garcia Campos [GTK] Simplify loader client WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=74605 Reviewed by Gustavo Noronha Silva. Remove WebKitWebLoaderClient from public API keeping it as a private object. Loading API has been reduced to two signals in WebKitWebView. * GNUmakefile.am: Remove WebKitWebLoaderClientPrivate.h. * UIProcess/API/gtk/WebKitDefines.h: Remove forward delcarations that are no longer needed. * UIProcess/API/gtk/WebKitWebLoaderClient.cpp: (didStartProvisionalLoadForFrame): Emit WebKitWebView::load-changed signal with Started event. (didReceiveServerRedirectForProvisionalLoadForFrame): Emit WebKitWebView::load-changed signal with Redirected event. (didFailProvisionalLoadWithErrorForFrame): Emit WebKitWebView::load-failed signal with Started event. (didCommitLoadForFrame): Emit WebKitWebView::load-changed signal with Committed event. (didFinishLoadForFrame): Emit WebKitWebView::load-changed signal with Finished event. (didFailLoadWithErrorForFrame): Emit WebKitWebView::load-failed signal with Committed event. (webkit_web_loader_client_init): (webkit_web_loader_client_class_init): * UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove public API and move private API here. * UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Removed. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadFail): Default implementation of WebKitWebView::load-failed signal to show a custom error page. (webkit_web_view_class_init): Add load-changed and load-failed signals. (webkitWebViewLoadChanged): Emit WebKitWebView::load-changed with the given event. (webkitWebViewLoadFailed): Emit WebKitWebView::load-failed signal with the given event, failing uri and error. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Remove loader client section. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Remove loader client symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Remove webkit_web_loader_client_get_type. * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: (loadChangedCallback): (loadFailedCallback): (LoadTrackingTest::LoadTrackingTest): (LoadTrackingTest::~LoadTrackingTest): (LoadTrackingTest::provisionalLoadStarted): (LoadTrackingTest::provisionalLoadReceivedServerRedirect): (LoadTrackingTest::provisionalLoadFailed): (LoadTrackingTest::loadCommitted): (LoadTrackingTest::loadFinished): (LoadTrackingTest::loadFailed): * UIProcess/API/gtk/tests/LoadTrackingTest.h: * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: (testLoadingError): (LoadStopTrackingTest::loadCommitted): (LoadStopTrackingTest::loadFailed): (testLoadCancelled): * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (beforeAll): * UIProcess/API/gtk/webkit2.h: Remove loader client header. * UIProcess/API/gtk/webkit2marshal.list: 2012-01-03 Rafael Brandao [Qt][WK2] tst_favIconLoad.qml crashes on debug mode https://bugs.webkit.org/show_bug.cgi?id=75448 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Loads "about:blank" instead of an empty url between tests to clean favicon. 2012-01-02 Dan Bernstein Fixed a typo I made in r103871. Fixes Inline PDF doesn't preview correctly when attempting to print its frame * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Changed USE(GC) to USE(CG). 2012-01-02 Andy Estes Fix the Windows build (again). * Platform/CoreIPC/Connection.h: 2012-01-02 Sam Weinig Fix windows build. * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/win/ConnectionWin.cpp: * Platform/RunLoop.h: Missing declarations/includes of BinarySemaphore. 2012-01-02 Sam Weinig Move dispatchSentMessagesUntil out of the RunLoop class. https://bugs.webkit.org/show_bug.cgi?id=75320 Reviewed by Dan Bernstein. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages): * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::dispatchSentMessagesUntil): * Platform/win/RunLoopWin.cpp: 2012-01-02 Dan Bernstein Build fix. * Platform/CoreIPC/mac/ConnectionMac.cpp: * Platform/mac/SharedMemoryMac.cpp: 2012-01-02 Nikolas Zimmermann Not reviewed. Fix build on Lion, by including mach_error.h in two places that need it. * PluginProcess/mac/PluginProcessMainMac.mm: * WebProcess/mac/WebProcessMainMac.mm: 2012-01-01 Dan Bernstein EnvironmentUtilities::stripValuesEndingWithString enters an infinite loop if the search value occurs a component other than the first. Reviewed by Anders Carlsson. * Platform/unix/EnvironmentUtilities.cpp: (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Changed to start the search for the next colon after the current colon. 2012-01-01 Dan Bernstein Improved reproting of kernel return codes. Reviewed by Anders Carlsson. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message. * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::create): Ditto. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Ditto. Also changed to log to stderr. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Ditto. 2011-12-31 Dan Bernstein Continue trying to fix the ASSERT-enabled Windows build after r103858. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): (WebKit::WebPage::drawPagesToPDF): 2011-12-31 Dan Bernstein Start trying to fix the Windows build after r103858. * WebProcess/WebPage/WebPage.cpp: (WebKit::drawPDFPage): 2011-12-31 Dan Bernstein Cannot print USPS shipping labels http://webkit.org/b/72801 Reviewed by Anders Carlsson and Alexey Proskuryakov. * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm. (getAllValuesInPDFNameTree): Ditto. (getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm and changed it to append to a Vector >. (WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*. (WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly. (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from -[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a Doc object as the this object. (WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having a WebFrame*. (WebKit::BuiltInPDFView::destroy): Ditto. (WebKit::BuiltInPDFView::isActive): Ditto. (WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for this Doc. (WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc. (WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print(). (WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and modified to use this BuiltInPDFView as the private object of the Doc being made. * WebProcess/Plugins/PDF/BuiltInPDFView.h: (WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to having a WebFrame*. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating a BuiltInPDFView. * WebProcess/WebPage/WebPage.h: 2011-12-31 Dan Bernstein REGRESSION (WebKit2): Safari status text doesn't change when you change the modifier keys without moving the mouse https://bugs.webkit.org/show_bug.cgi?id=75404 Reviewed by Jon Honeycutt. * UIProcess/API/mac/WKView.mm: (-[WKView dealloc]): Remove the flags changed event monitor. (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Added. Similarly to -[WebHTMLView _postFlagsChangedEvent:], creates a mouse moved event and passes it to -mouseMoved:. (-[WKView initWithFrame:contextRef:pageGroupRef:]): Create a local event monitor for flags changed events. 2011-12-31 Dan Bernstein REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document Reviewed by Alexey Proskuryakov. * UIProcess/API/C/WKPage.cpp: (WKPageDrawPagesToPDF): Added WKPrintInfo parameter, which is passed through as a PrintInfo to the WebPageProxy. * UIProcess/API/C/WKPagePrivate.h: * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Changed to pass the PrintInfo down to WebPageProxy::drawPagesToPDF. (-[WKPrintingView _drawPreview:]): Changed to pass the PrintInfo down to WebPageProxy::drawRectToPDF. * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Changed to use WebFrameProxy::isDisplayingPDFDocument, which works for subframes as well. (-[WKView printOperationWithPrintInfo:forFrame:]): Added a FIXME. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isDisplayingPDFDocument): Added. * UIProcess/WebFrameProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::drawRectToPDF): Added a PrintInfo parameter, which is passed through to the Web process. (WebKit::WebPageProxy::drawPagesToPDF): Ditto. * UIProcess/WebPageProxy.h: * WebProcess/Plugins/PDF/BuiltInPDFView.h: Added an override of pdfDocumentForPrinting() which returns the PDFDocument. * WebProcess/Plugins/Plugin.h: (WebKit::Plugin::pdfDocumentForPrinting): Added. This base class implementation returns 0. * WebProcess/Plugins/PluginView.h: (WebKit::PluginView::pdfDocumentForPrinting): Added. Calls through to the Plugin. * WebProcess/WebPage/WebPage.cpp: (WebKit::pdfDocumentForPrintingFrame): Added this helper function. If the frame is displaying a plug-in document, allows the plug-in to provide a PDF document for printing. (WebKit::WebPage::beginPrinting): Added an early return if the frame provides a PDF document for printing. (WebKit::WebPage::computePagesForPrinting): If the frame provides a PDF document for printing, create for each page in the PDF document a page rect with the size available for printing. (WebKit::drawPDFPage): Added this helper function, which draws a page from the PDF document into one of the aforementioned page rects. It rotates the PDF page 90 degrees if necessary to better match the aspect ratio of the paper, then it centers it on the paper. This matches the behavior of a PDFView when printed with default settings. (WebKit::WebPage::drawRectToPDF): If the frame provides a PDF document for printing, draw the PDF pages falling within the requested rect. (WebKit::WebPage::drawPagesToPDF): If the frame provides a PDF document for printing, draw the requested pages. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Added a PrintInfo parameter to DrawRectToPDF and DrawPagesToPDF. 2011-12-30 Dan Bernstein EnvironmentUtilities::stripValuesEndingWithString fails when the variable ends with the search value https://bugs.webkit.org/show_bug.cgi?id=75389 Reviewed by Anders Carlsson. * Platform/unix/EnvironmentUtilities.cpp: (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Fixed an off-by-1 error when examining the character after the match. 2011-12-29 Caio Marcelo de Oliveira Filho [Qt] Remove unused m_signalListeners from WorkQueue https://bugs.webkit.org/show_bug.cgi?id=75354 Reviewed by Andreas Kling. This is unused since r76507. * Platform/WorkQueue.h: * Platform/qt/WorkQueueQt.cpp: (WorkQueue::platformInvalidate): 2011-12-29 Carlos Garcia Campos [GTK] Context menu is hidden right after showing it when first menu item is not disabled https://bugs.webkit.org/show_bug.cgi?id=75357 Reviewed by Martin Robinson. The problem is that we are passing GDK_CURRENT_TIME (which is 0) to gtk_popup_menu, because the events are async and gtk_get_current_event is NULL when calling gtk_menu_popup. GtkMenu has a timeout to decide whether the press-release was fast enough and ignore the button release event in that case. That way, a normal right click shows the menu while a long press hides the menu when the button is released. So, we need to know the real time when the right button was pressed and pass it to gtk_popup_menu. * UIProcess/WebPageProxy.h: Make currentlyProcessedMouseDownEvent() public. * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::showContextMenu): Use WebPageProxy::currentlyProcessedMouseDownEvent() to get the current mouse event and pass its button number and time to gtk_popup_menu. 2011-12-29 Carlos Garcia Campos [GTK] Fix several conding style issues in WebKit2 GTK+ code https://bugs.webkit.org/show_bug.cgi?id=75339 Reviewed by Martin Robinson. In addition to the WebKit coding style, code in UIProcess/API/gtk should follow style and conventions described here http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API * UIProcess/API/gtk/WebKitSettings.cpp: Remove trailing whitespaces. (webkit_settings_class_init): Remove trailing whitespaces, fix indentation issues in API doc comments, add missing trailing to some properties. (webkit_settings_set_enable_fullscreen): Move the code after get_enable_fullscreen() for consistency. * UIProcess/API/gtk/WebKitSettings.h: Remove trailing whitespaces. Fix * placement and line up parameters. * UIProcess/API/gtk/WebKitWebView.cpp: Remove several empty lines. (webkit_web_view_class_init): Mark property nicks and blurbs for translation. (webkitWebViewSetTitle): Remove trailing whitespaces. * UIProcess/API/gtk/WebKitWebView.h: Line up parameters. * UIProcess/API/gtk/WebKitWebViewBase.cpp: Use the angle-bracket form for including file from WebCore and wtf. Use GRefPtr for GtkIMContext and bool instead of gboolean. Use the placement new syntax for private struct instead of new/delete. (webkitWebViewBaseRealize): (webkitWebViewBaseFinalize): (webkit_web_view_base_init): (webkitWebViewBaseFocusInEvent): (webkitWebViewBaseFocusOutEvent): (webkitWebViewBaseKeyPressEvent): Remove trailing whitespaces. (webkitWebViewBaseKeyReleaseEvent): (webkit_web_view_base_class_init): (webkitWebViewBaseGetIMContext): 2011-12-28 Balazs Kelemen [Qt][WK2] Crash in ~WebGraphicsLayer when running fast/multicol/pagination-* tests https://bugs.webkit.org/show_bug.cgi?id=75000 Reviewed by Noam Rosenthal. Don't adopt a tile client that belongs to a parent layer. This is unnecessary and also unsafe because we can live through that client. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): 2011-12-27 Dan Bernstein [mac] Stop using bootstrap_look_up2 https://bugs.webkit.org/show_bug.cgi?id=75280 Reviewed by Mark Rowe. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Changed to use bootstrap_look_up() instead of bootstrap_look_up2(). * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Ditto. 2011-12-27 Kenneth Rohde Christiansen [Qt] Make the inputMethodEvent set or confirm the composition https://bugs.webkit.org/show_bug.cgi?id=75256 Reviewed by Chang Shu. * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::inputMethodEvent): 2011-12-26 Mark Rowe REGRESSION(r103643): Command-clicking a link no longer opens a new tab. r103643 contained some botched copy-paste code that caused the state of the Command key to be lost when translating from a WebKit2 event to a WebCore event. Reviewed by Dan Bernstein. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Test for the correct modifier. (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Ditto. (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Ditto. (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Ditto. (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Ditto. 2011-12-26 Carlos Garcia Campos Fix a crash in WebProcess when starting a download not initiated by a WebPage https://bugs.webkit.org/show_bug.cgi?id=75225 Reviewed by Darin Adler. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): Check initiatingPage is not NULL before using it. 2011-12-25 Dan Bernstein Find indicators overlap when a match spans multiple text boxes https://bugs.webkit.org/show_bug.cgi?id=75220 Reviewed by Darin Adler. * UIProcess/FindIndicator.cpp: (WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for pairwise intersections between all indicator rects. (WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text rects) if any two indicator rects would otherwise overlap. This is similar to what Safari does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when a match spans two lines and adjacent text boxes on one of those lines) it results in a find indicator that is too large and obscures some non-match text. * UIProcess/FindIndicator.h: 2011-12-21 Sam Weinig Start extracting platform specific bits out of PlatformEvents https://bugs.webkit.org/show_bug.cgi?id=75063 Reviewed by Anders Carlsson. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): * UIProcess/API/mac/WKView.mm: * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-12-22 Caio Marcelo de Oliveira Filho [Qt] [WK2] Use HashMap instead of Vector in the builtin bundle https://bugs.webkit.org/show_bug.cgi?id=75112 Reviewed by Andreas Kling. Fix my own FIXME now that HashMap have support to hold OwnPtr as value. * WebProcess/qt/QtBuiltinBundle.cpp: (WebKit::QtBuiltinBundle::didCreatePage): (WebKit::QtBuiltinBundle::willDestroyPage): (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject): (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled): * WebProcess/qt/QtBuiltinBundle.h: 2011-12-22 Anders Carlsson Remove the last of the WebKit2 display throttling https://bugs.webkit.org/show_bug.cgi?id=75109 Reviewed by Adam Roben. The code to do display throttling in WebKit2 is complex and doesn't really help us except on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): (WebKit::DrawingAreaImpl::displayTimerFired): (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wheelEvent): (WebKit::WebPage::wheelEventSyncForTesting): 2011-12-22 Anders Carlsson Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll https://bugs.webkit.org/show_bug.cgi?id=75107 Reviewed by Adam Roben. This is another step towards removing the display throttling in WebKit2. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-12-22 Anders Carlsson Remove didStartRubberBand and didCompleteRubberBand callbacks https://bugs.webkit.org/show_bug.cgi?id=75102 Reviewed by Adam Roben. The code to do display throttling in WebKit2 is complex and doesn't really help us except on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-12-22 Ryuan Choi , Tomasz Morawski [EFL][WK2] Add an option to build WebKit2. https://bugs.webkit.org/show_bug.cgi?id=61999 Reviewed by Eric Seidel. Add build script for WebKit2 on EFL port. * CMakeLists.txt: * PlatformEfl.cmake: Added. 2011-12-21 Eunmi Lee [EFL][WK2] Add efl port's ewk_view files https://bugs.webkit.org/show_bug.cgi?id=61915 Reviewed by Eric Seidel. This is the initial version of WebKit2 EFL port's ewk_view. The ewk_view is Evas_Object to show the rendered web contents. * UIProcess/API/efl/ewk_view.cpp: Added. (_ewk_view_smart_changed): (_ewk_view_smart_focus_in): (_ewk_view_smart_focus_out): (_ewk_view_smart_mouse_wheel): (_ewk_view_smart_mouse_down): (_ewk_view_smart_mouse_up): (_ewk_view_smart_mouse_move): (_ewk_view_smart_key_down): (_ewk_view_smart_key_up): (_ewk_view_on_focus_in): (_ewk_view_on_focus_out): (_ewk_view_on_mouse_wheel): (_ewk_view_on_mouse_down): (_ewk_view_on_mouse_up): (_ewk_view_on_mouse_move): (_ewk_view_on_key_down): (_ewk_view_on_key_up): (_ewk_view_priv_new): (_ewk_view_priv_del): (_ewk_view_smart_add): (_ewk_view_smart_del): (_ewk_view_smart_resize): (_ewk_view_smart_move): (_ewk_view_smart_calculate): (_ewk_view_smart_show): (_ewk_view_smart_hide): (ewk_view_smart_class_init): (_ewk_view_smart_class_new): (ewk_view_add): (ewk_view_page_get): * UIProcess/API/efl/ewk_view.h: Added. 2011-12-21 Timothy Hatcher Web Inspector: suppress incremental rendering and use application chrome mode https://webkit.org/b/75026 Reviewed by Joseph Pecoraro. * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode. 2011-12-21 Sam Weinig Cleanup up clients when deallocating WebKit2 API objects https://bugs.webkit.org/show_bug.cgi?id=75014 Reviewed by Adam Roben. * UIProcess/API/mac/WKBrowsingContextController.mm: (-[WKBrowsingContextController dealloc]): * UIProcess/API/mac/WKConnection.mm: (-[WKConnection dealloc]): Clear clients on dealloc. 2011-12-21 Rafael Brandao [Qt][WK2] Add tests for favicon and fix icon url decoding issue https://bugs.webkit.org/show_bug.cgi?id=74967 Reviewed by Simon Hausmann. * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url without the percent encoding and we should access WebIconDatabase with an encoded url. Added a test to cover this behavior. (QWebIconImageProvider::requestImage): * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added. * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added. * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added. * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added. * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2011-12-21 Sam Weinig Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test https://bugs.webkit.org/show_bug.cgi?id=75012 Reviewed by Adam Roben. * UIProcess/API/mac/WKProcessGroup.mm: (-[WKProcessGroup dealloc]): Clear the WKContext's connection client. 2011-12-21 Michael Brüning [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test https://bugs.webkit.org/show_bug.cgi?id=73994 Reviewed by Kenneth Rohde Christiansen. Added a viewport meta tag so that the view is actually scrollable and does not get scaled to not be scrollable. Corrected the style definition for the
tag. Removed unneeded text in div Rolled back changes some of the changes from the previous patch (r102453) because they weren't necessary. * UIProcess/API/qt/tests/html/scroll.html: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): Partially rolled back changes. 2011-12-21 Jessie Berlin Windows build fix. Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy". * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::showPopupMenu): (WebKit::WebPopupMenuProxyWin::setFocusedIndex): 2011-12-20 Anders Carlsson Add ScrollableArea::contentsResized and have it call the scroll animator https://bugs.webkit.org/show_bug.cgi?id=74966 Reviewed by Sam Weinig. * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::scrollbarStyleChanged): 2011-12-20 Anders Carlsson Try to fix the Windows build. * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::showPopupMenu): (WebKit::WebPopupMenuProxyWin::setFocusedIndex): 2011-12-20 Simon Hausmann [Qt][WK2] Remove statusBarMessageChanged https://bugs.webkit.org/show_bug.cgi?id=74405 Reviewed by Tor Arne Vestbø. Removing support for window.status updates from the public QML API. See bug for details. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/qt/QtWebPageUIClient.cpp: (QtWebPageUIClient::QtWebPageUIClient): * UIProcess/qt/QtWebPageUIClient.h: 2011-12-20 Anders Carlsson Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions https://bugs.webkit.org/show_bug.cgi?id=74951 Reviewed by Sam Weinig. * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::paint): (WebKit::BuiltInPDFView::handleMouseEvent): (WebKit::BuiltInPDFView::handleMouseEnterEvent): (WebKit::BuiltInPDFView::handleMouseLeaveEvent): 2011-12-20 Brent Fulgham [WinCairo] Unreviewed build fix. * win/WebKit2CFLite.def: Add missing export declaration. 2011-12-20 Simon Hausmann [Qt] Build fix for gcc used on WK2 build bot. * UIProcess/qt/QtWebPagePolicyClient.cpp: (QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case: with values outside the range of the type. Instead switch() on the int instead. 2011-12-20 Rafael Brandao [Qt] Extend QQuickWebview::navigationRequested API https://bugs.webkit.org/show_bug.cgi?id=73818 Reviewed by Simon Hausmann. Added url of the originating frame on QWebNavigationRequest, accessible via 'request.originatingUrl' on QML. Download action was moved to experimental, so in order to use it you should set 'request.action = WebViewExperimental.DownloadRequest' on QML. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebnavigationrequest.cpp: (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate): (QWebNavigationRequest::QWebNavigationRequest): (QWebNavigationRequest::originatingUrl): * UIProcess/API/qt/qwebnavigationrequest_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: Tests were modified a bit to reuse urls and also added a test case to check originating url once a request is done. * UIProcess/qt/QtWebPagePolicyClient.cpp: (QtWebPagePolicyClient::decidePolicyForNavigationAction): * UIProcess/qt/QtWebPagePolicyClient.h: 2011-12-20 Balazs Kelemen [Qt] WK2 Debugging quirks need some improvement https://bugs.webkit.org/show_bug.cgi?id=74859 Reviewed by Simon Hausmann. Improvements added to make debugging WebKit2 more confortable and efficient: 1. Unify debugging quirks. From now all of them are controlled by the QT_WEBKIT2_DEBUG environment variable. 2. Disable crash handlers for WebKitTestRunner if debugging quirks are used to make it possible to use postmortem debugging via core dumps which is extremely useful for debugging bugs triggered by layout tests. 3. Disable test timeout for WebKitTestRunner if debugging quirks are used because that makes debugging impossible. * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::QtWebProcess::setupChildProcess): * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): 2011-12-20 Jesus Sanchez-Palencia [Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test https://bugs.webkit.org/show_bug.cgi?id=74923 Rubber-stamped by Csaba Osztrogonác. Fixing API usage after http://trac.webkit.org/changeset/103310. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::loadNonexistentFileUrl): 2011-12-20 Simon Hausmann [Qt] Favicon support should work with multiple web contexts https://bugs.webkit.org/show_bug.cgi?id=74922 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is already a member variable "context" which is the correct one. (QQuickWebViewPrivate::setIcon): Ditto. * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to query the correct icon database. * UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext. (WebKit::generateContextID): (WebKit::QtWebContext::QtWebContext): (WebKit::QtWebContext::~QtWebContext): (WebKit::QtWebContext::contextByID): (WebKit::QtWebContext::initialize): * UIProcess/qt/QtWebContext.h: (WebKit::QtWebContext::context): (WebKit::QtWebContext::contextID): * UIProcess/qt/QtWebIconDatabaseClient.cpp: (QtWebIconDatabaseClient::QtWebIconDatabaseClient): (QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url. * UIProcess/qt/QtWebIconDatabaseClient.h: 2011-12-20 Rafael Brandao [Qt][WK2] Implement favicon support https://bugs.webkit.org/show_bug.cgi?id=71082 Reviewed by Simon Hausmann. Added attribute to QQuickWebView named "icon" that should be used as source for QQuickImage in order to display it. All images pointing to it will refresh when the icon is ready. We also use IDs to make it possible to handle different icons for the same page URL at different times (i.e. dynamically changing favicon). IconDatabase storage lies on UIProcess and the synchronous call for the icon that happens on WebIconDatabase won't need to send any message to WebProcess. The part of IconDatabase on WebProcess handles the download of the resource whenever it is needed. Then the content downloaded is sent through IPC to the actual database, on UIProcess. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::_q_onIconChangedForPageURL): (QQuickWebViewPrivate::setIcon): (QQuickWebView::icon): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebiconimageprovider.cpp: Added. (QWebIconImageProvider::QWebIconImageProvider): (QWebIconImageProvider::~QWebIconImageProvider): (QWebIconImageProvider::requestImage): * UIProcess/API/qt/qwebiconimageprovider_p.h: Added. * UIProcess/WebContext.h: * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::synchronousIconURLForPageURL): (WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter and a default value for it to not break the old usage. The support for multiple sizes of favicons is still missing on WebCore. * UIProcess/WebIconDatabase.h: * UIProcess/qt/QtWebContext.cpp: (WebKit::QtWebContext::initialize): * UIProcess/qt/QtWebContext.h: (WebKit::QtWebContext::iconDatabase): * UIProcess/qt/QtWebIconDatabaseClient.cpp: Added. (toQtWebIconDatabaseClient): (QtWebIconDatabaseClient::QtWebIconDatabaseClient): (QtWebIconDatabaseClient::~QtWebIconDatabaseClient): (QtWebIconDatabaseClient::didChangeIconForPageURL): (QtWebIconDatabaseClient::iconImageForPageURL): (QtWebIconDatabaseClient::iconURLHashForPageURL): (QtWebIconDatabaseClient::requestIconForPageURL): (QtWebIconDatabaseClient::retainIconForPageURL): (QtWebIconDatabaseClient::releaseIconForPageURL): * UIProcess/qt/QtWebIconDatabaseClient.h: Added. * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didStartProgress): 2011-12-20 Jesus Sanchez-Palencia [Qt] Improve QQuickWebView error handling API https://bugs.webkit.org/show_bug.cgi?id=73815 Reviewed by Simon Hausmann. Modifying loadFail signal to include the error description and changing the ErrorType enum to ErrorDomain, to stay aligned with ResourceError API itself. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::dispatchLoadFailed): 2011-12-19 Sam Weinig Add support for scrollLineDown: and scrollLineUp: NSResponder selectors https://bugs.webkit.org/show_bug.cgi?id=74907 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKView.mm: Add implementations for scrollLineDown: and scrollLineUp: using our fun macros. 2011-12-19 Sam Weinig More PlatformEvent cleanup https://bugs.webkit.org/show_bug.cgi?id=74831 Reviewed by Dan Bernstein. * WebProcess/WebPage/WebPage.cpp: (WebKit::handleContextMenuEvent): Update to use new names, access style. 2011-12-16 Jon Lee [WK2] Extend show notification API to include the source page https://bugs.webkit.org/show_bug.cgi?id=74751 Reviewed by John Sullivan. We add the source page that dispatched the notification in the API for convenience. In order to include the page, we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy. * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message. * UIProcess/WebPageProxy.messages.in: Add a showNotification() message. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy. * UIProcess/Notifications/WebNotificationManagerProxy.h: * UIProcess/API/C/WKNotificationProvider.h: * UIProcess/Notifications/WebNotificationProvider.cpp: (WebKit::WebNotificationProvider::show): * UIProcess/Notifications/WebNotificationProvider.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showNotification): * UIProcess/WebPageProxy.h: 2011-12-19 Jesus Sanchez-Palencia [Qt][WK2] QWebDownloadItems are leaking https://bugs.webkit.org/show_bug.cgi?id=74618 Reviewed by Kenneth Rohde Christiansen. QWebDownloadItems are leaking when WebProcess raises a download failure before sending didReceiveResponse back to UIProcess. This can happen when QtFileDownloader fails in determineFilename(), for instance. It happens when QtDownloadManager::downloadFailed() is reached and has an "empty" downloadItem, which means we never got to QtDownloadManager::downloadReceivedResponse(). At this point QQuickWebView::downloadRequested() signal hasn't been emitted and the downloadItem will have null parent. Therefore, it will leak unless we delete it ourselves. * UIProcess/qt/QtDownloadManager.cpp: (WebKit::QtDownloadManager::downloadFailed): 2011-12-19 Anders Carlsson Send gesture events through the event dispatcher and scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74879 Reviewed by Andreas Kling. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleGestureEvent): Use the EventDispatcher message. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::gestureEvent): Try to send the event to the scrolling coordinator first before dispatching it on the main thread. (WebKit::EventDispatcher::dispatchGestureEvent): Just call through to the WebPageProxy. * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Move the GestureEvent message from WebPage to EventDispatcher. 2011-12-19 Jesus Sanchez-Palencia [Qt] Setting QWebPreferences affect multiple WebViews https://bugs.webkit.org/show_bug.cgi?id=71559 Reviewed by Kenneth Rohde Christiansen. The QWebPreferences are per WebView, but the actual implementation in WebKit2 make them per page group. Currently we share only one page group between all the views, so if we set preferences to one WebView the preferences are shared between them all, generating unexpected behavior. This patch fixes this by making each WebView have its own page group. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: 2011-12-19 Eric Carlson Enable for Mac build https://bugs.webkit.org/show_bug.cgi?id=74838 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: 2011-12-19 Caio Marcelo de Oliveira Filho [Qt] [WK2] Fix build error due to unused variables https://bugs.webkit.org/show_bug.cgi?id=74862 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::inputMethodEvent): 2011-12-19 Kenneth Rohde Christiansen [Qt] Add methods for setting, cancelling and confirming the composition Reviewed by Simon Hausmann. * UIProcess/WebPageProxy.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::confirmComposition): (WebKit::WebPageProxy::cancelComposition): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::targetFrameForEditing): (WebKit::WebPage::confirmComposition): (WebKit::WebPage::setComposition): (WebKit::WebPage::cancelComposition): 2011-12-19 Kenneth Rohde Christiansen First stab at upstreaming our virtual keyboard code Reviewed by Simon Hausmann. Add basic implementation of inputMethodEvent * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::inputMethodEvent): * UIProcess/qt/QtWebPageEventHandler.h: 2011-12-19 Simon Hausmann [Qt][WK2] Add support for modal event loop processing for WTR https://bugs.webkit.org/show_bug.cgi?id=74852 Reviewed by Kenneth Rohde Christiansen. Add support for nested event loops, used by WebPage::runModal(). * Platform/qt/RunLoopQt.cpp: (RunLoop::run): (RunLoop::stop): 2011-12-18 Sam Weinig Another attempt to fix the windows build. * Platform/win/WorkQueueWin.cpp: (WorkQueue::performWorkOnRegisteredWorkThread): (WorkQueue::dispatch): 2011-12-18 Sam Weinig Try to fix the windows build. * Platform/win/WorkQueueWin.cpp: (WorkQueue::performWorkOnRegisteredWorkThread): 2011-12-18 Sam Weinig Remove now unused WorkItem.h https://bugs.webkit.org/show_bug.cgi?id=74818 Reviewed by Andreas Kling. * GNUmakefile.am: * Platform/CoreIPC/Connection.cpp: * Platform/RunLoop.cpp: * Platform/RunLoop.h: * Platform/WorkItem.h: Removed. * Platform/gtk/RunLoopGtk.cpp: * Platform/mac/RunLoopMac.mm: * Platform/mac/WorkQueueMac.cpp: (WorkQueue::platformInvalidate): * Platform/qt/RunLoopQt.cpp: * Platform/win/RunLoopWin.cpp: * Target.pri: * UIProcess/ResponsivenessTimer.cpp: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * win/WebKit2.vcproj: 2011-12-18 Anders Carlsson Set the main frame view scroll position asynchronously https://bugs.webkit.org/show_bug.cgi?id=74823 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Don't make the background red. 2011-12-18 Sam Weinig Move timestamp down from PlatformEvent subclasses to the base class https://bugs.webkit.org/show_bug.cgi?id=74805 Reviewed by Anders Carlsson. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): 2011-12-18 Anders Carlsson Add a scrolling thread to the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74814 Reviewed by Andreas Kling. Check if the scrolling coordinator can handle the wheel event before dispatching it to the main thread. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): 2011-12-18 Anders Carlsson EventDispatcher should keep track of all scrolling coordinators https://bugs.webkit.org/show_bug.cgi?id=74810 Reviewed by Andreas Kling. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::addScrollingCoordinatorForPage): Get the scrolling coordinator from the WebCore page and add it to the map. (WebKit::EventDispatcher::removeScrollingCoordinatorForPage): Remove the scrolling coordinator from the map. (WebKit::EventDispatcher::sendDidHandleEvent): Add a new helper function, currently unused. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Add the scrolling coordinator. (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): Remove the scrolling coordinator. * WebProcess/WebProcess.h: (WebKit::WebProcess::eventDispatcher): Add a getter. 2011-12-16 Anders Carlsson Move everyone off of WorkItem https://bugs.webkit.org/show_bug.cgi?id=74773 Reviewed by Darin Adler. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination): * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::open): * Platform/RunLoop.cpp: (RunLoop::performWork): (RunLoop::dispatch): * Platform/RunLoop.h: * Platform/WorkQueue.cpp: * Platform/WorkQueue.h: (WorkQueue::WorkItemWin::function): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::EventSource::EventSource): (WorkQueue::EventSource::executeEventSource): (WorkQueue::registerEventSourceHandler): (WorkQueue::dispatchOnSource): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): (WorkQueue::dispatchOnTermination): * Platform/mac/WorkQueueMac.cpp: (WorkQueue::executeFunction): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): * Platform/qt/WorkQueueQt.cpp: (WorkQueue::WorkItemQt::WorkItemQt): (WorkQueue::WorkItemQt::~WorkItemQt): (WorkQueue::WorkItemQt::execute): (WorkQueue::registerSocketEventHandler): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): (WorkQueue::dispatchOnTermination): * Platform/win/RunLoopWin.cpp: (RunLoop::wakeUp): * Platform/win/WorkQueueWin.cpp: (WorkQueue::WorkItemWin::WorkItemWin): (WorkQueue::WorkItemWin::create): (WorkQueue::HandleWorkItem::HandleWorkItem): (WorkQueue::HandleWorkItem::createByAdoptingHandle): (WorkQueue::registerHandle): (WorkQueue::dispatch): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/win/ProcessLauncherWin.cpp: (WebKit::ProcessLauncher::launchProcess): * WebProcess/mac/CoreIPCClientRunLoop.mm: (WebKit::callOnCoreIPCClientRunLoopAndWait): 2011-12-17 Sam Weinig Make PlatformTouchEvent inherit from PlatformEvent https://bugs.webkit.org/show_bug.cgi?id=74777 Reviewed by Andreas Kling. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Add PlatformEvent prefix to enum types. 2011-12-16 Anders Carlsson Convert more WorkItems over to WTF::Functions https://bugs.webkit.org/show_bug.cgi?id=74770 Reviewed by Andreas Kling. * Platform/WorkQueue.cpp: (WorkQueue::dispatchAfterDelay): * Platform/WorkQueue.h: * Shared/ChildProcess.cpp: (WebKit::ChildProcess::didCloseOnConnectionWorkQueue): * UIProcess/Launcher/ThreadLauncher.cpp: (WebKit::ThreadLauncher::launchThread): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): * WebProcess/Plugins/PluginView.cpp: (WebKit::derefPluginView): (WebKit::PluginView::unprotectPluginFromDestruction): 2011-12-16 Mark Hahnenberg Windows test fix Unreviewed test fix. All Windows tests were crashing when objects who were pointing to static data members across DLL boundaries were getting garbage in their pointers. * win/WebKit2.def: 2011-12-16 Ryosuke Niwa Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step https://bugs.webkit.org/show_bug.cgi?id=74748 Reviewed by Eric Seidel. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::registerUndoStep): (WebKit::WebEditorClient::registerRedoStep): * WebProcess/WebCoreSupport/WebEditorClient.h: 2011-12-16 Anders Carlsson Add a pretty dumb tile cache to WebTileCacheLayer https://bugs.webkit.org/show_bug.cgi?id=74753 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting. 2011-12-16 Anders Carlsson TiledCoreAnimationDrawingArea should enable the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74724 Reviewed by Adam Roben. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 2011-12-16 Sam Weinig Give PlatformEvents a base class https://bugs.webkit.org/show_bug.cgi?id=74685 Reviewed by Anders Carlsson. Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent and PlatformGestureEvent and move Type enumeration and modifiers down to it. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::handleKeyboardEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::handleMouseEvent): (WebKit::WebPage::setInitialFocus): (WebKit::WebPage::handleEditingKeyboardEvent): (WebKit::WebPage::dragEnded): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::executeKeypressCommandsInternal): (WebKit::WebPage::handleEditingKeyboardEvent): 2011-12-16 Ryosuke Niwa Only EditCommandComposition should implement unapply and reapply https://bugs.webkit.org/show_bug.cgi?id=74490 Reviewed by Eric Seidel. Renamed WebEditCommand to WebUndoStep and made necessary changes. Everything on WebProcess side should have the correct name now. Names in the proxy and UIProcess are to be updated in a follow up. * CMakeLists.txt: * GNUmakefile.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::registerCommandForUndo): (WebKit::WebEditorClient::registerCommandForRedo): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebPage/WebEditCommand.cpp: Removed. * WebProcess/WebPage/WebEditCommand.h: Removed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::webUndoStep): (WebKit::WebPage::addWebUndoStep): (WebKit::WebPage::removeWebEditCommand): (WebKit::WebPage::unapplyEditCommand): (WebKit::WebPage::reapplyEditCommand): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp. (WebKit::generateUndoStep): (WebKit::WebUndoStep::create): * WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h. (WebKit::WebUndoStep::entry): (WebKit::WebUndoStep::entryID): (WebKit::WebUndoStep::WebUndoStep): * win/WebKit2.vcproj: 2011-12-16 Simon Hausmann [Qt] Eliminate dependency to QUndoStack https://bugs.webkit.org/show_bug.cgi?id=74691 Reviewed by Kenneth Rohde Christiansen. Replaced the QUndoStack with two vectors. When calling unapply() on the edit command proxy, it will automatically re-register itself in the redo stack. * UIProcess/qt/QtWebUndoController.cpp: (QtWebUndoController::registerEditCommand): (QtWebUndoController::clearAllEditCommands): (QtWebUndoController::canUndoRedo): (QtWebUndoController::executeUndoRedo): * UIProcess/qt/QtWebUndoController.h: 2011-12-16 Rafael Brandao [Qt][WK2] Move webView.page into experimental https://bugs.webkit.org/show_bug.cgi?id=74406 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::page): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::accessPage): 2011-12-16 Mark Hahnenberg De-virtualize destructors https://bugs.webkit.org/show_bug.cgi?id=74331 Reviewed by Geoffrey Garen. * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert. * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy. (WebKit::JSNPObject::destroy): * WebProcess/Plugins/Netscape/JSNPObject.h: * win/WebKit2.def: Add/remove necessary symbols. * win/WebKit2CFLite.def: Ditto. 2011-12-16 Carlos Garcia Campos [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate https://bugs.webkit.org/show_bug.cgi?id=74713 Reviewed by Gustavo Noronha Silva. Most of the members are bools, so it reduces the memory footprint. * UIProcess/API/gtk/WebKitWindowProperties.cpp: 2011-12-16 Carlos Garcia Campos [GTK] Window frame should be 0x0 when the toplevel window is not visible https://bugs.webkit.org/show_bug.cgi?id=74709 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitUIClient.cpp: (getWindowFrame): Check also whether the toplevel is visible before getting its size and position. 2011-12-16 Michael Bruning [qt][wk2] Viewport info panel shows wrong current scale https://bugs.webkit.org/show_bug.cgi?id=74613 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also added emission of currenScaleUpdated signal when the viewport constraints have been updated. (QWebViewportInfo::didUpdateViewportConstraints): * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of currentScale to QVariant as it depends on the viewport interaction engine now. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed to use currentCSSScale for getting the current css scale. (WebKit::QtViewportInteractionEngine::currentCSSScale): Added. * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale. 2011-12-15 Martin Robinson Fix 'make dist' in preparation for the GTK+ release. * GNUmakefile.am: Add missing header. 2011-12-15 Anders Carlsson Add support for accelerated compositing to the tiled Core Animation drawing area https://bugs.webkit.org/show_bug.cgi?id=74675 Reviewed by Andreas Kling. Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay): (WebKit::TiledCoreAnimationDrawingArea::scroll): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2011-12-15 Sheriff Bot Unreviewed, rolling out r102652 and r102717. http://trac.webkit.org/changeset/102652 http://trac.webkit.org/changeset/102717 https://bugs.webkit.org/show_bug.cgi?id=74674 Broke too many webs. (Requested by kling on #webkit). * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::windowFrameInScreenCoordinates): (WebKit::WebPage::viewFrameInWindowCoordinates): (WebKit::WebPage::accessibilityPosition): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): 2011-12-15 Gustavo Noronha Silva [GTK] New API test for WindowProperties fails https://bugs.webkit.org/show_bug.cgi?id=74630 Reviewed by Martin Robinson. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (WindowProperties::viewReadyToShow): assert each member to make assertion error messages more useful, and avoid asserting x and y, since we are getting bad values from WebCore, for some reason. (testWebViewWindowProperties): use smaller values that fit inside the 800x600 screen used by the bots. 2011-12-15 Anders Carlsson EventDispatcher should handle wheel events on the connection queue https://bugs.webkit.org/show_bug.cgi?id=74627 Reviewed by Andreas Kling. Send wheel events to the EventDispatcher, which handles them on the connection work queue, and immediately bounces them to the main thread (for now). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::didReceiveEvent): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::EventDispatcher::dispatchWheelEvent): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebPage/WebPage.h: 2011-12-15 Jon Lee [WK2] Extend WebNotification to include its origin https://bugs.webkit.org/show_bug.cgi?id=74615 Reviewed by Sam Weinig. * Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database identifier. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCopyDatabaseIdentifier): * UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin. (WebKit::WebNotification::create): (WebKit::WebNotification::origin): * UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions. (WebKit::WebNotification::WebNotification): * UIProcess/API/C/WKNotification.h: Expose WebNotification's origin(). * UIProcess/API/C/WKNotification.cpp: (WKNotificationGetSecurityOrigin): * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the origin of the notification. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): * UIProcess/Notifications/WebNotificationManagerProxy.h: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as identifier. 2011-12-15 Rafael Brandao [Qt][WK2] Add test for download policy on navigation request https://bugs.webkit.org/show_bug.cgi?id=74541 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a downloadFinished signal to finish the test. 2011-12-15 Anders Carlsson Move WorkQueue Mach handlers over to WTF::Function https://bugs.webkit.org/show_bug.cgi?id=74620 Reviewed by Sam Weinig. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::initializeDeadNameSource): * Platform/WorkQueue.h: * Platform/mac/WorkQueueMac.cpp: (WorkQueue::EventSource::EventSource): (WorkQueue::EventSource::eventHandler): (WorkQueue::registerMachPortEventHandler): 2011-12-14 Anders Carlsson Add WTF::Function to wtf/Forward.h https://bugs.webkit.org/show_bug.cgi?id=74576 Reviewed by Adam Roben. * Platform/RunLoop.h: * Platform/WorkQueue.h: Remove forward declarations and just include wtf/Forward.h. 2011-12-15 Rafael Brandao [Qt][WK2] Move WebPreferences into experimental https://bugs.webkit.org/show_bug.cgi?id=74404 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::preferences): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: 2011-12-15 Carlos Garcia Campos [GTK] Add WebKitWindowProperties to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=74595 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitUIClient.cpp: (createNewPage): Pass the dictionary containing the window features to webkitWebViewCreateNewPage(). (toolbarsAreVisible): Return WebKitWindowProperties:toolbar-visible. (setToolbarsAreVisible): Set WebKitWindowProperties:toolbar-visible. (menuBarIsVisible): Return WebKitWindowProperties:menu-visible. (setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible. (statusBarIsVisible): Return WebKitWindowProperties:status-visible. (setStatusBarIsVisible): Set WebKitWindowProperties:status-visible. (isResizable): Return WebKitWindowProperties:resizable. (setIsResizable): Set WebKitWindowProperties:resizable. (getWindowFrame): Return WebKitWindowProperties:geometry. (setWindowFrame): Set WebKitWindowProperties:geometry. (webkitUIClientAttachUIClientToPage): Initialize the UI client for the given page. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_init): Create a WebKitWindowProperties object for the view. (webkit_web_view_class_init): (webkitWebViewCreateNewPage): Update the WebKitWindowProperties object using the window features dictionary. (webkit_web_view_get_window_properties): Return the WebKitWindowProperties object of the view. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/WebKitWindowProperties.cpp: Added. (webkitWindowPropertiesFinalize): (webkitWindowPropertiesGetProperty): (webkitWindowPropertiesSetProperty): (webkit_window_properties_class_init): (webkit_window_properties_init): (webkitWindowPropertiesCreate): Create a new WebKitWindowProperties object. (webkitWindowPropertiesSetGeometry): (webkitWindowPropertiesSetToolbarVisible): (webkitWindowPropertiesSetMenubarVisible): (webkitWindowPropertiesSetStatusbarVisible): (webkitWindowPropertiesSetLocationbarVisible): (webkitWindowPropertiesSetScrollbarsVisible): (webkitWindowPropertiesSetResizable): (webkitWindowPropertiesSetFullscreen): (webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the window features dictionary and update the WebKitWindowProperties object accordingly. (webkit_window_properties_get_geometry): (webkit_window_properties_get_toolbar_visible): (webkit_window_properties_get_statusbar_visible): (webkit_window_properties_get_scrollbars_visible): (webkit_window_properties_get_menubar_visible): (webkit_window_properties_get_locationbar_visible): (webkit_window_properties_get_resizable): (webkit_window_properties_get_fullscreen): * UIProcess/API/gtk/WebKitWindowProperties.h: Added. * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWindowProperties. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_window_properties_get_type. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (WindowProperties::windowPropertiesNotifyCallback): (WindowProperties::viewReadyToShow): (WindowProperties::viewCreate): (WindowProperties::setExpectedWindowProperties): (testWebViewWindowProperties): (beforeAll): * UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::createNewPage): Add also "locationBarVisible" to the window features dictionary. 2011-12-15 Caio Marcelo de Oliveira Filho [Qt] [WK2] Remove QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74540 Reviewed by Kenneth Rohde Christiansen. Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom and user agent setting). Since those wrappers are unused, they were removed. The signal in the class was also unused. This patch also remove the code from WebContextMenuProxyQt, it was remains of a previous QMenu-based implementation. We want to rewrite this code for QML anyway, so I reverted to an empty state. Farewell, QtWebPageProxy! * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::~QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::createDrawingAreaProxy): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged): (QQuickWebViewPrivate::_q_onVisibleChanged): (QQuickWebViewPrivate::updateViewportSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): (QQuickWebViewExperimental::postMessage): (QQuickWebView::load): (QQuickWebView::goBack): (QQuickWebView::goForward): (QQuickWebView::stop): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::canGoBack): (QQuickWebView::canGoForward): (QQuickWebView::loading): (QQuickWebView::canReload): (QQuickWebView::title): (QQuickWebView::pageRef): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory_p_p.h: * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::preferencesRef): * UIProcess/PageClient.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::QtPageClient): (QtPageClient::initialize): (QtPageClient::createPopupMenuProxy): (QtPageClient::createContextMenuProxy): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageProxy.cpp: Removed. * UIProcess/qt/QtWebPageProxy.h: Removed. * UIProcess/qt/WebContextMenuProxyQt.cpp: (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt): (WebKit::WebContextMenuProxyQt::create): (WebKit::WebContextMenuProxyQt::showContextMenu): (WebKit::WebContextMenuProxyQt::hideContextMenu): * UIProcess/qt/WebContextMenuProxyQt.h: 2011-12-15 Simon Hausmann [WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation https://bugs.webkit.org/show_bug.cgi?id=74602 Reviewed by Kenneth Rohde Christiansen. For shared memory Qt was using shm_open, Gtk was using files in /tmp. There is no reason to obfuscate the code with #ifdefs or let Gtk use an inferior method of opening shared memory. So this patch makes SharedMemoryUnix.cpp truly Qt and Gtk independent. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::create): 2011-12-15 Simon Hausmann [Qt] Cleanup: Remove unnecessary const_cast Reviewed by Kenneth Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::preferences): 2011-12-15 Michael Brüning [QT][WK2]Add (experimental) viewport info view to Minibrowser/qt. https://bugs.webkit.org/show_bug.cgi?id=72893 Reviewed by Kenneth Rohde Christiansen. This patch extends QQuickWebViewExperimental by a property named viewportInfo, which contains the viewport scalability and layout and contents size information. This property is exposed to QML through the experimental extension for QQuickWebView. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::PostTransitionState::apply): Added applying contentsSize to viewportInfo. (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::viewportInfo): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: Moved PostTransitionState::apply to qquickwebview.cpp. Added friend QWebViewportInfo. * UIProcess/API/qt/qwebviewportinfo.cpp: Added. (QWebViewportInfo::QWebViewportInfo): (QWebViewportInfo::~QWebViewportInfo): (QWebViewportInfo::contentsSize): (QWebViewportInfo::currentScale): (QWebViewportInfo::devicePixelRatio): (QWebViewportInfo::initialScale): (QWebViewportInfo::minimumScale): (QWebViewportInfo::maximumScale): (QWebViewportInfo::isScalable): (QWebViewportInfo::layoutSize): (QWebViewportInfo::didUpdateContentsSize): (QWebViewportInfo::didUpdateCurrentScale): (QWebViewportInfo::didUpdateViewportConstraints): * UIProcess/API/qt/qwebviewportinfo_p.h: Added. * UIProcess/qt/QtViewportInteractionEngine.h: (WebKit::QtViewportInteractionEngine::Constraints::Constraints): Added layoutSize. (WebKit::QtViewportInteractionEngine::constraints): Added property to access m_contraints. 2011-12-15 Simon Hausmann [WK2] WebPage::m_useFixedLayout variable unininitialized https://bugs.webkit.org/show_bug.cgi?id=74596 Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Avoid uninitialized use through initialization in the constructor. 2011-12-15 Alexander Færøy [Qt] r102849 broke the Qt build on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=74594 Reviewed by Simon Hausmann. The __APPLE__ macro is defined on all standard OS X compilers, which leads to various CoreGraphics headers to be included in the Qt build. * config.h: 2011-12-14 Jing Zhao Opening two popup menus by dispatchEvent() makes problems. https://bugs.webkit.org/show_bug.cgi?id=73304 Reviewed by Kent Tamura. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::hasOpenedPopup): Not implemented. * WebProcess/WebCoreSupport/WebChromeClient.h: Overrides hasOpenedPopup(). 2011-12-14 Sam Weinig Remove whitespace from InheritedPropertySheets attributes in vsprops files to appease the Visual Studio project migrator. Reviewed by Adam Roben. * win/WebKit2Debug.vsprops: * win/WebKit2DebugAll.vsprops: * win/WebKit2DebugCairoCFLite.vsprops: * win/WebKit2Production.vsprops: * win/WebKit2Release.vsprops: * win/WebKit2ReleaseCairoCFLite.vsprops: * win/WebKit2WebProcessDebug.vsprops: * win/WebKit2WebProcessDebugAll.vsprops: * win/WebKit2WebProcessDebugCairoCFLite.vsprops: * win/WebKit2WebProcessProduction.vsprops: * win/WebKit2WebProcessRelease.vsprops: * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: 2011-12-14 Anders Carlsson Add WorkQueue::dispatch and RunLoop::dispatch which both take WTF::Function objects https://bugs.webkit.org/show_bug.cgi?id=74574 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::invalidate): (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue): (CoreIPC::Connection::connectionDidClose): (CoreIPC::Connection::enqueueIncomingMessage): Switch over to dispatch. * Platform/RunLoop.cpp: (RunLoop::dispatch): Create a FunctionWorkItem and call scheduleWork. * Platform/RunLoop.h: Add dispatch. * Platform/WorkItem.h: (FunctionWorkItem::FunctionWorkItem): (FunctionWorkItem::execute): (WorkItem::create): Add a helper work item that wraps a WTF::Function. * Platform/WorkQueue.cpp: (WorkQueue::dispatch): Create a FunctionWorkItem and call scheduleWork. * Platform/WorkQueue.h: Add dispatch. * UIProcess/Launcher/ProcessLauncher.cpp: (WebKit::ProcessLauncher::ProcessLauncher): Switch over to dispatch. 2011-12-14 Hajime Morrita JS_INLINE and WTF_INLINE should be visible from WebCore https://bugs.webkit.org/show_bug.cgi?id=73191 Reviewed by Kevin Ollivier. Removed macro definitions which is now provided by Platform.h * config.h: 2011-12-14 Alexey Proskuryakov [Mac] Sandbox violation opening AppleSNBFBUserClient https://bugs.webkit.org/show_bug.cgi?id=74560 Reviewed by Darin Adler. * WebProcess/com.apple.WebProcess.sb: Just allow it. 2011-12-13 Jon Lee Enable notifications on Mac. Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2011-12-14 Mark Rowe NPN_GetValueForURL returns wrong value for NPNURLVProxy Reviewed by Anders Carlsson. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::proxiesForURL): Fix a copy-paste error. 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move QWebPreferences out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74525 Reviewed by Luiz Agostini. This patch also uses internal WebKit API to set the Accelerate Compositing directly instead of going thru QWebPreferencesPrivate. The previous approach was always causing the QWebPreferences to be created making the "lazy initialization" useless. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::navigatorQtObjectEnabled): (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): (QQuickWebViewExperimental::postMessage): (QQuickWebView::preferences): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::createPreferences): (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::navigatorQtObjectEnabled): (QWebPreferences::setNavigatorQtObjectEnabled): (QWebPreferencesPrivate::preferencesRef): * UIProcess/API/qt/qwebpreferences_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Carlos Garcia Campos [GTK] Page size should be 0,0 when view widget is not realized https://bugs.webkit.org/show_bug.cgi?id=74523 Reviewed by Martin Robinson. We currently return 1,1 because GTK+ initializes widget allocation as -1,-1,1,1. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::viewSize): Check whether widget is realized and return IntSize() in that case. 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move download handling out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74506 Reviewed by Kenneth Rohde Christiansen. Also moves the creation of QtWebContext out of QtWebPageProxy. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::handleDownloadRequest): (QQuickWebViewPrivate::_q_onReceivedResponseFromDownload): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebdownloaditem_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleDownloadRequest): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move QWebNavigationHistory to QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=74442 Reviewed by Simon Hausmann. QWebNavigationHistory used QtWebPageProxy to be QObject parent of the inner models, this patch change that to use OwnPtr instead. When creating the history object we pass only the WKPageRef and let it get the backForwardList. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::didChangeBackForwardList): (QQuickWebViewExperimental::navigationHistory): (QQuickWebViewExperimental::goForwardTo): (QQuickWebViewExperimental::goBackTo): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/qwebnavigationhistory_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Caio Marcelo de Oliveira Filho [Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74414 Reviewed by Simon Hausmann. This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid the WebPage having a backpointer to the QQuickWebView. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::geometryChanged): (QQuickWebPage::event): (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::initialize): (QQuickWebPagePrivate::setDrawingAreaSize): (QQuickWebPagePrivate::paintToCurrentGLContext): (QQuickWebPagePrivate::resetPaintNode): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::initializeDesktop): (QQuickWebViewPrivate::initializeTouch): (QQuickWebViewPrivate::_q_resume): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::createDrawingAreaProxy): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged): (QQuickWebViewPrivate::updateViewportSize): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::createDrawingAreaProxy): * UIProcess/qt/QtPageClient.h: (QtPageClient::findStringInCustomRepresentation): (QtPageClient::countStringMatchesInCustomRepresentation): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::startDrag): * UIProcess/qt/QtWebPageEventHandler.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::init): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Gustavo Noronha Silva Unreviewed build fix. * GNUmakefile.am: make sure we do not derreference the target link if it already exists, and replace it with the new one instead, otherwise we end up with a gtk link inside Source/WebKit2/UIProcess/API/gtk, which causes the documentation build to produce warnings, and make the build fail. 2011-12-13 Andreas Kling REGRESSION (r102652): New window opens with zero size at produbanco.com and Reviewed by Anders Carlsson. Don't use the cached window frame if it's empty (meaning we haven't received a WindowAndViewFramesChanged message yet.) Instead use the synchronous GetWindowFrame (WP->UIP) message. This situation occurs when opening a new window via window.open(), in which WebCore::createWindow() will query the windowRect() on the new window. I spent a long time trying to write a layout test for this but couldn't come up with something reliable. The windowRect() is non-empty before we get a chance to run JS in/on the new window, and we can't check against the requested geometry since it varies depending on whether the window manager has shown the new window yet. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): 2011-12-13 Caio Marcelo de Oliveira Filho [Qt][WK2] Make QtPageClient dispatch directly to WebView when possible https://bugs.webkit.org/show_bug.cgi?id=74407 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::~QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::pageDidRequestScroll): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::viewSize): (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject): (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebView::QQuickWebView): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::QtPageClient): (QtPageClient::setViewNeedsDisplay): (QtPageClient::pageDidRequestScroll): (QtPageClient::processDidCrash): (QtPageClient::didRelaunchProcess): (QtPageClient::didChangeContentsSize): (QtPageClient::didChangeViewportProperties): (QtPageClient::createPopupMenuProxy): (QtPageClient::didReceiveMessageFromNavigatorQtObject): (QtPageClient::viewSize): (QtPageClient::isViewFocused): (QtPageClient::isViewVisible): * UIProcess/qt/QtPageClient.h: (QtPageClient::initialize): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Carlos Garcia Campos [GTK] Add support for javascript dialogs in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=71362 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitUIClient.cpp: (runJavaScriptAlert): Call webkitWebViewRunJavaScriptAlert(). (runJavaScriptConfirm): Call webkitWebViewRunJavaScriptConfirm(). (runJavaScriptPrompt): Call webkitWebViewRunJavaScriptPrompt(). (webkitUIClientAttachUIClientToPage): Add implementation for runJavaScriptAlert, runJavaScriptConfirm and runJavaScriptPrompt callbacks. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewCreateJavaScriptDialog): Helper function to create javascript dialogs. (webkitWebViewScriptAlert): Default implementation of signal WebKitWebView::script-alert that shows a message dialog. (webkitWebViewScriptConfirm): Default implementation of signal WebKitWebView::script-confirm that shows a question dialog. (webkitWebViewScriptPrompt): Default implementation of signal WebKitWebView::script-prompt that shows a question dialog with a text entry. (webkit_web_view_class_init): (webkitWebViewRunJavaScriptAlert): Emit WebKitWebView::script-alert. (webkitWebViewRunJavaScriptConfirm): Emit WebKitWebView::script-confirm. (webkitWebViewRunJavaScriptPrompt): Emit WebKitWebView::script-prompt. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewJavaScriptDialogs): (beforeAll): * UIProcess/API/gtk/webkit2marshal.list: 2011-12-13 Kenneth Rohde Christiansen [Qt] Make sure that touch events result in the page view gaining focus Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::touchEvent): Force active focus. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: Remove ::touchEvent override. 2011-12-13 Carlos Garcia Campos [GTK] Initial UI client implementation for WebKit2 GTK +API https://bugs.webkit.org/show_bug.cgi?id=69753 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitUIClient.cpp: Added. (createNewPage): Call webkitWebViewCreateNewPage. (showPage): Call webkitWebViewReadyToShowPage. (closePage): Call webkitWebViewClosePage. (webkitUIClientAttachUIClientToPage): Initialize UI client and attach it to the given page. (webkit_ui_client_init): (webkit_ui_client_class_init): * UIProcess/API/gtk/WebKitUIClient.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewCreate): Default implementation of signal WebKitWebView::create that simply returns NULL. (webkitWebViewConstructed): Create the default UI client. (webkitWebViewAccumulatorObjectHandled): (webkit_web_view_class_init): (webkitWebViewCreateNewPage): Emit create signal. (webkitWebViewReadyToShowPage): Emit ready-to-show signal. (webkitWebViewClosePage): Emit close signal. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewCreateReadyClose): (beforeAll): * UIProcess/API/gtk/webkit2marshal.list: 2011-12-13 Caio Marcelo de Oliveira Filho [Qt][WK2] Move load & navigation related functions out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74395 Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::_q_onVisibleChanged): (QQuickWebViewPrivate::updateViewportSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewPrivate::webPageProxy): (QQuickWebView::load): (QQuickWebView::goBack): (QQuickWebView::goForward): (QQuickWebView::stop): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::canGoBack): (QQuickWebView::canGoForward): (QQuickWebView::loading): (QQuickWebView::canReload): (QQuickWebView::title): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Carlos Garcia Campos Unreviewed. Fix GTK+ build after r102640. * GNUmakefile.am: Add DownloadProxy sources again. 2011-12-12 Caio Marcelo de Oliveira Filho [Qt][WK2] Move undo & edit command PageClient callbacks into QtWebUndoController https://bugs.webkit.org/show_bug.cgi?id=74364 Reviewed by Simon Hausmann. The four callbacks in PageClient related to Undo depend only on the QUndoStack. So we move their handling to a QtWebUndoController (owned by QQuickWebViewPrivate). This also make QtWebUndoCommand an implementation detail. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::registerEditCommand): (QtPageClient::clearAllEditCommands): (QtPageClient::canUndoRedo): (QtPageClient::executeUndoRedo): * UIProcess/qt/QtPageClient.h: (QtPageClient::initialize): * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/QtWebUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.cpp. (QtWebUndoCommand::inUndoRedo): (QtWebUndoCommand::QtWebUndoCommand): (QtWebUndoCommand::~QtWebUndoCommand): (QtWebUndoCommand::redo): (QtWebUndoCommand::undo): (QtWebUndoController::QtWebUndoController): (QtWebUndoController::registerEditCommand): (QtWebUndoController::clearAllEditCommands): (QtWebUndoController::canUndoRedo): (QtWebUndoController::executeUndoRedo): * UIProcess/qt/QtWebUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.h. 2011-12-12 Andreas Kling Resizing Cappuccino is very laggy on WebKit since Safari 5.1 and Reviewed by Anders Carlsson. On Mac, we already cache the window rect through the WindowAndViewFramesChanged message, so simply return that in WebChromeClient::windowRect() instead of sending a synchronous query to the UIProcess. Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than IntRect/IntPoint to match the ChromeClient::windowRect() return type. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setWindowFrame): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::windowFrameInScreenCoordinates): (WebKit::WebPage::viewFrameInWindowCoordinates): (WebKit::WebPage::accessibilityPosition): * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): 2011-12-12 Anders Carlsson Add EventDispatcher class to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=74344 Reviewed by Sam Weinig. The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects. * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Add new files. * Platform/CoreIPC/MessageID.h: Add EventDispatcher. * WebProcess/WebConnectionToUIProcess.cpp: (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess): (WebKit::WebConnectionToUIProcess::invalidate): * WebProcess/WebConnectionToUIProcess.h: WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since we don't want to add queue clients after the connection has been opened. * WebProcess/WebPage/EventDispatcher.cpp: Added. (WebKit::EventDispatcher::EventDispatcher): (WebKit::EventDispatcher::~EventDispatcher): (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): (WebKit::EventDispatcher::wheelEvent): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: Added. Add new stub files. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initialize): Add the event dispatcher as a queue client. * WebProcess/WebProcess.h: Add an EventDispatcher member variable to the web process. 2011-12-12 Sam Weinig Prefix internal methods in Objective-C API files with an underscore https://bugs.webkit.org/show_bug.cgi?id=74363 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKBrowsingContextController.mm: (-[WKBrowsingContextController _pageRef]): (-[WKBrowsingContextController loadRequest:]): (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]): (-[WKBrowsingContextController stopLoading]): (-[WKBrowsingContextController reload]): (-[WKBrowsingContextController reloadFromOrigin]): (-[WKBrowsingContextController goForward]): (-[WKBrowsingContextController canGoForward]): (-[WKBrowsingContextController goBack]): (-[WKBrowsingContextController canGoBack]): (-[WKBrowsingContextController activeURL]): (-[WKBrowsingContextController provisionalURL]): (-[WKBrowsingContextController committedURL]): (-[WKBrowsingContextController title]): (-[WKBrowsingContextController textZoom]): (-[WKBrowsingContextController setTextZoom:]): (-[WKBrowsingContextController pageZoom]): (-[WKBrowsingContextController setPageZoom:]): (-[WKBrowsingContextController setPaginationMode:]): (-[WKBrowsingContextController paginationMode]): (-[WKBrowsingContextController setPageLength:]): (-[WKBrowsingContextController pageLength]): (-[WKBrowsingContextController setGapBetweenPages:]): (-[WKBrowsingContextController gapBetweenPages]): (-[WKBrowsingContextController pageCount]): (-[WKBrowsingContextController _initWithPageRef:]): * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: * UIProcess/API/mac/WKBrowsingContextGroup.mm: (-[WKBrowsingContextGroup allowsJavaScript]): (-[WKBrowsingContextGroup setAllowsJavaScript:]): (-[WKBrowsingContextGroup allowsPlugIns]): (-[WKBrowsingContextGroup setAllowsPlugIns:]): (-[WKBrowsingContextGroup _pageGroupRef]): * UIProcess/API/mac/WKBrowsingContextGroupInternal.h: * UIProcess/API/mac/WKConnection.mm: (-[WKConnection _initWithConnectionRef:]): * UIProcess/API/mac/WKConnectionInternal.h: * UIProcess/API/mac/WKProcessGroup.mm: (didCreateConnection): (-[WKProcessGroup _contextRef]): * UIProcess/API/mac/WKProcessGroupInternal.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:processGroup:browsingContextGroup:]): (-[WKView browsingContextController]): 2011-12-12 Ryosuke Niwa WebKit code shouldn't be calling applyCommand directly https://bugs.webkit.org/show_bug.cgi?id=74337 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::replaceSelectionWithText): 2011-12-12 Sam Weinig Remove unused getter on WKConnection. Reviewed by Dan Bernstein. * UIProcess/API/mac/WKConnection.mm: 2011-12-12 Brady Eidson Page cache should support pages with plugins. and https://bugs.webkit.org/show_bug.cgi?id=13634 Expose a WebKit2 preference for the page cache supporting plugins (on by default). Reviewed by Anders Carlsson. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPageCacheSupportsPlugins): (WKPreferencesGetPageCacheSupportsPlugins): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-12-12 Sam Weinig Add WKConnection objective-c wrapper around WKConnectionRef https://bugs.webkit.org/show_bug.cgi?id=74324 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKConnection.h: Added. * UIProcess/API/mac/WKConnection.mm: Added. (-[WKConnection dealloc]): (-[WKConnection connectionRef]): (-[WKConnection delegate]): (-[WKConnection setDelegate:]): (didReceiveMessage): (didClose): (setUpClient): (-[WKConnection initWithConnectionRef:]): * UIProcess/API/mac/WKConnectionInternal.h: Added. Added new class. * UIProcess/API/mac/WKProcessGroup.h: * UIProcess/API/mac/WKProcessGroup.mm: (didCreateConnection): (setUpConnectionClient): (-[WKProcessGroup initWithInjectedBundleURL:]): (-[WKProcessGroup delegate]): (-[WKProcessGroup setDelegate:]): Add WKProcessGroupDelegate to inform the user of when connections are established. * WebKit2.xcodeproj/project.pbxproj: Add new files. 2011-12-12 Anders Carlsson Rename QueueClient::willProcessMessageOnClientRunLoop https://bugs.webkit.org/show_bug.cgi?id=74325 Reviewed by Sam Weinig. Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that the function is expected to handle the message. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: * Scripts/webkit2/messages.py: (async_case_statement): * Scripts/webkit2/messages_unittest.py: * WebProcess/WebConnectionToUIProcess.cpp: (WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebConnectionToUIProcess.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: 2011-12-12 Alexis Menard Unreviewed cleanup fix. Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016 Also remove the files that should be removed. * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added. * UIProcess/qt/qwkhistory.cpp: Removed. * UIProcess/qt/qwkhistory.h: Removed. * UIProcess/qt/qwkhistory_p.h: Removed. 2011-12-12 Michael Bruning [qt][wk2] Postpone scroll effects when page transition is ongoing. https://bugs.webkit.org/show_bug.cgi?id=74177 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::scrollPositionRequested): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::PostTransitionState::apply): 2011-12-12 Caio Marcelo de Oliveira Filho [Qt][WK2] Remove dead code from QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74296 Reviewed by Andreas Kling. * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: 2011-12-12 Simon Hausmann Unreviewed build fix. Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016 * UIProcess/API/qt/qwebnavigationhistory.cpp: Added. (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate): (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::reset): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationListModel::~QWebNavigationListModel): (QWebNavigationListModel::rowCount): (QWebNavigationListModel::data): (QWebNavigationHistory::QWebNavigationHistory): (QWebNavigationHistory::~QWebNavigationHistory): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: Added. * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added. 2011-12-12 Simon Hausmann [Qt] Move postMessage/messageReceived APIS to experimental Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setPageProxy): (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::postMessage): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: 2011-12-12 Alexis Menard [Qt][WK2] History is not accessible in QML. https://bugs.webkit.org/show_bug.cgi?id=73016 Reviewed by Simon Hausmann. Remove the old qwkhistory and create QWebNavigationHistory which is QML friendly with data models you can plug to a view in QML * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didChangeBackForwardList): (QQuickWebViewExperimental::navigationHistory): (QQuickWebViewExperimental::goForwardTo): (QQuickWebViewExperimental::goBackTo): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: Added. (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate): (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::reset): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationListModel::~QWebNavigationListModel): (QWebNavigationListModel::rowCount): (QWebNavigationListModel::data): (QWebNavigationHistory::QWebNavigationHistory): (QWebNavigationHistory::~QWebNavigationHistory): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: Added. * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h. * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added. * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::QtWebPageLoadClient): (QtWebPageLoadClient::didChangeBackForwardList): * UIProcess/qt/QtWebPageLoadClient.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::~QtWebPageProxy): (QtWebPageProxy::goBackTo): (QtWebPageProxy::goForwardTo): (QtWebPageProxy::navigationHistory): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/qwkhistory.cpp: Removed. * UIProcess/qt/qwkhistory.h: Removed. 2011-12-09 Jesus Sanchez-Palencia [Qt][WK2] Move startDrag implementation to QtWebPageEventHandler https://bugs.webkit.org/show_bug.cgi?id=73145 Reviewed by Simon Hausmann. Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag and call it straight from QtPageClient. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/qt/QtWebPageEventHandler.cpp: (dragOperationToDropAction): (dragOperationToDropActions): (dropActionToDragOperation): Now these functions are static inline and not part of QtWebPageEventHandler anymore. (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::startDrag): * UIProcess/qt/QtWebPageEventHandler.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::startDrag): removed. 2011-12-12 Caio Marcelo de Oliveira Filho [Qt] [WK2] Support customizing popup menus with QML https://bugs.webkit.org/show_bug.cgi?id=73560 Reviewed by Tor Arne Vestbø. Add a new property 'itemSelector' to WebView (experimental for now) that contains the QML component used when it needs to spawn a popup menu. For example,