2012-10-02 Alexey Proskuryakov Need to keep track of messages posted to injected bundle before creating a page https://bugs.webkit.org/show_bug.cgi?id=98210 Reviewed by Anders Carlsson. Restore the pending message functionality, but only for shared process mode, and under a different name. * UIProcess/WebContext.cpp: (WebKit::WebContext::setProcessModel): (WebKit::WebContext::createNewWebProcess): (WebKit::WebContext::postMessageToInjectedBundle): * UIProcess/WebContext.h: 2012-10-02 Adrian Perez de Castro Unix plugin process: xErrorString does not need to be defined in release builds https://bugs.webkit.org/show_bug.cgi?id=98174 Reviewed by Alexey Proskuryakov. The static xErrorString variable is used only for logging purposes, so it causes a warning when doing relese builds (or, in general, when logging is enabled). This disables building in the string when LOG_DISABLED is defined. Also, made the more constant by changing the "const char*" type to "const char[]". * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit): 2012-10-02 Anders Carlsson Fix crash in WebGeolocationManager constructor. Defer adding the location manager until there actually is a connection. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::WebGeolocationManager): (WebKit::WebGeolocationManager::registerWebPage): * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): 2012-10-02 Anders Carlsson Fix build. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::WebGeolocationManager): 2012-10-02 Anders Carlsson Fix infinite recursion inside WebProcess constructor https://bugs.webkit.org/show_bug.cgi?id=98206 Reviewed by Brian Weinstein. Don't call WebProcess::shared from the WebGeolocationManager constructor since it is invoked from the WebProcess constructor. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::WebGeolocationManager): 2012-10-02 Hugo Parente Lima [WK2] Move some tiled backing store/viewport functions from Qt to generic WebKit2 sources https://bugs.webkit.org/show_bug.cgi?id=98199 Reviewed by Noam Rosenthal. Move commitPageTransitionViewport from Qt to WebKit2. * UIProcess/WebPageProxy.cpp: (WebKit): (WebKit::WebPageProxy::commitPageTransitionViewport): * UIProcess/qt/WebPageProxyQt.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit): (WebKit::WebPage::commitPageTransitionViewport): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: 2012-10-02 Anders Carlsson Build fixes. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::beginModal): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::getPluginProcessSerialNumber): (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess): (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess): (WebKit::PluginProcessProxy::exitFullscreen): 2012-10-02 Alexey Proskuryakov WebKit2 should provide API that returns all pages in the same process as a given page https://bugs.webkit.org/show_bug.cgi?id=98193 Reviewed by Sam Weinig. * UIProcess/API/C/WKPage.cpp: (WKPageCopyRelatedPages): * UIProcess/API/C/WKPagePrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::relatedPages): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::pages): * UIProcess/WebProcessProxy.h: Added. This should work once a process has crashed, too. 2012-10-02 Anders Carlsson Allow LayerTreeHost subclasses to return a custom GraphicsLayerFactory https://bugs.webkit.org/show_bug.cgi?id=98179 Reviewed by Andreas Kling. Implement ChromeClient::graphicsLayerFactory and have it call the DrawingArea's graphicsLayerFactory which for DrawingAreaImpl then calls down to the layer tree host. Make LayerTreeCoordinator implement GraphicsLayerFactory and make it create CoordinatedGraphicsLayers. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::graphicsLayerFactory): (WebKit): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::createGraphicsLayer): (WebKit): (WebKit::LayerTreeCoordinator::graphicsLayerFactory): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/DrawingArea.h: (WebCore): (WebKit::DrawingArea::graphicsLayerFactory): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::graphicsLayerFactory): (WebKit): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (WebCore): (WebKit::LayerTreeHost::graphicsLayerFactory): (LayerTreeHost): 2012-10-01 Anders Carlsson Attempt to simplify IPC message dispatching logic in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=98097 Reviewed by Sam Weinig. Move the Connection::MessageReceiver class to its own header file. Add a MessageReceiverMap helper class that will be used for dispatching messages based on message class (and eventually destination ID). Convert AuthenticationManager and WebGeolocationManager over to this new mechanism. * CMakeLists.txt: * GNUmakefile.list.am: Add new files. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::dispatchMessage): Check with the message receiver map first before calling Connection::Client::didReceiveMessage. * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::addMessageReceiver): Call through to the message receiver map. * Platform/CoreIPC/MessageID.h: (CoreIPC::MessageID::messageClass): Rename MessageClassReserved to MessageClassInvalid. (MessageID): * Platform/CoreIPC/MessageReceiver.h: Move MessageReceiver from Connection.h to its own file. * Platform/CoreIPC/MessageReceiverMap.cpp: New helper class. (CoreIPC::MessageReceiverMap::addMessageReceiver): Add the receiver to the map of receivers. (CoreIPC::MessageReceiverMap::dispatchMessage): Check if we have any registered receivers for this message class. * Platform/CoreIPC/MessageReceiverMap.h: New file. * Target.pri: Add new files. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): * WebProcess/Authentication/AuthenticationManager.h: (AuthenticationManager): Register the authentication manager as a message receiver. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::WebGeolocationManager): * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): Register the geolocation manager as a message receiver. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): Remove checks for authentication manager and geolocation manager messages. * win/WebKit2.vcproj: Add new files. 2012-10-02 Carlos Garcia Campos [GTK] Programs/WebKit2APITests/TestCookieManager fails https://bugs.webkit.org/show_bug.cgi?id=98176 Reviewed by Martin Robinson. The problem is that the soup server has a g_assert_not_reached() for unknown paths, but know /favicon.icon might be requested. * UIProcess/API/gtk/tests/TestCookieManager.cpp: (serverCallback): Ignore unknown paths. 2012-10-02 Hugo Parente Lima [WK2] PageViewportControllerClient.h uses WebCore class without declaring them https://bugs.webkit.org/show_bug.cgi?id=98070 Reviewed by Kenneth Rohde Christiansen. This patch just add forward declarations for code correctness. * UIProcess/PageViewportControllerClient.h: (WebCore): 2012-10-02 Jocelyn Turcotte Fix tst_QQuickWebView::scrollRequest after r130029 https://bugs.webkit.org/show_bug.cgi?id=98045 Reviewed by Simon Hausmann. The test needs to show the window and wait for the loadVisuallyCommitted() signal like did in the QML API auto tests. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): * UIProcess/API/qt/tests/util.cpp: (waitForViewportReady): * UIProcess/API/qt/tests/util.h: 2012-10-02 Jinwoo Song [EFL][WK2] Use correct gtest macro for testing true/false https://bugs.webkit.org/show_bug.cgi?id=98142 Reviewed by Laszlo Gombos. Using EXPECT_EQ(true/false, ...) makes clang trip when it tries to convert true/false to a pointer. Tests should use EXPECT_TRUE/FALSE instead. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (showPopupMenu): (TEST_F): 2012-10-01 Brady Eidson Remove the Safari 2 -> Safari 3 icon database import code. https://bugs.webkit.org/show_bug.cgi?id=98113 Reviewed by Maciej Stachowiak. Nuke the performImport() IconDatabaseClient method. * UIProcess/WebIconDatabase.cpp: (WebKit): * UIProcess/WebIconDatabase.h: (WebIconDatabase): 2012-10-01 Christophe Dumez Fix compilation warnings https://bugs.webkit.org/show_bug.cgi?id=98020 Reviewed by Gyuyoung Kim. Fix compilation warnings related to ewk_view. * UIProcess/API/efl/ewk_view.cpp: (_ewk_view_feed_touch_event_using_touch_point_list_of_evas): (_ewk_view_on_touch_down): (_ewk_view_on_touch_up): (_ewk_view_on_touch_move): * UIProcess/API/efl/ewk_view_ui_client.cpp: (exceededDatabaseQuota): 2012-10-01 Claudio Saavedra [GTK][WK2] Save the download uri as file metadata https://bugs.webkit.org/show_bug.cgi?id=98043 Reviewed by Carlos Garcia Campos. gio/gvfs can store file metadata, let's use this to store the download uri. * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::DownloadClient::didReceiveResponse): Save the download uri as metadata. 2012-10-01 Andras Becsi [Qt][WK2] Device pixel ratio lost upon relaunch of the web process https://bugs.webkit.org/show_bug.cgi?id=97908 Reviewed by Jocelyn Turcotte. Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor when setting the device pixel ratio to make the setting permanent. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewExperimental::setDevicePixelRatio): 2012-09-27 Jocelyn Turcotte [Qt] Fix viewport QML auto tests after the viewport changes https://bugs.webkit.org/show_bug.cgi?id=97781 Reviewed by Simon Hausmann. Since the viewport controller has to hold any QML-side viewport updates while it applies and render the new requested position, this has the effect of blocking all those tests if the view is not visible (thus disabling the tile rendering completely in the web process). The viewport should be unlocked after the first rendered frame for static contents. Fix those tests by forcing the QQuickView to be visible and by making them wait for the first frame rather than the earlier end of provisional load. * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_wheelEventHandling.qml: * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: 2012-09-27 Jocelyn Turcotte [Qt] Add a loadVisuallyCommitted() signal https://bugs.webkit.org/show_bug.cgi?id=97780 Reviewed by Kenneth Rohde Christiansen. This signal is emitted when the first DidRenderFrame message is received from the web process after loadCommitted. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::setNeedsDisplay): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2012-09-27 Jocelyn Turcotte [Qt] Move Qt-only related methods from WebPageProxy.cpp to WebPageProxyQt.cpp Reviewed by Simon Hausmann. * UIProcess/WebPageProxy.cpp: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::didFindZoomableArea): (WebKit): (WebKit::WebPageProxy::findZoomableAreaForPoint): (WebKit::WebPageProxy::didReceiveMessageFromNavigatorQtObject): (WebKit::WebPageProxy::authenticationRequiredRequest): (WebKit::WebPageProxy::proxyAuthenticationRequiredRequest): (WebKit::WebPageProxy::certificateVerificationRequest): 2012-09-27 Jocelyn Turcotte [Qt] Decide when to apply a scrolled position to the viewport based on the rect covered by the tiles https://bugs.webkit.org/show_bug.cgi?id=97777 Reviewed by Kenneth Rohde Christiansen. This patch achieves two things: - Apply a short scroll position request directly if we already have rendered tiles at this position. - Since our visible rect request is asynchronous, the next frame might not always be the one covering this position. This will wait for a frame that does to apply it. * UIProcess/API/qt/raw/qrawwebview_p_p.h: (QRawWebViewPrivate::didRenderFrame): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::didRenderFrame): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/PageClient.h: (PageClient): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didCommitLoad): (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::pageDidRequestScroll): * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::didRenderFrame): * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::didRenderFrame): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (WebCore::CoordinatedGraphicsLayer::coverRect): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-09-27 Jocelyn Turcotte [Qt] Delay viewport position, scale and contents size updates until tiles are rendered https://bugs.webkit.org/show_bug.cgi?id=97775 Reviewed by Kenneth Rohde Christiansen. A few events from the web process can cause the viewport position or scale to be adjusted in the UI process: - Scroll position request - Viewport attributes (initialScale, minimumScale) - Contents size change We previously applied those updates directly to the viewport, which would then in turn produce a corresponding visible rect request to the web process to render the contents at the new position/scale. This could leave the viewport showing the old content, either by scaling the tiles, or by showing checkerboard if no contents was rendered at this position yet. When the web process was done rendering new tiles, the proper tiles were then shown to the user. Since many of these updates happen during page load, all producing an iterative adjustment to the viewport, this could show sharpness and position jitter until the final rendering was done. This patch makes those updates go through the PageViewportController first and then to the QQuickWebView rather than the other way around, and keep them pending until the LayerTreeHostProxy reports that the new tiles are ready to be shown. Since the rendering is blocked until the page first layout is done, this apply the modifications to the viewport only once when the first frame is ready to be shown. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewFlickablePrivate): * UIProcess/API/qt/raw/qrawwebview_p_p.h: (QRawWebViewPrivate::didRenderFrame): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::didRenderFrame): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/PageClient.h: (PageClient): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didCommitLoad): (WebKit::PageViewportController::didChangeContentsSize): (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::initialViewportReady): (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::resumeContent): (WebKit::PageViewportController::applyScaleAfterRenderingContents): (WebKit): (WebKit::PageViewportController::applyPositionAfterRenderingContents): (WebKit::PageViewportController::updateMinimumScaleToFit): * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/PageViewportControllerClient.h: (PageViewportControllerClient): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::didChangeContentsSize): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::didRenderFrame): (WebKit): (WebKit::QtPageClient::didChangeContentsSize): * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::didCommitLoad): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::didRenderFrame): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-09-27 Jocelyn Turcotte [Qt] Wait for the UI process before re-enabling rendering during page load https://bugs.webkit.org/show_bug.cgi?id=97773 Reviewed by Kenneth Rohde Christiansen. During page navigation, WebCore might ask asynchronously the UI process to scroll to an anchor or restored history position and the UI process will return the corresponding visible rect to be rendered by the web process. To avoid rendering tiles for the invalidated area by the new page layout at the wrong position, we should do an extra message round-trip to the UI process before resuming the rendering. Assuming that all messages are handled in order by both the web and UI process, sending the round-trip request in the web process once we sent all scroll requests, contents size and viewport attributes updates and then handling the round-trip response, we make sure that final visible rect request have been handled already. * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebViewPrivate::pageTransitionViewportReady): * UIProcess/API/qt/raw/qrawwebview_p_p.h: (QRawWebViewPrivate): * UIProcess/PageClient.h: (PageClient): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::pageTransitionViewportReady): (WebKit): * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::pageTransitionViewportReady): (WebKit): * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::commitPageTransitionViewport): (WebKit): (WebKit::WebPageProxy::pageTransitionViewportReady): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): (WebKit::WebFrameLoaderClient::dispatchDidLayout): (WebKit::WebFrameLoaderClient::frameLoadCompleted): (WebKit::WebFrameLoaderClient::provisionalLoadStarted): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didStartPageTransition): (WebKit): (WebKit::WebPage::didCompletePageTransition): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::commitPageTransitionViewport): (WebKit): 2012-10-01 Alberto Garcia WebPrintOperationGtk destructor should be virtual https://bugs.webkit.org/show_bug.cgi?id=98002 Reviewed by Carlos Garcia Campos. WebPrintOperationGtk is an abstract class which can be deleted using a pointer to itself, yet its destructor is not virtual. Fixes -Wdelete-non-virtual-dtor. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: (WebPrintOperationGtk): 2012-09-30 Mario Sanchez Prada [WK2][GTK] Add API to get the favicon for a WebKitWebView https://bugs.webkit.org/show_bug.cgi?id=96477 Reviewed by Carlos Garcia Campos. Provide a new simple API to synchronously try to get the favicon associated with a WebView, if any, and to keep track of changes on it, through a new GObject property. * UIProcess/API/gtk/WebKitWebView.cpp: (_WebKitWebViewPrivate): (webkitWebViewIconReadyCallback): Callback to handle the 'icon-ready' signal coming from WebKitFaviconDatabase. (webkitWebViewWatchForChangesInFavicon): Connects to the 'icon-ready' signal from WebKitFaviconDatabase, to keep track of changes in favicons, that must be related to the current view. (webkitWebViewDisconnectFaviconDatabaseSignalHandlers): Disconnects the handler for 'icon-ready' if needed. (webkitWebViewGetProperty): Updated for the new "favicon" property . (webkitWebViewFinalize): Disconnect the new signal handler. (webkit_web_view_class_init): Definition of the new property. (webkitWebViewEmitLoadChanged): Make sure we will be watching for changes in the favicon from WEBKIT_LOAD_STARTED on. (webkit_web_view_get_favicon): New API funtcion, returning the current favicon for the WebView, if any, or NULL otherwise. * UIProcess/API/gtk/WebKitWebView.h: Internally expose a way to try to get the favicon associated to a page URL synchronously, through WebKitFaviconDatabase. * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: (webkitFaviconDatabaseGetFaviconSync): New internal function, it will return either 0 or a valid pointer to a cairo_surface_t. * UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h: Add unit tests for checking this new API. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (testWebViewFavicon): New unit test. (beforeAll): Add the test to the test suite. 2012-09-30 Mario Sanchez Prada [WK2][GTK] Fix issues with WebKitFaviconDatabase in debug builds https://bugs.webkit.org/show_bug.cgi?id=97966 Reviewed by Carlos Garcia Campos. Fix failing ASSERTs detected when running the unit tests from TestWebKitFaviconDatabase in debug builds. * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: (webkitFaviconDatabaseDispose): Close IconDatabase here, which is the right place to do it according to GObject documentation. (webkitFaviconDatabaseFinalize): Just destroy the private data structure and chain up to parent class's finalize method. (webkit_favicon_database_class_init): Override dispose method. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (webkitFaviconDatabaseFinalizedCallback): Delete files when the WebKitFaviconDatabase is being finalized, since by that time the IconDatabase from WebCore will be already closed. (afterAll): Add a weak reference to WebKitFaviconDatabase and provide a GWeakNotify callback (webkitFaviconDatabaseFinalizedCallback). 2012-09-29 Byungwoo Lee [EFL] Fix build error : Link webkit2 library to ewk2UnitTestInjectedBundleSample. https://bugs.webkit.org/show_bug.cgi?id=97622 Reviewed by Gyuyoung Kim. There is no dependency between ewk2UnitTestInjectedBundleSample and webkit2 library. Because of this, on the first build, compiler tries to build injected_bundle_sample.cpp before the forwarding headers are created. This makes build error that the header file 'WebKit2/WKBaseSoup.h' cannot be found. To prevent this, webkit2 library is linked to ewk2UnitTestInjectedBundleSample. * PlatformEfl.cmake: 2012-09-28 Mariusz Grzegorczyk [WK2][GTK][EFL] Share WebKit2-GTK plugin process implementation with EFL port https://bugs.webkit.org/show_bug.cgi?id=91844 Reviewed by Simon Hausmann. Implement windowless plugin and functions needed to launch PluginProcess. * GNUmakefile.am: Change files and folders related to plugin process from gtk to unix. * GNUmakefile.list.am: Change files and folders related to plugin process from gtk to unix. * Platform/Logging.cpp: Add Plugins channel for LOG. (WebKit): (WebKit::getChannelFromName): (WebKit::initializeLogChannelsIfNecessary): * Platform/Logging.h: (WebKit): * PlatformEfl.cmake: Add files needed by plugin process. * PluginProcess/unix/PluginControllerProxyUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginControllerProxyGtk.cpp. (WebKit): (WebKit::PluginControllerProxy::platformInitialize): Add macros for gtk/efl differents. (WebKit::PluginControllerProxy::platformDestroy): (WebKit::PluginControllerProxy::platformGeometryDidChange): * PluginProcess/unix/PluginProcessMainUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.cpp. (WebKit): (WebKit::webkitXError): (WebKit::PluginProcessMainUnix): * PluginProcess/unix/PluginProcessMainUnix.h: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessMainGtk.h. (WebKit): * PluginProcess/unix/PluginProcessUnix.cpp: Renamed from Source/WebKit2/PluginProcess/gtk/PluginProcessGtk.cpp. (WebKit): (WebKit::PluginProcess::platformInitialize): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp. (WebKit): (WebKit::PluginProcessProxy::platformInitializePluginProcess): (WebKit::PluginProcessProxy::scanPlugin): * UIProcess/efl/WebPageProxyEfl.cpp: Add stubs. (WebKit::WebPageProxy::createPluginContainer): (WebKit): (WebKit::WebPageProxy::windowedPluginGeometryDidChange): * WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp: Renamed from Source/WebKit2/WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp. (WebKit): (WebKit::PluginProxy::needsBackingStore): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Plugin's windowless implementation. (WebKit::getPluginDisplay): (WebKit::x11Screen): (WebKit::displayDepth): (WebKit::rootWindowID): (WebKit::NetscapePlugin::x11HostDisplay): (WebKit::NetscapePlugin::platformPaint): * config.h: * unix/PluginMainUnix.cpp: Renamed from Source/WebKit2/gtk/PluginMainGtk.cpp. (main): 2012-09-28 Anders Carlsson Remove Java bridge https://bugs.webkit.org/show_bug.cgi?id=97954 Reviewed by Sam Weinig. The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): 2012-09-28 Dan Bernstein WebKit2 lacks API for disabling document.cookie like -[WebView _setCookieEnabled:] https://bugs.webkit.org/show_bug.cgi?id=97939 Reviewed by Sam Weinig. * Shared/WebPreferencesStore.h: (WebKit): Defined CookieEnabled key with a default value of true. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCookieEnabled): Added this setter. (WKPreferencesGetCookieEnabled): Added this getter. * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Added a call to Settings::setCookieEnabled to push the preference into Settings. 2012-09-28 Sam Weinig Fix pluralization of Info.plist key. Rubber-stamped by Anders Carlsson. * WebProcessService/Info.plist: * WebProcessServiceForWebKitDevelopment/Info.plist: It's _MultipleInstances, not _MultipleInstance. :( 2012-09-28 Anders Carlsson Pass the correct path length to _NSGetExecutablePath https://bugs.webkit.org/show_bug.cgi?id=97935 Reviewed by Sam Weinig. * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: (WebProcessServiceForWebKitDevelopmentEventHandler): Initialize pathLength before passing it to _NSGetExecutablePath. 2012-09-28 Alberto Garcia WebKitLoaderClient: add missing initializer. https://bugs.webkit.org/show_bug.cgi?id=97930 Reviewed by Martin Robinson. WKPageLoaderClient is missing the initializer for the didLayout field. Fixes -Wmissing-field-initializers. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): 2012-09-28 Mikhail Pozdnyakov Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports https://bugs.webkit.org/show_bug.cgi?id=97547 Reviewed by Adam Barth. Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used inside WebKit::WebPageProxy::canShowMIMEType() and WKBundlePageCanShowMIMEType(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::canShowMIMEType): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCanShowMIMEType): 2012-09-28 Byungwoo Lee [EFL][WK2] {Vibration,Battery,NetworkInfo}Provider should contain WKContextRef instead of proxy. https://bugs.webkit.org/show_bug.cgi?id=97839 Reviewed by Kenneth Rohde Christiansen. VibrationProvider has WKRetainPtr m_wkVibrationRef which has reference for object WebVibrationProxy. The WebVibrationProxy instance is a member of WebContext who has it as RefPtr. A member of one class is shared with another class, but there is no relation between the two classes. This can become a problem when WebContext is deleted before the VibrationProvider, WebVibrationProxy will be alive without WebContext, because VibrationProvider also has the reference for WebVibrationProxy. This is a problem because WebVibrationProxy should be a member of WebContext. To prevent this, I changed the VibrationProvider to have WKRetainPtr instead of WKRetainPtr. Same for BatteryProvider and NetworkInfoProvider. * UIProcess/API/efl/BatteryProvider.cpp: (BatteryProvider::create): (BatteryProvider::BatteryProvider): (BatteryProvider::didChangeBatteryStatus): * UIProcess/API/efl/BatteryProvider.h: (BatteryProvider): * UIProcess/API/efl/NetworkInfoProvider.cpp: (NetworkInfoProvider::create): (NetworkInfoProvider::NetworkInfoProvider): * UIProcess/API/efl/NetworkInfoProvider.h: (NetworkInfoProvider): * UIProcess/API/efl/VibrationProvider.cpp: (VibrationProvider::create): (VibrationProvider::VibrationProvider): * UIProcess/API/efl/VibrationProvider.h: (VibrationProvider): * UIProcess/API/efl/ewk_context.cpp: (_Ewk_Context::_Ewk_Context): 2012-09-28 Mario Sanchez Prada [WK2][GTK] Implement new Favicons API https://bugs.webkit.org/show_bug.cgi?id=96476 Reviewed by Carlos Garcia Campos. New object wrapping the internal IconDatabase from WebCore, providing a simple asynchronous API to retrieve the favicon associated to a page URL, and two more functions to simple query the internal database for the URI of the icon associated to a page, if any, and to clear the state of the internal database. * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Added. (_WebKitFaviconDatabasePrivate): (webkit_favicon_database_init): (webkitFaviconDatabaseFinalize): (webkit_favicon_database_class_init): (GetFaviconSurfaceAsyncData): New structure used to pass data across the asynchronous implementation of get_favicon(). (GetFaviconSurfaceAsyncData::~GetFaviconSurfaceAsyncData): Disconnects the cancellable if needed. (getIconSurfaceSynchronously): Synchronously returns a pointer to the cairo_surface with the icon's data, if available. (deletePendingIconRequests): Removes the full list of icon requests for a page URL. (processPendingIconsForURI): Process any icon request that might be still pending. (iconDataReadyForPageURLCallback): Called from WebIconDatabase when new data is ready for a favicon. (webkitFaviconDatabaseCreate): Create the WebKitFaviconDatabase object and initializes the API client for WKIconDatabaseClient. (getOrCreatePendingIconRequests): Returns (if available) or creates a new icon request, to be appended to the list of requests for the same page URL. (getIconSurfaceCancelled): Handle the case of a request being cancelled. Must happen on the main thread. (getIconSurfaceCancelledCallback): Callback used with g_cancellable_connect(), which ensure getIconSurfaceCancelled() is called from the main thread. (setErrorForAsyncResult): Helper to set errors in the result. (webkit_favicon_database_error_quark): New function, providint the new error domain for errors of type WebKitFaviconDatabaseError. (webkit_favicon_database_get_favicon): New API function, providing an asynchronous mechanism to query the favicon for a page URL. (webkit_favicon_database_get_favicon_finish): New API function to finish the asyncrhonous request started with get_favicon(). (webkit_favicon_database_get_favicon_uri): New API function to easily retrieve, if available, the URI of a favicon. (webkit_favicon_database_clear): New API function to clear the state of the internal icon database. * UIProcess/API/gtk/WebKitFaviconDatabase.h: Added. (_WebKitFaviconDatabase): (_WebKitFaviconDatabaseClass): * UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h: Added to internally expose webkitFaviconDatabaseCreate() to WebKitWebContext. * UIProcess/API/gtk/WebKitPrivate.h: Import WebKit2/WKIconDatabase.h. * GNUmakefile.list.am: Added new files. Add a new getter in WebIconDatabase for m_urlImportCompleted. * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::isUrlImportCompleted): Added this simple getter to allow knowing from WebKitFaviconDatabase whether the initial import has finished, needed for making some decisions. (WebKit): * UIProcess/WebIconDatabase.h: (WebIconDatabase): New API in WebKitWebContext to allow obtaining a valid instance of WebKitFaviconDatabase and to set/get the local path to be used. * UIProcess/API/gtk/WebKitWebContext.cpp: (_WebKitWebContextPrivate): (webkit_web_context_set_favicon_database_path): New API to allow setting a path for the icon database, other than the default one. (webkit_web_context_get_favicon_database_path): New API to retrieve the path for the icon database currently in use. (webkit_web_context_get_favicon_database): New API to get a valid and properly initialized instance of WebKitFaviconDatabase. * UIProcess/API/gtk/WebKitWebContext.h: Make sure we have a default path set for the icon database. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformDefaultIconDatabasePath): Return the default path to be used for the icon database. Add unit tests for checking this new API. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: Added. (serverCallback): Callback for the test server. (testSetDirectory): New unit test, checks the ability to set and get a specific directory path for the icon database. (testClearDatabase): New unit test, checks the ability to clear the data in the icon database. (testGetFavicon): New unit test, checks the ability to get a favicon from the icon database in different situations. (testGetFaviconURI): New unit test, checks the ability to retrieve the URI for the favicon, if any, associated to a web page. (deleteDatabaseFiles): Helper function to remove temporary files. (beforeAll): Initialize the test server and add the unit tests. (afterAll): Delete the test server and clean up. 2012-09-28 Raphael Kubo da Costa [EFL] Unreviewed test fixes after r129892. * UIProcess/API/efl/tests/test_ewk2_context.cpp: (TEST_F): Fix a copy&paste error that changed the test expectations. * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: (TEST_F): Revert the change here since it was already in the right format before. 2012-09-28 Jinwoo Song [EFL][WK2] Some expected and actual parameters in unit tests are reversed https://bugs.webkit.org/show_bug.cgi?id=97624 Reviewed by Laszlo Gombos. According to the gtest guide, ASSERT_XXX, EXPECT_XXX(expected, actual) are recommended but some unit tests do not follow this.(http://code.google.com/p/googletest/wiki/Primer) Google Test's failure messages are optimized for this convention. * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_context.cpp: (schemeRequestCallback): (TEST_F): * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: (on_download_requested): (on_download_finished): * UIProcess/API/efl/tests/test_ewk2_intents.cpp: (onIntentServiceRegistration): (onIntentReceived): (TEST_F): * UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): (onFormAboutToBeSubmitted): (checkBasicPopupMenuItem): (showPopupMenu): (showColorPicker): 2012-09-28 Balazs Kelemen [Qt] QRawWebView tests are broke after r129545 https://bugs.webkit.org/show_bug.cgi?id=97907 Reviewed by Noam Rosenthal. The issue here is that we set up the page loader client before initializing the page so the message we send in WebPageProxy::initializeLoaderClient will be lost since the page does not exists at the web process side yet. The trivial fix would be to reorder initialization. In this patch I also moved to the new model of observing layout changes via WKPageDidLayoutCallback since the old one will be deprecated at some time. * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: (WebView::WebView): (WebView::didLayout): 2012-09-28 Gyuyoung Kim Unreviewed, rolling out r129863. http://trac.webkit.org/changeset/129863 https://bugs.webkit.org/show_bug.cgi?id=97173 Broken debug WK2 layout test * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/ewk_context.cpp: (_Ewk_Context::_Ewk_Context): (_Ewk_Context::~_Ewk_Context): * UIProcess/API/efl/ewk_main.cpp: (ewk_init): (ewk_shutdown): * UIProcess/API/efl/ewk_main.h: Added. * UIProcess/API/efl/ewk_main_private.h: Removed. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::SetUp): (EWK2UnitTest::EWK2UnitTestBase::TearDown): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): 2012-09-28 Christophe Dumez [EFL][WK2] exceededDatabaseQuota event is not handled https://bugs.webkit.org/show_bug.cgi?id=97882 Reviewed by Kenneth Rohde Christiansen. Handle exceededDatabaseQuota callback from WKPageUIClient so that we let the browser a chance to decide what to do when the database quota is reached. If the browser does not handle this, then we return a realistic default quota (5MB as recommended by the spec). * UIProcess/API/efl/ewk_view.cpp: (ewk_view_database_quota_exceeded): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_view_ui_client.cpp: (exceededDatabaseQuota): (ewk_view_ui_client_attach): 2012-09-28 Kai Koehne [Qt] Use qInstallMessageHandler() https://bugs.webkit.org/show_bug.cgi?id=96648 Reviewed by Jocelyn Turcotte. qInstallMsgHandler() got deprecated in Qt 5. * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::messageHandler): (WebKit::PluginProcessMain): * UIProcess/API/qt/tests/util.cpp: (messageHandler): (suppressDebugOutput): * qt/MainQt.cpp: (messageHandler): (main): 2012-09-28 Byungwoo Lee [EFL][WK2] Clear provider on destructor of {Vibration,Battery,NetworkInfo}Provider. https://bugs.webkit.org/show_bug.cgi?id=97528 Reviewed by Kenneth Rohde Christiansen. Constructor of {Vibration,Battery,NetworkInfo}Provider set provider but the destructor of the classes doesn't clear provider. This can make a problem about accessing dangling pointer. For preventing this problem, clear provider on destructor. * UIProcess/API/efl/BatteryProvider.cpp: (BatteryProvider::~BatteryProvider): * UIProcess/API/efl/NetworkInfoProvider.cpp: (NetworkInfoProvider::~NetworkInfoProvider): * UIProcess/API/efl/VibrationProvider.cpp: (VibrationProvider::~VibrationProvider): 2012-09-28 Christophe Dumez [EFL][WK2] NetworkInfo provider is not initialized in Ewk_Context https://bugs.webkit.org/show_bug.cgi?id=97865 Reviewed by Kenneth Rohde Christiansen. Initialize NetworkInfo provider for EFL port in Ewk_Context with the other providers. * UIProcess/API/efl/ewk_context.cpp: (_Ewk_Context): (_Ewk_Context::_Ewk_Context): 2012-09-28 Eunmi Lee [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries. https://bugs.webkit.org/show_bug.cgi?id=97173 Reviewed by Gyuyoung Kim. Initialize and shutdown the EFL libraries in the ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web process. Additionally, initialization and shutdown are done when ewk_context is created and deleted, so ewk_{init,shutdown} APIs are changed to internal function and applications don't have to call them. * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/ewk_context.cpp: (_Ewk_Context::_Ewk_Context): (_Ewk_Context::~_Ewk_Context): * UIProcess/API/efl/ewk_main.cpp: (ewk_init): (ewk_shutdown): * UIProcess/API/efl/ewk_main.h: Removed. * UIProcess/API/efl/ewk_main_private.h: Added. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::SetUp): (EWK2UnitTest::EWK2UnitTestBase::TearDown): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): 2012-09-27 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=97823 Need to bump the WKBundlePageLoaderClient version after the addition of didLayout Reviewed by Brady Eidson. Bump the version. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 2012-09-27 Helder Correia [Cairo] Unnecessary creation of ShareableBitmap's for directly composited images https://bugs.webkit.org/show_bug.cgi?id=97745 Reviewed by Martin Robinson. In LayerTreeCoordinator::adoptImageBackingStore(), there is a PLATFORM(QT) code path to check for identical images, but nothing is done for Cairo, which results in the occurrence of avoidable resource allocations. The issue happens in e.g. http://www.webkit.org/blog-files/leaves/, where there are many leaves flying around while they're produced out of only four bitmaps. This patch uses pointers to cairo_surface_t's as the key to the hashmap that caches bitmaps. This can be safely done since we own the references. We artificially increment the surface references in adoptImageBackingStore() and decrement them in releaseImageBackingStore(). * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::adoptImageBackingStore): (WebKit::LayerTreeCoordinator::releaseImageBackingStore): 2012-09-27 Anders Carlsson Stop using dispatch_get_current_queue https://bugs.webkit.org/show_bug.cgi?id=97806 Reviewed by Mark Rowe. * Platform/mac/WorkQueueMac.cpp: (WorkQueueAndFunction::WorkQueueAndFunction): (WorkQueueAndFunction): (WorkQueue::executeFunction): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): Keep track of the associated work queue so we can get it in WorkQueue::executeFunction. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::setUpTerminationNotificationHandler): We don't care about which queue the termination notification is delivered on since we only want to call waitpid on the child pid so we can just use a global queue. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Use dispatch_get_main_queue here. 2012-09-27 Mario Sanchez Prada [WK2] IconDatabase: Add a way to notify when icon data is available https://bugs.webkit.org/show_bug.cgi?id=63945 Rubber stamped by Anders Carlsson. Update version of WKIconDatabaseClient and API traits. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * UIProcess/API/C/WKIconDatabase.h: 2012-09-27 Balazs Kelemen [Qt][WK2] REGRESSION(r128980): It broke all QRawWebView API test https://bugs.webkit.org/show_bug.cgi?id=97561 Reviewed by Noam Rosenthal. Make sure we always send the very first RenderNextFrame message. Before r128980 it was working accidentally because in the common case the web process sent a DeleteCompositingLayer message at some point before the forced repaint would time out and we was sending the first RenderNextFrame when reacting to that. * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebView::setActive): Set the LayerTreeRenderer to active as well. In the QQuickWebView case it is handled by the QtWebPageSGNode. (QRawWebView::layerTreeRenderer): Added a convenience getter for the LayerTreeRenderer. (QRawWebView::paint): * UIProcess/API/qt/raw/qrawwebview_p.h: (WebKit): * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: (tst_qrawwebview::tst_qrawwebview): Added a call to addQtWebProcessToPath to make my and the follower users of this test easier. 2012-09-27 Eunmi Lee [EFL][WK2] Process touch events using mouse and multi events of Evas. https://bugs.webkit.org/show_bug.cgi?id=96906 Reviewed by Kenneth Rohde Christiansen. Provide default behavior for processing touch events in the ewk_view if application wants to use it. We can to process touch events using mouse and multi events because the Evas creates mouse events for first touch and multi events for second and third touch. It can be modified when Evas starts to support event type for touch events. * UIProcess/API/efl/ewk_view.cpp: (_Ewk_View_Private_Data): (_Ewk_View_Private_Data::_Ewk_View_Private_Data): (_ewk_view_feed_touch_event_using_touch_point_list_of_evas): (_ewk_view_on_touch_down): (_ewk_view_on_touch_up): (_ewk_view_on_touch_move): (ewk_view_touch_events_enabled_set): (ewk_view_touch_events_enabled_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::mouseDown): (EWK2UnitTest): (EWK2UnitTest::EWK2UnitTestBase::mouseUp): (EWK2UnitTest::EWK2UnitTestBase::mouseMove): (EWK2UnitTest::EWK2UnitTestBase::multiDown): (EWK2UnitTest::EWK2UnitTestBase::multiUp): (EWK2UnitTest::EWK2UnitTestBase::multiMove): * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTestBase): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-27 Jinwoo Song [EFL][WK2] Add callback functions for WKPageFindClient https://bugs.webkit.org/show_bug.cgi?id=97431 Reviewed by Laszlo Gombos. Add didFailToFindString() and didCountStringMatches() for WKPageFindClient's callback functions. The unit test for didFindString() and didFailToFindString() have beend added. The unit test for didCountStringMatches() needs a API which wraps the WKPageCountStringMatches but it is not exists yet. Additionaly, I changed the 'unsinged int' to 'unsigned' in the parameter type and removed unnecessary type conversion. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_text_find): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_find_client.cpp: (didFindString): (didFailToFindString): (didCountStringMatches): (ewk_view_find_client_attach): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (onTextFound): (TEST_F): 2012-09-27 Allan Sandfeld Jensen Unify event handling of middle mouse button. https://bugs.webkit.org/show_bug.cgi?id=97690 Reviewed by Tony Chang. Remove Qt and GTK port specific handling of middle mouse button press. * WebProcess/WebPage/WebPage.cpp: (WebKit::handleMouseEvent): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit): * WebProcess/WebPage/qt/WebPageQt.cpp: 2012-09-27 Mikhail Pozdnyakov [WK2] Injected bundle API implementation should use toWTFString() https://bugs.webkit.org/show_bug.cgi?id=97766 Reviewed by Kenneth Rohde Christiansen. Injected bundle API implementation should call toWTFString() rather than convert WKStringRef and WKURLRef to their impls and then call string() method directly. The rational for that are both safety (toWTFString checks the given pointer) and code readability. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundlePostMessage): (WKBundlePostSynchronousMessage): (WKBundleOverrideBoolPreferenceForTestRunner): (WKBundleAddOriginAccessWhitelistEntry): (WKBundleRemoveOriginAccessWhitelistEntry): (WKBundleClearApplicationCacheForOrigin): (WKBundleGetAppCacheUsageForOrigin): (WKBundleSetApplicationCacheOriginQuota): (WKBundleResetApplicationCacheOriginQuota): (WKBundlePageNumberForElementById): (WKBundleSetUserStyleSheetLocation): (WKBundleSetWebNotificationPermission): * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFramePauseAnimationOnElementWithId): (WKBundleFramePauseTransitionOnElementWithId): (WKBundleFrameAllowsFollowingLink): (WKBundleFrameCopySuggestedFilenameForResourceWithURL): (WKBundleFrameCopyMIMETypeForResourceWithURL): (WKBundleFrameSetTextDirection): * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: (WKBundleInspectorEvaluateScriptForTest): * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp: (WKBundleIntentCreate): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageExecuteEditingCommand): (WKBundlePageIsEditingCommandEnabled): (WKBundlePageHasLocalDataForURL): (WKBundlePageFindString): (WKBundlePageSetComposition): (WKBundlePageConfirmCompositionWithText): (WKBundlePageCanShowMIMEType): 2012-09-27 Mario Sanchez Prada [WK2] IconDatabase: Add a way to notify when icon data is available https://bugs.webkit.org/show_bug.cgi?id=63945 Reviewed by Anders Carlsson. Provide new API to notify the API layer when icon data is available, and use it from the implementation layer when needed, that is, either when the data has been loaded from the network or imported from disk. Added new callback to WKIconDatabaseClient API. * UIProcess/API/C/WKIconDatabase.h: Added new callback. * UIProcess/WebIconDatabaseClient.cpp: (WebKit::WebIconDatabaseClient::iconDataReadyForPageURL): Implementation of the new callback at this level in the UI process, by using its implementation in the API layer if present. * UIProcess/WebIconDatabaseClient.h: (WebIconDatabaseClient): Added new callback. Implemented WebFrameLoaderClient::dispatchDidReceiveIcon, so we get notified in the UI process when loading a new icon. * UIProcess/WebIconDatabase.messages.in: Added new message to notify the UI process: DidReceiveIconForPageURL. * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL): New private helper function to notify the API layer both that new icon data is ready and that the icon has changed. (WebKit::WebIconDatabase::didReceiveIconForPageURL): Implementation of the new message added, by calling notifyIconDataReadyForPageURL() to notify the API layer. (WebKit::WebIconDatabase::didImportIconDataForPageURL): Call notifyIconDataReadyForPageURL() from here as well. * UIProcess/WebIconDatabase.h: Added new prototypes. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): Send a message to the UI process telling a new icon has been received. 2012-09-26 Sam Weinig Fix XPCServices symlink to not be to an absolute path in the build products directory. Reviewed by Dan Bernstein. * WebKit2.xcodeproj/project.pbxproj: 2012-09-26 Anders Carlsson Stop using CFURLCreateDataAndPropertiesFromResource https://bugs.webkit.org/show_bug.cgi?id=97728 Reviewed by Tim Horton. Replace a call to CFURLCreateDataAndPropertiesFromResource with -[NSData initWithContentsOfURL:] and add the necessary casts to make the compiler happy. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::contentsOfPropertyListAtURL): 2012-09-26 Alexey Proskuryakov [WK2] Update WebPageProxy::reattachToWebProcess() for multi-web process mode https://bugs.webkit.org/show_bug.cgi?id=97726 Reviewed by Anders Carlsson. * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureSharedWebProcess): createNewWebProcess() now takes care of adding the new process to m_processes. (WebKit::WebContext::createNewWebProcess): Every time we call this function, we need to add the result to m_processes. Better do it internally to avoid mistakes. (WebKit::WebContext::warmInitialProcess): Updated for the above. (WebKit::WebContext::createWebPage): Ditto. (WebKit::WebContext::relaunchProcessIfNecessary): This function makes no sense in multi-web process mode. Assert that we didnt get here accidentally. * UIProcess/WebContext.h: (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary): Only call relaunchProcessIfNecessary in single process mode. The functionality that needs this behavior will be greatly refactored for multi-web process. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): We already know that we need a new process, "relaunch if necessary" is not the right logic. Also added a few more assertions checking that process state is as expected. * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Removed relaunchProcessIfNecessary(). It will be called inside sendToAllProcessesRelaunchingThemIfNecessary(). * UIProcess/Plugins/WebPluginSiteDataManager.cpp: (WebKit::WebPluginSiteDataManager::getSitesWithData): Ditto. (WebKit::WebPluginSiteDataManager::clearSiteData): Ditto. 2012-09-26 Carlos Garcia Campos [GTK] Don't use the C API internally in WebKitJavascriptResult https://bugs.webkit.org/show_bug.cgi?id=96780 Reviewed by Gustavo Noronha Silva. Using the C++ classes directly instead of the C API wrappers we avoid a lot of toImpl/toAPI casts, string conversions and allocations. The code is also a lot simpler and easier to read. * UIProcess/API/gtk/WebKitJavascriptResult.cpp: (_WebKitJavascriptResult::_WebKitJavascriptResult): (webkitJavascriptResultCreate): * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewRunJavaScriptCallback): 2012-09-26 Mikhail Pozdnyakov [WK2][WTR] Policy client: dumping from decidePolicyForResponse callback https://bugs.webkit.org/show_bug.cgi?id=97034 Reviewed by Kenneth Rohde Christiansen. Added suggested filename getter to WKURLResponse interface and also added a property showing whether the response is attachment. * Shared/API/c/WKURLResponse.cpp: (WKURLResponseSuggestedFilename): (WKURLResponseIsAttachment): * Shared/API/c/WKURLResponse.h: 2012-09-26 Martin Robinson [GTK] Use XDamage to simplify RedirectedXCompositeWindow https://bugs.webkit.org/show_bug.cgi?id=97267 Reviewed by Alejandro G. Castro. Use XDamage to queue redraws of the widget when redirecting accelerated compositing to an offscreen window. This allows removing a finicky timer-based approach, improves performance, and allows simplifying things greatly. * GNUmakefile.am: Add the XDamage CFLAGS and LIBS to the appropriate places. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate): Remove readyToRenderAcceleratedCompositingResults as it's no longer necessary. (webkit_web_view_base_init): Handle the situation where the RedirectedXCompositeWindow is null. (webkitWebViewRenderAcceleratedCompositingResults): Ditto. (resizeWebKitWebViewBaseFromAllocation): Ditto. (webkitWebViewBaseCreateWebPage): Ditto. (redirectedWindowDamagedCallback): Added. * UIProcess/WebPageProxy.h: Remove InvalidateWidget message. * UIProcess/WebPageProxy.messages.in: Ditto. * UIProcess/gtk/WebPageProxyGtk.cpp: Ditto. * WebProcess/WebPage/WebPage.h: Ditto. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::compositeLayersToContext): No longer need to trigger the invalidateWindow message. * WebProcess/WebPage/gtk/WebPageGtk.cpp: Ditto. 2012-09-25 Raphael Kubo da Costa [DRT][WTR] Support overriding the 'WebKitDisplayImagesKey' preference https://bugs.webkit.org/show_bug.cgi?id=96883 Reviewed by Kenneth Rohde Christiansen. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add support for changing WebPreferencesKey::loadsImagesAutomaticallyKey(). 2012-09-25 Dan Bernstein Try to fix non-Mac builds. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-09-25 Dan Bernstein WebKit2 part of [mac] Stop using screen fonts https://bugs.webkit.org/show_bug.cgi?id=97620 Reviewed by John Sullivan. * Shared/WebPreferencesStore.h: (WebKit): Changed the default value of the screenFontSubstitutionEnabled preference to false. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Added an initializer for the new shouldForceScreenFontSubstitution data member. (WebKit::WebProcessCreationParameters::encode): Added encoding of shouldForceScreenFontSubstitution. (WebKit::WebProcessCreationParameters::decode): Added decoding of shouldForceScreenFontSubstitution. * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): Added shouldForceScreenFontSubstitution boolean data member. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Added code to set shouldForceScreenFontSubstitution in the process creation parameters to the value of the NSFontDefaultScreenFontSubstitutionEnabled user defaults key. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Changed to enable screen font substitution also if shouldForceScreenFontSubstitution() is true. * WebProcess/WebProcess.h: (WebKit::WebProcess::shouldForceScreenFontSubstitution): Added this getter. (WebProcess): Added m_shouldForceScreenFontSubstitution boolean data member. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Added initialization of m_shouldForceScreenFontSubstitution from the creation parameters. 2012-09-25 Alexey Proskuryakov Get rid of WebContext::m_pendingMessagesToPostToInjectedBundle https://bugs.webkit.org/show_bug.cgi?id=94368 Reviewed by Anders Carlsson. It doesn't appear to be of any use. * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): (WebKit::WebContext::postMessageToInjectedBundle): * UIProcess/WebContext.h: 2012-09-24 Simon Fraser Have DumpRenderTree and WebKitTestRunner crash logs show which test crashed Reviewed by Mark Rowe. Use a new WebKitSytemInterface function to add data to crash logs about which test was running when the crash happened. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Hook up the function pointer for [wk|WK]SetCrashReportApplicationSpecificInformation. 2012-09-25 Beth Dakin Build fix. I removed this function as a part of https://bugs.webkit.org/show_bug.cgi?id=95397 but it is still needed for nightlies and open source builds. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetPaintedObjectsCounterThreshold): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2012-09-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=95397 Need to merge didFirstVisuallyNonEmptyLayout and didNewFirstVisuallyNonEmptyLayout -and corresponding- Reviewed by Sam Weinig. The new API has two parts. First, the client has to opt into which layout milestones they are interested in hearing about using WKPageListenForLayoutMilestones or WKBundlePageListenForLayoutMilestones(). Then, WebKit will call the didLayout(WKLayoutMilestones) callback on the appropriate clients when the specified layout milestones have fired. didLayout takes the WKLayoutMilestones bit mask, which will indicate which milestones have fired since it is possible for two to fire at the same time. Define WKLayoutMilestoneOptions. * Shared/API/c/WKPageLoadTypes.h: Define conversions between WKLayoutMilestoneOptions and WebCore::LayoutMilestoneOptions * Shared/API/c/WKSharedAPICast.h: (WebKit::toWKLayoutMilestoneOptions): (WebKit): (WebKit::toLayoutMilestoneOptions): New API. * UIProcess/API/C/WKPage.cpp: (WKPageListenForLayoutMilestones): * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::didLayout): (WebKit): * UIProcess/WebLoaderClient.h: (WebLoaderClient): didFirstLayoutForFrame, didFirstVisuallyNonEmptyLayoutForFrame, and didNewFirstVisuallyNonEmptyLayout are now implemented with didLayout under the hood. So if those old callbacks have been defined, be sure to add the appropriate layout milestones here for backwards-compatibility. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeLoaderClient): New API. (WebKit::WebPageProxy::listenForLayoutMilestones): (WebKit): (WebKit::WebPageProxy::didLayout): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: New API. And remove the now-unnecessary WKBundlePageSetPaintedObjectsCounterThreshold. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageListenForLayoutMilestones): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: New API. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): (WebKit): (WebKit::InjectedBundlePageLoaderClient::didLayout): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): Remove dispatchDidFirstLayout, dispatchDidFirstVisuallyNonEmptyLayout, and dispatchDidNewFirstVisuallyNonEmptyLayout. They are now replaced by dispatchDidLayout(LayoutMilestoneOptions) * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidLayout): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): didFirstLayoutForFrame, didFirstVisuallyNonEmptyLayoutForFrame, and didNewFirstVisuallyNonEmptyLayout are now implemented with didLayout under the hood. So if those old callbacks have been defined, be sure to add the appropriate layout milestones here for backwards-compatibility. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::initializeInjectedBundleLoaderClient): (WebKit): Call into WebCore to set the layout milestones. (WebKit::WebPage::listenForLayoutMilestones): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: Account for the new member of PageLoadClient. * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-09-25 Carlos Garcia Campos [GTK][EFL] Disk cache is never dumped to disk in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=97583 Reviewed by Martin Robinson. The problem is that WebProcess::platformTerminate(), where the cache is currently dumped, is not called when the web process finishes because the UI process closes the connection. The cache is created and loaded in the main() so it can also be flushed and dumped there, so that we also make sure it's always called when the process finishes normally when the main loop quits. * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): Flush and dump the disk cache when the main loop returns. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): Ditto. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformTerminate): Do not flush and dump the disk cache. 2012-09-25 Benjamin Poulain Add missing support for Geolocation tests on WebKit2 https://bugs.webkit.org/show_bug.cgi?id=97518 Reviewed by Sam Weinig. The existing API for reporting error does not support passing and error message. The interface UIProcess<->WebProcess is changed to take an error message, the existing API now pass a null String, and the new function WKGeolocationManagerProviderDidFailToDeterminePositionWithErrorMessage() provide the extended support with error message. * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerProviderDidFailToDeterminePositionWithErrorMessage): * UIProcess/API/C/WKGeolocationManager.h: * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition): * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didFailToDeterminePosition): * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): * WebProcess/Geolocation/WebGeolocationManager.messages.in: 2012-09-25 Akash Vaswani Crash after clicking in plugin at kauaiexplorer.com and https://bugs.webkit.org/show_bug.cgi?id=90925 Reviewed by Sam Weinig. Bug: Clicking the plugin to navigate away from the page caused the browser to crash. This is because it is possible for a beforeunload handler to destroy the plugin while it is still needed. In this case the handler set visibility to "none" and then accessed a property on the plugin script object. This forced a layout that destroyed the plugin. Fix: Protecting PluginView objects until they are no longer required. This was done by adding a RefPtr at the beginning of performURLRequest() * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performURLRequest): 2012-09-25 Carlos Garcia Campos [GTK] Don't kill automatically the web process when the ui process finishes https://bugs.webkit.org/show_bug.cgi?id=97580 Reviewed by Martin Robinson. We use prctl(PR_SET_PDEATHSIG, SIGKILL); in linux to make sure the web process is killed when the UI process finishes. This is not needed any more since now the web process stops the main loop when the connection with the UI process is closed in WebProcess::didClose(). This approach is better because it works for any platform and makes the web process finish normally from main(). * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childSetupFunction): Don't call prctl(PR_SET_PDEATHSIG, SIGKILL) in the child process. 2012-09-25 Benjamin Poulain Build fix, GeolocationClientMock should not be included by WebProcess InjectedBundle Unreviewed. The patch r129252 removes the dependencies on GeolocationClientMock, r129444 removes GeolocationClientMock from the Mac port. The #include breaks new Mac build. * WebProcess/InjectedBundle/InjectedBundle.cpp: 2012-09-25 Jocelyn Turcotte [Qt] PageViewportController: Consolidate positionRangeForViewportAtScale and boundPosition https://bugs.webkit.org/show_bug.cgi?id=97222 Reviewed by Kenneth Rohde Christiansen. Those methods are used together everywhere, merge them into a single clampViewportToContents method. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::innerBoundedViewportScale): (WebKit::PageViewportController::outerBoundedViewportScale): (WebKit::PageViewportController::clampViewportToContents): (WebKit): (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::syncVisibleContents): * UIProcess/PageViewportController.h: (PageViewportController): (WebKit): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::focusEditableArea): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect): 2012-09-25 Jocelyn Turcotte [Qt] Unify the PageViewportController<->Client interface regarding positions https://bugs.webkit.org/show_bug.cgi?id=97220 Reviewed by Kenneth Rohde Christiansen. - Make sure that css units are used for all position arguments - Make sure that all positions represent the viewport relatively to the contents rather than the other way around - Delay clamping the viewport to the contents size in the controller rather than in the client * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::updateViewportSize): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::didChangeViewportSize): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::positionRangeForViewportAtScale): * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/PageViewportControllerClient.h: (PageViewportControllerClient): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::animateContentRectVisible): (WebKit::PageViewportControllerClientQt::focusEditableArea): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect): (WebKit::PageViewportControllerClientQt::setViewportPosition): (WebKit::PageViewportControllerClientQt::updateViewportController): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): 2012-09-25 Jocelyn Turcotte [Qt] Make sure that desktop pages honour the devicePixelRatio https://bugs.webkit.org/show_bug.cgi?id=97215 Reviewed by Kenneth Rohde Christiansen. The desktopWidth given to computeViewportAttributes is expected to be pixel-ratio adjusted already. We need to make sure that the viewport size is divided by the pixel ratio to prevent the equivalent of a 1.0 devicePixelRatio to be in effect once viewportSize.width() is larger than layoutFallbackWidth. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2012-09-25 Simon Pena [GTK] Add Undo / Redo method to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=97553 Reviewed by Martin Robinson. Add the macros for Undo / Redo support, and include them in the documentation. * UIProcess/API/gtk/WebKitEditingCommands.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: 2012-09-25 Jocelyn Turcotte [Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportController https://bugs.webkit.org/show_bug.cgi?id=97214 Reviewed by Kenneth Rohde Christiansen. Currently the client is required to multiply the scales it receives each bime by the devicePixelRatio. This shouldn't be required since essentially, the only places that the devicePixelRatio should be in use, is to adjust the layout size, multiply the base scale and for scale constants. Other related changes: - Make sure that the controller and it's client are only exchanging effective scales (cssScale * devicePixelRatio) - Remove members duplicating m_rawAttributes values - Use a separate member for the minimum scale to fit the page, separate from the viewport arguments - Make sure that the minimum scale to fit is adjusted if the contents size isn't updated after the viewport attributes changed - Make the scale conversion functions private to discourage this logic from spreading in the client * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::innerBoundedViewportScale): (WebKit::PageViewportController::outerBoundedViewportScale): (WebKit): (WebKit::PageViewportController::devicePixelRatio): (WebKit::PageViewportController::didChangeContentsSize): (WebKit::PageViewportController::didChangeViewportAttributes): (WebKit::PageViewportController::resumeContent): (WebKit::PageViewportController::updateMinimumScaleToFit): * UIProcess/PageViewportController.h: (PageViewportController): (WebKit::PageViewportController::minimumContentsScale): (WebKit::PageViewportController::maximumContentsScale): (WebKit::PageViewportController::currentContentsScale): (WebKit::PageViewportController::fromViewportScale): (WebKit::PageViewportController::toViewportScale): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::focusEditableArea): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect): (WebKit::PageViewportControllerClientQt::setContentsRectToNearestValidBounds): (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate): 2012-09-25 Simon Pena [GTK] Fix typo in accessing union field in a GdkEvent in a WebKit2 unit test https://bugs.webkit.org/show_bug.cgi?id=97564 Reviewed by Martin Robinson. In the WebViewTest::moveMouseTo method, the wrong field in a union was being accessed in a GdkEvent: instead of the button field, we were supposed to act on the motion one. This patch fixes the typo. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::mouseMoveTo): 2012-09-25 Carlos Garcia Campos [GTK] Don't use the C API internally in WebKitFindController https://bugs.webkit.org/show_bug.cgi?id=96775 Reviewed by Gustavo Noronha Silva. Using the C++ classes directly instead of the C API wrappers we avoid a lot of toImpl/toAPI casts, string conversions and allocations. The code is also a lot simpler and easier to read. * UIProcess/API/gtk/WebKitFindController.cpp: (getPage): (webkitFindControllerConstructed): (webKitFindControllerPerform): (webkit_find_controller_search_next): (webkit_find_controller_search_previous): (webkit_find_controller_search_finish): 2012-09-25 Jocelyn Turcotte [Qt] Apply the devicePixelRatio as soon as possible https://bugs.webkit.org/show_bug.cgi?id=97211 Reviewed by Kenneth Rohde Christiansen. Having to wait for the contents size to apply the devicePixelRatio can be problematic since the devicePixelRatio affects the layout width, which then affects the contents size. Fix the initial issue that this was working around by preventing the early return if useFixedLayout() is true. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate::didChangeContentsSize): (QQuickWebViewExperimental::devicePixelRatio): (QQuickWebViewExperimental::setDevicePixelRatio): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): 2012-09-25 Jocelyn Turcotte [Qt] Don't render at scale 1.0 when doing a pinch-zoom out https://bugs.webkit.org/show_bug.cgi?id=97212 Reviewed by Kenneth Rohde Christiansen. When the user starts pinching this creates extra rendering that is bound to the page size and can be considerably big, reducing performance and peaking the tile memory usage. Fixing this might require a different approach that we could experiment with. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::animateContentRectVisible): (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate): 2012-09-25 Michael Brüning [Qt][WK2] Focus out is not handled properly https://bugs.webkit.org/show_bug.cgi?id=96997 Reviewed by Simon Hausmann. Adds a handler for QQuickWebView::itemChange event that is sent to QQuickItems when their focus has been changed to replace focusOutEvent. This fixes the problem because the focus has been updated when itemChange is called, while it is not yet update when focusOutEvent is called. * UIProcess/API/qt/qquickwebview.cpp: Removed focusOutEvent. (QQuickWebView::itemChange): Added in place of focusOutEvent. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::handleFocusLost): Renamed from handleFocusOutEvent, parameter removed. * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): 2012-09-25 Mikhail Pozdnyakov [WK2] Supported media MIME types are not included to the list of shown MIME types. https://bugs.webkit.org/show_bug.cgi?id=97552 Reviewed by Kenneth Rohde Christiansen. Added supported media MIME types to the list of shown MIME types in order to fix media tests regression after r129479. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::canShowMIMEType): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCanShowMIMEType): 2012-09-25 KwangYong Choi [EFL][WK2] Added hideColorPicker test case https://bugs.webkit.org/show_bug.cgi?id=97522 Reviewed by Kenneth Rohde Christiansen. Added a test case for removing input element during color picker is shown. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (setColorPickerColor): (showColorPicker): (hideColorPicker): (TEST_F): 2012-09-25 Mikhail Pozdnyakov [WK2][WTR] WTR bundle client loads binary data as text https://bugs.webkit.org/show_bug.cgi?id=97532 Reviewed by Kenneth Rohde Christiansen. Added WKBundlePageCanShowMIMEType() function to WKBundlePage private API. This function is put to WKBundlePage to keep consistency with WebKit::WebPageProxy::canShowMIMEType(). Actually it does not need anything from page. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCanShowMIMEType): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2012-09-25 Carlos Garcia Campos [GTK] Don't use the C API internally in WebKitWebView https://bugs.webkit.org/show_bug.cgi?id=96767 Reviewed by Gustavo Noronha Silva. Using the C++ classes directly instead of the C API wrappers we avoid a lot of toImpl/toAPI casts, string conversions and allocations. The code is also a lot simpler and easier to read. * UIProcess/API/gtk/WebKitContextMenuClient.cpp: (getContextMenuFromProposedMenu): * UIProcess/API/gtk/WebKitResourceLoadClient.cpp: (didInitiateLoadForResource): * UIProcess/API/gtk/WebKitUIClient.cpp: (createNewPage): (runJavaScriptPrompt): (mouseDidMoveOverElement): (printFrame): * UIProcess/API/gtk/WebKitURIRequest.cpp: (webkitURIRequestCreateForResourceRequest): (webkitURIRequestGetResourceRequest): * UIProcess/API/gtk/WebKitURIRequestPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (allowModalDialogsChanged): (zoomTextOnlyChanged): (webkitWebViewSetSettings): (webkitWebViewConstructed): (webkitWebViewUpdateURI): (webkitWebViewCreateNewPage): (webkitWebViewRunJavaScriptPrompt): (webkitWebViewMouseTargetChanged): (webkitWebViewPrintFrame): (webkitWebViewResourceLoadStarted): (webkitWebViewPopulateContextMenu): (webkit_web_view_load_uri): (webkit_web_view_load_html): (webkit_web_view_load_alternate_html): (webkit_web_view_load_plain_text): (webkit_web_view_load_request): (webkit_web_view_reload): (webkit_web_view_reload_bypass_cache): (webkit_web_view_stop_loading): (webkit_web_view_go_back): (webkit_web_view_can_go_back): (webkit_web_view_go_forward): (webkit_web_view_can_go_forward): (webkit_web_view_get_custom_charset): (webkit_web_view_set_custom_charset): (webkit_web_view_go_to_back_forward_list_item): (webkit_web_view_set_settings): (webkit_web_view_set_zoom_level): (webkit_web_view_get_zoom_level): (webkit_web_view_can_execute_editing_command): (webkit_web_view_execute_editing_command): (webkit_web_view_run_javascript): (webkit_web_view_get_inspector): (webkit_web_view_can_show_mime_type): (ViewSaveAsyncData): (getContentsAsMHTMLDataCallback): (webkit_web_view_save): (webkit_web_view_save_finish): (webkit_web_view_save_to_file): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseCreate): (webkitWebViewBaseCreateWebPage): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: 2012-09-24 Bo Liu Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations https://bugs.webkit.org/show_bug.cgi?id=97055 Reviewed by Adam Barth. Relanding 128780, 128676, 128645. Was reverted in 128914 due to performance regression in Chromium. New changes in addition to previously reverted patches: Refactored CachedResource::requestResource, loadResource, and revalidateResource. Moved CachedResource::load method to end of requestResource so there is one place where load is called for all resources. Added a enum parameter for requestResource and determineRevalidationPolicy so that FrameLoaderClient::allowImage call do not need to be called multiple times. Removed CachedImage::load call in requestImage so it is not called twice. Removed unnecessary Frame.h includes in CachedResource and CachedImage. Removed dead load() method declaration in CachedImage. Updated text expectation for two image-permissions tests to reflect the removed calls to allowImage. * win/WebKit2.def: 2012-09-24 Sam Weinig WKProcessGroup can't load injected bundle with file URL https://bugs.webkit.org/show_bug.cgi?id=97520 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKProcessGroup.mm: (-[WKProcessGroup initWithInjectedBundleURL:]): Fix typo. We need to pass the string as path, not as a URL. 2012-09-24 Sam Weinig Use NSUserDefaults rather than an environment variable to control whether to use an XPC Service for the WebProcess https://bugs.webkit.org/show_bug.cgi?id=97514 Reviewed by Anders Carlsson. * GNUmakefile.list.am: * PlatformEfl.cmake: * Target.pri: Add new files. * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connect): Move platform specific launch options to a new function, platformConnect. * UIProcess/WebProcessProxy.h: * UIProcess/efl/WebProcessProxyEfl.cpp: Added. Move Efl specific launch options here. (WebKit::WebProcessProxy::platformConnect): * UIProcess/gtk/WebProcessProxyGtk.cpp: Added. Add stub. (WebKit::WebProcessProxy::platformConnect): * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::platformConnect): Move Mac specific launch option setting here, and switch from using an environment variable to NSUserDefaults. * UIProcess/qt/WebProcessProxyQt.cpp: Added. (WebKit::WebProcessProxy::platformConnect): Add stub. * UIProcess/win/WebProcessProxyWin.cpp: (WebKit::WebProcessProxy::platformConnect): Add stub. 2012-09-24 Laszlo Gombos [GTK][EFL] Remove cairo prefix from include statements https://bugs.webkit.org/show_bug.cgi?id=97509 Reviewed by Gyuyoung Kim. Make the build system consistent by always assuming that directory that includes the cairo headers is included in the include path. * UIProcess/cairo/BackingStoreCairo.cpp: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 2012-09-24 Sheriff Bot Unreviewed, rolling out r129388. http://trac.webkit.org/changeset/129388 https://bugs.webkit.org/show_bug.cgi?id=97477 Caused an assertion in a WebKit2 unit test (Requested by abarth on #webkit). * win/WebKit2.def: 2012-09-24 Simon Pena [GTK] Add Select All method to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=97460 Reviewed by Martin Robinson. Following the same approach used when added Cut, Copy and Paste, the Select All method is added to the WebKit2 GTK+ API. This introduces a new macro in the WebKitEditingCommands, updates the documentation, and includes a new unit test. * UIProcess/API/gtk/WebKitEditingCommands.h: Add a new macro for the Select All command. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the Select All command in the documentation. * UIProcess/API/gtk/tests/TestWebViewEditor.cpp: Cover the new command with a unit test. (testWebViewEditorSelectAll): (beforeAll): 2012-09-24 Bo Liu Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations https://bugs.webkit.org/show_bug.cgi?id=97055 Reviewed by Adam Barth. Relanding 128780, 128676, 128645. Was reverted in 128914 due to performance regression in Chromium. New changes in addition to previously reverted patches: Refactored CachedResource::requestResource, loadResource, and revalidateResource. Moved CachedResource::load method to end of requestResource so there is one place where load is called for all resources. Added a enum parameter for requestResource and determineRevalidationPolicy so that FrameLoaderClient::allowImage call do not need to be called multiple times. Removed CachedImage::load call in requestImage so it is not called twice. Removed unnecessary Frame.h includes in CachedResource and CachedImage. Removed dead load() method declaration in CachedImage. Updated text expectation for two image-permissions tests to reflect the removed calls to allowImage. * win/WebKit2.def: 2012-09-24 Joone Hur , Gustavo Noronha Silva [GTK] Implement GraphicsLayer using Clutter https://bugs.webkit.org/show_bug.cgi?id=73767 Reviewed by Martin Robinson. Fixed link errors by adding Clutter library and header to WebKit2 build. * GNUmakefile.am: 2012-09-24 Carlos Garcia Campos [GTK] WebKitWebView:is-loading is not updated when the is loaded is started by link clicked navigation action https://bugs.webkit.org/show_bug.cgi?id=97458 Reviewed by Xan Lopez. WebKitWebView:is-loading is set to TRUE when the load is started by using the API. We want to make sure that both URI and is-loading are updated before load-started is emitted, so we can update both right before emitting load-started. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewEmitLoadChanged): Update both uri and is-loading properties before emitting load-changed signal with WEBKIT_LOAD_STARTED. (webkit_web_view_load_uri): Don't call webkitWebViewSetIsLoading(). (webkit_web_view_load_html): Ditto. (webkit_web_view_load_alternate_html): Ditto. (webkit_web_view_load_plain_text): Ditto. (webkit_web_view_load_request): Ditto. (webkit_web_view_reload): Ditto. (webkit_web_view_reload_bypass_cache): Ditto. (webkit_web_view_go_back): Ditto. (webkit_web_view_go_forward): Ditto. (webkit_web_view_go_to_back_forward_list_item): Ditto. 2012-09-24 Byungwoo Lee [EFL][WK2] Change the install path for libewk2UnitTestInjectedBundleSample.so. https://bugs.webkit.org/show_bug.cgi?id=97302 Reviewed by Gyuyoung Kim. libewk2UnitTestInjectedBundleSample.so file is created under the Source directory. Change install directory for the library to under the build directory. * PlatformEfl.cmake: * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): 2012-09-24 Vivek Galatage Web Inspector: implement testing harness for pure protocol tests. https://bugs.webkit.org/show_bug.cgi?id=90675 Reviewed by Yury Semikhatsky. Adding the export symbol definitions required on Apple Windows and WinCairo ports to support Inspector Protocol testing harness. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-24 KwangYong Choi [EFL][WK2] Invalid featuring of INPUT_TYPE_COLOR in test_ewk2_view. https://bugs.webkit.org/show_bug.cgi?id=97430 Reviewed by Kenneth Rohde Christiansen. The tests of ewk_view_context_get and ewk_view_feed_touch_event are not related to INPUT_TYPE_COLOR. These tests should be moved to outside of INPUT_TYPE_COLOR block. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-23 Seokju Kwon [EFL][WK2] Add setting to toggle developer extensions https://bugs.webkit.org/show_bug.cgi?id=96974 Reviewed by Kenneth Rohde Christiansen. This is required to allow the user to inspect pages. (Web inspector) * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_developer_extras_enabled_set): (ewk_settings_developer_extras_enabled_get): * UIProcess/API/efl/ewk_settings.h: * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2012-09-23 Byungwoo Lee Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized. https://bugs.webkit.org/show_bug.cgi?id=97306 Reviewed by Benjamin Poulain. Fix build warning about -Wunused-parameter on Connection.cpp, WKEinaSharedString.cpp, ewk_view_loader_client.cpp, WebPage.cpp by using ASSERT_UNUSED() macro or removing parameter name. Fix build warning about -Wuninitialized on WebEventFactory.cpp by continueing the loop at the default switch case not to use the uninitialized variable. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForSyncReply): * Shared/efl/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebTouchEvent): * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: (WKEinaSharedString::WKEinaSharedString): * UIProcess/API/efl/ewk_view_loader_client.cpp: (didSameDocumentNavigationForFrame): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::SandboxExtensionTracker::beginLoad): 2012-09-22 Sam Weinig Install WebProcess XPC services into the right places https://bugs.webkit.org/show_bug.cgi?id=97385 Reviewed by Anders Carlsson. * Configurations/WebProcessService.xcconfig: Update INSTALL_PATH to go into WebKit2.framework/Versions/A/XPCServices. * Configurations/WebProcessServiceForWebKitDevelopment.xcconfig: Since this config file is almost identical to WebProcessService.xcconfig, just #include it and change the one thing that is different, the INFOPLIST_FILE * WebKit2.xcodeproj/project.pbxproj: Follow XPC procedure and copy the services into the right place, WebKit2.framework/Versions/A/XPCServices in all builds except production builds where it is not necessary. Also add a symlink like everyone else does. 2012-09-22 Sam Weinig Allow setting a custom path to where the plug-in sandbox profiles are being kept https://bugs.webkit.org/show_bug.cgi?id=97399 Reviewed by Anders Carlsson. Add a new default to allow controlling where to look for plug-in sandbox profiles called "PlugInSandboxProfileDirectoryPath". * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeSandbox): Use the passed in sandboxProfileDirectoryPath instead of hard coding /usr/share/sandbox/. (WebKit::PluginProcess::platformInitialize): * Shared/Plugins/PluginProcessCreationParameters.cpp: (WebKit::PluginProcessCreationParameters::encode): (WebKit::PluginProcessCreationParameters::decode): * Shared/Plugins/PluginProcessCreationParameters.h: (PluginProcessCreationParameters): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformInitializePluginProcess): Grab the sandboxProfileDirectoryPath from standardUserDefaults and pass it to the plug-in. 2012-09-21 Sam Weinig Fix the Lion and Snow Leopard builds. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessService): 2012-09-21 Sam Weinig WebProcess XPC services need have their environment set without disrupting all other XPC services https://bugs.webkit.org/show_bug.cgi?id=95161 Reviewed by Anders Carlsson. Replace the WebKit2Service with two new XPC services, the WebProcessService, which is only used when installed on the system, and the WebProcessServiceForWebKitDevelopment which is used at all other times. We need both services because XPC can't in general be configured to have a custom environment at runtime, and thus WebProcessServiceForWebKitDevelopment has the ability to re-exec itself into a desired state. That capability is rather undesirable for installed usage, where we don't want to allow arbitrary changes to the environment of the service, which would allow breaking the App Sandbox. * Configurations/WebProcessService.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2Service.xcconfig. * Configurations/WebProcessServiceForWebKitDevelopment.xcconfig: Renamed from Source/WebKit2/Configurations/WebKit2Service.xcconfig. Add new configuration files. * Platform/mac/WorkQueueMac.cpp: (WorkQueue::registerMachPortEventHandler): (WorkQueue::unregisterMachPortEventHandler): Add helpful assertions. Without them, we confusingly crash a bit later in HashTable code. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): Factor out environment additions to this helper function. (WebKit::connectToWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessServiceForWebKitDevelopment): Add functionality to setup the webkit development service via re-exec. (WebKit::createWebProcessService): Add functionality to connect to the installed WebProcess service. (WebKit::createProcess): Factor out posix_spawn based launching into this helper function. (WebKit::ProcessLauncher::launchProcess): Call the correct process creation function based on launch data and install state. * WebKit2.xcodeproj/project.pbxproj: Add new files to the project. * WebProcess/mac/WebProcessServiceEntryPoints.h: Renamed from Source/WebKit2/WebProcess/mac/WebProcessXPCServiceMain.h. * WebProcess/mac/WebProcessServiceEntryPoints.mm: Renamed from Source/WebKit2/WebProcess/mac/WebProcessXPCServiceMain.mm. (WebKit::WebProcessServiceEventHandler): (WebProcessServiceMain): (InitializeWebProcessForWebProcessServiceForWebKitDevelopment): Rename to WebProcessServiceEntryPoints since this is now used for both the WebProcessService and the WebProcessServiceForWebKitDevelopment. * WebProcessService/Info.plist: Copied from Source/WebKit2/WebKit2Service/Info.plist. * WebProcessService/WebProcessServiceMain.mm: Renamed from Source/WebKit2/WebKit2Service/MainMacService.mm. Add main for the WebProcessService which just calls into the WebProcessServiceEntryPoints in WebKit2.framework. * WebProcessServiceForWebKitDevelopment/Info.plist: Renamed from Source/WebKit2/WebKit2Service/Info.plist. * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: Added. Add main for the WebProcessServiceForWebKitDevelopment, which can't just call directly into WebProcessServiceEntryPoints as the framework path might not be set up correctly. This is also where we re-exec ourselves when required. 2012-09-21 Anders Carlsson Fix WebKit2 sandbox profile. Instead of using #pragmas, just disable all warnings in DerivedSources.make. I suspect that passing -traditional to the preprocessor disables support for #pragmas but I'm afraid to change it to something else. * DerivedSources.make: * WebProcess/com.apple.WebProcess.sb.in: 2012-09-21 Benjamin Poulain fast/dom/Geolocation/disconnected-frame.html test asserts https://bugs.webkit.org/show_bug.cgi?id=97376 Reviewed by Alexey Proskuryakov. In GeolocationPermissionRequestManager::cancelRequestForGeolocation, we access an iterator after its value has been removed from the table. There are two problems with that: -The iterator is no longer valid after the container has been modified. -If it was the last element, the table has been freed and the iterator points to deleted memory. We solve the issue by keeping a copy of the ID. We could have inverted the order of the calls but that would make the issue less visible for future change. Testing covered by fast/dom/Geolocation/disconnected-frame.html. * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation): 2012-09-21 Sam Weinig REGRESSION (r120361) Warnings while preprocessing com.apple.WebProcess.sb.in https://bugs.webkit.org/show_bug.cgi?id=91079 Reviewed by Anders Carlsson. * WebProcess/com.apple.WebProcess.sb.in: Add pragma to ignore the invalid preprocessor warnings. 2012-09-21 Chris Rogers Add Web Audio support for deprecated/legacy APIs https://bugs.webkit.org/show_bug.cgi?id=97050 Reviewed by Eric Carlson. * Configurations/FeatureDefines.xcconfig: 2012-09-21 Benjamin Poulain [WK2] Add basic testing support for Geolocation https://bugs.webkit.org/show_bug.cgi?id=97278 Reviewed by Kenneth Rohde Christiansen. * Shared/API/c/WKNumber.h: Fix an unfortunate copy-paste :) * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): Remove the code forcing the Geolocation permissions. It was working around the normal Geolocation code and updating all the GeolocationController, which is a terrible idea. 2012-09-21 Alexey Proskuryakov [WK2] Make Web Inspector work in multiple web process mode https://bugs.webkit.org/show_bug.cgi?id=97354 Reviewed by Timothy Hatcher. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Tell WKView that it's related to original page, making inspector page be in the same process. 2012-09-21 Carlos Garcia Campos [GTK] Implement ViewState methods in PageClientImpl in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=97202 Reviewed by Martin Robinson. Implement isViewWindowActive(), isViewFocused(), isViewVisible() and isViewInWindow() in PageClientImpl. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/C/gtk/WKView.cpp: (WKViewSetFocus): New private method used by WTR to focus the WebView. * UIProcess/API/C/gtk/WKViewPrivate.h: Added. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::isViewWindowActive): Return webkitWebViewBaseIsInWindowActive(). (WebKit::PageClientImpl::isViewFocused): Return webkitWebViewBaseIsFocused(). (WebKit::PageClientImpl::isViewVisible): Return webkitWebViewBaseIsVisible(). (WebKit::PageClientImpl::isViewInWindow): Return webkitWebViewBaseIsInWindow(). * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseNotifyResizerSize): Updated to not receive the window as parameter since it's now saved in the instance struct. (toplevelWindowResizeGripVisibilityChanged): Update to webkitWebViewBaseNotifyResizerSize() API change. (toplevelWindowFocusInEvent): Update ViewWindowIsActive flag and notify the WebPageProxy if it changed. (toplevelWindowFocusOutEvent): Ditto. (webkitWebViewBaseSetToplevelOnScreenWindow): Set the toplevel on-screen window where the view is currently added and notify WebPageProxy if it changed. (webkitWebViewBaseRealize): Call webkitWebViewBaseSetToplevelOnScreenWindow() if the view has been added to an on-screen window. (webkitWebViewBaseFinalize): Reset the toplevel on-screen window to make sure all signals are disconnected when the view is destroyed. (webkit_web_view_base_init): Remove unneeded initialization. (resizeWebKitWebViewBaseFromAllocation): Update to webkitWebViewBaseNotifyResizerSize() API change. (webkitWebViewBaseMap): Update ViewIsVisible flag and notify WebPageProxy if it changed. (webkitWebViewBaseUnmap): Ditto. (webkitWebViewBaseFocusInEvent): Call webkitWebViewBaseSetFocus() passing true to focus the view. (webkitWebViewBaseFocusOutEvent): Call webkitWebViewBaseSetFocus() passing false to unfocus the view. (webkitWebViewBaseParentSet): Reset the toplevel on-screen window if the view is re-parented. (webkit_web_view_base_class_init): Add implementations for map and parent-set virtual functions. (webkitWebViewBaseSetFocus): Update the ViewIsFocused and notify WebPageProxy if it changed. (webkitWebViewBaseIsInWindowActive): (webkitWebViewBaseIsFocused): (webkitWebViewBaseIsVisible): (webkitWebViewBaseIsInWindow): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMouseTarget): Use a GTK_WINDOW_TOPLEVEL instead of POPUP for this test to make sure the view receives focus change events. 2012-09-21 Carlos Garcia Campos [GTK] Add WebKitWebView:is-loading property to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=97330 Reviewed by Xan Lopez. WebKitWebView:is-loading property allows to monitor when the view is loading something without having to deal with load-changed signal and all the details of the load status. This also allows to know when a new load is started before it goes to STARTED status. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewGetProperty): Implement getter for is-loading property. (webkit_web_view_class_init): Add is-loading property. (webkitWebViewSetIsLoading): Set whether web view is loading a page and emit notify signal if the is-loading property has changed. Also update the active URI when a new load operation has started. (webkitWebViewEmitLoadChanged): Set is-loading to FALSE when load finishes. (webkitWebViewLoadFailed): Set is-loading to FALSE when load fails. (webkit_web_view_load_uri): Set is-loading to TRUE. (webkit_web_view_load_html): Ditto. (webkit_web_view_load_alternate_html): Ditto. (webkit_web_view_load_plain_text): Ditto. (webkit_web_view_load_request): Ditto. (webkit_web_view_reload): Ditto. (webkit_web_view_reload_bypass_cache): Ditto. (webkit_web_view_is_loading): Return whether the view is loading a page. (webkit_web_view_go_back): Set is-loading to TRUE. (webkit_web_view_go_forward): Ditto. (webkit_web_view_go_to_back_forward_list_item): Ditto. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/LoadTrackingTest.cpp: (loadChangedCallback): (loadFailedCallback): * UIProcess/API/gtk/tests/TestLoaderClient.cpp: (testWebViewIsLoading): (beforeAll): 2012-09-20 Eunmi Lee [EFL][WK2] Add API to feed touch event. https://bugs.webkit.org/show_bug.cgi?id=96903 Reviewed by Kenneth Rohde Christiansen. The applications will use this API to feed touch event to the view when they want to generate touch event from their own event processor. WTR also will use this API to generate touch event with multiple touch points for passing test cases of touch event in the WebKit2/EFL. * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_feed_touch_event): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-20 Patrick Gansterer Add String::numberToStringFixedWidth() https://bugs.webkit.org/show_bug.cgi?id=96330 Reviewed by Benjamin Poulain. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-17 Jon Lee Safari 6 notifications' onclick handlers can't call window.open() https://bugs.webkit.org/show_bug.cgi?id=96959 Reviewed by Darin Adler. The click is not being treated as a user gesture when the message is sent to the web process. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::didClickNotification): Gets called when the user clicks on the platform notification. Set UserGestureIndicator to show the click event is due to user gesture. 2012-09-20 Eunmi Lee [EFL][WK2] Add APIs to create, delete and get ewk_context. https://bugs.webkit.org/show_bug.cgi?id=89186 Reviewed by Kenneth Rohde Christiansen. Provide APIs to create ewk_context with or without injected bundle path and delete created ewk_context. Additionally, the ewk_view can be created with ewk_context which is not default context, so we have to get ewk_context from ewk_view. * PlatformEfl.cmake: * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::handleDownloadRequest): * UIProcess/API/efl/ewk_context.cpp: (_Ewk_Context): (_Ewk_Context::_Ewk_Context): (ewk_context_ref): (ewk_context_unref): (ewk_context_new): (ewk_context_new_with_injected_bundle_path): * UIProcess/API/efl/ewk_context.h: * UIProcess/API/efl/ewk_view.cpp: (_Ewk_View_Private_Data): (_Ewk_View_Private_Data::_Ewk_View_Private_Data): (_ewk_view_priv_del): (_ewk_view_initialize): (ewk_view_context_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Added. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): (EWK2UnitTest): * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: (EWK2UnitTestEnvironment): * UIProcess/API/efl/tests/test_ewk2_context.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-20 KwangYong Choi [EFL][WK2] Implemented color picker API https://bugs.webkit.org/show_bug.cgi?id=91832 Reviewed by Kenneth Rohde Christiansen. Add support for color picker API for EFL port in WebKit2. The external application can implement input picker by overriding smart class function. * UIProcess/API/efl/ewk_view.cpp: (_Ewk_View_Private_Data): (_Ewk_View_Private_Data::_Ewk_View_Private_Data): (ewk_view_color_picker_request): (ewk_view_color_picker_dismiss): (ewk_view_color_picker_color_set): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_view_ui_client.cpp: (showColorPicker): (hideColorPicker): (ewk_view_ui_client_attach): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (onColorPickerDone): (setColorPickerColor): (showColorPicker): (hideColorPicker): (TEST_F): 2012-09-20 Balazs Kelemen [CoordinatedGraphics] Don't reset m_shouldSyncFrame in flushPendingLayerChanges https://bugs.webkit.org/show_bug.cgi?id=97108 Reviewed by Noam Rosenthal. Stop ignoring if m_shouldSyncFrame has been set between the two layer flush. It can be set during layout in several situations, for example when a layer is deleted or changed state. We want to send the DidRenderFrame message at the next flush in those situations so the UI process will apply the changes as soon as possible. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-09-20 Byungwoo Lee [EFL][WK2] Check timeout on waitUntilLoadFinished() and waitUntilTitleChangedTo(). https://bugs.webkit.org/show_bug.cgi?id=97081 Reviewed by Gyuyoung Kim. Add assertion to check timeout on waitUntilLoadFinished() and waitUntilTitleChangedTo(). Set the default timeout for the functions as 10 seconds. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTestBase): * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_context.cpp: (TEST_F): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-20 Jinwoo Song [EFL] Change the log macro names to be more consistent with EINA LOG https://bugs.webkit.org/show_bug.cgi?id=97158 Reviewed by Kenneth Rohde Christiansen. Some log macro names in WebKit2 are inconsistent with EINA LOG names such as WRN/INF not WARN/INFO. #define WRN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__) #define INF(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__) This patch changes the such names to be consistent with EINA LOG's names. * UIProcess/API/efl/ewk_main.cpp: (ewk_init): * UIProcess/API/efl/ewk_private.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_webprocess_crashed): 2012-09-20 Christophe Dumez [EFL][WK2] Same page navigation does not update view URI https://bugs.webkit.org/show_bug.cgi?id=97094 Reviewed by Kenneth Rohde Christiansen. Handle didSameDocumentNavigationForFrame callback in WKPageLoaderClient in order to update the view URI. This fixes issues with the view URI not being updated in case of a same page navigation. * UIProcess/API/efl/ewk_view_loader_client.cpp: (didSameDocumentNavigationForFrame): (ewk_view_loader_client_attach): * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (CallbackDataTimer): (EWK2UnitTest::CallbackDataTimer::CallbackDataTimer): (EWK2UnitTest::CallbackDataTimer::~CallbackDataTimer): (EWK2UnitTest::CallbackDataTimer::isDone): (EWK2UnitTest::CallbackDataTimer::setDone): (EWK2UnitTest::CallbackDataTimer::didTimeOut): (EWK2UnitTest::CallbackDataTimer::setTimedOut): (EWK2UnitTest): (CallbackDataExpectedValue): (EWK2UnitTest::CallbackDataExpectedValue::CallbackDataExpectedValue): (EWK2UnitTest::CallbackDataExpectedValue::expectedValue): (EWK2UnitTest::onLoadFinished): (EWK2UnitTest::timeOutWhileWaitingUntilLoadFinished): (EWK2UnitTest::EWK2UnitTestBase::waitUntilLoadFinished): (EWK2UnitTest::onTitleChanged): (EWK2UnitTest::timeOutWhileWaitingUntilTitleChangedTo): (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo): (EWK2UnitTest::onURIChanged): (EWK2UnitTest::timeOutWhileWaitingUntilURIChangedTo): (EWK2UnitTest::EWK2UnitTestBase::waitUntilURIChangedTo): Add convenience function to test framework in order to wait until the view URI changes to a given value. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTestBase): * UIProcess/API/efl/tests/resources/same_page_navigation.html: Added. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): Add corresponding unit test to verify fix and prevent regressions in the future. 2012-09-19 Dan Bernstein WebKit2 part of adding a setting and API for disabling screen font substitution https://bugs.webkit.org/show_bug.cgi?id=97168 Reviewed by Tim Horton. * Shared/WebPreferencesStore.h: (WebKit): Defined ScreenFontSubstitutionEnabled key with a default value of true. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetScreenFontSubstitutionEnabled): Added this setter. (WKPreferencesGetScreenFontSubstitutionEnabled): Added this getter. * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Added a call to Settings::setScreenFontSubstitutionEnabled to push the preference into Settings. 2012-09-19 Jinwoo Song Fix unused parameter compile warnings in WebKit/WebKit2 https://bugs.webkit.org/show_bug.cgi?id=96742 Reviewed by Gyuyoung Kim. Fix unused parameter compile warning messages(-Wunused-parameter) in WebKit2 during EFL build. WebCore's warning messages were fixed in r128570. * Shared/FontInfo.cpp: (WebKit::FontInfo::encode): (WebKit::FontInfo::decode): * Shared/PlatformPopupMenuData.cpp: (WebKit::PlatformPopupMenuData::encode): (WebKit::PlatformPopupMenuData::decode): * Shared/SandboxExtension.h: (WebKit::SandboxExtension::createHandleForTemporaryFile): * Shared/ShareableSurface.cpp: (WebKit::ShareableSurface::create): * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): * UIProcess/API/C/WKPage.cpp: (WKPageGetContentsAsMHTMLData): * UIProcess/API/C/WKPluginSiteDataManager.cpp: (WKPluginSiteDataManagerClearSiteData): (WKPluginSiteDataManagerClearAllSiteData): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHixie76WebSocketProtocolEnabled): (WKPreferencesGetHixie76WebSocketProtocolEnabled): * UIProcess/API/efl/BatteryProvider.cpp: (startUpdatingCallback): (stopUpdatingCallback): * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::doneWithTouchEvent): * UIProcess/API/efl/VibrationProvider.cpp: (vibrateCallback): (cancelVibrationCallback): * UIProcess/API/efl/ewk_context_download_client.cpp: (decideDestinationWithSuggestedFilename): (didCreateDestination): * UIProcess/API/efl/ewk_view.cpp: (_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_smart_move): (ewk_view_contents_size_changed): * UIProcess/API/efl/ewk_view_find_client.cpp: (didFindString): * UIProcess/API/efl/ewk_view_form_client.cpp: (willSubmitForm): * UIProcess/API/efl/ewk_view_loader_client.cpp: (didReceiveIntentForFrame): (registerIntentServiceForFrame): (didFinishLoadForFrame): (didFailLoadWithErrorForFrame): (didStartProvisionalLoadForFrame): (didReceiveServerRedirectForProvisionalLoadForFrame): (didFailProvisionalLoadWithErrorForFrame): (didChangeBackForwardList): * UIProcess/API/efl/ewk_view_policy_client.cpp: (decidePolicyForNavigationAction): (decidePolicyForNewWindowAction): (decidePolicyForResponseCallback): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::update): (WebKit::DrawingAreaProxy::didUpdateBackingStoreState): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode): * UIProcess/FindIndicator.cpp: (WebKit::FindIndicator::draw): * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision): * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: (WebKit::PluginInfoStore::shouldUsePlugin): * UIProcess/WebContext.cpp: (WebKit::WebContext::setHTTPPipeliningEnabled): * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::supportsFullScreen): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sessionStateData): (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange): (WebKit::WebPageProxy::didBlockInsecurePluginVersion): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged): (WebKit::TextChecker::grammarCheckingEnabledStateChanged): * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): (WebKit::Download::didDecideDestination): (WebKit::Download::receivedCredential): (WebKit::Download::receivedRequestToContinueWithoutCredential): (WebKit::Download::receivedCancellation): * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL): (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL): (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL): (WebKit::WebIconDatabaseProxy::iconDataForIconURL): * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameCopyWebArchiveFilteringSubframes): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKAccessibilityRootObject): (WKAccessibilityFocusedObject): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): (WebKit::InjectedBundle::didReceiveMessage): (WebKit::InjectedBundle::webNotificationID): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::initialize): (WebKit::WebNotificationManager::didUpdateNotificationDecision): (WebKit::WebNotificationManager::didRemoveNotificationDecisions): (WebKit::WebNotificationManager::policyForOrigin): (WebKit::WebNotificationManager::notificationIDForTesting): (WebKit::WebNotificationManager::show): (WebKit::WebNotificationManager::cancel): (WebKit::WebNotificationManager::clearNotifications): (WebKit::WebNotificationManager::didDestroyNotification): (WebKit::WebNotificationManager::didShowNotification): (WebKit::WebNotificationManager::didClickNotification): (WebKit::WebNotificationManager::didCloseNotifications): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMessageToConsole): (WebKit::WebChromeClient::contentsSizeChanged): (WebKit::WebChromeClient::customHighlightRect): (WebKit::WebChromeClient::paintCustomHighlight): (WebKit::WebChromeClient::supportsFullScreenForElement): * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::downloadURL): * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::dragSourceActionMaskForPoint): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): (WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): (WebKit::WebFrameLoaderClient::shouldStopLoadingForHistoryItem): (WebKit::WebFrameLoaderClient::canShowMIMEType): (WebKit::WebFrameLoaderClient::canShowMIMETypeAsHTML): (WebKit::WebFrameLoaderClient::representationExistsForURLScheme): (WebKit::WebFrameLoaderClient::generatedMIMETypeForURLScheme): (WebKit::WebFrameLoaderClient::createFrame): (WebKit::WebFrameLoaderClient::createJavaAppletWidget): (WebKit::WebFrameLoaderClient::registerForIconNotification): * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::drawRect): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::forceRepaintAsync): (WebKit::DrawingArea::updateBackingStoreState): * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::mouseEvent): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::forceRepaintAsync): * WebProcess/WebPage/TapHighlightController.cpp: (WebKit::TapHighlightController::drawRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::getWebArchiveOfFrame): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getSitesWithPluginData): (WebKit::WebProcess::clearPluginSiteData): * WebProcess/soup/WebKitSoupRequestGeneric.cpp: (webkitSoupRequestGenericSendFinish): * WebProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamReadAsync): (webkitSoupRequestInputStreamReadFinish): 2012-09-19 Pratik Solanki Warning in SandboxExtension.h if WEB_PROCESS_SANDBOX is not enabled https://bugs.webkit.org/show_bug.cgi?id=97137 Reviewed by Benjamin Poulain. m_size is only used when WEB_PROCESS_SANDBOX is enabled, so move its declaration inside #if ENABLE(WEB_PROCESS_SANDBOX). * Shared/SandboxExtension.h: (HandleArray): 2012-09-19 Sudarsana Nagineni [WTR] Memory leaks in TestRunner::deliverWebIntent() https://bugs.webkit.org/show_bug.cgi?id=97111 Reviewed by Kenneth Rohde Christiansen. Fix memory leaks in WKBundleIntentCreate() by adopting strings created with WKStringCreateWithUTF8CString(). * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp: (WKBundleIntentCreate): 2012-09-19 Christophe Dumez [EFL][WK2] fast/forms/select-writing-direction-natural.html is failing https://bugs.webkit.org/show_bug.cgi?id=97082 Reviewed by Kenneth Rohde Christiansen. WebChromeClient::selectItemWritingDirectionIsNatural() now returns true for EFL-WK2, consistently with EFL-WK1, so that the style is properly adjusted in RenderMenuList::adjustInnerStyle(). * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): 2012-09-19 Carlos Garcia Campos [GTK] Add API to get/set the security policy of a given URI scheme to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=96497 Reviewed by Martin Robinson. Add WebKitSecurityManager object associated to a WebKitWebContext to get/set the security policy of a URI scheme. * GNUmakefile.list.am: Add new files to compilation. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode the list of schemes to be reigstered as Local, NoAccess, DisplayIsolated and CORSEnabled. (WebKit::WebProcessCreationParameters::decode): Decode the list of schemes to be reigstered as Local, NoAccess, DisplayIsolated and CORSEnabled. * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): Add new parameters to be able to register schemes as Local, NoAccess, DisplayIsolated and CORSEnabled. * UIProcess/API/gtk/WebKitSecurityManager.cpp: Added. (webkit_security_manager_init): (webkitSecurityManagerFinalize): (webkit_security_manager_class_init): (webkitSecurityManagerCreate): Private function to create the WebKitSecurityManager object associated to the given WebKitWebContext. (registerSecurityPolicyForURIScheme): (checkSecurityPolicyForURIScheme): (webkit_security_manager_register_uri_scheme_as_local): (webkit_security_manager_uri_scheme_is_local): (webkit_security_manager_register_uri_scheme_as_no_access): (webkit_security_manager_uri_scheme_is_no_access): (webkit_security_manager_register_uri_scheme_as_display_isolated): (webkit_security_manager_uri_scheme_is_display_isolated): (webkit_security_manager_register_uri_scheme_as_secure): (webkit_security_manager_uri_scheme_is_secure): (webkit_security_manager_register_uri_scheme_as_cors_enabled): (webkit_security_manager_uri_scheme_is_cors_enabled): (webkit_security_manager_register_uri_scheme_as_empty_document): (webkit_security_manager_uri_scheme_is_empty_document): * UIProcess/API/gtk/WebKitSecurityManager.h: Added. * UIProcess/API/gtk/WebKitSecurityManagerPrivate.h: Added. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_get_security_manager): Return the WebKitSecurityManager object, creating it before if it doesn't exist. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitSecurityManager. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: (testWebContextSecurityPolicy): (beforeAll): * UIProcess/API/gtk/webkit2.h: Add WebKitSecurityManager.h. * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): Copy new vector schemes. (WebKit::WebContext::registerURLSchemeAsLocal): Send a message to WebProcess to register the given URL scheme as Local. (WebKit::WebContext::registerURLSchemeAsNoAccess): Send a message to WebProcess to register the given URL scheme as NoAccess. (WebKit::WebContext::registerURLSchemeAsDisplayIsolated): Send a message to WebProcess to register the given URL scheme as DisplayIsolated. (WebKit::WebContext::registerURLSchemeAsCORSEnabled): Send a message to WebProcess to register the given URL scheme as CORSEnabled. * UIProcess/WebContext.h: (WebContext): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::registerURLSchemeAsLocal): Register the given URL scheme as Local in the SchemeRegistry. (WebKit::WebProcess::registerURLSchemeAsNoAccess): Register the given URL scheme as NoAccess in the SchemeRegistry. (WebKit::WebProcess::registerURLSchemeAsDisplayIsolated): Register the given URL scheme as DisplayIsolated in the SchemeRegistry. (WebKit::WebProcess::registerURLSchemeAsCORSEnabled): Register the given URL scheme as CORSEnabled in the SchemeRegistry. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Add new messages. 2012-09-19 Balazs Kelemen [Texmap] Potential crash in TextureMapperLayer because of referencing deleted mask/replica layer https://bugs.webkit.org/show_bug.cgi?id=96919 Reviewed by Noam Rosenthal. Delay syncing deleted layers until flushPendingLayerChanges so the UI side state will contain all changes related to the deletion of a layer. This saves us from referencing a deleted layer. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): (WebKit::LayerTreeCoordinator::detachLayer): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-09-19 Byungwoo Lee [EFL][WK2] waitUntilTitleChangedTo() and waitUntilLoadFinished() needs timeout. https://bugs.webkit.org/show_bug.cgi?id=96910 Reviewed by Kenneth Rohde Christiansen. Currently, the waitUntilTitleChangedTo() and waitUntilLoadFinished() functions doesn't handle timeout by itself. And if there are some failed cases that loading is not finished or title is not changed to the expected string, test case just stopped with timeout and there is no more information about this such as line number. To handle timeout status more properly, timeout parameter is added to these functions. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::LoadFinishedData::LoadFinishedData): (LoadFinishedData): (EWK2UnitTest::LoadFinishedData::~LoadFinishedData): (EWK2UnitTest): (EWK2UnitTest::onLoadFinished): (EWK2UnitTest::timeOutWhileWaitingUntilLoadFinished): (EWK2UnitTest::EWK2UnitTestBase::waitUntilLoadFinished): (EWK2UnitTest::TitleChangedData::TitleChangedData): (TitleChangedData): (EWK2UnitTest::TitleChangedData::~TitleChangedData): (EWK2UnitTest::onTitleChanged): (EWK2UnitTest::timeOutWhileWaitingUntilTitleChangedTo): (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo): * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTestBase): 2012-09-18 Byungwoo Lee [EFL][WK2] Add javascript popup API. https://bugs.webkit.org/show_bug.cgi?id=95672 Reviewed by Gyuyoung Kim. Add smart class member function for javascript alert(), confirm() and prompt(). * UIProcess/API/efl/ewk_view.cpp: (ewk_view_run_javascript_alert): (ewk_view_run_javascript_confirm): (ewk_view_run_javascript_prompt): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_view_ui_client.cpp: (runJavaScriptAlert): (runJavaScriptConfirm): (runJavaScriptPrompt): (ewk_view_ui_client_attach): * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added unit test for javascript popup smart class member function. (checkAlert): (TEST_F): (checkConfirm): (checkPrompt): 2012-09-18 Sailesh Agrawal Chromium: Scrollbar with tickmarks doesn't respond to clicks https://bugs.webkit.org/show_bug.cgi?id=96049 Reviewed by Beth Dakin. Update exported symbols. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-18 Jinwoo Song [EFL][WK2] Add log macros for EINA_LOG_DOM_XXX series https://bugs.webkit.org/show_bug.cgi?id=97061 Reviewed by Gyuyoung Kim. EFL Webkit2 is using the EINA_LOG_DOM_XXX series in several places to log a message on the specified domain and format. This patch adds log macros to simplify these logging codes. * UIProcess/API/efl/ewk_main.cpp: (ewk_init): * UIProcess/API/efl/ewk_private.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_webprocess_crashed): 2012-09-17 Martin Robinson [WebKit2] [GTK] Add API for controlling the user agent https://bugs.webkit.org/show_bug.cgi?id=95697 Reviewed by Carlos Garcia Campos. Add API for changing the user agent in WebKit2. This adds two styles of setting the user agent: complete override and a method that just inserts the application name and version, but preserves the carefully crafted user agent in the library. * UIProcess/API/gtk/WebKitSettings.cpp: (_WebKitSettingsPrivate): Added a new field to store the user agent. This is stored in the private data structure, because we can only set the user agent when attaching the settings to the page. (webKitSettingsSetProperty): Add hooks for the new user agent property. (webKitSettingsGetProperty): Ditto. (webkit_settings_class_init): Ditto. (webkitSettingsAttachSettingsToPage): Ditto. (webkit_settings_get_user_agent): Added. (webkit_settings_set_user_agent): Added. (webkit_settings_set_user_agent_with_application_name): Added. * UIProcess/API/gtk/WebKitSettings.h: Added new methods. * UIProcess/API/gtk/WebKitWebView.cpp: Update the glue for the settings when attaching and detaching from WebViews. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: Test the new user agent property. (testWebKitSettingsUserAgent): Ditto. (beforeAll): Ditto. * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::standardUserAgent): Now use the shared WebCore code when setting the user agent. 2012-09-18 Ryuan Choi [EFL][WK2] Implement PageClientImpl::isViewFocused. https://bugs.webkit.org/show_bug.cgi?id=97015 Reviewed by Gyuyoung Kim. WebKit2/Efl always returns true for PageClientImpl::isViewFocused. So window.onblur events will not be generated when webview lost focus. This patch implements isViewFocused to return the current focus of webview. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::isViewFocused): 2012-09-18 Byungwoo Lee Title string should be changed when document.title is set to ''. https://bugs.webkit.org/show_bug.cgi?id=96793 Reviewed by Kenneth Rohde Christiansen. Added unit test for setting document.title and checking the title string with title,changed signal and ewk_view_title_get() function. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-18 Anders Carlsson Division by zero crash in BackingStore::scroll https://bugs.webkit.org/show_bug.cgi?id=97046 Reviewed by Dan Bernstein. It appears that DrawingAreaImpl::scroll can be called with an empty scroll rect. Do nothing if that's the case. Also, assert that the scrolling rect in BackingStoreMac is never empty. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::scroll): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::scroll): 2012-09-18 Bo Liu Revert 128780, 128676, 128645 https://bugs.webkit.org/show_bug.cgi?id=97022 Reviewed by Adam Barth. I made these revisions to add in-place reload behavior to ImagesEnabled setting. Reverting this for now due to them causing performance regression in chromium, possibly caused by increased calls to PermissionClient::imageAllowed. * win/WebKit2.def: 2012-09-18 Martin Robinson [GTK] [WebKit2] Use XComposite window for accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=94417 Reviewed by Carlos Garcia Campos. Instead of rendering directly to the widget's native window, render to an offscreen window redirected to a Pixmap with XComposite. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate): Added a few members necessary to track the offscreen window. (webkit_web_view_base_init): (renderAcceleratedCompositingResults): Added this helper functions which renders the results of the accelerated compositing operations during the GTK+ draw loop. (webkitWebViewBaseDraw): Call renderAcceleratedCompositingResults when appropriate. (resizeWebKitWebViewBaseFromAllocation): Resize the offscreen window when appropriate. (webkitWebViewBaseSizeAllocate): Do not call resizeWebKitWebViewBaseFromAllocation when the actual size of the widget does not change. This prevents destroying and recreating the offscreen window pixmap when it isn't necessary. (webkitWebViewBaseMap): We no longer send the window id during map, instead it's sent as soon as there is WebPageProxy. (webkitWebViewBaseCreateWebPage): Send the window id of the redirected window to the WebProcess. (queueAnotherDrawOfAcceleratedCompositingResults): Added this helper which works around the issue of slow updates of the pixmap backing the redirected XComposite window. (webkitWebViewBaseQueueDrawOfAcceleratedCompositingResults): Added this method which is what the WebProcess uses to force a redraw on the UIProcess side. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Added new method to the list of private methods. * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): Exposed this method publically so that it can be used from WebKitWebViewBase. * UIProcess/WebPageProxy.h: (WebPageProxy): Renamed widgetMapped to setAcceleratedCompositingWindowId. * UIProcess/WebPageProxy.messages.in: Ditto. * UIProcess/gtk/WebPageProxyGtk.cpp: Ditto. (WebKit::WebPageProxy::setAcceleratedCompositingWindowId): * WebProcess/WebPage/WebPage.h: (WebPage): Ditto. * WebProcess/WebPage/WebPage.messages.in: Ditto. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::sizeDidChange): Force a composite to the resized window right away so that the new window pixmap is updated before the first draw. (WebKit::LayerTreeHostGtk::compositeLayersToContext): If the composition is for a resize, first clear the entire GL context so that we don't see black artifacts during resize. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): Update the signature of compositeLayersToContext. * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::setAcceleratedCompositingWindowId): Added. 2012-09-18 Sheriff Bot Unreviewed, rolling out r128849. http://trac.webkit.org/changeset/128849 https://bugs.webkit.org/show_bug.cgi?id=97007 Causes test_ewk2_view to time out. (Requested by rakuco on #webkit). * UIProcess/API/efl/ewk_view.cpp: (ewk_view_webprocess_crashed): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_view_ui_client.cpp: (ewk_view_ui_client_attach): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2012-09-18 Carlos Garcia Campos [GTK] Set the area of tooltips in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=96618 Reviewed by Martin Robinson. In GTK+ tooltips are associated to a widget, if the mouse is moved inside the widget area, the tooltip position doesn't change even if the tooltip text changes. To support multiple tooltips for the same widget, we need to set the area of the widget for every tooltip. * Shared/WebHitTestResult.cpp: (WebKit::WebHitTestResult::Data::encode): Encode elementBoundingBox. (WebKit::WebHitTestResult::Data::decode): Decode elementBoundingBox. * Shared/WebHitTestResult.h: (Data): Add elementBoundingBox to WebHitTestResult::Data. (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Get the bounding box of the inner non shared node of the hit test result in window coordinates. (WebKit::WebHitTestResult::Data::Data): (WebKit::WebHitTestResult::elementBoundingBox): (WebHitTestResult): * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewMouseTargetChanged): Call webkitWebViewBaseSetTooltipArea. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseQueryTooltip): Use the tooltipArea if it's not empty. (webkitWebViewBaseSetTooltipArea): Set the tooltipArea. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 2012-09-18 Tor Arne Vestbø [Qt] Fix build without the QtQuick module Reviewed by Simon Hausmann. * Target.pri: 2012-09-17 Eunmi Lee [EFL][WK2] Add NativeWebTouchEvent and handle the Touch event. https://bugs.webkit.org/show_bug.cgi?id=90662 Reviewed by Gyuyoung Kim. Implement codes to handle touch event for WebKit2 EFL port. Additionally, types and structure for touch event are defined because they are not in the Evas. * PlatformEfl.cmake: * Shared/NativeWebTouchEvent.h: (NativeWebTouchEvent): * Shared/efl/NativeWebTouchEventEfl.cpp: Added. (WebKit): (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/efl/WebEventFactory.cpp: (WebKit): (WebKit::typeForTouchEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/efl/WebEventFactory.h: (WebEventFactory): * UIProcess/API/efl/ewk_touch.h: Added. 2012-09-17 Csaba Osztrogonác Unreviewed, rolling out r128826 and r128813. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit): (WebKit::JSNPObject::JSNPObject): * WebProcess/Plugins/Netscape/JSNPObject.h: (JSNPObject): 2012-09-17 Kent Tamura Export RuntimeEnabledFeatures::isLangAttributeAwareFormControlUIEnabled correctly https://bugs.webkit.org/show_bug.cgi?id=96855 Reviewed by Hajime Morita. * win/WebKit2.def: Remove a symbol * win/WebKit2CFLite.def: ditto. 2012-09-17 Byungwoo Lee [EFL][WK2] Add javascript popup API. https://bugs.webkit.org/show_bug.cgi?id=95672 Reviewed by Gyuyoung Kim. Add smart class member function for javascript alert(), confirm() and prompt(). * UIProcess/API/efl/ewk_view.cpp: (ewk_view_run_javascript_alert): (ewk_view_run_javascript_confirm): (ewk_view_run_javascript_prompt): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_view_ui_client.cpp: (runJavaScriptAlert): (runJavaScriptConfirm): (runJavaScriptPrompt): (ewk_view_ui_client_attach): * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added unit test for javascript popup smart class member function. (checkAlert): (TEST_F): (checkConfirm): (checkPrompt): 2012-09-17 Regina Chung [EFL][WK2] Regression (r128163) https://bugs.webkit.org/show_bug.cgi?id=96610 Reviewed by Gyuyoung Kim. While removing compile warnings r128163 changed the logic of code for entering accelerated compositing mode, resulting in never being able to enter it. Changed back to the correct code and fixed the compile warning by using an appropriate EINA macro. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_accelerated_compositing_mode_enter): Changed EINA_SAFETY_ON_NULL_RETURN_VAL to *if* condition statement. 2012-09-17 Sam Weinig Fix the Snow Leopard build. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitialize): 2012-09-17 Sam Weinig Add experimental code to enter a sandbox for a plug-in. Based on a patch by Ivan Krstić. Reviewed by Anders Carlsson. Enter a sandbox for a plug-in if a sandbox profile is found in /usr/share/sandbox/ that has the plug-ins bundle identifier for a name. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeSandbox): (WebKit::PluginProcess::platformInitialize): Enter the sandbox provided if a profile can be found. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: (enterSandbox): Factor out the core sandbox entering logic (so if can be used above) and make sure that Remote Save Panel is enabled. 2012-09-17 Mark Hahnenberg Fixing the build after http://trac.webkit.org/changeset/128813 * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit): (WebKit::JSNPObject::JSNPObject): * WebProcess/Plugins/Netscape/JSNPObject.h: (JSNPObject): 2012-09-17 Anders Carlsson Crash if we fail to allocate memory for the argument encoder buffer. https://bugs.webkit.org/show_bug.cgi?id=88367 Reviewed by Andreas Kling. Since there's no way to recover from malloc returning null here, just crash. * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::grow): 2012-09-17 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=96936 Opt into layers for fixed positioned elements for TiledDrawingArea Reviewed by Tim Horton. This code already exists in DrawingAreaImpl, and we need it for TiledCoreAnimationDrawingArea as well. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-09-17 Anders Carlsson Don't load a blocked plug-in if a non-blocked version of the same plug-in exists https://bugs.webkit.org/show_bug.cgi?id=96933 Reviewed by Andreas Kling. If a plug-in with the same bundle identifier already exists and it's blocked, remove it and replace it with the other version. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::shouldUsePlugin): 2012-09-17 Tor Arne Vestbø [Qt] Remove 'using namespace WebCore' from header file Broke the build on Mac OS X by causing clashes between Fixed from /usr/include/MacTypes.h and Source/WebCore/platform/Length.h. Reviewed by Simon Hausmann.. * UIProcess/PageViewportController.cpp: * UIProcess/PageViewportController.h: (PageViewportController): (WebKit::PageViewportController::contentsLayoutSize): (WebKit): * UIProcess/qt/PageViewportControllerClientQt.cpp: * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): 2012-09-15 Vivek Galatage WinCairo build fix due to missing symbols for setImagesEnabled and setStorageBlockingPolicy https://bugs.webkit.org/show_bug.cgi?id=96866 Reviewed by Kentaro Hara. Adding missing symbol defines in the def file to fix the build break for WinCairo * win/WebKit2CFLite.def: 2012-09-15 Jinwoo Song [EFL][WK2] Provide implementation for PageClientImpl::processDidCrash() https://bugs.webkit.org/show_bug.cgi?id=96197 Reviewed by Gyuyoung Kim. WebKit2 EFL does not have an implementation for PageClientImpl::processDidCrash(). So when WebProcess has crashed, UI process does nothing and is left alone as it is. This patch checks if loading was ongoing, if so, set the load progress as 1. Then send a signal callback "webprocess,crashed" for an application to handle it. If the application does not handle the crash event, show an Eina Log warning message with a url at web process exit and load an error page. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::processDidCrash): * UIProcess/API/efl/ewk_private.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_webprocess_crashed): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: 2012-09-15 Pierre Rossi [Qt] QDoc fixes for Qt 5 documentation https://bugs.webkit.org/show_bug.cgi?id=96796 Reviewed by Simon Hausmann. Fixup miscellaneous qdoc commands syntax. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qwebloadrequest.cpp: 2012-09-14 Gyuyoung Kim Add *explicit* keyword to constructors to WebKit2/UIProcess https://bugs.webkit.org/show_bug.cgi?id=96732 Reviewed by Kentaro Hara. As a step of *explicit* cleanup for constructors which have only one parameter, *explicit* is added to WebKit2/UIProcess in order to avoid implicit type conversion. * UIProcess/Authentication/AuthenticationDecisionListener.h: (AuthenticationDecisionListener): * UIProcess/Authentication/WebCredential.h: (WebCredential): * UIProcess/Authentication/WebProtectionSpace.h: (WebProtectionSpace): * UIProcess/GenericCallback.h: (WebKit::CallbackBase::CallbackBase): * UIProcess/InspectorServer/WebSocketServer.h: * UIProcess/ResponsivenessTimer.h: (ResponsivenessTimer): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebBackForwardList.h: (WebBackForwardList): * UIProcess/WebContextUserMessageCoders.h: (WebKit::WebContextUserMessageEncoder::WebContextUserMessageEncoder): * UIProcess/WebFullScreenManagerProxy.h: (WebFullScreenManagerProxy): * UIProcess/WebGrammarDetail.h: (WebGrammarDetail): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebNavigationData.h: (WebNavigationData): * UIProcess/WebOpenPanelResultListenerProxy.h: (WebOpenPanelResultListenerProxy): * UIProcess/WebPopupMenuProxy.h: (WebKit::WebPopupMenuProxy::WebPopupMenuProxy): * UIProcess/WebPreferences.h: (WebPreferences): 2012-09-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=96846 Tests failing on WK2 bots after giving fixed positioning its own stacking context Reviewed by Geoffrey Garen. Tests are failing because I checked in updated results that expect fixed positioning to create a stacking context. However, WebKitTestRunner does not enable ScrollingCoordinator, so the code that I added to enable stacking contexts for fixedPos is never actually running. This patch moves that code to a place where it will run for the testing tools, which matches the patch for WK1. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updatePreferences): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 2012-09-14 Julien Chaffraix Revert r127457 and following fixes due to several hit-testing regressions https://bugs.webkit.org/show_bug.cgi?id=96830 Reviewed by Antonio Gomes. This change reverts r127457, r127863 and r128505. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-14 Adam Barth Remove webkitPostMessage https://bugs.webkit.org/show_bug.cgi?id=96577 Reviewed by Ojan Vafai. Add ENABLE_LEGACY_VENDOR_PREFIXES flag. * Configurations/FeatureDefines.xcconfig: 2012-09-14 Jeffrey Pfau Allow third-party storage blocking setting to change while a page is loaded https://bugs.webkit.org/show_bug.cgi?id=95790 Reviewed by Brady Eidson. Inform plugins about changes to the storage blocking policy by way of the private browsing feature. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::storageBlockingStateChanged): (WebKit): * PluginProcess/PluginControllerProxy.h: (PluginControllerProxy): * PluginProcess/PluginControllerProxy.messages.in: Add WK2 message for storageBlockingStateChanged. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::storageBlockingStateChanged): (WebKit): (WebKit::NetscapePlugin::privateBrowsingStateChanged): (WebKit::NetscapePlugin::updateNPNPrivateMode): Set plugin's private browsing if either private browsing or storage blocking is enabled. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/PDF/BuiltInPDFView.h: (BuiltInPDFView): * WebProcess/Plugins/PDF/BuiltInPDFView.mm: Treat storageBlockingStateChanged as a no-op. (WebKit::BuiltInPDFView::storageBlockingStateChanged): (WebKit): * WebProcess/Plugins/Plugin.h: Add pure virtual storageBlockingStateChanged method. (Plugin): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::storageBlockingStateChanged): (WebKit): * WebProcess/Plugins/PluginProxy.h: (PluginProxy): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::storageBlockingStateChanged): (WebKit): * WebProcess/Plugins/PluginView.h: (PluginView): * win/WebKit2.def: 2012-09-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=96688 Put position:fixed elements in their own layers and allow them to create a stacking context -and corresponding- Reviewed by Simon Fraser. Soon we want pages with fixed positioned elements to be able to be scrolled by the ScrollingCoordinator. As a part of that work, we have to composite fixed position elements, and we have to allow those elements to create a stacking context. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 2012-09-14 Bo Liu Add in-place reload behavior to ImagesEnabled setting https://bugs.webkit.org/show_bug.cgi?id=95478 Reviewed by Adam Barth. Export WebCore::Settings::setImagesEnabled symbol. * win/WebKit2.def: 2012-09-14 Sudarsana Nagineni [EFL] RefPtr unit tests fails https://bugs.webkit.org/show_bug.cgi?id=96809 Reviewed by Kenneth Rohde Christiansen. Added missing return. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTest::EWK2UnitTestBase::canvas): 2012-09-14 Christophe Dumez WebKitTestRunner needs layoutTestController.dumpDatabaseCallbacks https://bugs.webkit.org/show_bug.cgi?id=57570 Reviewed by Kenneth Rohde Christiansen. Add new didExceedDatabaseQuota callback to WKBundlePageUIClient and call it from WebChromeClient::exceededDatabaseQuota(). This is needed by WebKitTestRunner to dump information about database callbacks. * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setDatabaseQuota): Call WebDatabaseManager::setQuotaForOrigin() with "file__0" instead of "file:///" as origin identifier. WebDatabaseManager expects a database identifier, not a string representation of the security origin. "file__0" is the string that is used as databaseIdentifier of local files. This bug was causing the database quota not to be set. The test cases would therefore fail due to the quota being 0 instead of the value explicitly set. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didExceedDatabaseQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exceededDatabaseQuota): 2012-09-14 Christophe Dumez WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads https://bugs.webkit.org/show_bug.cgi?id=42691 Reviewed by Kenneth Rohde Christiansen. Add WKBundleFrame private API to stop loading of a frame. This is needed by WebKitTestRunner to implement testrunner.setStopProvisionalFrameLoads. Original patch by Alexey Proskuryakov. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameStopLoading): * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::stopLoading): (WebKit): * WebProcess/WebPage/WebFrame.h: (WebFrame): 2012-09-14 Kenneth Rohde Christiansen [EFL] Add unit test for RefPtr https://bugs.webkit.org/show_bug.cgi?id=96776 Reviewed by Simon Hausmann. Basic testing of the new EFL specific RefPtr type. * PlatformEfl.cmake: * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTest::EWK2UnitTestBase::backingStore): (EWK2UnitTest::EWK2UnitTestBase::canvas): Add some new accessors for Ecore_Evas and Evas*. * UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp: Added. (TEST_F): 2012-09-14 Tor Arne Vestbø [Qt] Move .mm file to OBJECTIVE_SOURCES Reviewed by Simon Hausmann. * Target.pri: 2012-09-14 Sudarsana Nagineni WebKitTestRunner needs layoutTestController.setTabKeyCyclesThroughElements https://bugs.webkit.org/show_bug.cgi?id=42687 Reviewed by Kenneth Rohde Christiansen. Implement testRunner.setTabKeyCyclesThroughElements for WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetTabKeyCyclesThroughElements): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setTabKeyCyclesThroughElements): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-14 Keishi Hattori Add runtime flag that enables lang attribute for form controls in LayoutTests https://bugs.webkit.org/show_bug.cgi?id=96636 Reviewed by Kent Tamura. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-14 Grzegorz Czajkowski Add method to get the list of all available dictionaries https://bugs.webkit.org/show_bug.cgi?id=96518 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitTextChecker.cpp: (WebKitTextChecker::getSpellCheckingLanguages): Update the method name that is called inside getSpellCheckingLanguages. This replace doesn't affect any on API changes. 2012-09-13 KwangYong Choi [WK2] Add color picker API support for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=95058 Reviewed by Gyuyoung Kim. Add support for color picker API to WebKit2. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * Shared/APIObject.h: * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKColorPickerResultListener.cpp: Added. (WKColorPickerResultListenerGetTypeID): (WKColorPickerResultListenerColorSet): * UIProcess/API/C/WKColorPickerResultListener.h: Added. * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitUIClient.cpp: (attachUIClientToView): * UIProcess/WebColorChooserProxy.cpp: Added. (WebKit): (WebKit::WebColorChooserProxy::WebColorChooserProxy): (WebKit::WebColorChooserProxy::~WebColorChooserProxy): (WebKit::WebColorChooserProxy::endChooser): (WebKit::WebColorChooserProxy::setSelectedColor): * UIProcess/WebColorChooserProxy.h: (WebColorChooserProxy): (WebKit::WebColorChooserProxy::create): * UIProcess/WebColorPickerResultListenerProxy.cpp: Added. (WebKit): (WebKit::WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::~WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::invalidate): (WebKit::WebColorPickerResultListenerProxy::setColor): * UIProcess/WebColorPickerResultListenerProxy.h: Added. (WebKit): (WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::create): (WebKit::WebColorPickerResultListenerProxy::type): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::showColorChooser): (WebKit::WebPageProxy::didEndColorChooser): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebUIClient.cpp: (WebKit): (WebKit::WebUIClient::showColorPicker): (WebKit::WebUIClient::hideColorPicker): * UIProcess/WebUIClient.h: (WebKit): (WebUIClient): * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Generated.make: 2012-09-13 KwangYong Choi [EFL][WK2] Implement missing initializeLogChannel function https://bugs.webkit.org/show_bug.cgi?id=96478 Reviewed by Gyuyoung Kim. Implemented log channel initialization function for EFL platform in WebKit2. * Platform/Logging.cpp: (WebKit): * Platform/Logging.h: (WebKit): * Platform/efl/LoggingEfl.cpp: Added. (WebKit): (WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG. * PlatformEfl.cmake: 2012-09-13 Mark Rowe WebKit looks for some files on the system even when building against an SDK. Reviewed by David Kilzer. If an SDK is being used, pass it through to our custom invocations of the preprocessor. * DerivedSources.make: 2012-09-13 Brent Fulgham [WinCairo] Unreviewed build fix for export declarations. New entries were added to the standard Windows export definition file, but were not added to the WinCairo version, breaking the build. * win/WebKit2CFLite.def: Incoproate changes from WebKit2.def file. 2012-09-13 Tim Horton Add optional debug logging when we fall into/out of threaded scrolling https://bugs.webkit.org/show_bug.cgi?id=93898 Reviewed by Simon Fraser. Update the scrolling tree's scrollingPerformanceLoggingEnabled preference before the early-return if we don't have layer debugging borders on. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-09-13 Sudarsana Nagineni [WK2][WTR] WebKitTestRunner needs testRunner.callShouldCloseOnWebView https://bugs.webkit.org/show_bug.cgi?id=96366 Reviewed by Anders Carlsson. Implement testRunner.callShouldCloseOnWebView for WebKitTestRunner by calling shouldClose() on the FrameLoader. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameCallShouldCloseOnWebView): * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: 2012-09-13 Thiago Marcos P. Santos [EFL] Assertion reached on RenderThemeEFL when setting a theme to an invalid path https://bugs.webkit.org/show_bug.cgi?id=96649 Reviewed by Kenneth Rohde Christiansen. Updated the alternative test theme file. It is basically the default theme with extra padding on the button widget as specified by the comments on the test case. * UIProcess/API/efl/tests/resources/big_button_theme.edj: 2012-09-13 Balazs Kelemen [WK2] LayerTreeCoordinator should release unused UpdatedAtlases https://bugs.webkit.org/show_bug.cgi?id=95072 Reviewed by Jocelyn Turcotte. Release graphic buffers that haven't been used for a while in order to save memory. This way we can give back memory to the system when no user interaction happens after a period of time, for example when we are in the background. * Shared/ShareableBitmap.h: * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::beginContentUpdate): (WebKit): (WebKit::LayerTreeCoordinator::scheduleReleaseInactiveAtlases): (WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::didSwapBuffers): Don't call buildLayoutIfNeeded here. It's enought to call it in beginPaintingOnAvailableBuffer and this way we can track whether this atlas is used with m_areaAllocator. (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/UpdateAtlas.h: (WebKit::UpdateAtlas::addTimeInactive): (WebKit::UpdateAtlas::isInactive): (WebKit::UpdateAtlas::isInUse): (UpdateAtlas): 2012-09-13 Lauro Neto [Qt][WK2] fast/forms/access-key-for-all-elements.html fails https://bugs.webkit.org/show_bug.cgi?id=73917 Reviewed by Simon Hausmann. Access-key tests were failing due to hardcoded Mac OS X in the Qt WK2 user agent string. This commit moves the WK1 implementation to a shared one to be used by both versions. Use the shared implementation instead of hardcoding the user agent. * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::standardUserAgent): 2012-09-13 Simon Hausmann [Qt] Fix build of WTR and the QML2 plugin on Windows https://bugs.webkit.org/show_bug.cgi?id=96652 Reviewed by Tor Arne Vestbø. Some components that we build such as WTR or the QML2 plugin include WebKit2 header files as well as WebKit2's config.h. Only the include paths of WebKit2 are required for that at the moment (WEBKIT += webkit2). Only on Windows WebKit2's config.h also includes WebCore/config.h, which in turn requires to have WebCore/platform in your include search path. That in turn means that any component that wants to use WebKit2 headers also needs the WebCore headers, but only one Windows. It turns out that for the Qt build we don't need it, so skip it in our configuration and make the include path requirement the same across all the platforms we build. * config.h: 2012-09-13 Andras Becsi [Qt][WK2] REGRESSION(r128245): It made zillion API tests fail https://bugs.webkit.org/show_bug.cgi?id=96531 Reviewed by Jocelyn Turcotte. Preferences have to be updated after the drawing area was created for compositing mode to be set. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-09-13 Simon Hausmann [Qt] Fix UIProcess build with Qt on Windows https://bugs.webkit.org/show_bug.cgi?id=96635 Reviewed by Csaba Osztrogonác. Enabling setShouldCloseConnectionOnProcessTermination on the connection is something that is only implemented in ConnectionUnix, not ConnectionWin.cpp, where appears to be built-in functionality. * UIProcess/WebConnectionToWebProcess.cpp: (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess): 2012-09-13 Oswald Buddenhagen [Qt] Fix build against namespaced Qt Reviewed by Tor Arne Vestbø. * UIProcess/qt/PageViewportControllerClientQt.h: 2012-09-13 Michał Pakuła vel Rutka [EFL][Qt][WK2] Implement shared undo controller for EFL and Qt port. https://bugs.webkit.org/show_bug.cgi?id=92504 Reviewed by Kenneth Rohde Christiansen. EFL port needs an undo controller similiar to one from Qt port. Instead of duplicating the code existing class was renamed and moved to UIProcess directory. * PlatformEfl.cmake: * Target.pri: * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::registerEditCommand): (WebKit::PageClientImpl::clearAllEditCommands): (WebKit::PageClientImpl::canUndoRedo): (WebKit::PageClientImpl::executeUndoRedo): * UIProcess/API/efl/PageClientImpl.h: (PageClientImpl): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/DefaultUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.cpp. (WebKit): (WebKit::DefaultUndoController::registerEditCommand): (WebKit::DefaultUndoController::clearAllEditCommands): (WebKit::DefaultUndoController::canUndoRedo): (WebKit::DefaultUndoController::executeUndoRedo): * UIProcess/DefaultUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.h. (WebKit): (DefaultUndoController): * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::initialize): * UIProcess/qt/QtPageClient.h: (WebKit): (QtPageClient): 2012-09-13 Christophe Dumez [EFL][WK2] Make _ref() functions return the object https://bugs.webkit.org/show_bug.cgi?id=96604 Reviewed by Gyuyoung Kim. Make _ref() functions return the ref'd object to make them more convenient to use. Also fix their usage to make use of the newly returned value. This change is consistent with eina_stringshare_ref() in EFL and g_object_ref() in glib. * UIProcess/API/efl/ewk_back_forward_list.cpp: (createEinaList): * UIProcess/API/efl/ewk_back_forward_list_item.cpp: (ewk_back_forward_list_item_ref): * UIProcess/API/efl/ewk_back_forward_list_item.h: * UIProcess/API/efl/ewk_context.cpp: (ewk_context_download_job_add): * UIProcess/API/efl/ewk_download_job.cpp: (ewk_download_job_ref): (ewk_download_job_response_set): * UIProcess/API/efl/ewk_download_job.h: * UIProcess/API/efl/ewk_form_submission_request.cpp: (ewk_form_submission_request_ref): * UIProcess/API/efl/ewk_form_submission_request.h: * UIProcess/API/efl/ewk_intent.cpp: (ewk_intent_ref): * UIProcess/API/efl/ewk_intent.h: * UIProcess/API/efl/ewk_intent_service.cpp: (ewk_intent_service_ref): * UIProcess/API/efl/ewk_intent_service.h: * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: (ewk_navigation_policy_decision_ref): * UIProcess/API/efl/ewk_navigation_policy_decision.h: * UIProcess/API/efl/ewk_url_request.cpp: (ewk_url_request_ref): * UIProcess/API/efl/ewk_url_request.h: * UIProcess/API/efl/ewk_url_response.cpp: (ewk_url_response_ref): * UIProcess/API/efl/ewk_url_response.h: * UIProcess/API/efl/ewk_url_scheme_request.cpp: (ewk_url_scheme_request_ref): * UIProcess/API/efl/ewk_url_scheme_request.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_resource_load_initiated): * UIProcess/API/efl/ewk_web_resource.cpp: (ewk_web_resource_ref): * UIProcess/API/efl/ewk_web_resource.h: 2012-09-12 Sheriff Bot Unreviewed, rolling out r127876. http://trac.webkit.org/changeset/127876 https://bugs.webkit.org/show_bug.cgi?id=96600 mouse click doesn't work for spin button if spin button in iframe (Requested by yosin on #webkit). * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/WebPage/WebPage.cpp: (WebKit::handleContextMenuEvent): (WebKit::WebPage::highlightPotentialActivation): (WebKit::WebPage::findZoomableAreaForPoint): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::characterIndexForPoint): (WebKit::WebPage::performDictionaryLookupAtLocation): (WebKit::WebPage::shouldDelayWindowOrderingEvent): (WebKit::WebPage::acceptsFirstMouse): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-12 Brady Eidson Assert in NetscapePlugin::destroy() with async plugin init and https://bugs.webkit.org/show_bug.cgi?id=96576 Reviewed by Anders Carlsson. Most of the NPN_* API calls have a plug-in protector during the calls. NPN_Invoke and NPN_InvokeDefault do not. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_Invoke): Protect the plug-in during this call. (WebKit::NPN_InvokeDefault): Ditto. 2012-09-11 Alexey Proskuryakov REGRESSION(r127384): Non-existent directories are no longer created for sandbox paths https://bugs.webkit.org/show_bug.cgi?id=96442 Reviewed by Darin Adler. * Shared/SandboxExtension.h: (WebKit::SandboxExtension::createHandleForReadWriteDirectory): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandleForReadWriteDirectory): Added a function for read-write configuration directories. It matches appendReadwriteSandboxDirectory() function behavior from WebProcessMac.mm. * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Use the new function for directories that need to be created if they don't exist. 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement originsWithApplicationCache https://bugs.webkit.org/show_bug.cgi?id=96496 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to retrieve security origins with an application cache. This is needed by WebKitTestRunner to support originsWithApplicationCache. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleCopyOriginsWithApplicationCache): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::originsWithApplicationCache): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement dumpApplicationCacheDelegateCallbacks https://bugs.webkit.org/show_bug.cgi?id=96374 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to reset the application cache quota for a given origin. Add new reachedApplicationCacheOriginQuota callback to WKBundlePageUIClient which is called from WebChromeClient::reachedApplicationCacheOriginQuota(). Those are needed by WebKitTestRunner to dump information about the application cache callbacks if instructed to. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): (WKBundleResetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-12 Sheriff Bot Unreviewed, rolling out r128280. http://trac.webkit.org/changeset/128280 https://bugs.webkit.org/show_bug.cgi?id=96498 it broke compilation on windows debug bot (Requested by loislo on #webkit). * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): 2012-09-12 Byungwoo Lee [EFL][WK2] WorkQueue::dispatchAfterDelay() doesn't work properly. https://bugs.webkit.org/show_bug.cgi?id=91179 Reviewed by Gyuyoung Kim. When UI Process is crashed and WebProcess's ecore main loop is very busy or lockup also, watchdocCallback() function in the ChildProcess.cpp doesn't triggered. And this is because of that WorkQueue::dispatchAfterDelay() function uses ecore timer for getting timer event. For removing the dependency between the dispatchAfterDelay() and ecore main loop, new timer event mechanism is added to WorkQueue main loop. * Platform/WorkQueue.h: (TimerWorkItem): (WorkQueue::TimerWorkItem::dispatch): (WorkQueue::TimerWorkItem::expireTime): (WorkQueue::TimerWorkItem::expired): (WorkQueue): * Platform/efl/WorkQueueEfl.cpp: (WorkQueue::TimerWorkItem::create): (WorkQueue::TimerWorkItem::TimerWorkItem): (WorkQueue::performFileDescriptorWork): (WorkQueue::getCurrentTime): (WorkQueue::getNextTimeOut): (WorkQueue::performTimerWork): (WorkQueue::workQueueThread): (WorkQueue::dispatchAfterDelay): 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement dumpApplicationCacheDelegateCallbacks https://bugs.webkit.org/show_bug.cgi?id=96374 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to reset the application cache quota for a given origin. Add new reachedApplicationCacheOriginQuota callback to WKBundlePageUIClient which is called from WebChromeClient::reachedApplicationCacheOriginQuota(). Those are needed by WebKitTestRunner to dump information about the application cache callbacks if instructed to. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): (WKBundleResetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): 2012-09-12 Mikhail Pozdnyakov [WK2] [WTR] WebKitTestRunner needs TestRunner.workerThreadCount https://bugs.webkit.org/show_bug.cgi?id=96388 Reviewed by Kenneth Rohde Christiansen. Added WKBundleGetWorkerThreadCount() function to Injected Bundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleGetWorkerThreadCount): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::workerThreadCount): Returns count of worker threads. (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-12 Darin Adler Make NetscapePlugin::m_timers use HashMap instead of deleteAllValues https://bugs.webkit.org/show_bug.cgi?id=96469 Reviewed by Dan Bernstein. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): Call release rather than leakPtr when entering a timer into the map. (WebKit::NetscapePlugin::unscheduleTimer): Take an existing timer from the map with the take function rather than the roundabout code needed before. (WebKit::NetscapePlugin::destroy): Remove now-unneeded call to deleteAllValues. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Change the value type for TimerMap to OwnPtr rather than Timer*. 2012-09-11 Anders Carlsson Accelerated compositing should always be forced when using the tiled drawing area https://bugs.webkit.org/show_bug.cgi?id=96449 Reviewed by Andy Estes. There's code in WebPage::updatePreferences that will turn off accelerated compositing unless accelerated drawing is enabled. This should only be done in the non-tiled model, so move the code to DrawingAreaImpl::updatePreferences. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updatePreferences): This now takes a WebPreferencesStore. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updatePreferences): Move code here from WebPage::updatePreferences. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Pass the WebPreferencesStore to DrawingArea::updatePreferences. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Remove call to updatePreferences, it's going to be called by the WebPage object later. (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): This now takes a WebPreferencesStore. 2012-09-11 Brady Eidson Get rid of the PluginProcessShim for 64-bit plug-ins and https://bugs.webkit.org/show_bug.cgi?id=96415 Reviewed by Anders Carlsson. * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/mac/PluginProcessMac.mm: (WebKit::getCurrentEventButtonState): (WebKit): (WebKit::beginModal): Moved from the shim, to be shared with shimmed processes. (WebKit::endModal): Ditto. (WebKit::replacedRunModalForWindow): Only used by Cocoa overrides. (WebKit::PluginProcess::initializeShim): (WebKit::PluginProcess::initializeCocoaOverrides): * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Only call initializeShim for 32-bit processes, always call initializeCocoaOverrides * PluginProcess/mac/PluginProcessShim.h: (PluginProcessShimCallbacks): * PluginProcess/mac/PluginProcessShim.mm: (WebKit): (WebKit::shimModalDialog): Call beginModal/endModal from the shim callbacks. (WebKit::shimAlert): Ditto. (WebKit::WebKitPluginProcessShimInitialize): Don't do the Cocoa overrides as they are now handled outside the shim. 2012-09-11 Marcelo Lira Restore original value of mock scrollbars enabled in InternalSettings https://bugs.webkit.org/show_bug.cgi?id=87680 Reviewed by Adam Barth. Added backup support for mock scrollbars state in InternalSettings::Backup, and removed support for these from Qt's DumpRenderTree. * win/WebKit2.def: 2012-09-11 Brady Eidson We should wait longer before killing the PluginProcess. and https://bugs.webkit.org/show_bug.cgi?id=96407 Reviewed by Anders Carlsson. Currently we kill the PluginProcess 15 seconds after the last plug-in is destroyed. This is short enough that most users will have the process killed many times during browsing sessions, which is painful because relaunching the process is I/O and kernel intensive. In an ideal world we could keep it around forever until the system tells us resources are running low. In reality we do want to kill it occasionally to get a clean slate from any plug-in leaks. A reasonable balance for now is to set a minimum lifetime of 30 minutes on the plug-in process and to extend the termination timer from 15 seconds to 10 minutes. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::PluginProcess): (WebKit::PluginProcess::initializePluginProcess): (WebKit::PluginProcess::setMinimumLifetime): (WebKit): (WebKit::PluginProcess::minimumLifetimeTimerFired): * PluginProcess/PluginProcess.h: (PluginProcess): * Shared/Plugins/PluginProcessCreationParameters.cpp: (WebKit::PluginProcessCreationParameters::encode): (WebKit::PluginProcessCreationParameters::decode): * Shared/Plugins/PluginProcessCreationParameters.h: (PluginProcessCreationParameters): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit): (WebKit::PluginProcessProxy::didFinishLaunching): 2012-09-11 Jinwoo Song Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places https://bugs.webkit.org/show_bug.cgi?id=96344 Reviewed by Benjamin Poulain. Use StringBuilder::appendNumber() instead of String::number(). Also deploy StringBuilder::appendLiteral() instead of String::append() in the surrounding code. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): * UIProcess/InspectorServer/WebSocketServerConnection.cpp: (WebKit::WebSocketServerConnection::sendHTTPResponseHeader): * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: (WebKit::WebInspectorServer::inspectorUrlForPageID): (WebKit::WebInspectorServer::buildPageList): 2012-09-11 Anders Carlsson Fix speling error in comment. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::isTransparentSilverlightBackgroundValue): 2012-09-11 Raphael Kubo da Costa [EFL] Rewrite the EFL-related Find modules https://bugs.webkit.org/show_bug.cgi?id=95237 Reviewed by Kenneth Rohde Christiansen. * CMakeLists.txt: Stop setting the LINK_FLAGS property. * PlatformEfl.cmake: Add libraries and include directories for each Enlightenment Foundation Library used by the port. 2012-09-11 Christophe Dumez [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota https://bugs.webkit.org/show_bug.cgi?id=96379 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to set the application cache quota for a given security origin. This is needed by WebKitTestRunner to implement setApplicationCacheOriginQuota(). * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Mikhail Pozdnyakov [WK2][WTR] WebKitTestRunner needs testRunner.setSpatialNavigationEnabled https://bugs.webkit.org/show_bug.cgi?id=96269 Reviewed by Kenneth Rohde Christiansen. Added a new setter for spacial navigation enabling to Injected Bundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetSpatialNavigationEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setSpatialNavigationEnabled): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Marcelo Lira [Qt][WK2] Page loading status API lacks a status for intentionally stopped loading https://bugs.webkit.org/show_bug.cgi?id=83062 Reviewed by Tor Arne Vestbø. When the loading of a page is intentionally interrupted, the loading status is set to the new state LoadStoppedStatus. This reflects reality more accurately because the page was not fully loaded (a LoadSucceededStatus), and it wasn't an unexpected error (a LoadFailedStatus). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::loadDidStop): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::dispatchLoadStopped): (WebKit): (WebKit::QtWebPageLoadClient::dispatchLoadFailed): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-09-11 Tor Arne Vestbø [Qt] Add a configure step to the Qt build system This allows building the Qt port using just 'qmake WebKit.pro'. Using the build-webkit script is still supported, and will add slightly more logic to the build, such as detecting the need for clean or incremental builds. Internally, the build system now uses a new variable, WEBKIT_CONFIG, for all things related to configuring the build, such as use/have/enable flags, and these are translated to defines in default_post. Project files should no longer check contains(DEFINES,...) to detect features, but use the new enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2 options have been translated into WEBKIT_CONFIG options as well, and can be checked using build?(). Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/tests/tests.pri: * WebKit2.pri: * config.h: 2012-09-11 Christophe Dumez [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin https://bugs.webkit.org/show_bug.cgi?id=96372 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to clear the application cache for a given origin. This is needed by WebKitTestRunner to implement clearApplicationCacheForOrigin(). * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleClearApplicationCacheForOrigin): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::clearApplicationCacheForOrigin): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Mikhail Pozdnyakov [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval https://bugs.webkit.org/show_bug.cgi?id=96256 Reviewed by Kenneth Rohde Christiansen. Added new setter for minimum DOM timer interval to InjectedBundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetMinimumTimerInterval): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setMinimumTimerInterval): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Kangil Han [WK2][EFL] Fix compile warnings when enable tiled backing store https://bugs.webkit.org/show_bug.cgi?id=95342 Reviewed by Gyuyoung Kim. Fixed compile time warning messages when enable tiled backing store. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_accelerated_compositing_mode_enter): Fixed invalid use of 'EINA_SAFETY_ON_NULL_RETURN_VAL' since it used '!' ahead of evasGl value so it is always null. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setChildren): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::renderNextFrame): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. (WebKit::LayerTreeCoordinator::beginContentUpdate): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. 2012-09-11 Byungwoo Lee [EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare. https://bugs.webkit.org/show_bug.cgi?id=96201 Reviewed by Kenneth Rohde Christiansen. WKEinaSharedString needs a to adopt eina stringshare directly. With this adopt function, an instance that is directly created with eina_stringshare_add() can be easily handled by WKEinaSharedString without calling eina_stringshare_del() for preventing memory leak. * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: (WKEinaSharedString::adopt): * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: (TEST_F): 2012-09-11 Andras Becsi [Qt][WK2] Fix the build with recent Qt5 https://bugs.webkit.org/show_bug.cgi?id=96283 Reviewed by Simon Hausmann. We should not use deprecated Qt API because doing that results in build failure since all the deprecated API was disabled in qtbase (https://codereview.qt-project.org/#change,24890). * UIProcess/API/qt/qwebnavigationhistory.cpp: (QWebNavigationListModel::roleNames): (QWebNavigationListModel::reset): * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: (WebView::load): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (PopupMenuItemModel): (WebKit::PopupMenuItemModel::PopupMenuItemModel): (WebKit::PopupMenuItemModel::roleNames): (WebKit): 2012-09-11 Christophe Dumez WTR needs an implementation of applicationCacheDiskUsageForOrigin https://bugs.webkit.org/show_bug.cgi?id=87188 Reviewed by Kenneth Rohde Christiansen. Add Bundle private C API to retrieve the application cache usage for a specific security origin. This is needed by WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleGetAppCacheUsageForOrigin): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::appCacheUsageForOrigin): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Zhigang Gong [EFL][WK2] Add necessary include directory in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=95173 Unreviewed build fix. revision r126694: Move TextureMapperGL to use GraphicsContext3D. modify the TextureMapperGL.h to include GraphicsContext3D.h. And when enable TEXTURE_MAPPER, file WebKit2/Shared/ShareableSurface.cpp will include TextureMapperGL.h then depends on GraphicsContext3D.h thus it need to add ANGLE director. As currently, this problem only affect EFL platform, according to Gyuyoung Kim's suggestion, we add this include dir into EFL private file PlatformEfl.cmake. Otherwise, the build will fail. To trigger this problem by using the following command: ./Tools/Scripts/build-webkit --efl --3d-rendering --tiled-backing-store * CMakeLists.txt: 2012-09-10 Byungwoo Lee [EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp. https://bugs.webkit.org/show_bug.cgi?id=95990 Reviewed by Gyuyoung Kim. Fix build warning about extended initializer lists only available with -std=c++0x or -std=gnu++0x. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass): (EWK2UnitTest): (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase): 2012-09-10 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=96158 Need API to suppress scrollbar animations -and corresponding- Reviewed by Sam Weinig. Add suppressScrollbarAnimations as a WebCreationParameter. * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): New API. Calls into the web process for the setter but not the getter. * UIProcess/API/C/WKPage.cpp: (WKPageSetSuppressScrollbarAnimations): (WKPageAreScrollbarAnimationsSuppressed): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setSuppressScrollbarAnimations): (WebKit): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: (WebPageProxy): (WebKit::WebPageProxy::areScrollbarAnimationsSuppressed): * WebProcess/WebPage/WebPage.messages.in: Call into WebCore. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setSuppressScrollbarAnimations): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): This ScrollableArea area function is re-named by this patch in WebCore. * WebProcess/Plugins/PDF/BuiltInPDFView.h: * WebProcess/Plugins/PDF/BuiltInPDFView.mm: (WebKit::BuiltInPDFView::scrollbarsCanBeActive): 2012-09-10 James Robinson Unreviewed, rolling out r127837. http://trac.webkit.org/changeset/127837 https://bugs.webkit.org/show_bug.cgi?id=93898 Broke ScrollingCoordinator on chromium * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-09-10 Jer Noble Unreviewed; rolling out r128081. http://trac.webkit.org/changeset/128081 https://bugs.webkit.org/show_bug.cgi?id=96134 New test http/tests/media/video-donottrack.html fails to run on Apple test bots. * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-09-07 Jon Lee Update notifications to latest spec https://bugs.webkit.org/show_bug.cgi?id=91726 Reviewed by Alexey Proskuryakov. Expose lang and dir. * UIProcess/API/C/WKNotification.cpp: (WKNotificationCopyLang): (WKNotificationCopyDir): * UIProcess/API/C/WKNotification.h: * UIProcess/Notifications/WebNotification.cpp: (WebKit::WebNotification::WebNotification): * UIProcess/Notifications/WebNotification.h: (WebKit::WebNotification::create): (WebKit::WebNotification::lang): (WebKit::WebNotification::dir): (WebNotification): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showNotification): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): 2012-09-10 Alexey Proskuryakov Build fix. * UIProcess/WebContext.h: Added a default value for relatedPage argment - if you don't have one, null is fine. 2012-09-10 Alexey Proskuryakov [WK2] Add an API to open a page in same process https://bugs.webkit.org/show_bug.cgi?id=96306 Reviewed by Anders Carlsson. The name "related" inspired by . * UIProcess/API/mac/WKView.h: Added an API. It's unwieldy, but I blame WKBrowsingContextGroup, not the related view. * UIProcess/API/mac/WKViewPrivate.h: Matching SPI for clients that mostly use C APIs. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:processGroup:browsingContextGroup:]): Use new back-end signature. (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]): Get page from WKView, and call back-end. (-[WKView initWithFrame:contextRef:pageGroupRef:]): Reimplement existing method by calling new, more powerful one. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Just one change, pass relatedPage to the context. * UIProcess/WebContext.cpp: (WebKit::WebContext::createWebPage): If related page is not null, use its process. * UIProcess/WebContext.h: (WebContext): Updated createWebPage signature. 2012-09-10 Brady Eidson Javascript in foreground tabs should not wait synchronously for plug-ins to load and https://bugs.webkit.org/show_bug.cgi?id=96167 Reviewed by Geoff Garen. Synchronously waiting for initialization to complete when javascript accesses the plug-in script object severely reduces the effectiveness of having an asynchronous NPP_New. Such as with background tabs that have never been viewed, we already have cases where JS calls into the plug-in element fail because we haven't bothered to initialize the plug-in. We get a huge win by expanding that to foreground tabs that simply haven't finished initializing their plug-ins. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::scriptObject): If initialization is not complete just return 0 - They can get at the script object later. Remove the notion of "wait for asynchronous initialization" altogether: * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/PDF/BuiltInPDFView.h: (BuiltInPDFView): * WebProcess/Plugins/Plugin.h: (Plugin): * WebProcess/Plugins/PluginProxy.cpp: * WebProcess/Plugins/PluginProxy.h: (PluginProxy): 2012-09-07 Jer Noble