2012-10-03 Kangil Han Fix unused parameter compile warnings. https://bugs.webkit.org/show_bug.cgi?id=98243 Reviewed by Alexey Proskuryakov. Fixed unused parameter compile warnings by removing parameter names, adding UNUSED_PARAM usage and commenting out. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginInternal): * PluginProcess/unix/PluginProcessUnix.cpp: (WebKit::PluginProcess::platformInitialize): * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::getOwnPropertyNames): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_RequestRead): (WebKit::NPN_NewStream): (WebKit::NPN_Write): (WebKit::NPN_MemFlush): (WebKit::NPN_ReloadPlugins): (WebKit::NPN_GetJavaPeer): (WebKit::NPN_InvalidateRegion): (WebKit::NPN_ForceRedraw): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::contentsScaleFactorChanged): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPostInitializeWindowed): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::contentsScaleFactorChanged): 2012-10-03 Anders Carlsson Plugins are killed after 45 seconds if showing keychain "Allow/Deny" dialog https://bugs.webkit.org/show_bug.cgi?id=85138 Reviewed by Andreas Kling. Remove the watchdog that would kill a plug-in if we've been waiting for a sync reply from it for more than 45 seconds. It's unlikely that someone is going to wait 45 seconds for Safari to recover from a plug-in hang, and the timeout is causing problems with plug-ins (see the bugzilla bug for more information). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): (CoreIPC::Connection::waitForSyncReply): * Platform/CoreIPC/Connection.h: (Client): (Connection): * PluginProcess/PluginProcess.cpp: * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/WebProcessConnection.cpp: * PluginProcess/WebProcessConnection.h: (WebProcessConnection): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * UIProcess/Plugins/PluginProcessManager.cpp: * UIProcess/Plugins/PluginProcessManager.h: (PluginProcessManager): * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/PluginProcessProxy.h: (PluginProcessProxy): * UIProcess/WebConnectionToWebProcess.cpp: * UIProcess/WebConnectionToWebProcess.h: (WebConnectionToWebProcess): * UIProcess/WebProcessProxy.cpp: * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/WebProcessProxy.messages.in: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::PluginProcessConnection): * WebProcess/Plugins/PluginProcessConnection.h: (PluginProcessConnection): * WebProcess/WebConnectionToUIProcess.cpp: * WebProcess/WebConnectionToUIProcess.h: (WebConnectionToUIProcess): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): * WebProcess/WebProcess.h: (WebProcess): 2012-10-03 Hugo Parente Lima [WK2] PageViewportController.cpp is supposed to be a generic WebKit2 file but only works with Qt port. https://bugs.webkit.org/show_bug.cgi?id=98186 Reviewed by Noam Rosenthal. Remove the dependece of WebCore::FloatSize to QSize implicit conversion. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::updateViewportSize): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::viewportSizeInContentsCoordinates): (WebKit): * UIProcess/PageViewportController.h: (PageViewportController): 2012-10-03 Anders Carlsson Try to fix the Qt WebKit2 failures. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): Always force compositing if USE(COORDINATED_GRAPHICS) is true. 2012-10-03 Anders Carlsson Use the XPC service by default on newer systems https://bugs.webkit.org/show_bug.cgi?id=98297 Reviewed by Sam Weinig. * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::shouldUseXPC): Return false for older systems. (WebKit::WebProcessProxy::platformConnect): Call shouldUseXPC(). 2012-10-02 Andy Estes [WebKit2] Add the ability to send messages to the WebPageGroupProxy https://bugs.webkit.org/show_bug.cgi?id=98233 Reviewed by Anders Carlsson. Add a WebPageGroupProxy.messages.in, implement a stub message receiver in WebPageGroupProxy, and teach WebProcess how to route messages to the appropriate WebPageGroupProxy. * CMakeLists.txt: Tell a build system about added files. * DerivedSources.make: Ditto. * DerivedSources.pri: Ditto. * GNUmakefile.list.am: Ditto. * WebKit2.xcodeproj/project.pbxproj: Ditto. * win/WebKit2.vcproj: Ditto. * Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy. * WebProcess/WebPage/WebPageGroupProxy.cpp: (WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method that will receive messages. (WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub out a method that will exist in WebPageGroupProxyMessageReceiver.cpp once WebPageGroupProxy.messages.in contains messages. * WebProcess/WebPage/WebPageGroupProxy.h: * WebProcess/WebPage/WebPageGroupProxy.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): Route messages to the WebPageGroupProxy matching destinationID if the message is of class MessageClassWebPageGroupProxy. 2012-10-02 Anders Carlsson Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory https://bugs.webkit.org/show_bug.cgi?id=98217 Reviewed by Andreas Kling. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::createPageOverlayLayer): * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): (WebKit::LayerTreeHostCA::createPageOverlayLayer): * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::initialize): (WebKit::LayerTreeHostGtk::createPageOverlayLayer): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2012-10-03 Alberto Garcia [GTK] [WK2] Unused variable in webkitWebViewLoadChanged https://bugs.webkit.org/show_bug.cgi?id=98271 Reviewed by Martin Robinson. Use the priv variable to directly access private attributes instead of dereferencing webView->priv all the time. Fixes -Wunused-variable. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadChanged): 2012-10-03 Christophe Dumez [EFL][WK2] Implement focus/unfocus in UIClient https://bugs.webkit.org/show_bug.cgi?id=98253 Reviewed by Gyuyoung Kim. Implement focus-related functionality in WebKitEFL's UIClient. * UIProcess/API/efl/ewk_view_ui_client.cpp: (focus): (unfocus): (takeFocus): (ewk_view_ui_client_attach): 2012-10-03 Carlos Garcia Campos [GTK] WebKitWebView doesn't emit notify:favicon when it changes in some cases in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=98153 Reviewed by Martin Robinson. The main problem is that it relies on icon-ready signal to be emitted by the favicon database, but that signal is only emitted when the icon is loaded from the network or imported from the database, but not when the icon is already in memory. The way to detect if a web page doesn't have a favicon or it's unknown it's also incorrectly done and the wrong error is returned for pages not having a favicon. * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: (GetFaviconSurfaceAsyncData): Add a GError field. (getIconSurfaceSynchronously): Add a GError parameter and fill it accordingly. Use imageForPageURL() instead of nativeImageForPageURL() because the latter always returns NULL for empty images, so it's not possible to know whether it's an empty image or not. If the image is empty is because the web page is known by the database and it doesn't have a favicon. (processPendingIconsForURI): Pass the data error to getIconSurfaceSynchronously(). Don't set the icon if the request has been cancelled. (webkitFaviconDatabaseGetFavicon): Pass NULL as error to getIconSurfaceSynchronously(). (setErrorForAsyncResult): Fill also error for WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN. (webkit_favicon_database_get_favicon): If we get NULL as icon in the first place, check the error code returned by getIconSurfaceSynchronously() and return early if the page doesn't have a favicon. Remove the cancelled signal to avoid race conditions. (webkit_favicon_database_get_favicon_finish): Errors are processed before now, so simply propagate the error if any or return the favicon. * UIProcess/API/gtk/WebKitWebView.cpp: (_WebKitWebViewPrivate): Keep a reference of the favicon. (webkitWebViewCancelFaviconRequest): Cancel any async operation to get the favicon. (webkitWebViewUpdateFavicon): Check if favicon has changed and save it emitting also notify::favicon signal. (iconReadyCallback): Only update the favicon if we don't have one already. (webkitWebViewFinalize): Call webkitWebViewCancelFaviconRequest(). (getFaviconReadyCallback): Update the favicon. (webkitWebViewRequestFavicon): Request a new favicon. (webkitWebViewLoadChanged): Try to get the favicon when the load has been committed and the URI is the final one. (webkit_web_view_get_favicon): Return the cached favicon. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (serverCallback): (testSetDirectory): (testGetFavicon): (testWebViewFavicon): 2012-10-02 Carlos Garcia Campos [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=97895 Reviewed by Martin Robinson. The message DidReceiveURIRequest is now sent to the page that initiated the request that forwards the mesassage to the WebSoupRequestManagerProxy. * UIProcess/API/C/soup/WKSoupRequestManager.h: Update didReceiveURIRequest callback to receive the initiating page ID. * UIProcess/API/efl/ewk_context_request_manager_client.cpp: (didReceiveURIRequest): Update the callback API change. * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: (didReceiveURIRequest): Pass the initiating page to the WebKitURISchemeRequest constructor. * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: (_WebKitURISchemeRequestPrivate): Keep a reference to the WebPageProxy that initiatesd the request. (webkitURISchemeRequestCreate): Save the initiating page. (webkit_uri_scheme_request_get_web_view): Return the view widget of the initiating WebPageProxy. * UIProcess/API/gtk/WebKitURISchemeRequest.h: * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveURIRequest): Forward the request to the soup request manager proxy. * UIProcess/WebPageProxy.h: (WebPageProxy): Add didReceiveURIRequest(). * UIProcess/WebPageProxy.messages.in: Add DidReceiveURIRequest message. * UIProcess/soup/WebSoupRequestManagerClient.cpp: (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest): Pass the inititing page to the client callback. * UIProcess/soup/WebSoupRequestManagerClient.h: (WebSoupRequestManagerClient): * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Pass the inititing page to the client. * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Remove DidReceiveURIRequest message. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): Save the pageID of the WebFrame. (WebKit::WebFrameNetworkingContext::initiatingPageID): Return the inititing page ID. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest message to the WebPage that initiated the request. 2012-10-02 Zan Dobersek Unreviewed build fix for the GTK port after r130207. Use proper file separators for new entries. * GNUmakefile.list.am: 2012-10-02 Joone Hur Unreviewed, GTK+,Efl debug build fix after r130225. This patch allows to include the static xErrorString variable when LOG_DISABLED is 0. * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit): 2012-10-02 Sam Weinig Fix a typo and add some \n's to make Mark happy. Rubber-stamped by Mark "logging must be fast" Rowe. * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: (WebKit::InjectedBundle::load): 2012-10-02 Sam Weinig Add Objective-C API for the InjectedBundle https://bugs.webkit.org/show_bug.cgi?id=98222 Reviewed by Anders Carlsson. Add skeleton of the Objective-C API for the InjectedBundle. * WebKit2.xcodeproj/project.pbxproj: Add new API files. * WebProcess/InjectedBundle/API/mac: Added. * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h: Added. * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: Added. (-[WKWebProcessPlugIn _initWithPrincipalClassInstance:injectedBundle:]): Initialization method for the WKWebProcessPlugIn object. This object will act as the WKBundleRef object does in the C-SPI. (+[WKWebProcessPlugIn _shared]): Access the shared instance. * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h: Added. * WebProcess/InjectedBundle/InjectedBundle.h: Store an NSBundle rather than a CFBundleRef as the platform bundle. * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed. * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp. (WebKit::InjectedBundle::load): If a principal class is provided and no WKBundleInitialize function is present in the bundle, use the principal class as the initialization point. The principal class must conform to the WKWebProcessPlugIn protocol and if a webProcessPlugInInitialize: method is present, it is called. 2012-10-02 Dan Bernstein Fixed a crash when the localization option is not passed to the web process. Reviewed by Sam Weinig. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Changed to not call WKSetDefaultLocalization with the empty string. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Ditto. == Rolled over to ChangeLog-2012-10-02 ==