2014-10-07 Chris Dumez Unreviewed iOS build fix after r174400. Missing explicit WebKit:: namespace. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _didCommitLoadForMainFrame]): (-[WKWebView _restorePageStateToExposedRect:scale:]): (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]): 2014-10-07 Christophe Dumez Use is<>() / downcast<>() for RenderText / RenderTextFragment https://bugs.webkit.org/show_bug.cgi?id=137476 Reviewed by Darin Adler. Use is<>() / downcast<>() for RenderText / RenderTextFragment. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): 2014-10-07 Christophe Dumez [WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses https://bugs.webkit.org/show_bug.cgi?id=137477 Reviewed by Andreas Kling. Use is<>() / downcast<>() for DrawingAreaProxy subclasses. * Shared/cf/KeyedDecoder.cpp: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _didCommitLoadForMainFrame]): (-[WKWebView _restorePageStateToExposedRect:scale:]): (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/DrawingAreaProxy.h: * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: (WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateVisibleContentRects): (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget): * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): * UIProcess/mac/LegacySessionStateCoding.cpp: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: 2014-10-06 Vivek Galatage Remove unused warning in WebPageOverlay https://bugs.webkit.org/show_bug.cgi?id=137444 Reviewed by Darin Adler. Commenting the unused parameter to supress the warning. * WebProcess/WebPage/WebPageOverlay.h: (WebKit::WebPageOverlay::Client::copyAccessibilityAttributeStringValueForPoint): (WebKit::WebPageOverlay::Client::copyAccessibilityAttributeBoolValueForPoint): 2014-10-06 Ada Chan Call WKPageUIClient::isPlayingAudioDidChange() whenever audio starts/stops playing on a page. https://bugs.webkit.org/show_bug.cgi?id=137050 Reviewed by Anders Carlsson. Implement WebChromeClient::isPlayingAudioDidChange() which sends the new isPlayingAudio state over to the UI process. WebPageProxy caches the isPlayingAudio state, and when that changes, it calls WKPageUIClient::isPlayingAudioDidChange(). * UIProcess/API/APIUIClient.h: (API::UIClient::isPlayingAudioDidChange): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::isPlayingAudioDidChange): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::isPlayingAudio): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::isPlayingAudioDidChange): * WebProcess/WebCoreSupport/WebChromeClient.h: 2014-10-06 Gyuyoung Kim [EFL] Restore previous scroll position using restoreViewState() https://bugs.webkit.org/show_bug.cgi?id=136999 Reviewed by Benjamin Poulain. There are duplicating code paths to restore previous scroll position and scale factor in HistoryController::restoreScrollPositionAndViewState. EFL port has processed the two code paths. It causes wrong rendering update or scroll position change when previous page's scroll position is restored. Thus EFL port begins to use restoreViewState() to restore scroll position and scale factor. This patch is first step to support it. Additionally EFL port has supported to use ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate() since r173785. So EFL port can use the requestScrollPositionUpdate() to restore scroll position on previous page instead of delegatedScrollRequested(). However setScrollPosition() can't be used there for now, because iOS port should call it when delegatesScrolling is disabled. On the other hand, EFL port supports it only when delegatesScrolling is enabled. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::saveViewStateToItem): Move iOS saveViewStateToItem() to common place in order to share iOS implementation with EFL port. (WebKit::WebFrameLoaderClient::restoreViewState): EFL begins to share restoreViewState() of iOS, thus move iOS restoreViewState() to common place. * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm: (WebKit::WebFrameLoaderClient::saveViewStateToItem): Deleted. (WebKit::WebFrameLoaderClient::restoreViewState): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/efl/WebPageEfl.cpp: (WebKit::WebPage::restorePageState): Call scalePage() to update previous scaleFactor and scrollPosition of historyItem both to WebProcess and UIProcess. (WebKit::WebPage::savePageState): 2014-10-06 Chris Dumez [Mac] We are spending too much time serializing ProtectionSpace objects https://bugs.webkit.org/show_bug.cgi?id=137367 Reviewed by Dan Bernstein. When profiling the load of nytimes.com, I noticed that we were spending a lot of CPU time serializing ProtectionSpace objects (in particular the NSURLProtectionSpace platform data): - 5.6% of CPU time for Network Process - 2.5% of CPU time for WebProcess Serializing an NSURLProtectionSpace seems to be costly due to server trust verification. We do this for every sub-resource load over HTTPS due to the canAuthenticateAgainstProtectionSpace() callback for server trust validation, from the NetworkProcess to the WebProcess and then to the UIProcess. This patch adds a WKContextSetCanHandleHTTPSServerTrustEvaluation(bool) WK2 private API that the client can call to indicate that it cannot handle HTTPS server trust evaluation and that it is thus unnecessary to call the canAuthenticateAgainstProtectionSpace() callback for such evaluations. This reduces the amount of IPC between the process and thus the number of times we have to serialize the ProtectionSpace. In the case of the nytimes.com load, there is no longer any ProtectionSpace serialization happening as canAuthenticateAgainstProtectionSpace() was only called for HTTPS server trust evaluation. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::setCanHandleHTTPSServerTrustEvaluation): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::canHandleHTTPSServerTrustEvaluation): * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: * UIProcess/API/C/WKContext.cpp: (WKContextSetCanHandleHTTPSServerTrustEvaluation): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _setCanHandleHTTPSServerTrustEvaluation:]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::ensureNetworkProcess): (WebKit::WebContext::setCanHandleHTTPSServerTrustEvaluation): * UIProcess/WebContext.h: 2014-10-06 Simon Fraser Don't attempt to paint into zero-sized backing store https://bugs.webkit.org/show_bug.cgi?id=137465 Reviewed by Tim Horton. Page scale could cause the backing store for a small composited element to become empty, in which case we'd try to allocate, and paint into a graphics context with no surface behind it. Fix by bailing from RemoteLayerBackingStore::display() when checking the backing store size after accounting for scale. * Shared/mac/RemoteLayerBackingStore.h: * Shared/mac/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::backingStoreSize): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): 2014-10-06 Christophe Dumez Use is<>() / downcast<>() for ScrollingTree subclasses https://bugs.webkit.org/show_bug.cgi?id=137449 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for ScrollingTree subclasses. * UIProcess/Scrolling/RemoteScrollingTree.h: * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::addScrollingTreeForPage): 2014-10-05 Christophe Dumez Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses https://bugs.webkit.org/show_bug.cgi?id=137440 Reviewed by Ryosuke Niwa. Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses. * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: (WebKit::encodeNodeAndDescendants): (WebKit::RemoteScrollingCoordinatorTransaction::decode): (WebKit::RemoteScrollingTreeTextStream::dump): * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): * WebProcess/Scrolling/RemoteScrollingCoordinator.h: * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::addScrollingTreeForPage): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::flushLayers): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2014-10-05 Ryuan Choi [EFL] Introduce EWebKit_Extension https://bugs.webkit.org/show_bug.cgi?id=134921 Reviewed by Gyuyoung Kim. EWebKit2 does not provide the functionality to extend WebProcess. Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs, application developers can not make bundle object without touching WK APIs which ewebkit2 does not expose. This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess. * PlatformEfl.cmake: Added files for the EWebKit_Extension and install them properly. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): (bundlePathForExtension): (EwkContext::create): (EwkContext::getInjectedBundleInitializationUserData): (EwkContext::setMessageFromInjectedBundleCallback): (ewk_context_new_with_extensions_path): Deleted because ewebkit2 does not have a way to make injected bundle. Instead, Ewk_Extension will cover the same functionalities. (ewk_context_new_with_injected_bundle_path): Deleted. * UIProcess/API/efl/ewk_context.h: * UIProcess/API/efl/ewk_context_private.h: (EwkContext::extensionsPath): * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp. * UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path. (TEST_F): * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added. * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added. (EwkExtension::append): (EwkExtension::remove): (ewk_extension_client_add): (ewk_extension_client_del): * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added. * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added. (EwkExtension::EwkExtension): (EwkExtension::~EwkExtension): * WebProcess/efl/ExtensionManagerEfl.cpp: Added. (WebKit::ExtensionManagerEfl::shared): (WebKit::ExtensionManagerEfl::ExtensionManagerEfl): (WebKit::ExtensionManagerEfl::initialize): * WebProcess/efl/ExtensionManagerEfl.h: Added. * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added. (WKBundleInitialize): * efl/ewebkit2-extension.pc.in: 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-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-10-03 Anders Carlsson Remove a workaround for a bug that's been fixed https://bugs.webkit.org/show_bug.cgi?id=137411 Reviewed by Dan Bernstein. * mac/rewrite-availability-macros.sh: 2014-10-03 Jer Noble Revert an accidental change introduced by r173318. Rubber-stamped by Tim Horton. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::suspendPainting): (WebKit::TiledCoreAnimationDrawingArea::resumePainting): 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-03 Andy Estes [iOS] Highlight clicked links in WKPDFView https://bugs.webkit.org/show_bug.cgi?id=137400 Reviewed by Tim Horton. Show a _UIHighlightView on top of clicked links for 200 ms before starting the navigation. This matches the behavior of UIWebPDFView. * UIProcess/ios/WKPDFView.mm: (-[WKPDFView _createHighlightViewWithFrame:]): Created a _UIHighlightView with a color and border radius matching the values used by UIWebPDFView. (-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Displayed the highlight, then removed it after the navigation began. 2014-10-03 Csaba Osztrogonác [GTK] URTBF after r174231. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkit_web_page_get_dom_document): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didInstallPageOverlay): Deleted. (WebKit::DrawingAreaImpl::didUninstallPageOverlay): Deleted. (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): Deleted. (WebKit::DrawingAreaImpl::setPageOverlayOpacity): Deleted. * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::createPageOverlayLayer): (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): (WebKit::LayerTreeHostGtk::didInstallPageOverlay): Deleted. (WebKit::LayerTreeHostGtk::didUninstallPageOverlay): Deleted. (WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay): Deleted. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: 2014-10-03 Gyuyoung Kim [EFL] Fix build break since r174231 and r174256 https://bugs.webkit.org/show_bug.cgi?id=137384 Unreviewed, EFL build fix. r174231 and r174256 didn't consider EFL port and CoordinatedGraphics area. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): * WebProcess/WebPage/TapHighlightController.cpp: (WebKit::TapHighlightController::highlight): (WebKit::TapHighlightController::hideHighlight): * WebProcess/WebPage/TapHighlightController.h: Add WebCore:: namespace prefix to PageOverlay argument type. 2014-10-02 Csaba Osztrogonác URTBF after r174231 to fix non Apple builds. * WebProcess/WebPage/WebPage.h: 2014-10-02 Andy Estes [iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView https://bugs.webkit.org/show_bug.cgi?id=137370 Reviewed by Tim Horton. * UIProcess/ios/WKContentViewInteraction.mm: Included instead of . 2014-10-02 Andy Estes Fix the iOS build. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::blurAssistedNode): (WebKit::WebPage::setAssistedNodeValue): (WebKit::WebPage::setAssistedNodeValueAsNumber): (WebKit::WebPage::setAssistedNodeSelectedIndex): 2014-10-02 Andy Estes [iOS] Teach WKPDFView to navigate to pageNumber links https://bugs.webkit.org/show_bug.cgi?id=137358 Reviewed by Tim Horton. Treat PDF pageNumber annotations as if they were fragment navigations in an HTML document. For a given page number N, create a fragment called "#pageN" and tell WebKit to navigate to it. By doing this we create history entries for each pageNumber navigation and allow for proper back/forward. When navigating to a page, reset to the initial scale factor and scroll to the beginning of the Nth page. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _zoomToPoint:atScale:animated:]): Added an animated parameter. If animated is NO, use a duration of 0. (-[WKWebView _zoomToRect:atScale:origin:animated:]): Added an animated parameter and passed it to _zoomToPoint:atScale:animated:. (-[WKWebView _zoomOutWithOrigin:animated:]): Ditto. (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]): Called _zoomToRect:atScale:origin:animated:, setting animated to YES. (-[WKWebView _didSameDocumentNavigationForMainFrame:]): Called web_didSameDocumentNavigation: on _customContentView. (-[WKWebView _zoomToPoint:atScale:]): Deleted. (-[WKWebView _zoomToRect:atScale:origin:]): Deleted. (-[WKWebView _zoomOutWithOrigin:]): Deleted. * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/Cocoa/WKWebViewContentProvider.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): Called _didSameDocumentNavigationForMainFrame on m_webView. * UIProcess/ios/WKContentView.mm: (-[WKContentView _zoomOutWithOrigin:]): Called _zoomOutWithOrigin:animated: on m_webView, setting animated to YES. * UIProcess/ios/WKPDFPageNumberIndicator.h: * UIProcess/ios/WKPDFPageNumberIndicator.mm: (-[WKPDFPageNumberIndicator hide]): Added a method to hide the page number indicator. * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): Added a FIXME for restoring scroll position and page scale when loading from the back/forward list. (-[WKPDFView scrollViewDidScroll:]): Stopped showing the page number indicator if a same-document navigation is occurring (to match UIWebPDFView). (-[WKPDFView _updatePageNumberIndicator]): Ditto. (-[WKPDFView web_didSameDocumentNavigation:]): (-[WKPDFView _resetZoomAnimated:]): For same-document navigations of type kWKSameDocumentNavigationSessionStatePop, extracted the page index from the URL fragment identifier, hid the page number indicator, reset the zoom (without an animation to match UIWebPDFView), and scrolled to the beginning of the given page. (-[WKPDFView resetZoom:]): Called _resetZoomAnimated:, setting animated to YES. (-[WKPDFView annotation:wasTouchedAtPoint:controller:]): If there is a non-zero pageNumber in the link annotation, construct a "#pageN" fragment and navigate to it. 2014-10-02 Tim Horton Move PageOverlay[Controller] to WebCore https://bugs.webkit.org/show_bug.cgi?id=137164 Reviewed by Anders Carlsson. * CMakeLists.txt: * WebKit2.xcodeproj/project.pbxproj: Make the appropriate build system changes. * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Make WKBundlePageOverlayRef map to WebPageOverlay instead of PageOverlay. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageInstallPageOverlay): (WKBundlePageUninstallPageOverlay): (WKBundlePageInstallPageOverlayWithAnimation): (WKBundlePageUninstallPageOverlayWithAnimation): Forward PageOverlay installation/uninstallation to WebCore. * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayGetTypeID): (WKBundlePageOverlayCreate): (WKBundlePageOverlaySetAccessibilityClient): Use WebPageOverlay instead of PageOverlay, and references instead of pointers. We forward client callbacks through from PageOverlay::Client to WebPageOverlay::Client. (PageOverlayClientImpl::copyAccessibilityAttributeValue): (PageOverlayClientImpl::copyAccessibilityAttributeNames): Convert from wtf types to WebKit2 types. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::graphicsLayerFactory): If we don't have a drawing area, don't dereference it! (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer): Forward attachViewOverlayGraphicsLayer to the DrawingArea. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebPage/FindController.cpp: * WebProcess/WebPage/FindController.h: * WebProcess/WebPage/ios/FindControllerIOS.mm: * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h: * WebProcess/WebPage/mac/ServicesOverlayController.mm: * WebProcess/WebPage/ServicesOverlayController.h: Mechanical changes to adopt to the fact that PageOverlay is in WebCore now. * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: Remove support for WebKit2-based page overlays. Return MainFrame instead of Frame from mainFrame(). * WebProcess/WebPage/WebPageOverlay.cpp: Added. * WebProcess/WebPage/WebPageOverlay.h: Added. (WebKit::WebPageOverlay::create): (WebKit::WebPageOverlay::WebPageOverlay): (WebKit::WebPageOverlay::~WebPageOverlay): (WebKit::WebPageOverlay::setNeedsDisplay): (WebKit::WebPageOverlay::clear): (WebKit::WebPageOverlay::pageOverlayDestroyed): (WebKit::WebPageOverlay::willMoveToPage): (WebKit::WebPageOverlay::didMoveToPage): (WebKit::WebPageOverlay::drawRect): (WebKit::WebPageOverlay::mouseEvent): (WebKit::WebPageOverlay::didScrollFrame): (WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint): (WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint): (WebKit::WebPageOverlay::copyAccessibilityAttributeNames): WebPageOverlay exists to be our API object, but forwards everything to its WebCore::PageOverlay, and implements WebCore::PageOverlay::Client, and forwards client callbacks to its WebPageOverlay::Client (which WKBundlePageOverlay implements). * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): Forward the three AX properties that PageOverlays are ever queried for to the appropriate PageOverlayController function. * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): (WebKit::RemoteLayerTreeDrawingArea::updateRootLayers): Factor updateRootLayers out of setRootCompositingLayer. (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer): If we attach/detach the view-relative page overlay root layer, reattach the root compositing layer's children. (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer): Ditto for the root compositing layer. (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect): (WebKit::RemoteLayerTreeDrawingArea::flushLayers): (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged): Informing PageOverlayController of exposed rect/document size changes is now WebCore's job. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::updateRootLayers): Factor updateRootLayers out of setRootCompositingLayer. (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): Make use of updateRootLayers when we attach/detach root compositing layer/view overlay layer. (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): Informing PageOverlayController of exposed rect/document size changes is now WebCore's job. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::attachViewOverlayGraphicsLayer): * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: * WebProcess/WebProcess.cpp: Include MainFrame.h because WebPage::mainFrame returns a MainFrame now. 2014-10-02 Jeff Miller WKDownloadCopyRequest() returns 0 until the download starts https://bugs.webkit.org/show_bug.cgi?id=137322 Reviewed by Anders Carlsson. The m_request ivar in DownloadProxy was only being initialized when didStart() was called after the download starts. Since clients have access to the ResourceRequest when the DownloadProxy is created, there's no reason not to pass that along to DownloadProxy::create() so it can be returned if WKDownloadCopyRequest() is called before didStart(). * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::create): Add ResourceRequest parameter, and pass it to DownloadProxy constructor. (WebKit::DownloadProxy::DownloadProxy): Initialize m_request. * UIProcess/Downloads/DownloadProxy.h: Add ResourceRequest parameter to create() and constructor. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): Add ResourceRequest parameter and pass it to DownloadProxy::create(). * UIProcess/Downloads/DownloadProxyMap.h: Add ResourceRequest parameter to createDownloadProxy(). * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): Add ResourceRequest parameter and pass it to DownloadProxy::create(). * UIProcess/Network/NetworkProcessProxy.h: Add ResourceRequest parameter to createDownloadProxy(). * UIProcess/WebContext.cpp: (WebKit::WebContext::download): Pass ResourceRequest to createDownloadProxy(). (WebKit::WebContext::createDownloadProxy): Add ResourceRequest parameter and pass it to createDownloadProxy() functions. * UIProcess/WebContext.h: Add ResourceRequest parameter to createDownloadProxy(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): Pass m_decidePolicyForResponseRequest to WebContext::createDownloadProxy(). * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createDownloadProxy): Add ResourceRequest parameter and pass it to DownloadProxyMap::create(). * UIProcess/WebProcessProxy.h: Add ResourceRequest parameter to createDownloadProxy(). 2014-10-01 Christophe Dumez Have is<>(T*) function do a null check on the pointer argument https://bugs.webkit.org/show_bug.cgi?id=137333 Reviewed by Gavin Barraclough. Have is<>(T*) function do a null check on the argument instead of a simple assertion. This makes sense for 2 reasons: 1. It is more consistent with downcast<>(T*), which will succeed even if the argument is a nullptr. 2. It simplifies the code a bit as it gets rid of a lot of explicit null checks. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::mediaType): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedElementChanged): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::textFieldDidBeginEditing): (WebKit::WebEditorClient::textFieldDidEndEditing): (WebKit::WebEditorClient::textDidChangeInTextField): (WebKit::WebEditorClient::textDidChangeInTextArea): (WebKit::WebEditorClient::doTextFieldCommandFromEvent): (WebKit::WebEditorClient::textWillBeDeletedInTextField): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormElements): (WebKit::WebFrame::containsAnyFormControls): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pdfDocumentForPrintingFrame): (WebKit::WebPage::determinePrimarySnapshottedPlugIn): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::blurAssistedNode): (WebKit::WebPage::setAssistedNodeValue): (WebKit::WebPage::setAssistedNodeValueAsNumber): (WebKit::WebPage::setAssistedNodeSelectedIndex): (WebKit::WebPage::getPositionInformation): (WebKit::WebPage::performActionOnElement): (WebKit::isAssistableNode): (WebKit::WebPage::getAssistedNodeInformation): 2014-10-02 Daniel Bates Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header https://bugs.webkit.org/show_bug.cgi?id=137277 Reviewed by Alexey Proskuryakov. Use wtf/spi/darwin/XPCSPI.h instead of including the corresponding XPC headers/ forward declaring XPC functions. * Platform/IPC/Connection.h: * Platform/IPC/mac/ConnectionMac.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 2014-10-02 Ryuan Choi [EFL][WK2] test_ewk2_view is failed https://bugs.webkit.org/show_bug.cgi?id=132983 Reviewed by Gyuyoung Kim. Enable test_ewk2_view because test cases of test_ewk2_view are passed except for few tests related to device_pixel_ratio. This patch adds macro guard for ailed test case to CAIRO_SURFACE_SET_DEVICE_SCALE macro. In addition, fixed some warnings while building with test_ewk2_view. * PlatformEfl.cmake: Enables test_ewk2_view. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added const keyword for argument to fix the warnings. (EWK2UnitTest::EWK2UnitTestBase::keyDown): (EWK2UnitTest::EWK2UnitTestBase::keyUp): * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 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-01 Mark Rowe WebKit should build on OS X Yosemite for external users Reviewed by Dan Bernstein. * Configurations/DebugRelease.xcconfig: Use libWebKitSystemInterfaceYosemite.a on Yosemite. 2014-10-01 Commit Queue Unreviewed, rolling out r174180, r174183, and r174186. https://bugs.webkit.org/show_bug.cgi?id=137320 Broke the Mac MountainLion build. Will investigate offline. (Requested by dydz on #webkit). Reverted changesets: "Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header" https://bugs.webkit.org/show_bug.cgi?id=137277 http://trac.webkit.org/changeset/174180 "Attempt to fix the build after " https://bugs.webkit.org/show_bug.cgi?id=137277 http://trac.webkit.org/changeset/174183 "Another attempt to fix the Mac build after " https://bugs.webkit.org/show_bug.cgi?id=137277 http://trac.webkit.org/changeset/174186 2014-10-01 Daniel Bates Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header https://bugs.webkit.org/show_bug.cgi?id=137277 Reviewed by Alexey Proskuryakov. Use wtf/spi/darwin/XPCSPI.h instead of including the corresponding XPC headers/ forward declaring XPC functions. * Platform/IPC/Connection.h: * Platform/IPC/mac/ConnectionMac.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 2014-10-01 Christophe Dumez Use is<>() / downcast<>() for Event classes https://bugs.webkit.org/show_bug.cgi?id=137284 Reviewed by Andreas Kling. Use is<>() / downcast<>() for Event classes. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent): 2014-10-01 Joseph Pecoraro [iOS] 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