2014-09-03 Michael Catanzaro [SOUP] Race condition when downloading a file due to the intermediate temporary file https://bugs.webkit.org/show_bug.cgi?id=136423 Reviewed by Carlos Garcia Campos. * Shared/Downloads/soup/DownloadSoup.cpp: (WebKit::DownloadClient::DownloadClient): Replace m_destinationURI with m_destinationFile and add m_createdDestination. (WebKit::DownloadClient::deleteFilesIfNeeded): Added. (WebKit::DownloadClient::downloadFailed): Call deleteFilesIfNeeded. (WebKit::DownloadClient::didReceiveResponse): Attempt to create the destination file before the intermediate file. Fail here if the file exists and overwrite is not allowed, so we don't erroneously fire the didCreateDestination event or waste time downloading the file when we know the download will fail. (WebKit::DownloadClient::didFinishLoading): Unconditionally overwrite the empty destination file. (WebKit::DownloadClient::cancel): Call deleteFilesIfNeeded. (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Deleted. 2014-09-01 Michael Catanzaro [SOUP] WebKitDownload cannot overwrite existing file https://bugs.webkit.org/show_bug.cgi?id=136322 Reviewed by Carlos Garcia Campos. * Shared/Downloads/soup/DownloadSoup.cpp: (WebKit::DownloadClient::didReceiveResponse): pass a member variable to Download::decideDestinationWithSuggestedFilename instead of a temporary bool, so we can use the result in didFinishLoading. (WebKit::DownloadClient::didFinishLoading): overwrite the destination if Download::decideDestinationWithSuggestedFilename determined we should do so. 2014-08-25 Carlos Garcia Campos [GTK] Should check if a plugin mixes GTK+ symbols earlier https://bugs.webkit.org/show_bug.cgi?id=136214 Reviewed by Philippe Normand. We are currently checking if the plugin module and the plugin process mix GTK symbols after the plugin has been loaded and initialized. This is too late in many cases, since plugins can use GTK methods in the NP_Initialize implementation. This is causing the apps using WebKitGTK+ 2.4 to freeze when the plugin process scans the plugins and there's a plugin using GTK+3 installed. We should move the check earlier, once the module is loaded but before calling NP_Initialize. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::moduleMixesGtkSymbols): (WebKit::NetscapePluginModule::tryLoad): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPostInitialize): 2014-08-25 Carlos Garcia Campos [GTK] Older versions of WebKit should use the plugins cache in read only mode https://bugs.webkit.org/show_bug.cgi?id=136215 Reviewed by Philippe Normand. Now that WebKitGTK+ 2.4 and 2.5 are parallel installable, since they use different versions of the plugins cache, apps using 2.4 might override the plugins cache file. We should prevent this from happening by making older versions use the plugin cache, but not downgrade it. * UIProcess/Plugins/gtk/PluginInfoCache.cpp: (WebKit::PluginInfoCache::PluginInfoCache): (WebKit::PluginInfoCache::updatePluginInfo): * UIProcess/Plugins/gtk/PluginInfoCache.h: 2014-08-12 Carlos Garcia Campos [GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist https://bugs.webkit.org/show_bug.cgi?id=135834 Reviewed by Philippe Normand. Make sure the user cache directory exists. If creating the directory fails for whatever reason, do not try to save the cache to disk. * UIProcess/Plugins/gtk/PluginInfoCache.cpp: (WebKit::PluginInfoCache::PluginInfoCache): (WebKit::PluginInfoCache::updatePluginInfo): 2014-04-25 Carlos Garcia Campos [GTK] Plugin process crashes with GTK2 windowed plugins https://bugs.webkit.org/show_bug.cgi?id=132127 Reviewed by Martin Robinson. It happens sometimes because the socket is used before the plug has been added. A runtime critical warnings is shown and it sometimes ends up crashing. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not show the plug widget until the socket is connected. 2014-04-22 Carlos Garcia Campos [GTK] Crash after getting web view context property with g_object_get https://bugs.webkit.org/show_bug.cgi?id=131983 Reviewed by Philippe Normand. The problem is that the getter is using g_value_take_object() and the default context is destroyed when the caller releases its ref. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewGetProperty): Use g_value_set_object() instead of g_value_take_object(). 2014-04-11 Carlos Garcia Campos wk2-gtk does not display anything https://bugs.webkit.org/show_bug.cgi?id=125558 Reviewed by Martin Robinson. Remove fcntl call to set access mode flags on the duplicated files descriptor. Those flags are ignored in Linux and make fcntl to fail in FreeBSD. We should handle the case where the passed protection is ReadOnly. Thanks to Raphael Kubo da Costa who proposed the solution. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::createHandle): (WebKit::accessModeFile): Deleted. 2014-04-11 Zan Dobersek [GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations https://bugs.webkit.org/show_bug.cgi?id=131454 Reviewed by Carlos Garcia Campos. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move the Editor::Command objects into the other Vector. 2014-04-28 Carlos Garcia Campos [GTK] Crash in debug build with removing windowed plugin child widgets from the view https://bugs.webkit.org/show_bug.cgi?id=132252 Reviewed by Philippe Normand. It crashes due to an assert in HashTable that checks the iterators validity. The problem is that we are iterating the children map and the callback called on every iteration might modify the map, making the iterators invalid. This happens when the WebView is destroyed, GtkContainer calls gtk_container_foreach() with gtk_widget_destroy as callback. When a widget inside a container is destroyed, it's removed from the container, and in our case, the child widget is removed from the map. This fixes several crashes when running layout tests in debug bot. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseContainerForall): Use copyKeysToVector() instead of using a range iterator for the map keys and check in every iteration that the child widget from the keys vector is still present in the map before calling the callback. 2014-04-01 Zan Dobersek [GTK] Don't copy the ResourceResponse object in webkitWebViewDecidePolicy https://bugs.webkit.org/show_bug.cgi?id=131015 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewDecidePolicy): Avoid copying the ResourceResponce object returned by webkitURIResponseGetResourceResponse. That function already returns a reference, so the return value should be stored accordingly. 2014-03-18 Carlos Garcia Campos [GTK] Race condition when the socket event source is cancelled https://bugs.webkit.org/show_bug.cgi?id=130395 Reviewed by Martin Robinson. In some cases when the socket event source is cancelled the socket event source callback is called with the condition of the previous poll instead of 0. This can happen sometimes when the source is cancelled from the socket event source callback. Once the socket event source is cancelled, it's dispatched by glib without polling, so the condition is never reset again and the callback is called again and again with the previous condition. When the condition is G_IO_IN, the source is re-scheduled entering into an infinite loop. We should always check if the source has been cancelled at the beginning of the callback to destroy the source instead of relying on the condition being 0. * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::SocketEventSource::isCancelled): (WorkQueue::SocketEventSource::eventCallback): 2014-03-13 Carlos Garcia Campos [GTK] Close the connection when we fail to read from the socket for any unhandled error https://bugs.webkit.org/show_bug.cgi?id=130191 Reviewed by Martin Robinson. We currently show an error message, but we should close the connection avoid entering an infinite loop. Also provide more information in the error message to help when debugging the issue. * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::readyReadHandler): 2014-03-10 Carlos Garcia Campos [GTK] The web process can finish while a print operation is still ongoing https://bugs.webkit.org/show_bug.cgi?id=129871 Reviewed by Martin Robinson. This can happen when the last page is closed while the print job is sending data to the printer. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web process termination when the print job is sending data to the printer and enable it again when job finishes. 2014-03-12 Carlos Garcia Campos [GTK] Runtime error when page is closed while print operation is in progress https://bugs.webkit.org/show_bug.cgi?id=129869 Reviewed by Anders Carlsson. Sometimes when the page is closed right after printing the web process aborts with the runtime message "pure virtual method called terminate called without an active exception". This happens because the page is closed when the pages have been printed, but print job is still ongoing sending the data to the printer. When print job finishes, we try to notify the UI process sending the print callback message using WebPage::send(), but the web page object has been destroyed. The virtual method it complains about is probably MessageSender::messageSenderDestinationID() used by send(). Since our print operation is always asynchronous, we need a way to notify the web page when the print operation has actually finished to clean it up, but also notify the print operation when the page has been closed to not try to notify the UI process in that case. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Call disconnectFromPage to notify the print operation in case there's an ongoing print job. (WebKit::WebPage::endPrinting): Do not cleanup the print operation here, since the print opertation might not have finished yet. (WebKit::WebPage::didFinishPrintOperation): Send PrintFinishedCallback message to the Ui process and cleanup the print operation. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage to nullptr. (WebKit::WebPrintOperationGtk::printDone): Call didFinishPrintOperation() is the web page hasn't been closed. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2014-03-06 Carlos Garcia Campos [GTK] Close the page when the view is disposed instead of when finalized https://bugs.webkit.org/show_bug.cgi?id=129783 Reviewed by Sergio Villar Senin. When a GtkWidget is destroyed, the GObject is disposed, but not finalized if it has additional references. When the destroyed widget is leaked by the application, we leak the page proxy and what is more important the web process in multi-process mode. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDispose): Close the WebPageProxy. 2014-02-27 Carlos Garcia Campos [GTK][WK2] Blocks when fetching plugins information https://bugs.webkit.org/show_bug.cgi?id=115650 Reviewed by Gustavo Noronha Silva. Use a persistent cache to store the plugins metadata to avoid having to load all the plugins everytime a plugin is used for the first time. * GNUmakefile.am: * GNUmakefile.list.am: * PlatformGTK.cmake: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::parseMIMEDescription): Make this method public. (WebKit::NetscapePluginModule::buildMIMEDescription): Added this helper to build the MIME description string. * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added. (WebKit::PluginInfoCache::shared): (WebKit::PluginInfoCache::PluginInfoCache): (WebKit::PluginInfoCache::~PluginInfoCache): (WebKit::PluginInfoCache::saveToFileIdleCallback): (WebKit::PluginInfoCache::saveToFile): (WebKit::PluginInfoCache::getPluginInfo): (WebKit::PluginInfoCache::updatePluginInfo): * UIProcess/Plugins/gtk/PluginInfoCache.h: Added. * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: (WebKit::PluginInfoStore::getPluginInfo): Check first if we have metadata of the plugin in the cache and update the cache if we loaded the plugin to get its metadata. 2014-03-17 Giovanni Campagna [GTK] Don't busy loop when the socket is full https://bugs.webkit.org/show_bug.cgi?id=129802 Reviewed by Carlos Garcia Campos. When the socket is full and we see EAGAIN or EWOULDBLOCK (because the socket is non blocking), don't busy loop by tring to write again, instead poll() until the socket becomes writable. * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::sendOutgoingMessage): 2014-02-27 Carlos Garcia Campos [GTK] Web Inspector doesn't work with network process enabled https://bugs.webkit.org/show_bug.cgi?id=127651 Reviewed by Sergio Villar Senin. The problem is that the web inspector loads so many resources, that when using the network process, a lot of IPC traffic is generated causing the send buffer of the socket to be full. When that happens sendmsg() fails with EAGAIN, because we are using non blocking sockets, and we are not handling neither EAGAIN nor EWOULDBLOCK errors (we do when reading from the socket, though). * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::readyReadHandler): Add a log message to know when reading from the socket fails for any unhandled error. (IPC::Connection::sendOutgoingMessage): Handle EAGAIN and EWOULDBLOCK errors to try again in those cases. Also add a log message for unhandled errors. 2014-02-14 Carlos Garcia Campos [GTK] Fix marshaller used in WebKitWebPage::document-loaded signal https://bugs.webkit.org/show_bug.cgi?id=128808 Reviewed by Sergio Villar Senin. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkit_web_page_class_init): Use g_cclosure_marshal_VOID__VOID instead of g_cclosure_marshal_VOID__OBJECT. 2014-02-11 Alberto Garcia O_CLOEXEC in shm_open does not work on FreeBSD https://bugs.webkit.org/show_bug.cgi?id=128572 Reviewed by Darin Adler. The O_CLOEXEC is not supported by shm_open() and is also not necessary since FD_CLOEXEC is already set by default when the new file descriptor is created. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::create): 2014-02-03 Alberto Garcia Fix wrong mix of fcntl commands and flags https://bugs.webkit.org/show_bug.cgi?id=127842 Reviewed by Darin Adler. We are mixing the commands to set file descriptor and file status flags in a couple of fcntl() calls. FD_CLOEXEC must be set using F_SETFD, and the access mode flags (O_RDONLY, O_WRONLY, O_RDWR) with F_SETFL. This combines patches by Guillem Jover and Sergio Correia. * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::readBytesFromSocket): * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::createHandle): 2014-02-18 Sami Wagiaalla [GTK] webkit_web_view_load_html reads UTF8 css files as UTF16 https://bugs.webkit.org/show_bug.cgi?id=127481 Reviewed by Carlos Garcia Campos. Partial merge of r160572. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadString): (WebKit::WebPage::loadHTMLString): (WebKit::WebPage::loadAlternateHTMLString): (WebKit::WebPage::loadPlainTextString): (WebKit::WebPage::loadWebArchiveData): * WebProcess/WebPage/WebPage.h: 2014-01-27 Carlos Garcia Campos [SOUP] WebProcess sometimes crashes when a download is cancelled https://bugs.webkit.org/show_bug.cgi?id=127650 Reviewed by Martin Robinson. The problem is that when the download is cancelled, the download manager removes the download from the map and it's deleted. The Download destructor calls platformInvalidate() that cancels the resource handle if there's still one. We set to nullptr the ResourceHandle when the download is cancelled to avoid cancelling it twice, but it's done after calling Download::didCancel(). It should be done before, because at that moment, when the download is deleted, the resource handle pointer is still valid. * Shared/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::cancel): 2014-01-24 Víctor Manuel Jáquez Leal [GTK] youtube HTML5 videos in fullscreen, after , can't go fullscreen again https://bugs.webkit.org/show_bug.cgi?id=127064 When pressing or at full screen, the WebView shall emit the event webkitfullscreenchange, but wk2gtk does not emit it. This is because the WebView manages directly the exit of the full screen. With this patch the WebView calls requestExitFullScreen to the full screen manager, instead of managing directly the exit of the full screen, and the event webkitfullscreenchange will be dispatched correctly. Reviewed by Martin Robinson. No tests are included because there is a bug in WKTR that prevents the execution of a test for this patch. See https://bugs.webkit.org/show_bug.cgi?id=127348 * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseKeyPressEvent): Call webkitWebViewBaseRequestExitFullScreen. (webkitWebViewBaseRequestExitFullScreen): Added. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto. 2014-01-15 Carlos Garcia Campos [GTK] Web process sometimes crashes when printing in synchronous mode https://bugs.webkit.org/show_bug.cgi?id=126979 Reviewed by Gustavo Noronha Silva. When printing synchronously in GTK+ we need to make sure that we have a list of Printers before starting the print operation. Getting the list of printers is done synchronously by GTK+, but using a nested main loop that might process IPC messages comming from the UI process like EndPrinting. When the EndPrinting message is received while the printer list is being populated, the print operation is finished unexpectely and the web process crashes. The PrinterListGtk class gets the list of printers in the constructor so we just need to ensure there's an instance alive during the synchronous print operation. In case of asynchronous printing the printer list will be created during the print operation without any risk, because the EndPrinting message is not sent until the printing callback has been received in the UI process. * GNUmakefile.list.am: Add new files to compilation. * PlatformGTK.cmake: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::print): Ensure PrinterListGtk is created before the synchronous printing and destroyed afterwards. * WebProcess/WebPage/gtk/PrinterListGtk.cpp: Added. (WebKit::PrinterListGtk::shared): Return the singleton. (WebKit::PrinterListGtk::enumeratePrintersFunction): Callback called by gtk_enumerate_printers() when a new printer is found. (WebKit::PrinterListGtk::PrinterListGtk): Call gtk_enumerate_printers() in syhchronous mode. (WebKit::PrinterListGtk::~PrinterListGtk): (WebKit::PrinterListGtk::addPrinter): Add the printer to the list and set the default printer if needed. (WebKit::PrinterListGtk::findPrinter): Find the printer for the given name. * WebProcess/WebPage/gtk/PrinterListGtk.h: Added. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Use PrinterListGtk class to find the printer instead of calling gtk_enumerate_printers(). 2014-01-16 Carlos Garcia Campos [GTK] Remove the weak pointer added to the web view in WebKitPrintOperation https://bugs.webkit.org/show_bug.cgi?id=127098 Reviewed by Martin Robinson. If the print operation finishes and the web view is still alive, the weak pointer added to the view should be removed. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate): 2014-01-14 Carlos Garcia Campos [GTK] UI process crashes when closing the window right after printing with javascript https://bugs.webkit.org/show_bug.cgi?id=126981 Reviewed by Gustavo Noronha Silva. The UI process crashes because when the page is closed, the web view is destroyed before the print operation has actually finished. Use a weak pointer to make sure the web view pointer is set to NULL when the it's destroyed and emit the finished callback always so that the user can clean up the operation even when the web view has been closed. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (drawPagesForPrintingCompleted): 2014-01-14 Carlos Garcia Campos [GTK] UI process crashes when the web process crashes while printing https://bugs.webkit.org/show_bug.cgi?id=126977 Reviewed by Gustavo Noronha Silva. When the web process crashes, the printing callback is invalidated, so the function is called with a NULL error. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (drawPagesForPrintingCompleted): Check wkError is not NULL before trying to use it. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewPrintFrame): Set the print mode of the operation before emitting the print signal. 2014-01-15 Tomas Popela [SOUP] [WK2] - Disable MemoryCache when the DOCUMENT_VIEWER cache model is set https://bugs.webkit.org/show_bug.cgi?id=126577 Reviewed by Carlos Garcia Campos. As in http://trac.webkit.org/changeset/152483, but this time for WebKit2. When WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER is set we need to disable the MemoryCache completely to prevent caching of the resources. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformSetCacheModel): 2014-01-09 Carlos Garcia Campos [SOUP] Partial file left on disk after a download fails or is cancelled in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=126686 Reviewed by Martin Robinson. We are currently writing the downloads directly into the destination, and when a download fails or is cancelled after the destination has been decided, the partial file is left on the disk. Deleting the final file is not safe because there might be a race condition, so we can use an intermediate file like other browsers do, a file in the same directory than the target destination but with .wkdownload suffix, that is removed when the download fails or is cancelled. If the download finishes successfully the intermediate file is renamed to the final destination. * Shared/Downloads/soup/DownloadSoup.cpp: (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Delete the intermdiate file if it's been created already. (WebKit::DownloadClient::downloadFailed): Call deleteIntermediateFileInNeeded. (WebKit::DownloadClient::didReceiveResponse): Do not create a SoupMessage for the given ResourceResponse that is not used, cache the ResourceResponse instead. Create the intermediate file and use it instead of the final destination. (WebKit::DownloadClient::didReceiveData): Use the cached ResourceResponse directly. (WebKit::DownloadClient::didFinishLoading): Rename the intermediate file to the final destination and write the metadata in the final target destination. (WebKit::DownloadClient::cancel): Handle the download cancellation here, removing the intermediate file is needed and cancelling the ResourceHandle and the download. (WebKit::DownloadClient::handleResponseLater): (WebKit::Download::cancel): Let the client handle the cancellation. 2013-12-30 Carlos Garcia Campos [SOUP] willSendRequest doesn't work after a redirect https://bugs.webkit.org/show_bug.cgi?id=126290 Reviewed by Martin Robinson. Add test cases to test send-request signal in case of redirection. * UIProcess/API/gtk/tests/TestResources.cpp: (testWebResourceSendRequest): (serverCallback): 2014-01-04 Carlos Garcia Campos [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=126342 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/tests/CMakeLists.txt: Removed. * UIProcess/API/gtk/tests/GNUmakefile.am: Removed. 2013-12-07 Gustavo Noronha Silva Fix API test expectation following 160220. Rubber-stamped by Martin Robinson. * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: (testAtspiBasicHierarchy): check for ATK_ROLE_DOCUMENT_WEB instead of ATK_ROLE_DOCUMENT_FRAME. 2013-12-30 Carlos Garcia Campos [GTK] Split WebKit2APITests/TestWebKitWebView https://bugs.webkit.org/show_bug.cgi?id=126284 Reviewed by Philippe Normand. WebKitWebView test is too big already making more difficult to handle timeouts and skipped tests. Split it in 3 by moving UIClient and auth tests to their own files. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestAuthentication.cpp: Added. (testWebViewAuthenticationRequest): (testWebViewAuthenticationCancel): (testWebViewAuthenticationLoadCancelled): (testWebViewAuthenticationFailure): (testWebViewAuthenticationNoCredential): (testWebViewAuthenticationStorage): (testWebViewAuthenticationSuccess): (serverCallback): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/TestUIClient.cpp: Added. (testWebViewCreateReadyClose): (checkMimeTypeForFilter): (testWebViewAllowModalDialogs): (testWebViewDisallowModalDialogs): (testWebViewJavaScriptDialogs): (testWebViewWindowProperties): (testWebViewMouseTarget): (testWebViewPermissionRequests): (testWebViewFileChooserRequest): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (beforeAll): (afterAll): 2013-10-25 Anton Obzhirov [GTK] [WebKit2] CanHandleRequest API test fails https://bugs.webkit.org/show_bug.cgi?id=88453 Reviewed by Martin Robinson. Make WebPage::platformCanHandleRequest return false by default for unknown schemes. * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::platformCanHandleRequest): 2013-12-21 Carlos Garcia Campos [GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources https://bugs.webkit.org/show_bug.cgi?id=126119 Reviewed by Martin Robinson. The problem is that when the blank.ico resource is loaded from the disk cache, the mime type is null, because the soup cache doesn't cache sniffed mime types. This doesn't happen when a resource is loaded form the memory cache, because the ResourceResponse is cached, not only the headers. I think the disk cache should also cache the sniffed content type, but that needs to be done in soup. For now we can workaround the issue in the unit test by making sure that resources that can be cached, also include the Content-Type header, this way the mime type won't be sniffed and it will be cached as a HTTP header in the disk cache. * UIProcess/API/gtk/tests/TestResources.cpp: (serverCallback): Add Content-Type header for resources that can be cached. 2013-12-20 Carlos Garcia Campos [GTK] Some unit tests using web extensions fail when run alone https://bugs.webkit.org/show_bug.cgi?id=126002 Reviewed by Gustavo Noronha Silva. The problem is that the page is created before the dbus connection has been established, and we are connecting to web-page-created signal once we have a valid dbus connection. We should connect to the signal before connecting to dbus and queue any request to emit a dbus signal until the connection is set. This also fixes the WebExtensions tests when using the network process because a new web process is launched for every test case. * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (DelayedSignal::DelayedSignal): Helper struct to queue signal emissions requested before the dbus connection has been established. (emitDocumentLoaded): Emit the dbus DocumentLoaded signal. (documentLoadedCallback): Queue the signal emission if we still don't have a connection or call emitDocumentLoaded otherwise. (emitURIChanged): Emit the dbus URIChanged signal. (uriChangedCallback): Queue the signal emission if we still don't have a connection or call emitURIChanged otherwise. (pageCreatedCallback): Pass the web extension as user data to document-loaded and uri-changed callbacks. (busAcquiredCallback): Set the connection as user data of the web extension and process any delayed signal emission pending. (webkit_web_extension_initialize): Connect to web-page-create signal before connecting to dbus. 2013-12-13 Carlos Garcia Campos [GTK] Add a unit tests to WebKit2 to test node names https://bugs.webkit.org/show_bug.cgi?id=125686 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/tests/DOMNodeTest.cpp: (WebKitDOMNodeTest::testTagNames): (WebKitDOMNodeTest::runTest): (registerTests): * UIProcess/API/gtk/tests/TestDOMNode.cpp: (testWebKitDOMNodeTagNames): (beforeAll): 2013-12-12 Carlos Garcia Campos [GTK] WebProcess tests are failing with newer glib https://bugs.webkit.org/show_bug.cgi?id=125621 Reviewed by Martin Robinson. Newer versions of glib unset the DISPLAY env variable in g_test_dbus_up(). The WebProcess needs the DISPLAY variable to work, and it's important to keep its value when running the tests under Xvfb. * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp: (WebProcessTestRunner::WebProcessTestRunner): Restore the DISPLAY env variable after calling g_test_dbus_up(). 2013-12-12 Carlos Garcia Campos [GTK] Make sure unit tests don't use GVFS and dconf https://bugs.webkit.org/show_bug.cgi?id=125620 Reviewed by Martin Robinson. They should use the local vfs and the gsettings memory backend. * UIProcess/API/gtk/tests/TestMain.cpp: (main): 2013-11-27 Zan Dobersek [GTK] Programs/WebKit2APITests/TestWebKitSettings unit test is failing https://bugs.webkit.org/show_bug.cgi?id=124924 Reviewed by Carlos Garcia Campos. 'Chrome'/'Chromium' substrings were removed from the user agent string in r159572, meaning the unit test shouldn't check for those two substrings anymore. Instead, 'Safari' (as until now) and 'AppleWebKit' substrings should be checked for. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettingsUserAgent): 2013-11-11 Carlos Garcia Campos [GTK] Crash when printing via javascript in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=124043 Reviewed by Martin Robinson. It happens because the print operation when started by the WebProcess due to a DOM operation is supposed to be synchronous and our print operation is always asynchronous. This is currently handled only in the UI process because other ports print synchronously in the WebProcess. In the GTK+ port we need to notify the WebProcess that the print operation should run synchronously when request by a DOM operation. Together with the print settings and page setup we now send a print mode that can be sync or async. When printing in sync mode we run a nested main loop for the print operation, making sure that print sources have a higher priority. * Shared/PrintInfo.cpp: (WebKit::PrintInfo::encode): Encode the print mode. (WebKit::PrintInfo::decode): Decode the print mode. * Shared/PrintInfo.h: Add PrintMode enum. * Shared/gtk/PrintInfoGtk.cpp: (WebKit::PrintInfo::PrintInfo): Initialize print mode. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (drawPagesForPrintingCompleted): Do not call endPrinting() when printing synchronously because WebPageProxy already calls it right after sending the message to the WebProcess. (webkitPrintOperationPrintPagesForFrame): Create the PrintInfo struct with a print mode. (webkitPrintOperationSetPrintMode): Helper private function to set the print mode of the print operation. * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewPrintFrame): Set sync print mode when printing due to a UIClient request. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Create a main loop when printing synchronously. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize print mode. (WebKit::WebPrintOperationGtk::printPagesIdleDone): Finish the nested main loop when printing synchronously. (WebKit::WebPrintOperationGtk::print): Run a nested main loop when printing synchronously. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: (WebKit::WebPrintOperationGtk::printMode): Return the print mode. 2013-11-10 Carlos Garcia Campos [GTK] [WebKit2] Crash when printing to a file via javascript https://bugs.webkit.org/show_bug.cgi?id=122801 Reviewed by Martin Robinson. This crash is caused by a GTK+ bug, but we can work around it by ensuring the print dialog is always shown with a valid GtkPrintSettings object. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialog): 2013-10-04 Lorenzo Tilve [GTK] Enable text edition UndoOperations support in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=122305 Reviewed by Carlos Garcia Campos. Replaced the notImplemented() function calls for the corresponding implementation of the edit operations provided by the DefaultUndoController class. * GNUmakefile.list.am: * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::registerEditCommand): (WebKit::PageClientImpl::clearAllEditCommands): (WebKit::PageClientImpl::canUndoRedo): (WebKit::PageClientImpl::executeUndoRedo): * UIProcess/API/gtk/PageClientImpl.h: 2013-11-01 Emilio Pozuelo Monfort Fix build on non-linux platforms https://bugs.webkit.org/show_bug.cgi?id=123622 Reviewed by Darin Adler. * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: 2013-09-24 Lorenzo Tilve [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE https://bugs.webkit.org/show_bug.cgi?id=121782 Reviewed by Martin Robinson. Disabled drag functions. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_class_init): * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: 2013-09-23 ChangSeok Oh [GTK][WK2] A plugin dirtyRect within iframe remains after moving to a different page. https://bugs.webkit.org/show_bug.cgi?id=121600 Reviewed by Gustavo Noronha Silva. Nowhere to destroy NetscapePlugin::m_platformPluginWidget even after destroying an instance of NetscapePlugin. So the created GtkWidget remains visible. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformDestroy): 2013-08-28 Chris Curtis https://bugs.webkit.org/show_bug.cgi?id=119548 Refactoring Exception throws. Reviewed by Geoffrey Garen. Moved setting an exception into the vm, These functions changed to use the new functionality. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::throwInvalidAccessError): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState): 2013-09-18 Carlos Garcia Campos [GTK] WebKitScriptWorld not in API documentation https://bugs.webkit.org/show_bug.cgi?id=121539 Reviewed by Philippe Normand. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitScriptWorld. 2013-09-13 Gustavo Noronha Silva [GTK] Move to the new web inspector https://bugs.webkit.org/show_bug.cgi?id=120647 Reviewed by Carlos Garcia Campos. * GNUmakefile.am: bundle the remote inspector page list HTML into libwebkit2gtk as a GResource. * UIProcess/API/gtk/tests/GNUmakefile.am: no need to set WEBKIT_INSPECTOR_PATH anymore. * UIProcess/API/gtk/tests/InspectorTestServer.cpp: (main): ditto. * UIProcess/API/gtk/tests/TestInspector.cpp: (beforeAll): ditto. * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (testInspectorServerPageList): update paths to the internal resource ones. * UIProcess/InspectorServer/WebInspectorServer.h: * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: (WebKit::WebInspectorServer::platformResourceForPath): ditto. (WebKit::WebInspectorServer::buildPageList): ditto. * UIProcess/WebInspectorProxy.cpp: (WebKit::isMainInspectorPage): factor out checking for the inspector main resource, to make the code more readable. (WebKit::decidePolicyForNavigationAction): use SchemeRegistry to figure out whether the request is for a local resource instead of KURL::isLocalFile() to allow using schemes other than file:// for the inspector resources. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::inspectorPageURL): use the new internal resource URL; since it's now static we no longer need to generate and store the string. (WebKit::WebInspectorProxy::inspectorBaseURL): ditto. * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: (WebKit::WebInspector::localizedStringsURL): use the new internal resource URL. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): register resource as a local scheme. 2013-09-17 Gustavo Noronha Silva [GTK] Test /webkit2/WebKitWebInspectorServer/test-open-debugging-session times out after r155714 https://bugs.webkit.org/show_bug.cgi?id=121383 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (openRemoteDebuggingSession): use the page contents' to check the remote debugging of the page has been successfuly opened, as the title is no longer the same after the switch to the new frontend. 2013-09-16 Andre Moreira Magalhaes Web Inspector: Do not try to parse incomplete HTTP requests https://bugs.webkit.org/show_bug.cgi?id=121123 Reviewed by Carlos Garcia Campos. Update to incorporate additional review suggestions. * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (sendIncompleteRequest): Fix memory leaks, change test timeout from 2 seconds to 1 second, use "0" instead of "NULL" and use g_assert_no_error when checking for GError. 2013-09-12 Andre Moreira Magalhaes Web Inspector: Do not try to parse incomplete HTTP requests https://bugs.webkit.org/show_bug.cgi?id=121123 Reviewed by Darin Adler. When working on a patch for bug #121121 I found an issue with the InspectorServer where it would try to parse an HTTP message before receiving the full message and thus fail connecting with the chromedevtools plugin. What happens is that the WebSocketServerConnection receives buffers on WebSocketServerConnection::didReceiveSocketStreamData and calls WebSocketServerConnection::readHTTPMessage which then checks if we have a valid request by calling HTTPRequest::parseHTTPRequestFromBuffer. If the request is valid it tries to parse the message and clears the buffer, otherwise it continues adding data to the internal buffer until we have a valid request. The problem is that currently HTTPRequest::parseHTTPRequestFromBuffer considers the request as valid before receiving the full message. To solve this we should make the method check if the request headers end with a blank line otherwise we consider the request as invalid (see also http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html). * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (sendIncompleteRequest): (beforeAll): Add GTK specific test to check if the inspector server replies to incomplete requests. * UIProcess/InspectorServer/HTTPRequest.cpp: (WebKit::HTTPRequest::parseHeaders): Do not consider request valid if headers didn't end with a blank line. 2013-09-11 Mario Sanchez Prada [GTK] Remove Gail dependency from build system for GTK3 https://bugs.webkit.org/show_bug.cgi?id=119673 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Removed GAIL_LIBS. 2013-09-14 Alberto Garcia [GTK] WebKitGTK+ is linking against libxslt in too many places https://bugs.webkit.org/show_bug.cgi?id=121356 Reviewed by Martin Robinson. Don't use LIBXSLT_CFLAGS when compiling libWebCoreGtk2, no source files use libxslt there. * GNUmakefile.am: 2013-09-11 Alberto Garcia [WK2] [GTK] LayerTreeHostGtk: don't set m_isValid to false if glContext() returns null https://bugs.webkit.org/show_bug.cgi?id=120892 Reviewed by Martin Robinson. If the GL context cannot be created then m_isValid is set to false during the initialization of LayerTreeHostGtk. This is not really necessary since the rest of the code already deals with that situation, so it doesn't have any effect other than breaking the assertion in invalidate(). * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::initialize): 2013-09-15 Carlos Garcia Campos [GTK] The web inspector is not rendered when docked in WebKit2 when AC is used https://bugs.webkit.org/show_bug.cgi?id=121381 Reviewed by Martin Robinson. When accelerated compositing results are rendered we return early from webkitWebViewBaseDraw and other WebView children are not drawn. We need to chain up the draw signal handler, so that the GtkContainer propagates the draw to all its children. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDraw): 2013-08-28 Zan Dobersek [GTK][WK2] Only set up a RedirectedXCompositeWindow if running under an X11 display https://bugs.webkit.org/show_bug.cgi?id=120321 Reviewed by Gustavo Noronha Silva. Only set up the RedirectedXCompositeWindow member of the WebKitWebViewBasePrivate struct if we're running under an X11 display. This is now done in the webkitWebViewBaseConstructed function rather than the constructor, which is removed. This allows for the UIProcess to run in a Wayland environment even when built with accelerated compositing enabled. Of course, at the moment there's no support yet for accelerated compositing under Wayland, so we fall back to rendering the backing store. No changes are introduced to the behavior under X11 - accelerated compositing will be used where possible, if supported. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): 2013-09-10 Sergio Villar Senin [WK2][GTK] Frequent crashes when showing context menus in Debug builds https://bugs.webkit.org/show_bug.cgi?id=121099 Reviewed by Carlos Garcia Campos. Disconnect signal handlers when destroying the context menu proxy object. This avoids use-after-free crashes when opening several context menus in a row. * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::append): (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): * UIProcess/gtk/WebContextMenuProxyGtk.h: 2013-09-09 Brian Holt [GTK][WK2] Update ContextMenu Download API https://bugs.webkit.org/show_bug.cgi?id=120763 Reviewed by Carlos Garcia Campos. Mark the new Download items in the Context Menu with the Since tag, and include a unit test for Context Menu audio. * UIProcess/API/gtk/WebKitContextMenuActions.h: * UIProcess/API/gtk/tests/TestContextMenu.cpp: (testContextMenuDefaultMenu): 2013-09-03 Brian Holt [GTK] [WK2] TestContextMenu default-menu fails https://bugs.webkit.org/show_bug.cgi?id=120459 Reviewed by Gustavo Noronha Silva. Add context menu items for downloading media elements. * UIProcess/API/gtk/WebKitContextMenuActions.cpp: (webkitContextMenuActionGetActionTag): (webkitContextMenuActionGetForContextMenuItem): (webkitContextMenuActionGetLabel): * UIProcess/API/gtk/WebKitContextMenuActions.h: * UIProcess/API/gtk/tests/TestContextMenu.cpp: 2013-09-10 Carlos Garcia Campos [GTK] /webkit2/WebKitWebView/default-menu fails when GtkSettings:gtk-show-input-method-menu is disabled https://bugs.webkit.org/show_bug.cgi?id=121088 Reviewed by Xan Lopez. * UIProcess/API/gtk/tests/TestContextMenu.cpp: Always check Unicode submenu is present in default context menu for editable content. 2013-08-29 Brian Holt [GTK] [WK2] TestWebKitWebView page-visibility fails https://bugs.webkit.org/show_bug.cgi?id=120406 Reviewed by Gustavo Noronha Silva. Removed the webkit prefix for document visibility properties. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewPageVisibility): 2013-09-09 Gustavo Noronha Silva Unreviewed build fix. * GNUmakefile.list.am: Typo - left-over \ from a copy/paste, most likely. 2013-09-09 Anton Obzhirov [GTK] Cancel the current active WebKitAuthenticationRequest on load failed https://bugs.webkit.org/show_bug.cgi?id=120350 Reviewed by Carlos Garcia Campos. The default dialog does not get closed and the authentication is not cancelled if loading fails or is stopped on a page which requires HTTP authentication. This patch cancels the authentication request on load failed and adds new authentication cancelled signal in WebKitAuthenticationRequest to allow the application handling of authentication UI. * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: (authenticationCancelled): (webkitAuthenticationDialogInitialize): (webkitAuthenticationDialogDispose): (webkitAuthenticationDialogNew): * UIProcess/API/gtk/WebKitAuthenticationDialog.h: * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp: (webkit_authentication_request_class_init): (webkit_authentication_request_cancel): * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewAuthenticate): (webkitWebViewLoadFailed): (webkitWebViewHandleAuthenticationChallenge): (webkitWebViewCancelAuthenticationRequest): * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewAuthenticationLoadCancelled): (beforeAll): 2013-09-05 Alberto Garcia [WK2] [GTK] Remove the test to disable AC under Wayland from WebKitWebViewGroup https://bugs.webkit.org/show_bug.cgi?id=120762 Reviewed by Gustavo Noronha Silva. The code to disable AC under Wayland is not run if we're using WebKitTestRunner, so it would be better to move it to WebKitWebViewBase. However it's not really necessary to do that, instead it's much simpler to disable accelerated compositing in all cases unless we know we can support it. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseUpdatePreferences): * UIProcess/API/gtk/WebKitWebViewGroup.cpp: (webkitWebViewGroupAttachSettingsToPageGroup): 2013-08-28 Zan Dobersek [GTK][WK2] Disable accelerated compositing under Wayland https://bugs.webkit.org/show_bug.cgi?id=120347 Reviewed by Martin Robinson. Accelerated compositing is not yet supported under the Wayland display protocol, so it should be disabled. Since it is enabled by default and the GTK WK2 API does not provide any way to change that, it's enough to disable it when attaching the WebKitSettings object to the WebPageGroup if running under Wayland. * UIProcess/API/gtk/WebKitWebViewGroup.cpp: (webkitWebViewGroupAttachSettingsToPageGroup): 2013-09-04 Zan Dobersek [GTK] Add support for the Wayland build target https://bugs.webkit.org/show_bug.cgi?id=120627 Reviewed by Gustavo Noronha Silva. * GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target, fall back to the generic, empty classes otherwise. * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11), it's at the moment specific to the X11 implementation of the Netscape plugins. * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11), just like it's guarded in the PluginProcessProxy class declaration. * UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard and WidgetBackingStoreGtkX11 inclusion and use with PLATFORM(X11), this code should only be built when building the X11 target. (WebKit::createBackingStoreForGTK): * UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration. * config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target. 2013-09-04 Alberto Garcia [WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate https://bugs.webkit.org/show_bug.cgi?id=117733 Reviewed by Martin Robinson. If the GL context cannot be created then an invalid LayerTreeHostGtk object will be returned. This patch disables accelerated compositing if the system doesn't support it. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewUpdateSettings): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseUpdatePreferences): (webkitWebViewBaseCreateWebPage): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 2013-08-26 Santosh Mahto Fixing compilation warning "unused parameter" in WebPageProxy.cpp https://bugs.webkit.org/show_bug.cgi?id=120205 Reviewed by Anders Carlsson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): (WebKit::WebPageProxy::didBlockInsecurePluginVersion): Added UNUSED_PARAM to avoid warning. 2013-08-23 Andy Estes Fix issues found by the Clang Static Analyzer https://bugs.webkit.org/show_bug.cgi?id=120230 Reviewed by Darin Adler. * UIProcess/API/mac/WKBrowsingContextController.mm: (autoreleased): Don't leak CFURLs when in Objective-C GC. * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): Don't leak CFStrings when in Objective-C GC. 2013-08-26 Csaba Osztrogonác [WK2] Buildfix for non Mac platforms https://bugs.webkit.org/show_bug.cgi?id=120294 Reviewed by Darin Adler. * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer): * NetworkProcess/NetworkResourceLoader.h: 2013-08-26 Alexey Proskuryakov [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail https://bugs.webkit.org/show_bug.cgi?id=113094 Reviewed by Darin Adler. Return new pasteboard change count from all functions that change it. * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::pasteboardCopy): (WebKit::WebContext::addPasteboardTypes): (WebKit::WebContext::setPasteboardTypes): (WebKit::WebContext::setPasteboardPathnamesForType): (WebKit::WebContext::setPasteboardStringForType): (WebKit::WebContext::setPasteboardBufferForType): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::writeItemsToPasteboard): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::copy): (WebKit::WebPlatformStrategies::changeCount): (WebKit::WebPlatformStrategies::addTypes): (WebKit::WebPlatformStrategies::setTypes): (WebKit::WebPlatformStrategies::setBufferForType): (WebKit::WebPlatformStrategies::setPathnamesForType): (WebKit::WebPlatformStrategies::setStringForType): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2013-08-26 Andreas Kling Unreviewed build fix. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createWithCoreMainFrame): (WebKit::WebFrame::createSubframe): 2013-08-26 Pratik Solanki PageGroup::groupSettings() should return a reference https://bugs.webkit.org/show_bug.cgi?id=120319 Reviewed by Andreas Kling. PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings(). * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::createLocalStorageNamespace): 2013-08-26 Andreas Kling WebCore: Let Page create the main Frame. Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): This starts out with a null WebFrame* pointer now. (WebKit::WebFrameLoaderClient::setWebFrame): WebFrame hooks itself up through this as soon as it's constructed. (WebKit::WebFrameLoaderClient::frameLoaderDestroyed): Tweak an out-of-date comment. The ref() we're balancing out comes from WebFrame::create(). * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createWithCoreMainFrame): Rewrote createMainFrame() as createWithCoreMainFrame(). The new method wraps an existing WebCore::Frame instead of creating a new one. (WebKit::WebFrame::createSubframe): Merged WebFrame::init() into here since the logic isn't shared with main Frame creation anymore. (WebKit::WebFrame::create): (WebKit::WebFrame::WebFrame): Call WebFrameLoaderClient::setWebFrame(this). * WebProcess/WebPage/WebFrame.h: WebFrame::m_frameLoaderClient is now an OwnPtr rather than an inline member. This way it can be created before the WebFrame. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Set up a WebFrameLoaderClient and pass it to the Page constructor along with the other PageClients. 2013-08-24 Carlos Garcia Campos [GTK] Add WebKit2 API for isolated worlds https://bugs.webkit.org/show_bug.cgi?id=103377 Reviewed by Anders Carlsson. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (testWebExtensionWindowObjectCleared): (scriptDialogCallback): (runJavaScriptInIsolatedWorldFinishedCallback): (testWebExtensionIsolatedWorld): (beforeAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (echoCallback): (windowObjectCleared): (getWebPage): (methodCallCallback): * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: (webkit_frame_get_javascript_context_for_script_world): New public method to tget the JavaScript execution context for a given script world. * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added. (scriptWorlds): Global WebKitScriptWorld map. (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate): (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the given injected bundle script world. (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected bundle script world wrapped by the given WebKitScriptWorld. (webkitScriptWorldWindowObjectCleared): Emit WebKitScriptWorld::window-object-cleared signal. (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping the given injected bundle script world. (createDefaultScriptWorld): Create the default WebKitScriptWorld wrapping the normal world. (webkit_script_world_get_default): Return the default WebKitScriptWorld. (webkit_script_world_new): Create a new isolated WebKitScriptWorld. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared(). (webkitWebPageCreate): Add implementation for callback didClearWindowObjectForFrame in injected bundle loader client. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitScriptWorld.h. 2013-08-26 Carlos Garcia Campos [WebKit2] Offsets for WKBundlePageLoaderClient in APIClientTraits are wrong https://bugs.webkit.org/show_bug.cgi?id=120268 Reviewed by Anders Carlsson. * Shared/APIClientTraits.cpp: Use always the first member of every version as the offset of the version. 2013-08-26 Carlos Garcia Campos [GTK] Add missing initializer for pluginLoadPolicy in WKPageLoaderClient https://bugs.webkit.org/show_bug.cgi?id=120289 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Add initializer for pluginLoadPolicy and rename the comment of the previous one as pluginLoadPolicy_deprecatedForUseWithV2. 2013-08-26 Carlos Garcia Campos [GTK] webkitCredentialGetCredential returns a temporary in g_return_val_if_fail https://bugs.webkit.org/show_bug.cgi?id=120287 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitCredential.cpp: (webkitCredentialGetCredential): Use ASSERT() instead of g_return_val_if_fail() since this is a private function. 2013-08-25 Zan Dobersek Unreviewed GTK build fix after r154565. * UIProcess/API/gtk/tests/TestInspector.cpp: Include the Vector header. * UIProcess/API/gtk/tests/TestResources.cpp: Ditto. 2013-08-24 Darin Adler Frame::tree should return a reference instead of a pointer https://bugs.webkit.org/show_bug.cgi?id=120259 Reviewed by Andreas Kling. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::dispatchSessionStorageEvent): (WebKit::StorageAreaMap::dispatchLocalStorageEvent): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame): * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: (WebKit::WebContextMenuClient::searchWithSpotlight): * WebProcess/WebPage/FindController.cpp: (WebKit::frameWithSelection): (WebKit::FindController::rectsForTextMatches): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::init): (WebKit::WebFrame::contentsAsString): (WebKit::WebFrame::name): (WebKit::WebFrame::childFrames): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::clearMainFrameName): (WebKit::WebPage::setDrawsBackground): (WebKit::WebPage::setDrawsTransparentBackground): (WebKit::WebPage::setWindowResizerSize): (WebKit::frameWithSelection): (WebKit::WebPage::unmarkAllMisspellings): (WebKit::WebPage::unmarkAllBadGrammar): (WebKit::pageContainsAnyHorizontalScrollbars): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::forceRepaint): Use tree(). instead of tree()->. 2013-08-24 Commit Queue Unreviewed, rolling out r154545. http://trac.webkit.org/changeset/154545 https://bugs.webkit.org/show_bug.cgi?id=120252 Broke WebKit2 API tests (Requested by andersca on #webkit). * GNUmakefile.list.am: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (beforeAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (methodCallCallback): * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: (webkit_frame_get_javascript_global_context): * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Removed. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Removed. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Removed. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitWebPageCreate): * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: 2013-08-24 Carlos Garcia Campos [GTK] Add WebKit2 API for isolated worlds https://bugs.webkit.org/show_bug.cgi?id=103377 Reviewed by Anders Carlsson. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (testWebExtensionWindowObjectCleared): (scriptDialogCallback): (runJavaScriptInIsolatedWorldFinishedCallback): (testWebExtensionIsolatedWorld): (beforeAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (echoCallback): (windowObjectCleared): (getWebPage): (methodCallCallback): * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: (webkit_frame_get_javascript_context_for_script_world): New public method to tget the JavaScript execution context for a given script world. * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added. (scriptWorlds): Global WebKitScriptWorld map. (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate): (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the given injected bundle script world. (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected bundle script world wrapped by the given WebKitScriptWorld. (webkitScriptWorldWindowObjectCleared): Emit WebKitScriptWorld::window-object-cleared signal. (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping the given injected bundle script world. (createDefaultScriptWorld): Create the default WebKitScriptWorld wrapping the normal world. (webkit_script_world_get_default): Return the default WebKitScriptWorld. (webkit_script_world_new): Create a new isolated WebKitScriptWorld. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared(). (webkitWebPageCreate): Add implementation for callback didClearWindowObjectForFrame in injected bundle loader client. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitScriptWorld.h. 2013-08-24 Carlos Garcia Campos [GTK] Expose WebKitFrame in WebKit2GTK+ web extensions API https://bugs.webkit.org/show_bug.cgi?id=119743 Reviewed by Anders Carlsson. * GNUmakefile.list.am: Add new files to compilation. * Shared/APIClientTraits.cpp: Update for new interface version. * Shared/APIClientTraits.h: Ditto. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitFrame section. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new public symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_frame_get_type. * UIProcess/API/gtk/tests/FrameTest.cpp: Added. (WebKitFrameTest::create): (WebKitFrameTest::webPageFromArgs): (WebKitFrameTest::testMainFrame): (WebKitFrameTest::testURI): (WebKitFrameTest::testJavaScriptContext): (WebKitFrameTest::runTest): (registerTests): * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test files. * UIProcess/API/gtk/tests/TestFrame.cpp: Added. (webkitFrameTestRun): (testWebKitFrameMainFrame): (testWebKitFrameURI): (testWebKitFrameJavaScriptContext): (beforeAll): (afterAll): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add willDestroyFrame callback to the injected bundle loader client, to notify the client when a frame is about to be destroyed. * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Added. (webkit_frame_class_init): (webkitFrameCreate): (webkit_frame_is_main_frame): (webkit_frame_get_uri): (webkit_frame_get_javascript_global_context): * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitFrameGetOrCreate): Helper function to create a WebKitFrame wrapping the given WebFrame or returning the wrapper if it already exists. (willDestroyFrame): Remove the WebKitFrame wrapping the given WebFrame if it exists. (webkitWebPageCreate): Add willDestroyFrame implementation to injected bundle loader client. (webkit_web_page_get_main_frame): Return the main frame of the page. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitFrame.h. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): New callback to be called when a frame is about to be destroyed. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::frameLoaderDestroyed): Call willDestroyFrame callback of injected bundle loader client. * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): Add willDestroyFrame callback. 2013-08-24 Antti Koivisto Revert accidental change. Not reviewed. * WebProcess/com.apple.WebProcess.sb.in: 2013-08-23 Beth Dakin REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in Adobe Reader https://bugs.webkit.org/show_bug.cgi?id=120240 -and corresponding- Reviewed by Anders Carlsson. Hook up new WebSystemInterface API to find out if the current context is the PDF context. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-08-23 Alexey Proskuryakov [WK2] Assertion failures when loading XSL stylesheets with NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=120186 Reviewed by Brady Eidson. Covered by many existing tests. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID. They are mostly needed for authentication, which is not supported with sync requests, but it will be supported some day. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::webFrameLoaderClient): Added a way to get frame loader client from WebKit NetworkingContext subclass. 2013-08-22 Carlos Garcia Campos [GTK] Wrong interface version used in WebKitWebPage for loader client https://bugs.webkit.org/show_bug.cgi?id=120199 Reviewed by Gustavo Noronha Silva. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitWebPageCreate): Use kWKBundlePageLoaderClientCurrentVersion instead of kWKBundlePageResourceLoadClientCurrentVersion in loader client initialization. 2013-08-22 Simon Cooper Need to disable FakeSYSVSHM when sandboxing is not enabled https://bugs.webkit.org/show_bug.cgi?id=120182 Reviewed by Alexey Proskuryakov. When not in a sandbox do not enable the FakeSYSVSHIM. This allows LocalConnection to work when Flash Player is run in "Unsafe Mode". * PluginProcess/mac/PluginProcessShim.mm: (WebKit::shim_disabled): 2013-08-22 Andy Estes Fix issues with OTHER_LDFLAGS in various .xcconfig files Reviewed by David Kilzer. Adding ld flags for ASAN overwrote the unexported symbol flags we were previously specifying. Since the unexported symbol ld flags are only needed for the framework target, move them to WebKit2.xcconfig where we can add them to OTHER_LDFLAGS along with the ASAN values inherited from DebugRelease.xcconfig (and other values). * Configurations/Base.xcconfig: Removed the unexported symbol ld flags. * Configurations/WebKit2.xcconfig: ... and moved them here. 2013-08-21 Tim Horton Another null-deref under WebDragClient::startDrag https://bugs.webkit.org/show_bug.cgi?id=120145 Reviewed by Simon Fraser. convertImageToBitmap can legitimately return null, so don't dereference it. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::startDrag): 2013-08-21 Beth Dakin Clients expect didFirstLayout-related calls to happen before didLayout Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidLayout): 2013-08-21 Alexey Proskuryakov REGRESSION (r145458?): WebProcess doesn't respect UI process localization https://bugs.webkit.org/show_bug.cgi?id=120096 Reviewed by Darin Adler. We used to get into a situation where CFBundle thought that we had no good localization, and used one passed as default. This is never the case with mixed localizations, so default is just ignored now. I think that the previous behavior was a bit of a hack. As WebProcess is not localized, it's more honest to say that we want mixed localizations, and force the language to match UI process localization. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: (WebKit::ChildProcessMain): Don't set default localization, it's not taken into consideration unless all other attempts to compute bundle localization fail. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::createProcess): Pass UI process localization as -AppleLanguages argument, so that Core Foundation uses that instead of actual user languages. We want to match UI process localization. 2013-08-20 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=120093 Remove getOwnPropertyDescriptor trap Reviewed by Geoff Garen. All implementations of this method are now called via the method table, and equivalent in behaviour. Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject. * WebProcess/Plugins/Netscape/JSNPObject.cpp: * WebProcess/Plugins/Netscape/JSNPObject.h: - remove getOwnPropertyDescriptor 2013-08-20 Pratik Solanki Document::markers() should return a reference Reviewed by Andreas Kling. Document::m_markers is never NULL so return a reference from Document::markers(). Also mark m_markers as const and initialize it in member initialization. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::rectsForTextMatches): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::unmarkAllMisspellings): (WebKit::WebPage::unmarkAllBadGrammar): 2013-08-20 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=120053 Remove custom getOwnPropertyDescriptor for JSNPObject Reviewed by Oliver Hunt. Think this is the last one! * WebProcess/Plugins/Netscape/JSNPObject.cpp: - Remove custom getOwnPropertyDescriptor implementation. 2013-08-20 Anton Obzhirov [Gtk] Cancel authentication on load failed Reviewed by Martin Robinson. Added callback to handle load-failed event in default authentication dialog. Authentication request gets cancelled and the dialog widget gets destroyed. * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: (pageLoadFailed): (webkitAuthenticationDialogInitialize): (webkitAuthenticationDialogDispose): (webkit_authentication_dialog_class_init): (webkitAuthenticationDialogNew): * UIProcess/API/gtk/WebKitAuthenticationDialog.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewAuthenticate): 2013-08-20 Allan Sandfeld Jensen [Qt][WK2] Doesn't build without Plugin-process https://bugs.webkit.org/show_bug.cgi?id=120060 Reviewed by Jocelyn Turcotte. Disable netscape plugin api in WebKit2 when the plugin architecture is unsupported for WebKit2. * Target.pri: 2013-08-19 Ryosuke Niwa Delete code for Snow Leopard Reviewed by Benjamin Poulain. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::overrideSystemProxies): (WebKit::NetworkProcess::platformInitializeNetworkProcess): * WebKit2Prefix.h: 2013-08-19 Beth Dakin AXObjectCache's accessibilityEnhancedUserInterfaceEnabled should be initialized on process creation Reviewed by Sam Weinig. Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends us a notification indicating that the value has changed. We should not have to rely on that to properly initialize this value. It should be done with the WebProcessCreationParamters. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2013-08-19 Pratik Solanki Frame::selection() should return a reference Reviewed by Darin Adler. m_selection is never NULL so return a reference from Frame::selection(). Also removed some unnecessary null checks and assert diff ts exposed as a result. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::updateGlobalSelection): * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::collapseSelection): (WebKit::WebEditorClient::updateGlobalSelection): * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: (WebKit::WebContextMenuClient::lookUpInDictionary): (WebKit::WebContextMenuClient::searchWithSpotlight): * WebProcess/WebPage/FindController.cpp: (WebKit::frameWithSelection): (WebKit::FindController::updateFindUIAfterPageScroll): (WebKit::FindController::getFindIndicatorBitmapAndRect): (WebKit::FindController::getImageForFindMatch): (WebKit::FindController::selectFindMatch): (WebKit::FindController::updateFindIndicator): (WebKit::FindController::drawRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): (WebKit::WebPage::scaledSnapshotWithOptions): (WebKit::WebPage::centerSelectionInVisibleArea): (WebKit::frameWithSelection): (WebKit::WebPage::clearSelection): (WebKit::WebPage::confirmComposition): (WebKit::WebPage::setComposition): (WebKit::WebPage::currentSelectionAsRange): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setComposition): (WebKit::WebPage::insertText): (WebKit::WebPage::insertDictatedText): (WebKit::WebPage::getMarkedRange): (WebKit::WebPage::getSelectedRange): (WebKit::WebPage::getAttributedSubstringFromRange): (WebKit::WebPage::characterIndexForPoint): (WebKit::convertToRange): (WebKit::WebPage::performDictionaryLookupAtLocation): (WebKit::WebPage::readSelectionFromPasteboard): (WebKit::WebPage::getStringSelectionForPasteboard): (WebKit::WebPage::getDataSelectionForPasteboard): 2013-08-18 Darin Adler Make use of Node::ownerDocument a compile time error Reviewed by Sam Weinig. * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use document instead of ownerDocument. * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto. 2013-08-18 Dan Bernstein Fix clean engineering builds after r154251. * WebKit2.xcodeproj/project.pbxproj: Removed references to the OfflineStorage XPC services from the “Copy XPC services for engineering builds” build phase. 2013-08-18 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=119972 Add attributes field to PropertySlot Reviewed by Geoff Garen. For all JSC types, this makes getOwnPropertyDescriptor redundant. There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour. (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally). * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): - Pass attributes to PropertySlot::set* methods. 2013-08-16 Sam Weinig Remove the unused OfflineStorageProcess Reviewed by Darin Adler. * Configurations/OfflineStorageProcess.xcconfig: Removed. * Configurations/OfflineStorageService.Development.xcconfig: Removed. * Configurations/OfflineStorageService.xcconfig: Removed. * DerivedSources.make: * OfflineStorageProcess: Removed. * OfflineStorageProcess/EntryPoint: Removed. * OfflineStorageProcess/EntryPoint/mac: Removed. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Removed. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Removed. * OfflineStorageProcess/OfflineStorageProcess.cpp: Removed. * OfflineStorageProcess/OfflineStorageProcess.h: Removed. * OfflineStorageProcess/OfflineStorageProcess.messages.in: Removed. * OfflineStorageProcess/mac: Removed. * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Removed. * OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Removed. * Scripts/webkit2/messages.py: * Shared/OfflineStorage: Removed. * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Removed. * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Removed. * WebKit2.xcodeproj/project.pbxproj: Remove. 2013-08-17 Darin Adler Make Page::dragController return a reference Reviewed by Andreas Kling. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): (WebKit::WebPage::dragEnded): Updated call sites. 2013-08-17 David Kilzer WebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard] Reviewed by Darin Adler. * UIProcess/Plugins/WebPluginSiteDataManager.h: Fix typo introduced in r78647. 2013-08-16 Pratik Solanki Frame::scriptController() should return a reference Reviewed by Andreas Kling. m_script is never NULL so we can just return a reference. Also remove some pointless null checks as a result of doing this. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::globalObject): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): (WebKit::PluginView::windowScriptNPObject): (WebKit::PluginView::pluginElementNPObject): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::jsContext): (WebKit::WebFrame::jsContextForWorld): (WebKit::WebFrame::jsWrapperForWorld): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::didSave): (WebKit::WebInspector::didAppend): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): 2013-08-16 Brady Eidson (NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously https://bugs.webkit.org/show_bug.cgi?id=119493 Reviewed by Alexey Proskuryakov. This patch does the following: - Consolidates SchedulableLoader and NetworkResourceLoader into one class. - Removes SyncNetworkResourceLoader. - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader. - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads. The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses. The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess only when the load is complete. Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm): * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::scheduleResourceLoader): (WebKit::HostRecord::addLoaderInProgress): (WebKit::removeLoaderFromQueue): (WebKit::HostRecord::removeLoader): (WebKit::HostRecord::servePendingRequestsForQueue): (WebKit::HostRecord::limitsRequests): * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::removeLoader): (WebKit::NetworkResourceLoadScheduler::receivedRedirect): (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): * NetworkProcess/NetworkResourceLoadScheduler.h: Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::isSynchronous): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::didReceiveResponseAsync): (WebKit::NetworkResourceLoader::didReceiveBuffer): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::willSendRequestAsync): (WebKit::NetworkResourceLoader::continueWillSendRequest): (WebKit::NetworkResourceLoader::didSendData): (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): (WebKit::NetworkResourceLoader::consumeSandboxExtensions): (WebKit::NetworkResourceLoader::invalidateSandboxExtensions): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::create): (WebKit::NetworkResourceLoader::connectionToWebProcess): (WebKit::NetworkResourceLoader::priority): (WebKit::NetworkResourceLoader::request): (WebKit::NetworkResourceLoader::isLoadingMainResource): (WebKit::NetworkResourceLoader::setHostRecord): (WebKit::NetworkResourceLoader::hostRecord): (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous: * NetworkProcess/NetworkLoaderClient.h: (WebKit::NetworkLoaderClient::~NetworkLoaderClient): (WebKit::NetworkLoaderClient::isSynchronous): (WebKit::NetworkLoaderClient::NetworkLoaderClient): The asynchronous loader client, primarily to message progress back to the WebProcess as it happens: * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added. (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient): (WebKit::AsynchronousNetworkLoaderClient::willSendRequest): (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse): (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer): (WebKit::AsynchronousNetworkLoaderClient::didSendData): (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading): (WebKit::AsynchronousNetworkLoaderClient::didFail): * NetworkProcess/AsynchronousNetworkLoaderClient.h: (WebKit::AsynchronousNetworkLoaderClient::create): The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once: * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added. (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient): (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient): (WebKit::SynchronousNetworkLoaderClient::willSendRequest): (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace): (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse): (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer): (WebKit::SynchronousNetworkLoaderClient::didFinishLoading): (WebKit::SynchronousNetworkLoaderClient::didFail): (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply): * NetworkProcess/SynchronousNetworkLoaderClient.h: Added. (WebKit::SynchronousNetworkLoaderClient::create): * NetworkProcess/SchedulableLoader.cpp: Removed. * NetworkProcess/SchedulableLoader.h: Removed. * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed. * NetworkProcess/SyncNetworkResourceLoader.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2013-08-16 Gabor Rapcsanyi [Qt][ARM] Unreviewed buildfix after 154127. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Add missing header. 2013-08-15 Ryuan Choi [EFL] Unreviewed build fix after r154142 and r154144. * UIProcess/WebContext.cpp: (WebKit::WebContext::useTestingNetworkSession): Fixed build break when NETWORK_PROCESS is disabled after r154144. 2013-08-15 Chris Fleizach AX: Crash: com.apple.WebKit.WebContent at com.apple.WebKit2: WebKit::WebPage::accessibilityObjectForMainFramePlugin + 8 Reviewed by Tim Horton. Ensure that the page is available before accessing it. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::accessibilityObjectForMainFramePlugin): 2013-08-15 Alexey Proskuryakov [WK2] NetworkProcess should use a temporary storage session for test https://bugs.webkit.org/show_bug.cgi?id=119855 Reviewed by Darin Adler. We used to have a bundle API for WebKitTestRunner to do this in injected bundle, but NetworkProcess has no injected bundle. Added a WKContext API, sending the information to NetworkProcess with initialization parameters. Reworked WebProcess path to do the same for consistency - bundle API is better per se, but not when we also need to have another one. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/API/C/WKContext.cpp: (WKContextUseTestingNetworkSession): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::ensureNetworkProcess): (WebKit::WebContext::createNewWebProcess): (WebKit::WebContext::useTestingNetworkSession): * UIProcess/WebContext.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): 2013-08-15 Anders Carlsson Frame::loader() should return a reference Reviewed by Andreas Kling. * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::create): * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation): * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameGetFrameLoadState): (WKBundleFrameClearOpener): (WKBundleFrameCallShouldCloseOnWebView): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::documentFrame): (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame): (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: (WebKit::InjectedBundleDOMWindowExtension::frame): * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::frame): (WebKit::InjectedBundleHitTestResult::targetFrame): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::clickedLink): * WebProcess/Plugins/PluginView.cpp: (WebKit::webPage): (WebKit::PluginView::didFailToInitializePlugin): (WebKit::PluginView::performFrameLoadURLRequest): (WebKit::PluginView::userAgent): (WebKit::PluginView::loadURL): (WebKit::PluginView::cancelManualStreamLoad): (WebKit::PluginView::proxiesForURL): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedElementChanged): (WebKit::WebChromeClient::focusedFrameChanged): (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): (WebKit::WebChromeClient::closeWindowSoon): (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): (WebKit::WebChromeClient::unavailablePluginButtonClicked): (WebKit::WebChromeClient::print): (WebKit::WebChromeClient::exceededDatabaseQuota): (WebKit::WebChromeClient::runOpenPanel): * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::textFieldDidBeginEditing): (WebKit::WebEditorClient::textFieldDidEndEditing): (WebKit::WebEditorClient::textDidChangeInTextField): (WebKit::WebEditorClient::textDidChangeInTextArea): (WebKit::WebEditorClient::doTextFieldCommandFromEvent): (WebKit::WebEditorClient::textWillBeDeletedInTextField): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent): (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): (WebKit::WebFrameLoaderClient::updateGlobalHistory): (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): (WebKit::WebFrameLoaderClient::restoreViewState): (WebKit::WebFrameLoaderClient::createFrame): (WebKit::WebFrameLoaderClient::createJavaAppletWidget): (WebKit::WebFrameLoaderClient::objectContentType): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::getPluginInfo): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::blockedError): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::didReceivePolicyDecision): (WebKit::WebFrame::startDownload): (WebKit::WebFrame::source): (WebKit::WebFrame::contentsAsString): (WebKit::WebFrame::url): (WebKit::WebFrame::parentFrame): (WebKit::WebFrame::childFrames): (WebKit::WebFrame::stopLoading): (WebKit::WebFrame::frameForContext): (WebKit::WebFrame::provisionalURL): (WebKit::WebFrame::suggestedFilenameForResourceWithURL): (WebKit::WebFrame::mimeTypeForResourceWithURL): (WebKit::WebFrameFilter::shouldIncludeSubframe): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): (WebKit::WebPage::close): (WebKit::WebPage::tryClose): (WebKit::WebPage::loadURLRequest): (WebKit::WebPage::loadDataImpl): (WebKit::WebPage::linkClicked): (WebKit::WebPage::stopLoadingFrame): (WebKit::WebPage::stopLoading): (WebKit::WebPage::reload): (WebKit::WebPage::tryRestoreScrollPosition): (WebKit::WebPage::getMainResourceDataOfFrame): (WebKit::resourceDataForFrame): (WebKit::shouldReuseCommittedSandboxExtension): (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): (WebKit::WebPage::hasLocalDataForURL): (WebKit::WebPage::setCustomTextEncodingName): (WebKit::WebPage::canPluginHandleResponse): (WebKit::WebPage::canShowMIMEType): (WebKit::WebPage::didCommitLoad): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformHasLocalDataForURL): (WebKit::cachedResponseForURL): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): 2013-08-14 Filip Pizlo Typed arrays should be rewritten https://bugs.webkit.org/show_bug.cgi?id=119064 Reviewed by Oliver Hunt. You don't need to include JSUint8Array anymore if you just want to unwrap one; JSDOMBinding gives you all of the things you need. * WebProcess/InjectedBundle/InjectedBundle.cpp: 2013-08-15 Eric Carlson [Mac] Remove "legacy" media UI https://bugs.webkit.org/show_bug.cgi?id=119752 Reviewed by Jer Noble. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable. 2013-08-14 Dean Jackson Allow primary plug-in detection to run more than once if necessary Reviewed by Tim Horton. We occasionally see cases where the primary plug-in detection runs before the plugins have been added to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can run an arbitrary number of times if it fails. While here, also have the detection run if there has ever been a plugin in the page as opposed to any current views. We may have snapshotted a plugin by now and deleted its view. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): initialise new members. (WebKit::WebPage::addPluginView): Mark that we've seen a plugin. (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members. (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set a timer to run again (maximum of two attempts at the moment). * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts and m_hasSeenPlugin. 2013-08-14 Dean Jackson Add pluginView-related logging to WebPage Reviewed by Tim Horton. Add some more diagnostic output to help track down bugs. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addPluginView): More logging. (WebKit::WebPage::removePluginView): Ditto. 2013-08-14 Alexey Proskuryakov [WK2] Sync messages with with non-default timeout sent from secondary threads always time out https://bugs.webkit.org/show_bug.cgi?id=119767 Fix by Justin Bur. Reviewed by Darin Adler. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread): The argument to wait() is absolute time, not a delta. This calculation matches one in Connection::waitForMessage(). 2013-08-14 Tim Horton REGRESSION (r153877): Plugin scanning slows creation of WebViews https://bugs.webkit.org/show_bug.cgi?id=119665 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::refreshPlugins): Don't repopulate the plugin cache in refreshPlugins, just invalidate it. It will be repopulated the next time something tries to use it. 2013-08-12 Dan Bernstein Fixed an off-by-(sizeof(char*) - 1) bug. Reviewed by Sam Weinig. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: (WebKit::XPCServiceEventHandler): Allocate a sufficiently large buffer. 2013-08-12 Beth Dakin Remove didNewFirstVisuallyNonEmptyLayout from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=119658 Reviewed by Darin Adler. Removing this function entirely will change some functionality in the Nightlies, but we think that is an acceptable difference for the Nightlies. If is does cause a problem though, we can roll out this patch and deprecate the function instead. * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: * UIProcess/WebLoaderClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeLoaderClient): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidLayout): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::initializeInjectedBundleLoaderClient): 2013-08-12 Arunprasad Rajkumar [Qt] [WebKit2] Remove duplicate RAM Size calculation and reuse WTF::ramSize() https://bugs.webkit.org/show_bug.cgi?id=119663 Reviewed by Sam Weinig. * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformSetCacheModel): 2013-08-12 Anton Obzhirov [GTK] Don't load GAIL when using GTK 3.2 or greater https://bugs.webkit.org/show_bug.cgi?id=72735 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp: (main): 2013-08-09 Beth Dakin AX: Not able to use arrow keys to read text in a WK2 app https://bugs.webkit.org/show_bug.cgi?id=119605 -and corresponding- Reviewed by Darin Adler. Make all of these scrolling functions actually return the WebCore bools that indicate whether or not scrolling happened. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scroll): (WebKit::WebPage::logicalScroll): (WebKit::WebPage::scrollBy): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::executeKeypressCommandsInternal): This function now gives accessibility a chance to handle the event too. And it also actually tracks whether or not the event was handled by scrolling instead of assuming that it was and universally returning true. (WebKit::WebPage::performNonEditingBehaviorForSelector): 2013-08-09 Brian Holt [GTK] [WebKit2] Add an 'authenticate' signal to WebKitWebView https://bugs.webkit.org/show_bug.cgi?id=99352 Reviewed by Carlos Garcia Campos. Add a new public class to the API, WebKitAuthenticationRequest, to be emitted along with a new WebKitWebView::authenticate signal to let client applications to provide their own authentication when the user is challenged with HTTP authentication. The credential is exposed through a new class WebKitCredential. * GNUmakefile.list.am: * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: (okButtonClicked): Use new API for authentication. (cancelButtonClicked): Ditto. (webkitAuthenticationDialogInitialize):Get authenticationChallenge from request object. (webkitAuthenticationDialogNew): Ditto. * UIProcess/API/gtk/WebKitAuthenticationDialog.h: * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp: Added new class representing a HTTP authentication request. (webkitAuthenticationRequestDispose): (webkit_authentication_request_class_init): (webkitAuthenticationRequestCreate): (webkitAuthenticationRequestGetAuthenticationChallenge): (webkit_authentication_request_can_save_credentials): (webkit_authentication_request_get_proposed_credential): (webkit_authentication_request_get_host): (webkit_authentication_request_get_port): (webkit_authentication_request_get_realm): (webkit_authentication_request_get_scheme): (webkit_authentication_request_is_for_proxy): (webkit_authentication_request_is_retry): (webkit_authentication_request_authenticate): (webkit_authentication_request_cancel): * UIProcess/API/gtk/WebKitAuthenticationRequest.h: Added. * UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h: Added. * UIProcess/API/gtk/WebKitCredential.cpp: Added new class to support credentials for HTTP authentication. (_WebKitCredential::_WebKitCredential): (webkitCredentialCreate): (webkitCredentialGetCredential): (webkit_credential_new): (webkit_credential_copy): (webkit_credential_free): (webkit_credential_get_username): (webkit_credential_get_password): (webkit_credential_has_password): (webkit_credential_get_persistence): * UIProcess/API/gtk/WebKitCredential.h: Added. * UIProcess/API/gtk/WebKitCredentialPrivate.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: Added authenticate signal. (webkitWebViewAuthenticate): Default signal handler for authenticate. (webkit_web_view_class_init): Ditto. (webkitWebViewHandleAuthenticationChallenge): Create an authentication request and emit it with authenticate signal. * UIProcess/API/gtk/WebKitWebView.h: Replaced reserved function pointer slot with for WebViewClass with function pointer to authenticate signal handler. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section for the authentication request. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto. * UIProcess/API/gtk/docs/webkit2gtk.types: Added authentication request and credential types. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Created a new unit test for HTTP authentication. A libsoup server callback handler is installed that creates soup messages with appropriate headers and body to test HTTP authentication. (testWebViewAuthenticationRequest): Test the authentication request and credential API. (testWebViewAuthenticationCancel): Test cancelled authentication. (testWebViewAuthenticationFailure): Test repeated authentication failures. (testWebViewAuthenticationNoCredential): Test continue without credentials. (testWebViewAuthenticationStorage): Test credential storage. (testWebViewAuthenticationSuccess): Test successful authentication. (beforeAll): Added tests. * UIProcess/API/gtk/webkit2.h: Added WebKitAuthenticationRequest and WebKitCredential headers. 2013-08-09 Tim Horton PDFPlugin is disabled by default in nightlies on Mac accidentally https://bugs.webkit.org/show_bug.cgi?id=119615 Rubber-stamped by Andreas Kling. Enable PDFPlugin by default on Mac at the WebKit2 level. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferencesPrivate.h: 2013-08-08 Tim Horton navigator.plugins has plugins in it when plugins are disabled https://bugs.webkit.org/show_bug.cgi?id=119607 Reviewed by Anders Carlsson. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPlugins): Return a list of all plugins, and a list of only application plugins. * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::getPluginInfo): Add applicationPlugin parameter to getPlugins, and storage for the returned list. (WebKit::WebPlatformStrategies::populatePluginCache): If plugins are disabled for the given page, give WebCore the list that only includes application plugins. Otherwise, give it the whole list as we are doing currently. 2013-08-08 Gavin Barraclough Disable suppression of plugin process for Java https://bugs.webkit.org/show_bug.cgi?id=119604 Reviewed by Sam Weinig. Workaround, the Java plugin doesn't like this. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): - +1 active task count on the java plugin, to inhibit supression. 2013-08-08 Dean Jackson Add logging to the primary plugin detection https://bugs.webkit.org/show_bug.cgi?id=119594 Reviewed by Tim Horton. Add some simple logging to our primary plug-in detection. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 2013-08-08 Alexey Proskuryakov WKBundleFrameCopyProvisionalURL crashes when there is no provisional loader https://bugs.webkit.org/show_bug.cgi?id=119587 Reviewed by Darin Adler. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::provisionalURL): Added a null check, like we already have in WebFrame::url(). 2013-08-07 Antti Koivisto Try to fix EFL build. Not reviewed. * CMakeLists.txt: 2013-08-06 Jer Noble Crash when entering fullscreen video playback from a WebView using WebKit2 https://bugs.webkit.org/show_bug.cgi?id=119531 Reviewed by Tim Horton. Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-08-06 Stephanie Lewis Update Order Files for Safari Unreviewed. * mac/WebKit2.order: 2013-08-04 Sam Weinig Remove support for HTML5 MicroData https://bugs.webkit.org/show_bug.cgi?id=119480 Reviewed by Anders Carlsson. * Configurations/FeatureDefines.xcconfig: 2013-08-06 Eunmi Lee [EFL][WK2] Implement gesture recognizer. https://bugs.webkit.org/show_bug.cgi?id=102643 Reviewed by Gyuyoung Kim. Recognize tap, pan and pinch gestures using touch events. The tap gesture is separated into single tap, double tap and 'tap and hold'. This patch references the webkit NIX port. https://github.com/WebKitNix/webkitnix * PlatformEfl.cmake: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::doneWithTouchEvent): * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/GestureRecognizer.cpp: Added. (WebKit::GestureHandler::create): (WebKit::GestureHandler::GestureHandler): (WebKit::GestureHandler::handleSingleTap): (WebKit::GestureHandler::handleDoubleTap): (WebKit::GestureHandler::handleTapAndHold): (WebKit::GestureHandler::handlePanStarted): (WebKit::GestureHandler::handlePan): (WebKit::GestureHandler::handlePanFinished): (WebKit::GestureHandler::handlePinchStarted): (WebKit::GestureHandler::handlePinch): (WebKit::GestureHandler::handlePinchFinished): (WebKit::GestureRecognizer::GestureRecognizer): (WebKit::GestureRecognizer::~GestureRecognizer): (WebKit::GestureRecognizer::processTouchEvent): (WebKit::GestureRecognizer::doubleTapTimerCallback): (WebKit::GestureRecognizer::tapAndHoldTimerCallback): (WebKit::GestureRecognizer::exceedsPanThreshold): (WebKit::GestureRecognizer::exceedsDoubleTapThreshold): (WebKit::getPointAtIndex): (WebKit::createVectorWithWKArray): (WebKit::GestureRecognizer::noGesture): (WebKit::GestureRecognizer::singleTapGesture): (WebKit::GestureRecognizer::doubleTapGesture): (WebKit::GestureRecognizer::panGesture): (WebKit::GestureRecognizer::pinchGesture): (WebKit::GestureRecognizer::reset): (WebKit::GestureRecognizer::stopTapTimers): * UIProcess/API/efl/GestureRecognizer.h: Added. (WebKit::GestureRecognizer::create): 2013-07-23 David Farler Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN https://bugs.webkit.org/show_bug.cgi?id=117762 Reviewed by Mark Rowe. * Configurations/DebugRelease.xcconfig: Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS. * Configurations/WebContentProcess.xcconfig: Add ASAN_OTHER_LDFLAGS. * Configurations/WebKit2.xcconfig: Add ASAN_OTHER_LDFLAGS. 2013-08-06 Andreas Kling REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed. Reviewed by Simon Fraser. The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy of the window rect for fast access from DOMWindow APIs. We retain part of the optimization introduced in r151403, namely not computing the viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): 2013-07-26 Mark Rowe Logging should be configurable using human-readable channel names rather than crazy bitmasks Implement shared logic for initializing logging channels based on human-readable channel names in WTF, and rework the WebCore, WebKit and WebKit2 logging initialization on top of it. Logging channels may now be enabled by providing a comma-separated list of channel names, with the special "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except for history and loading being enabled. For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow the old user defaults to remain set for those people that need to switch between version of WebKit before and after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel, the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging. For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for consistency with the other platforms and to enable more code sharing. While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when adding a new logging channel. Now only the header in the relevant project needs to be updated. Reviewed by Sam Weinig. * NetworkProcess/NetworkProcess.cpp: Switch from WebCore's InitializeLogging.h to Logging.h. * Platform/Logging.cpp: Use WEBKIT2_LOG_CHANNELS to define all of the channels. (WebKit::initializeLogChannelsIfNecessary): Pass the channels and the log level string to the new WTF function that handles the initialization. (WebKit::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function to find a log channel rather than repeating the names of the log channels a further two times each. (WebKit::logLevelString): Provide a no-op implementation. * Platform/Logging.h: Declare a WEBKIT2_LOG_CHANNELS macro that can be used to apply a preprocessor macro across the set of all logging channels. Use this macro to declare the logging channels. * Platform/efl/LoggingEfl.cpp: (WebKit::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable. * Platform/gtk/LoggingGtk.cpp: (WebKit::logLevelString): Ditto. * Platform/mac/Logging.mac.mm: (WebKit::logLevelString): Pull the value out of the WebKit2Logging user default key. * Platform/qt/LoggingQt.cpp: (WebKit::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable. * Shared/WebKit2Initialize.cpp: Switch from WebCore's InitializeLogging.h to Logging.h. * UIProcess/WebContext.cpp: Switch from WebCore's InitializeLogging.h to Logging.h. 2013-08-05 Anders Carlsson Ignore the Apple Java placeholder plug-in https://bugs.webkit.org/show_bug.cgi?id=119494 Reviewed by Beth Dakin. Never attempt to load the Java placeholder plug-in. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::shouldUsePlugin): 2013-08-03 Tim Horton Unreviewed, build and style fix for r153693. * UIProcess/WebProcessProxy.cpp: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/WebPage/WebPage.cpp: 2013-08-03 Tim Horton Remove SimplePDFPlugin https://bugs.webkit.org/show_bug.cgi?id=119437 Reviewed by Alexey Proskuryakov. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPlugins): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Don't add SimplePDFPlugin, nor try to instantiate it. * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/Plugins/PDF/PDFPlugin.mm: Merge previously inherited behavior in from SimplePDFPlugin. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Removed. * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Removed. Remove SimplePDFPlugin. 2013-08-03 Tim Horton Remove pageOverlayShouldApplyFadeWhenPainting() and adopt composited fade for the Mac port https://bugs.webkit.org/show_bug.cgi?id=119411 Reviewed by Simon Fraser. Mac is the only holdout that performs non-composited fades of page overlays. We should adopt that mechanism (as a precursor to doing a CA-accelerated fade) and remove the now-unnecessary property. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayFractionFadedIn): Always return 1 (fully-faded-in) so that clients who attempt to use this to bake the fade opacity into their painting will paint at full opacity, allowing us to do the composited fade separately. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::PageOverlay): (WebKit::PageOverlay::setPage): (WebKit::PageOverlay::setNeedsDisplay): (WebKit::PageOverlay::fadeAnimationTimerFired): * WebProcess/WebPage/PageOverlay.h: Remove pageOverlayShouldApplyFadeWhenPainting and fractionFadedIn(). * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::drawRect): Draw the find overlay without taking the PageOverlay's fade into account. * WebProcess/WebPage/TapHighlightController.cpp: (WebKit::TapHighlightController::drawRect): Remove pageOverlayShouldApplyFadeWhenPainting. Since it's always "false" for all ports now, take the second path here. * WebProcess/WebPage/mac/LayerTreeHostMac.h: * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::setPageOverlayOpacity): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayOpacity): Implement setPageOverlayOpacity for DrawingAreaImpl and TiledCoreAnimationDrawingArea. 2013-08-02 Gavin Barraclough Remove no-arguments constructor to PropertySlot https://bugs.webkit.org/show_bug.cgi?id=119460 Reviewed by Geoff Garen. This constructor was unsafe if getValue is subsequently called, and the property is a getter. Simplest to just remove it. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::getOwnPropertyDescriptor): 2013-08-02 Ruth Fong [Forms: color] WebColorPickerMac deconstructor shouldn't assert a variable and https://bugs.webkit.org/show_bug.cgi?id=119419 Reviewed by Tim Horton. * UIProcess/mac/WebColorPickerMac.mm: (WebKit::WebColorPickerMac::~WebColorPickerMac): If the m_colorPickerUI variable is not null, then properly destroy it first before destroying WebColorPickerMac object. 2013-08-02 Ruth Fong [Forms: color] The positioning of the popover color well is inverted and https://bugs.webkit.org/show_bug.cgi?id=119455 Reviewed by Tim Horton. This patch converts the coordinates of the element to the window's base coordinate system. * UIProcess/mac/WebColorPickerMac.mm: (-[WKColorPopoverMac initWithFrame:inView:]): 2013-08-01 Ruth Fong [Forms: color] popover color well implementation and https://bugs.webkit.org/show_bug.cgi?id=119356 Reviewed by Benjamin Poulain. This patch adds an popover implementation of . * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::createColorPicker): Updated to pass the coordinates of the element and the WKView object for the window. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewWillStartLiveResize): Close popover color picker when the view is resized. (WebKit::WebPageProxy::viewInWindowStateDidChange): Close popover color picker when the view is no longer in the window. (WebKit::WebPageProxy::showColorPicker): Updated to show either a color panel or a popover color picker depending on whether INPUT_TYPE_COLOR_POPOVER is enabled. * UIProcess/mac/WebColorPickerMac.h: * UIProcess/mac/WebColorPickerMac.mm: (WebKit::WebColorPickerMac::create): (WebKit::WebColorPickerMac::~WebColorPickerMac): (WebKit::WebColorPickerMac::WebColorPickerMac): (WebKit::WebColorPickerMac::endPicker): (WebKit::WebColorPickerMac::setSelectedColor): (WebKit::WebColorPickerMac::showColorPicker): Methods updated to handle both the color panel implementation and the popover implementation; also renamed m_panel to m_colorPickerUI. (-[WKColorPopoverMac initWithFrame:WebCore::inView:]): (-[WKColorPopoverMac setAndShowPicker:WebKit::withColor:]): (-[WKColorPopoverMac dealloc]): (-[WKColorPopoverMac invalidate]): (-[WKColorPopoverMac windowWillClose:]): (-[WKColorPopoverMac didChooseColor:]): (-[WKColorPopoverMac setColor:]): WKColorPopoverMac provides the popover implementation of . (-[WKColorPanelMac didChooseColor:]): Updated to match the interface of WKColorPickerMac::didChooseColor. 2013-08-01 Anders Carlsson Lots of leaks under WebContext::pluginInfoStoreDidLoadPlugins() https://bugs.webkit.org/show_bug.cgi?id=119412 Reviewed by Simon Fraser. For some sick reason, the WKContextClient plugInInformationBecameAvailable callback function expects a +1 reference to the plug-in array. Isolate that hack to WebContextClient so that we don't leak the array if there is no WKContextClient. * UIProcess/WebContext.cpp: (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::plugInInformationBecameAvailable): 2013-08-01 Kwang Yul Seo Remove return statement in void function https://bugs.webkit.org/show_bug.cgi?id=119379 Reviewed by Darin Adler. It does not make sense to return a value in void function. * WebProcess/WebProcess.cpp: (WebKit::addCaseFoldedCharacters): 2013-08-01 Kwang Yul Seo [WK2] Add USE(SOUP) guard in WebProcess::destroyPrivateBrowsingSession https://bugs.webkit.org/show_bug.cgi?id=119381 Reviewed by Darin Adler. The is a followup to r153355. I missed to add USE(SOUP) guard in WebProcess::destroyPrivateBrowsingSession. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::destroyPrivateBrowsingSession): 2013-08-01 Milian Wolff [Qt] Enable QML handling of crashed/unresponsive QtWebProcess https://bugs.webkit.org/show_bug.cgi?id=108474 Forward the processDidCrash, didRelaunchProcess, processDidBecomeUnresponsive and processDidBecomeResponsive signals to QML's WebView.experimental. Reviewed by Jocelyn Turcotte. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::processDidBecomeUnresponsive): (QQuickWebViewPrivate::processDidBecomeResponsive): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2013-07-31 Kwang Yul Seo Use emptyString instead of String("") https://bugs.webkit.org/show_bug.cgi?id=119335 Reviewed by Darin Adler. Use emptyString() instead of String("") because it is better style and faster. This is a followup to r116908, removing all occurrences of String("") from WebKit. * Shared/mac/WebEventFactory.mm: (WebKit::textFromEvent): (WebKit::unmodifiedTextFromEvent): 2013-07-31 Ruth Fong Mac UI behaviour and https://bugs.webkit.org/show_bug.cgi?id=61276 Implemented on Mac using the native color picker. Reviewed by Brady Eidson. Code for WebColorPickerMac is derived from Chromium's color_chooser_mac.mm: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/cocoa/color_chooser_mac.mm * Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::createColorPicker): Replaced stub implementation and return a WebColorPickerMac object. * UIProcess/WebColorPicker.cpp: (WebKit::WebColorPicker::invalidate): Updated to call endChooser(). (WebKit::WebColorPicker::showColorPicker): Added stub implementation. * UIProcess/WebColorPicker.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Removed invalidation of removed color picker objects. (WebKit::WebPageProxy::showColorPicker): Updated so that it works for multiple elements on a page. (WebKit::WebPageProxy::didEndColorPicker): Removed cleanup of removed color picker objects. (WebKit::WebPageProxy::resetStateAfterProcessExited): Removed cleanup of removed color picker objects. * UIProcess/mac/WebColorPickerMac.h: Added. * UIProcess/mac/WebColorPickerMac.mm: Added. (WebKit::WebColorPickerMac::create): (WebKit::WebColorPickerMac::~WebColorPickerMac): (WebKit::WebColorPickerMac::WebColorPickerMac): (WebKit::WebColorPickerMac::endPicker): (WebKit::WebColorPickerMac::setSelectedColor): (WebKit::WebColorPickerMac::didChooseColor): (WebKit::WebColorPickerMac::showColorPicker): WebColorPickerMac contains a reference to a WKColorPanelMac object and is responsible for maintaining the color picker UI. (-[WKColorPanelMac setAndShowPicker:withColor:]): (-[WKColorPanelMac invalidate]): (-[WKColorPanelMac windowWillClose:]): (-[WKColorPanelMac didChooseColor:]): (-[WKColorPanelMac setColor:]): WKColorPanelMac is a wrapper for a NSColorPanel object and is responsible for the color picker UI. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createColorChooser): Updated to always create a WebColorChooser object. * WebProcess/WebCoreSupport/WebColorChooser.cpp: (WebKit::WebColorChooser::reattachColorChooser): Sets the page's active color chooser to the current object and pings the UIProcess to show the color picker. (WebKit::WebColorChooser::setSelectedColor): Only sets the color in the color picker if the WebColorChooser object is the active color element. * WebProcess/WebCoreSupport/WebColorChooser.h: 2013-07-30 Gavin Barraclough Some cleanup in JSValue::get https://bugs.webkit.org/show_bug.cgi?id=119343 Reviewed by Geoff Garen. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::getOwnPropertySlot): * WebProcess/Plugins/Netscape/JSNPObject.h: - getOwnPropertySlot, JSCell -> JSObject 2013-07-31 Allan Sandfeld Jensen [Qt] Build WebKit with C++11 https://bugs.webkit.org/show_bug.cgi?id=119337 Reviewed by Csaba Osztrogonác. We no longer need to enable C++11 specifically for WebKit2. * WebKit2.pri: 2013-07-30 Tim Horton DHTML drag can result in a null-deref under WebDragClient::startDrag https://bugs.webkit.org/show_bug.cgi?id=119297 Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::convertImageToBitmap): ShareableBitmap::createShareable can return null, but shouldn't dereference that. 2013-07-30 Ruth Fong Rename functions in WebPageProxy, WebColorPicker and https://bugs.webkit.org/show_bug.cgi?id=119097 Reviewed by Tim Horton. In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker. * UIProcess/WebColorPicker.cpp: (WebKit::WebColorPicker::endPicker): * UIProcess/WebColorPicker.h: * UIProcess/WebColorPickerResultListenerProxy.cpp: (WebKit::WebColorPickerResultListenerProxy::setColor): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showColorPicker): (WebKit::WebPageProxy::setColorPickerColor): (WebKit::WebPageProxy::endColorPicker): (WebKit::WebPageProxy::didEndColorPicker): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/WebColorPickerQt.cpp: (WebKit::WebColorPickerQt::createItem): (WebKit::WebColorPickerQt::notifyColorSelected): (WebKit::WebColorPickerQt::endPicker): * UIProcess/qt/WebColorPickerQt.h: * WebProcess/WebCoreSupport/WebColorChooser.cpp: (WebKit::WebColorChooser::WebColorChooser): (WebKit::WebColorChooser::setSelectedColor): (WebKit::WebColorChooser::endChooser): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didEndColorPicker): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2013-07-30 Anders Carlsson Speculative fix for crash due to string access on multiple threads https://bugs.webkit.org/show_bug.cgi?id=119279 Reviewed by Darin Adler. We can't use String::isolatedCopy for passing the local storage directory to the storage thread since that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window where the refcount can be accessed simultaneously from two threads. Work around this by passing a PassRefPtr to bind instead; the act of copying the PassRefPtr will clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null. * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): * UIProcess/Storage/LocalStorageDatabaseTracker.h: 2013-07-30 Tim Horton Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot") https://bugs.webkit.org/show_bug.cgi?id=119275 Reviewed by Simon Fraser. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::imageForRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scaledSnapshotWithOptions): Fix typo. 2013-07-30 Anders Carlsson Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate https://bugs.webkit.org/show_bug.cgi?id=119270 Reviewed by Darin Adler. Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this since we don't know the plug-in or connection. Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): (CoreIPC::Connection::sendSyncMessage): * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::inSendSync): * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::destroy): 2013-07-30 Tim Horton Null deref under WebPage::scaledSnapshotWithOptions https://bugs.webkit.org/show_bug.cgi?id=119243 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scaledSnapshotWithOptions): WebFrame::coreFrame() can be null (if the Frame is already torn down), so we should check it. 2013-07-30 Tim Horton Null deref under PluginView::handlesPageScaleFactor() https://bugs.webkit.org/show_bug.cgi?id=119231 Reviewed by Darin Adler. Null-check the PluginView in the caller as well. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::handlesPageScaleGesture): 2013-07-30 Patrick Gansterer Remove unused Download*.cpp files https://bugs.webkit.org/show_bug.cgi?id=119248 Reviewed by Anders Carlsson. * Shared/Downloads/cfnet/DownloadCFNet.cpp: Removed. * Shared/Downloads/curl/DownloadCurl.cpp: Removed. 2013-07-30 Jeff Miller Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0 https://bugs.webkit.org/show_bug.cgi?id=119269 Reviewed by Anders Carlsson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processIdentifier): Return 0 if the page is closed instead of requiring isValid(). 2013-07-30 Kwang Yul Seo [WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorClient.cpp https://bugs.webkit.org/show_bug.cgi?id=119034 Reviewed by Anders Carlsson. The Mac and EFL ports use the same implementation of WebEditorClient::checkTextOfParagraph and GTK will use the same implementation too. So rather than duplicating the same code in platform specific files, move the implementation to platform agnostic WebProcess/WebCoreSupport/WebEditorClient.cpp. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::checkTextOfParagraph): * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 2013-07-30 Brian Holt [WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect https://bugs.webkit.org/show_bug.cgi?id=119258 Reviewed by Martin Robinson. Corrected the installed URI response property from PROP_REQUEST to PROP_RESPONSE and type from WEBKIT_TYPE_URI_REQUEST to WEBKIT_TYPE_URI_RESPONSE. * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp: (webkit_response_policy_decision_class_init): 2013-07-29 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing header file to compilation. 2013-07-29 Tim Horton [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync https://bugs.webkit.org/show_bug.cgi?id=119225 Reviewed by Simon Fraser. Tell CoreAnimation to flush the implicit transaction before replying when using endDeferringViewInWindowChangesSync, as that method's contract is that the WebProcess is totally ready to be in-window when it returns. * UIProcess/API/mac/WKView.mm: (-[WKView endDeferringViewInWindowChanges]): Adopt viewInWindowStateDidChange. (-[WKView endDeferringViewInWindowChangesSync]): Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewInWindowStateDidChange): (WebKit::WebPageProxy::viewStateDidChange): Pull viewInWindowStateDidChange out of viewStateDidChange. Request a reply from SetIsInWindow if we're told to. * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didUpdateInWindowStateTimerFired): Don't build this version on Mac, we'll have a WebPageMac version. (WebKit::WebPage::setIsInWindow): Only start the timer to send the didUpdateInWindowState reply if we're asked to. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add an argument to the SetIsInWindow message for whether the WebProcess should inform the UIProcess when SetIsInWindow completes or not. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::didUpdateInWindowStateTimerFired): Tell CA to flush the implicit transaction before telling the UIProcess that we're finished moving in-window. 2013-07-29 Tim Horton Null deref under PluginView::handlesPageScaleFactor() https://bugs.webkit.org/show_bug.cgi?id=119231 Reviewed by Simon Fraser. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handlesPageScaleFactor): * WebProcess/Plugins/PluginView.h: Null-check m_plugin and check m_isInitialized. Make pageScaleFactor() and handlesPageScaleFactor const. 2013-07-29 Anders Carlsson Remove setUnderlayPage() and associated code https://bugs.webkit.org/show_bug.cgi?id=119220 Reviewed by Jessie Berlin. This is dead code, get rid of it. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): (WebKit::WebPage::layoutIfNeeded): (WebKit::WebPage::drawRect): * WebProcess/WebPage/WebPage.h: 2013-07-29 Sergio Correia CoordinatedGraphics: Add API to get and set the active state of a WebView https://bugs.webkit.org/show_bug.cgi?id=119067 Reviewed by Noam Rosenthal. A view being in the "active" state generally means that it is not in the "background", although this definition can vary depending on the platform under consideration. This patch adds the following APIs to WKView: - bool WKViewIsActive(WKViewRef) This API accepts a WKViewRef as parameter and returns a boolean indicating whether the given view is active. - void WKViewSetIsActive(WKViewRef, bool) This API accepts a WKViewRef and a boolean as parameteres, and it sets the active state of the given view to the given boolean argument. * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: (WKViewIsActive): API added. (WKViewSetIsActive): Ditto. * UIProcess/API/C/CoordinatedGraphics/WKView.h: Export aforementioned API. * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::initialize): Use new setActive method. (WebKit::WebView::setActive): Added method to set the active state of the view. (WebKit::WebView::isActive): Added method to return the active state of view. (WebKit::WebView::enterAcceleratedCompositingMode): Use new setActive method. (WebKit::WebView::exitAcceleratedCompositingMode): Ditto. * UIProcess/CoordinatedGraphics/WebView.h: Added declarations of isActive and setActive. 2013-07-29 Jae Hyun Park Remove duplicated LayerTreeHost::supportsAcceleratedCompositing https://bugs.webkit.org/show_bug.cgi?id=118949 Reviewed by Noam Rosenthal. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::supportsAcceleratedCompositing): 2013-07-29 Zan Dobersek [Automake] Remove references to non-existent *_CFLAGS and *_LIBS variables https://bugs.webkit.org/show_bug.cgi?id=119212 Reviewed by Carlos Garcia Campos. * GNUmakefile.am: Remove references to GLOBALDEPS_(CFLAGS|LIBS) and CLUTTER_(CFLAGS|LIBS) variables that are not defined during the configuration process. 2013-07-28 Grzegorz Czajkowski [EFL][WK2] Simplify context_menu_spelling_items_availability unit test https://bugs.webkit.org/show_bug.cgi?id=119085 Reviewed by Gyuyoung Kim. Use findContextMenuItem method to check whether the item appears in context menu. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (EWK2TextCheckerTest::findContextMenuItem): Do not report failure inside the method. It doesn't allow to test the negative test cases. (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems): Use findContextMenuItem method. (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping): (EWK2TextCheckerTest::selectLearnSpelling): (EWK2TextCheckerTest::selectIgnoreSpelling): Verify the return value of findContextMenuItem. (TEST_F): Reset wasContextMenuShown variable, it's needed after r152153. Use waitUntilTrue method. 2013-07-27 Jacky Jiang Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory https://bugs.webkit.org/show_bug.cgi?id=119186 Reviewed by Anders Carlsson. * UIProcess/mac/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::getOrCreateLayer): 2013-07-27 Chris Fleizach AX: VoiceOver not working with data detection page overlays https://bugs.webkit.org/show_bug.cgi?id=118680 Reviewed by Sam Weinig. Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay. This requires two methods in a new callback struct. One to copy the attribute names, and the other to copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the overlay at this time as there are no clients with such a need. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (PageOverlayClientImpl::setAccessibilityClient): (PageOverlayClientImpl::PageOverlayClientImpl): (PageOverlayClientImpl::copyAccessibilityAttributeValue): (PageOverlayClientImpl::copyAccessibilityAttributeNames): (WKBundlePageOverlaySetAccessibilityClient): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::copyAccessibilityAttributeValue): (WebKit::PageOverlay::copyAccessibilityAttributeNames): * WebProcess/WebPage/PageOverlay.h: (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue): (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames): (WebKit::PageOverlay::client): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue): (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]): (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 2013-07-27 Simon Fraser If entering fullscreen for a window fails, don't leave things in a bad state https://bugs.webkit.org/show_bug.cgi?id=119179 Reviewed by Sam Weinig. On Lion, attempting to take a video fullscreen when the Safari window is already fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen: When this happens we have to undo the work done when entering fullscreen, to avoid leaving things in a bad state. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 2013-07-26 Tim Horton Add a mode where autosizing fixes the FrameView height to at least the WKView height https://bugs.webkit.org/show_bug.cgi?id=119104 Reviewed by Anders Carlsson. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: Add autoSizingShouldExpandToViewHeight parameter. * UIProcess/API/mac/WKView.mm: (-[WKView minimumWidthForAutoLayout]): (-[WKView setMinimumWidthForAutoLayout:]): Un-deprecate these as they're still useful if not sending a height. (-[WKView shouldExpandToViewHeightForAutoLayout]): (-[WKView setShouldExpandToViewHeightForAutoLayout:]): * UIProcess/API/mac/WKViewPrivate.h: New property, forward to WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight): New property, forward to WebPage. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): If enabled, update the FrameView's autoSizeFixedMinimumHeight. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::autoSizingShouldExpandToViewHeight): New property; if enabled, set FrameView's autoSizeFixedMinimumHeight, otherwise reset it to 0. * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Retrieve intrinsic content size explicitly from the FrameView, as it may not have used it as its final contentsSize if autoSizeFixedMinimumHeight is set. Set the WebPage's size in case the load is committed so that the WebFrameLoaderClient doesn't reset us to the wrong size. Update autoSizeFixedMinimumHeight if enabled when the view size changes. 2013-07-25 Andreas Kling ChromeClient::focusedNodeChanged() should be focusedElementChanged(). Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedElementChanged): * WebProcess/WebCoreSupport/WebChromeClient.h: 2013-07-25 Kwang Yul Seo [WK2][Soup] Add private browsing support https://bugs.webkit.org/show_bug.cgi?id=118657 Reviewed by Gustavo Noronha Silva. Support private browsing in WK2 by implementing private browsing related methods in WebFrameNetworkingContext. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Add USE(SOUP) guard. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Add private browsing support methods. Copied from the Mac port. (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::storageSession): Check if the frame enables private browsing and return the private browsing session. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensurePrivateBrowsingSession): Add USE(SOUP) guard. 2013-07-25 Kwang Yul Seo Build fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder https://bugs.webkit.org/show_bug.cgi?id=118228 Reviewed by Anders Carlsson. Build fails on some platforms where int64_t and long long are different types. * Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::encode): Add explicit casts to int64_t. (WebKit::BlobRegistrationData::decode): Use int64_t instead of long long. 2013-07-25 Anders Carlsson Remove lastModifiedDate from ResourceResponse https://bugs.webkit.org/show_bug.cgi?id=119092 Reviewed by Andreas Kling. Update for WebCore changes. * WebProcess/Plugins/PluginView.cpp: (WebKit::lastModifiedDate): Use ResourceResponse::lastModified() to get the last modified date. (WebKit::PluginView::Stream::didReceiveResponse): Call the static lastModified function. (WebKit::PluginView::manualLoadDidReceiveResponse): Ditto. 2013-07-25 Carlos Garcia Campos [GTK] Add support for running unit tests in the web process https://bugs.webkit.org/show_bug.cgi?id=118427 Reviewed by Gustavo Noronha Silva. Some tests, like GObject DOM bindings API tests, run entirely in the WebProcess, so we just need to start the test from the UI process and wait until the test finishes running in the WebProcess. Tests are split in two files, one containing the actual test that runs in the WebProcess and another one to add the tests to the glib test system that works as a proxy. WebProcessTestRunner class starts a private DBus session bus and starts the tests sending a message to the WebExtension waiting until it finishes or fails. WebProcess tests are created by defining a class derived from WebProcessTest class and implementing the static create method and the virtual runTest method. The macro REGISTER_TEST is used by the web process tests to register their test cases. This patch includes the migration of the WebKitDOMNode test, all other GObject DOM bindings tests will be migrated in the same way in follow up patches. * UIProcess/API/gtk/tests/DOMNodeTest.cpp: Added. (WebKitDOMNodeTest::create): Create a new WebKitDOMNodeTest. (WebKitDOMNodeTest::webPageFromArgs): Get the pageID parameter from the arguments dictionary. (WebKitDOMNodeTest::testHierarchyNavigation): (WebKitDOMNodeTest::testInsertion): (WebKitDOMNodeTest::runTest): Run the given test. (registerTests): Register test cases. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/tests/TestDOMNode.cpp: Added. (testWebKitDOMNodeHierarchyNavigation): (testWebKitDOMNodeInsertion): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/TestMain.cpp: (main): Unset DBUS_SESSION_BUS_ADDRESS environment variable to make sure that the GLib bus singleton is initialized by the private DBus session bus created by the tests. * UIProcess/API/gtk/tests/WebProcessTest.cpp: Added. (testsMap): Initialize and get the global map of tests. (WebProcessTest::add): Add a new test to the map, keeping a function to create the test. (WebProcessTest::create): Create a test for the given name. (methodCallCallback): Handle RunTest DBus method. It creates and runs the given test. (webkit_web_extension_initialize):Register the DBus service for this WebExtension. * UIProcess/API/gtk/tests/WebProcessTest.h: Added. * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp: Added. (WebProcessTestRunner::WebProcessTestRunner): Start a private DBus session bus and get a connection to it. (WebProcessTestRunner::~WebProcessTestRunner): Stop the private DBus session bus. (WebProcessTestRunner::proxyCreatedCallback): (WebProcessTestRunner::proxy): Create a new proxy to send messages to the WebExtension if it doesn't exists. (WebProcessTestRunner::onNameAppeared): Called when the DBus service has been registered in the WebExtension and it's safe to create a proxy. (WebProcessTestRunner::onNameVanished): Called when the DBus service is unregistered. This happens when the web process crash, so we just exit here, because the g_asserts in the web process have already registered the error message. (WebProcessTestRunner::testFinishedCallback): Called when the WebProcess tests has finished. (WebProcessTestRunner::runTest): Send a message to the WebExtension to start the given test and monitor the service. (WebProcessTestRunner::finishTest): Save the test result and finish the main loop. * UIProcess/API/gtk/tests/WebProcessTestRunner.h: Added. 2013-05-05 Geoffrey Garen Rolled back in r149527 with crash fixed. Reviewed by Oliver Hunt. Rationalized 'this' value conversion https://bugs.webkit.org/show_bug.cgi?id=115542 2013-07-24 Ruth Fong Rename WebColorChooserProxy and https://bugs.webkit.org/show_bug.cgi?id=119025 Reviewed by Brady Eidson. Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy implies that it represents the same object as WebColorChooser, which is not true. Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and platform-equivalent versions of it. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createColorPicker): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::createColorPicker): * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebViewPrivate::createColorPicker): * UIProcess/API/qt/raw/qrawwebview_p_p.h: * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::createColorPicker): * UIProcess/CoordinatedGraphics/WebView.h: * UIProcess/PageClient.h: * UIProcess/WebColorChooserProxy.cpp: Removed. * UIProcess/WebColorChooserProxy.h: Removed. * UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp. (WebKit::WebColorPicker::WebColorPicker): (WebKit::WebColorPicker::~WebColorPicker): (WebKit::WebColorPicker::endChooser): (WebKit::WebColorPicker::setSelectedColor): * UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h. (WebKit::WebColorPicker::create): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::showColorChooser): (WebKit::WebPageProxy::setColorChooserColor): (WebKit::WebPageProxy::endColorChooser): (WebKit::WebPageProxy::didEndColorChooser): (WebKit::WebPageProxy::resetStateAfterProcessExited): * UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker. * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::createColorPicker): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/WebColorChooserProxyQt.cpp: Removed. * UIProcess/qt/WebColorChooserProxyQt.h: Removed. * UIProcess/qt/WebColorPickerQt.cpp: Added. (WebKit::ColorChooserContextObject::ColorChooserContextObject): (WebKit::ColorChooserContextObject::currentColor): (WebKit::ColorChooserContextObject::elementRect): (WebKit::ColorChooserContextObject::accept): (WebKit::ColorChooserContextObject::reject): (WebKit::WebColorPickerQt::WebColorPickerQt): (WebKit::WebColorPickerQt::~WebColorPickerQt): (WebKit::WebColorPickerQt::createItem): (WebKit::WebColorPickerQt::createContext): (WebKit::WebColorPickerQt::setSelectedColor): (WebKit::WebColorPickerQt::notifyColorSelected): (WebKit::WebColorPickerQt::endChooser): * UIProcess/qt/WebColorPickerQt.h: Added. (WebKit::WebColorPickerQt::create): * WebKit2.xcodeproj/project.pbxproj: 2013-07-24 Anders Carlsson Crash when calling WKPageGetProcessIdentifier after aborted process launch https://bugs.webkit.org/show_bug.cgi?id=119069 Reviewed by Andreas Kling. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processIdentifier): Check if the page is closed instead of checking whether we have a process - We'll always have a process. (WebKit::WebPageProxy::isValid): Make this const. * UIProcess/WebPageProxy.h: 2013-07-24 Kwang Yul Seo [WK2][Soup] Add entry point for network process https://bugs.webkit.org/show_bug.cgi?id=110136 Reviewed by Gustavo Noronha Silva. Original patch by Balazs Kelemen . Added a common entry point for non-Mac Unix ports. * NetworkProcess/unix/NetworkProcessMainUnix.cpp: Added. (WebKit::NetworkProcessMain): * NetworkProcess/unix/NetworkProcessMainUnix.h: Added. * unix/NetworkMainUnix.cpp: Added. (main): 2013-07-24 Jessie Berlin Remove WKPageGetPlugInInformation - it is not used anymore https://bugs.webkit.org/show_bug.cgi?id=119047 Reviewed by Alexey Proskuryakov. Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming and ref-churn issues introduced in r151043, and r151043, which added WKPageGetPlugInInformation. * UIProcess/API/C/mac/WKPagePrivateMac.cpp: (WKPageIsURLKnownHSTSHost): * UIProcess/API/C/mac/WKPagePrivateMac.h: * UIProcess/Plugins/PluginProcessManager.h: * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginView.h: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: 2013-07-24 Jessie Berlin Remove WKPageGetPlugInInformation - it is not used anymore https://bugs.webkit.org/show_bug.cgi?id=119047 Rubber-stamped by Alexey Proskuryakov. Revert r152328, which added a key used only in the callback info for WKPageGetPlugInInformation. * Shared/API/c/WKPluginInformation.cpp: * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: * Shared/Plugins/Netscape/PluginInformation.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::containsPlugInCallback): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): 2013-07-24 Anton Obzhirov [GTK] TestInspectorServer unit test is timing out https://bugs.webkit.org/show_bug.cgi?id=105866 Reviewed by Gustavo Noronha Silva. The test failed because it couldn't find inspector resources in default folder (make install step was missing). It uses now resources available in WebKitBuild folder. WebInspectorServerGtk was refactored as well to make easier to use WEBKIT_INSPECTOR_SERVER_PATH variable. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/InspectorTestServer.cpp: (main): * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (testInspectorServerPageList): * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: (WebKit::WebInspectorServer::platformResourceForPath): (WebKit::WebInspectorServer::buildPageList): (WebKit::WebInspectorServer::inspectorServerFilesPath): 2013-07-23 Simon Cooper 10.7: Java applets do not work due to sandbox violation/exception https://bugs.webkit.org/show_bug.cgi?id=118920 Reviewed by Alexey Proskuryakov. Introduce versioning into the common profile and use it to fix a number of issues with Java on 10.7 and 10.8. Allow writing the com.apple.java.util.prefs preference file. This change also introduces a "/Library/Application Support/Java/PublicFiles" area which Java can read without any restrictions. Files written to this location will need to be created and written to by a privileged process. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-07-23 Eunmi Lee [EFL][WK2] Add doneWithTouchEvent callback to the WKViewClient. https://bugs.webkit.org/show_bug.cgi?id=110085 Reviewed by Kenneth Rohde Christiansen. Add doneWithTouchEvent callback to the WKViewClient in order to get the result of touch events in the EwkView. The result will be used to recognize gestures in the Bug 102643. APIs to get values from WKTouchEventRef and WKTouchPointRef are added because WKTypeRef is opaque to the applications. * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/C/efl/WKAPICastEfl.h: (WebKit::toAPI): * UIProcess/API/C/efl/WKEventEfl.cpp: (WKTouchEventGetType): (WKTouchEventGetTouchPoints): (WKTouchEventGetModifiers): (WKTouchEventGetTimestamp): (WKTouchPointGetID): (WKTouchPointGetState): (WKTouchPointGetScreenPosition): (WKTouchPointGetPosition): (WKTouchPointGetRadius): (WKTouchPointGetRotationAngle): (WKTouchPointGetForceFactor): * UIProcess/API/C/efl/WKEventEfl.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::doneWithTouchEvent): * UIProcess/API/efl/EwkView.h: * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::doneWithTouchEvent): * UIProcess/CoordinatedGraphics/WebViewClient.cpp: (WebKit::WebViewClient::doneWithTouchEvent): * UIProcess/CoordinatedGraphics/WebViewClient.h: * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::doneWithTouchEvent): (WebKit::ViewClientEfl::ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: 2013-07-22 Alexey Proskuryakov Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent https://bugs.webkit.org/show_bug.cgi?id=118976 Reviewed by Sam Weinig. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited): Clear m_gestureEventQueue, just like we clear all other event queues here. 2013-07-21 Anders Carlsson Java Updater not launched on Lion and Mountain Lion https://bugs.webkit.org/show_bug.cgi?id=118953 Reviewed by Sam Weinig. On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of them has "localhost" specified, even if the paths are otherwise equal. Work around this by comparing the paths directly. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isJavaUpdaterURL): 2013-07-19 Morten Stenshorne [GTK] Need a way to enable region based columns from the command line https://bugs.webkit.org/show_bug.cgi?id=116611 Reviewed by Martin Robinson. Add an environment variable to enable experimental features. This provides a means to enable experimental features without polluting the public API. Environment variable name: WEBKITGTK_EXPERIMENTAL_FEATURES Format: WEBKITGTK_EXPERIMENTAL_FEATURES="=1,=1,..." Or, to enable all experimental features: WEBKITGTK_EXPERIMENTAL_FEATURES=all So far the only feature is region based columns (implement multicol using the CSS regions implementation rather than ColumnInfo & co) - REGION_BASED_COLUMNS. Example: WEBKITGTK_EXPERIMENTAL_FEATURES="REGION_BASED_COLUMNS=1" * GNUmakefile.list.am: * PlatformGTK.cmake: * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsConstructed): (webkit_settings_class_init): * UIProcess/gtk/ExperimentalFeatures.cpp: Added. (WebKit): (Setting): (WebKit::ExperimentalFeatures::ExperimentalFeatures): (WebKit::ExperimentalFeatures::isEnabled): (WebKit::ExperimentalFeatures::setEnableByName): (WebKit::ExperimentalFeatures::parseEnvironment): * UIProcess/gtk/ExperimentalFeatures.h: Added. (WebKit): (ExperimentalFeatures): 2013-07-18 Eunmi Lee [WK2] Share Qt port's codes to find zoomable area with CoordinatedGraphics. https://bugs.webkit.org/show_bug.cgi?id=118585 Reviewed by Anders Carlsson. The function to find zoomable area is needed in order to implement the feature to scale for double-tap gesture. The WK2 EFL and NIX port want to use that function, so extract the code from the Qt port, make it usable in the CoordinatedGraphics and add API and callback. * CMakeLists.txt: * Target.pri: * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: (WKViewFindZoomableAreaForRect): * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::didFindZoomableArea): * UIProcess/API/efl/EwkView.h: * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Added. (WebKit::WebPageProxy::findZoomableAreaForPoint): (WebKit::WebPageProxy::didFindZoomableArea): * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::didFindZoomableArea): (WebKit::WebView::findZoomableAreaForPoint): * UIProcess/CoordinatedGraphics/WebView.h: * UIProcess/CoordinatedGraphics/WebViewClient.cpp: (WebKit::WebViewClient::didFindZoomableArea): * UIProcess/CoordinatedGraphics/WebViewClient.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didFindZoomableArea): (WebKit::ViewClientEfl::ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: * UIProcess/qt/WebPageProxyQt.cpp: * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Added. (WebKit::WebPage::findZoomableAreaForPoint): * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2013-07-18 Simon Cooper Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg https://bugs.webkit.org/show_bug.cgi?id=118874 Reviewed by Alexey Proskuryakov. Silently deny access to FlashAuthor.cfg. This location contains files containing lists of paths that Flash Player will "allow" access to (without asking the user). Since the plugin sandbox won't permit the access to the listed paths it is better to silently block attempts to read this "whitelist". * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-18 Tim Horton [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes https://bugs.webkit.org/show_bug.cgi?id=118862 Reviewed by Anders Carlsson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::PluginView): Add m_pluginProcessHasCrashed. (WebKit::PluginView::platformLayer): Don't return the plugin's layer if it has crashed. (WebKit::PluginView::pluginProcessCrashed): Set m_pluginProcessHasCrashed. Cause a style recalc so that we rebuild the layer tree; our layer won't be included. * WebProcess/Plugins/PluginView.h: Add m_pluginProcessHasCrashed. 2013-07-18 Alexey Proskuryakov Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension https://bugs.webkit.org/show_bug.cgi?id=118855 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): Moved sandbox extension invalidation to cleanup() meaning that we won't fail to do this when aborting a loader that currently loading from network. * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): (WebKit::SchedulableLoader::consumeSandboxExtensions): (WebKit::SchedulableLoader::invalidateSandboxExtensions): * NetworkProcess/SchedulableLoader.h: Keep track of whether sandbox extensions are consumed, we don't want to revoke extensions that were never consumed (as used to be the case with sync loaders, and would be with async ones after the above fix). Also, get rid of extensions immediately when invalidating, we won't need them again. 2013-07-18 Tim Horton Remove PDFViewController and WKView "custom representations" https://bugs.webkit.org/show_bug.cgi?id=118720 Reviewed by Alexey Proskuryakov. PDFViewController was the only implementation of a "custom representation" for a WKView. As it has been superceded by PDFPlugin, we can remove both PDFViewController and the notion of a WKView custom representation. * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PDFViewController.h: Removed. * UIProcess/API/mac/PDFViewController.mm: Removed. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/API/mac/WKView.mm: (-[WKView accessibilityFocusedUIElement]): (-[WKView accessibilityHitTest:]): (-[WKView accessibilityAttributeValue:]): (-[WKView printOperationWithPrintInfo:forFrame:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/API/qt/raw/qrawwebview_p_p.h: * UIProcess/CoordinatedGraphics/WebView.cpp: * UIProcess/CoordinatedGraphics/WebView.h: * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxyImpl.cpp: * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::supportsTextEncoding): (WebKit::WebPageProxy::supportsTextZoom): (WebKit::WebPageProxy::setTextZoomFactor): (WebKit::WebPageProxy::setPageZoomFactor): (WebKit::WebPageProxy::setPageAndTextZoomFactors): (WebKit::WebPageProxy::findString): (WebKit::WebPageProxy::countStringMatches): (WebKit::WebPageProxy::didCommitLoadForFrame): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::textZoomFactor): (WebKit::WebPageProxy::pageZoomFactor): * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtPageClient.h: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): (WebKit::WebFrameLoaderClient::committedLoad): (WebKit::WebFrameLoaderClient::finishedLoading): (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setNeedsDisplayInRect): (WebKit::DrawingAreaImpl::scroll): (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformPreferencesDidChange): * mac/WebKit2.order: 2013-07-18 Dong-Gwan Kim [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp https://bugs.webkit.org/show_bug.cgi?id=118797 Reviewed by Christophe Dumez. Some mouseClick methods are used in test_ewk2_color_picker.cpp. But it is difficult to understand what they mean. So i would like to replace those with more meaningful method for readability. * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: (EWK2ColorPickerTest::clickButton): (TEST_F): 2013-07-18 Eunmi Lee [WK2] Replace getRect() to pixelSnappedBoundingBox(). https://bugs.webkit.org/show_bug.cgi?id=118588 Reviewed by Noam Rosenthal. The Node::getRect() function was removed in the http://trac.webkit.org/changeset/128006, so use pixelSnappedBoundingBox() instead. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::findZoomableAreaForPoint): 2013-07-18 Dong-Gwan Kim [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_context_menu.cpp https://bugs.webkit.org/show_bug.cgi?id=118796 Reviewed by Christophe Dumez. Some mouseClick methods are used in test_ewk2_context_menu.cpp. But it is difficult to understand what they mean. So i would like to replace those with more meaningful method for readability. * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: (EWK2ContextMenuTest::testContextMenu): (EWK2ContextMenuTest::testContextMenuForRemoveAndAppend): (EWK2ContextMenuTest::testContextMenuForSubmenu): (EWK2ContextMenuTest::finishTest): (EWK2ContextMenuTest::showContextMenu): (TEST_F): 2013-07-18 Dong-Gwan Kim [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_file_chooser_request.cpp https://bugs.webkit.org/show_bug.cgi?id=118792 Reviewed by Christophe Dumez. Some mouseClick methods are used in test_ewk2_file_chooser_request.cpp. But it is difficult to understand what they mean. So i would like to replace those with more meaningful method for readability. * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: (EWK2FileChooserRequestTest::clickFileInput): (TEST_F): 2013-07-18 Dong-Gwan Kim [EFL][WK2] Move all the static methods into EWK2TextCheckerTest in test_ewk2_text_checker.cpp https://bugs.webkit.org/show_bug.cgi?id=118790 Reviewed by Christophe Dumez. All the static methods should be moved to EWK2TextCheckerTest. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (EWK2TextCheckerTest::resetCallbacksExecutionStats): (EWK2TextCheckerTest::onTimeout): (EWK2TextCheckerTest::onSettingChange): (EWK2TextCheckerTest::onSpellDocumentTag): (EWK2TextCheckerTest::onSpellDocumentTagClose): (EWK2TextCheckerTest::onSpellingCheck): (EWK2TextCheckerTest::onSpellingForKnownWord): (EWK2TextCheckerTest::onWordGuesses): (EWK2TextCheckerTest::onWordLearn): (EWK2TextCheckerTest::onWordIgnore): (EWK2TextCheckerTest::findContextMenuItem): (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems): (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping): (EWK2TextCheckerTest::checkClientSuggestionsForWord): (EWK2TextCheckerTest::selectLearnSpelling): (EWK2TextCheckerTest::selectIgnoreSpelling): (EWK2TextCheckerTest::countContextMenuItems): (EWK2TextCheckerTest::clickButton): (EWK2TextCheckerTest::showContextMenu): (EWK2TextCheckerTest::selectFirstWord): 2013-07-17 Tim Horton Update blocked/missing plug-in UI https://bugs.webkit.org/show_bug.cgi?id=118347 Reviewed by Sam Weinig. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add a 6 argument -> 4 reply message handler. (It seems that FindPlugin is getting a little out of hand.) * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: Add an unavailability description out-argument to a new version of pluginLoadPolicy, so clients can override the text of the unavailable plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Plumb the unavailability description through to the WebProcess via the FindPlugin message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Acquire the unavailability description from the client (via FindPlugin) and hand it to the RenderEmbeddedObject. 2013-07-17 Commit Queue Unreviewed, rolling out r152701, r152703, r152739, r152754, and r152756. http://trac.webkit.org/changeset/152701 http://trac.webkit.org/changeset/152703 http://trac.webkit.org/changeset/152739 http://trac.webkit.org/changeset/152754 http://trac.webkit.org/changeset/152756 https://bugs.webkit.org/show_bug.cgi?id=118821 this was a buggy fix and we're going to try something different (Requested by thorton on #webkit). * Platform/CoreIPC/HandleMessage.h: * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didClose): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginProcessCrashed): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): (WebKit::WebPage::canPluginHandleResponse): 2013-07-17 Alexey Proskuryakov [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages() https://bugs.webkit.org/show_bug.cgi?id=118814 Reviewed by Brady Eidson. Speculative fix. It's unclear how we end up with an invalid URL when committing a load. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages): Added a null check. 2013-07-17 Commit Queue Unreviewed, rolling out r152786 and r152789. http://trac.webkit.org/changeset/152786 http://trac.webkit.org/changeset/152789 https://bugs.webkit.org/show_bug.cgi?id=118807 overly platform specific and dirty API (and Sam says no) (Requested by thorton on #webkit). * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: * WebProcess/WebPage/PageOverlay.cpp: * WebProcess/WebPage/PageOverlay.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: 2013-07-17 Tim Horton AX: VoiceOver not working with data detection page overlays https://bugs.webkit.org/show_bug.cgi?id=118680 Reviewed by Anders Carlsson. Bump the API version after r152786. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 2013-07-17 Simon Cooper YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera https://bugs.webkit.org/show_bug.cgi?id=118787 Reviewed by Alexey Proskuryakov. Add support for built-in cameras, including the original iSight. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-17 Chris Fleizach AX: VoiceOver not working with data detection page overlays https://bugs.webkit.org/show_bug.cgi?id=118680 Reviewed by Tim Horton. Expose API methods so that a client implementing data detectors is able to respond to the needs of accessibility clients like VoiceOver. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (PageOverlayClientImpl::supportsDataDetection): (PageOverlayClientImpl::dataDetectorExistsAtPoint): (PageOverlayClientImpl::dataDetectorCopyTypeAtPoint): (PageOverlayClientImpl::showDataDetectorMenuAtPoint): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::supportsDataDetection): (WebKit::PageOverlay::dataDetectorExistsAtPoint): (WebKit::PageOverlay::dataDetectorCopyTypeAtPoint): (WebKit::PageOverlay::dataDetectorOpenMenuAtPoint): * WebProcess/WebPage/PageOverlay.h: (WebKit::PageOverlay::Client::supportsDataDetection): (WebKit::PageOverlay::Client::dataDetectorExistsAtPoint): (WebKit::PageOverlay::Client::dataDetectorCopyTypeAtPoint): (WebKit::PageOverlay::Client::showDataDetectorMenuAtPoint): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pageOverlayOpenDataDetectorMenuAtPoint): (WebKit::WebPage::pageOverlayDataDetectorCopyTypeAtPoint): (WebKit::WebPage::pageOverlayDataDetectorExistsAtPoint): (WebKit::WebPage::pageOverlaySupportsDataDetection): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]): (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2CookieManagerTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118721 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: (compareHostNames): (onCookiesChanged): (EWK2CookieManagerTest::getAcceptPolicy): (EWK2CookieManagerTest::getHostnamesWithCookies): (EWK2CookieManagerTest::freeHostNames): (EWK2CookieManagerTest::countHostnamesWithCookies): (TEST_F): 2013-07-16 Balazs Kelemen [CMake] Undefined references should be detected at build time https://bugs.webkit.org/show_bug.cgi?id=110236 Reviewed by Christophe Dumez. Add library dependencies that were not defined explicitly before. * CMakeLists.txt: * PlatformEfl.cmake: 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2WindowFeaturesTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118780 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: (EWK2WindowFeaturesTest::createDefaultWindow): (EWK2WindowFeaturesTest::createWindow): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2ViewTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118779 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (EWK2ViewTest::onLoadFinishedForRedirection): (EWK2ViewTest::serverCallbackNavigation): (EWK2ViewTest::onFormAboutToBeSubmitted): (EWK2ViewTest::fullScreenCallback): (EWK2ViewTest::fullScreenExitCallback): (EWK2ViewTest::checkAlert): (EWK2ViewTest::checkConfirm): (EWK2ViewTest::checkPrompt): (EWK2ViewTest::onTextFound): (EWK2ViewTest::onVibrate): (EWK2ViewTest::onCancelVibration): (EWK2ViewTest::loadVibrationHTMLString): (EWK2ViewTest::onContentsSizeChangedPortrait): (EWK2ViewTest::onContentsSizeChangedLandscape): (EWK2ViewTest::PageContentsAsMHTMLCallback): (EWK2ViewTest::PageContentsAsStringCallback): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2StorageManagerTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118777 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: (EWK2StorageManagerTest::OriginData::OriginData): (EWK2StorageManagerTest::getStorageOriginsCallback): (EWK2StorageManagerTest::timerCallback): (EWK2StorageManagerTest::checkOrigin): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2PopupMenuTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118775 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: (EWK2PopupMenuTest::checkBasicPopupMenuItem): (EWK2PopupMenuTest::selectItemAfterDelayed): (EWK2PopupMenuTest::showPopupMenu): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2FileChooserRequestTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118773 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: (EWK2FileChooserRequestTest::onFileChooserRequest): (EWK2FileChooserRequestTest::compareStrings): (EWK2FileChooserRequestTest::freeStringList): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2FaviconDatabaseTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118772 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: (EWK2FaviconDatabaseTest::serverCallback): (EWK2FaviconDatabaseTest::requestFaviconData): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2EinaSharedStringTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118771 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: (EWK2EinaSharedStringTest::checkString): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2DownloadJobTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118769 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_download_job.cpp: (EWK2DownloadJobTest::fileExists): (EWK2DownloadJobTest::serverCallback): (EWK2DownloadJobTest::on_download_requested): (EWK2DownloadJobTest::on_download_cancelled): (EWK2DownloadJobTest::on_download_failed): (EWK2DownloadJobTest::on_download_finished): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2AuthRequestTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118766 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: (EWK2AuthRequestTest::serverCallback): (EWK2AuthRequestTest::onAuthenticationRequest): (EWK2AuthRequestTest::onLoadFinished): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2ContextMenuTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118767 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: (EWK2ContextMenuTest::checkBasicContextMenuItem): (EWK2ContextMenuTest::customItemSelected): (EWK2ContextMenuTest::showContextMenu): (EWK2ContextMenuTest::showContextMenuForRemoveAndAppend): (EWK2ContextMenuTest::showContextMenuForSubmenu): (EWK2ContextMenuTest::hideContextMenu): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2ContextTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118763 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_context.cpp: (EWK2ContextTest::schemeRequestCallback): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2DatabaseManagerTest should be defined by inheriting from EWK2UnitTestBase https://bugs.webkit.org/show_bug.cgi?id=118726 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: (EWK2DatabaseManagerTest::OriginData::OriginData): (EWK2DatabaseManagerTest::databaseOriginsCallback): (EWK2DatabaseManagerTest::timerCallback): (TEST_F): 2013-07-17 Dong-Gwan Kim [EFL][WK2] EWK2ColorPickerTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118762 Reviewed by Christophe Dumez. It should be defined as relevant test class specific to each test file for more readability. It could be helpful to remove unnecessary static methods. * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: (EWK2ColorPickerTest::onColorPickerDone): (EWK2ColorPickerTest::setColorPickerColor): (EWK2ColorPickerTest::showColorPicker): (EWK2ColorPickerTest::hideColorPicker): (EWK2ColorPickerTest::hideColorPickerByRemovingElement): (TEST_F): 2013-07-16 Gordon Sheridan setPluginUnavailabilityReason can destroy renderObject before obscurity check https://bugs.webkit.org/show_bug.cgi?id=118770 Reviewed by Tim Horton. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Moved obscurity check to before renderObject is potentially destroyed. 2013-07-16 Alexey Proskuryakov REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com https://bugs.webkit.org/show_bug.cgi?id=118739 Reviewed by Daniel Bates. EditorState tracking on UI side is very fragile. This is a targeted fix just for this specific scenario. The issue was that we had a stale m_temporarilyClosedComposition flag, which was making UI process believe that a composition was closed from WebProcess side, and notify input method about that. It shouldn't have been a problem, because there is no composition at this point indeed, but this extra call is a problem for predictive input, which works in a somewhat unconventional way (). * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when getting new EditorState in response to performing this action. There is certainly no composition after insertText, and all interested parties are on the same page already. 2013-07-16 Jessie Berlin Fix some NSDictionary misuse pointed out by the clang static analyzer https://bugs.webkit.org/show_bug.cgi?id=118736 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: (WebKit::WebEditorClient::documentFragmentFromAttributedString): Do not put a key with a nil value pair into the NSDictionary. 2013-07-16 Michael Brüning [Qt] Replace Nokia with Qt Project in service name. https://bugs.webkit.org/show_bug.cgi?id=118729 Reviewed by Simon Hausmann. * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): 2013-07-16 Dong-Gwan Kim EWK2BackForwardListTest should be defined by inheriting from EWK2UnitTestBase. https://bugs.webkit.org/show_bug.cgi?id=118717 Reviewed by Christophe Dumez. * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: (EWK2BackForwardListTest::checkItem): (EWK2BackForwardListTest::urlFromTitle): (EWK2BackForwardListTest::freeEinaList): (TEST_F): 2013-07-16 Kangil Han Use toHTMLSelectElement and dismiss isHTMLSelectElement https://bugs.webkit.org/show_bug.cgi?id=118714 Reviewed by Ryosuke Niwa. To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup. Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names. * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: (WebKit::PDFPluginChoiceAnnotation::commit): 2013-07-16 Dong-Gwan Kim Replace mouseClick with more meaningful method in test_ewk2_text_checker.cpp https://bugs.webkit.org/show_bug.cgi?id=118699 Reviewed by Christophe Dumez. Many mouseClick methods are used in test_ewk2_text_checker.cpp. But it is difficult to understand what they mean. So i would like to replace those with more meaningful method for readability. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (EWK2TextCheckerTest::clickSelectAllWordsWithSpellcheckButton): (EWK2TextCheckerTest::clickSelectAllWordsWithoutSpellcheckButton): (EWK2TextCheckerTest::clickSelectSubWordWithSpellcheckButton): (EWK2TextCheckerTest::showContextMenuWithFirstLineText): (EWK2TextCheckerTest::showContextMenuWithSecondLineText): (EWK2TextCheckerTest::selectFirstWordInFirstLineText): (EWK2TextCheckerTest::selectFirstWordInSecondLineText): (TEST_F): 2013-07-15 Kangil Han Introduce toHTMLIFrameElement https://bugs.webkit.org/show_bug.cgi?id=118672 Reviewed by Ryosuke Niwa. To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame): 2013-07-15 Tim Horton Update blocked/missing plug-in UI https://bugs.webkit.org/show_bug.cgi?id=118347 Reviewed by Sam Weinig. Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add a 6 argument -> 4 reply message handler. (It seems that FindPlugin is getting a little out of hand.) * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: Add an unavailability description out-argument to a new version of pluginLoadPolicy, so clients can override the text of the unavailable plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Plumb the unavailability description through to the WebProcess via the FindPlugin message. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didClose): Make a strongly referencing copy of the list of PluginProxies, so we can throw them away without the HashMap being mutated underneath us (see the comment). * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginProcessCrashed): Invalidate the plug-in's widget before setting the plugin unavailability reason, because doing so would cause the plug-in's renderer to be torn down, making invalidate() crash. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton): * WebProcess/WebCoreSupport/WebChromeClient.h: Rename from shouldUnavailablePluginMessageBeButton to shouldUnavailablePluginMessageIncludeButton for accuracy. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Acquire the unavailability description from the client (via FindPlugin) and hand it to the RenderEmbeddedObject. (WebKit::WebPage::canPluginHandleResponse): Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it. 2013-07-15 Simon Cooper PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust https://bugs.webkit.org/show_bug.cgi?id=118690 Reviewed by Dean Jackson. Silently deny access to FlashPlayerTrust. This location contains files containing lists of paths that Flash Player will "allow" access to (without asking the user). Since the plugin sandbox won't permit the access to the listed paths it is better to silently block attempts to read these "whitelists". The "whitelists" are created by other Adobe "installer" like applications. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-07-14 Jon Lee Calling Notification.requestPermission() without a callback crashes https://bugs.webkit.org/show_bug.cgi?id=118654 Reviewed by Alexey Proskuryakov. When requestPermission() is called, we short-circuit if we know the permission was already set. The callback handler gets invoked. But now that callbacks are optional, we need to check to make sure a callback was provided. * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback. 2013-07-15 Anton Obzhirov [GTK] Remote inspector server should send an error page if resources not found https://bugs.webkit.org/show_bug.cgi?id=117137 Reviewed by Gustavo Noronha Silva. Sometimes it is difficult to understand why remote inspector fails to deliver the content. This patch gives an option to show error page with some basic explanation. * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: (WebKit::WebInspectorServer::platformResourceForPath): 2013-07-15 Simon Pena [GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent https://bugs.webkit.org/show_bug.cgi?id=118530 Reviewed by Carlos Garcia Campos. When a key event is started in the WebProcess (e.g. in the inspector) it doesn't have an associated GdkEvent queued. Adding a check in WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued key event to process. In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once this fix is in place. * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is not empty. 2013-07-15 Alberto Garcia [WK2][GTK] SIGSEV in webkitWebViewBaseSizeAllocate https://bugs.webkit.org/show_bug.cgi?id=118052 Reviewed by Carlos Garcia Campos. We don't need to check whether the drawing area is empty or not in order to set needsResizeOnMap. It can also happen that the drawing area pointer is null (if e.g. the web process crashes), which is the reason for this SIGSEGV. A test to prevent this was added in r88646 but was later moved to resizeWebKitWebViewBaseFromAllocation(). * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseSizeAllocate): 2013-07-10 Roger Fong Plugins that don't support snapshotting should not all autostart. https://bugs.webkit.org/show_bug.cgi?id=118572 . Reviewed by Dean Jackson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree. It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting. (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight to the the DisplayingSnapshot state. * WebProcess/Plugins/PluginView.h: 2013-07-11 Jessie Berlin WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed out by the clang static analyzer) https://bugs.webkit.org/show_bug.cgi?id=118533 Reviewed by Anders Carlsson. * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): 2013-07-11 Sergio Correia Use GOwnPtr in PluginProcessProxyUnix to manage stdOut variable https://bugs.webkit.org/show_bug.cgi?id=118568 Reviewed by Martin Robinson. * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::PluginProcessProxy::scanPlugin): 2013-07-11 Timothy Hatcher Revert r152267 and soft link WebInspectorUI.framework again. https://bugs.webkit.org/show_bug.cgi?id=118544 Reviewed by David Kilzer. * Configurations/WebKit2.xcconfig: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): 2013-07-11 Jae Hyun Park [Coordinated Graphics] Parameter of commitSceneState should be const https://bugs.webkit.org/show_bug.cgi?id=118564 Reviewed by Noam Rosenthal. Parameter of commitSceneState should be const as there should not be any modifications to the passed CoordinatedGraphicsState. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::commitSceneState): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-07-10 Mark Rowe PluginProcess sometimes logs an error about being unable to load WebKit2.framework. Reviewed by Alexey Proskuryakov. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables specified in dynamic linker load commands are passed to the subprocess that we spawn to create the MIME type property list. 2013-07-10 Brady Eidson Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy. and https://bugs.webkit.org/show_bug.cgi?id=118535 Reviewed by Alexey Proskuryakov. * Shared/Plugins/NPObjectProxy.cpp: (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread. (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread. 2013-07-10 Sergio Correia Remove the meshType from CoordinatedCustomFilterOperation https://bugs.webkit.org/show_bug.cgi?id=118529 Reviewed by Noam Rosenthal. Following the removal of the meshType from CustomFilterOperation in r149153, remove also the meshType from CoordinatedCustomFilterOperation. No new tests, no new functionality. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): Remove dead comment. (CoreIPC::::decode): Remove meshType from CoordinatedCustomFilterOperation call. 2013-07-09 Byungwoo Lee [EFL] tooltip callback doesn't work. https://bugs.webkit.org/show_bug.cgi?id=118522 Reviewed by Christophe Dumez. Add missing code to connect didChangeTooltip callback. * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::ViewClientEfl): 2013-07-09 Jer Noble Reviewed by Simon Fraser. Remember the scroll position and restore after exiting full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=61956 Call into the main FrameView to save the scroll position before swapping the WebView into the full-screen window, and restore the scroll position after swapping the WebView back into the browser window. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController beganExitFullScreenAnimation]): In WebKit2, this requires some communication between the WebProcess and the UIProcess, so add two new messages to WebFullScreenManager to be called by its proxy. * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::saveScrollPosition): (WebKit::WebFullScreenManagerProxy::restoreScrollPosition): * WebProcess/FullScreen/WebFullScreenManager.h: * WebProcess/FullScreen/WebFullScreenManager.messages.in: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::saveScrollPosition): (WebKit::WebFullScreenManager::restoreScrollPosition): 2013-07-07 Carlos Garcia Campos [GTK] Runtime critical warning when unloading a module that failed to load https://bugs.webkit.org/show_bug.cgi?id=118425 Reviewed by Martin Robinson. * Platform/gtk/ModuleGtk.cpp: (WebKit::Module::load): Show an error message when the module fails to load. (WebKit::Module::unload): Check module pointer before calling unload method. 2013-07-05 Tim Horton [wk2] Add API to lock the scroll position at the top or bottom of the page https://bugs.webkit.org/show_bug.cgi?id=118429 Reviewed by Anders Carlsson. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: Pass the current ScrollPinningBehavior across to the WebPage upon creation. * UIProcess/API/C/WKPage.cpp: (WKPageGetScrollPinningBehavior): (WKPageSetScrollPinningBehavior): * UIProcess/API/C/WKPagePrivate.h: SPI to get/set the WebPageProxy's current ScrollPinningBehavior. Convert between WK API type and WebCore enum. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): Send ScrollPinningBehavior when creating a WebPage. (WebKit::WebPageProxy::setScrollPinningBehavior): Pass ScrollPinningBehavior changes across to the WebProcess (and save it in WebPageProxy so it can be sent back across if the WebProcess crashes). * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::scrollPinningBehavior): Getter/setter and storage for m_scrollPinningBehavior. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Inform new FrameViews of the current ScrollPinningBehavior. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Set our ScrollPinningBehavior based on our creation parameters. (WebKit::WebPage::setScrollPinningBehavior): Inform the FrameView of ScrollPinningBehavior changes. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::scrollPinningBehavior): Added. (WebKit::WebPage::setScrollPinningBehavior): Added. Add storage for m_scrollPinningBehavior. * WebProcess/WebPage/WebPage.messages.in: Add SetScrollPinningBehavior message. 2013-07-05 Krzysztof Wolanski [EFL][WK2] Implement unit test callbacks: onWordLearn and onWordIgnore. https://bugs.webkit.org/show_bug.cgi?id=118392 Reviewed by Christophe Dumez. Simulate behavior of Learn and Ignore Word in the text field. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::mouseDoubleClick): Select the entire word in the text field. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (onSpellingForKnownWord): (onWordLearn): (onWordIgnore): (selectLearnSpelling): (selectIgnoreSpelling): 2013-07-05 Xabier Rodriguez Calvar [GTK] WebKit2 test TestWebKitFaviconDatabase times out with recent glib https://bugs.webkit.org/show_bug.cgi?id=111434 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (testNotInitialized): (testSetDirectory): (testClearDatabase): (testGetFavicon): (testGetFaviconURI): Removed gconstpointer parameter. (testWebViewFavicon): Fixed to make it work together with the other tests and removed gconstpointer parameter. (testFaviconDatabase): Created to call all tests in the proper order. (beforeAll): Changed to call only testFaviconDatabase instead of the separate tests. 2013-07-05 Xabier Rodriguez Calvar TestWebKitFaviconDatabase/clear-database is not testing things properly https://bugs.webkit.org/show_bug.cgi?id=118404 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (testClearDatabase): Check for an existing icon that can make the test fail if clear database is not working. 2013-07-04 Anders Carlsson Paint the page background if we haven't received our first update https://bugs.webkit.org/show_bug.cgi?id=118402 Reviewed by Simon Fraser. Make sure that we always paint something when we haven't received our first update from the web process. * UIProcess/API/mac/WKView.mm: (-[WKView drawRect:]): * UIProcess/DrawingAreaProxyImpl.h: (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate): 2013-07-04 Anders Carlsson Crash when createPluginInternal ends up destroying the plug-in https://bugs.webkit.org/show_bug.cgi?id=118397 Reviewed by Simon Fraser. Keep the WebProcessConnection object alive while calling createPluginInternal and handle the IPC connection going away. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginAsynchronously): 2013-07-03 Gordon Sheridan Implement mechanism to detect (partially) hidden blocked plugins. https://bugs.webkit.org/show_bug.cgi?id=117998 Reviewed by Dean Jackson. * Shared/Plugins/Netscape/PluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::plugInInformationReplacementObscuredKey): Add key for plugInInformation dictionaries. (WebKit::createPluginInformationDictionary): Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary. * Shared/API/c/WKPluginInformation.h: * Shared/API/c/WKPluginInformation.cpp: (WKPluginInformationReplacementObscuredKey): Provide the C API for the plugInInformationReplacementObscuredKey(). * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary(). * UIProcess/WebPageProxy.messages.in: Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Invoke isReplacementObscured() method for blocked plugins. 2013-07-03 Alexey Proskuryakov Flash Player: deny ipc-posix-sem 59918130 Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites Reviewed by Sam Weinig. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now). 2013-07-03 Simon Pena WebTextCheckerClient doesn't initialize output arguments. https://bugs.webkit.org/show_bug.cgi?id=83683 Reviewed by Martin Robinson. Callers of checkSpellingOfString and checkGrammarOfString expect certain default values when no misspelled (or bad grammar) string is found. They try to do that by initialising the reply arguments that go into the IPC calls, but these values are ultimately ignored (see HandleMessage.h, where the replyArguments are declared). In the past, this seems to have led to various issues, (see TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp), where these return values are asserted and checked to be in the right range. This patch initialises the values, so even if no available client implements the methods (or if the implementation forgets to do it) the callers will have their expected output. However, and for a general case, we probably need a way to tell the caller that any existing value in the output arguments will be ignored. * UIProcess/WebTextCheckerClient.cpp: (WebKit::WebTextCheckerClient::checkSpellingOfString): (WebKit::WebTextCheckerClient::checkGrammarOfString): 2013-07-03 Sergio Villar Senin [GTK][WK2] SIGSEV in WebKit::WebPageContextMenuClient::customContextMenuItemSelected https://bugs.webkit.org/show_bug.cgi?id=116867 Reviewed by Anders Carlsson. We did not reset the clients on WebPageProxy::close(), so right clicking on a link after starting the navigation to some other page was causing crashes because code was trying to access an already freed m_contextMenuClient. There were some other clients that could potentially trigger the same issues. Reset them all to null to prevent this situation. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): 2013-07-03 Simon Pena Output arguments used in IPC calls should be returned initialised https://bugs.webkit.org/show_bug.cgi?id=118354 Reviewed by Anders Carlsson. When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename through IPC, they assume the output arguments result and allowOverwrite have been initialised. This patch initialises these arguments also in the unlikely event that a m_webContext is not available. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): 2013-07-03 Sergio Villar Senin [WK2][GTK] Invalid ASSERTs in WebResources loading code https://bugs.webkit.org/show_bug.cgi?id=118352 Reviewed by Carlos Garcia Campos. The WebKitWebView keeps track of the resources being loaded in a map. A couple of ASSERTs verify that every loaded resource is stored in that map. The map that is cleared each time a new load starts so there is a small chance that we get notifications for resources that correspond to previous page loads (and thus are not stored in the map). We should remove the ASSERT which is not valid anymore. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewGetLoadingWebResource): 2013-07-03 Carlos Garcia Campos [GTK] Migrate WebKitWebContext to GTask https://bugs.webkit.org/show_bug.cgi?id=117153 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkitWebContextGetPluginThread): (webkit_web_context_get_plugins): (webkit_web_context_get_plugins_finish): 2013-07-02 Zan Dobersek [WK2] Invalidate FontCache before purging MemoryCache upon WebProcess termination/closure https://bugs.webkit.org/show_bug.cgi?id=118280 Reviewed by Darin Adler. Invalidate the FontCache before disabling and purging the MemoryCache in WebProcess::didClose and WebProcess::terminate. This frees up additional references to objects that were held by the FontCache, reducing the amount of 'LEAK: *' output when exiting MiniBrowser or WebKitTestRunner in debug builds. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::terminate): (WebKit::WebProcess::didClose): 2013-07-02 Jessie Berlin The callback for WKPageGetPlugInInformation needs info about whether or not there are any non-playing instances of the plug-in on the page https://bugs.webkit.org/show_bug.cgi?id=118330 Reviewed by Anders Carlsson. Add another key value pair to the dictionary passed to the callback. * Shared/API/c/WKPluginInformation.cpp: (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey): * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey): (WebKit::createPlugInInformationDictionary): Add the information about whether or not the page contains a non-playing instance of that plug-in to the plug-in information dictionary. * Shared/Plugins/Netscape/PluginInformation.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::containsPlugInCallback): Check if any of the MIME types of the plug-in instances that are present on the page but are not playing match the instance of plug-in being searched for. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns): Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in HTMLPlugInImageElement.cpp. (WebKit::WebPage::containsPluginViewsWithPluginProcessToken): Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns. 2013-07-02 Alexey Proskuryakov security/block-test.html fails when NetworkProcess is enabled https://bugs.webkit.org/show_bug.cgi?id=118320 Reviewed by Geoff Garen. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::wasBlocked): (WebKit::NetworkResourceLoader::cannotShowURL): Implemented missing ResourceHandleClient functions. 2013-07-02 Ada Chan Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage(). https://bugs.webkit.org/show_bug.cgi?id=118268 Reviewed by Beth Dakin. * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage() can be null if this method is called after the web page is closed. 2013-07-02 Jae Hyun Park Implement CoordinatedSurface for Threaded Coordinated Graphics https://bugs.webkit.org/show_bug.cgi?id=109661 Reviewed by Noam Rosenthal. This is a preparation patch for Threaded Coordianted Graphics. This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a backend. Also, this patch moves common implementation to CoordinatedSurface to prevent duplication of code. * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: (WebKit::WebCoordinatedSurface::WebCoordinatedSurface): * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: 2013-07-01 Alexey Proskuryakov Clean up private browsing session tracking https://bugs.webkit.org/show_bug.cgi?id=118266 Reviewed by Brady Eidson. Instead of counting API calls, we now watch actual WebPreferences objects. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled): Removed code that used to notify WebContext. It's now done by WebPreferences. * UIProcess/WebContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times API was called, rely on WebPreferences tracking. (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is now only called when we detect a change in private browsing state. (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto. (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private browsing session if needed. * UIProcess/WebPreferences.h: * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::addPageGroup): Count how many page groups use private browsing, and notify WebContext when a session is needed. Note that we don't notify WebContext about WebPreferences without any page groups, because it's likely that preferences will be updated by the client before groups are associated. (WebKit::WebPreferences::removePageGroup): Ditto. (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for private browsing mode changes. (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when it's time to create or destroy a private browsing session. (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for WebContext to know when any page groups are in private browsing mode. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Don't create a private browsing session implicitly, UI process takes care of it. 2013-07-01 Timothy Hatcher Link to WebInspectorUI.framework at build time instead of soft linking. https://bugs.webkit.org/show_bug.cgi?id=118261 Reviewed by Joseph Pecoraro. * Configurations/WebKit2.xcconfig: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): 2013-07-01 Tim Horton [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect https://bugs.webkit.org/show_bug.cgi?id=118173 Reviewed by Anders Carlsson. Offset the exposed rect passed from the WKView by the main frame's current scroll position before sending it to our TiledBackings, so that it is in the same coordinate space as their ordinary visibleRects. This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Add updateScrolledExposedRect() and m_scrolledExposedRect. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): Call updateScrolledExposedRect when the main frame scrolls. (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Remove a FIXME about this change. Call updateScrolledExposedRect instead of passing down the unscrolled rect. (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): Call updateScrolledExposedRect, because that method will short-circuit if setClipsToExposedRect is false, so we need to update here for correctness if we get a setExposedRect(), setClipsToExposedRect(true) pair. (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): Update m_scrolledExposedRect and propagate it to our TiledBackings. (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): Use the scrolled exposed rect. 2013-07-01 Ada Chan Properly hide the header and footer banners if they are set to null. https://bugs.webkit.org/show_bug.cgi?id=118219 Reviewed by Beth Dakin. Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when the footer banner is detached. Similarly for the header banner. * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::detachFromPage): 2013-07-01 Jochen Eisinger Remove support for consumable user gestures https://bugs.webkit.org/show_bug.cgi?id=118247 Reviewed by Geoffrey Garen. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::didClickNotification): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performFrameLoadURLRequest): (WebKit::PluginView::evaluate): * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): 2013-06-27 Jer Noble Audio in apps which embed WebViews is corrupted. https://bugs.webkit.org/show_bug.cgi?id=118163 Reviewed by Maciej Stachowiak. Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients. * Shared/WebPreferencesStore.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-07-01 Sam Weinig WKPageLoadDataWithUserData neglects to set the base URL that is passed in https://bugs.webkit.org/show_bug.cgi?id=118256 Reviewed by Anders Carlsson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadData): Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1. 2013-07-01 Kangil Han Adopt toHTMLTextAreaElement for code cleanup https://bugs.webkit.org/show_bug.cgi?id=118226 Reviewed by Andreas Kling. To enhance readability, this patch adopts toHTMLTextAreaElement. This also helps out to reduce duplicated use of static_cast. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit): * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::createAnnotationElement): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::textDidChangeInTextArea): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormControls): 2013-06-28 Andreas Kling Fix Windows builds after deprecatedCharactersWithNullTermination() removal. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::createServerAndClientIdentifiers): 2013-06-28 Tim Horton [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set https://bugs.webkit.org/show_bug.cgi?id=118174 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView _updateViewExposedRect]): Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy. (-[WKView setMinimumSizeForAutoLayout:]): Disable scrolling when using autolayout instead of when using clips-to-visibleRect. (-[WKView setShouldClipToVisibleRect:]): Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled, and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view is big enough to fit the content (the case clip-to-visibleRect was added for). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::viewExposedRectChanged): (WebKit::WebPageProxy::exposedRectChangedTimerFired): Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setClipsToExposedRect): Added. (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewExposedRectChanged): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Forward clips-to-visibleRect enabled state to the drawing area. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Add storage for m_clipsToExposedRect. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect): (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine whether we should tell our TiledBackings to clip to the exposed rect we provide. We don't need to listen to mainFrameScrollabilityChanged anymore. 2013-06-28 Gavin Barraclough Stale occlusion state after moving page back into window https://bugs.webkit.org/show_bug.cgi?id=118202 Reviewed by Anders Carlsson. We need to update the occlusion state when the page goes back into the window. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): - update occlusion state. 2013-06-28 Gwang Yoon Hwang Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator https://bugs.webkit.org/show_bug.cgi?id=104360 Reviewed by Noam Rosenthal. The CoordinatedLayerTreeHost has too many responsibilities. It implements LayerTreeHost, GraphicsLayerClient, CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client, UpdateAtlas::Client, GraphicsLayerFactory and WebCustomFilterProgramProxyClient. This refactoring reduces the responsibilities of CoordinatedLayerTreeHost. This patch introduces a new class called CompositingCoordinator, which takes the responsibility of managing compositing resources in WebProcess. CoordinatedLayerTreeHost is responsible only for the scheduling and IPC-specific stuff, which are relevant only for WebKit2. No new tests, covered by existing tests. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHost::invalidate): (WebKit::CoordinatedLayerTreeHost::forceRepaint): (WebKit::CoordinatedLayerTreeHost::sizeDidChange): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::renderNextFrame): (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): (WebKit::CoordinatedLayerTreeHost::willSyncLayerState): (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations): (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy): (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): (WebKit::CoordinatedLayerTreeHost::paintLayerContents): (WebKit::CoordinatedLayerTreeHost::commitSceneState): (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): (WebKit::CoordinatedLayerTreeHost::commitScrollOffset): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/LayerTreeHost.h: 2013-06-28 Anders Carlsson Make the UI process run the Java Updater https://bugs.webkit.org/show_bug.cgi?id=118197 Reviewed by Sam Weinig. Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process. * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error): (WebKit::initializeCocoaOverrides): (WebKit::PluginProcess::launchApplicationAtURL): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isJavaUpdaterURL): (WebKit::shouldLaunchApplicationAtURL): (WebKit::PluginProcessProxy::launchApplicationAtURL): 2013-06-28 Tim Horton WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to https://bugs.webkit.org/show_bug.cgi?id=118196 Reviewed by Anders Carlsson. * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2013-06-28 Andreas Kling Don't fire process-became-responsive callback when disconnecting it. Reviewed by Anders Carlsson. When disconnecting from a web process, call ResponsivenessTimer::invalidate() instead of stop() to avoid firing the didBecomeResponsive() callback. This lets the UI process react faster to actually unresponsive processes. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::disconnect): 2013-06-28 Sergio Villar Senin [WK2][GTK] 100% CPU usage rendering a page with animations https://bugs.webkit.org/show_bug.cgi?id=117703 Reviewed by Martin Robinson. Unconditionally update the value of m_lastFlushTime in ::flushAndRenderLayers. By doing that we avoid a neverending sequence of layer flushes that happened when m_lastFlushTime==0 and flushPendingLayerChanges() was false. In that situation the value m_lastFlushTime was never updated so a new flush was always rescheduled. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::flushAndRenderLayers): 2013-06-28 Andres Gomez [GTK] MiniBrowser doesn't solve the saving location when there are no XDG settings https://bugs.webkit.org/show_bug.cgi?id=117538 Reviewed by Carlos Garcia Campos. If the XDG specification is not working for the "Downloads" directory, let's use HOME as fallback. * UIProcess/API/gtk/WebKitDownload.cpp: (webkitDownloadDecideDestination): 2013-06-28 Dariusz Frankiewicz [EFL][WK2] Add spellcheck API tests in unit tests. https://bugs.webkit.org/show_bug.cgi?id=118123 Reviewed by Christophe Dumez. According to discussion in bug https://bugs.webkit.org/show_bug.cgi?id=113742 we're moving spelling tests from layout tests to unit tests. * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Added. New file is needed to make tests, with and without spellcheck attribute. File contains basic site with content editable fields and buttons which select different parts of misspelled words. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (countContextMenuItems): Added method used to count number of items in context menu. 2013-06-27 Kangil Han Adopt is/toHTMLInputElement for code cleanup https://bugs.webkit.org/show_bug.cgi?id=118130 Reviewed by Antti Koivisto. To enhance readability, this patch adopts is/toHTMLInputElement. This also helps out to reduce duplicated use of static_cast. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser): (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit): * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::createAnnotationElement): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedNodeChanged): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::textFieldDidBeginEditing): (WebKit::WebEditorClient::textFieldDidEndEditing): (WebKit::WebEditorClient::textDidChangeInTextField): (WebKit::WebEditorClient::doTextFieldCommandFromEvent): (WebKit::WebEditorClient::textWillBeDeletedInTextField): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormControls): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): 2013-06-27 Eunmi Lee [EFL][WK2] Add WK2 C API to handle touch events. https://bugs.webkit.org/show_bug.cgi?id=108915 Reviewed by Gyuyoung Kim. Touch events for our target platforms differ (XInput2, Wayland, Tizen) so for the EFL port we want to be able to feed events manually. To keep our current API for desktop EFL/Enlightenment working, we convert our currently limited EFL events to the new EFL specific C EwkTouchPoint and EwkTouchEvent type. EwkTouchPoint and EwkTouchEvent are exposed as WKTouchPointRef and WKTouchEventRef, so they are opaque in the applications. The WKViewSendTouchEvent can be used for any use-case (platform/product) not involving the EFL events. At the same time we make sure to avoid using WK2 internals in our EFL API implementation. * PlatformEfl.cmake: * Shared/API/c/efl/WKBaseEfl.h: * Shared/APIObject.h: * Shared/NativeWebTouchEvent.h: (WebKit::NativeWebTouchEvent::nativeEvent): * Shared/efl/NativeWebTouchEventEfl.cpp: (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/efl/WebEventFactory.cpp: (WebKit::toWebPlatformTouchPointState): (WebKit::toWebEventType): (WebKit::toWebEventModifiers): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/efl/WebEventFactory.h: * UIProcess/API/C/efl/WKAPICastEfl.h: * UIProcess/API/C/efl/WKEventEfl.cpp: Added. (WKTouchPointCreate): (WKTouchEventCreate): * UIProcess/API/C/efl/WKEventEfl.h: Added. * UIProcess/API/C/efl/WKViewEfl.cpp: (WKViewSendTouchEvent): * UIProcess/API/C/efl/WKViewEfl.h: * UIProcess/API/efl/EwkView.cpp: (toWKTouchPointState): (toWKEventModifiers): (EwkView::feedTouchEvent): (EwkView::feedTouchEvents): * UIProcess/efl/EwkTouchEvent.cpp: Added. (WebKit::EwkTouchEvent::EwkTouchEvent): * UIProcess/efl/EwkTouchEvent.h: Added. (WebKit::EwkTouchEvent::create): (WebKit::EwkTouchEvent::eventType): (WebKit::EwkTouchEvent::touchPoints): (WebKit::EwkTouchEvent::modifiers): (WebKit::EwkTouchEvent::timestamp): (WebKit::EwkTouchEvent::type): * UIProcess/efl/EwkTouchPoint.cpp: Added. (WebKit::EwkTouchPoint::EwkTouchPoint): * UIProcess/efl/EwkTouchPoint.h: Added. (WebKit::EwkTouchPoint::create): (WebKit::EwkTouchPoint::id): (WebKit::EwkTouchPoint::state): (WebKit::EwkTouchPoint::screenPosition): (WebKit::EwkTouchPoint::position): (WebKit::EwkTouchPoint::radius): (WebKit::EwkTouchPoint::rotationAngle): (WebKit::EwkTouchPoint::forceFactor): (WebKit::EwkTouchPoint::type): * UIProcess/efl/WebViewEfl.cpp: (WebKit::WebViewEfl::sendTouchEvent): * UIProcess/efl/WebViewEfl.h: 2013-06-27 Csaba Osztrogonác Fix cast-align warnings in WebKit2/Platform/CoreIPC https://bugs.webkit.org/show_bug.cgi?id=117987 Reviewed by Rob Buis, WK2 signed-off by Anders Carlsson. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decode): * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encode): 2013-06-27 Commit Queue Unreviewed, rolling out r152074. http://trac.webkit.org/changeset/152074 https://bugs.webkit.org/show_bug.cgi?id=118137 It caused lots of layout and API test crash on Qt Wk2. (Requested by kadam on #webkit). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHost::invalidate): (WebKit::CoordinatedLayerTreeHost::forceRepaint): (WebKit::CoordinatedLayerTreeHost::sizeDidChange): (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges): (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded): (WebKit::CoordinatedLayerTreeHost::syncLayerState): (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded): (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy): (WebKit::CoordinatedLayerTreeHost::detachLayer): (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::syncDisplayState): (WebKit::CoordinatedLayerTreeHost::didPerformScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): (WebKit::CoordinatedLayerTreeHost::createImageBackingIfNeeded): (WebKit::CoordinatedLayerTreeHost::createImageBacking): (WebKit::CoordinatedLayerTreeHost::updateImageBacking): (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents): (WebKit::CoordinatedLayerTreeHost::removeImageBacking): (WebKit::CoordinatedLayerTreeHost::flushPendingImageBackingChanges): (WebKit::CoordinatedLayerTreeHost::notifyAnimationStarted): (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired): (WebKit::CoordinatedLayerTreeHost::paintContents): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::deviceScaleFactor): (WebKit::CoordinatedLayerTreeHost::pageScaleFactor): (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas): (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas): (WebKit::CoordinatedLayerTreeHost::visibleContentsRect): (WebKit::CoordinatedLayerTreeHost::mainContentsLayer): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): (WebKit::CoordinatedLayerTreeHost::renderNextFrame): (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): (WebKit::CoordinatedLayerTreeHost::paintToSurface): (WebKit::CoordinatedLayerTreeHost::scheduleReleaseInactiveAtlases): (WebKit::CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired): (WebKit::CoordinatedLayerTreeHost::commitScrollOffset): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setVisibleContentsRect): (WebKit::LayerTreeHost::renderNextFrame): (WebKit::LayerTreeHost::purgeBackingStores): 2013-06-27 Xabier Rodriguez Calvar Fixing some compiler warnings https://bugs.webkit.org/show_bug.cgi?id=117791 Reviewed by Martin Robinson. * UIProcess/API/gtk/tests/WebExtensionTest.cpp: Properly initialized GDBusInterfaceVTable. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitWebPageCreate): Added missing fields to the WKBundlePageLoaderClient. 2013-06-27 Iago Toral Quiroga Use consistent file names for WidgetBackingStoreGtkX11 class https://bugs.webkit.org/show_bug.cgi?id=118124 Reviewed by Carlos Garcia Campos. * UIProcess/cairo/BackingStoreCairo.cpp: 2013-06-27 Alberto Garcia [GTK] [WK2] Check value of WEBKIT_INJECTED_BUNDLE_PATH https://bugs.webkit.org/show_bug.cgi?id=118055 Reviewed by Carlos Garcia Campos. If the directory pointed at by WEBKIT_INJECTED_BUNDLE_PATH does not exist, fall back to the system directory. This makes MiniBrowser work outside the build tree. * UIProcess/API/gtk/WebKitWebContext.cpp: (injectedBundleDirectory): 2013-06-26 Simon Cooper Sometimes the Flash Player plugin cannot make outgoing connections https://bugs.webkit.org/show_bug.cgi?id=118110 Reviewed by Alexey Proskuryakov. Allow outgoing and incoming UDP data. Tidy up the QuickTime profile as it gets the UDP ability from the common profile. * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Simon Cooper Flash Player: deny ipc-posix-sem 59918130 https://bugs.webkit.org/show_bug.cgi?id=118107 Reviewed by Alexey Proskuryakov. Allow same-sandbox scoped semaphores on Mavericks. Permit the named semaphore for older releases. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-06-26 Gwang Yoon Hwang Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator https://bugs.webkit.org/show_bug.cgi?id=104360 Reviewed by Noam Rosenthal. The CoordinatedLayerTreeHost has too many responsibilities. It implements LayerTreeHost, GraphicsLayerClient, CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client, UpdateAtlas::Client, GraphicsLayerFactory and WebCustomFilterProgramProxyClient. This refactoring reduces the responsibilities of CoordinatedLayerTreeHost. This patch introduces a new class called CompositingCoordinator, which takes the responsibility of managing compositing resources in WebProcess. CoordinatedLayerTreeHost is responsible only for the scheduling and IPC-specific stuff, which are relevant only for WebKit2. No new tests, covered by existing tests. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHost::invalidate): (WebKit::CoordinatedLayerTreeHost::forceRepaint): (WebKit::CoordinatedLayerTreeHost::sizeDidChange): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::renderNextFrame): (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): (WebKit::CoordinatedLayerTreeHost::willSyncLayerState): (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations): (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy): (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): (WebKit::CoordinatedLayerTreeHost::paintLayerContents): (WebKit::CoordinatedLayerTreeHost::commitSceneState): (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): (WebKit::CoordinatedLayerTreeHost::commitScrollOffset): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/LayerTreeHost.h: 2013-06-26 Simon Cooper Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos https://bugs.webkit.org/show_bug.cgi?id=118102 Reviewed by Alexey Proskuryakov. Allow same-sandbox scoped semaphores on Mavericks. Permit the named semaphore for older releases. * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: 2013-06-26 Simon Cooper Update ColorSync shared memory names in plug-in sandbox profile https://bugs.webkit.org/show_bug.cgi?id=118099 Reviewed by Alexey Proskuryakov. Update the common profile to use the names used in Mavericks * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-26 Anders Carlsson Deprecate StringImpl::charactersWithNullTermination https://bugs.webkit.org/show_bug.cgi?id=118108 Reviewed by Beth Dakin. Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::createServerAndClientIdentifiers): 2013-06-26 Simon Cooper QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file https://bugs.webkit.org/show_bug.cgi?id=118098 Reviewed by Alexey Proskuryakov. Allow the preference file to be written * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: 2013-06-24 Simon Cooper Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0 https://bugs.webkit.org/show_bug.cgi?id=117966 Reviewed by Sam Weinig. Allow assigning (via bind) an ephemeral port before connecting * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb: * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb: * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-06-24 Simon Cooper PluginProcess deny file-read-data /Network/Library under addVolumeTracker https://bugs.webkit.org/show_bug.cgi?id=117965 Reviewed by Alexey Proskuryakov. Silently deny reading /Network/Applications and /Network/Library. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Kangil Han Adopt is/toHTMLFormElement for code cleanup https://bugs.webkit.org/show_bug.cgi?id=117937 Reviewed by Andreas Kling. This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859 To enhance readibility, this patch adopts is/toHTMLFormElement. This also helps out to reduce duplicated use of static_cast. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormElements): 2013-06-24 Simon Cooper deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL https://bugs.webkit.org/show_bug.cgi?id=117964 Reviewed by Alexey Proskuryakov. Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL subdirectory. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Simon Cooper Repeating sandbox violations when playing Amazon Prime videos with Flash https://bugs.webkit.org/show_bug.cgi?id=117953 Reviewed by Alexey Proskuryakov. Add some missing "standard" files for network service lookups * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Simon Cooper Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist https://bugs.webkit.org/show_bug.cgi?id=117963 Reviewed by Alexey Proskuryakov. Permit the reading of the com.apple.CoreGraphics preference file * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Simon Cooper com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile https://bugs.webkit.org/show_bug.cgi?id=117961 Reviewed by Alexey Proskuryakov. Remove the trailing extraneous .plist from the preference file rule * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb: 2013-06-24 Simon Cooper PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari https://bugs.webkit.org/show_bug.cgi?id=117958 Reviewed by Alexey Proskuryakov. Allow reading the com.apple.networkConnect plist. * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb: 2013-06-24 Simon Cooper Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67 https://bugs.webkit.org/show_bug.cgi?id=117954 Reviewed by Alexey Proskuryakov. Permit read access to this shared memory segment * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Simon Cooper Plugin Sandbox violation in /Library/Audio/Sounds/Banks https://bugs.webkit.org/show_bug.cgi?id=117957 Reviewed by Alexey Proskuryakov. Permit read access to subdirectories under /Library/Audio/Sounds * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: 2013-06-24 Nick Diego Yamane Make sure m_iconDatabaseImpl is not null before closing it https://bugs.webkit.org/show_bug.cgi?id=117943 Reviewed by Simon Fraser. Since r150474 WebIconDatabase is closed unconditionally in TestController destructor, in that case WebKitTestRunner crashes when no icon database path is set. This misbehavior was observed in ports such as efl and nix. In this patch, WebIconDatabase::close() calls m_iconDatabaseImpl->close() only if m_iconDatabaseImpl is not null, as it's already being done in other WebIconDatabase's methods, such as isOpen(). * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::close): 2013-06-24 Ruth Fong Expose the mediaHasAudio() function in WK2 https://bugs.webkit.org/show_bug.cgi?id=117946 Reviewed by Beth Dakin. Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function in WK2. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultMediaHasAudio): Added. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2013-06-24 Anders Carlsson REGRESSION (r147591): can't type in Adobe Connect https://bugs.webkit.org/show_bug.cgi?id=117947 Reviewed by Andreas Kling. With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in starts. Handle this by focusing the plug-in right after it's started if necessary. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didInitializePlugin): 2013-06-24 Simon Fraser Move displayID stuff from Widget to Chrome https://bugs.webkit.org/show_bug.cgi?id=117944 Reviewed by Anders Carlsson. In r151877 I polluted Widget with displayID-related stuff. This would be better on HostWindow, so move it there. This is a net code reduction, and eliminates PlatformScreenMac.h, and the NSScreen category. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowScreenDidChange): Go via chrome(). 2013-06-24 Krzysztof Wolanski [EFL][WK2] Implement unit test callback: onWordGuesses. https://bugs.webkit.org/show_bug.cgi?id=117794 Reviewed by Christophe Dumez. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (onWordGuesses): Add client suggestions for the word. (checkClientSuggestionsForWord): Verify the suggestions that were given by the client. 2013-06-17 Darin Adler Sort all the Xcode project files https://bugs.webkit.org/show_bug.cgi?id=117696 Reviewed by Anders Carlsson. * WebKit2.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script. 2013-06-22 Dean Jackson Slightly reduce width threshold on detection of primary snapshotted Plug-In https://bugs.webkit.org/show_bug.cgi?id=117914 Reviewed by Simon Fraser. We've noticed some content that should be detected as the primary snapshotted plug-in, but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400. * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400. 2013-06-22 Simon Fraser screen.availWidth always returns width of primary display https://bugs.webkit.org/show_bug.cgi?id=117863 Reviewed by Geoffrey Garen. In WebKit2, Widgets have no platformWidget, so trying to get to the NSScreen via the platform widget's window never succeeded, and we always fell back on getting info for the main display. However, we were already pushing the WKView's displayID down to the WebProcess for the requestAnimationFrame infrastructure, so use that. The WebProcess would not receive a displayID for a WKView until the window was activated; fix by calling -doWindowDidChangeScreen when the view moves to a window, rather than doing it from -_windowDidBecomeKey:. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): (-[WKView _windowDidBecomeKey:]): 2013-06-21 Carlos Garcia Campos [GTK] Do not try to load videos in unit tests https://bugs.webkit.org/show_bug.cgi?id=117866 Reviewed by Philippe Normand. It makes the tests slower, and generates and error because we use a fake src. * UIProcess/API/gtk/tests/TestContextMenu.cpp: (testContextMenuDefaultMenu): Use preload='none' in video tag. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMouseTarget): Ditto. 2013-06-21 Christophe Dumez REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere https://bugs.webkit.org/show_bug.cgi?id=117825 Reviewed by Kentaro Hara. Use Settings to enable Web Audio instead of RuntimeEnabledFeatures. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-06-21 Sergio Correia [WK2][EFL]: Invalidate the ProcessLauncher when the process is terminated before it has finished launching https://bugs.webkit.org/show_bug.cgi?id=117865 Reviewed by Christophe Dumez. Original patch from Carlos Garcia Campos for the Gtk port. * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::terminateProcess): If process is still launching, just invalidate the launcher. Reset the process identifier after killing the process. 2013-06-20 Carlos Garcia Campos [GTK] Migrate WebKitWebResource to GTask https://bugs.webkit.org/show_bug.cgi?id=117152 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebResource.cpp: (resourceDataCallback): (webkit_web_resource_get_data): (webkit_web_resource_get_data_finish): 2013-06-20 Sergio Correia [WK2] Looping for EINTR on close() is incorrect for Linux, at least https://bugs.webkit.org/show_bug.cgi?id=117266 Reviewed by Darin Adler. Call closeWithRetry() to work around a difference in how the retry needs to be done on Linux. * Platform/CoreIPC/unix/AttachmentUnix.cpp: (CoreIPC::Attachment::dispose): * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInvalidate): * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::Handle::~Handle): (WebKit::SharedMemory::create): (WebKit::SharedMemory::~SharedMemory): (WebKit::SharedMemory::createHandle): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::createWebProcessConnection): * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::createWebProcessConnection): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): All these places had ``close-followed-by-EINTR-handling'' replaced with the new closeWithRetry() function added in this commit. 2013-06-20 Brady Eidson WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it). and https://bugs.webkit.org/show_bug.cgi?id=117842 Reviewed by Alexey Proskuryakov. * NetworkProcess/HostRecord.cpp: (WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue. (WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending. (WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup. (WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then allow serving a synchronous loader to go exactly one beyond the limit. * NetworkProcess/HostRecord.h: Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler): (WebKit::NetworkResourceLoadScheduler::hostForURL): * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow 7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit. 2013-06-20 Grzegorz Czajkowski [EFL][WK2] Update text checker documentation. https://bugs.webkit.org/show_bug.cgi?id=117828 Reviewed by Christophe Dumez. * UIProcess/API/efl/ewk_text_checker.h: The client is not responsible for destroying the memory. 2013-06-19 Sam Weinig Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary https://bugs.webkit.org/show_bug.cgi?id=117816 Reviewed by Geoffrey Garen. - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey(). * Shared/API/c/WKPluginInformation.cpp: (WKPluginInformationBundleShortVersionKey): * Shared/API/c/WKPluginInformation.h: * Shared/Plugins/Netscape/PluginInformation.cpp: (WebKit::pluginInformationBundleShortVersionKey): * Shared/Plugins/Netscape/PluginInformation.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::getPluginInfo): * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: (WebKit::getPlatformPluginModuleInformation): * Shared/Plugins/PluginModuleInfo.h: 2013-06-19 Ruth Fong Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765) https://bugs.webkit.org/show_bug.cgi?id=117765 Patch by Ruth Fong . Reviewed by Brady Eidson. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultGetMediaType): Updated to use mediaType(). * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::mediaType): Updated. Renamed getMediaType() to mediaType() and now handles !ENABLE(VIDEO) platforms. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2013-06-19 Benjamin Poulain Use the PlatformEvent timestamp when creating a DOM Event https://bugs.webkit.org/show_bug.cgi?id=117179 Reviewed by Darin Adler. * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): (WebKit::WebEventFactory::createWebGestureEvent): 2013-06-19 Anders Carlsson REGRESSION: Cannot open Silverlight preferences via context menu https://bugs.webkit.org/show_bug.cgi?id=117806 Reviewed by Beth Dakin. Hook the LSOpenCFURLRef function and make the UI process open the URL if it's the URL for the Silverlight Preferences application. This is what we do for the Flash updater. * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::openCFURLRef): (WebKit::initializeShim): (WebKit::PluginProcess::openURL): * PluginProcess/mac/PluginProcessShim.h: * PluginProcess/mac/PluginProcessShim.mm: (WebKit::shimLSOpenCFURLRef): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::isSilverlightPreferencesURL): (WebKit::shouldOpenURL): (WebKit::PluginProcessProxy::openURL): 2013-06-19 Krzysztof Wolanski [EFL][WK2] Implement unit test callback: onSettingChange. https://bugs.webkit.org/show_bug.cgi?id=117728 Reviewed by Christophe Dumez. It is finally possible to implement missing unit tests as WebKit2-EFL has delivered sub menu (r150254). Add two unit tests for checking onSettingChange callback behaviour, when toggling "Check Spelling While Typing" in context menu. Changed types inside callbacksExecutionStats struct from bit field to bool, because casting from bit field to &bool is invalid (in using waitUntilTrue method). * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: (resetCallbacksExecutionStats): (onSettingChange): (findContextMenuItem): Get determined option from context menu. (checkCorrectnessOfSpellingItems): Changed the name of onContextMenuShow method to be consistent with new methods. (toogleCheckSpellingWhileTyping): Select "Check Spelling While Typing" in context menu to test whether onSettingChange is called. 2013-06-19 Carlos Garcia Campos [GTK][SOUP] Migrate SoupRequestManager to GTask https://bugs.webkit.org/show_bug.cgi?id=117157 Reviewed by Gustavo Noronha Silva. GSimpleAsyncResult has been deprecated in favour of GTask. * WebProcess/soup/WebKitSoupRequestGeneric.cpp: (webkitSoupRequestGenericSendAsync): (webkitSoupRequestGenericSendFinish): * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData): (WebKit::WebSoupRequestAsyncData::releaseTask): (WebKit::WebSoupRequestManager::didHandleURIRequest): (WebKit::WebSoupRequestManager::didFailURIRequest): (WebKit::WebSoupRequestManager::send): (WebKit::WebSoupRequestManager::finish): * WebProcess/soup/WebSoupRequestManager.h: 2013-06-19 Carlos Garcia Campos [GTK] Migrate WebKitFaviconDatabase to GTask https://bugs.webkit.org/show_bug.cgi?id=117156 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: (processPendingIconsForPageURL): (webkit_favicon_database_get_favicon): (webkit_favicon_database_get_favicon_finish): 2013-06-19 Carlos Garcia Campos [GTK] Migrate WebKitWebView to GTask https://bugs.webkit.org/show_bug.cgi?id=117154 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebView.cpp: (didValidateCommand): (webkit_web_view_can_execute_editing_command): (webkit_web_view_can_execute_editing_command_finish): (webkitWebViewRunJavaScriptCallback): (webkit_web_view_run_javascript): (webkit_web_view_run_javascript_finish): (resourcesStreamReadCallback): (webkit_web_view_run_javascript_from_gresource): (webkit_web_view_run_javascript_from_gresource_finish): (fileReplaceContentsCallback): (getContentsAsMHTMLDataCallback): (webkit_web_view_save): (webkit_web_view_save_finish): (webkit_web_view_save_to_file): (webkit_web_view_save_to_file_finish): (webKitWebViewDidReceiveSnapshot): (webkit_web_view_get_snapshot): (webkit_web_view_get_snapshot_finish): 2013-06-18 Carlos Garcia Campos [GTK] Migrate WebKitCookieManager to GTask https://bugs.webkit.org/show_bug.cgi?id=117150 Reviewed by Gustavo Noronha Silva. Don't use helper structs for async data since the cancellable is now accessible from the GTask. * UIProcess/API/gtk/WebKitCookieManager.cpp: (webkitCookieManagerGetAcceptPolicyCallback): (webkit_cookie_manager_get_accept_policy): (webkit_cookie_manager_get_accept_policy_finish): (webkitCookieManagerGetDomainsWithCookiesCallback): (webkit_cookie_manager_get_domains_with_cookies): (webkit_cookie_manager_get_domains_with_cookies_finish): 2013-06-18 Roger Fong Unreviewed. Fix a typo that may be causing some test failures. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): 2013-06-18 Anders Carlsson Make it possible to set a minimum height for auto-layout https://bugs.webkit.org/show_bug.cgi?id=117758 Reviewed by Tim Horton. Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property. If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/API/mac/WKView.mm: (-[WKView _setIntrinsicContentSize:]): (-[WKView minimumLayoutWidth]): (-[WKView setMinimumLayoutWidth:]): (-[WKView minimumWidthForAutoLayout]): (-[WKView setMinimumWidthForAutoLayout:]): (-[WKView minimumSizeForAutoLayout]): (-[WKView setMinimumSizeForAutoLayout:]): * UIProcess/API/mac/WKViewPrivate.h: * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setMinimumLayoutSize): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::minimumLayoutSize): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setMinimumLayoutSize): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::minimumLayoutSize): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2013-06-18 Simon Cooper sandbox violation when Flash runs for the first time https://bugs.webkit.org/show_bug.cgi?id=117753 Reviewed by Alexey Proskuryakov. Allow flash to try and change the ownership of directories it has just created. * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: 2013-06-18 Ruth Fong Expose a getMediaType method in WebKit https://bugs.webkit.org/show_bug.cgi?id=117667 Reviewed by Brady Eidson. * GNUmakefile.list.am: * Target.pri: Updated to include the added header file InjectedBundleHitTestResultMediaType.h * UIProcess/API/C/WKAPICast.h: (WebKit::toBundleHitTestResultMediaType): (WebKit::toAPI): Added methods to convert between BundleHitTestResultMediaType and WKBundleHitTestResultMediaType. * WebKit2.xcodeproj/project.pbxproj: Updated to include InjectedBundleHitTestResultMediaType.h in the WebKit2 project. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and hooks into InjectedBundleHitTestResult::getMediaType. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::getMediaType): Added to return what type, if any, a media element is. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added to contain new BundleHitTestResultMediaType enums. 2013-06-18 Roger Fong Re-implement WebFrameNetworkingContext. . Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added. (WebKit::WebFrameNetworkingContext::create): (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added. (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession): (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled): (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs): (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): (WebKit::WebFrameNetworkingContext::blockedError): (WebKit::WebFrameNetworkingContext::storageSession): 2013-06-18 Alexey Proskuryakov Remove files with an incorrect license. Rubber-stamped by Maciej Stachowiak. This will break the build, stay tuned for a fix coming soon. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Removed. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Removed. 2013-06-17 Santosh Mahto Extra whitespace in blank line in PlatformPopupMenuData.cpp https://bugs.webkit.org/show_bug.cgi?id=117627 Reviewed by Brent Fulgham. * Shared/PlatformPopupMenuData.cpp: (WebKit::PlatformPopupMenuData::decode): Removing extra space 2013-06-17 Beth Dakin PageBanners appear over HTML5 video when media element is in full screen mode https://bugs.webkit.org/show_bug.cgi?id=117721 -and corresponding- Reviewed by Sam Weinig. When an element enters fullscreen, hide the banners. Show them again when the element exits fullscreen. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::willEnterFullScreen): (WebKit::WebFullScreenManager::willExitFullScreen): Handle hiding and showing by removing or re-creating a parent layer for m_layer. * WebProcess/WebPage/PageBanner.cpp: (WebKit::PageBanner::hide): (WebKit::PageBanner::showIfHidden): * WebProcess/WebPage/PageBanner.h: * WebProcess/WebPage/mac/PageBannerMac.mm: (WebKit::PageBanner::PageBanner): (WebKit::PageBanner::hide): (WebKit::PageBanner::showIfHidden): (WebKit::PageBanner::mouseEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hidePageBanners): (WebKit::WebPage::showPageBanners): * WebProcess/WebPage/WebPage.h: 2013-06-17 Ruth Fong REGRESSION: Important controls are missing from