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