2015-04-07 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.6 release. * gtk/NEWS: Add release notes for 2.6.6. 2015-03-23 Anders Carlsson Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again. https://bugs.webkit.org/show_bug.cgi?id=133692 rdar://problem/17255947 Reviewed by Alexey Proskuryakov. Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript where we need the plug-in to stay around after the call. * Shared/Plugins/NPObjectMessageReceiver.cpp: (WebKit::NPObjectMessageReceiver::invoke): (WebKit::NPObjectMessageReceiver::invokeDefault): (WebKit::NPObjectMessageReceiver::getProperty): (WebKit::NPObjectMessageReceiver::setProperty): (WebKit::NPObjectMessageReceiver::construct): 2015-03-16 Alexey Proskuryakov ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html https://bugs.webkit.org/show_bug.cgi?id=142637 Reviewed by Dean Jackson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired): m_plugin can be legitimately null. 2015-02-24 Michael Catanzaro Crash loading local file with WebPageProxy::loadAlternateHTMLString https://bugs.webkit.org/show_bug.cgi?id=141867 Reviewed by Anders Carlsson. WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well as baseURL, because unreachableURL will get added to the back/forward list, causing us to crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadAlternateHTMLString): 2015-02-16 Carlos Garcia Campos [GTK] WebKitFrame objects are never released https://bugs.webkit.org/show_bug.cgi?id=141641 Reviewed by Martin Robinson. Use a FrameDestructionObserver derived class to wrap our WebKitFrame objects and delete them when the frame is destroyed, instead of using willDestroyFrame callback of WKBundlePageLoaderClient that has never worked. * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: (webkitFrameGetWebFrame): * WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h: * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitFrameGetOrCreate): (webkitFrameDestroy): (webkitWebPageCreate): (willDestroyFrame): Deleted. 2015-01-29 Carlos Garcia Campos [GTK] Resize the redirected XComposite again after leaving accelerated compositing mode https://bugs.webkit.org/show_bug.cgi?id=140935 Reviewed by Sergio Villar Senin. Since r178414 we don't resize the redirected XComposite window until we enter accelerated compositing mode, but after leaving it the redirected window keeps its size. We should resize it to 1x1 again and free the XPixmap and cairo surface to save that memory while not in accelerated compositing mode. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify the WebKitWebViewBase. (WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the XComposite window to the current drawing area size. (webkitWebViewBaseExitAcceleratedCompositingMode): Resize the XComposite window to and empty size. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/RedirectedXCompositeWindow.cpp: (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Do not initialize m_size since we now handle the empty size as a especial case. Make sure we always create the X window with at least 1x1 size. (WebKit::RedirectedXCompositeWindow::resize): Resize the window to at least 1x1, but when en empty size is given, call cleanupPixmapAndPixmapSurface() to release those resources. (WebKit::RedirectedXCompositeWindow::surface): Create the cairo surface with at least 1x1 size. 2015-02-06 Carlos Garcia Campos ASSERTION FAILED: !m_adoptionIsRequired in WTF::RefCountedBase::ref https://bugs.webkit.org/show_bug.cgi?id=141035 Reviewed by Sergio Villar Senin. Rename PrinterListGtk::singleton() as PrinterListGtk::getOrCreate(), and make it return nullptr when the shared PrinterListGtk object is still being created. This can happen if the nested loop used by gtk_enumerate_printers dispatches a GSource that starts a new synchronous print operation. In that case we just ignore the second print operation, since there's already one ongoing. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::print): Return early if PrinterListGtk::getOrCreate() return nullptr. * WebProcess/WebPage/gtk/PrinterListGtk.cpp: (WebKit::PrinterListGtk::getOrCreate): Return nullptr if the PrinterListGtk is still enumerating the printers. (WebKit::PrinterListGtk::PrinterListGtk): Initialize m_enumeratingPrinters to true before calling gtk_enumerate_printers, and to false once it finishes. (WebKit::PrinterListGtk::singleton): Deleted. (WebKit::PrinterListGtk::enumeratePrintersFunction): Deleted. * WebProcess/WebPage/gtk/PrinterListGtk.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Add an assertion here since PrinterListGtk::getOrCreate() should never return nullptr at this point. 2015-03-31 Carlos Garcia Campos [GTK] DnD icon/widget has odd background https://bugs.webkit.org/show_bug.cgi?id=143217 Reviewed by Martin Robinson. Use gtk_drag_set_icon_surface() to set the drag icon image, instead of DragIcon class. * UIProcess/API/gtk/WebKitWebView.cpp: * UIProcess/gtk/DragAndDropHandler.cpp: (WebKit::DragAndDropHandler::startDrag): * UIProcess/gtk/DragAndDropHandler.h: 2015-04-06 Carlos Garcia Campos Unreviewed. Fix typo in API doc comment. * UIProcess/API/gtk/WebKitUserContent.cpp: 2015-01-26 Michael Catanzaro [GTK] gtkdoc does not appear in DevHelp https://bugs.webkit.org/show_bug.cgi?id=139369 Reviewed by Philippe Normand. * PlatformGTK.cmake: Include the API version in the gtkdoc filenames. * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt. * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types. 2015-01-15 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.5 release. * gtk/NEWS: dd release notes for 2.6.5. 2015-01-12 Carlos Garcia Campos [GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode https://bugs.webkit.org/show_bug.cgi?id=140354 Reviewed by Martin Robinson. The RedirectedXCompositeWindow uses XDamage to be notified when the XWindow has been modified. Since the redirected window is created unconditionally we always receive a XDamage notify when the window is mapped, and we schedule a redraw in the web view even when the web view is not in accelerated compositing mode. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): Only call gtk_widget_queue_draw() when in accelerated compositing mode. 2015-01-14 Carlos Garcia Campos [GTK] Do not resize the redirected XComposite window when not in accelerated compositing mode https://bugs.webkit.org/show_bug.cgi?id=140353 Reviewed by Martin Robinson. We create the redirected XComposite window unconditionally, but with a size of 1x1 to save memory. However, we are always resizing it, so in the end we always end up with a XWindow allocated for the same size of the web view, even for web views that never enter in accelerated compositing mode. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewRenderAcceleratedCompositingResults): Resize the RedirectedXCompositeWindow to the current web view size to ensure the sizes match before drawing. (resizeWebKitWebViewBaseFromAllocation): Only resize the RedirectedXCompositeWindow when in accelerated compositing mode. * UIProcess/gtk/RedirectedXCompositeWindow.cpp: (WebKit::RedirectedXCompositeWindow::resize): Return early if the given size is the current size. 2014-12-11 Alexey Proskuryakov REGRESSION (Async Text Input): Text input method state is not reset when reloading a page https://bugs.webkit.org/show_bug.cgi?id=139504 rdar://problem/19034674 Reviewed by Enrica Casucci. WebKit2 used to look at EditorState changes and guess when to cancel a composition. This was quite unreliable, and needlessly complicated - WebCore knows when it decides to destroy a composition, so it now explicitly notifies the clients. * UIProcess/API/mac/WKView.mm: (-[WKView _processDidExit]): Address crashing case too. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::discardedComposition): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection): (WebKit::WebPage::discardedComposition): * WebProcess/WebPage/WebPage.h: 2014-12-11 Carlos Garcia Campos [GTK] Timers might never be fired during animations https://bugs.webkit.org/show_bug.cgi?id=139062 Reviewed by Martin Robinson. This can happen in old/slow machines where the time to render layers might take more than 0.016. Since the layer flush timer is using a higher priority than WebCore timers, when scheduling all (or several) layer flushes immediately, no other sources with lower priority are dispatched in the main loop. We could detect if we are scheduling layer flushes immediately for too long (100ms) and schedule the next flush after a delay to ensure other sources with lower priority have a chance to be dispatched. Also use a lower priority, GDK_PRIORITY_EVENTS is too high, so we use GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename m_lastFlushTime as m_lastImmediateFlushTime. (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the fireTime before calling flushAndRenderLayers() and compute the next flush delay based on the elapsed time using monotonically increasing time instead of current time. Use the target delay as next flush delay if we have scheduled flushes immediately for more than 100ms. (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the layer flush time here, it's done in layerFlushTimerFired() so that we don't need to keep it as a member. (WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global layerFlushTimerPriority. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: 2014-12-09 Chris Dumez [WK2] Crash when answering notification permission request after navigating https://bugs.webkit.org/show_bug.cgi?id=139429 Reviewed by Andreas Kling. When requesting a notification permission, navigating away and then answering the permission, WebKit2 would crash. This is because upon navigating, the request is cancelled and removed from the HashMaps in NotificationPermissionRequestManager. When didReceiveNotificationPermissionDecision() is later called, it would look for the request identifier in m_idToOriginMap HashMap. As the request was cancelled, HashMap::take() call would return null for the SecurityOrigin*. This security origin pointer is then removed from m_originToIDMap, but the code was failing to do a null check first. Calling HashMap::remove(nullptr) would then crash. This patch adds the missing null check and a layout test to cover this case. Test: http/tests/notifications/legacy/notification-request-permission-then-navigate.html * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): 2014-12-09 Ting-Wei Lan [GTK] LDFLAGS is ignored when running g-ir-scanner https://bugs.webkit.org/show_bug.cgi?id=138832 Reviewed by Carlos Garcia Campos. GTK+ requires libintl on FreeBSD because there is no gettext implementation in FreeBSD libc. In order to link to libintl, which is not located in the default search path of the linker, we need to add the required path via the linker command line. However, LDFLAGS is ignored when running g-ir-scanner starting from r167873, so we have to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and put them in correct order to prevent g-ir-scanner from linking to the installed version of libraries. * PlatformGTK.cmake: 2014-12-05 Antti Koivisto REGRESSION (173394): Support for webcam is broken https://bugs.webkit.org/show_bug.cgi?id=139313 Reviewed by Alexey Proskuryakov. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions. 2014-12-04 Antti Koivisto REGRESSION (r173468): Cannot step in WebInspector https://bugs.webkit.org/show_bug.cgi?id=139260 Reviewed by Alexey Proskuryakov. Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads. If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load. Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next nested inspector runloop. Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of the NetworkConnectionToWebProcess and so can't end up handling late messages. No test, this requires JS debugger to trigger. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader): This is now the only way to remove resource loaders. It is called from NetworkResourceLoader::cleanup only. (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Calling abort removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore. * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::start): We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed. (WebKit::NetworkResourceLoader::cleanup): Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable. * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::identifier): 2014-11-29 Anders Carlsson Crash when calling WKPageClose on the originated page from within createNewPage callback https://bugs.webkit.org/show_bug.cgi?id=139099 Reviewed by Sam Weinig. Null check the namespace ID. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): 2014-11-25 Ting-Wei Lan [GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built version of libraries when running the temporary executable https://bugs.webkit.org/show_bug.cgi?id=138833 Reviewed by Carlos Garcia Campos. This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker find the correct version of libraries when running the temporary executable to generate the .gir file. * PlatformGTK.cmake: 2014-11-24 Alberto Garcia Webkit2 doesnt build on powerpc 32 bits https://bugs.webkit.org/show_bug.cgi?id=130837 Reviewed by Carlos Garcia Campos. Check if libatomic is needed in order to use std::atomic, and add it to the list of WebKit2 libraries. * PlatformGTK.cmake: 2014-11-20 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.4 release. * gtk/NEWS: Add release notes for 2.6.4. 2014-11-01 Carlos Garcia Campos REGRESSION(r163656): Remote inspector doesn't work unless preferences change after page initialization https://bugs.webkit.org/show_bug.cgi?id=138246 Reviewed by Joseph Pecoraro. The problem is that initializeWebPage() is still using pageGroup().preferences() instead of m_preferences to check if developer extras are enabled to enable remote inspection of the page. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeWebPage): Use m_preferences instead of pageGroup().preferences(). 2014-11-01 Carlos Garcia Campos REGRESSION(CMake): Make it possible to build without introspection https://bugs.webkit.org/show_bug.cgi?id=138006 Reviewed by Philippe Normand. Do not install introspection files when introspection is disabled. * PlatformGTK.cmake: 2014-11-19 Michael Catanzaro [GTK] Error in documentation of webkit_print_operation_get_page_setup() https://bugs.webkit.org/show_bug.cgi?id=138868 Reviewed by Carlos Garcia Campos. Fix copypaste error in documentation of webkit_print_operation_get_page_setup(). * UIProcess/API/gtk/WebKitPrintOperation.cpp: 2014-11-18 Carlos Alberto Lopez Perez [SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello. https://bugs.webkit.org/show_bug.cgi?id=138794 Reviewed by Sergio Villar Senin. It seems that following POODLE many sites incorrectly banned SSL 3.0 record packet versions. Since GnuTLS uses a SSL 3.0 record to advertise TLS 1.2, they are effectively banning it even if it doesn't advertise SSL 3.0. That is a server issue, but it can be worked around by using the modifier %LATEST_RECORD_VERSION. With this modifier, GnuTLS will use the latest TLS version record in client hello instead of using the default SSL 3.0. * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: (main): * WebProcess/EntryPoint/unix/WebProcessMain.cpp: (main): 2014-11-15 Carlos Garcia Campos Network process crash when running http/tests/appcache/fallback.html https://bugs.webkit.org/show_bug.cgi?id=138740 Reviewed by Alexey Proskuryakov. It happens because ResourceHandle::continueWillSendRequest() is called with a null request. We could handle that case in the ResourceHandle, but the thing is tha the behaviour is not the same for async loads, or when loading in the web process. In WebResourceLoader::willSendRequest(), ResourceRequest::willSendRequest() is called, and cancels the load if the client returns a null request. In this case, the ResourceLoader is detached and WebResourceLoader::willSendRequest() returns early without sending the ContinueWillSendRequest message to the network process. However, for synchronous loads, NetworkResourceLoader::continueWillSendRequest() is always called. Fixes http/tests/appcache/fallback.html for GTK port when using the network process. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::continueWillSendRequest): Do not call ResourceHandle::continueWillSendRequest() if the client request is null, since the load is going to be cancelled. 2014-11-14 Carlos Garcia Campos [SOUP] Encode/Decode allowCookies in ResourceRequest https://bugs.webkit.org/show_bug.cgi?id=138730 Reviewed by Sergio Villar Senin. We are not sending this information to the network process, making cookies always available. Fixes http/tests/xmlhttprequest/cross-origin-no-authorization.html when network process is enabled. * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder::encodePlatformData): (IPC::ArgumentCoder::decodePlatformData): 2014-11-13 Carlos Garcia Campos [SOUP] Missing ResourceRequest members encoded/decoded https://bugs.webkit.org/show_bug.cgi?id=138694 Reviewed by Sergio Villar Senin. At least timeoutInterval and priority should also be encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/ tests when using the network process, since the timeout is always 0 for all requests that we send to the network process. * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder::encodePlatformData): (IPC::ArgumentCoder::decodePlatformData): 2014-11-12 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.3 release. * gtk/NEWS: Add release notes for 2.6.3. 2014-11-06 Alberto Garcia [GTK] [Stable] webkitgtk 2.6.1 fails to load flashplugin https://bugs.webkit.org/show_bug.cgi?id=137849 Reviewed by Carlos Garcia Campos. NPPVpluginNeedsXEmbed is a boolean value, so it should normally use an NPBool (1 byte). However some plugins (the Flash player in particular) are using an int instead, so we have to do it as well else we'll end up corrupting the stack. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPostInitialize): 2014-11-05 Alberto Garcia NetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool https://bugs.webkit.org/show_bug.cgi?id=138418 Reviewed by Carlos Garcia Campos. Replace bool with NPBool, which is actually an unsigned char. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPostInitialize): 2014-10-28 Ting-Wei Lan Cast std::chrono::duration.count() to int64_t in ArgumentCoder https://bugs.webkit.org/show_bug.cgi?id=136981 Reviewed by Alexey Proskuryakov. Explicitly cast the return value of std::chrono::duration.count() to a fixed-size interger type, which prevents compilation error when the return value type matches neither int32_t nor int64_t. * Platform/IPC/ArgumentCoders.h: 2014-10-27 Chris Dumez Use separate HashMaps for common and uncommon headers in HTTPHeaderMap https://bugs.webkit.org/show_bug.cgi?id=138079 Reviewed by Anders Carlsson. Update the WK2 IPC HTTPHeaderMap serialization / deserialization code to leverage the fact that HTTPHeaderMap now stores common HTTP headers and uncommon one in separate HashMaps. This speeds up deserialization as we no longer need to call findHTTPHeaderName() for every decoded header. We already know if the header is a common one or not, and if it is then we already have a HTTPHeaderName type instead of a String. I see that we spend ~40% less time in HTTPHeaderMap decoding when loading http://flickr.com/explore, while the encoding takes about the same amount of time as before. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): 2014-10-22 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.2 release. * gtk/NEWS: Add release notes for 2.6.2. 2014-10-21 Michael Catanzaro [SOUP] Disable SSLv3 https://bugs.webkit.org/show_bug.cgi?id=137859 Reviewed by Carlos Garcia Campos. Set G_TLS_GNUTLS_PRIORITY if unset. * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: (main): * WebProcess/EntryPoint/unix/WebProcessMain.cpp: (main): 2014-10-20 Michael Catanzaro Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL https://bugs.webkit.org/show_bug.cgi?id=137832 Reviewed by Carlos Garcia Campos. Too many general-purpose browsers that really need this policy are not selecting it, so let's do so for them. * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext): 2014-10-18 Michael Catanzaro [GTK] Improve documentation of webkit_web_view_get_tls_info() https://bugs.webkit.org/show_bug.cgi?id=137852 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: 2014-10-14 Alexey Proskuryakov REGRESSION (r165356): Issues with Japanese text input https://bugs.webkit.org/show_bug.cgi?id=137719 rdar://problem/18431952 rdar://problem/18483741 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection): In sync code path, ensure consistent message delivery order by adding a DispatchMessageEvenWhenWaitingForSyncReply flag. This way, delayed EditorStateChanged messages won't confuse UI process. 2014-10-20 Carlos Garcia Campos [GTK] Remove the factory method from DragAndDropHandler https://bugs.webkit.org/show_bug.cgi?id=137872 Reviewed by Sergio Villar Senin. Make the constructor public and use std::make_unique instead. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDragAndDropHandler): * UIProcess/gtk/DragAndDropHandler.cpp: (WebKit::DragAndDropHandler::create): Deleted. * UIProcess/gtk/DragAndDropHandler.h: 2014-10-19 Carlos Garcia Campos [GTK] Move GtkDragAndDropHelper from Platform to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=137422 Reviewed by Martin Robinson. WebKitWebViewBase is currently the only user of GtkDragAndDropHelper, that was added to share the code with WebKit1. Move all the drag and drop logic to a new class DragAndDropHandler. * PlatformGTK.cmake: Add new files to compilation. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::startDrag): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): (webkitWebViewBaseDragDataGet): (webkitWebViewBaseDragEnd): (webkitWebViewBaseDragDataReceived): (webkitWebViewBaseDragMotion): (webkitWebViewBaseDragLeave): (webkitWebViewBaseDragDrop): (webkitWebViewBaseDragAndDropHandler): (dragExitedCallback): Deleted. (webkitWebViewBaseStartDrag): Deleted. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/DragAndDropHandler.cpp: Added. (WebKit::DragAndDropHandler::create): (WebKit::DragAndDropHandler::DragAndDropHandler): (WebKit::DragAndDropHandler::DroppingContext::DroppingContext): (WebKit::dragOperationToGdkDragActions): (WebKit::dragOperationToSingleGdkDragAction): (WebKit::gdkDragActionToDragOperation): (WebKit::DragAndDropHandler::startDrag): (WebKit::DragAndDropHandler::fillDragData): (WebKit::DragAndDropHandler::finishDrag): (WebKit::DragAndDropHandler::dataObjectForDropData): (WebKit::DragAndDropHandler::dragEntered): (WebKit::DragAndDropHandler::requestDragData): (WebKit::DragAndDropHandler::dragMotion): (WebKit::DragAndDropHandler::dragLeave): (WebKit::DragAndDropHandler::drop): * UIProcess/gtk/DragAndDropHandler.h: Added. 2014-10-05 Lorenzo Tilve [GTK] Fix build when DRAG_SUPPORT is disabled https://bugs.webkit.org/show_bug.cgi?id=137361 Reviewed by Carlos Garcia Campos. Flag out unbuildable code without DRAG_SUPPORT. * Shared/gtk/ArgumentCodersGtk.cpp: * Shared/gtk/ArgumentCodersGtk.h: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): * UIProcess/PageClient.h: 2014-10-03 Tim Horton WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset https://bugs.webkit.org/show_bug.cgi?id=137383 Reviewed by Sam Weinig. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotAtSize): Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set. 2014-10-02 JinYoung Hur Minor bug in UIClient::exceededDatabaseQuota() https://bugs.webkit.org/show_bug.cgi?id=137213 Reviewed by Anders Carlsson. Make sure not to call the completion handler twice if exceededDatabaseQuota is null. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): 2014-10-17 Carlos Garcia Campos [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds https://bugs.webkit.org/show_bug.cgi?id=137782 Reviewed by Sergio Villar Senin. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds instead of milliseconds. 2014-10-13 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.1 release. * gtk/NEWS: Add release notes for 2.6.1. 2014-10-13 Carlos Garcia Campos Unreviewed. Fix make distcheck. * CMakeLists.txt: * PlatformGTK.cmake: 2014-10-12 Sergio Villar Senin [SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents https://bugs.webkit.org/show_bug.cgi?id=137489 Reviewed by Carlos Garcia Campos. Temporarily set the SoupCache's maximum size to a huge value before calling soup_cache_load() so that the cache is not shrinked to the default value. * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::NetworkProcess::platformInitializeNetworkProcess): * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2014-10-08 Carlos Garcia Campos [GTK] Make forwarding headers generation depend on source code https://bugs.webkit.org/show_bug.cgi?id=137394 Reviewed by Philippe Normand. Only run generate-forwarding-headers.pl when source code changes and use a different target for the symlinks. * PlatformGTK.cmake: 2014-09-30 Carlos Garcia Campos [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk https://bugs.webkit.org/show_bug.cgi?id=137193 Reviewed by Gustavo Noronha Silva. GtkPopupMenu was in platform only to have a common implementation to be shared with WebKit1. Now that it's only used by WebPopupMenuProxyGtk in WebKit2, we can simplify the code by merging the implementation directly into WebPopupMenuProxyGtk. * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::populatePopupMenu): (WebKit::WebPopupMenuProxyGtk::showPopupMenu): (WebKit::WebPopupMenuProxyGtk::hidePopupMenu): (WebKit::WebPopupMenuProxyGtk::typeAheadFind): (WebKit::WebPopupMenuProxyGtk::resetTypeAheadFindState): (WebKit::WebPopupMenuProxyGtk::selectItemCallback): (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback): * UIProcess/gtk/WebPopupMenuProxyGtk.h: (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem): 2014-10-08 Carlos Garcia Campos [GTK] Use the PageLoadState observer also to monitor title and estimated load progress https://bugs.webkit.org/show_bug.cgi?id=136997 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Remove implementation of didReceiveTitleForFrame, didStartProgress, didChangeProgress and didFinishProgress. (didReceiveTitleForFrame): Deleted. (didChangeProgress): Deleted. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_estimated_load_progress): Return the value directly from the PageLoadState object, since we don't need to cache the value anymore. (webkitWebViewSetTitle): Deleted. (webkitWebViewSetEstimatedLoadProgress): Deleted. * UIProcess/API/gtk/WebKitWebViewPrivate.h: 2014-10-08 Carlos Garcia Campos Race condition with WebKitWebView:is-loading after starting page load https://bugs.webkit.org/show_bug.cgi?id=136692 Reviewed by Gustavo Noronha Silva. Use PageLoadState::Observer to update both is-loading and uri properties, instead of manually update them. This ensures that our web view is always in sync with the WebPageProxy so that webkit_web_view_is_loading() returns true right after requesting any load. We still need to manually set the is-loading property only in the case where we delay the emission of the load-changed signals when waiting for the main resource. The bahaviour is a bit different but still consistent with what our API documentation says. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Remove didSameDocumentNavigationForFrame implementation, since we are already notified about the URL change by the PageLoadState::Observer. (didSameDocumentNavigationForFrame): Deleted. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewSetIsLoading): No longer update the URI when changing the is-loading property. (webkitWebViewConstructed): Crate a PageLoadStateObserver and add it to the PageLoadState. (webkitWebViewDispose): Remove the PageLoadStateObserver from the PageLoadState. (webkitWebViewEmitLoadChanged): Add isDelayedEvent parameter to update the is-loading property accordingly when emitting the delayed events. (webkitWebViewEmitDelayedLoadEvents): Pass true as isDelayedEvent parameter of webkitWebViewEmitLoadChanged(). (webkitWebViewLoadChanged): Pass false as isDelayedEvent parameter of webkitWebViewEmitLoadChanged(). (webkitWebViewLoadFailed): (webkitWebViewLoadFailedWithTLSErrors): (webkitWebViewUpdateURI): Deleted. * UIProcess/API/gtk/WebKitWebViewPrivate.h: 2014-10-09 Carlos Garcia Campos [X11] Plugin process crashes in NetscapePlugin::platformPostInitialize() https://bugs.webkit.org/show_bug.cgi?id=137426 Reviewed by Darin Adler. For some reason flash crashes when NPP_GetValue is called with NPPVpluginCancelSrcStream, but only in windowed mode. Not calling NPP_GetValue and unconditionally loading the source URL in the browser fixes the crash and plugins work normally. We can handle this particular case with a new quirk. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::determineQuirks): Add DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin. * Shared/Plugins/PluginQuirks.h: Add DoNotCancelSrcStreamInWindowedMode quirk. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present. 2014-09-25 Tim Horton CommitLayerTree decode fails in 32-bit apps on 64-bit devices (TransformationMatrix alignment differs) https://bugs.webkit.org/show_bug.cgi?id=136444 Reviewed by Anders Carlsson. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): Stop using SimpleArgumentCoder to encode/decode TransformationMatrix, because the alignment of TransformationMatrix differs between architectures, and there's no guarantee that both sides of a connection are the same architecture. 2014-09-19 Simon Fraser Provide a default argument for the most commonly used HitTestRequest variant https://bugs.webkit.org/show_bug.cgi?id=136653 Reviewed by Darin Adler. Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent and change call sites using the default flags to use a HitTestRequest temporary. * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::dynamicViewportSizeUpdate): 2014-10-05 Carlos Garcia Campos [GTK] The new web inspector can't be docked again once undocked https://bugs.webkit.org/show_bug.cgi?id=121544 Reviewed by Martin Robinson. Use a GtkHeaderBar for the inspector window to add dock buttons when building with GTK+ >= 3.10. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): * UIProcess/WebInspectorProxy.h: * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::dockButtonClicked): (WebKit::WebInspectorProxy::createInspectorWindow): (WebKit::WebInspectorProxy::updateInspectorWindowTitle): (WebKit::WebInspectorProxy::platformInspectedURLChanged): (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): 2014-10-04 Carlos Garcia Campos Unreviewed. Add missing inspector files to compilation. * PlatformGTK.cmake: Add javascript sources in WebInspectorUI/UserInterface/External/Esprima to the list of inspector files. 2014-09-19 Dean Jackson Multithreaded WebGL is a bad idea - remove it https://bugs.webkit.org/show_bug.cgi?id=136964 Reviewed by Brent Fulgham. Remove the setting to allow multithreaded WebGL. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetMultithreadedWebGLEnabled): Deleted. (WKPreferencesGetMultithreadedWebGLEnabled): Deleted. * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2014-09-29 Carlos Garcia Campos REGRESSION(r172919): WebKitPluginProcess fails to scan GTK+2 plugins after r172919. https://bugs.webkit.org/show_bug.cgi?id=137191 Reviewed by Philippe Normand. In r172919 I moved the GTK+ symbols mix check earlier, before the plugin is loaded and initialized. That made impossible to use the GTK3 plugin process to scan gtk2 plugins, because we need to load the plugin to get its metadata. But we don't need to initialize the plugin to check if it requires GTK2, so we can do that check in the UI process to decide which plugin process to use. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): Remove the requires GTK2 check. (WebKit::NetscapePluginModule::scanPlugin): Don't write requires-gtk2 to stdout. * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::pluginRequiresGtk2): Helper function to check if the given plugin path requires GTK2. (WebKit::PluginProcessProxy::scanPlugin): Check if the plugin path requires GTK2 and use WebKitPluginProcess2 in such case, or return early if GTK2 plugins are not enabled. Log error messages when something fails scanning the plugin to make it easiert to debug problems in the future. 2014-09-26 Alberto Garcia [GTK] Don't include full path names in WebKitEnumTypes.h https://bugs.webkit.org/show_bug.cgi?id=137148 Reviewed by Carlos Garcia Campos. Replace @filename@ with @basename@ in the template, since we don't want to include the full path name in the generated header. * UIProcess/API/gtk/WebKitEnumTypes.h.template: 2014-09-30 Carlos Garcia Campos [GTK] The remote web inspector shows the HTML content as plain text https://bugs.webkit.org/show_bug.cgi?id=137250 Reviewed by Gustavo Noronha Silva. Use GResource API directly to get the resource data, instead of using the GFile API, and use g_content_type_guess() to get the MIME Type. * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: (WebKit::WebInspectorServer::platformResourceForPath): 2014-09-24 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.0 release. * gtk/NEWS: Add release notes for 2.6.0. 2014-09-19 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.90 release. * gtk/NEWS: Add release notes for 2.5.90. 2014-09-19 Carlos Garcia Campos [GTK] Missing inspector files in the tarball https://bugs.webkit.org/show_bug.cgi?id=136952 Reviewed by Gustavo Noronha Silva. * PlatformGTK.cmake: Use APPEND instead of GLOB to add individual and generated files to the list of inspector files. 2014-09-19 Carlos Garcia Campos Webkitgtk 2.5.3: tarball contains APPLE LICENSE file - stating not distributable https://bugs.webkit.org/show_bug.cgi?id=136632 Reviewed by Gustavo Noronha Silva. * PlatformGTK.cmake: Use only the icons from the gtk directory since they are free. 2014-09-19 Carlos Garcia Campos [GTK] generate-inspector-gresource-manifest.py should receive the list of files from the makefile https://bugs.webkit.org/show_bug.cgi?id=136943 Reviewed by Philippe Normand. * PlatformGTK.cmake: Fix the inspector file list and pass it to the generate-inspector-gresource-manifest.py script. 2014-09-18 Carlos Garcia Campos [GTK] Dot not allow to create delete-on-destroy GMainLoopSources https://bugs.webkit.org/show_bug.cgi?id=136923 Reviewed by Gustavo Noronha Silva. * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::dispatch): Use GMainLoopSource::scheduleAndDeleteOnDestroy(). (WorkQueue::dispatchAfter): Use GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy(). 2014-09-18 Ryuan Choi [EFL][CoordinatedGraphics] Remove setBackgroundColor message https://bugs.webkit.org/show_bug.cgi?id=136824 Reviewed by Gyuyoung Kim. CoordinatedGraphics used setBackgroundColor() to draw the background of contents although tiles are not ready. This patch removes setBackgroundColor() and uses pageExtendedBackgroundColor() which provides similar functionality. * UIProcess/API/efl/EwkView.cpp: Enables or disables WKPageSetBackgroundExtendsBeyondPage to use pageExtendedBackgroundColor() (EwkView::EwkView): (EwkView::setBackgroundColor): * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene): (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext): Passed pageExtendedBackgroundColor. (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext): Ditto. (WebCore::CoordinatedGraphicsScene::setBackgroundColor): Deleted. * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h: (WebCore::CoordinatedGraphicsScene::setDrawsBackground): Deleted. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor): Deleted. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::paintToCurrentGLContext): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange): Refactored to use const reference for the Color parameter. * UIProcess/WebPageProxy.h: * UIProcess/efl/WebViewEfl.cpp: (WebKit::WebViewEfl::paintToCairoSurface): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange): Added PLATFORM(EFL) to pass PageExtendedBackgroundColorDidChange message. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::setBackgroundColor): Deleted. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setBackgroundColor): Deleted. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mainFrameDidLayout): 2014-09-18 Jeremy Jones Improve fullscreen video rotation animation. https://bugs.webkit.org/show_bug.cgi?id=136870 Reviewed by Simon Fraser. Remove WKCAContext from LayerHostingContext and use a fencePort to synchronize animation between processes. * Platform/mac/LayerHostingContext.h: add setFencePort. Remove WKCAContext. * Platform/mac/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForPort): Remove WKCAContext. (WebKit::LayerHostingContext::createForExternalHostingProcess): ditto (WebKit::LayerHostingContext::setRootLayer): ditto (WebKit::LayerHostingContext::rootLayer): ditto (WebKit::LayerHostingContext::contextID): ditto (WebKit::LayerHostingContext::invalidate): ditto (WebKit::LayerHostingContext::setColorSpace): ditto (WebKit::LayerHostingContext::colorSpace): ditto (WebKit::LayerHostingContext::setFencePort): added * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): * WebProcess/ios/WebVideoFullscreenManager.h: * WebProcess/ios/WebVideoFullscreenManager.messages.in: add fence port parameter * WebProcess/ios/WebVideoFullscreenManager.mm: ditto (WebKit::WebVideoFullscreenManager::didSetupFullscreen): ditto (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): ditto 2014-09-18 Simon Fraser Avoid divide by zero when we get an empty rect while snapshotting a node https://bugs.webkit.org/show_bug.cgi?id=136932 rdar://problem/18383473 Reviewed by Dean Jackson. renderer()->paintingRootRect() can return an empty rect for some inline configurations, for example an containing a floated When this occurs, avoid a divide by zero and return a null snapshot image. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotNode): 2014-09-18 Carlos Garcia Campos Incorrect pending API request URL when loading an HTML string https://bugs.webkit.org/show_bug.cgi?id=136913 Reviewed by Alexey Proskuryakov. Use about:blank as pending API request URL when the given base URL is empty, otherwise use the given base URL. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadHTMLString): 2014-09-18 Tim Horton Occasional unreproducible crashes in MessageReceiverMap::dispatchMessage https://bugs.webkit.org/show_bug.cgi?id=136909 Reviewed by Anders Carlsson. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView dealloc]): We're seeing some messages dispatched on the WebContext that end up attempting to call dispatchMessage on a freed MessageReceiver. The WKRemoteObjectRegistry message receiver is added to the WebContext message receiver map, but never removed, despite the WebContext easily outliving the WKWebView that owns the remote object registry. 2014-09-17 Rohit Kumar [EFL][WK2] Use the correct enum for control key in Ewk_Event_Modifiers in ewk_navigation_policy_decision.cpp https://bugs.webkit.org/show_bug.cgi?id=136740 Reviewed by Gyuyoung Kim. * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: (toEwkEventModifiers): 2014-09-17 Daniel Bates Unreviewed, rolling out r173695. Broke building third-party Legacy WebKit apps; will investigate offline Reverted changeset: "[iOS] Make WebCore build with public iOS SDK" https://bugs.webkit.org/show_bug.cgi?id=136487 http://trac.webkit.org/changeset/173695 2014-09-17 Simon Fraser Fix an issue that caused video playback to not always use high resolution streams https://bugs.webkit.org/show_bug.cgi?id=136879 rdar://problem/18316542 Reviewed by Eric Carlson. The underlying video framework expects to be able to use -[CALayer convertRect:toLayer:nil] on the video layer to obtain information about the display resolution of the video, including the device scale factor. This doesn't work for layers in the web process, which are remotely hosted into the UI process. For now, use a workaround which involves putting a scale transform equivalent to the device scale factor on the web process layer, and the inverse scale on the hosting layer in the UI process. We have to do this in two places, for in-page video, and for fullscreen video. * Shared/mac/RemoteLayerTreeTransaction.h: Add hostingDeviceScaleFactor to the LayerCreation properties. * Shared/mac/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode): (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode): * UIProcess/ios/RemoteLayerTreeHostIOS.mm: (-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Set the inverse scale transform on the layer. (WebKit::RemoteLayerTreeHost::createLayer): (-[WKRemoteView initWithFrame:contextID:]): Deleted. * UIProcess/ios/WebVideoFullscreenManagerProxy.h: * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom): * WebProcess/WebPage/mac/RemoteLayerTreeContext.h: (WebKit::RemoteLayerTreeContext::deviceScaleFactor): * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: (WebKit::RemoteLayerTreeContext::layerWasCreated): * WebProcess/ios/WebVideoFullscreenManager.mm: (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): (WebKit::WebVideoFullscreenManager::didSetupFullscreen): 2014-09-17 Gavin Barraclough Aways have a PageThrottler (sometimes have a UserActivity::Impl) https://bugs.webkit.org/show_bug.cgi?id=136892 Reviewed by Geoffrey Garen. Some instances of Page have a PageThrottler to track activity on the Page, and some do not. (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not). We do this for three reasons: * We do not need to take AppNap assertions on WK1. * Some Pages do not track their visibility correctly, and would always claim to be visible. * Page VisibilityState is not set until after construction, so if we instantiate Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at numerous points throughout the code, and we'll miss activity that occurs between the Page being created & the PageThrottler added to it (really a theoretical problem right now, since they're currently always created pretty much back to back). Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the PageThrottler be added later. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::evaluate): - createPageThrottler -> enablePageThrottler * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::mouseEvent): (WebKit::WebPage::wheelEvent): (WebKit::WebPage::keyEvent): - Page::pageThrottler now returns a reference rather than a pointer 2014-09-17 Daniel Bates [iOS] Make WebCore build with public iOS SDK https://bugs.webkit.org/show_bug.cgi?id=136487 Reviewed by David Kilzer. Update WebKit2 source files to include the wrapper SPI headers instead of the corresponding actual SPI header(s). * Platform/mac/SharedMemoryMac.cpp: * Shared/ios/NativeWebTouchEventIOS.mm: * Shared/mac/RemoteLayerBackingStore.mm: * Shared/mac/RemoteLayerTreePropertyApplier.mm: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/ios/WKPDFPageNumberIndicator.mm: * UIProcess/ios/WKScrollView.mm: * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: * WebProcess/WebPage/WebPage.cpp: 2014-09-17 Gavin Barraclough DOM timer throttling for hidden plugins https://bugs.webkit.org/show_bug.cgi?id=136197 Reviewed by Geoff Garen & Andreas Kling. For non-visible web pages we slow timers (since they can't be driving animations, etc). We should do the same for plugins. * PluginProcess/WebProcessConnection.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: - remove now redundant includes. * WebProcess/Plugins/PluginView.h: - audioHardwareActivity is now virtual, override. 2014-09-17 Carlos Garcia Campos [GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host https://bugs.webkit.org/show_bug.cgi?id=136889 Reviewed by Gustavo Noronha Silva. We were passing a host for two different reasons, first because it's more convenient to add an exception with webkit_web_context_allow_tls_certificate_for_host(), but also because we were assuming the active URI is the failing URI in case of failure. This assumption is correct because our current code does that, but I'm not sure we are doing it on purpose. That behaviour is not documented anywhere and it's not what WebKit2 does internaly. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): (webkitWebViewLoadFailedWithTLSErrors): * UIProcess/API/gtk/WebKitWebView.h: 2014-09-16 Carlos Garcia Campos [GTK] Fix layering violations in PasteboardGtk https://bugs.webkit.org/show_bug.cgi?id=136802 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::updateGlobalSelection): Use new API to update the global selection. 2014-09-16 Carlos Garcia Campos DragData should not depend on Clipboard, DocumentFragment, and Document https://bugs.webkit.org/show_bug.cgi?id=21358 Reviewed by Darin Adler. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): Update to API change in DragData::asURL(). 2014-09-16 Daniel Bates [iOS] Add iOS SDK name and version suffix to WebKitSystemInterface debug/release product name https://bugs.webkit.org/show_bug.cgi?id=136862 Reviewed by David Kilzer. * Configurations/DebugRelease.xcconfig: 2014-09-16 Enrica Casucci Remove PLATFORM(IOS) from WebCore/editing (Part 3). https://bugs.webkit.org/show_bug.cgi?id=136474 Reviewed by Benjamin Poulain. This is the updated version of the patch that was landed in r173340. This patch removes the use of PLATFORM(IOS) from TextAffinity.h and removes the assumption that EAffinity values match NSSelectionAffinity values. It also removes the includes in TextAffinity.h, creating the need to include explicitly the files when necessary. * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: 2014-09-16 Dan Bernstein Standardized the return type of a delegate method. Rubber-stamped by Anders Carlsson. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Changed a return type from bool to BOOL. 2014-09-16 Tomas Popela [GTK] Typo in webkit_security_manager_register_uri_scheme_as_empty_document documentation https://bugs.webkit.org/show_bug.cgi?id=136852 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitSecurityManager.cpp: 2014-09-13 Gavin Barraclough Should call [BKSProcessAssertion invalidate] https://bugs.webkit.org/show_bug.cgi?id=136804 Reviewed by Darin Adler. We should invalidate the process assertion before releasing it. Fortunately this is really easy, since there is a simple 1:1 relationship with ProcessAssertion, with their lifetimes matching exactly. * UIProcess/ProcessAssertion.cpp: (WebKit::ProcessAssertion::~ProcessAssertion): - no-op implementation. * UIProcess/ProcessAssertion.h: - added destructor. * UIProcess/ios/ProcessAssertionIOS.mm: (WebKit::ProcessAssertion::~ProcessAssertion): - destructor invalidates the BKSProcessAssertion. 2014-09-15 Gyuyoung Kim REGRESSION(r170243): [EFL][WK2] Dirty image is shown when new page is loading on fixed layout https://bugs.webkit.org/show_bug.cgi?id=136568 Reviewed by Csaba Osztrogonác. r170243 landed wrong didCommitNewPage() since it always returns false. It cause that PageViewportControllerClientEfl::didChangeVisibleContents() continues to draw dirty image on 0,0 coordinate. This patch fixes the problem. * UIProcess/API/efl/EwkView.h: (EwkView::waitingForNewPage): (EwkView::didCommitNewPage): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents): 2014-09-14 Chris Dumez Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses https://bugs.webkit.org/show_bug.cgi?id=136789 Reviewed by Darin Adler. Avoid calling slow Node::countChildNodes(). * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: (WebKit::WebPage::findZoomableAreaForPoint): Replace call to "node->parentNode()->childNodeCount() != 1" by "!node->parentNode()->hasOneChild()" which is equivalent but more efficient. 2014-09-10 Jon Honeycutt Re-add the request autocomplete feature This feature was rolled out in r148731 because it was only used by Chromium. As we consider supporting this feature, roll it back in, but leave it disabled. This rolls out r148731 (which removed the feature) with small changes needed to make the code build in ToT, to match modern style, to make the tests run, and to remove unused code. Reviewed by Andy Estes. * Configurations/FeatureDefines.xcconfig: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didRequestAutocomplete): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2014-09-12 Tim Horton Swiping back from a Twitter image to Twitter flashes to the wrong position https://bugs.webkit.org/show_bug.cgi?id=136798 Reviewed by Darin Adler and Sam Weinig. * UIProcess/mac/ViewGestureController.h: * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::ViewGestureController): (WebKit::ViewGestureController::didFinishLoadForMainFrame): (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Add a 250ms repeating timer that we start in didFinishLoadForMainFrame if we are for some reason still loading, and in didSameDocumentNavigationForMainFrame unconditionally, to match behavior of the old swipe implementation. Also, do the active gesture check in both of those places so that we don't start the timer if we're in the middle of a live swipe or have already torn down the snapshot (removeSwipeSnapshotAfterRepaint does this as well, so this isn't really a behavior change). (WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Every time the timer fires, check if we're still loading; if not, tear down the swipe snapshot (after repainting). (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Stop the active load monitoring timer. 2014-09-12 Commit Queue Unreviewed, rolling out r173575. https://bugs.webkit.org/show_bug.cgi?id=136790 Failing tests (Requested by enrica on #webkit). Reverted changeset: "Remove PLATFORM(IOS) from WebCore/editing (Part 3)." https://bugs.webkit.org/show_bug.cgi?id=136474 http://trac.webkit.org/changeset/173575 2014-09-12 Enrica Casucci Remove PLATFORM(IOS) from WebCore/editing (Part 3). https://bugs.webkit.org/show_bug.cgi?id=136474 Reviewed by Benjamin Poulain. This is the updated version of the patch that was landed in r173340. I changed the use of IntPoint to FloatPoint since it was causing tests to fail. This patch removes the use of PLATFORM(IOS) from TextAffinity.h and removes the assumption that EAffinity values match NSSelectionAffinity values. It also removes the includes in TextAffinity.h, creating the need to include explicitly the files when necessary. It also removes the unnecessary use of platform specific types, replacing them with WebCore types. * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: (-[WKAccessibilityWebPageObject accessibilityHitTest:]): 2014-09-12 Dan Bernstein [Cocoa] Message generation scripts should be installed in WebKit.framework https://bugs.webkit.org/show_bug.cgi?id=136771 Reviewed by Anders Carlsson. * DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit. * Scripts/generate-message-receiver.py: (main): Updated for rename from webkit2 to webkit. * Scripts/generate-messages-header.py: (main): Ditto. * Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2. * Scripts/webkit/messages.py: Updated for rename. * Scripts/webkit/parser.py: Ditto. * WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase from the WebKit2 target to the WebKit target and changed its destination to WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files build phase, since compiled files no longer get copied. 2014-09-12 Tim Horton Flash of page scrolled to wrong origin before restoring scroll position after swiping back to CNN front page from an article https://bugs.webkit.org/show_bug.cgi?id=136788 Reviewed by Sam Weinig. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Always wait until didFinishLoadForMainFrame or didSameDocumentNavigationForMainFrame before removing the snapshot, because otherwise we don't know if the scroll position has been restored yet. We should revisit this at some point, because it should be possible to determine if the scroll position has been restored appropriately, but for now it is safest to restore the antique behavior. 2014-09-12 Dan Bernstein Build fix. Reverted r173564. * DerivedSources.make: * Scripts/generate-message-receiver.py: (main): * Scripts/generate-messages-header.py: (main): * Scripts/webkit: Removed. * Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed. * Scripts/webkit/LegacyMessages-expected.h: Removed. * Scripts/webkit/MessageReceiver-expected.cpp: Removed. * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed. * Scripts/webkit/Messages-expected.h: Removed. * Scripts/webkit/MessagesSuperclass-expected.h: Removed. * Scripts/webkit/__init__.py: Removed. * Scripts/webkit/messages.py: Removed. * Scripts/webkit/messages_unittest.py: Removed. * Scripts/webkit/model.py: Removed. * Scripts/webkit/parser.py: Removed. * Scripts/webkit/test-legacy-messages.in: Removed. * Scripts/webkit/test-messages.in: Removed. * Scripts/webkit/test-superclass-messages.in: Removed. * Scripts/webkit2: Copied from Scripts/webkit2. * WebKit2.xcodeproj/project.pbxproj: 2014-09-11 Andy Estes [WebKit2] WKImageCreateCGImage crashes when passed a null WKImage https://bugs.webkit.org/show_bug.cgi?id=136768 Reviewed by Tim Horton. WKImageCreateFromCGImage can return null, so it only seems fair that WKImageCreateCGImage should tolerate null. * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): 2014-09-12 Dan Bernstein [Cocoa] Message generation scripts should be installed in WebKit.framework https://bugs.webkit.org/show_bug.cgi?id=136771 Reviewed by Anders Carlsson. * DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit. * Scripts/generate-message-receiver.py: (main): Updated for rename from webkit2 to webkit. * Scripts/generate-messages-header.py: (main): Ditto. * Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2. * Scripts/webkit/messages.py: Updated for rename. * Scripts/webkit/parser.py: Ditto. * WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase from the WebKit2 target to the WebKit target and changed its destination to WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files build phase, since compiled files no longer get copied. 2014-09-12 Michael Catanzaro [GTK] Use a nicer HTTP authentication dialog https://bugs.webkit.org/show_bug.cgi?id=136615 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: (webkitAuthenticationDialogInitialize): Use a nicer layout. (packTwoColumnLayoutInBox): Deleted. (createLabel): Deleted. (createEntry): Deleted. 2014-09-12 Carlos Garcia Campos REGRESSION(r173423): CertificateInfo is never sent to the UI process when using shared secondary process model https://bugs.webkit.org/show_bug.cgi?id=136669 Reviewed by Antti Koivisto. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Use ResourceLoader::shouldIncludeCertificateInfo() to initialize needsCertificateInfo parameter. 2014-09-11 Ryuan Choi [EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=136770 Reviewed by Gyuyoung Kim. CoordinatedGraphicsScene and CoordinatedBackingStore is only for UIProcess. This patch moved them from WebCore to WebKit2/UIProcess/CoordinatedGraphics/. * PlatformEfl.cmake: * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp: * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp. * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h. * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp. * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: * UIProcess/CoordinatedGraphics/WebView.cpp: * UIProcess/efl/WebViewEfl.cpp: 2014-09-11 Bear Travis [CSS Font Loading] Enable CSS Font Loading on Mac https://bugs.webkit.org/show_bug.cgi?id=135473 Reviewed by Antti Koivisto. Enable CSS Font Loading in FeatureDefines. * Configurations/FeatureDefines.xcconfig: 2014-09-11 Youenn Fablet [WK2] Authentication dialog is displayed for cross-origin XHR https://bugs.webkit.org/show_bug.cgi?id=131349 Reviewed by Alexey Proskuryakov. Precomputing client credential policy in the Web Process before sending the resource load task to the Network Process. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Added an ASSERT to ensure that credential policy is never set to DoNotAskClientForCrossOriginCredentials. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Precomputing client credential policy to handle the case of cross-origin requests. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): Added a TODO to check whether redirections need a specific handling. 2014-09-11 Carlos Garcia Campos [GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog https://bugs.webkit.org/show_bug.cgi?id=136700 Reviewed by Sergio Villar Senin. Copy WebKitAuthenticationWidget implementation inside WebKitAuthenticationDialog using a normal GtkBox instead. * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: (okButtonClicked): (cancelButtonClicked): (packTwoColumnLayoutInBox): (createLabel): (createEntry): (webkitAuthenticationDialogInitialize): Remove the CredentialStorageMode parameter since it's now a member. (webkitAuthenticationDialogNew): Initialize the CredentialStorageMode member too. * UIProcess/API/gtk/WebKitAuthenticationDialog.h: 2014-09-10 Antti Koivisto NetworkResourceLoader cleanups https://bugs.webkit.org/show_bug.cgi?id=136701 Reviewed by Darin Adler. After smashing NetworkResourceLoader together with the clients it can be made nicer. * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::removeLoader): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData): The original request is now part of the loader. (WebKit::sendReplyToSynchronousRequest): (WebKit::NetworkResourceLoader::NetworkResourceLoader): Instead of copying everything out from NetworkResourceLoadParameters just include the whole thing as a const field. SanboxExtension construction moves to NetworkResourceLoadParameters::decode() Stuff that is related to starting the load moves to start(). (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::setDefersLoading): Eliminate m_deferredRequest since we now always remember the original request. (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didConvertHandleToDownload): (WebKit::NetworkResourceLoader::abort): (WebKit::NetworkResourceLoader::didReceiveResponseAsync): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::willSendRequestAsync): (WebKit::NetworkResourceLoader::continueWillSendRequest): Eliminate unnecessary m_suggestedRequestForWillSendRequest. (WebKit::NetworkResourceLoader::wasBlocked): (WebKit::NetworkResourceLoader::cannotShowURL): (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): (WebKit::NetworkResourceLoader::receivedCancellation): (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded): (WebKit::NetworkResourceLoader::consumeSandboxExtensions): (WebKit::NetworkResourceLoader::invalidateSandboxExtensions): (WebKit::NetworkResourceLoader::sendAbortingOnFailure): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::originalRequest): (WebKit::NetworkResourceLoader::currentRequest): (WebKit::NetworkResourceLoader::sessionID): (WebKit::NetworkResourceLoader::defersLoading): (WebKit::NetworkResourceLoader::isLoadingMainResource): (WebKit::NetworkResourceLoader::request): Deleted. (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted. Made private and moved to cpp. * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor): Use original request instead of the current one. This might fix a bug where we didn't use file backing over redirects. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::decode): Decode to SanboxExtensions to the actual type rather than a handle. * Shared/Network/NetworkResourceLoadParameters.h: 2014-09-10 Michael Catanzaro [GTK] allow overwriting destination of download https://bugs.webkit.org/show_bug.cgi?id=136372 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitDownload.cpp: (webkitDownloadGetProperty): Added (webkit_download_class_init): Install webkitDownloadGetProperty (webkitDownloadDecideDestinationWithSuggestedFilename): Add allowOverwrite parameter and set it appropriately (webkit_download_get_allow_overwrite): Added (webkit_download_set_allow_overwrite): Added * UIProcess/API/gtk/WebKitDownload.h: New API * UIProcess/API/gtk/WebKitDownloadClient.cpp: (decideDestinationWithSuggestedFilename): Pass allowOverwrite to webkitDownloadDecideDestinationWithSuggestedFilename * UIProcess/API/gtk/WebKitDownloadPrivate.h: Add allowOverwrite parameter to webkitDownloadDecideDestinationWithSuggestedFilename * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: New API 2014-09-10 Rohit Kumar [GTK] Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module https://bugs.webkit.org/show_bug.cgi?id=136670 Reviewed by Martin Robinson. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): 2014-09-09 Enrica Casucci REGRESSION (WebKit2): -webkit-touch-callout: none has no effect. https://bugs.webkit.org/show_bug.cgi?id=136685 rdar://problem/17629840 Reviewed by Benjamin Poulain. We need to check if the touch callout is enabled for the element before starting the long press gesture. The information about the touch callout is returned together with the rest of data returned by the InteractionInformationAtPosition. * Shared/InteractionInformationAtPosition.cpp: (WebKit::InteractionInformationAtPosition::encode): (WebKit::InteractionInformationAtPosition::decode): * Shared/InteractionInformationAtPosition.h: (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _actionForLongPress]): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getPositionInformation): 2014-09-09 Benjamin Poulain Disable the "unreachable-code" warning https://bugs.webkit.org/show_bug.cgi?id=136677 Reviewed by Darin Adler. * Configurations/Base.xcconfig: 2014-09-09 Dan Bernstein [Cocoa] -[WKBackForwardList backList] contains an unnecessary nil check https://bugs.webkit.org/show_bug.cgi?id=136680 Reviewed by Anders Carlsson. * UIProcess/API/Cocoa/WKBackForwardList.mm: (-[WKBackForwardList backList]): Removed nil check. (-[WKBackForwardList forwardList]): Ditto. 2014-09-09 Tim Horton Make DrawingArea a real MessageReceiver https://bugs.webkit.org/show_bug.cgi?id=136438 Reviewed by Darin Adler. * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::DrawingArea): (WebKit::DrawingArea::~DrawingArea): * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::~WebPage): (WebKit::WebPage::didReceiveMessage): Make DrawingArea a real MessageReceiver instead of a LegacyReceiver that jumps through WebPage to receive its messages. 2014-09-08 Antti Koivisto Pass certificate info as part of ResourceResponse https://bugs.webkit.org/show_bug.cgi?id=136611 Reviewed by Darin Adler. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Initialize the certificate info only if requested. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponse): (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Deleted. Rename didReceiveResponseWithCertificateInfo -> didReceiveResponse as it is now part of the response. * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Request certificate info for the main resource only. (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::certificateInfo): 2014-09-08 Shivakumar JM [WebKit2] Fix build error in WebKit2/WebProcess module https://bugs.webkit.org/show_bug.cgi?id=136667 Reviewed by Darin Adler. Fix the build error by handling default case. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::maximumBufferingTime): 2014-09-08 Simon Fraser Fix the iOS build. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: 2014-09-08 Eva Balazsfalvi Remove FILTERS flag https://bugs.webkit.org/show_bug.cgi?id=136571 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: 2014-09-08 Antti Koivisto Buffer images on web process side https://bugs.webkit.org/show_bug.cgi?id=136631 Reviewed by Darin Adler. We can substantially reduce IPC and decoding time for large images by allowing some buffering. This patch makes us buffer image data up to 0.5s before sending it over to the web process. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didReceiveBuffer): Start the timer. (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded): (WebKit::NetworkResourceLoader::bufferingTimerFired): (WebKit::NetworkResourceLoader::sendBuffer): Send the data when the timer fires or the load finishes, whichever happens first. * NetworkProcess/NetworkResourceLoader.h: * Platform/IPC/ArgumentCoders.h: Support encoding std::chrono::duration * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: Pass maximimum buffering duration. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::maximumBufferingTime): Deterimine duration from the resource type. Enabled full buffering for font resources. They are not decoded incrementally. (WebKit::WebResourceLoadScheduler::scheduleLoad): 2014-09-08 Dan Bernstein HAVE(VOUCHERS) is not available outside of WebKit2 https://bugs.webkit.org/show_bug.cgi?id=136637 Reviewed by Tim Horton. * config.h: Moved the definition of HAVE_VOUCHERS from here to wtf’s Platform.h. 2014-09-08 Tim Horton Try to fix the build after r173383, part 4. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: Machine finally caught up so I could actually test the fixes! 2014-09-08 Tim Horton Try to fix the build after r173383, part 3. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: 2014-09-08 Dan Bernstein Build fix. * Platform/IPC/Connection.h: 2014-09-06 Sam Weinig XPCPtr should be converted into an all purpose smart pointer for os_objects https://bugs.webkit.org/show_bug.cgi?id=136602 Reviewed by Darin Adler. * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm: (DatabaseServiceInitializer): * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate): (NetworkServiceInitializer): * Platform/IPC/Connection.h: (IPC::Connection::Identifier::Identifier): * Platform/IPC/mac/ConnectionMac.mm: (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): * Platform/IPC/mac/XPCPtr.h: Removed. * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate): (PluginServiceInitializer): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate): (WebKit::XPCServiceInitializer): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: (WebKit::XPCServiceInitializerDelegate::checkEntitlements): (WebKit::XPCServiceInitializerDelegate::hasEntitlement): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: (WebKit::XPCServiceEventHandler): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): (WebKit::connectToReExecService): * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (WebContentServiceInitializer): Update after the rename of XPCPtr to OSObjectPtr. 2014-09-06 Darin Adler Make updates suggested by new version of Xcode https://bugs.webkit.org/show_bug.cgi?id=136603 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE, COMBINE_HIDPI_IMAGES, and ENABLE_STRICT_OBJC_MSGSEND as suggested by the Xcode upgrade check. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeCocoaOverrides): Changed NSConcreteTask_launch to use the same technique as the other functions in this file, doing the type casting right at the call to method_setImplementation so the global has a suitable type for making a function call, rather than relying on the abilty to call through a type without a specific argument list. * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::pathExtension): Use size_t for the result of String::reverseFind rather than converting it to an int. Also don't rely on the fact that WTF's notFound becomes -1 when cast from size_t to int. * WebKit2.xcodeproj/project.pbxproj: Let Xcode delete some orphaned items, and updated LastUpgradeCheck. 2014-09-06 Brian J. Burg Web Inspector: convert DockSide to an enum class https://bugs.webkit.org/show_bug.cgi?id=136601 Reviewed by Timothy Hatcher. * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::attachWindow): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::attachedBottom): (WebKit::WebInspector::attachedRight): (WebKit::WebInspector::detached): 2014-09-06 Antti Koivisto Serialize ResourceResponses using WebKit types https://bugs.webkit.org/show_bug.cgi?id=136545 Reviewed by Alexey Proskuryakov. Remove the WK2 serialization code for responses. It moves to the types itself in WebCore where it is close to the data being serialized and less likely to get out of sync. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): Deleted. (IPC::ArgumentCoder::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * Shared/mac/WebCoreArgumentCodersMac.mm: (IPC::ArgumentCoder::encodePlatformData): Deleted. (IPC::ArgumentCoder::decodePlatformData): Deleted. 2014-09-06 Ryuan Choi [EFL] Drop evas object cursor support https://bugs.webkit.org/show_bug.cgi?id=136324 Reviewed by Gyuyoung Kim. Removed evas object cursor because there are some bugs. ewebkit will only support ecore_x_cursor because ewebkit is available with X, now. * UIProcess/API/efl/EwkView.cpp: (EwkViewEventHandler::handleEvent): (EwkView::EwkView): (EwkView::updateCursor): Simplifies not to use evas object cursor. (EwkView::setCursor): Ditto. * UIProcess/API/efl/EwkView.h: 2014-09-05 Commit Queue Unreviewed, rolling out r173340 and r173342. https://bugs.webkit.org/show_bug.cgi?id=136596 Broke many tests (Requested by ap on #webkit). Reverted changesets: "Remove PLATFORM(IOS) from WebCore/editing (Part 3)." https://bugs.webkit.org/show_bug.cgi?id=136474 http://trac.webkit.org/changeset/173340 "Build fix after r173340." http://trac.webkit.org/changeset/173342 2014-09-05 Joseph Pecoraro Use WTFString::split(char) in more places https://bugs.webkit.org/show_bug.cgi?id=136543 Reviewed by Sam Weinig. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::PluginVersion::parse): * UIProcess/gtk/WebContextGtk.cpp: (WebKit::initInspectorServer): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::isTransparentSilverlightBackgroundValue): 2014-09-05 Enrica Casucci Remove PLATFORM(IOS) from WebCore/editing (Part 3). https://bugs.webkit.org/show_bug.cgi?id=136474 Reviewed by Benjamin Poulain. This patch removes the use of PLATFORM(IOS) from TextAffinity.h and removes the assumption that EAffinity values match NSSelectionAffinity values. It also removes the includes in TextAffinity.h, creating the need to include explicitly the files when necessary. It also removes the unnecessary use of platform specific types, replacing them with WebCore types. * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: (-[WKAccessibilityWebPageObject accessibilityHitTest:]): 2014-09-05 David Kilzer JavaScriptCore should build with newer clang Reviewed by Geoffrey Garen. * Shared/API/c/WKString.cpp: (WKStringCreateWithJSString): Add NULL check to prevent WebKitTestRunner crashes that relied on the previous |this| behavior where NULL values were allowed. 2014-09-05 Beth Dakin ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not actually scrollable https://bugs.webkit.org/show_bug.cgi?id=136558 Reviewed by Simon Fraser. New ScrollableArea virtual function. * WebProcess/Plugins/PDF/PDFPlugin.h: 2014-09-04 Gyuyoung Kim Unreviewed, speculative build fix on GTK port since r173305. * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: (webkitURISchemeRequestReadCallback): 2014-09-03 Andy Estes [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT https://bugs.webkit.org/show_bug.cgi?id=136521 Reviewed by Anders Carlsson. * config.h: Included instead of defining WEBCORE_EXPORT. 2014-09-04 Maciej Stachowiak Remove WebCoreSystemInterface glue for otherwise unused WKSI calls https://bugs.webkit.org/show_bug.cgi?id=136527 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2014-09-04 Antti Koivisto Remove ResourceResponse::m_suggestedFilename https://bugs.webkit.org/show_bug.cgi?id=136534 Reviewed by Alexey Proskuryakov. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): No more m_suggestedFilename. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::addArchiveResource): Fake the suggested filename by using the Content-Disposition header. 2014-09-04 Eva Balazsfalvi Remove CSS_FILTERS flag https://bugs.webkit.org/show_bug.cgi?id=136529 Reviewed by Dirk Schulze. * Configurations/FeatureDefines.xcconfig: * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (IPC::ArgumentCoder::decode): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp: (WebKit::GraphicsLayerCARemote::filtersCanBeComposited): * WebProcess/WebPage/mac/GraphicsLayerCARemote.h: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: (WebKit::PlatformCAAnimationRemote::setFromValue): (WebKit::PlatformCAAnimationRemote::setToValue): (WebKit::PlatformCAAnimationRemote::setValues): * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::updateClonedLayerProperties): (WebKit::PlatformCALayerRemote::filtersCanBeComposited): * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 2014-09-04 Commit Queue Unreviewed, rolling out r173245. https://bugs.webkit.org/show_bug.cgi?id=136533 Broke JSC tests. (Requested by ddkilzer on #webkit). Reverted changeset: "JavaScriptCore should build with newer clang" https://bugs.webkit.org/show_bug.cgi?id=136002 http://trac.webkit.org/changeset/173245 2014-09-04 Carlos Garcia Campos Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess() https://bugs.webkit.org/show_bug.cgi?id=136478 Reviewed by Alexey Proskuryakov. The soup network backend uses WebProcess::usesNetworkProcess() from WebProcess::platformSetCacheModel() and WebProcess::platformInitializeWebProcess(), both called before the m_usesNetworkProcess member has been initialized. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Move the m_usesNetworkProcess initialization at the beginning right before calling platformInitializeWebProcess(). * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformSetCacheModel): Remove the early return when using the network process, since this was dead code before this change, and not really needed now that usesNetworkProcess() will return true. (WebKit::WebProcess::platformInitializeWebProcess): Remove comment that is not accurate since r171156. 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-03 David Kilzer JavaScriptCore should build with newer clang Reviewed by Geoffrey Garen. * Shared/API/c/WKString.cpp: (WKStringCreateWithJSString): Add NULL check to prevent WebKitTestRunner crashes that relied on the previous |this| behavior where NULL values were allowed. 2014-09-03 Enrica Casucci Remove PLATFORM(IOS) from WebCore/editing (Part 1). https://bugs.webkit.org/show_bug.cgi?id=136474 Reviewed by Tim Horton. * UIProcess/WebEditCommandProxy.cpp: (WebKit::WebEditCommandProxy::nameForEditAction): 2014-09-03 Yongjun Zhang https://bugs.webkit.org/show_bug.cgi?id=136395 Need a way to get userAgent from WKWebView. Add _userAgent property to return user agent string from WKWebView. Reviewed by Anders Carlsson. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _userAgent]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: 2014-09-02 Maciej Stachowiak Clean up naming for and slightly refactor legacy video fullscreen support https://bugs.webkit.org/show_bug.cgi?id=136446 Reviewed by Jer Noble. Key changes: supportsFullscreenForNode(Node*) --> supportsVideoFullscreen() enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*) exitFullscreenForNode(Node*) --> exitVideoFullscreen() The old versions had unnecessary parameters, did not clearly distinguish their purpose from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes. Also changed many other places to use HTMLVideoElement* instead of Node* or HTMLMediaElement* when they were in fact only used for video elements and would only work for such. Legacy video fullscreen in WebKit2 is only supported on iOS (for other ports that support it, it's WK1 only). * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::supportsVideoFullscreen): Adjust for renames as mentioned. (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto (WebKit::WebChromeClient::exitVideoFullscreen): ditto * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/ios/WebVideoFullscreenManager.h: * WebProcess/ios/WebVideoFullscreenManager.mm: (WebKit::clientRectForElement): No need to be generic to node. (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen): Adjust for the main refactoring. Also change m_node to m_videoElement with appropriate type change. (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): ditto (WebKit::WebVideoFullscreenManager::didEnterFullscreen): ditto (WebKit::WebVideoFullscreenManager::didExitFullscreen): ditto (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto 2014-09-03 Dan Bernstein Get rid of HIGH_DPI_CANVAS leftovers https://bugs.webkit.org/show_bug.cgi?id=136491 Reviewed by Benjamin Poulain. * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS and removed it from FEATURE_DEFINES. 2014-09-02 Yongjun Zhang Pass the resource identifier in willSendRequest callback. https://bugs.webkit.org/show_bug.cgi?id=136325 Reviewed by Dan Bernstein. Add two new delegate methods webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse: and webProcessPlugInBrowserContextController:frame:didInitiateLoadForResource:request:pageIsProvisionallyLoading:. We will remove the old willSendRequest and didInitiateLoadForResource when clients adopt the new methods. * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (willSendRequestForFrame): (didInitiateLoadForResource): 2014-09-02 Philippe Normand Unreviewed, GTK build fix after r173163. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::update): (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::incorporateUpdate): (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode): * UIProcess/DrawingAreaProxyImpl.h: 2014-09-01 Timothy Horton Fix the iOS build. * UIProcess/ios/WKContentView.mm: (-[WKContentView _createDrawingAreaProxy]): Whoops. 2014-09-01 Ryuan Choi Build break on the EFL port since r173163 https://bugs.webkit.org/show_bug.cgi?id=136443 Unreviewed build fix. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::BackingStore): * UIProcess/BackingStore.h: * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): (WebKit::CoordinatedDrawingAreaProxy::updateViewport): (WebKit::CoordinatedDrawingAreaProxy::contentsRect): (WebKit::CoordinatedDrawingAreaProxy::update): (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState): (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate): (WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState): (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode): (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode): (WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode): * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h: (WebKit::CoordinatedDrawingAreaProxy::page): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState): (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame): (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset): * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::createDrawingAreaProxy): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): 2014-09-01 Tim Horton Remove two unused WebKit2 PDF-related preferences https://bugs.webkit.org/show_bug.cgi?id=136441 Reviewed by Dan Bernstein. * Shared/WebPreferencesDefinitions.h: Move the macro arguments comment down near where the macros are being used. No need to check both PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR); the second can't be true without the first. These two PDF preferences are long-unused; if we bring back their functionality, we'll bring back the preferences. 2014-09-01 Tim Horton DrawingAreaProxy and friends can hold on to WebPageProxy by reference https://bugs.webkit.org/show_bug.cgi?id=136440 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKView.mm: (-[WKView _createDrawingAreaProxy]): * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::setExposedRect): (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired): * UIProcess/DrawingAreaProxy.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect): (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry): (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart): (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation): (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale): (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator): (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay): (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy): (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate): (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode): (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode): (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom): (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom): 2014-09-01 Gyuyoung Kim [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES https://bugs.webkit.org/show_bug.cgi?id=136194 Reviewed by Csaba Osztrogonác. Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt. * CMakeLists.txt: 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-31 Tim Horton Occasional crashes (null deref) under ViewGestureController::endMagnificationGesture https://bugs.webkit.org/show_bug.cgi?id=136409 Reviewed by Dan Bernstein. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::endMagnificationGesture): Null-check DrawingArea. 2014-08-26 Maciej Stachowiak Use RetainPtr::autorelease in some places where it seems appropriate https://bugs.webkit.org/show_bug.cgi?id=136280 Reviewed by Darin Adler. * Shared/Cocoa/WKNSURLExtras.mm: (urlWithWTFString): Use autorelease() instead of CFBridgingRelease(leakRef()) 2014-08-29 Tim Horton More occasional crashes in ServicesController::resfreshExistingServices https://bugs.webkit.org/show_bug.cgi?id=136387 Reviewed by Dan Bernstein. * UIProcess/mac/ServicesController.mm: (WebKit::ServicesController::ServicesController): Speculative fix; if this block is called synchronously, we'll end up calling back into ::shared() before the NeverDestroyed is initialized, ending up with two ServicesControllers. 2014-08-29 Alexey Proskuryakov Crashes in IPC code under VisitedLinkProvider::pendingVisitedLinksTimerFired https://bugs.webkit.org/show_bug.cgi?id=136384 rdar://problem/16991213 Reviewed by Sam Weinig. VisitedLinkProvider process tracking relied on a combination of WebPageProxy process lifecycle notifications and checking process state. As evidenced by multiple FIXMEs, these are not yet as reliable as they should be. Changed to unregister a process when it closes, not when it no longer has any pages using the particular VisitedLinkProvider or WebUserContentControllerProxy. This is a deoptimization that should not matter in practice. * UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy): (WebKit::WebUserContentControllerProxy::removeProcess): (WebKit::WebUserContentControllerProxy::addUserScript): (WebKit::WebUserContentControllerProxy::removeAllUserScripts): (WebKit::WebUserContentControllerProxy::addUserStyleSheet): (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets): (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler): (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName): * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/VisitedLinkProvider.cpp: (WebKit::VisitedLinkProvider::~VisitedLinkProvider): (WebKit::VisitedLinkProvider::removeProcess): (WebKit::VisitedLinkProvider::removeAll): (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): (WebKit::VisitedLinkProvider::resizeTable): * UIProcess/VisitedLinkProvider.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::processDidFinishLaunching): (WebKit::WebPageProxy::resetStateAfterProcessExited): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::disconnect): (WebKit::WebProcessProxy::addVisitedLinkProvider): (WebKit::WebProcessProxy::addWebUserContentControllerProxy): (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): (WebKit::WebProcessProxy::didDestroyWebUserContentControllerProxy): * UIProcess/WebProcessProxy.h: 2014-08-29 Alexey Proskuryakov WebPageProxy::close() is a no-op for terminated processes https://bugs.webkit.org/show_bug.cgi?id=136378 Related to and to Reviewed by Brady Eidson. Also fixes issues that got uncovered after making close() work. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't close the page, because it makes no sense, and causes an assertion now. Previosly, this was OK because the page was invalid already, and close() was a no-op. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation issues earlier. (WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's process always has a message receiver for it, until close() removes it. (WebKit::WebPageProxy::close): Make this function work for all open pages, whether they have a page or not. (WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process agrees about its state. (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver, we now only do this in reattach or close. 2014-08-29 Antti Koivisto Remove NetworkResourceLoaderClient and subclasses. https://bugs.webkit.org/show_bug.cgi?id=136370 Reviewed by Darin Adler. This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader. * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed. * NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed. * NetworkProcess/NetworkLoaderClient.h: Removed. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::isSynchronous): (WebKit::NetworkResourceLoader::didReceiveResponseAsync): (WebKit::NetworkResourceLoader::didReceiveBuffer): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::willSendRequestAsync): (WebKit::NetworkResourceLoader::didSendData): (WebKit::NetworkResourceLoader::sendBuffer): (WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData): * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed. * NetworkProcess/SynchronousNetworkLoaderClient.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2014-08-29 Csaba Osztrogonác Unreviwed, remove empty directories. * PluginProcess/qt: Removed. * Shared/API/c/qt: Removed. * Shared/Downloads/qt: Removed. * Shared/FileAPI: Removed. * Shared/qt: Removed. * UIProcess/API/C/qt: Removed. * UIProcess/API/cpp/qt: Removed. * UIProcess/API/qt: Removed. * UIProcess/API/qt/raw: Removed. * UIProcess/API/qt/tests: Removed. * UIProcess/API/qt/tests/html: Removed. * UIProcess/API/qt/tests/html/resources: Removed. * UIProcess/API/qt/tests/inspectorserver: Removed. * UIProcess/API/qt/tests/publicapi: Removed. * UIProcess/API/qt/tests/qmltests: Removed. * UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed. * UIProcess/API/qt/tests/qmltests/WebView: Removed. * UIProcess/API/qt/tests/qmltests/common: Removed. * UIProcess/API/qt/tests/qquickwebview: Removed. * UIProcess/API/qt/tests/qrawwebview: Removed. * UIProcess/InspectorServer/qt: Removed. * UIProcess/Launcher/qt: Removed. * UIProcess/Plugins/qt: Removed. * UIProcess/SharedWorkers: Removed. * UIProcess/qt: Removed. * WebProcess/Cookies/qt: Removed. * WebProcess/Downloads: Removed. * WebProcess/IndexedDB: Removed. * WebProcess/InjectedBundle/qt: Removed. * WebProcess/NetworkInfo: Removed. * WebProcess/Plugins/Netscape/qt: Removed. * WebProcess/WebCoreSupport/qt: Removed. * WebProcess/WebPage/qt: Removed. * WebProcess/qt: Removed. * qt: Removed. 2014-08-28 Tim Horton _setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move https://bugs.webkit.org/show_bug.cgi?id=136354 Reviewed by Simon Fraser. * UIProcess/API/Cocoa/WKViewPrivate.h: Update the comment to note the new behavior. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::beginSwipeGesture): Don't call the block until the snapshot is actually moving (if the snapshot never moves because it's behind the live view, don't call the block at all). 2014-08-28 Tim Horton Occasional thread-safety-related crashes on the ServicesController queue https://bugs.webkit.org/show_bug.cgi?id=136356 Reviewed by Dan Bernstein. * UIProcess/mac/ServicesController.mm: (WebKit::hasCompatibleServicesForItems): Added. Check directly with NSSharingService if we have any services for the given items. We should eventually check Viewer and Editor services separately so the Web process can be smarter about when it shows the overlay, but for now this maintains the existing behavior. (WebKit::ServicesController::refreshExistingServices): Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus. 2014-08-28 Tim Horton WebKit2 doesn't support viewer services that accept image attachments https://bugs.webkit.org/show_bug.cgi?id=136349 Reviewed by Brady Eidson. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): Encode the already-existing parameter. 2014-08-28 Zalan Bujtas Subpixel layout: Remove unused pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136341 Reviewed by Simon Fraser. Let's not encourage integral snapping by having these functions around. No change in functionality. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): 2014-08-27 Enrica Casucci textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline. https://bugs.webkit.org/show_bug.cgi?id=136323 rdar://problem/18141964 Reviewed by Antti Koivisto. For underline style we need to check typingStyle first and use that information to populate the dictionary. If there is no typing style we can use the render style. We also need to update the editor state for the toggle commands to reflect the state in the UIProcess even for commands that don't change the selection. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::executeEditCommandWithCallback): 2014-08-28 Carlos Garcia Campos [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=136248 Reviewed by Gustavo Noronha Silva. Add webkit_uri_response_get_http_headers() that returns the HTTP headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers(). * UIProcess/API/gtk/WebKitURIResponse.cpp: (webkitURIResponseGetProperty): Add http-headers property getter. (webkit_uri_response_class_init): Add http-headers property. (webkit_uri_response_get_http_headers): Return the HTTP headers as a SoupMessageHeaders* or NULL for non HTTP responses. * UIProcess/API/gtk/WebKitURIResponse.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. 2014-08-27 Zalan Bujtas Subpixel layout: Rename LayoutRect's device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136319 Reviewed by Simon Fraser. From pixelSnappedForPainting() to snapRectToDevicePixels() and pixelSnappedIntRect*() to snappedIntRect*(). No change in functionality. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::renderedImage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotNode): * WebProcess/WebPage/mac/ServicesOverlayController.mm: (WebKit::ServicesOverlayController::buildSelectionHighlight): 2014-08-27 Zalan Bujtas Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions. https://bugs.webkit.org/show_bug.cgi?id=136314 Reviewed by Simon Fraser. From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil) EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting, but currently untestable. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateTapHighlight]): 2014-08-27 Tim Horton WebKit2 swipe gesture should report the position of the snapshot to the client https://bugs.webkit.org/show_bug.cgi?id=136308 rdar://problem/18105827 Reviewed by Simon Fraser. * UIProcess/API/Cocoa/WKViewPrivate.h: * UIProcess/API/mac/WKView.mm: (-[WKView _setDidMoveSwipeSnapshotCallback:]): Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController. Callers provide a block which is called whenever ViewGestureController moves the swipe *snapshot* layer around. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/mac/PageClientImpl.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates): Expose a Mac-only way to get the bounds of a given CALayer in window coordinates, respecting transforms. This only works for layer-backed windows because it uses CA in order to do the mapping respecting transforms. * UIProcess/mac/ViewGestureController.h: * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::ViewGestureController): (WebKit::ViewGestureController::~ViewGestureController): (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback): Do the Block_copy and Block_release dance to keep our copy of the callback block. (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::handleSwipeGesture): (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer): When the swipe snapshot layer moves around, call the block. 2014-08-27 Tim Horton Occasional crashes in commitTransientZoom's transaction completion block https://bugs.webkit.org/show_bug.cgi?id=136309 Reviewed by Dan Bernstein. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom): Hold a reference to zoomLayer and the WebPage. It's possible that either of these things could have gone away by the time the transaction is committed. 2014-08-27 Benjamin Poulain [iOS WK2] Provide a delegate callback to skip Geolocation authorization per page for WebApp https://bugs.webkit.org/show_bug.cgi?id=136243 Reviewed by Sam Weinig. Just ask the UI if the authorization dialog needs to be skipped. * UIProcess/API/Cocoa/WKUIDelegate.h: * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest): * UIProcess/ios/WKContentView.h: * UIProcess/ios/WKContentView.mm: (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Deleted. The code in WKContentView only exists due to legacy. Instead, the PageClient dispatch the request to the GeolocationProvider directly. * UIProcess/ios/WKGeolocationProviderIOS.h: * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKGeolocationProviderIOS positionChanged:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]): Deleted. 2014-08-27 Beth Dakin overflow:scroll elements should not latch to the body if the body is overflow:hidden https://bugs.webkit.org/show_bug.cgi?id=136273 Reviewed by Darin Adler. New ScrollabeArea virtual function. * WebProcess/Plugins/PDF/PDFPlugin.h: 2014-08-26 Matt Lilek Add WebKit SPI to control the navigator.standalone property https://bugs.webkit.org/show_bug.cgi?id=136189 Reviewed by Andy Estes. Add a property to WKPreferences that allows toggling this setting. * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _isStandalone]): (-[WKPreferences _setStandalone:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: 2014-08-26 Joseph Pecoraro FileReader cannot read files selected with in iOS 8 https://bugs.webkit.org/show_bug.cgi?id=136117 Reviewed by Alexey Proskuryakov. * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Correct an overzealous deny that was accidentally denying all com.apple.app-sandbox.read extensions instead of just the ones in Application bundles it was trying to deny. 2014-08-26 Tim Horton Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession https://bugs.webkit.org/show_bug.cgi?id=136271 Reviewed by Simon Fraser. It was possible to get into trackSwipeGesture while another swipe was still occurring, because the guard against this happening depended on m_pendingSwipeReason never being set while a swipe was occurring. However, if the very first scroll event had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude, and then *never clear it*, leading to a path around the guard against multiple live swipes. This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::handleScrollWheelEvent): Don't unset m_pendingSwipeReason before calling trackSwipeGesture; trackSwipeGesture will do it itself. Don't set m_pendingSwipeReason to InsufficientMagnitude if the event actually *has* sufficient magnitude to start a swipe. (WebKit::ViewGestureController::trackSwipeGesture): Assert that we don't have an active gesture while starting a swipe. Reset m_pendingSwipeReason, because the swipe is no longer pending! 2014-08-26 Andy Estes [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR https://bugs.webkit.org/show_bug.cgi?id=136267 Reviewed by Dan Bernstein. INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix. Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in engineering configurations. Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is used instead. * WebKit2.xcodeproj/project.pbxproj: 2014-08-25 Maciej Stachowiak Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API https://bugs.webkit.org/show_bug.cgi?id=136082 Reviewed by Alexey Proskuryakov. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Remove accidental leftover retrieval of the localization. (WebKit::createProcess): Get current localization name from CFBundle API instead of using SPI. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName * mac/WebKit2.order: ditto 2014-08-26 Dana Burkart The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures. https://bugs.webkit.org/show_bug.cgi?id=136262 Reviewed by David Kilzer. * WebProcess/WebPage/mac/ServicesOverlayController.mm: (WebKit::ServicesOverlayController::selectionRectsDidChange): (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged): 2014-08-26 Csaba Osztrogonác [EFL] URTBF after r172966. * UIProcess/efl/WebViewEfl.h: 2014-08-26 Carlos Alberto Lopez Perez REGRESSION(r172966) [GTK] Build broken. Unreviewed build fix after r172966. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): * UIProcess/API/gtk/PageClientImpl.h: 2014-08-26 Simon Fraser Crashes in hit testing under WebPage::determinePrimarySnapshottedPlugIn() https://bugs.webkit.org/show_bug.cgi?id=136240 rdar://problem/17231462 Reviewed by Darin Adler. determinePrimarySnapshottedPlugIn() does render tree hit testing, so needs to ensure that layout is up-to-date. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 2014-08-26 Tim Horton REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it https://bugs.webkit.org/show_bug.cgi?id=136260 Reviewed by Dan Bernstein. Previously, when a swipe ended up performing a same-document navigation, we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never remove the swipe snapshot. Previous implementations removed the snapshot on didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop, so we will match that behavior. Also, reinstate the watchdog that starts at swipe-end which would have prevented this bug from forever breaking the view it was associated with. Also, defend against removing the snapshot before the swipe has finished (before we have even caused the navigation that we're watching for the effects of). * UIProcess/API/mac/WKView.mm: (-[WKView _didSameDocumentNavigationForMainFrame:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): * UIProcess/mac/PageClientImpl.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): Plumb main-frame same-document navigation notification from WebPageProxy to ViewGestureControllerMac via PageClient and WKView. * UIProcess/mac/ViewGestureController.h: * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::ViewGestureController): (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::endSwipeGesture): Keep track of whether a swipe is currently occurring. We can't use activeGestureType for this because the swipe currently remains the "active" gesture until the snapshot is removed. Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts when we get a visually non-empty layout) so that we will always remove the snapshot after 5 seconds, even if we haven't committed the load. This could lead to flashing back to the old content if we fail to get a single byte for 5 seconds, but that is a rare case and should eventually get additional special treatment (dropping the tiles until we do get content, or some such). (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): If a swipe is still in progress, we haven't done our navigation and thus don't care about render tree size changes. (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): If a swipe is still in progress, we haven't done our navigation and thus don't care about layouts. Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout watchdog. This means that the snapshot could stay up for a maximum of 8 seconds for a very, very slow load. (WebKit::ViewGestureController::didFinishLoadForMainFrame): If a swipe is still in progress, we haven't done our navigation and thus don't care about loads that complete. (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Remove the swipe snapshot after painting if we do replaceState or popState. (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): If a swipe is still in progress, we shouldn't remove the snapshot yet. 2014-08-26 Carlos Garcia Campos [GTK] Translations are not initialized in the UI process https://bugs.webkit.org/show_bug.cgi?id=136249 Reviewed by Philippe Normand. This is breaking things like webkitContextMenuActionGetForContextMenuItem() for non English locales in the cases where we use the action title to guess the action, because the action title we get from the web process is translated while the one in the UI process is in English. * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext): Initialize gettext right before creating the default web context. 2014-08-26 Ryuan Choi [EFL] Remove dead code in WebPageEfl.cpp https://bugs.webkit.org/show_bug.cgi?id=136246 Reviewed by Gyuyoung Kim. * WebProcess/WebPage/efl/WebPageEfl.cpp: (WebKit::scroll): Deleted. 2014-08-26 Ryuan Choi [EFL] Build break using clang https://bugs.webkit.org/show_bug.cgi?id=136245 Reviewed by Gyuyoung Kim. * PlatformEfl.cmake: defines GTEST_HAS_RTTI=0 2014-08-25 Zalan Bujtas Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions. https://bugs.webkit.org/show_bug.cgi?id=136236 Reviewed by Simon Fraser. These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all. Non change in functionality. * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::computeCustomFixedPositionRect): 2014-08-25 Antti Koivisto Don't pass priority as parameter to ResourceLoadScheduler https://bugs.webkit.org/show_bug.cgi?id=136232 Reviewed by Sam Weinig. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::priority): Deleted. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): (WebKit::WebResourceLoadScheduler::scheduleLoad): * WebProcess/Network/WebResourceLoadScheduler.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): 2014-08-25 Brady Eidson Don't crash when the DataDetectors framework is unavailable. and https://bugs.webkit.org/show_bug.cgi?id=136234 Reviewed by Tim Horton. * WebProcess/WebPage/mac/ServicesOverlayController.mm: (WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link. (WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto. 2014-08-25 Antti Koivisto Remove load scheduling code from network process https://bugs.webkit.org/show_bug.cgi?id=136199 Reviewed by Darin Adler. Most platforms just flush resource loads directly to the networking layer by making the parallel load count large. Also we always pass ResourceLoadPriorityHighest to the scheduler so no actual scheduling happens. This is effectively dead code. Keep basic support for serializing loads. This is only used for testing. * NetworkProcess/HostRecord.cpp: Removed. * NetworkProcess/HostRecord.h: Removed. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::servePendingRequests): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::getNetworkProcessStatistics): * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler): (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::removeLoader): (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): (WebKit::NetworkResourceLoadScheduler::loadsActiveCount): (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted. (WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted. (WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted. (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted. (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted. (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted. (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted. (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted. (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted. * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::continueWillSendRequest): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::isLoadingMainResource): (WebKit::NetworkResourceLoader::setHostRecord): Deleted. (WebKit::NetworkResourceLoader::hostRecord): Deleted. * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings): (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted. * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings): (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted. * WebKit2.xcodeproj/project.pbxproj: 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-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 Zan Dobersek Improve virtual method declarations in LayerTreeHostGtk https://bugs.webkit.org/show_bug.cgi?id=136210 Reviewed by Carlos Garcia Campos. Mark the LayerTreeHostGtk class as final in the virtual inheritance hierarchy. Order the public and private virtual method overrides from the LayerTreeHost and GraphicsLayerClient interfaces. Explicitly mark them as overriding the base class methods. Remove the overriding notifyAnimationStarted() and notifyFlushRequired() methods since they are identical to the methods in the base class. De-virtualize flushPendingLayerChanges(). It's not inherited and is not overriden by anything (and nothing can inherit from LayerTreeHostGtk from now on due to the final specifier). * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::notifyAnimationStarted): Deleted. (WebKit::LayerTreeHostGtk::notifyFlushRequired): Deleted. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (WebKit::LayerTreeHostGtk::didCommitChangesForLayer): Deleted. 2014-08-24 Brian J. Burg Remove unused method declarations replaced by WebPage::setViewState https://bugs.webkit.org/show_bug.cgi?id=136180 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.h: Remove setFocused, setActive, setViewIsVisible. No longer used. 2014-08-23 Byungseon Shin Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas https://bugs.webkit.org/show_bug.cgi?id=109658 Reviewed by Martin Robinson. Based on patch originally written by Tim Horton. Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): Rename canvas -> platformLayer. 2014-08-22 Commit Queue Unreviewed, rolling out r172866. https://bugs.webkit.org/show_bug.cgi?id=136177 Broke iOS build (Requested by othermaciej on #webkit). Reverted changeset: "Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API" https://bugs.webkit.org/show_bug.cgi?id=136082 http://trac.webkit.org/changeset/172866 2014-08-19 Maciej Stachowiak Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API https://bugs.webkit.org/show_bug.cgi?id=136082 Reviewed by Alexey Proskuryakov. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Remove accidental leftover retrieval of the localization. (WebKit::createProcess): Get current localization name from CFBundle API instead of using SPI. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName * mac/WebKit2.order: ditto 2014-08-22 Daniel Bates [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS and ENABLE_XSLT when building with the iOS public SDK https://bugs.webkit.org/show_bug.cgi?id=135945 Reviewed by Andy Estes. * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS and ENABLE_XSLT when building with the public SDK. * Shared/WebEventConversion.h: Write preprocessor logic in terms of ENABLE(IOS_TOUCH_EVENTS). * WebProcess/WebPage/WebPage.h: Ditto. 2014-08-22 Simon Fraser Implement paint flashing via GraphicsLayers in the WK2 inspector overlay https://bugs.webkit.org/show_bug.cgi?id=136136 Reviewed by Sam Weinig, Joseph Pecoraro. Allow InspectorClient to have a custom implementation of showPaintRect(). For WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers which are parented in a document overlay, with 0.25s fade-out animations. Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext; it makes no sense to paint the paint rects directly into the context of the web page. Now that the paint rects are painted into an overlay, the rectangles need to be converted to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl(). Remove the generic InspectorOverlay::drawOutline()-based indicators; they will be reimplemented in a later patch. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::RepaintIndicatorLayerClient::RepaintIndicatorLayerClient): (WebKit::RepaintIndicatorLayerClient::~RepaintIndicatorLayerClient): (WebKit::RepaintIndicatorLayerClient::notifyAnimationEnded): (WebKit::WebInspectorClient::WebInspectorClient): (WebKit::WebInspectorClient::~WebInspectorClient): (WebKit::WebInspectorClient::showPaintRect): (WebKit::WebInspectorClient::animationEndedForLayer): * WebProcess/WebCoreSupport/WebInspectorClient.h: (WebKit::WebInspectorClient::WebInspectorClient): Deleted. 2014-08-22 Jon Lee Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h https://bugs.webkit.org/show_bug.cgi?id=136157 Reviewed by Simon Fraser. * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING). 2014-08-21 Joseph Pecoraro Possible RetainPtr misuse in WKScriptMessage.mm - could leak https://bugs.webkit.org/show_bug.cgi?id=136140 Reviewed by Darin Adler. Adopt a copy into a RetainPtr to avoid leaking. * UIProcess/API/Cocoa/WKScriptMessage.mm: (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]): 2014-08-21 Simon Fraser Add animationDidEnd callbacks on GraphicsLayer https://bugs.webkit.org/show_bug.cgi?id=136084 Reviewed by Tim Horton. Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly can add animations, and know when they finish. * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd): * UIProcess/mac/RemoteLayerTreeHost.h: * UIProcess/mac/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::animationDidEnd): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::acceleratedAnimationDidEnd): * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: (-[WKAnimationDelegate animationDidStop:finished:]): * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::animationStarted): (WebKit::PlatformCALayerRemote::animationEnded): * WebProcess/WebPage/mac/PlatformCALayerRemote.h: * WebProcess/WebPage/mac/RemoteLayerTreeContext.h: * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed): (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer): (WebKit::RemoteLayerTreeContext::animationDidStart): (WebKit::RemoteLayerTreeContext::animationDidEnd): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidEnd): 2014-08-21 Zalan Bujtas Enable SATURATED_LAYOUT_ARITHMETIC. https://bugs.webkit.org/show_bug.cgi?id=136106 Reviewed by Simon Fraser. SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow. (No measurable performance regression on Mac.) * Configurations/FeatureDefines.xcconfig: 2014-08-21 Víctor Manuel Jáquez Leal [GTK] WebkitWebProcess crashing navigating away from ogg video element https://bugs.webkit.org/show_bug.cgi?id=135348 Reviewed by Philippe Normand. When a page is cached, by default doesn't recreate the backing store (an optimization added in r89316). Not all the ports uses that optimization. For example IOS port doesn't use it (r161185). In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only processes video buffers, also display them, because it is a TextureMapperPlatformLayer too. Nevertheless, in r153937, when a page is cached, the player is destroyed. But our player has a backing store and the render tree doesn't know that the player has gone. Hence, when the page is redraw, the TextureMapper tree visits the video element, which doesn't exist anymore, a segmentation fault occurs. So, as our media player renders, and as we cannot trust that the player exists when a page is painted, we cannot rely in the r89316 optimization. Disabling the backing stores optimization fixes the problem. Covered by existing tests. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformSetCacheModel): Enable the backing store clearing when page caching for GTK. 2014-08-20 Alex Christensen Introducing WEBCORE_EXPORT macro. https://bugs.webkit.org/show_bug.cgi?id=136108 Reviewed by Antti Koivisto. * config.h: Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers. 2014-08-20 Pratik Solanki Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well https://bugs.webkit.org/show_bug.cgi?id=135896 Reviewed by Andreas Kling. * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now. (WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor): * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation): (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor): (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Override virtual method and send the data to the WebContent process as before. 2014-08-19 Pratik Solanki Remove PurgeableBuffer since it is not very useful any more https://bugs.webkit.org/show_bug.cgi?id=135939 Reviewed by Andreas Kling. * WebProcess/WebProcess.cpp: (WebKit::getWebCoreMemoryCacheStatistics): 2014-08-19 Peyton Randolph Expose injected bundle SPI to get a node's URL element, get the visible selection range of that element, and snapshot that range https://bugs.webkit.org/show_bug.cgi?id=136076 Reviewed by Tim Horton. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultCopyURLElementHandle): Added. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: (WKBundleNodeHandleCopyVisibleRange): Added. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp: (WKBundleRangeHandleGetBoundingRectInWindowCoordinates): Added. (WKBundleRangeHandleCopySnapshotWithOptions): Added. * WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::visibleRange): Added. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates): Added. (WebKit::InjectedBundleRangeHandle::renderedImage): Added. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::urlElementHandle): Added. * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2014-08-19 Zalan Bujtas Remove ENABLE(SUBPIXEL_LAYOUT). https://bugs.webkit.org/show_bug.cgi?id=136077 Reviewed by Simon Fraser. Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now. * Configurations/FeatureDefines.xcconfig: 2014-08-19 Peyton Randolph Extend injected bundle node snapshotting to support forced white and black text https://bugs.webkit.org/show_bug.cgi?id=136061 Reviewed by Beth Dakin. * Shared/API/c/WKImage.h: Add -ForceBlackText and -ForceWhiteText snapshotting options. * Shared/API/c/WKSharedAPICast.h: (WebKit::toSnapshotOptions): Support aforementioned text snapshotting options. * Shared/ImageOptions.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::imageForRect): Respect text color snapshotting options by setting appropriate paint behaviors. 2014-08-18 Maciej Stachowiak Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it https://bugs.webkit.org/show_bug.cgi?id=136035 Reviewed by Dan Bernstein. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Don't initialize the no-longer-used WKGetExtensionsForMIMEType, WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension * mac/WebKit2.order: Remove exports related to above. 2014-08-18 Commit Queue Unreviewed, rolling out r172736. https://bugs.webkit.org/show_bug.cgi?id=136060 Caused 14% PLT regressions (Requested by rniwa on #webkit). Reverted changeset: "Remove PurgeableBuffer since it is not very useful any more" https://bugs.webkit.org/show_bug.cgi?id=135939 http://trac.webkit.org/changeset/172736 2014-08-18 Simon Fraser Provide default implementations of all GraphicsLayerClient methods https://bugs.webkit.org/show_bug.cgi?id=136054 Reviewed by Tim Horton. Remove overrides which are no longer required. * WebProcess/WebPage/PageOverlayController.h: * WebProcess/WebPage/ServicesOverlayController.h: * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: 2014-08-18 Pratik Solanki Remove PurgeableBuffer since it is not very useful any more https://bugs.webkit.org/show_bug.cgi?id=135939 Reviewed by Geoffrey Garen. * WebProcess/WebProcess.cpp: (WebKit::getWebCoreMemoryCacheStatistics): 2014-08-18 Peyton Randolph Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture https://bugs.webkit.org/show_bug.cgi?id=136048 Reviewed by Dan Bernstein. This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass information to the UI process via a userData out parameter. * UIProcess/API/APIUIClient.h: (API::UIClient::didBeginTrackingPotentialLongMousePress): Added. (API::UIClient::didRecognizeLongMousePress): Added. (API::UIClient::didCancelTrackingPotentialLongMousePress): Added. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Added. (WebKit::WebPageProxy::didRecognizeLongMousePress): Added. (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Added. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Added. (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Added. (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Added. * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added. (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Added. (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Added. (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Added. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Added. (WebKit::WebChromeClient::didRecognizeLongMousePress): Added. (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Added. * WebProcess/WebCoreSupport/WebChromeClient.h: 2014-08-18 Przemyslaw Kuczynski Fix unintentional integer overflow before widen https://bugs.webkit.org/show_bug.cgi?id=135463 Reviewed by Oliver Hunt. Overflowing expression is evaluated using operands arithmetic but then is used in context which expects an wider integer type. To avoid overflow at least one operand has to be representative of the wider type. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::getMemorySize): Added long long literal. 2014-08-18 Przemyslaw Kuczynski Fix resource leak in unclosed file descriptor handles https://bugs.webkit.org/show_bug.cgi?id=135458 Reviewed by Oliver Hunt. Leaving descriptor unclosed will cause the resources associated with the open file description never be freed (they are freed on closing the last descriptor refering to the underlying file). * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor. (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor. 2014-08-18 Grzegorz Czajkowski [EFL] ewk_init() is sufficient to initialize EFL components https://bugs.webkit.org/show_bug.cgi?id=136036 Reviewed by Gyuyoung Kim. Developers do not have to initialize EFL components as ewk_init() already does it. * UIProcess/API/efl/ewk_intro.h: 2014-08-16 Pratik Solanki Rename DiskCacheMonitor to NetworkDiskCacheMonitor https://bugs.webkit.org/show_bug.cgi?id=135897 Reviewed by Andreas Kling. In preparation for moving DiskCacheMonitor code to WebCore in bug 135896, rename the WebKit2 class to NetworkDiskCacheMonitor. * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h. (WebKit::NetworkDiskCacheMonitor::resourceRequest): * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm. (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation): (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor): (WebKit::NetworkDiskCacheMonitor::messageSenderConnection): (WebKit::NetworkDiskCacheMonitor::messageSenderDestinationID): * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (WebKit::NetworkResourceLoader::willCacheResponseAsync): * WebKit2.xcodeproj/project.pbxproj: 2014-08-16 Byungseon Shin [GTK] build fails with error: cannot allocate an object of abstract type 'WebKit::PageClientImpl' https://bugs.webkit.org/show_bug.cgi?id=136017 Reviewed by Gyuyoung Kim. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame): (WebKit::PageClientImpl::didFinishLoadForMainFrame): * UIProcess/API/gtk/PageClientImpl.h: 2014-08-15 Ryuan Choi [EFL] Add ewk_intro.h to describe main page of doxygen https://bugs.webkit.org/show_bug.cgi?id=136013 Reviewed by Gyuyoung Kim. * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h.in: * UIProcess/API/efl/ewk_intro.h: Added. 2014-08-15 Zalan Bujtas Do not use FloatRect::infiniteRect() to flag full repaints. https://bugs.webkit.org/show_bug.cgi?id=135900 Reviewed by Simon Fraser. Converting FloatRect::infiniteRect() to IntRect leads to value overflow and we end up with invalid repaint rectangle. Use a boolean flag to indicate full repaint request. Covered by existing tests. * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::setNeedsDisplayInRect): (WebKit::PlatformCALayerRemote::setNeedsDisplay): * WebProcess/WebPage/mac/PlatformCALayerRemote.h: * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h: * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect): (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay): * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp: (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect): (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay): * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h: 2014-08-15 Alexey Proskuryakov REGRESSION (r172660): WebKit2.TerminateTwice asserts https://bugs.webkit.org/show_bug.cgi?id=136012 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess): Added bug number to a fixme. 2014-08-15 Ryuan Choi Unreviewed build fix on the EFL port since r172635 * UIProcess/WebPageProxy.cpp: Guard removeNavigationGestureSnapshot with PLATFORM(MAC) macro. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/efl/WebViewEfl.h: Added didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame as dummy. 2014-08-15 Alexey Proskuryakov Improve page to process relationship tracking https://bugs.webkit.org/show_bug.cgi?id=135996 Reviewed by Sam Weinig. * UIProcess/VisitedLinkProvider.cpp: (WebKit::VisitedLinkProvider::removeAll): (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): (WebKit::VisitedLinkProvider::sendTable): Added assertions for m_processes only having valid entries. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process, tell the old process that the page is not longer associated with it, avoiding a potential stale pointer. If re-attached to an existing process, make sure that we perform all the same registrations as after having launched a new process. This substantially improves the behavior when the number of open tabs is over process limit. (WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid()) to avoid confusion. All other calls to reattachToWebProcess() have this as a runtime check, but reattachToWebProcessWithItem() is only called for valid pages. (WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for something that will need to be fixed another day. * UIProcess/WebPageProxy.h: Removed an unimplemented function. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity. (WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated already. This avoids an assertion failure that happened under the new call to removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated processes that are not in WebContext::m_processes any more. (WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees about using this process. 2014-08-15 Gavin Barraclough Fix plugin visibility check. https://bugs.webkit.org/show_bug.cgi?id=135991 D'oh, more unreviewed typo fix. :-( * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::visibilityDidChange): (WebKit::PluginControllerProxy::windowVisibilityChanged): (WebKit::PluginControllerProxy::updateVisibilityActivity): (WebKit::PluginControllerProxy::updateVisiblityActivity): Deleted. * PluginProcess/PluginControllerProxy.h: 2014-08-15 Wenson Hsieh Implement snapping behavior for iOS https://bugs.webkit.org/show_bug.cgi?id=135769 Reviewed by Brent Fulgham. Added support for snap points on iOS. * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: (ArgumentCoder::encode): Added snap offset encoding. (ArgumentCoder::decode): Added snap offset decoding. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For mainframe scrolling, retargets the scroll destination to the appropriate snap point. * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added methods to extract relevant information for WKWebView from snap offsets in mainframe scrolling. * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For overflow scrolling, retargets the scroll destination to the appropriate snap point. (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Sets the deceleration factor to FAST if snap points are active. * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Used by WKWebView for mainframe scrolling to retarget the scroll destination, if necessary. (WebKit::RemoteScrollingCoordinatorProxy::shouldSetScrollViewDecelerationRateFast): Used by WKWebView for mainframe scrolling to determine whether to set deceleration rate to the fast value. (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Helper method. (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Helper method. 2014-08-15 Gavin Barraclough Fix plugin visibility check. https://bugs.webkit.org/show_bug.cgi?id=135991 Unreviewed typo fix. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): (WebKit::PluginControllerProxy::visibilityDidChange): (WebKit::PluginControllerProxy::windowVisibilityChanged): (WebKit::PluginControllerProxy::updateVisibilityActivity): * PluginProcess/PluginControllerProxy.h: 2014-08-15 Gavin Barraclough Fix plugin visibility check. https://bugs.webkit.org/show_bug.cgi?id=135991 Reviewed by Andreas Kling. We should only take a UserActivity if the plugin is in a visible window, and also is itself visible. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): - initialize member state. (WebKit::PluginControllerProxy::visibilityDidChange): (WebKit::PluginControllerProxy::windowVisibilityChanged): - update member state & call updateVisibilityActivity. (WebKit::PluginControllerProxy::updateVisibilityActivity): - enable the UserActivity only if both visibilities are true. * PluginProcess/PluginControllerProxy.h: - added m_isVisible, m_isWindowVisible, updateVisibilityActivity. 2014-08-15 Enrica Casucci [Services with UI] Selections are incorrect when selecting three lines. https://bugs.webkit.org/show_bug.cgi?id=135989 Reviewed by Tim Horton. The stitching algorithm did not handle correctly the case of selections over three lines if the middle line is composed of only one rectangle. * WebProcess/WebPage/mac/ServicesOverlayController.mm: (WebKit::stitchRects): 2014-08-15 Tim Horton Service overlays stay fixed when