2012-01-24 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=76928 Accelerated drawing should force compositing mode -and corresponding- Reviewed by Simon Fraser. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-01-24 Alexis Menard Unreviewed build fix for Qt. * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::showDebugBorders): (WebKit::LayerTreeHostQt::showRepaintCounter): 2012-01-23 Simon Fraser Show layer borders for scrollbar layers https://bugs.webkit.org/show_bug.cgi?id=76888 Reviewed by Beth Dakin. Update for new signatures of GraphicsLayerClient::showDebugBorders() and GraphicsLayerClient::showRepaintCounter(). * UIProcess/LayerTreeHostProxy.h: (WebKit::LayerTreeHostProxy::showDebugBorders): (WebKit::LayerTreeHostProxy::showRepaintCounter): * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::showDebugBorders): (WebKit::LayerTreeHostCA::showRepaintCounter): * WebProcess/WebPage/ca/LayerTreeHostCA.h: * WebProcess/WebPage/qt/LayerTreeHostQt.h: 2012-01-24 David Levin [windows] Convert usage of GetDC to HWndDC Part 3. https://bugs.webkit.org/show_bug.cgi?id=76889 Reviewed by Adam Roben. * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::paint): Fix a dc leak and use the dellayed allocation. 2012-01-24 Sergio Villar Senin [WK2] [GTK] TestDownloads hitting an assertion in Debug builds https://bugs.webkit.org/show_bug.cgi?id=76915 Reviewed by Martin Robinson. No new tests required as it fixes some assertions in a unit test. * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): 2012-01-24 No'am Rosenthal [Qt][WK2] Qt's cross-process AC copies images excessively when updating tiles. https://bugs.webkit.org/show_bug.cgi?id=76877 Reviewed by Kenneth Rohde Christiansen. Instead of copying QImages, pass a reference to the ShareableBitmap that was originally created by the web process. Also, swizzle the image's RGB in the web process, before it's transferred to the UI process. Data flow before change: (Web Process) Render to image -> IPC -> (UI Process) Copy (render queue) -> Copy Swizzled RGB -> Upload Data flow after change: (Web Process) Render to image -> swizzle RGB -> IPC -> (UI Process) -> Upload * Shared/ShareableBitmap.h: * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::swizzleRGB): * UIProcess/LayerTreeHostProxy.h: * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::updateTile): (WebKit::LayerTreeHostProxy::createImage): (WebKit::LayerTreeHostProxy::syncRemoteContent): (WebKit::LayerTreeHostProxy::updateTileForLayer): (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::purgeGLResources): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::adoptImageBackingStore): 2012-01-24 Rafael Brandao [Qt][WK2] QtWebIconDatabaseClient leaves a dangling pointer on WebIconDatabase after its destruction https://bugs.webkit.org/show_bug.cgi?id=76399 Reviewed by Simon Hausmann. Due a circular dependency between WebContext and WebProcessProxy, WebContext it not being destroyed, neither WebIconDatabase. As QtWebIconDatabaseClient's life time is the same as QtWebContext and this one is being destroyed, the remaining reference to our client on WebIconDatabase should be cleaned upon its destruction. * UIProcess/qt/QtWebIconDatabaseClient.cpp: (QtWebIconDatabaseClient::QtWebIconDatabaseClient): (QtWebIconDatabaseClient::~QtWebIconDatabaseClient): Clear client pointer on WebIconDatabase. * UIProcess/qt/QtWebIconDatabaseClient.h: Make this client hold a reference to WebIconDatabase. 2012-01-24 Zeno Albisser [Qt][WK2] Add test for application URL schemes. https://bugs.webkit.org/show_bug.cgi?id=74933 Add a test that checks handling of url strings. Add a test that verifies replies in case of multiple available application url schemes. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: 2012-01-24 Carlos Garcia Campos [GTK] Fix /webkit2/WebKitWebView/reload after r105688 https://bugs.webkit.org/show_bug.cgi?id=76898 Reviewed by Alejandro G. Castro. * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: (LoadTrackingTest::reload): Add reload method that clears events and initializes progress. * UIProcess/API/gtk/tests/LoadTrackingTest.h: * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: (testWebViewReload): Use LoadTrackingTest::reload() instead of webkit_web_view_reload(). 2012-01-24 Simon Hausmann Some qmake build files must include Qt5's "quick" module. https://bugs.webkit.org/show_bug.cgi?id=76671 Unreviewed build fix. * UIProcess/API/qt/tests/tests.pri: 2012-01-24 Zeno Albisser [Qt][WK2] Application URL schemes cause asserts when using debug. https://bugs.webkit.org/show_bug.cgi?id=76700 Instances of QtNetworkRequestData / QtNetworkReplyData are meant to be used for transfering data over IPC. To allow transferring instances of these classes over IPC they need to be copyable, and it must be possible to create such instances on the stack. Because classes that inherit from RefCounted always need to be used in connection with RefPtr, QtNetworkRequestData and QtNetworkReplyData cannot inherit directly from RefCounted. Deleting an object that inherits from RefCounted, without the proper sequence of ref()/deref() being called by it's RefPtr, causes asserts when running a debug version. Reviewed by Simon Hausmann. * Shared/qt/QtNetworkReplyData.h: (WebKit::QtRefCountedNetworkReplyData::data): * Shared/qt/QtNetworkRequestData.cpp: (WebKit::QtRefCountedNetworkRequestData::QtRefCountedNetworkRequestData): * Shared/qt/QtNetworkRequestData.h: (WebKit::QtRefCountedNetworkRequestData::data): * Target.pri: * UIProcess/API/qt/qquicknetworkreply.cpp: (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: * UIProcess/API/qt/qquicknetworkrequest.cpp: (QQuickNetworkRequest::QQuickNetworkRequest): (QQuickNetworkRequest::setNetworkRequestData): (QQuickNetworkRequest::url): * UIProcess/API/qt/qquicknetworkrequest_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::invokeApplicationSchemeHandler): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/WebPageProxy.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleApplicationSchemeRequest): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::resolveApplicationSchemeRequest): (WebKit::WebPageProxy::sendApplicationSchemeReply): * WebProcess/qt/QtNetworkReply.cpp: (WebKit::QtNetworkReply::setData): (WebKit::QtNetworkReply::readData): 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, cursor blinks even after transferring focus to plugin https://bugs.webkit.org/show_bug.cgi?id=30355 PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin in order to clear the FrameSelection in the currently focused node. In its platform-specific code Chromium already does this (WebPluginContainerImpl.cpp). * WebProcess/Plugins/PluginView.cpp: (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes the call to FocusController:setFocusedFrame() redundant, since the former calls it. 2011-07-02 Anders Carlsson Have another go at fixing the Windows build. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Null out the plug-in controller after destroying the plug-in. https://bugs.webkit.org/show_bug.cgi?id=63869 Reviewed by Maciej Stachowiak. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::destroy): Call destroyPlugin. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::destroyPlugin): Call destroy and null out the plug-in controller. * WebProcess/Plugins/Plugin.h: Add destroyPlugin, make destroy private. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): Call destroyPlugin. 2011-07-02 Anders Carlsson Fix Windows build for real. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-07-02 Anders Carlsson Implement NPN_PluginThreadAsyncCall https://bugs.webkit.org/show_bug.cgi?id=63868 Reviewed by Dan Bernstein. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_PluginThreadAsyncCall): Call NetscapePlugin::pluginThreadAsyncCall. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): Schedule a work item to call the function on the main run loop. (WebKit::NetscapePlugin::handlePluginThreadAsyncCall): If the plug-in is still running, run the function. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add new member function. * WebProcess/Plugins/Plugin.h: Make plug-in inherit from ThreadSafeRefCounted since plug-ins can potentially ref the plug-in from other threads. 2011-07-02 Anders Carlsson Fix Windows build. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Move the plug-in controller member variable up to the shared Plugin base class https://bugs.webkit.org/show_bug.cgi?id=63867 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Remove m_pluginController. (WebKit::NetscapePlugin::invalidate): (WebKit::NetscapePlugin::userAgent): (WebKit::NetscapePlugin::loadURL): (WebKit::NetscapePlugin::setStatusbarText): (WebKit::NetscapePlugin::evaluate): (WebKit::NetscapePlugin::isPrivateBrowsingEnabled): (WebKit::NetscapePlugin::windowScriptNPObject): (WebKit::NetscapePlugin::pluginElementNPObject): (WebKit::NetscapePlugin::tryToShortCircuitInvoke): (WebKit::NetscapePlugin::cancelStreamLoad): (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled): (WebKit::NetscapePlugin::proxiesForURL): (WebKit::NetscapePlugin::cookiesForURL): (WebKit::NetscapePlugin::setCookiesForURL): (WebKit::NetscapePlugin::getAuthenticationInfo): Use controller() instead of m_pluginController. (WebKit::NetscapePlugin::initialize): This doesn't take a PluginController parameter anymore. (WebKit::NetscapePlugin::destroy): No need to null out the plug-in controller. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Remove m_pluginController member variable. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::compositingRenderServerPort): (WebKit::NetscapePlugin::platformSetFocus): (WebKit::NetscapePlugin::windowFocusChanged): Use controller() instead of m_pluginController. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Plugin): Initialize m_pluginController. (WebKit::Plugin::initialize): New function that initializes the plug-in controller and then calls the real virtual initialize member function. * WebProcess/Plugins/Plugin.h: Add m_pluginController member variable and a new initialize virtual member function that doesn't take a PluginController parameter. Make the "old" initialize member function set up the plug-in controller. (WebKit::Plugin::controller): This is now a simple getter. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::PluginProxy): Remove m_pluginController. (WebKit::PluginProxy::pluginProcessCrashed): Use controller(), remove a bogus null check. (WebKit::PluginProxy::initialize): This doesn't take a PluginController parameter now. (WebKit::PluginProxy::destroy): No need to null out the plug-in controller member variable. (WebKit::PluginProxy::loadURL): (WebKit::PluginProxy::proxiesForURL): (WebKit::PluginProxy::cookiesForURL): (WebKit::PluginProxy::setCookiesForURL): (WebKit::PluginProxy::getAuthenticationInfo): (WebKit::PluginProxy::windowNPObjectID): (WebKit::PluginProxy::getPluginElementNPObject): (WebKit::PluginProxy::evaluate): (WebKit::PluginProxy::cancelStreamLoad): (WebKit::PluginProxy::cancelManualStreamLoad): (WebKit::PluginProxy::setStatusbarText): (WebKit::PluginProxy::setComplexTextInputEnabled): (WebKit::PluginProxy::update): Use controller() instead of m_pluginController. * WebProcess/Plugins/PluginProxy.h: Remove m_pluginController. 2011-07-01 Darin Adler Consider backing scale factor when setting up graphics layers https://bugs.webkit.org/show_bug.cgi?id=63848 Reviewed by Simon Fraser. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): Set contents scale on the non-composited content layer based on the backing scale factor. (WebKit::LayerTreeHostCA::createPageOverlayLayer): Set contents scale on the page overlay layer based on the backing scale factor. 2011-06-30 Brian Weinstein Reviewed by Darin Adler. WebKit2: DidFinishLoadForFrame is never called on iframes when loads are cancelled by willSendRequest https://bugs.webkit.org/show_bug.cgi?id=63753 When deciding a policy for a null request, call the callback that was passed to WebKit2 and say that we used the loader. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 2011-07-01 Balazs Kelemen Reviewed by Andreas Kling. [X11][WK2] plugins/mouse-evets-fixedpos.html is failing because of broken event propagation https://bugs.webkit.org/show_bug.cgi?id=63239 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Revert the return value of NPP_HandleEvent because the plugin function returns with 0 if it handled the event. (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleWheelEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 2011-07-01 Mark Rowe Unreviewed due to fixing of a broken world. REGRESSION (r90163): WebKit2 bot is failing 100% of the tests. r90163 bumped the version of the WKBundlePageLoaderClient passed in by WebKitTestRunner from 0 to 1. This made it run in to the ad-hoc client version checking implemented directly in WKBundlePageSetPageLoaderClient, resulting in no client being set. After r90162 the ad-hoc checking is not necessary as the APIClient template takes care of the relevant version checks. * Shared/APIClient.h: (WebKit::APIClient::initialize): Fix a bug I noticed along the way: don't attempt to copy anything if the client version is newer than what we support. This matches the behavior of the ad-hoc version checking. * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): Drop the ad-hoc version checking. (WKContextSetHistoryClient): Ditto. (WKContextSetDownloadClient): Ditto. * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetClient): Ditto. * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): Ditto. * UIProcess/API/C/WKIconDatabase.cpp: (WKIconDatabaseSetIconDatabaseClient): Ditto. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): Ditto. (WKPageSetPageFindClient): Ditto. (WKPageSetPageFormClient): Ditto. (WKPageSetPageLoaderClient): Ditto. (WKPageSetPagePolicyClient): Ditto. (WKPageSetPageResourceLoadClient): Ditto. (WKPageSetPageUIClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): Ditto. (WKBundlePageSetEditorClient): Ditto. (WKBundlePageSetFormClient): Ditto. (WKBundlePageSetPageLoaderClient): Ditto. (WKBundlePageSetResourceLoadClient): Ditto. (WKBundlePageSetPolicyClient): Ditto. (WKBundlePageSetUIClient): Ditto. (WKBundlePageSetFullScreenClient): Ditto. 2011-06-30 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Consider scale factor when allocating backing store https://bugs.webkit.org/show_bug.cgi?id=63766 This is the first step in considering scale factor. It considers scale factor for the primary backing store, not graphics layers, and for CG only. * Platform/cg/CGUtilities.cpp: (WebKit::paintImage): Added a scale factor argument. (WebKit::paintBitmapContext): Pass 1 for scale factor. * Platform/cg/CGUtilities.h: Updated for above. * Shared/ShareableBitmap.h: Added an overload of paint that can handle a scale factor. * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): Encode scale factor. (WebKit::UpdateInfo::decode): Decode scale factor. * Shared/UpdateInfo.h: Added scale factor. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::paint): Added the overload that can handle a scale factor. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::create): Take a scale factor. (WebKit::BackingStore::BackingStore): Store the scale factor. (WebKit::BackingStore::incorporateUpdate): Consider the scale factor when asserting the size is correct. * UIProcess/BackingStore.h: Add a scale factor. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): Check the scale factor too when deciding whether to reuse a backing store. (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Pass in the scale factor when creating a backing store. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::incorporateUpdate): Take the scale factor into account when painting. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Put the scale factor into the UpdateInfo. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto. (WebKit::DrawingAreaImpl::display): Take the scale factor into account when allocating the bitmap and creating a graphics context for it. 2011-06-30 Mark Rowe Fix the Windows build. * UIProcess/API/C/win/WKTextChecker.h: * UIProcess/API/C/win/WKView.h: * UIProcess/win/WebTextCheckerClient.h: * UIProcess/win/WebUndoClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Teach APIClient to correctly handle multiple versions of a client interface. If a client struct is not the current version then we can't copy it via assignment since that will read past the end of the smaller, older struct. To deal with this APIClient needs to be aware of the sizes of the older client version structs so that it can copy only the appropriate amount of the struct. * Shared/APIClient.h: (WebKit::APIClient::initialize): Assign through to our client if the new in client is the latest version. If an older client version was passed then we zero out our client and memcpy the appropriate number of bytes in to it. This ensures that any new members in the client are initialized to 0. * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: Client interfaces are the size of their struct unless otherwise stated. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Bump the version and add comments indicating which components belong to which versions. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Make the APIClient template aware of the latest client interface version number. This will be used in an upcoming patch. * Shared/APIClient.h: * UIProcess/WebContextInjectedBundleClient.h: * UIProcess/WebCookieManagerProxyClient.h: * UIProcess/WebDatabaseManagerProxyClient.h: * UIProcess/WebDownloadClient.h: * UIProcess/WebFindClient.h: * UIProcess/WebFormClient.h: * UIProcess/WebGeolocationProvider.h: * UIProcess/WebHistoryClient.h: * UIProcess/WebIconDatabaseClient.h: * UIProcess/WebLoaderClient.h: * UIProcess/WebPageContextMenuClient.h: * UIProcess/WebPolicyClient.h: * UIProcess/WebResourceLoadClient.h: * UIProcess/WebUIClient.h: * WebProcess/InjectedBundle/InjectedBundleClient.h: * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. WebKit2 client interfaces should have constant declaring latest version. * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKCookieManager.h: * UIProcess/API/C/WKDatabaseManager.h: * UIProcess/API/C/WKGeolocationManager.h: * UIProcess/API/C/WKIconDatabase.h: * UIProcess/API/C/WKPage.h: * WebProcess/InjectedBundle/API/c/WKBundle.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 2011-06-30 Anders Carlsson Build fix. * UIProcess/win/WebPopupMenuProxyWin.h: (WebKit::WebPopupMenuProxyWin::enclosingScrollableArea): 2011-06-30 Martin Robinson Reviewed by Anders Carlsson. [GTK] Crash observed with nspluginwrapper and flash https://bugs.webkit.org/show_bug.cgi?id=62249 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_InvalidateRect): Guard against null instances here. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Reinstate WKSecurityOriginGetHost and WKSecurityOriginGetProtocol as wrappers around the correctly-named functions. They're needed for ABI compatibility. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginGetHost): (WKSecurityOriginGetProtocol): 2011-06-29 Darin Adler Reviewed by Dan Bernstein. [Mac] Use system cursors instead of custom bitmaps where possible https://bugs.webkit.org/show_bug.cgi?id=63679 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added WKCursor. 2011-06-29 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded https://bugs.webkit.org/show_bug.cgi?id=63483 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame): Added a check for null when creating a frame. Also added a check that was in the WebKit1 code, but not here. Strangely, the comment from the second check was still here, but not the code. 2011-06-28 Chang Shu Reviewed by Andreas Kling. [Qt][WK2] Random crashes in fast/frames/ tests https://bugs.webkit.org/show_bug.cgi?id=63459 Investigation on the crashes has revealed that sometimes, a frame could have been destroyed before it is removed from the hierachy in Qt WebKit2 UI process. The root cause lies in the fact that the order of the two contiguous asynchronous messages may not be respected on the receiving side. And it is Qt's implementation, which uses QTimer::startTimer(0), that causes the reverse order. This patch replaces the timer approach with QMetaObject::invokeMethod approach and no crash happens afterwards. * Platform/qt/WorkQueueQt.cpp: (WorkQueue::scheduleWork): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] X error with plugin tests https://bugs.webkit.org/show_bug.cgi?id=63520 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Never create a pixmap with (0,0) dimensions. (WebKit::NetscapePlugin::platformGeometryDidChange): (WebKit::NetscapePlugin::platformPaint): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] plugins/plugin-javascript-access fails https://bugs.webkit.org/show_bug.cgi?id=63464 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): Determine the name of the plugin. 2011-06-27 Yuta Kitamura Reviewed by Alexey Proskuryakov. [WebKit2] Add hixie76WebSocketProtocolEnabled flag to WebPreferences https://bugs.webkit.org/show_bug.cgi?id=63447 Make a new flag added in WebCore::Settings (useHixie76WebSocketProtocol) switchable from WebPage and WebPreferences. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHixie76WebSocketProtocolEnabled): (WKPreferencesGetHixie76WebSocketProtocolEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-06-27 Jeff Miller Reviewed by Oliver Hunt. Web process always pauses on launch https://bugs.webkit.org/show_bug.cgi?id=63487 In the absence of the WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable, only pause the web process on launch if the shift, control, and alt keys are all held down. This regressed in r89685, which always caused the web process to pause if the shift and alt keys were not held down. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Add some parentheses. 2011-06-27 Huang Dongsung Reviewed by Kenneth Rohde Christiansen. TiledBackingStore endlessly creates and destroys tiles due to an off-by-one error. https://bugs.webkit.org/show_bug.cgi?id=62422 REGRESSION(r77286): Remove bottomRight(). REGRESSION(r77312): Change the logic to get the bottom right point. REGRESSION(r77928): Cause off-by-one error in TiledBackingStore. REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy. REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy. If the viewport width equals the contents width, especially in the mobile device, TiledBackingStore endlessly creates and deletes the rightmost column and bottom row of tiles. In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles() deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates tiles infinitely. Modified TiledDrawingAreaProxy also. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::innerBottomRight): (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::createTiles): 2011-06-26 Mark Rowe Reviewed by Dan Bernstein. Use a separate file name for Lion's WebKitSystemInterface. * Configurations/DebugRelease.xcconfig: 2011-06-26 Mark Rowe Rubber-stamped by Maciej Stachowiak. Work around an issue with sandbox.h. * WebProcess/mac/WebProcessMac.mm: 2011-06-26 Anders Carlsson Reviewed by Dan Bernstein. Don't use a Mutex for protecting access to the connection queue clients https://bugs.webkit.org/show_bug.cgi?id=63403 Make sure to only access the queue client vector from the connection work queue. This gets rid of a lock and ensures that adding/removing clients from callbacks works correctly. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::addQueueClientOnWorkQueue): (CoreIPC::Connection::removeQueueClientOnWorkQueue): (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: 2011-06-25 Brent Fulgham Unreviewed build correction after r89426. * Shared/API/c/cairo/WKImageCairo.h: Declare cairo type as struct (in keeping with other declarations). * win/WebKit2.vcproj: Add new WKImageCairo.cpp file to WinCairo build. 2011-06-25 Brent Fulgham Unreviewed build correction after r89503. See http://trac.webkit.org/changeset/89503. The modifications to the WebKit2.def need to be mirrored in WebKit2CFLite.def. * win/WebKit2CFLite.def: Add new exported symbol for isPreloaded. 2011-06-24 Brent Fulgham Unreviewed build correction after r89426. See http://trac.webkit.org/changeset/89426. The new WebKit2 header file (WKImageCairo.h) is needed. * win/WebKit2Generated.make: Make sure to copy the WKImageCairo.h header file to the WebKit2 API directory after building. 2011-06-24 Anders Carlsson Reviewed by John Sullivan. Drag-and-drop tab in same window makes web process falsely report unresponsiveness https://bugs.webkit.org/show_bug.cgi?id=63369 If the view becomes invisible, stop the responsiveness timer, because we might not get any messages that will cause it to stop (such as painting notifications since we don't paint when we're not visible). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): 2011-06-24 Anders Carlsson Reviewed by Kevin Decker. Not possible for plug-ins to override the internal PDF viewer https://bugs.webkit.org/show_bug.cgi?id=63356 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Pass the entire resource response to shouldUseCustomRepresentationForResponse. * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Ask for the plug-in path for a plug-in that can handle the given resource response. If we fail to send the message, or if the path comes back empty, we assume that there's no plug-in that can handle it. (WebKit::WebProcess::shouldUseCustomRepresentationForResponse): If the response MIME type is in the m_mimeTypesWithCustomRepresentations map, check if there's a plug-in that can handle the given response. If that is the case, it should have precedence over the custom representation. * WebProcess/WebProcess.h: Rename shouldUseCustomRepresentationForMIMEType to shouldUseCustomRepresentationForResponse. 2011-06-24 Adam Roben Mac build fix after r89685 * WebProcess/WebKitMain.cpp: Make a Windows-only #include really be Windows-only. 2011-06-24 Adam Roben Make the web process pause dialog look better on Vista/7 and robust against executable renames Fixes Web process pause dialog looks bad on Vista/7 Reviewed by Brian Weinstein. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Moved code to show the pause dialog here from WebKitMain. We now fetch the executable name using ::GetModuleFileNameW instead of hard-coding it. The string we pass to ::MessageBoxW no longer has embedded newlines, which improves its appearance on Vista/7 (which were doing their own wrapping in addition to our newlines). Appearance is different but fine on XP. Note that the message text now contains the "[_debug].exe" suffix when referring to the process; that is different from before but seems fine. (WebKitMain): Call the new function. 2011-06-24 Dominic Cooney Reviewed by Dimitri Glazkov. Convert shadow DOM-related tests to use window.internals https://bugs.webkit.org/show_bug.cgi?id=61671 Remove shadow DOM-related methods from WebKit2 API. These are not required any more. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: * win/WebKit2.def: Re-exports for symbols used by WebCoreTestSupport. * win/WebKit2CFLite.def: Same for Cairo. 2011-06-24 Carlos Garcia Campos Reviewed by Martin Robinson. [X11] Do not call NPP_SetWindow with a null window handle on destroy https://bugs.webkit.org/show_bug.cgi?id=62981 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::destroy): 2011-06-23 Jamie Cooley Reviewed by Andreas Kling. [Qt][WK2] Qt port needs load-from-history implementation https://bugs.webkit.org/show_bug.cgi?id=57784 Created "random access" BackForwardHistory public API method, QWKHistory::goToItemAt(int) * UIProcess/API/qt/qwkhistory.cpp: (QWKHistoryItem::QWKHistoryItem::itemRef): Added access method to fetch WKBackForwardListRef (QWKHistoryPrivate::QWKHistoryPrivate): (QWKHistoryPrivate::createHistory): Updated createHistory method and QWKHistoryPrivate constructor to take a pointer to the owning QWKPage in addition to the WebBackForwardList. This will be saved so that the new API can ask the page to load a HistoryItem. (QWKHistory::goToItemAt): New Public API. Like QWKHistory::itemAt, callee gives an integer. <0 means jump back to that item, 0 means the current item, >0 means jump forwards. If an out-of-range index is given, the function silently fails. This will invoke WKPageGoToBackForwardListItem. * UIProcess/API/qt/qwkhistory.h: * UIProcess/API/qt/qwkhistory_p.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): Update instantiation of QWKHistory to include QWKPage. * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: (tst_QWKHistory::historyForwardBackTest_data): (tst_QWKHistory::historyForwardBackTest): Add test content for the new API 2011-06-23 Yael Aharon Reviewed by Andreas Kling. [Qt] [WK2] Add drag and drop support https://bugs.webkit.org/show_bug.cgi?id=62838 Added missing pieces to add support for DnD in QtWebKit. * Shared/qt/ArgumentCodersQt.cpp: Added. (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/ArgumentCodersQt.h: Added. Encode DragData so that we can transfer the QMimeData between the WebProcess and the UI Process. I encode the DragData and not QMimeData directly because we don't have an associated QMimeData for each message. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::init): (QGraphicsWKView::dragEnterEvent): (QGraphicsWKView::dragLeaveEvent): (QGraphicsWKView::dragMoveEvent): (QGraphicsWKView::dropEvent): * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (dropActionToDragOperation): (dragOperationToDropAction): (dragOperationToDropActions): (QWKPagePrivate::dragEnterEvent): (QWKPagePrivate::dragLeaveEvent): (QWKPagePrivate::dragMoveEvent): (QWKPagePrivate::dropEvent): (QWKPagePrivate::startDrag): Send drag-and-drop related events to WebKit. * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::startDrag): * UIProcess/WebPageProxy.h: Start the HTML5 drag operation from the UI process, because QDrag needs a handle to the QWidget under the mouse. * UIProcess/WebPageProxy.messages.in: Add message type that takes DragData as a parameter. * WebKit2.pro: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: Added. (WebKit::convertImageToBitmap): (WebKit::WebDragClient::startDrag): Send a message to the UI process to start the HTML5 drag operation. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add message type that takes DragData as a parameter. 2011-06-23 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Fix compile warnings in NetscapePluginX11.cpp https://bugs.webkit.org/show_bug.cgi?id=63249 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::setXButtonEventFields): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Increment/decrement module load conter in NetscapePluginModule::getPluginInfo() https://bugs.webkit.org/show_bug.cgi?id=63150 Since the method is static, we are using NetscapePluginModule::getOrCreate() to get the module. If it's created, the load counter is 0, so that when module is deleted, shutdown() hasn't been called and the destructor crashes in the assert that checks the module has been removed from the initialized module list. We should increment the load counter, and decrement it before getPluginInfo() returns, so that decrementLoadCount() will call shutdown() if counter is 0 and the module will be deleted from the list. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Check for npp directly when getting X display in NetscapeBrowserFuncs https://bugs.webkit.org/show_bug.cgi?id=63149 NetscapePlugin::fromNPP() shouldn't be called with a null npp, it contains an assert that make it crash when building with debug enabled. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): 2011-06-22 Nate Chapin Reviewed by Adam Barth. Add win symbols for new window.internals functionality. https://bugs.webkit.org/show_bug.cgi?id=62066 * win/WebKit2.def: 2011-06-22 Balazs Kelemen Reviewed by Andreas Kling. [Qt][WK2] Set up plugin tests https://bugs.webkit.org/show_bug.cgi?id=63066 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Force windowless mode for the test plugin because we don't support windowed plugins yet. 2011-06-22 Geoffrey Garen Reviewed by Oliver Hunt. Removed unnecessary #include . * PluginProcess/mac/PluginProcessMainMac.mm: * Shared/WebMemorySampler.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: * WebProcess/mac/WebProcessMac.mm: Added #include back to places where it was needed. 2011-06-22 Balazs Kelemen Unreviewed build fix after r89461. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Forgot to name the parameter, fix it. 2011-06-22 Balazs Kelemen Reviewed by Darin Adler. [X11][WK2] Implement NetscapePlugin::platformSetFocus https://bugs.webkit.org/show_bug.cgi?id=63154 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Implement focus setting based on the WebKit1 path. 2011-06-22 Eunmi Lee Reviewed by Martin Robinson. Change GtkWidgetBackingStore.h to WidgetBackingStore.h in order to use in the EFL port. https://bugs.webkit.org/show_bug.cgi?id=62848 Change GtkWidgetBackingStore to WidgetBackingStore in the BackingStore.h and gtk/BackingStoreGtk.cpp. * UIProcess/BackingStore.h: * UIProcess/gtk/BackingStoreGtk.cpp: (WebKit::BackingStore::incorporateUpdate): 2011-06-22 Adam Roben Don't use an alpha channel when drawing the web page on Windows We never use the alpha channel in the end anyway (because we never render into a layered window, which is the only kind of window that supports alpha). And using an alpha channel is tricky to get right since GDI doesn't support alpha (and often writes 0x0 into the alpha channel). Fixes REGRESSION (r88978): Text inside form controls looks really awful on Windows XP Reviewed by Anders Carlsson. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Specify false for the hasAlpha parameter to the GraphicsContext constructor. 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Remove Connection::setShouldCloseConnectionOnProcessTermination() https://bugs.webkit.org/show_bug.cgi?id=61627 Don't use Connection::setShouldCloseConnectionOnProcessTermination() for the GTK port, when the process finishes the connection is closed and the other process is already notified. We still need to monitor the child process so that it doesn't become a zombie when it dntabi * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childFinishedFunction): (WebKit::ProcessLauncher::launchProcess): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching): 2011-06-20 Dimitri Glazkov Reviewed by Kent Tamura. FileChooser should be only created when we need to choose files. https://bugs.webkit.org/show_bug.cgi?id=63039 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runOpenPanel): Changed to use settings. 2011-06-22 Martin Robinson Reviewed by Adam Roben. [GTK] Implement pixel dump support for WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=58242 * GNUmakefile.am: Added new Cairo specific image handling files to the build. * Shared/API/c/cairo/WKImageCairo.cpp: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. (WKImageCreateCairoSurface): Added (WKImageCreateFromCairoSurface): Added * Shared/API/c/cairo/WKImageCairo.h: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. 2011-06-21 MORITA Hajime Unreviewed, rolling out r89401 and r89403. http://trac.webkit.org/changeset/89401 http://trac.webkit.org/changeset/89403 https://bugs.webkit.org/show_bug.cgi?id=62970 Breaks mac build and mistakenly enables the spellcheck API * Configurations/FeatureDefines.xcconfig: 2011-06-20 MORITA Hajime Reviewed by Kent Tamura. Spellcheck API should be build-able. https://bugs.webkit.org/show_bug.cgi?id=62970 No new tests, changing only build related files * Configurations/FeatureDefines.xcconfig: 2011-06-21 Jer Noble Reviewed by Simon Fraser. REGRESSION: Fullscreen videos are broken (affects embedded vimeo, vimeo.com, and apple.com) https://bugs.webkit.org/show_bug.cgi?id=63098 Force a repaint after completing entering full-screen mode only after the notification is sent for the QTMovie to tear down its layer. Then, the QTMovie will build up its layer again during the repaint. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 2011-06-21 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Add an internal API for accessing the QGraphicsView. https://bugs.webkit.org/show_bug.cgi?id=63095 * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::ownerWidget): * UIProcess/API/qt/qwkpage_p.h: 2011-06-21 Lukasz Slachciak Reviewed by Sam Weinig. [GTK] [WK2] WebKit2 build break fixes. https://bugs.webkit.org/show_bug.cgi?id=62950 When building WebKit2 for GTK there are few build breaks connected with missing include files. * Platform/unix/SharedMemoryUnix.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: 2011-06-20 Martin Robinson Reviewed by Eric Seidel. [GTK] [WebKit2] Disable GDK double buffering https://bugs.webkit.org/show_bug.cgi?id=62770 Explicitly disable GDK double-buffering when instantiating a WebKit2 view widget. This prevents one extra pixmap copy. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_init): 2011-06-20 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Don't use WebCore::PluginPackage to get plugin information https://bugs.webkit.org/show_bug.cgi?id=62899 The problem is that both PluginPackage in WebCore and NetscapePluginModule in webkit2 install their own netscape browser functions and that can cause conflicts in some situations. * Shared/Plugins/Netscape/NetscapePluginModule.h: Add helper function to set plugin mime type descriptions. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::setMIMEDescription): Helper function to set plugin mime type descriptions. (WebKit::NetscapePluginModule::getPluginInfo): Use NetscapePluginModule instead of PluginPackage. * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Remove unneeded header include. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Do not try to get the XDisplay if the plugin doesn't have a view. It fixes a crash with flash plugin and matches WebCore. 2011-06-20 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Split libWebCore into two libWebCore and libWebCoreGtk https://bugs.webkit.org/show_bug.cgi?id=60539 * GNUmakefile.am: Link to libWebCoreGtk.la too. 2011-06-19 MORITA Hajime Unreviewed wincairo build fix. * win/WebKit2CFLite.def: 2011-06-19 MORITA Hajime Reviewed by Dimitri Glazkov. The internals object should have createShadowContentElement() https://bugs.webkit.org/show_bug.cgi?id=62432 * win/WebKit2.def: Added some more symbols necessary for window.internals to function to the global symbol list. 2011-06-18 Dimitri Glazkov Reviewed by Darin Adler. Separate concerns of loading file icons and choosing files. https://bugs.webkit.org/show_bug.cgi?id=62931 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::loadIconForFiles): Renamed. * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] add WebKit2 EFL port's NativeWebMouseEvent, NativeWebWheelEvent and NativeWebKeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=61993 Add native mouse and keyboard event classes to convert EFL's events to NativeWebEvent. * Shared/NativeWebKeyboardEvent.h: (WebKit::NativeWebKeyboardEvent::nativeEvent): * Shared/NativeWebMouseEvent.h: (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/NativeWebWheelEvent.h: (WebKit::NativeWebWheelEvent::nativeEvent): * Shared/efl/NativeWebKeyboardEventEfl.cpp: Added. (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): * Shared/efl/NativeWebMouseEventEfl.cpp: Added. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/efl/NativeWebWheelEventEfl.cpp: Added. (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/efl/WebEventFactory.cpp: Added. (WebKit::modifiersForEvent): (WebKit::buttonForEvent): (WebKit::clickCountForEvent): (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/efl/WebEventFactory.h: Added. 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Add missing functions of EFL port's PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=62711 Three functions are added in the PageClient.h, so add them to the EFL's PageClientImpl. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::exitAcceleratedCompositingMode): * UIProcess/API/efl/PageClientImpl.h: 2011-06-17 Brent Fulgham [WinCairo] Unreviewed build fix after r89060 and r89161. * Shared/win/WebCoreArgumentCodersWin.cpp: WinCairo build fixes (1) Include proper header files for WinCairo build (2) Exclude unused namespace declaration 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Remove unused ArgumentEncoder and ArgumentDecoder functions https://bugs.webkit.org/show_bug.cgi?id=62909 * Platform/CoreIPC/ArgumentDecoder.cpp: * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: * Platform/CoreIPC/ArgumentEncoder.h: * Shared/win/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::encode): (WebKit::PlatformCertificateInfo::decode): Replace calls to encodeBytes/decodeBytes with encodeVariableLengthByteArray/decodeVariableLengthByteArray. 2011-06-17 Anders Carlsson Yet another Qt build fix attempt. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/API/qt/qwkpage_p.h: 2011-06-17 Anders Carlsson Another attempt at fixing the Qt build. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkcontext.cpp: 2011-06-17 Anders Carlsson Fix Qt build. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 2011-06-17 Anders Carlsson Windows build fix. * UIProcess/win/WebView.cpp: 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Move the remaining WebCore argument coders to the .cpp file https://bugs.webkit.org/show_bug.cgi?id=62874 Also add includes that other files need that used to be provided by WebCoreArgumentCoders.h, and get rid of the LAZY_NATIVE_CURSOR #if check because all WebKit2 platforms now support it. * Shared/ContextMenuState.h: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/qt/WebCoreArgumentCodersQt.cpp: * UIProcess/API/mac/PDFViewController.mm: * UIProcess/PageClient.h: * UIProcess/WebIconDatabase.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/mac/WKFullScreenWindowController.mm: 2011-06-17 Chang Shu Reviewed by Anders Carlsson. [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests https://bugs.webkit.org/show_bug.cgi?id=61940 Tempararily supress stdout during getPluginInfo during which debug info was leaked out. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::StdoutRedirect::StdoutRedirect): (WebKit::StdoutRedirect::~StdoutRedirect): (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-17 Anders Carlsson Reviewed by Andreas Kling. Remove WebCore:: qualifier from names in WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dragEntered): (WebKit::WebPageProxy::dragUpdated): (WebKit::WebPageProxy::dragExited): (WebKit::WebPageProxy::performDrag): (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::dragEnded): (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::didChangeContentsSize): (WebKit::WebPageProxy::didFindZoomableArea): (WebKit::WebPageProxy::findZoomableAreaForPoint): (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::checkTextOfParagraph): (WebKit::WebPageProxy::checkGrammarOfString): (WebKit::WebPageProxy::setCursor): (WebKit::WebPageProxy::computedPagesCallback): (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): (WebKit::WebPageProxy::showCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanelSoon): (WebKit::WebPageProxy::recordAutocorrectionResponse): 2011-06-17 Anders Carlsson Reviewed by Darin Adler. Fix message generator to include headers for all types https://bugs.webkit.org/show_bug.cgi?id=62870 Previously, if we found an argument coder header for a type, we'd assume that that header includes the necessary headers for the type. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-06-17 Chang Shu Reviewed by Andreas Kling. [Qt] [WK2] Support undo/redo in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=62809 * UIProcess/API/qt/qwkpage.cpp: (QWKPage::action): * UIProcess/API/qt/qwkpage.h: 2011-06-17 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after r89060. * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Get rid of CoreIPC::In and CoreIPC::Out from some argument coders https://bugs.webkit.org/show_bug.cgi?id=62832 * Shared/OriginAndDatabases.cpp: (WebKit::OriginAndDatabases::encode): (WebKit::OriginAndDatabases::decode): * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::encode): (WebKit::SecurityOriginData::decode): * Shared/WebKeyboardEvent.cpp: (WebKit::WebKeyboardEvent::encode): (WebKit::WebKeyboardEvent::decode): * Shared/WebOpenPanelParameters.cpp: (WebKit::WebOpenPanelParameters::Data::encode): (WebKit::WebOpenPanelParameters::Data::decode): * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::encode): (WebKit::WebPreferencesStore::decode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Cleanup ResourceRequest, ResourceResponse and ResourceError argument coders https://bugs.webkit.org/show_bug.cgi?id=62803 Get rid of the free encode/decode functions and move the template specializations to their respective implementation files instead. * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Chang Shu Reviewed by Sam Weinig. [Qt] [WK2] Qt WebKit2 needs undo/redo support https://bugs.webkit.org/show_bug.cgi?id=62637 Implement undo/redo support for document.execCommand(). * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): (QWKPagePrivate::~QWKPagePrivate): (QWKPagePrivate::registerEditCommand): (QWKPagePrivate::clearAllEditCommands): (QWKPagePrivate::canUndoRedo): (QWKPagePrivate::executeUndoRedo): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/qt/WebUndoCommandQt.cpp: Added. (WebUndoCommandQt::WebUndoCommandQt): (WebUndoCommandQt::~WebUndoCommandQt): (WebUndoCommandQt::redo): (WebUndoCommandQt::undo): * UIProcess/qt/WebUndoCommandQt.h: Added. (WebUndoCommandQt::inUndoRedo): * WebKit2.pro: 2011-06-16 Anders Carlsson Fix build. * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders and clean up the animation coders https://bugs.webkit.org/show_bug.cgi?id=62760 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): (CoreIPC::encodeOperation): (CoreIPC::decodeOperation): (CoreIPC::encodeBoolAndValue): (CoreIPC::encodeBoolAndEnumValue): (CoreIPC::decodeBoolAndValue): (CoreIPC::decodeBoolAndEnumValue): * Shared/WebCoreArgumentCoders.h: * Shared/mac/ArgumentCodersMac.h: * Shared/mac/ArgumentCodersMac.mm: * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Sangyong Park Reviewed by Martin Robinson. [GTK] Implement ResourceRequest and ResourceResponse encoder/decoder https://bugs.webkit.org/show_bug.cgi?id=55934 * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::encodeResourceRequest): (CoreIPC::decodeResourceRequest): (CoreIPC::encodeResourceResponse): (CoreIPC::decodeResourceResponse): 2011-06-16 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Remove support for GTK+2 in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62794 * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): (webkitWebViewBaseDraw): (webkitWebViewBaseQueryTooltip): (webkit_web_view_base_class_init): (webkitWebViewBaseSetTooltipText): * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::menuPositionFunction): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): 2011-06-15 Adam Barth Reviewed by Eric Seidel. Remove ScriptController::setAllowPopupsFromPlugin https://bugs.webkit.org/show_bug.cgi?id=62706 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): (WebKit::PluginView::evaluate): 2011-06-15 Ryuan Choi Rubber stamped by Eric Seidel. [CMAKE][WK2] Add an option to build webkit2. https://bugs.webkit.org/show_bug.cgi?id=62260 Add script to build WebKit2 using CMake. * CMakeLists.txt: Added. 2011-06-15 John Sullivan Reviewed by Sam Weinig. WKSecurityOriginGetProtocol and WKSecurityOriginGetHost are named wrong because they return copied strings * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCopyProtocol): Renamed to use "Copy" instead of "Get" because it returns a copy. (WKSecurityOriginCopyHost): Ditto. * Shared/API/c/WKSecurityOrigin.h: Updated declarations. 2011-06-14 Jon Honeycutt REGRESSION(78201): Windowless Flash plug-ins are transparent on some sites https://bugs.webkit.org/show_bug.cgi?id=62690 Reviewed by Ada Chan. The bug arises when mixing CoreGraphics and GDI. When we create a Windows bitmap for a windowless plug-in to draw into, we first fill it with "clear", or all 0s. If the plug-in uses GDI to draw, the GDI calls will ignore the alpha channel, and if we then use CG to blend this bitmap onto the GraphicsContext for the rest of the page, CG will treat the 0-filled alpha channel as being transparent. To fix this, on Windows, use a GDI-backed GraphicsContext to paint the page in the WebProcess, and use GDI to blit from the UpdateInfo to the backing store in the UI process. * Platform/SharedMemory.h: (WebKit::SharedMemory::handle): Return the handle for the memory. * Shared/ShareableBitmap.h: Declared windowsContext() to return a HDC with the bitmap selected into it. Added members to store the HDC and the HBITMAP. * Shared/win/ShareableBitmapWin.cpp: Added. (WebKit::ShareableBitmap::windowsContext): Get the screen DC, and create a compatible DC from it. Create a DIB section backed by the shared memory, select it into the context, and return it. * UIProcess/win/BackingStoreWin.cpp: (WebKit::BackingStore::incorporateUpdate): Use GDI to blit from the update info's bitmap into the backing store bitmap. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Return a GraphicsContext from the ShareableBitmap. (WebKit::DrawingAreaImpl::display): Call createGraphicsContext(), and pass the ShareableBitmap. * WebProcess/WebPage/DrawingAreaImpl.h: Declare createGraphicsContext(), which on Windows will create a GDI-backed GraphicsContext. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added. (WebKit::DrawingAreaImpl::createGraphicsContext): Get a Windows context for the bitmap, and create and return a new GraphicsContext using the DC. * win/WebKit2.vcproj: Added new files. 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62755 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::::encode): (CoreIPC::encodeImage): (CoreIPC::decodeImage): * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Darin Adler. Add ShareableBitmap::createImage and get rid of WebCoreArgumentCodersCG.cpp https://bugs.webkit.org/show_bug.cgi?id=62742 * Shared/ShareableBitmap.h: Move createImage out of the #if PLATFORM(QT) section. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::decodeImage): Call ShareableBitmap::createImage. * Shared/WebCoreArgumentCoders.h: remove createImage function declaration. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createImage): Add implementation. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): (WebKit::ShareableBitmap::createImage): Move createImage implementation from WebCoreArgumentCodersCG.cpp here. * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Update projects. 2011-06-15 Anders Carlsson Reviewed by Alexey Proskuryakov. Move some argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62739 * GNUmakefile.am: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * WebKit2.pro: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Fix possible null dereference in webSecKeychainItemCreateFromContentOnMainThread https://bugs.webkit.org/show_bug.cgi?id=62736 * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::webSecKeychainItemCreateFromContentOnMainThread): SecKeychainItemCreateFromContent can potentially return a null keychain item, so add a null check before trying to retain it. 2011-06-15 Anders Carlsson Reviewed by Dan Bernstein. Ignore responsiveness timer callbacks on closed pages https://bugs.webkit.org/show_bug.cgi?id=62735 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Use nullptr instead of clear. (WebKit::WebPageProxy::processDidBecomeUnresponsive): Return early if the page isn't valid. (WebKit::WebPageProxy::processDidBecomeResponsive): Ditto. (WebKit::WebPageProxy::updateBackingStoreDiscardableState): Assert that the page is valid. 2011-06-15 Sheriff Bot Unreviewed, rolling out r88907. http://trac.webkit.org/changeset/88907 https://bugs.webkit.org/show_bug.cgi?id=62732 See comment #15 by Nikolas Zimmermann on bug 62527 regarding the deprecation of makeString() (Requested by acidx on #webkit). * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-15 Csaba Osztrogonác [Qt][WK2] Unreviewed rolling out r88799, because it made web process crash. * Scripts/webkit2/messages.py: * Shared/LayerTreeContext.h: * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxy.messages.in: * WebKit2.pro: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::collectCompositingInfoForThisLayer): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: * WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed. 2011-06-14 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Change string operation to makeString() https://bugs.webkit.org/show_bug.cgi?id=62527 Use makeString() because it is better than creating individual strings and concatenating them. * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-14 Sam Weinig Reviewed by Simon Fraser. Follow up for Callers should be robust against WebImage::create() returning an image with a null snapshot https://bugs.webkit.org/show_bug.cgi?id=62666 * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): (WKImageCreateFromCGImage): Don't null check the arguments (as per our API design) or the direct result of WebImage::create. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Remove redundant check and make not being able to create a handle the same as not being backed by shareable memory. 2011-06-14 John Sullivan Reviewed by Ada Chan. windowsKeyCodeForKeyEvent should be robust against NSFlagsChanged events * Shared/mac/WebEventFactory.mm: (WebKit::windowsKeyCodeForKeyEvent): Explicitly check for NSFlagsChanged before calling -charactersIgnoringModifiers, since charactersIgnoringModifiers throws an exception for NSFlagsChanged events. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Use new byte array encoding/decoding functions for WTF argument coders https://bugs.webkit.org/show_bug.cgi?id=62682 * Platform/CoreIPC/ArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Use the new functions for the string argument coders. * Platform/CoreIPC/ArgumentCoders.h: (CoreIPC::SimpleArgumentCoder::encode): (CoreIPC::SimpleArgumentCoder::decode): Use the new functions to avoid encoding/decoding the size when it's known at decode time. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::roundUpToAlignment): Assert that the alignment is a power of 2. (CoreIPC::decodeFixedLengthData): Alignment comes before the size. * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Add a FIXME about now using the internal CoreIPC encoding format here. * UIProcess/cf/WebPageProxyCF.cpp: Bump the current session state data version number. 2011-06-14 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Expose viewportVisibleRect(), so that we can detect which parts of a texture actually need to be uploaded. Together with Viatcheslav Ostapenko. * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::viewportVisibleRect): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::viewportVisibleRect): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Start using the new encode/decode functions https://bugs.webkit.org/show_bug.cgi?id=62676 * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::encode): Use encodeVariableLengthByteArray. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Use encodeVariableLengthByteArray and the new dataReference accessors. (WebKit::UserMessageDecoder::baseDecode): Use decodeVariableLengthByteArray. * Shared/WebData.h: (WebKit::WebData::dataReference): Return a reference to the data. * Shared/WebSerializedScriptValue.h: (WebKit::WebSerializedScriptValue::dataReference): Ditto. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::encode): Use encodeVariableLengthByteArray. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::encode): Use encodeVariableLengthByteArray. * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeBytes): Use decodeVariableLengthByteArray. * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::dataReference): Rename data() to dataReference() to indicate that it returns a reference to the data. (WebKit::EncoderAdapter::encodeBytes): Use encodeVariableLengthByteArray. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add encodeVariableLengthByteArray and decodeVariableLengthByteArray https://bugs.webkit.org/show_bug.cgi?id=62674 Rename the ArgumentDecoder::decodeBytes overload that takes a DataReference to decodeVariableLengthByteArray, to match the added encodeVariableLengthByteArray. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentEncoder.h: * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::decode): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::decode): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add functions for converting between DataReferences and vectors https://bugs.webkit.org/show_bug.cgi?id=62671 * Platform/CoreIPC/DataReference.h: (CoreIPC::DataReference::DataReference): New implicit constructor that takes a vector. (CoreIPC::DataReference::vector): New function that returns a new vector. * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::encode): Use implicit constructor. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): Ditto. 2011-06-14 John Sullivan Reviewed by Dan Bernstein. Callers should be robust against WebImage::create() returning an image with a null snapshot * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): Return 0 if no bitmap was created. (WKImageCreateFromCGImage): Ditto. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Check for null before dereferencing image->bitmap() in two places. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotInViewCoordinates): Return 0 if no bitmap was created. (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Ditto. (WebKit::WebPage::createSnapshotOfVisibleContent): Bail out if no bitmap was created. 2011-06-14 Anders Carlsson Reviewed by Darin Adler. Add functions for encoding/decoding data with a known size and alignment https://bugs.webkit.org/show_bug.cgi?id=62663 * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeFixedLengthData): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthData): * Platform/CoreIPC/ArgumentEncoder.h: 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Move string ArgumentCoder template specializations out into a .cpp file https://bugs.webkit.org/show_bug.cgi?id=62660 * GNUmakefile.am: * Platform/CoreIPC/ArgumentCoders.cpp: Added. (CoreIPC::::encode): (CoreIPC::::decode): * Platform/CoreIPC/ArgumentCoders.h: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Remove PluginInfoStore::Plugin typedef https://bugs.webkit.org/show_bug.cgi?id=62657 * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Create the PluginModuleInfo class and reverse the typedef so that PluginInfoStore::Plugin is now a typedef https://bugs.webkit.org/show_bug.cgi?id=62654 * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::loadPluginsIfNecessary): (WebKit::PluginInfoStore::loadPlugin): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::findPlugin): (WebKit::PluginInfoStore::infoForPluginWithPath): * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::getPluginProcessConnection): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::PluginProcessProxy): * UIProcess/Plugins/WebPluginSiteDataManager.cpp: (WebKit::WebPluginSiteDataManager::getSitesWithData): (WebKit::WebPluginSiteDataManager::clearSiteData): * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::isOldWindowsMediaPlayerPlugin): (WebKit::isNewWindowsMediaPlayerPlugin): (WebKit::PluginInfoStore::shouldUsePlugin): 2011-06-14 Stephanie Lewis Rubber stamped by Oliver Hunt. Update order files. * mac/WebKit2.order: 2011-06-14 Anders Carlsson Reviewed by Dan Bernstein. Start replacing PluginInfoStore::Plugin with PluginModuleInfo https://bugs.webkit.org/show_bug.cgi?id=62651 * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::plugins): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::infoForPluginWithPath): * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::getPluginProcessConnection): (WebKit::PluginProcessManager::getSitesWithData): (WebKit::PluginProcessManager::clearSiteData): (WebKit::PluginProcessManager::getOrCreatePluginProcess): * UIProcess/Plugins/PluginProcessManager.h: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::create): * UIProcess/Plugins/PluginProcessProxy.h: (WebKit::PluginProcessProxy::pluginInfo): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): (WebKit::PluginProcessProxy::createPropertyListFile): 2011-06-14 Anders Carlsson Reviewed by Darin Adler. Add PluginModuleInfo header and prepare for renaming of PluginInfoStore::Plugin to PluginModuleInfo https://bugs.webkit.org/show_bug.cgi?id=62647 Make PluginModuleInfo a typedef of PluginInfoStore::Plugin for now; eventually it should be its own class, and PluginInfoStore::Plugin should go away. * GNUmakefile.am: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginArchitecture): (WebKit::getMIMETypesFromPluginBundle): (WebKit::getPluginInfoFromPropertyLists): (WebKit::getPluginInfoFromCarbonResources): (WebKit::NetscapePluginModule::getPluginInfo): (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/PluginModuleInfo.cpp: Added. * Shared/Plugins/PluginModuleInfo.h: Added. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Move the code to show the context menu from WebKitWebViewBase to WebContextMenuProxyGtk https://bugs.webkit.org/show_bug.cgi?id=62627 * UIProcess/API/gtk/WebKitWebViewBase.cpp: * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::showContextMenu): (WebKit::WebContextMenuProxyGtk::hideContextMenu): (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::menuPositionFunction): * UIProcess/gtk/WebContextMenuProxyGtk.h: 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoint() https://bugs.webkit.org/show_bug.cgi?id=62626 * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): Implement this method using convertWidgetPointToScreenPoint(). (WebKit::PageClientImpl::windowToScreen): Update to use convertWidgetPointToScreenPoint(). * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use convertWidgetPointToScreenPoint(). 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Support authentication dialogs in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62366 Add a new soup feature to show an authentication dialog when it gets a 401 HTTP response. * GNUmakefile.am: Add new files to compilation. * WebProcess/gtk/WebAuthDialog.cpp: Added. (web_auth_dialog_class_init): (web_auth_dialog_init): (sessionAuthenticate): (attach): (detach): (webAuthDialogSessionFeatureInit): * WebProcess/gtk/WebAuthDialog.h: Added. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2011-06-14 No'am Rosenthal and Viatcheslav Ostapenko Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Implementing LayerTreeHost and LayerTreeContext and LayerTreeHost for Qt. Add the necessary plumbing to make the LayerTreeHost work with Qt, based on the original Mac implementation (the code is nearly identical). This includes creating the right layers for the overlay and for the non-composited content, and passing the root layer to the UI process. Also, since LayerTreeHostQt is compiled, we have to add some of the rest of the existing patches, namely the new messages: syncCompositingLayers and updateCompositingLayerContent, and create a stub implementation for them in DrawingAreaProxy. Note that this is not activated yet, until we enable accelerated compositing in the settings and create the right GraphicsLayer. * Scripts/webkit2/messages.py: * Shared/LayerTreeContext.h: * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::syncCompositingLayers): (WebKit::DrawingAreaProxy::updateCompositingLayerContent): * UIProcess/DrawingAreaProxy.messages.in: * WebKit2.pro: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::collectCompositingInfoForThisLayer): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::create): (WebKit::LayerTreeHostQt::~LayerTreeHostQt): (WebKit::LayerTreeHostQt::LayerTreeHostQt): (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled): (WebKit::LayerTreeHostQt::scheduleLayerFlush): (WebKit::LayerTreeHostQt::cancelPendingLayerFlush): (WebKit::LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush): (WebKit::LayerTreeHostQt::setRootCompositingLayer): (WebKit::LayerTreeHostQt::invalidate): (WebKit::LayerTreeHostQt::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostQt::scrollNonCompositedContents): (WebKit::LayerTreeHostQt::forceRepaint): (WebKit::LayerTreeHostQt::sizeDidChange): (WebKit::LayerTreeHostQt::didInstallPageOverlay): (WebKit::LayerTreeHostQt::didUninstallPageOverlay): (WebKit::LayerTreeHostQt::setPageOverlayNeedsDisplay): (WebKit::LayerTreeHostQt::flushPendingLayerChanges): (WebKit::LayerTreeHostQt::performScheduledLayerFlush): (WebKit::LayerTreeHostQt::layerFlushTimerFired): (WebKit::LayerTreeHostQt::createPageOverlayLayer): (WebKit::LayerTreeHostQt::destroyPageOverlayLayer): (WebKit::LayerTreeHostQt::notifyAnimationStarted): (WebKit::LayerTreeHostQt::notifySyncRequired): (WebKit::LayerTreeHostQt::paintContents): (WebKit::LayerTreeHostQt::showDebugBorders): (WebKit::LayerTreeHostQt::showRepaintCounter): (WebKit::LayerTreeHost::supportsAcceleratedCompositing): * WebProcess/WebPage/qt/LayerTreeHostQt.h: Added. (WebKit::LayerTreeHostQt::layerTreeContext): (WebKit::LayerTreeHostQt::pauseRendering): (WebKit::LayerTreeHostQt::resumeRendering): 2011-06-14 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Add a createImage() function to ShareableBitmap, for now ifdef'ed to Qt only. This allows us to support directly composited images across the WebKit2 processes. Together with Viatcheslav Ostapenko. * Shared/ShareableBitmap.h: * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createQImage): (WebKit::ShareableBitmap::createImage): 2011-06-13 Anders Carlsson Reviewed by Sam Weinig. Crash when trying to use Netflix Watch Instantly with Silverlight 3 https://bugs.webkit.org/show_bug.cgi?id=62611 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::getPluginInfo): Get the plug-in version string instead of the version number. (WebKit::PluginVersion::isValid): (WebKit::PluginVersion::PluginVersion): (WebKit::PluginVersion::parse): (WebKit::PluginVersion::isLessThan): Add a new PluginVersion class that represents a plug-in version. The idea is that this class be made cross platform. (WebKit::NetscapePluginModule::determineQuirks): Add the ReturnsNonRetainedScriptableNPObject quirk for versions of Silverlight less than 4. * Shared/Plugins/PluginQuirks.h: Add the ReturnsNonRetainedScriptableNPObject quirk. * UIProcess/Plugins/PluginInfoStore.h: Use a version string. Eventually this should hold the PluginVersion class we added. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginScriptableNPObject): If the plug-in has the ReturnsNonRetainedScriptableNPObject quirk, do an extra retain. 2011-06-13 Ryuan Choi Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add dummy files at below of WebProcess. https://bugs.webkit.org/show_bug.cgi?id=62445 Add Efl related directory and files in WebKit2/WebProcess/. * WebProcess/Cookies/efl/WebCookieManagerEfl.cpp: Added. (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Added. (WebKit::InjectedBundle::load): (WebKit::InjectedBundle::activateMacFontAscentHack): * WebProcess/WebPage/efl/WebInspectorEfl.cpp: Added. (WebKit::WebInspector::localizedStringsURL): * WebProcess/WebPage/efl/WebPageEfl.cpp: Added. (WebKit::WebPage::platformInitialize): (WebKit::WebPage::platformPreferencesDidChange): (WebKit::scroll): (WebKit::WebPage::performDefaultBehaviorForKeyEvent): (WebKit::WebPage::platformHasLocalDataForURL): (WebKit::WebPage::cachedResponseMIMETypeForURL): (WebKit::WebPage::platformCanHandleRequest): (WebKit::WebPage::cachedSuggestedFilenameForURL): (WebKit::WebPage::cachedResponseDataForURL): * WebProcess/efl/WebProcessEfl.cpp: Added. (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformClearResourceCaches): (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformTerminate): * WebProcess/efl/WebProcessMainEfl.cpp: Added. (WebKit::WebProcessMainEfl): * WebProcess/efl/WebProcessMainEfl.h: Added. * efl/MainEfl.cpp: Added. (main): 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial WebInspectorEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62524 * UIProcess/efl/WebInspectorEfl.cpp: Added. (WebKit::WebInspectorProxy::platformCreateInspectorPage): (WebKit::WebInspectorProxy::platformOpen): (WebKit::WebInspectorProxy::platformDidClose): (WebKit::WebInspectorProxy::platformBringToFront): (WebKit::WebInspectorProxy::platformInspectedURLChanged): (WebKit::WebInspectorProxy::inspectorPageURL): (WebKit::WebInspectorProxy::platformAttach): (WebKit::WebInspectorProxy::platformDetach): (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial TextCheckerEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62438 * UIProcess/efl/TextCheckerEfl.cpp: Added. (WebKit::TextChecker::state): (WebKit::TextChecker::isContinuousSpellCheckingAllowed): (WebKit::TextChecker::setContinuousSpellCheckingEnabled): (WebKit::TextChecker::setGrammarCheckingEnabled): (WebKit::TextChecker::uniqueSpellDocumentTag): (WebKit::TextChecker::closeSpellDocumentWithTag): (WebKit::TextChecker::checkSpellingOfString): (WebKit::TextChecker::checkGrammarOfString): (WebKit::TextChecker::spellingUIIsShowing): (WebKit::TextChecker::toggleSpellingUIIsShowing): (WebKit::TextChecker::updateSpellingUIWithMisspelledWord): (WebKit::TextChecker::updateSpellingUIWithGrammarString): (WebKit::TextChecker::getGuessesForWord): (WebKit::TextChecker::learnWord): (WebKit::TextChecker::ignoreWord): 2011-06-13 Sangyong Park Reviewed by Eric Seidel. implement to handle wheel event of plugin on x11 https://bugs.webkit.org/show_bug.cgi?id=62522 Implement platformHandleWheelEvent() in NetscapePluginX11.cpp for to handle wheel event on plugins * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::setCommonMouseEventFields): add template argument to support WebWheelEvent (WebKit::setXButtonEventFieldsByWebWheelEvent): initialize XButtonEvent by WebWheelEvent (WebKit::NetscapePlugin::platformHandleWheelEvent): handle wheel event on plugin 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial WebContextEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62523 * UIProcess/efl/WebContextEfl.cpp: Added. (WebKit::WebContext::applicationCacheDirectory): (WebKit::WebContext::platformInitializeWebProcess): (WebKit::WebContext::platformInvalidateContext): (WebKit::WebContext::platformDefaultDatabaseDirectory): (WebKit::WebContext::platformDefaultIconDatabasePath): (WebKit::WebContext::platformDefaultLocalStorageDirectory): 2011-06-13 Noam Rosenthal Unreviewed fix - removed parts of r88659 that were committed by mistake. The patch accidentally included parts that weren't supposed to be there, namely the whole code was duplicated. This patch rectifies that and brings it to the original reviewed code. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: * WebProcess/WebCoreSupport/WebGraphicsLayer.h: 2011-06-13 Anders Carlsson Reviewed by Dan Bernstein. BankID plug-in isn't instantiated correctly https://bugs.webkit.org/show_bug.cgi?id=62588 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): The BankID plug-in uses the QuickDraw drawing model but doesn't draw anything so we can use the half-baked QuickDraw support. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::defaultSyncMessageTimeout): Don't use a sync message timeout for the BankID plug-in since it sends synchronous Apple Events and we don't want the plug-in to die while it's waiting for a reply. 2011-06-13 Chris Fleizach Reviewed by Darin Adler. kAXTextMarkerForPositionParametrizedAttribute does not work correctly in WK2 https://bugs.webkit.org/show_bug.cgi?id=62547 Implement the missing screenToWindow method for WK2. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::screenToWindow): * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::screenToWindow): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::screenToWindow): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/win/WebView.cpp: (WebKit::WebView::screenToWindow): * UIProcess/win/WebView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::screenToWindow): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::screenToWindow): * WebProcess/WebPage/WebPage.h: 2011-06-13 Sam Weinig Reviewed by Darin Adler. REGRESSION (81679-81939): In Safari, Dictionary look up (tap or Ctrl-Cmd-D) doesn't work if you have clicked on a word and not moved the mouse * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::shouldUseSelection): Return early if the selection we are using is not a range. 2011-06-13 Tony Chang Reviewed by Dimitri Glazkov. rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62578 * Configurations/FeatureDefines.xcconfig: 2011-06-13 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Added WebGraphicsLayer, a subclass of WebCore::GraphicsLayer that serializes the state of the layer tree to the UI process WebLayerTreeInfo. For now this patch doesn't serialize the animation information, a feature that will be upstreamed later on. Together with Viatcheslav Ostapenko. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: Added. * WebProcess/WebCoreSupport/WebGraphicsLayer.h: Added. 2011-06-13 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Added WebLayerTreeInfo: a set of structures that can serialize a tree of GraphicsLayers across to the UI process. Together with Viatcheslav Ostapenko. * Scripts/webkit2/messages.py: * Shared/WebLayerTreeInfo.cpp: Added. * Shared/WebLayerTreeInfo.h: Added. 2011-06-11 Jer Noble Reviewed by Anders Carlsson. Avoid flashing when exiting full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=62338 Instead of making a round-trip between processes by calling forceRepaint and waiting for a callback, instead make a WebProcess-side call to forceRepaintWithoutCallback before sending the ExitAcceleratedCompositingMode message to the WebFullScreenControllerProxy. This also means we can get rid of the dragImage creation and display. Because this redraw will happen during the current run-loop instead of a future one, make sure the background color has been set before the redraw in didEnterFullScreen(). Wait to hide the full-screen window until after we have received the ExitAcceleratedCompositingMode message. By this time, repaint will have already completed. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Disable screen updates, to be re-enabled during exitAcceleratedCompositingMode. (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Don't hide the full-screen window here; wait for exitAcceleratedCompositing instead. (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Collapse the redrawCompleted method into this one. (-[WKFullScreenWindowController close]): Remove the reference to exitCompositedModeRepaintCompleted. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::didEnterFullScreen): Set the full screen background color first. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Repaint before sending the ExitAcceleratedCompositingMode message. 2011-06-13 Tony Chang Reviewed by Adam Barth. rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62545 * Configurations/FeatureDefines.xcconfig: 2011-06-13 Anders Carlsson Reviewed by Dan Bernstein. Don't access freed memory in the UI process when a plug-in process crashes https://bugs.webkit.org/show_bug.cgi?id=62548 Call pluginProcessCrashedOrFailedToLaunch after sending messages to all processes about the plug-in crash, otherwise we'll try to dereference m_pluginInfo.path after the PluginProcessProxy object has been deleted. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didClose): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Fix a crash when drawing area has been deleted https://bugs.webkit.org/show_bug.cgi?id=62541 Check whether WebPageProxy::drawingArea() returns a valid pointer before using it, it might be null, for example, when the web process crashes. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (callDrawingAreaPaintMethod): (webkitWebViewBaseSizeAllocate): 2011-06-13 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Minor fix: fix coding style and remove unnecessary codes for WebKit2 efl port's PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=62429 * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::scrollView): (WebKit::PageClientImpl::setCursor): (WebKit::PageClientImpl::windowToScreen): (WebKit::PageClientImpl::doneWithKeyEvent): (WebKit::PageClientImpl::setFindIndicator): (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): (WebKit::PageClientImpl::findStringInCustomRepresentation): (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): * UIProcess/API/efl/PageClientImpl.h: 2011-06-13 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add initial WebPreferencesEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62525 * UIProcess/efl/WebPreferencesEfl.cpp: Added. (WebKit::WebPreferences::platformInitializeStore): (WebKit::WebPreferences::platformUpdateStringValueForKey): (WebKit::WebPreferences::platformUpdateBoolValueForKey): (WebKit::WebPreferences::platformUpdateUInt32ValueForKey): (WebKit::WebPreferences::platformUpdateDoubleValueForKey): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Add context menu support for Webkit2 https://bugs.webkit.org/show_bug.cgi?id=54827 * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createContextMenuProxy): Create a context menu proxy. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (globalPointForClientPoint): Function copied from webkit1 to convert a point in widget coordinates to global coordinates. (popupMenuPositionFunction): (webkitWebViewBaseShowContextMenu): Show the given context menu at the given position. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Added. (WebKit::contextMenuItemActivatedCallback): (WebKit::WebContextMenuProxyGtk::createGtkMenu): (WebKit::WebContextMenuProxyGtk::showContextMenu): (WebKit::WebContextMenuProxyGtk::hideContextMenu): (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): * UIProcess/gtk/WebContextMenuProxyGtk.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h. (WebKit::WebContextMenuProxyGtk::create): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Export an API similar to WebKit1 https://bugs.webkit.org/show_bug.cgi?id=57820 Add first implementation of WebKitWebView, a class with the same API than webkit1, that wraps the C API to provide a high level WebKit2 API for GTK port. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitWebView.cpp: Added. (webkit_web_view_init): (webkit_web_view_class_init): (webkit_web_view_new): (webkit_web_view_load_uri): (webkit_web_view_go_back): (webkit_web_view_go_forward): * UIProcess/API/gtk/WebKitWebView.h: Added. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseCreate): (webkitWebViewBaseCreateWebPage): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/webkit/webkit.h: Added. 2011-06-12 Adam Barth Reviewed by Alexey Proskuryakov. Rename FrameLoaderClient::interruptForPolicyChangeError to use the past tense https://bugs.webkit.org/show_bug.cgi?id=62516 * WebProcess/WebCoreSupport/WebErrors.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp: (WebKit::interruptedForPolicyChangeError): 2011-06-12 Adam Barth Reviewed by Eric Seidel. Remove FrameLoader::isProcessingUserGesture https://bugs.webkit.org/show_bug.cgi?id=62519 Instead of asking the gesture indicator directly, ask the ScriptController, like everyone else. The gesture indicator is just one of the piece of information we use to determine whether we're processing a user gesture. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::isProcessingUserGesture): 2011-06-12 Adam Barth Reviewed by Alexey Proskuryakov. Remove trival "forward-to-client" member functions from FrameLoader https://bugs.webkit.org/show_bug.cgi?id=62510 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::blockedError): 2011-06-11 Stephanie Lewis Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=62480 part of Add API to launch the WebProcess. Launching it earlier can save time when loading the first page. * UIProcess/API/C/WKContext.cpp: (WKContextWarmInitialProcess): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::warmInitialProcess): * UIProcess/WebContext.h: 2011-06-09 Jer Noble Reviewed by Darin Adler. AVPlayerLayer is adding a "fade" animation during Safari full-screen https://bugs.webkit.org/show_bug.cgi?id=62433 CoreAnimation will add default animations when certain properties are changed, unless those changes are wrapped in a CATransaction which has had its disableActions property set to true. Wrap each of these three property changes in a CATransaction and disable its actions, so that the default "fade" animation is not created in response. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): Wrap with CATransaction. (-[WKFullScreenWindowController _swapView:with:]): Ditto: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Ditto. 2011-06-10 Anders Carlsson Reviewed by Sam Weinig. REGRESSION (WebKit2): window.showModalDialog() broken https://bugs.webkit.org/show_bug.cgi?id=62496 If dispatching a message ends up creating a nested run loop, some incoming messages can end up not being delivered until we exit from the run loop. Fix this by using a Deque instead of a Vector for incoming messages, and get one message at a time and then dispatch it. That prevents us from having any lingering messages lying around in stack allocated space. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::dispatchMessages): * Platform/CoreIPC/Connection.h: 2011-06-10 Sam Weinig Reviewed by Anders Carlsson. Unresponsive cursor is shown when displaying a modal dialog Part of https://bugs.webkit.org/show_bug.cgi?id=62494 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runModal): * UIProcess/WebPageProxy.h: Stop the responsiveness timer when calling out to show a modal dialog. 2011-06-10 Tony Chang Reviewed by Ojan Vafai. add a compile guard ENABLE(FLEXBOX) https://bugs.webkit.org/show_bug.cgi?id=62049 * Configurations/FeatureDefines.xcconfig: 2011-06-10 Ryuan Choi Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add dummy files in WebProcess/WebCoreSupport/efl https://bugs.webkit.org/show_bug.cgi?id=62346 Add WebProcess/WebCoreSupport/efl directory and files. * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Added. (WebKit::WebContextMenuClient::lookUpInDictionary): (WebKit::WebContextMenuClient::isSpeaking): (WebKit::WebContextMenuClient::speak): (WebKit::WebContextMenuClient::stopSpeaking): * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Added. (WebKit::WebEditorClient::handleKeyboardEvent): (WebKit::WebEditorClient::handleInputMethodKeydown): * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Added. (WebKit::cancelledError): (WebKit::blockedError): (WebKit::cannotShowURLError): (WebKit::interruptForPolicyChangeError): (WebKit::cannotShowMIMETypeError): (WebKit::fileDoesNotExistError): (WebKit::pluginWillHandleLoadError): * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h: Added. (WebFrameNetworkingContext::create): (WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Added. (WebKit::WebPopupMenu::setUpPlatformData): 2011-06-09 Andreas Kling Reviewed by Darin Adler. WebKit2: Remove unused function CoreIPC::Connection::deprecatedWaitFor(). https://bugs.webkit.org/show_bug.cgi?id=62386 * Platform/CoreIPC/Connection.h: 2011-06-09 Andreas Kling Reviewed by Anders Carlsson. [Qt][WK2] Remove usage of deprecated CoreIPC functions. https://bugs.webkit.org/show_bug.cgi?id=62290 Use the new DrawingArea{,Proxy}.messages.in approach to CoreIPC in TiledDrawingArea. The TiledDrawingArea{,Proxy}-specific messages were moved up into DrawingArea{,Proxy} and guarded by ENABLE(TILED_BACKING_STORE). * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h: Removed. * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h: Removed. * GNUmakefile.am: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Prune deleted files from build system. * Platform/CoreIPC/MessageID.h: Remove legacy DrawingArea message ID's. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKViewPrivate::commitScale): No longer waits for all tile updates to complete, this will be addressed by the soon-to-be-upstreamed TileSet mechanism. * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::didSetSize): (WebKit::DrawingAreaProxy::invalidate): (WebKit::DrawingAreaProxy::snapshotTaken): (WebKit::DrawingAreaProxy::tileUpdated): (WebKit::DrawingAreaProxy::allTileUpdatesProcessed): Added IPC calls used by TiledDrawingAreaProxy to DrawingAreaProxy. * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setSize): (WebKit::DrawingArea::cancelTileUpdate): (WebKit::DrawingArea::requestTileUpdate): (WebKit::DrawingArea::takeSnapshot): Added IPC calls used by TiledDrawingArea to DrawingArea. * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/DrawingAreaProxyImpl.cpp: Remove the now-unneeded didReceiveMessage() and didReceiveSyncMessage(). * WebProcess/WebPage/DrawingAreaImpl.cpp: * WebProcess/WebPage/DrawingAreaImpl.h: Remove the now-unneeded didReceiveMessage(). * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::sizeDidChange): (WebKit::TiledDrawingAreaProxy::tileUpdated): (WebKit::TiledDrawingAreaProxy::allTileUpdatesProcessed): Split didReceiveMessage() into functions. (WebKit::TiledDrawingAreaProxy::removeTile): (WebKit::TiledDrawingAreaProxy::requestTileUpdate): (WebKit::TiledDrawingAreaProxy::setPageIsVisible): (WebKit::TiledDrawingAreaProxy::takeSnapshot): Use new-style IPC. * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::setSize): (WebKit::TiledDrawingArea::cancelTileUpdate): (WebKit::TiledDrawingArea::requestTileUpdate): (WebKit::TiledDrawingArea::takeSnapshot): Split didReceiveMessage() into functions. (WebKit::TiledDrawingArea::display): (WebKit::TiledDrawingArea::updateTile): (WebKit::TiledDrawingArea::tileUpdateTimerFired): Use new-style IPC. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): Remove handling of CoreIPC::MessageClassDrawingAreaProxyLegacy. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): Remove handling of CoreIPC::MessageClassDrawingAreaLegacy. * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Remove unneeded includes. * WebProcess/WebPage/TiledDrawingArea.h: Remove didReceiveMessage() and make CoreIPC message handlers explicitly virtual. 2011-06-09 Andreas Kling Reviewed by Anders Carlsson. WebKit2: Generate correct header conditionals in message receivers. https://bugs.webkit.org/show_bug.cgi?id=62379 Given a *.messages.in file like this: Foo(AwesomeObject o) #if ENABLE(ESOTERIC_FEATURE) Bar(AwesomeObject o) #endif messages.py would include AwesomeObject.h only #if ENABLE(ESOTERIC_FEATURE). This breaks the build on platforms without that defined. Furthermore, if two messages guarded by different conditionals both pull in the same header, only the last conditional will be applied, for example: #if ENABLE(ESOTERIC_FEATURE) Foo(AwesomeObject o) #endif #if ENABLE(MYSTERIOUS_FEATURE) Bar(AwesomeObject o) #endif Would include AwesomeObject.h #if ENABLE(MYSTERIOUS_FEATURE) when it really should check #if ENABLE(ESOTERIC_FEATURE) || ENABLE(MYSTERIOUS_FEATURE). Change the generator to consider all conditionals for a given header file. Also consider conditionals for reply parameters. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-06-09 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add PageClientImpl and WebPageProxyEfl for efl port https://bugs.webkit.org/show_bug.cgi?id=62363 * UIProcess/API/efl/PageClientImpl.cpp: Added. (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::~PageClientImpl): (WebKit::PageClientImpl::createDrawingAreaProxy): (WebKit::PageClientImpl::setViewNeedsDisplay): (WebKit::PageClientImpl::displayView): (WebKit::PageClientImpl::scrollView): (WebKit::PageClientImpl::viewSize): (WebKit::PageClientImpl::isViewWindowActive): (WebKit::PageClientImpl::isViewFocused): (WebKit::PageClientImpl::isViewVisible): (WebKit::PageClientImpl::isViewInWindow): (WebKit::PageClientImpl::processDidCrash): (WebKit::PageClientImpl::didRelaunchProcess): (WebKit::PageClientImpl::pageClosed): (WebKit::PageClientImpl::toolTipChanged): (WebKit::PageClientImpl::setCursor): (WebKit::PageClientImpl::setViewportArguments): (WebKit::PageClientImpl::registerEditCommand): (WebKit::PageClientImpl::clearAllEditCommands): (WebKit::PageClientImpl::canUndoRedo): (WebKit::PageClientImpl::executeUndoRedo): (WebKit::PageClientImpl::convertToDeviceSpace): (WebKit::PageClientImpl::convertToUserSpace): (WebKit::PageClientImpl::windowToScreen): (WebKit::PageClientImpl::doneWithKeyEvent): (WebKit::PageClientImpl::createPopupMenuProxy): (WebKit::PageClientImpl::createContextMenuProxy): (WebKit::PageClientImpl::setFindIndicator): (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame): (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): (WebKit::PageClientImpl::customRepresentationZoomFactor): (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): (WebKit::PageClientImpl::flashBackingStoreUpdates): (WebKit::PageClientImpl::findStringInCustomRepresentation): (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): (WebKit::PageClientImpl::userSpaceScaleFactor): * UIProcess/API/efl/PageClientImpl.h: Added. (WebKit::PageClientImpl::create): (WebKit::PageClientImpl::viewObject): (WebKit::PageClientImpl::page): * UIProcess/WebPageProxy.h: * UIProcess/efl/WebPageProxyEfl.cpp: Added. (WebKit::WebPageProxy::viewObject): (WebKit::WebPageProxy::standardUserAgent): (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): (WebKit::WebPageProxy::saveRecentSearches): (WebKit::WebPageProxy::loadRecentSearches): 2011-06-08 John Sullivan Reviewed by Darin Adler. [WKView _setDragImage:at:linkDrag:] can crash if WKView is dealloc'ed during drag * UIProcess/API/mac/WKView.mm: (-[WKView _resendKeyDownEvent:]): Renamed self-protecting RetainPtr from "protect" to "protector" so it's a noun. (-[WKView _setDragImage:at:linkDrag:]): Added a self-protecting RetainPtr. 2011-06-08 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add an ArgumentCoder for FloatPoint3D. Together with Viatcheslav Ostapenko. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-08 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add ArgumentCoders for TransformOperation, including all the subclasses, and TransformOperations. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-08 Yael Aharon Reviewed by Andreas Kling. [Qt] Build fix for building QtWebKit inside of Qt. https://bugs.webkit.org/show_bug.cgi?id=62280 Remove CONFIG=staticlib, because it causes the configure script to add -lwebkit2 into QtWebKit.prl. * WebKit2.pri: 2011-06-07 Tim Horton Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 John Sullivan Reviewed by Darin Adler. WKResponderChainSink mechanism isn't robust against some types of responder chain manipulation * UIProcess/API/mac/WKView.mm: (-[WKResponderChainSink detach]): This method formerly blindly assumed that since -initWithResponderChain: put self at the end of the responder chain, after _lastResponderInChain, then self is still at the end of the responder chain and still immediately after _lastResponderInChain. Made this function robust against some kinds of responder chain manipulations, though it can't be robust against some other kinds (e.g., manipulations that removed self from this chain and put it into some other chain). 2011-06-07 Sam Weinig Reviewed by Anders Carlsson. Remove repeated IPC traffic from SetRenderTreeSize message https://bugs.webkit.org/show_bug.cgi?id=62244 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didLayoutForFrame callback. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageGetRenderTreeSize): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Add render tree size getter in WebProcess. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: Added. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: Removed setRenderTreeSize. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidLayout): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Call the new didLayoutForFrame client function. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::renderTreeSize): * WebProcess/WebPage/WebPage.h: Add iterative implementation to compute the total size of the render tree for a page. 2011-06-07 Zalan Bujtas Reviewed by Andreas Kling. TiledDrawingArea: Delay serving tile requests when the drawing area is suspended. Do not paint tiles when painting is disabled (suspended) on the web process side. Buffer up the tile requests and paint them, when the drawing area gets resumed. On the UI process side, do not block on tile updates, when the tiled area is not visible (painting is disabled on the web process side). * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete): * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::suspendPainting): (WebKit::TiledDrawingArea::resumePainting): (WebKit::TiledDrawingArea::scheduleTileUpdate): (WebKit::TiledDrawingArea::tileUpdateTimerFired): (WebKit::TiledDrawingArea::didReceiveMessage): * WebProcess/WebPage/TiledDrawingArea.h: 2011-06-07 Sheriff Bot Unreviewed, rolling out r88259 and r88263. http://trac.webkit.org/changeset/88259 http://trac.webkit.org/changeset/88263 https://bugs.webkit.org/show_bug.cgi?id=62228 broke builds (Requested by rniwa on #webkit). * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 Tim Horton Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Move moduleMixesGtkSymbols() from PluginPackage to PluginView https://bugs.webkit.org/show_bug.cgi?id=62200 In WebKit2 PluginPackage is used by the UI process to load plugins in order to get information about them, but it doesn't use any GTK symbol. So the UI process should be able to load plugins even when building with GTK3, but we should not allow the plugin view to use the plugin if it mixes GTK2 and GTK3 symbols. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): (WebKit::NetscapePlugin::platformPostInitialize): Check whether the module is mixing GTK+ 2 and GTK+ 3 symbols. 2011-06-06 Sheriff Bot Unreviewed, rolling out r88222. http://trac.webkit.org/changeset/88222 https://bugs.webkit.org/show_bug.cgi?id=62192 Broke compile on Mac (Requested by abarth on #webkit). * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-06 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add ArgumentCoders for TransformOperation, including all the subclasses, and TransformOperations. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-06 John Sullivan Reviewed by Dan Bernstein. WebKit2 find-on-page callback doesn’t handle kWKMoreThanMaximumMatchCount on PDF pages * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::findString): Return kWKMoreThanMaximumMatchCount when appropriate, a la FindController::countStringMatches(). Also, skip counting all the matches if maxMatchCount is 0, to avoid (perhaps slowly) computing a number that would be ignored. 2011-06-06 Carlos Garcia Campos Reviewed by Anders Carlsson. Do not use NPRuntimeObjectMap in NetscapePlugin::setException when plug-in is running out of process https://bugs.webkit.org/show_bug.cgi?id=62124 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::setException): 2011-06-06 Dominic Cooney Unreviewed WinCairo build fix after r88159. * win/WebKit2CFLite.def: Export symbols for WebCoreTestSupport. 2011-06-04 Dominic Cooney Reviewed by Dimitri Glazkov. Re-export JSC and WebCore symbols required by WebCoreTestSupport. https://bugs.webkit.org/show_bug.cgi?id=61076 * win/WebKit2.def: 2011-06-06 Alexandru Chiculita Reviewed by Kent Tamura. Add ENABLE_CSS_EXCLUSIONS support for build-webkit script https://bugs.webkit.org/show_bug.cgi?id=61628 * Configurations/FeatureDefines.xcconfig: 2011-06-06 Mihnea Ovidenie Reviewed by Kent Tamura. Add ENABLE(CSS_REGIONS) guard for CSS Regions support https://bugs.webkit.org/show_bug.cgi?id=61631 * Configurations/FeatureDefines.xcconfig: 2011-06-06 Carlos Garcia Campos Reviewed by Anders Carlsson. [UNIX] SOCK_DGRAM sockets are not notified when the other end closes the connection https://bugs.webkit.org/show_bug.cgi?id=61538 Use SOCK_STREAM instead of SOCK_DGRAM sockets. Rework the message receiver code to support stream sockets, since it requires to handle message boundaries. The same code works for DGRAM sockets, so this change shouldn't break other ports using DGRAM. * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInitialize): (CoreIPC::Connection::processMessage): Process messages from data already received. (CoreIPC::readBytesFromSocket): Read from socket using recvmsg(). (CoreIPC::Connection::readyReadHandler): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): Use SOCK_DGRAM in socketpair(). == Rolled over to ChangeLog-2011-06-04 ==