ChangeLog-2015-07-23   [plain text]


2015-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r186977

    2015-07-17  Enrica Casucci  <enrica@apple.com>

            [iOS] Implement selectionInteractionAssistant accessor.
            https://bugs.webkit.org/show_bug.cgi?id=147054
            rdar://problem/20864286

            Reviewed by Tim Horton.

            One more change to adopt the new selection interaction
            model on iOS.

            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView selectionInteractionAssistant]):

2015-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r186806

    2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>

            https://bugs.webkit.org/show_bug.cgi?id=146909
            Add actions for default link preview that uses SFSafariViewController.

            Use the new private properties to prepare actions for the default link preview controller.

            Reviewed by Dan Bernstein.

            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView previewViewControllerForPosition:inSourceView:]):

2015-07-21  Babak Shafiei  <bshafiei@apple.com>

        Merge r186897.

    2015-07-16  Brady Eidson  <beidson@apple.com>

            Review feedback followup for:
            REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
            <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988

            * UIProcess/mac/PageClientImpl.mm:
            (WebKit::PageClientImpl::refView): CFRetain instead of Obj-C retain.
            (WebKit::PageClientImpl::derefView): CFRelease instead of Obj-C release.


2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187072. rdar://problem/21582858

    2015-07-20  Simon Fraser  <simon.fraser@apple.com>

            Fix the iOS build.

            * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187050. rdar://problem/21582858

    2015-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>

            Fix crash due to RemoteLayerTreeDisplayRefreshMonitor outliving RemoteLayerTreeDrawingArea
            https://bugs.webkit.org/show_bug.cgi?id=147124
            <rdar://problem/21582858>

            Reviewed by Simon Fraser.

            Refactors RemoteLayerTreeDisplayRefreshMonitor to use a weak pointer rather than a reference
            to its RemoteLayerTreeDrawingArea, since the drawing area may be deallocated before the monitor
            in some rare cases. This rarely caused pages using requestAnimationFrame to crash on iOS. However,
            this should not be the case: logically, a RemoteLayerTreeDrawingArea should always outlive its
            refresh monitors. Refer to https://bugs.webkit.org/show_bug.cgi?id=147128 for more details.

            * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
            * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
            (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
            (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor): On destruction, checks
                first to see whether or not the drawing area has been deallocated before telling it to update its monitors.
            (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
            * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
            (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr): Creates and returns a new weak pointer to itself.
            * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
            (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187054. rdar://problem/21823349

    2015-07-20  Simon Fraser  <simon.fraser@apple.com>

            Facebook in tiled fullscreen is slow
            https://bugs.webkit.org/show_bug.cgi?id=147134
            rdar://problem/21823349

            Reviewed by Tim Horton.

            TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() could cause a page to toggle
            between two fixed layout sizes differing by a pixel, because of rounding. This would cause
            lots of extra layouts and painting.

            This happened because the the fixed layout size was computed using ceil(m_webPage.size().width() / viewScale)

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
            (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187044. rdar://problem/21661808

    2015-07-20  Jeremy Jones  <jeremyj@apple.com>

            Adopt AVPlayerLayerView
            https://bugs.webkit.org/show_bug.cgi?id=146862

            Reviewed by Simon Fraser.

            The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
            videoLayerFrame and videoLayerGravity no longer need to be stored because they are stored
            where they are used in the interface. Some animation is improved in the conversion.

            * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
            * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
            (+[WebLayerHostView layerClass]): Add class WebLayerHostView.
            (-[WebLayerHostView contextID]):
            (-[WebLayerHostView setContextID:]):
            (-[WebLayerHostView layerHost]):
            (WebKit::WebVideoFullscreenManagerProxy::invalidate): layer -> view
            (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
            Apply the hostingDeviceScaleFactor transform to -sublayerTransform instead of to
            -transform. This more directly inverts the tranform WebProcess and allows -transform
            to be used for animation in the UIProcess. This is important because UIView's actions
            animate -transform, but not -sublayerTrasform.

            (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): layer -> view
            (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
            (WebKit::WebVideoFullscreenModelContext::videoLayerFrame): Deleted.
            (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
            (WebKit::WebVideoFullscreenModelContext::videoLayerGravity): Deleted.
            * WebProcess/ios/WebVideoFullscreenManager.mm:
            (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
            Set initial video layer frame to fix start point of animation.

            (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
            dispatch_async allows the CATransaction to complete before continuing with the animation.
            This prevents a flash during animation.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187039. rdar://problem/21474317

    2015-07-20  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
            https://bugs.webkit.org/show_bug.cgi?id=147127
            <rdar://problem/21474317>

            Reviewed by Simon Fraser.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::snapshotAtSize):
            Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
            like we did before r174287.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187047. rdar://problem/20860410

    2015-07-20  Gordon Sheridan  <gordon_sheridan@apple.com>

            Support blocking a plug-in for non-security reasons
            https://bugs.webkit.org/show_bug.cgi?id=145009

            Reviewed by Anders Carlsson.

            * Shared/Plugins/PluginModuleInfo.h:
            Replace PluginModuleBlocked with separate enum values for blocking for security and compatibility.

            * UIProcess/API/C/WKAPICast.h:
            (WebKit::toWKPluginLoadPolicy):
            Modify to handle change to PluginModuleBlocked enum.

            (WebKit::toPluginModuleLoadPolicy):
            Ditto.

            * UIProcess/API/C/WKPluginLoadPolicy.h:
            Added enum value for blocking a plugin for compatibility reasons.

            * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
            (WebKit::shouldBlockPlugin):
            Check load policy for both reasons a plugin may be blocked.

            (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy):
            Added function to convert between load policy enum types.

            (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
            Modified to call WKLoadPolicyForPluginVersion() which can distinguish between blocked for security or compatibility.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::findPlugin):
            Updated to recognize both PluginModuleBlocked enum values that indicate a plugin is blocked.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::createPlugin):
            Ditto.

            (WebKit::WebPage::canPluginHandleResponse):
            Ditto.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187023. rdar://problem/21799011

    2015-07-16  Anders Carlsson  <andersca@apple.com>

            WebsiteDataStore operations need to grab background assertions
            https://bugs.webkit.org/show_bug.cgi?id=147015
            rdar://problem/21799011

            Reviewed by Sam Weinig.

            * UIProcess/Network/NetworkProcessProxy.cpp:
            (WebKit::NetworkProcessProxy::fetchWebsiteData):
            (WebKit::NetworkProcessProxy::deleteWebsiteData):
            (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
            * UIProcess/WebProcessProxy.cpp:
            (WebKit::WebProcessProxy::fetchWebsiteData):
            (WebKit::WebProcessProxy::deleteWebsiteData):
            (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r187001. rdar://problem/21769577

    2015-07-18  Simon Fraser  <simon.fraser@apple.com>

            Scroll position jumps when scrolling scaling pages down in split view
            https://bugs.webkit.org/show_bug.cgi?id=147072
            rdar://problem/21769577

            Reviewed by Sam Weinig.

            When apple.com/music is in Split View at a reduced scale, scrolling the page
            can cause unwanted scroll jumps. This happened because we'd enter
            TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
            layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
            layout resulted in a shorter document, which truncated the scroll position. The
            scaled layout then restored the longer document, but it also restored that
            truncated scroll position.

            Forcing a layout is sufficient to fix the bug for this page, and doing a single
            layout (which will happen anyway) is preferable to running the autosize logic
            if layout happens to be dirty.

            I was not able to make a test to reproduce the problem. Entering
            scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
            using a transform transition, but I was not able to reproduce incorrect
            scroll position restoration.

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
            (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186982. rdar://problem/21567820

    2015-07-17  Andy Estes  <aestes@apple.com>

            [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
            https://bugs.webkit.org/show_bug.cgi?id=147044
            rdar://problem/21567820

            Reviewed by Brady Eidson.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::WebPage): Enabled Content-Disposition: attachment sandbox on iOS.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186978. rdar://problem/21643094

    2015-07-17  Tim Horton  <timothy_horton@apple.com>

            [iOS] TextIndicator has a large forehead when line-height > 1
            https://bugs.webkit.org/show_bug.cgi?id=147058
            <rdar://problem/21643094>

            Reviewed by Dean Jackson.

            * WebProcess/WebPage/ios/WebPageIOS.mm:
            (WebKit::WebPage::getPositionInformation):
            Apply a review comment that I left myself and then forgot about.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186969. rdar://problem/21803781

    2015-07-17  Dan Bernstein  <mitz@apple.com>

            REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
            https://bugs.webkit.org/show_bug.cgi?id=147055

            Reviewed by Alex Christensen.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::createNewPage): Grab the main frame’s URL before calling out to the
            client, who may destroy the frame.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186964. rdar://problem/21803781

    2015-07-17  Dan Bernstein  <mitz@apple.com>

            WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
            https://bugs.webkit.org/show_bug.cgi?id=147040

            Reviewed by Dean Jackson.

            * UIProcess/Cocoa/UIDelegate.mm:
            (WebKit::UIDelegate::UIClient::createNewPage): Disallow App Links if the new page is for the
            same protocol, host and port as the main frame of this page.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::decidePolicyForNavigationAction): Disallow App Links if
            m_shouldSuppressAppLinksInNextNavigationPolicyDecision is set, and reset it. See below for
            when we set it.
            (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Disallow App Links if the new window
            is for the same protocol, host and port as the main frame of this page.
            (WebKit::WebPageProxy::createNewPage): Make the new page disallow App Links in the first
            policy decision if it is for the same protocol, host and port as the main frame of this
            page.
            * UIProcess/WebPageProxy.h: Added m_shouldSuppressAppLinksInNextNavigationPolicyDecision
            member variable.

            * WebProcess/WebCoreSupport/WebChromeClient.cpp:
            (WebKit::WebChromeClient::createWindow): Pass the shouldOpenExternalURLsPolicy.

            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
            (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186956. rdar://problem/21643094

    2015-07-17  Tim Horton  <timothy_horton@apple.com>

            iOS TextIndicators include text that is not supposed to be indicated
            https://bugs.webkit.org/show_bug.cgi?id=147028
            <rdar://problem/21643094>

            Reviewed by Sam Weinig.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):

2015-07-20  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186916. rdar://problem/21643094

    2015-07-16  Tim Horton  <timothy_horton@apple.com>

            Add shrink-wrapped link highlights
            https://bugs.webkit.org/show_bug.cgi?id=147021
            <rdar://problem/21643094>

            Reviewed by Enrica Casucci.

            * Shared/InteractionInformationAtPosition.cpp:
            (WebKit::InteractionInformationAtPosition::encode):
            (WebKit::InteractionInformationAtPosition::decode):
            * Shared/InteractionInformationAtPosition.h:
            Add a TextIndicator to InteractionInformationAtPosition.
            Make use of some new C++ features.

            * UIProcess/ios/WKContentViewInteraction.h:
            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
            (-[WKContentView didDismissPreviewViewController:committing:]):
            Make use of the TextIndicator (if we have one) to show a shrink-wrapped
            snapshot of the link.

            * WebProcess/WebPage/ios/WebPageIOS.mm:
            (WebKit::WebPage::getPositionInformation):
            Build a TextIndicator for the link if possible.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186808. rdar://problem/21801544

    2015-07-14  Yongjun Zhang  <yongjun_zhang@apple.com>

            https://bugs.webkit.org/show_bug.cgi?id=146917
            iOS WebKit doesn't build.
            rdar://problem/21801544

            Fix the build - don't use deprecated methods.

            Reviewed by Dan Bernstein.

            * UIProcess/ios/WKContentViewInteraction.h:
            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView _registerPreviewInWindow:]):
            (-[WKContentView _unregisterPreviewInWindow:]):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186924. rdar://problem/21669802

    2015-07-16  Matt Baker  <mattbaker@apple.com>

            [Mac] Web Inspector toolbar can be covered by the Safari tab bar when docked to the right
            https://bugs.webkit.org/show_bug.cgi?id=146994

            Reviewed by Timothy Hatcher.

            WebInspectorProxy contained logic which ignored the next frame change notification from the inspected view,
            whenever it updated the frames of both the Inspector view and inspected view. This patch removes that logic,
            as it prevented the Inspector's frame from being adjusted after changes to the browser's top content inset.

            * UIProcess/mac/WebInspectorProxyMac.mm:
            (-[WKWebInspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange]): Deleted.
            (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Deleted.
            (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Deleted.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186919. rdar://problem/21834578

    2015-07-16  Joseph Pecoraro  <pecoraro@apple.com>

            Web Inspector: [Mac] Save dialog not working when inspector is docked
            https://bugs.webkit.org/show_bug.cgi?id=146991

            Reviewed by Sam Weinig.

            * UIProcess/mac/WebInspectorProxyMac.mm:
            (WebKit::runOpenPanel):
            (WebKit::WebInspectorProxy::platformSave):
            When the window is nil (docked) use a non-window version of running the dialog.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186887. rdar://problem/21692212

    2015-07-15  Brady Eidson  <beidson@apple.com>

            REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
            <rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988

            Reviewed by Sam Weinig.

            When a loader delegate callback results in the WKView getting deallocated, then the PageClient
            is also destroyed.

            WebPageProxy then (often) turns around and uses the PageClient anyways.

            Tried to write a TestWebKitAPI test for this, but only didFailLoadForFrame appears to obviously
            be vulnerable, and there seems to be no way to reproduce that failure case under TestWebKitAPI.

            * UIProcess/PageClient.h: Add ref/derefView.

            * UIProcess/API/gtk/PageClientImpl.h: Stub them out.
            * UIProcess/efl/WebViewEfl.h: Stub them out.

            * UIProcess/mac/PageClientImpl.h:
            * UIProcess/mac/PageClientImpl.mm:
            (WebKit::PageClientImpl::refView): [m_wkView retain]
            (WebKit::PageClientImpl::derefView): [m_wkView release]

            * UIProcess/ios/PageClientImplIOS.h:
            * UIProcess/ios/PageClientImplIOS.mm:
            (WebKit::PageClientImpl::refView): Retain all 3 views.
            (WebKit::PageClientImpl::derefView): Release all 3 views.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::PageClientProtector::PageClientProtector): Calls refView() on the PageClient.
            (WebKit::PageClientProtector::~PageClientProtector): Calls derefView() on the PageClient.
            (WebKit::WebPageProxy::didChangeBackForwardList): All methods that make m_loaderClient or
              m_pageClient callouts get a protector at their head.
            (WebKit::WebPageProxy::willGoToBackForwardListItem):
            (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
            (WebKit::WebPageProxy::findPlugin):
            (WebKit::WebPageProxy::didCreateMainFrame):
            (WebKit::WebPageProxy::didCreateSubframe):
            (WebKit::WebPageProxy::didStartProgress):
            (WebKit::WebPageProxy::didChangeProgress):
            (WebKit::WebPageProxy::didFinishProgress):
            (WebKit::WebPageProxy::didDestroyNavigation):
            (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
            (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
            (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
            (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
            (WebKit::WebPageProxy::didCommitLoadForFrame):
            (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
            (WebKit::WebPageProxy::didFinishLoadForFrame):
            (WebKit::WebPageProxy::didFailLoadForFrame):
            (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
            (WebKit::WebPageProxy::didReceiveTitleForFrame):
            (WebKit::WebPageProxy::didFirstLayoutForFrame):
            (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
            (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
            (WebKit::WebPageProxy::didLayout):
            (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
            (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
            (WebKit::WebPageProxy::didRunInsecureContentForFrame):
            (WebKit::WebPageProxy::didDetectXSSForFrame):
            (WebKit::WebPageProxy::frameDidBecomeFrameSet):
            (WebKit::WebPageProxy::decidePolicyForNavigationAction):
            (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
            (WebKit::WebPageProxy::decidePolicyForResponse):
            (WebKit::WebPageProxy::decidePolicyForResponseSync):
            (WebKit::WebPageProxy::unableToImplementPolicy):
            (WebKit::WebPageProxy::didNavigateWithNavigationData):
            (WebKit::WebPageProxy::didPerformClientRedirect):
            (WebKit::WebPageProxy::didPerformServerRedirect):
            (WebKit::WebPageProxy::didUpdateHistoryTitle):
            (WebKit::WebPageProxy::wrapCryptoKey):
            (WebKit::WebPageProxy::unwrapCryptoKey):
            (WebKit::WebPageProxy::navigationGestureDidBegin):
            (WebKit::WebPageProxy::navigationGestureWillEnd):
            (WebKit::WebPageProxy::navigationGestureDidEnd):
            (WebKit::WebPageProxy::willRecordNavigationSnapshot):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186878. rdar://problem/21758722

    2015-07-15  Sam Weinig  <sam@webkit.org>

            Color match plug-ins
            <rdar://problem/21758722>
            https://bugs.webkit.org/show_bug.cgi?id=146987

            Reviewed by Dean Jackson.

            * Platform/mac/LayerHostingContext.h:
            * Platform/mac/LayerHostingContext.mm:
            (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
            (WebKit::LayerHostingContext::colorMatchUntaggedContent):
            Add setter/getter for color matching untagged content.

            * PluginProcess/mac/PluginControllerProxyMac.mm:
            (WebKit::PluginControllerProxy::updateLayerHostingContext):
            Have plug-ins CAContext's color match untagged colors into sRGB.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186814. rdar://problem/21605505

    2015-07-14  Anders Carlsson  <andersca@apple.com>

            Release assert under StyleResolver::loadPendingImages() caused by MemoryPressureHandler
            https://bugs.webkit.org/show_bug.cgi?id=146940
            rdar://problem/21605505

            Reviewed by Sam Weinig.

            * WebProcess/WebProcess.cpp:
            (WebKit::WebProcess::processWillSuspendImminently):

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186812. rdar://problem/21818117

    2015-07-14  Sam Weinig  <sam@webkit.org>

            WebKit needs to serialize numeric values in NSError userInfo
            <rdar://problem/21818117>
            https://bugs.webkit.org/show_bug.cgi?id=146936

            Reviewed by Anders Carlsson.

            * Shared/mac/WebCoreArgumentCodersMac.mm:
            (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
            Encode userInfo values that are NSNumbers in addition to NSStrings and NSURLs. Decoding
            is already handled.

2015-07-16  Matthew Hanson  <matthew_hanson@apple.com>

        Merge r186786. rdar://problem/9222837

    2015-07-13  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
            https://bugs.webkit.org/show_bug.cgi?id=146918
            rdar://problem/9222837

            Reviewed by Tim Horton.

            Use as input to the viewport scaling algorithm a contents size from the FrameView
            that takes overflow on the viewport renderer into account. This prevents unexpected
            viewports scaling on pages that have content that overflows their expressed contents size,
            but apply overflow to the <body>.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
            rather than raw contentsSize(), to determine scaling.

2015-07-13  Babak Shafiei  <bshafiei@apple.com>

        Merge r186777.

    2015-07-13  Anders Carlsson  <andersca@apple.com>

            Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
            https://bugs.webkit.org/show_bug.cgi?id=146913
            rdar://problem/21789252

            Reviewed by Dan Bernstein.

            Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
            /System/Library/Frameworks/WebKit.framework.

            * WebKit2.xcodeproj/project.pbxproj:

2015-07-13  Babak Shafiei  <bshafiei@apple.com>

        Merge r186770.

    2015-07-13  Anders Carlsson  <andersca@apple.com>

            Silverlight causes tabs to hang
            https://bugs.webkit.org/show_bug.cgi?id=146912
            rdar://problem/21686508

            Reviewed by Sam Weinig.

            Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.

            * Configurations/PluginProcess.xcconfig:

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186712.

    2015-07-10  Simon Fraser  <simon.fraser@apple.com>

            [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
            https://bugs.webkit.org/show_bug.cgi?id=146872
            rdar://problem/7569416

            Reviewed by Sam Weinig.

            Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
            a gap down the right edge, and unreachable content on the left side, focussing
            form fields scrolled to the wrong location, and programmatic scrolls scrolled
            to the wrong place.

            Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
            and using it in various places. There are three main aspects to the patch:

            1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
               to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
               including zooming to focused form elements. The WKContentView's boundsOrigin
               is set to the scroll origin so that the view coordinates match document coordinates.
            2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
               rather than just conjuring up a rect with a zero origin, which makes position:fixed
               work correctly.
            3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
               coincide with the origin of the documentRect (i.e. at the scroll origin, which
               may not be top-left). This allows tap highlights to show in the correct location.
            4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
               if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
               testing area.

            * Shared/mac/RemoteLayerTreeTransaction.h:
            (WebKit::RemoteLayerTreeTransaction::scrollOrigin):
            (WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
            * Shared/mac/RemoteLayerTreeTransaction.mm:
            (WebKit::RemoteLayerTreeTransaction::encode):
            (WebKit::RemoteLayerTreeTransaction::decode):
            (WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
            * UIProcess/API/Cocoa/WKWebView.mm:
            (-[WKWebView _scrollToContentOffset:scrollOrigin:]):
            (-[WKWebView _scrollToContentOffset:]): Deleted.
            * UIProcess/API/Cocoa/WKWebViewInternal.h:
            * UIProcess/API/gtk/PageClientImpl.cpp:
            (WebKit::PageClientImpl::requestScroll):
            * UIProcess/API/gtk/PageClientImpl.h:
            * UIProcess/CoordinatedGraphics/WebView.cpp:
            (WebKit::WebView::requestScroll):
            * UIProcess/CoordinatedGraphics/WebView.h:
            * UIProcess/PageClient.h:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::requestScroll):
            * UIProcess/WebPageProxy.h:
            * UIProcess/ios/PageClientImplIOS.h:
            * UIProcess/ios/PageClientImplIOS.mm:
            (WebKit::PageClientImpl::requestScroll):
            (WebKit::PageClientImpl::documentRect):
            (WebKit::PageClientImpl::contentsSize): Deleted.
            * UIProcess/ios/WKContentView.mm:
            (-[WKContentView _didCommitLayerTree:]):
            * UIProcess/ios/WebPageProxyIOS.mm:
            (WebKit::WebPageProxy::computeCustomFixedPositionRect):
            * UIProcess/mac/PageClientImpl.h:
            * UIProcess/mac/PageClientImpl.mm:
            (WebKit::PageClientImpl::requestScroll):
            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
            (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::willCommitLayerTree):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186707.

    2015-07-10  Chris Dumez  <cdumez@apple.com>

            [WK2] Diagnostic logging messages are causing too much IPC
            https://bugs.webkit.org/show_bug.cgi?id=146873
            <rdar://problem/21779205>

            Reviewed by Ryosuke Niwa.

            Diagnostic logging messages are causing too much IPC. To address the
            problem, we now do the sampling of the senders' side (WebContent
            process and Networking process) instead of the receiver's side
            (UIProcess).

            * NetworkProcess/NetworkProcess.cpp:
            (WebKit::NetworkProcess::logDiagnosticMessage):
            (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
            (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
            * UIProcess/Network/NetworkProcessProxy.cpp:
            (WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
            (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
            (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
            * UIProcess/Network/NetworkProcessProxy.h:
            * UIProcess/Network/NetworkProcessProxy.messages.in:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::logDiagnosticMessage):
            (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
            (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
            (WebKit::WebPageProxy::logSampledDiagnosticMessage):
            (WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
            (WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
            (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
            (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
            (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186703.

    2015-07-10  Dean Jackson  <dino@apple.com>

            Airplay button and placeholder are missing in inline controls
            https://bugs.webkit.org/show_bug.cgi?id=146869
            <rdar://problem/21555051>

            Reviewed by Simon Fraser.

            Fix a typo in the ENABLE that was causing the Airplay
            setting (allowsAirPlayForMediaPlayback, which becomes
            webkitWirelessVideoPlaybackDisabled) to default to false.

            * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
            (-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
            to WIRELESS_PLAYBACK_TARGET.

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186684.

    2015-07-10  Zalan Bujtas  <zalan@apple.com>

            Crash at WebCore::WebPage::innerFrameQuad.
            https://bugs.webkit.org/show_bug.cgi?id=146843
            rdar://problem/21501819

            Reviewed by Andreas Kling.

            We may end up with a null rootEditableElement() after calling Document::updateLayout().

            Speculative fix. Not reproducible.

            * WebProcess/WebPage/WebPage.h: Some const cleanup.
            * WebProcess/WebPage/ios/WebPageIOS.mm:
            (WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
            (WebKit::constrainPoint):
            (WebKit::WebPage::selectWithGesture):
            (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
            (WebKit::WebPage::selectPositionAtPoint):
            (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
            (WebKit::WebPage::selectTextWithGranularityAtPoint):
            (WebKit::WebPage::updateSelectionWithExtentPoint):
            (WebKit::WebPage::getPositionInformation):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186678.

    2015-07-09  Jon Honeycutt  <jhoneycutt@apple.com>

            [iOS] Document picker has overlapping icons on iPad
            https://bugs.webkit.org/show_bug.cgi?id=146808
            <rdar://problem/21251875>

            Reviewed by Sam Weinig.

            * UIProcess/ios/forms/WKFileUploadPanel.mm:
            (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
            Don't show this UI as a popover on iPad; the default is a full screen
            form sheet.

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186719.

    2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>

            Allow clients to opt-out of default app link link actions
            https://bugs.webkit.org/show_bug.cgi?id=146883
            <rdar://problem/21221902>

            Reviewed by Dan Bernstein.

            * UIProcess/API/APIUIClient.h:
            (API::UIClient::shouldIncludeAppLinkActionsForElement):
            * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
            * UIProcess/Cocoa/UIDelegate.h:
            * UIProcess/Cocoa/UIDelegate.mm:
            (WebKit::UIDelegate::setDelegate):
            (WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
            Plumbing for a new delegate message to ask the client if they
            would like app link actions or not. Default is yes.

            * UIProcess/ios/WKActionSheetAssistant.h:
            * UIProcess/ios/WKActionSheetAssistant.mm:
            (-[WKActionSheetAssistant showImageSheet]):
            (-[WKActionSheetAssistant showLinkSheet]):
            (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
            (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
            Pass elementInfo into methods generating default actions.

            (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
            When generating open actions, if the process has AppLink capabilities
            ask the client if they want to include AppLink actions or fall back
            to the basic Open action.

            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
            (-[WKContentView previewViewControllerForPosition:inSourceView:]):
            * UIProcess/ios/WKPDFView.mm:
            (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
            Assistant delegate implementations forward to the UIDelegate.

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186718.

    2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>

            Update default link action sheets for app links
            https://bugs.webkit.org/show_bug.cgi?id=146658
            <rdar://problem/21221902>

            Reviewed by Dan Bernstein.

            * Shared/mac/SandboxUtilities.h:
            * Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
            (WebKit::processHasEntitlement):
            * UIProcess/ApplicationStateTracker.mm:
            (WebKit::applicationType):
            (WebKit::hasEntitlement): Deleted.
            * WebKit2.xcodeproj/project.pbxproj:
            Share a helper for checking if the current process has an entitlement.

            * UIProcess/API/Cocoa/_WKElementAction.h:
            * UIProcess/API/Cocoa/_WKElementAction.mm:
            (+[_WKElementAction _elementActionWithType:title:actionHandler:]):
            (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
            * UIProcess/API/Cocoa/_WKElementActionInternal.h:
            Add an internal way to make an element action with a standard type and regular handler.
            We use this for the new standard types that don't have a default implementation.

            * UIProcess/ios/WKActionSheetAssistant.mm:
            (applicationHasAppLinkEntitlements):
            (appLinkForURL):
            Helpers checking access to app links and fetching app links.

            (-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
            (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
            (-[WKActionSheetAssistant defaultActionsForImageSheet]):
            Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
            otherwise add the normal default "Open" action.

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186716.

    2015-07-11  Enrica Casucci  <enrica@apple.com>

            Remove incorrect overriding of inputAssistantItem in WKContentView.
            https://bugs.webkit.org/show_bug.cgi?id=146863
            rdar://problem/21507154

            Reviewed by Sam Weinig.

            Correction to the patch in r186713.
            We need to provide the inputAssistantItem from the responder.

            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView inputAccessoryView]):

2015-07-12  Babak Shafiei  <bshafiei@apple.com>

        Merge r186713.

    2015-07-10  Enrica Casucci  <enrica@apple.com>

            Remove incorrect overriding of inputAssistantItem in WKContentView.
            https://bugs.webkit.org/show_bug.cgi?id=146863
            rdar://problem/21507154

            Reviewed by Dan Bernstein.

            Removing implementation of inputAssistantItem and moving initialization
            of formAccessoryView to inputAccessoryView to avoid interfering with
            the keyboard handling of the assistant bar.

            * UIProcess/ios/WKContentViewInteraction.mm:
            (-[WKContentView inputAccessoryView]):
            (-[WKContentView inputAssistantItem]): Deleted.
            (-[WKContentView _inputAssistantItem]): Deleted.

2015-07-10  Matthew Hanson  <matthew_hanson@apple.com>

        Disable non-shipping features.

        * Configurations/FeatureDefines.xcconfig:

2015-07-09  Dan Bernstein  <mitz@apple.com>

        WebKit2 part of Track and expose policies for external URL schemes and App Links separately
        https://bugs.webkit.org/show_bug.cgi?id=146822

        Reviewed by Anders Carlsson.

        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode):
        (WebKit::NavigationActionData::decode):
        * Shared/NavigationActionData.h:
          Replaced the shouldOpenExternalURLsPolicy boolean member with a
          shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
          updated encoding and decoding:

        * UIProcess/API/APINavigationAction.h:
          Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
          augments the policy in the NavigationActionData with a valude decided in the UI process.
          Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
          shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.

        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
          to the NavigationAction.
        (-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
        (-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
          _shouldOpenExternalSchemes value.
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
          policies and deprecated old property.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
          encapsulates logic that used to be here.

        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
          NavigationState.mm here and pass the result to NavigationAction::create.
        (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
          by policy).
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
          still allow external schemes).

        * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
        (WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
        * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:

        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
          Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
          initialization of m_shouldOpenExternalURLs to account for the new policy.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
          in the navigation data.

2015-07-09  Tim Horton  <timothy_horton@apple.com>

        Use CoreAnimation fences instead of synchronous IPC to synchronize resize
        https://bugs.webkit.org/show_bug.cgi?id=146294
        <rdar://problem/21090193>

        Reviewed by Anders Carlsson.

        Because of changes in underlying frameworks, we can no longer depend on
        blocking the UI process main thread to be sufficient to synchronize
        UI process CA commits with commits coming from the Web process.

        Instead, we have to use CoreAnimation fences to perform this synchronization.
        Instead of blocking inside waitForAndDispatchImmediately, we'll end up
        blocking during the CA commit.

        * Platform/mac/LayerHostingContext.mm:
        Use HAVE(COREANIMATION_FENCES).

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::Connection):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::installIncomingSyncMessageCallback):
        (IPC::Connection::uninstallIncomingSyncMessageCallback):
        Keep track of a set of incoming sync message callbacks, and fire them
        (on another queue) when a sync message arrives.

        (IPC::Connection::hasIncomingSyncMessage):
        * Platform/IPC/Connection.h:
        Add a way to check if there are any sync messages in the queue.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
        (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
        These are no longer used; do nothing on 10.10+.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::updateGeometry):
        * WebProcess/WebPage/DrawingArea.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        Add a MachSendRight parameter to UpdateGeometry, so that we can send along
        a fence port with the geometry update if needed.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        Apply the incoming fence so that geometry changes will be synchronized between processes.

        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
        Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.

        (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
        Create and block us on a fence and send it along with the geometry update.
        If a sync message is in the incoming message queue, don't create the fence;
        if a sync message comes in at any point after we've installed the fence (but
        before the relevant commit completes), invalidate the fence, so that we won't
        end up temorarily deadlocked waiting for the fence timeout.

2015-07-09  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Crash when spell checker returns no guesses
        https://bugs.webkit.org/show_bug.cgi?id=146805

        Reviewed by Martin Robinson.

        Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.

        * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
        (webkitContextMenuActionGetForContextMenuItem):

2015-07-09  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Add 3 byte jump size.
        https://bugs.webkit.org/show_bug.cgi?id=146425

        Reviewed by Darin Adler.

        * UIProcess/API/APIUserContentExtensionStore.h:
        Increment CurrentContentExtensionFileVersion because of change in the bytecode.

2015-07-09  Anders Carlsson  <andersca@apple.com>

        SafariViewController loads partial webpage or entirely blank webpage
        https://bugs.webkit.org/show_bug.cgi?id=146815
        rdar://problem/21734757

        Reviewed by Dan Bernstein.

        * Platform/spi/ios/UIKitSPI.h:
        Add _hostProcessIdentifier getter.

        * UIProcess/ApplicationStateTracker.h:
        Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.

        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::applicationType):
        Add a helper function that returns the type of application the web view is hosted by (regular
        application, view service or extension).

        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
        For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
        BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.

        (WebKit::isViewService): Deleted.

        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
        If we're moving out of a window, null out the state tracker.

        (-[WKContentView didMoveToWindow]):
        If we moved to a window, create a new state tracker.

        (-[WKContentView isBackground]):
        Handle a null application state.

        (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
        Don't create the application state here.

2015-07-09  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Report the first paint after committing a load as a rendering progress event
        https://bugs.webkit.org/show_bug.cgi?id=146765

        Reviewed by Tim Horton.

        * Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
        was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
        NavigationState::didFirstPaint.

        * UIProcess/Cocoa/NavigationState.h:
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
        with _WKRenderingProgressEventFirstPaint.

2015-07-08  Jinwoo Song  <jinwoo7.song@samsung.com>

        [EFL] When closing inspector window, EwkView is not released properly.
        https://bugs.webkit.org/show_bug.cgi?id=146716

        Reviewed by Gyuyoung Kim.

        It's because inspector window could not be deleted by remaining reference
        from inspector view(evas object). This patch deletes the inspector window
        after finishing the evas object smart call.

        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::destroyInspectorWindow):
        (WebKit::WebInspectorProxy::platformDidClose):

2015-07-08  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
        https://bugs.webkit.org/show_bug.cgi?id=146546

        Reviewed by Darin Adler.

        We did't reset pendingNavigationID value when request url is empty.
        Hence we need to ignore ASSERT check in this case.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::reload):

2015-07-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
        https://bugs.webkit.org/show_bug.cgi?id=146591

        Reviewed by Darin Adler.

        Following patch in order to reduce use of PassRefPtr.

        * Shared/BlobDataFileReferenceWithSandboxExtension.h:
        * Shared/Cocoa/CompletionHandlerCallChecker.h:
        * Shared/Cocoa/CompletionHandlerCallChecker.mm:
        (WebKit::CompletionHandlerCallChecker::create):
        * Shared/Downloads/DownloadAuthenticationClient.h:
        (WebKit::DownloadAuthenticationClient::create):
        * Shared/SandboxExtension.h:
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::create):
        * Shared/ShareableResource.h:
        * Shared/mac/ObjCObjectGraph.h:
        (WebKit::ObjCObjectGraph::create):
        * Shared/mac/SandboxExtensionMac.mm:
        (WebKit::SandboxExtension::create):
        * UIProcess/API/Cocoa/WKProcessGroup.mm:
        (getInjectedBundleInitializationUserData):
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::create):
        * UIProcess/WebPreferences.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
        (WKBundlePageOverlayCreate):
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
        (WKBundlePageBannerCreateBannerWithCALayer):
        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
        (WebKit::InjectedBundleDOMWindowExtension::create):
        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
        (WebKit::InjectedBundleHitTestResult::create):
        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::InjectedBundleNavigationAction::create):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
        (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
        (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
        (WebKit::InjectedBundleScriptWorld::create):
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
        * WebProcess/Network/NetworkProcessConnection.h:
        (WebKit::NetworkProcessConnection::create):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::create):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
        (WebKit::NotificationPermissionRequestManager::create):
        * WebProcess/Notifications/NotificationPermissionRequestManager.h:
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::create):
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
        (WebKit::NetscapePluginStream::create):
        * WebProcess/Plugins/PDF/PDFPlugin.h:
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::create):
        * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
        (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
        (WebKit::PDFPluginChoiceAnnotation::create):
        * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
        * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
        (WebKit::PDFPluginPasswordField::create):
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
        (WebKit::PDFPluginTextAnnotation::create):
        * WebProcess/Plugins/PluginProcessConnection.h:
        (WebKit::PluginProcessConnection::create):
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::create):
        * WebProcess/Plugins/PluginProcessConnectionManager.h:
        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::create):
        * WebProcess/Plugins/PluginProxy.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::URLRequest::create):
        (WebKit::PluginView::Stream::create):
        (WebKit::PluginView::create):
        * WebProcess/Plugins/PluginView.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        (WebKit::RemoteScrollingCoordinator::create):
        * WebProcess/Storage/StorageAreaImpl.cpp:
        (WebKit::StorageAreaImpl::create):
        * WebProcess/Storage/StorageAreaImpl.h:
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::create):
        * WebProcess/Storage/StorageAreaMap.h:
        * WebProcess/WebConnectionToUIProcess.cpp:
        (WebKit::WebConnectionToUIProcess::create):
        * WebProcess/WebConnectionToUIProcess.h:
        * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
        (WebKit::WebPopupMenu::create):
        * WebProcess/WebCoreSupport/WebPopupMenu.h:
        * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
        (WebKit::WebSearchPopupMenu::create):
        * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
        * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
        (WebKit::WebFrameNetworkingContext::create):
        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
        (WebKit::WebFrameNetworkingContext::create):
        * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::create):
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::create):
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::create):
        * WebProcess/WebPage/EventDispatcher.h:
        * WebProcess/WebPage/PageBanner.h:
        * WebProcess/WebPage/WebBackForwardListProxy.h:
        (WebKit::WebBackForwardListProxy::create):
        * WebProcess/WebPage/WebContextMenu.h:
        (WebKit::WebContextMenu::create):
        * WebProcess/WebPage/WebDocumentLoader.h:
        (WebKit::WebDocumentLoader::create):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::create):
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::create):
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
        (WebKit::WebOpenPanelResultListener::create):
        * WebProcess/WebPage/WebOpenPanelResultListener.h:
        * WebProcess/WebPage/WebPageOverlay.cpp:
        (WebKit::WebPageOverlay::create):
        * WebProcess/WebPage/WebPageOverlay.h:
        * WebProcess/WebPage/WebUndoStep.cpp:
        (WebKit::WebUndoStep::create):
        * WebProcess/WebPage/WebUndoStep.h:
        * WebProcess/WebPage/mac/PageBannerMac.mm:
        (WebKit::PageBanner::create):
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::create):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
        * WebProcess/ios/WebVideoFullscreenManager.h:
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::create):

2015-07-08  Anders Carlsson  <andersca@apple.com>

        WKSecurityOrigin.h has wrong availability info
        https://bugs.webkit.org/show_bug.cgi?id=146761
        rdar://problem/21735802

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKSecurityOrigin.h:

2015-07-08  Andreas Kling  <akling@apple.com>

        [iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
        <https://webkit.org/b/146735>
        <rdar://problem/21151033>

        Reviewed by Enrica Casucci.

        Every touch on the page causes us to call elementDidFocus(), since we may need to bring
        up a keyboard if the node had previously been programmatically focused. This was causing
        little lag spikes during scrolling every time you'd put your finger to the screen.

        Have WebPage::elementDidFocus() return early if the node already has focus, and we've
        started an input session in response to non-programmatic focus already.

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::elementDidFocus):
        (WebKit::WebPage::elementDidBlur):

2015-07-08  Matt Rajca  <mrajca@apple.com>

        Media Session: indicate to clients whether a media session has active media elements
        https://bugs.webkit.org/show_bug.cgi?id=146742

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageHasMediaSessionWithActiveMediaElements):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2015-07-07  Matt Rajca  <mrajca@apple.com>

        Media Session: propagate artwork URL with metadata to UI clients
        https://bugs.webkit.org/show_bug.cgi?id=146698

        Reviewed by Tim Horton.

        * Shared/WebMediaSessionMetadata.h:
        (WebKit::WebMediaSessionMetadata::artworkURL):
        * UIProcess/API/C/WKMediaSessionMetadata.cpp:
        (WKMediaSessionMetadataCopyArtworkURL):
        * UIProcess/API/C/WKMediaSessionMetadata.h:

2015-07-08  Yongjun Zhang  <yongjun_zhang@apple.com>

        Don't allow page scroll when previewing a link or image.
        https://bugs.webkit.org/show_bug.cgi?id=146741
        rdar://problem/21733053

        Reviewed by Beth Dakin.

        Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):

2015-07-08  Tim Horton  <timothy_horton@apple.com>

        Snapshots can be misplaced when custom swipe views are offset from the window origin
        https://bugs.webkit.org/show_bug.cgi?id=146744
        <rdar://problem/20942120>

        Reviewed by Dean Jackson.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        Keep swipeArea in window coordinates; it was already in window coordinates
        when using custom swipe views, but not in the non-custom case.

        Convert from window coordinates to parent-of-m_swipeLayer coordinates when
        determining m_swipeLayer's frame.

2015-07-07  Andy Estes  <aestes@apple.com>

        [iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
        https://bugs.webkit.org/show_bug.cgi?id=146712

        Reviewed by Benjamin Poulain.

        r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
        event could fire on the navigated-to page. This change extends this fix to apply to subframes.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::WebFrame):
        * WebProcess/WebPage/WebFrame.h:
        (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
        (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
        (WebKit::WebPage::commitPotentialTap): Ditto.
        (WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
        (WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
        (WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.

2015-07-08  Brady Eidson  <beidson@apple.com>

        Move PingLoaders to the NetworkingProcess.
        <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710

        Reviewed by Tim Horton.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
          compile the appropriate load parameters and then message to it.
          Otherwise, use the default in-process PingHandle.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2015-07-08  Beth Dakin  <bdakin@apple.com>

        Only support image previews for clients that implement commitPreviewedImageWithURL 
        delegate
        https://bugs.webkit.org/show_bug.cgi?id=146739
        -and corresponding-
        rdar://problem/21692929

        Reviewed by Tim Horton.

        We should only support image previews for clients that implement 
        commitPreviewedImageWithURL delegate since there is no default commit action.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):

2015-07-08  Anders Carlsson  <andersca@apple.com>

        Make ApplicationStateTracker be per view instead of being a singleton
        https://bugs.webkit.org/show_bug.cgi?id=146737

        Reviewed by Andreas Kling.

        * UIProcess/ApplicationStateTracker.h:
        Update to be per view instead of a singleton.

        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        Change to take a view + selectors.

        (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
        Invalidate the state monitor and remove the listeners.

        (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
        Just call the single background method.

        (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
        Just call the single foreground method.

        (WebKit::ApplicationStateTracker::singleton): Deleted.
        (WebKit::ApplicationStateTracker::addListener): Deleted.
        (WebKit::ApplicationStateTracker::invokeListeners): Deleted.
        (WebKit::ApplicationStateTracker::pruneListeners): Deleted.

        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
        Create the ApplicationStateTracker here.

        (-[WKContentView isBackground]):
        Get the ivar instead of the singleton.

2015-07-08  Beth Dakin  <bdakin@apple.com>

        InteractionInformationAtPosition bounds seem wrong on many sites, affects 
        apple.com
        https://bugs.webkit.org/show_bug.cgi?id=146736
        -and corresponding-
        rdar://problem/21655549

        Reviewed by Tim Horton.

        http://trac.webkit.org/changeset/186132/ changed the bounds for 
        InteractionInformationAtPosition. The image-related changes are good, but the 
        link-related changes feel wrong on many sites. We should revert the change for now 
        and just use the absoluteBoundingBoxRect() for non-images.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-07-08  Beth Dakin  <bdakin@apple.com>

        Add actions to image previews
        https://bugs.webkit.org/show_bug.cgi?id=146702
        -and corresponding-
        <rdar://problem/21642654>

        Reviewed by Sam Weinig.

        Add an array of actions and _WKActivatedElementInfo in order to properly invoke 
        the actions.
        * UIProcess/WKImagePreviewViewController.h:
        * UIProcess/WKImagePreviewViewController.mm:
        (-[WKImagePreviewViewController loadView]):
        (-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
        (_scaleSizeWithinSize):
        (-[WKImagePreviewViewController initWithCGImage:]): Deleted.

        Re-factor defaultActionsForImageSheet into a stand-alone function so that it can 
        be invoked for previews as well as for the action sheet.
        * UIProcess/ios/WKActionSheetAssistant.h:
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showImageSheet]):
        (-[WKActionSheetAssistant defaultActionsForLinkSheet]):
        (-[WKActionSheetAssistant defaultActionsForImageSheet]):
        (-[WKActionSheetAssistant showLinkSheet]):

        WKImagePreviewViewController initializer now takes the default actions and 
        _WKActivatedElementInfo.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):

2015-07-08  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
        https://bugs.webkit.org/show_bug.cgi?id=146732

        Reviewed by Sam Weinig.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
        responder.

2015-07-07  Anders Carlsson  <andersca@apple.com>

        Always begin a background task when needed, not just when we go into the background
        https://bugs.webkit.org/show_bug.cgi?id=146704

        Reviewed by Gavin Barraclough.

        The system let background code run for the same amount of time regardless of whether the assertion was grabbed
        when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.

        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
        (-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
        (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
        (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.

2015-07-08  Antti Koivisto  <antti@apple.com>

        Network Cache: Don't open files in main thread
        https://bugs.webkit.org/show_bug.cgi?id=146722

        Follow-up.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::dispatchReadOperation):

            Accessing m_bodyFilter is technically not thread safe so keep it in main thread.

2015-07-08  Antti Koivisto  <antti@apple.com>

        Network Cache: Don't open files in main thread
        https://bugs.webkit.org/show_bug.cgi?id=146722

        Reviewed by Chris Dumez.

        While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::dispatchReadOperation):

            Dispatch read operation to a concurrent queue.
            With this we can also eliminate the separate dispatch() for body blob read.

2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>

        [Unix] Remove unused local variable from Connection::sendOutgoingMessage().
        https://bugs.webkit.org/show_bug.cgi?id=146713

        Reviewed by Csaba Osztrogonác.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::sendOutgoingMessage):

2015-07-07  Tim Horton  <timothy_horton@apple.com>

        Occasional null deref in the CA callback in flushLayers()
        https://bugs.webkit.org/show_bug.cgi?id=146700
        <rdar://problem/21668754>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
        Make sure we keep the WebPage alive, and null-check the potentially null
        WebCore objects (Page and Frame).

2015-07-06  Matt Rajca  <mrajca@apple.com>

        Media Session: propagate metadata changes to UI clients
        https://bugs.webkit.org/show_bug.cgi?id=146660

        Reviewed by Tim Horton.

        * CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
        * Shared/API/APIObject.h: Added a media session metadata type.
        * Shared/API/c/WKBase.h:
        * Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
        (WebKit::WebMediaSessionMetadata::create):
        (WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
        (WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
        * Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
        (WebKit::WebMediaSessionMetadata::title):
        (WebKit::WebMediaSessionMetadata::artist):
        (WebKit::WebMediaSessionMetadata::album):
        * UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
        (API::UIClient::mediaSessionMetadataDidChange):
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
        (WKMediaSessionMetadataGetTypeID):
        (WKMediaSessionMetadataCopyTitle):
        (WKMediaSessionMetadataCopyArtist):
        (WKMediaSessionMetadataCopyAlbum):
        * UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
        * UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
        (WKPageSetPageUIClient):
        * UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
        * UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
        (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
        * WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.

2015-07-07  Brady Eidson  <beidson@apple.com>

        HTTP Auth cached after disabling private browsing/reset.
        <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654

        Reviewed by Tim Horton.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::getAuthenticationInfo):

2015-07-07  Anders Carlsson  <andersca@apple.com>

        Make sure to remove the download message receiver before freeing it
        https://bugs.webkit.org/show_bug.cgi?id=146687

        Reviewed by Simon Fraser.

        * UIProcess/Downloads/DownloadProxyMap.cpp:
        (WebKit::DownloadProxyMap::downloadFinished):

2015-07-07  Chris Dumez  <cdumez@apple.com>

        Unreviewed, Fix non-Mac build after r186464.

        * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
        (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):

2015-07-06  Anders Carlsson  <andersca@apple.com>

        Make sure to remove message receivers before they are deallocated
        https://bugs.webkit.org/show_bug.cgi?id=146666
        rdar://problem/21331118

        Reviewed by Tim Horton.

        Add code so we can assert that there are no message receiver maps pointing to a message receiver
        when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.

        * Platform/IPC/MessageReceiver.h:
        (IPC::MessageReceiver::~MessageReceiver):
        (IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
        (IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
        * Platform/IPC/MessageReceiverMap.cpp:
        (IPC::MessageReceiverMap::addMessageReceiver):
        (IPC::MessageReceiverMap::removeMessageReceiver):
        (IPC::MessageReceiverMap::invalidate):
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::removeMessageReceiver):
        * Shared/ChildProcess.h:
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::removeMessageReceiver):
        * Shared/ChildProcessProxy.h:
        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
        (-[WKBrowsingContextController dealloc]):
        * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
        * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
        (WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
        * UIProcess/WebConnectionToWebProcess.cpp:
        (WebKit::WebConnectionToWebProcess::invalidate):
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (-[WKWebProcessPlugInBrowserContextController dealloc]):
        * WebProcess/WebConnectionToUIProcess.cpp:
        (WebKit::WebConnectionToUIProcess::invalidate):

2015-07-06  Brent Fulgham  <bfulgham@apple.com>

        Ensure media playback is stopped during page close
        https://bugs.webkit.org/show_bug.cgi?id=146554
        <rdar://problem/18033944>

        Reviewed by Brady Eidson.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
        the process is being shut down.

2015-07-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r186385.
        https://bugs.webkit.org/show_bug.cgi?id=146668

        crashes 3 webaudio tests in debug builds (Requested by
        alexchristensen on #webkit).

        Reverted changeset:

        "Ensure media playback is stopped during page close"
        https://bugs.webkit.org/show_bug.cgi?id=146554
        http://trac.webkit.org/changeset/186385

2015-07-06  Brent Fulgham  <bfulgham@apple.com>

        Ensure media playback is stopped during page close
        https://bugs.webkit.org/show_bug.cgi?id=146554
        <rdar://problem/18033944>

        Reviewed by Brady Eidson.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
        the process is being shut down.

2015-07-06  Yongjun Zhang  <yongjun_zhang@apple.com>

        Allow UIDelegate to customize link actions in preview.
        https://bugs.webkit.org/show_bug.cgi?id=146567

        Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
        the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
        to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
        the client can run the action without knowing WKActionSheetAssistant.

        Reviewed by Beth Dakin.

        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
        * UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
        * UIProcess/API/Cocoa/_WKElementAction.mm:
        (-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
            iVar if the caller provides that.
        (+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
        (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
        (+[_WKElementAction _elementActionWithType:assistant:]):
        (+[_WKElementAction elementActionWithType:customTitle:]):
        (-[_WKElementAction runActionWithElementInfo:]):
        * UIProcess/API/Cocoa/_WKElementActionInternal.h:
        * UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
        (-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
            for preview view controller.
        (-[WKContentView didDismissPreviewViewController:committing:]):

2015-07-06  Brady Eidson  <beidson@apple.com>

        ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
        <rdar://problem/21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563

        Reviewed by Geoff Garen.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
        (-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
        * UIProcess/WebPageProxy.h:

2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r186357 to fix non Cocoa platforms.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteData):

2015-07-06  Antti Koivisto  <antti@apple.com>

        With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
        https://bugs.webkit.org/show_bug.cgi?id=146630
        <rdar://problem/21677340>

        Follow-up.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveBuffer):

            Typo 1014 -> 1024

2015-07-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r185896.
        https://bugs.webkit.org/show_bug.cgi?id=146647

        Caused by a refcounting error in GTK+; it's actually legal for
        the event to be null, just the gi annotations were wrong.
        (Requested by mcatanzaro on #webkit).

        Reverted changeset:

        "[GTK] Crash performing drag-and-drop"
        https://bugs.webkit.org/show_bug.cgi?id=146267
        http://trac.webkit.org/changeset/185896

2015-07-06  Anders Carlsson  <andersca@apple.com>

        Provide API to clear the HSTS cache
        https://bugs.webkit.org/show_bug.cgi?id=146565
        rdar://problem/20023805

        Reviewed by Tim Horton.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteData):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::clearHSTSCache):
        * Shared/WebsiteData/WebsiteDataTypes.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::computeNetworkProcessAccessTypeForDataRemoval):

2015-07-06  Antti Koivisto  <antti@apple.com>

        With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
        https://bugs.webkit.org/show_bug.cgi?id=146630
        <rdar://problem/21677340>

        Reviewed by Chris Dumez.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):

            Don't buffer multipart/x-mixed-replace. We never want to cache these.

        (WebKit::NetworkResourceLoader::didReceiveBuffer):

            Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
            keeps streaming. It also prevents giant entries from pushing other data out of the cache.

        (WebKit::NetworkResourceLoader::didFinishLoading):

2015-07-06  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
        https://bugs.webkit.org/show_bug.cgi?id=146627

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseDidRelaunchWebProcess):
        Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
        that pass in an X11 Window ID with the PLATFORM(X11) build guards.

2015-07-05  Chris Dumez  <cdumez@apple.com>

        [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
        https://bugs.webkit.org/show_bug.cgi?id=146625
        <rdar://problem/21585268>

        Reviewed by Gavin Barraclough.

        The current page's scroll position was lost when transferring the
        sessionState from one view to another. This is because we only update
        the current WebBackForwardListItem after navigating away.
        However, when the client swaps WebViews for navigating, we don't detect
        this as navigating away and the current WebBackForwardListItem is not
        updated with the current page's state (including the scroll position).
        This means that the information is not transferred via the sessionState
        and the scroll position (among other things) ends up being lost when
        navigating back in the new WebView.

        Retrieving the session state is a synchronous API and we want to avoid
        doing a synchronous IPC between the UIProcess and the WebProcess to
        retrieve the current page's state. Therefore, the approach chosen in
        this patch is to detect when the user is done scrolling the main frame
        (using a HystererisActivity) and then update the scroll position on the
        current HistoryItem. This way, the current WebBackForwardListItem
        normally has an up-to-date scroll position for the main frame when the
        sessionState is queried by the client.

        The solution is not perfect as we don't keep the whole page state
        up-to-date for the current WebBackForwardListItem, only the main frame
        state. However, the proposed solution is cheap, avoid synchronous IPC
        and provides a much better user experience in most cases.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::pageDidScroll):
        (WebKit::WebPage::pageStoppedScrolling):
        * WebProcess/WebPage/WebPage.h:

2015-07-05  Timothy Hatcher  <timothy@apple.com>

        Crash when closing the web inspector
        https://bugs.webkit.org/show_bug.cgi?id=146620

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
        in other places where it is used.

2015-07-04  Chris Dumez  <cdumez@apple.com>

        Drop RefPtr::clear() method
        https://bugs.webkit.org/show_bug.cgi?id=146556

        Reviewed by Brady Eidson.

        Drop RefPtr::clear() method in favor of "= nullptr;" pattern.        

2015-07-03  Dan Bernstein  <mitz@apple.com>

        [Xcode] Update some build settings as recommended by Xcode 7
        https://bugs.webkit.org/show_bug.cgi?id=146597

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
        GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

        * WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

2015-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
        https://bugs.webkit.org/show_bug.cgi?id=146545

        Reviewed by Sergio Villar Senin.

        In r186025 the readSync method used when traversing the cache
        files was removed in favor of using parallel async reads to speed
        up the traverse. The approach used doesn't work for soup, because
        the IO operations are async, but run their callbacks in the
        current thread. The network cache now runs up to 5 async reads in
        the io work queue thread, and waits for them to finish, and those
        asycn reads never finish for the soup backend because the thread
        is blocked waiting for them. We need to use a different thread to
        run those reads.

        * NetworkProcess/cache/NetworkCacheIOChannel.h: Add
        readSyncInThread private method.
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::IOChannel::read): When not called in the
        main thread, call readSyncInThread() instead.
        (WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
        operation synchronously in a different thread, since the current
        thread might be blocked waiting for us.

2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>

        [EFL] test_ewk2_application_cache_manager has been failed since r185527
        https://bugs.webkit.org/show_bug.cgi?id=146016

        Reviewed by Gyuyoung Kim.

        In order to handle properly WebApplicationCacheManagerProxy implementation which use
        WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
        Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.

        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
        (TEST_F): enable ewk_application_cache_manager as it is passing now.

2015-07-02  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r186247 and r186250.
        https://bugs.webkit.org/show_bug.cgi?id=146572

        Broke the build on Mavericks bots (Requested by cdumez on
        #webkit).

        Reverted changesets:

        "Provide API to clear the HSTS cache"
        https://bugs.webkit.org/show_bug.cgi?id=146565
        http://trac.webkit.org/changeset/186247

        "Unreviewed build fix for non-COCOA ports after r186247."
        http://trac.webkit.org/changeset/186250

2015-07-02  Jinwoo Song  <jinwoo7.song@samsung.com>

        Unreviewed build fix for non-COCOA ports after r186247.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.

2015-07-02  Anders Carlsson  <andersca@apple.com>

        Provide API to clear the HSTS cache
        https://bugs.webkit.org/show_bug.cgi?id=146565
        rdar://problem/20023805

        Reviewed by Tim Horton.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteData):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::clearHSTSCache):
        * Shared/WebsiteData/WebsiteDataTypes.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::computeNetworkProcessAccessTypeForDataRemoval):

2015-07-02  Mark Lam  <mark.lam@apple.com>

        Gardening: fix broken 32-bit build..
        https://bugs.webkit.org/show_bug.cgi?id=146416

        Not reviewed.

        * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
        (API::SerializedScriptValue::deserialize):

2015-07-02  Brent Fulgham  <bfulgham@apple.com>

        Correct *another* typo in r186238.

        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.

2015-07-02  Brent Fulgham  <bfulgham@apple.com>

        Correct typo in r186238.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

2015-07-02  Brent Fulgham  <bfulgham@apple.com>

        Provide delegate SPI for clients to notify WebKit about content inset changes
        https://bugs.webkit.org/show_bug.cgi?id=146482
        <rdar://problem/21602741>

        Reviewed by Darin Adler.

        Provide a new SPI for WebKit client applications to use to inform WebKit of planned
        adjustments to the edge insets of the view.

        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
        method exists, use the specified content insets, rather than the current state of the view.

2015-07-02  Beth Dakin  <bdakin@apple.com>

        Allow the UIDelegate to customize an image preview
        https://bugs.webkit.org/show_bug.cgi?id=146557
        -and corresponding-
        rdar://problem/21657424

        Reviewed by Tim Horton.

        Add imageURL to InteractionInformationAtPosition.
        * Shared/InteractionInformationAtPosition.cpp:
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * Shared/InteractionInformationAtPosition.h:

        Two new delegate methods.
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

        Call the delegate methods at the appropriate time.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):
        (-[WKContentView commitPreviewViewController:]):

        Include the imageURL in InteractionInformationAtPosition.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-07-02  Anders Carlsson  <andersca@apple.com>

        Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
        https://bugs.webkit.org/show_bug.cgi?id=146558

        Reviewed by Beth Dakin.

        * Shared/ios/NativeWebTouchEventIOS.mm:
        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):

2015-07-02  Brady Eidson  <beidson@apple.com>

        Remove change I accidentally committed in r186232

        * UIProcess/WebsiteData/WebsiteDataStore.h:

2015-07-02  Alex Christensen  <achristensen@webkit.org>

        Fix EWS build after r186182.

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::userMediaPermissionRequestManager):
        Don't export a function defined in a header, or it will generate a weak external symbol.

2015-07-02  Brady Eidson  <beidson@apple.com>

        Add preference to disable all http-equiv.
        <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:
        
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
          the "httpEquivEnabled" setting.
        (WKPreferencesGetMetaRefreshEnabled): Ditto
        (WKPreferencesSetHTTPEquivEnabled):
        (WKPreferencesGetHTTPEquivEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-07-02  Mark Lam  <mark.lam@apple.com>

        WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
        https://bugs.webkit.org/show_bug.cgi?id=146416

        Reviewed by Anders Carlsson.

        The core issue here is that we need to be able to deserialized an
        API::SerializedScriptValue instance into an ObjC object graph.  We'll solve this
        by introducing a API::SerializedScriptValue::deserialize() functions that does
        the job.  The deserialize() function will will use a SharedJSContext to provide
        the needed JSContext for doing this work.

        Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
        deserialize() function.

        * Shared/API/APISerializedScriptValue.h:
        (API::SerializedScriptValue::deserialize):
        (API::SerializedScriptValue::internalRepresentation):
        - Changed to return a WebCore::SerializedScriptValue*.  This makes it friendlier
          to use in the 2 places that need it.

        * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.
        (API::SharedJSContext::SharedJSContext):
        (API::SharedJSContext::ensureContext):
        (API::SharedJSContext::releaseContext):
        (API::SerializedScriptValue::deserialize):
        * UIProcess/API/Cocoa/WKUserContentController.mm:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView evaluateJavaScript:completionHandler:]):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkitWebViewRunJavaScriptCallback):
        - Removed a now unnecessary cast.
        * WebKit2.xcodeproj/project.pbxproj:

2015-07-02  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
        https://bugs.webkit.org/show_bug.cgi?id=146542

        Reviewed by Sam Weinig.

        * WebKit2.xcodeproj/project.pbxproj: Removed the build phase that makes the directory of
        symlinks.

2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
        https://bugs.webkit.org/show_bug.cgi?id=146234

        Reviewed by Sergio Villar Senin.

        This is because we don't provide any quota, and 0 is used by
        default, so there's never enough quota and openDatabase fails. We
        should expose this in the API, but for now, we could use a default
        quota of 5MB like WTR does.

        * UIProcess/API/gtk/WebKitUIClient.cpp: Override
        exceededDatabaseQuota and return always the default quota.
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::exceededDatabaseQuota): Return the quota based on the
        expected usage and current database usabe like mac does.
        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add
        custom UI client to implement exceededDatabaseQuota.

2015-07-02  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r185704.
        https://bugs.webkit.org/show_bug.cgi?id=146544

        Didn't fix the problem (Requested by anttik on #webkit).

        Reverted changeset:

        "~4% Membuster regression after WebKit r185452"
        https://bugs.webkit.org/show_bug.cgi?id=146112
        http://trac.webkit.org/changeset/185704

2015-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Accelerated Compositing stops working after a web process crash
        https://bugs.webkit.org/show_bug.cgi?id=146508

        Reviewed by Martin Robinson.

        The problem is that we don't send the window ID again to the new
        web process.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::didRelaunchProcess): Call
        webkitWebViewBaseDidRelaunchWebProcess().
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseDidRelaunchWebProcess): Set the window ID to
        the new drawing area.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
        https://bugs.webkit.org/show_bug.cgi?id=146525

        Reviewed by Timothy Hatcher.

        * WebProcess/com.apple.WebProcess.sb.in:
        Get NSBeep working without any sandbox warnings.

2015-07-01  Anders Carlsson  <andersca@apple.com>

        Remove code to recompute rounded window corners
        https://bugs.webkit.org/show_bug.cgi?id=146534

        Reviewed by Simon Fraser.

        This code is no longer needed since we're always layer-backed now.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView displayIfNeeded]): Deleted.
        (-[WKView _cacheWindowBottomCornerRect]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:

2015-07-01  Yongjun Zhang  <yongjun_zhang@apple.com>

        Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
        https://bugs.webkit.org/show_bug.cgi?id=146439

        When web page is loading, we hold a background activity token in NavigationState and we release the token when the page done
        loading. A web page can start loading subresources (like XHR) after the page is loaded, and WebPageProxy will update its
        _networkRequestsInProgress state which will notify the client there is network actvity on-going. Since we don't hold
        the background activity token after page is loaded, the WebContent process could become suspended without notifying the client
        and the client will lose track of the loading state.

        The first thought was to hold another background activity when _networkRequestsInProgress flag is set in NavigationState.
        However, this could result in side-effect that a WebContent process can stay active for too long if there is a long lasting
        XHR resquest.
        
        This patch fix this by notifying the client that network activity is stopped when WebContent process is going to be suspended.
        We also cache the networkRequestsInProgress state for suspended process, so that when it becomes foreground, we can tell
        the client the correct state of network activity.

        Reviewed by Dan Bernstein.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy): Initialize m_hasNetworkRequestsOnSuspended.
        (WebKit::WebPageProxy::processWillBecomeSuspended): If there is pending requests on suspend, cache the network activity state
            and notify the client.
        (WebKit::WebPageProxy::processWillBecomeForground): Restore the network activity state when the process becomes foreground. 
        (WebKit::WebPageProxy::resetState):
        * UIProcess/WebPageProxy.h: Add a data member m_hasNetworkRequestsOnSuspended to cache the network activity state on process
            suspend.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didSetAssertionState):

2015-07-01  Dean Jackson  <dino@apple.com>

        Disable the experimental WebGL2 implementation
        https://bugs.webkit.org/show_bug.cgi?id=146526
        <rdar://problem/21641235>

        Reviewed by Myles Maxfield.

        Add (and disable) an ENABLE_WEBGL2 flag.

        * Configurations/FeatureDefines.xcconfig:

2015-07-01  Brady Eidson  <beidson@apple.com>

        Never try to pass URLs to LaunchServices when they're the same domain as the current URL.
        <rdar://problem/20731429> and https://bugs.webkit.org/show_bug.cgi?id=146521

        Reviewed by Alex Christensen.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::tryAppLink): Compare the proposed URL to the current URL to see if they’re in the same domain.
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

2015-07-01  Tim Horton  <timothy_horton@apple.com>

        WKWebView snapshots have the wrong scale after rotation
        https://bugs.webkit.org/show_bug.cgi?id=146476
        <rdar://problem/18345247>

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]):
        "Coordinate" -> "Coordinates".

        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
        Defer any snapshotting that happens during a resize until after
        the resize completes. This will ensure that (in the case of an IOSurface
        snapshot) the tiles are up to date, and (in the case of a software snapshot)
        that our understanding of the scale and scroll offset of the WKContentView
        are up to date, so that we can correctly convert from view to content coordinates
        in the UI process.

        (-[WKWebView _endAnimatedResize]):
        Perform the deferred snapshotting after the resize completes.

2015-07-01  Beth Dakin  <bdakin@apple.com>

        This is a quick follow-on to http://trac.webkit.org/changeset/186132

        Rubber-stamped by Darin Adler.

        Make this a one-liner.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-07-01  Matthew Daiter  <mdaiter@apple.com>

        Enable MEDIA_STREAM flag
        https://bugs.webkit.org/show_bug.cgi?id=145947
        <rdar://problem/21365829>

        Reviewed by Eric Carlson.

        * Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
        * WebKit2.xcodeproj/project.pbxproj: Changed some project to private
        declarations of headers
        * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::userMediaPermissionRequestManager):

2015-07-01  Brady Eidson  <beidson@apple.com>

        Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
        <rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513

        Reviewed by Darin Adler.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
          shouldOpenExternalURLs actually fits this role perfectly.

2015-07-01  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
        https://bugs.webkit.org/show_bug.cgi?id=146512

        Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseCreateWebPage):

2015-06-30  Martin Robinson  <mrobinson@igalia.com>

        [GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
        https://bugs.webkit.org/show_bug.cgi?id=144828

        Reviewed by Carlos Garcia Campos.

        Instead of setting spell checking languages unconditionally when building int
        developer mode, add some C API that allows setting them in WebKitTestRunner.

        * PlatformGTK.cmake: Add the new C API file to the source list.
        * UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
        (WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
        the spell checking languages from the C API.
        * UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
        for development builds.

2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Numerous CGColor leaks in swipe gestures
        https://bugs.webkit.org/show_bug.cgi?id=146501

        Reviewed by Tim Horton.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):

2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
        https://bugs.webkit.org/show_bug.cgi?id=146503

        Reviewed by Tim Horton.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
        Simplify adoption into a new RetainPtr.

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        Fix CoordinatedGraphics.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        More Gtk/EFL fixing.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):

2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>

        Implement ECMAScript Internationalization API
        https://bugs.webkit.org/show_bug.cgi?id=90906

        Reviewed by Benjamin Poulain.

        * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        Fix Mac and Windows builds.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Missing tiles inside position:fixed on scrolling
        https://bugs.webkit.org/show_bug.cgi?id=146485
        rdar://problem/21226861

        Reviewed by Tim Horton.

        Layer flushing adjusts the coverage rect for tiled layers, but does so at times
        when position:fixed layers are moved around by the scrolling tree. The computed
        coverage rect then doesn't reflect the layer's on-screen position, causing missing
        tiles.

        Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
        that state into the layer flush. When not in a stable state, flushing doesn't change
        the visible and coverage rects for layers that are viewport-constrained.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):

2015-06-30  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Implement ewk_favicon_database_clear() API.
        https://bugs.webkit.org/show_bug.cgi?id=146337

        Reviewed by Gyuyoung Kim.

        We need to provide way to clear favicon data.

        * UIProcess/API/efl/ewk_favicon_database.cpp:
        (EwkFaviconDatabase::getIconSurfaceSynchronously):
        (EwkFaviconDatabase::clearFaviconDatabase):
        (EwkFaviconDatabase::iconDataReadyForPageURL):
        (ewk_favicon_database_icon_change_callback_del):
        (ewk_favicon_database_clear):
        * UIProcess/API/efl/ewk_favicon_database.h:
        * UIProcess/API/efl/ewk_favicon_database_private.h:
        * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
        (TEST_F):

2015-06-30  Andreas Kling  <akling@apple.com>

        [iOS] Ignore viewport rect changes during zoom bouncing.
        <https://webkit.org/b/146480>

        Reviewed by Benjamin Poulain.

        When the user has pinch-zoomed past the maximum zoom scale and lets go of the screen,
        we animate a bounce back to the maximum scale.

        Suppress viewport rect updates during this bounce animation since we don't need them
        anyway. This fixes an issue where we'd sometimes get a weird rect during the animation
        and if could send that to the web process, causing it to generate tiles for a part of
        the page that's not actually exposed.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _updateVisibleContentRects]):

2015-06-30  Enrica Casucci  <enrica@apple.com>

        <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category

        Reviewed by Benjamin Poulain.

        * Platform/spi/ios/UIKitSPI.h:
        * Shared/WebEvent.h:
        (WebKit::WebTouchEvent::WebTouchEvent):
        (WebKit::WebTouchEvent::position):
        (WebKit::WebTouchEvent::isPotentialTap):
        (WebKit::WebTouchEvent::isGesture):
        (WebKit::WebTouchEvent::gestureScale):
        (WebKit::WebTouchEvent::gestureRotation):
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
        * Shared/ios/NativeWebTouchEventIOS.mm:
        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
        * Shared/ios/WebTouchEventIOS.cpp:
        (WebKit::WebTouchEvent::encode):
        (WebKit::WebTouchEvent::decode):
        Pipe isPotentialTap through.

2015-06-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [EFL] Unreviewed build fix after r186118.

        Add if PLATFORM(COCOA) back.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
        * WebProcess/WebProcess.h:

2015-06-30  Simon Fraser  <simon.fraser@apple.com>

        Crash under _layoutForNodeHighlight: when inspecting espn.com
        https://bugs.webkit.org/show_bug.cgi?id=146422

        Reviewed by Joseph Pecoraro.
        
        When inspecting espn.com, MobileSafari sometimes crashes, because
        highlight.quads is empty. I was not able to quickly determine why.

        Fix by bailing in this case.

        * UIProcess/WKInspectorHighlightView.mm:
        (-[WKInspectorHighlightView _layoutForNodeHighlight:]):

2015-06-30  Matt Baker  <mattbaker@apple.com>

        Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
        https://bugs.webkit.org/show_bug.cgi?id=146168

        Reviewed by Brian Burg.

        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        Added CA transaction post-commit handlers to instrument end of composite.

2015-06-30  Beth Dakin  <bdakin@apple.com>

        The bounds on InteractionInformationAtPosition should be more precise
        https://bugs.webkit.org/show_bug.cgi?id=146468
        -and corresponding-
        rdar://problem/20739834

        Reviewed by Enrica Casucci and Simon Fraser.

        For links, get the TextQuads from the Range, and for images, look at the 
        absoluteContentQuad(). All other items can continue to use absoluteBoundingBox.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-06-30  Anders Carlsson  <andersca@apple.com>

        Disable Spintracer when getting the list of plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=146467
        rdar://problem/21616640

        Reviewed by Tim Horton.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::populatePluginCache):

2015-06-30  Anders Carlsson  <andersca@apple.com>

        Java Plugin cannot launch JavaUpdater.app after renaming
        https://bugs.webkit.org/show_bug.cgi?id=146464
        rdar://problem/19747153

        Reviewed by Tim Horton.

        Check for both "JavaUpdater.app" and "Java Updater.app".

        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::isJavaUpdaterURL):

2015-06-30  Chris Dumez  <cdumez@apple.com>

        [WK2] Avoid taking a useless / blank navigation snapshot when navigating after restoring sessionState
        https://bugs.webkit.org/show_bug.cgi?id=146446
        <rdar://problem/21584231>

        Reviewed by Darin Adler.

        We currently take a useless / blank navigation snapshot when navigating
        after restoring the back / forward list from a sessionState object.
        This is because we get a current HistoryItem from the sessionState
        which we have never really navigated to. We then take a navigation
        snapshot for the current HistoryItem when navigating away as we usually
        do. However, in this case, the HistoryItem was imported and there is
        nothing to snapshot.

        Taking this snapshot is not only wasteful, it can also potentially
        overwrite the snapshot that was set by the client using
        WKWebView._saveBackForwardSnapshotForItem() SPI.

        To address the problem, this patch suppresses navigation snapshotting
        after restoring the back / forward list from a session state and until
        the next load is committed.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::recordNavigationSnapshot):
        (WebKit::WebPageProxy::restoreFromSessionState):
        (WebKit::WebPageProxy::didCommitLoadForFrame):
        * UIProcess/WebPageProxy.h:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Get rid of unused WKSI functions
        https://bugs.webkit.org/show_bug.cgi?id=146443

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebView.mm:
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::destroyRenderingResources):

2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [GTK] Unreviewed GTK build fix since r186088 and r186095.
        https://bugs.webkit.org/show_bug.cgi?id=146449

        * PlatformGTK.cmake:
        * UIProcess/API/gtk/PageClientImpl.h:

2015-06-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Unreviewed EFL build fix since r186088 and r186095.

        * CMakeLists.txt: Remove ConnectionStack.cpp.
        * UIProcess/CoordinatedGraphics/WebView.h: Override virtual didFailLoadForMainFrame().

2015-06-29  Brady Eidson  <beidson@apple.com>

        Flag sync XHRs from the network process so they can be handled appropriately.
        <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkResourceLoader.h:
        (WebKit::NetworkResourceLoader::loadingSynchronousXHR): Return isSynchronous().

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Remove an empty group from the Xcode project.

        * WebKit2.xcodeproj/project.pbxproj:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Get rid of ConnectionStack
        https://bugs.webkit.org/show_bug.cgi?id=146437

        Reviewed by Andreas Kling.

        Just use a TemporaryChange and a static variable instead.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::setGlobalException):
        (WebKit::WebProcessConnection::didReceiveMessage):
        (WebKit::WebProcessConnection::didReceiveSyncMessage):
        * Shared/ConnectionStack.cpp: Removed.
        (WebKit::ConnectionStack::singleton): Deleted.
        * Shared/ConnectionStack.h: Removed.
        (WebKit::ConnectionStack::current): Deleted.
        (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): Deleted.
        (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-29  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didFailLoadForMainFrame]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::didFailLoadForMainFrame):

2015-06-29  Dean Jackson  <dino@apple.com>

        Temporarily disable PICTURE_SIZES
        https://bugs.webkit.org/show_bug.cgi?id=146435
        <rdar://problem/21087013>

        Temporarily disable PICTURE_SIZES because it causes problems with out
        of date <picture> polyfills.

        Temporarily disable PICTURE_SIZES until Safari branches.

        * Configurations/FeatureDefines.xcconfig:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Don't try to access a possibly deallocated WebFrameProxy object
        https://bugs.webkit.org/show_bug.cgi?id=146428
        rdar://problem/21446364

        Reviewed by Tim Horton.

        Make sure to call isMainFrame before calling out to the client inside
        WebPageProxy::didFailLoadForFrame, matching what we do for WebPageProxy::didFinishLoadForFrame.

        Also, add a ViewGestureController::didFailLoadForMainFrame function and call that instead of
        calling didFinishLoadForMainFrame in the failure case.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didFailLoadForMainFrame]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFailLoadForFrame):
        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
        (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didFailLoadForMainFrame):
        * UIProcess/mac/ViewGestureController.h:
        (WebKit::ViewGestureController::didFinishLoadForMainFrame):
        (WebKit::ViewGestureController::didFailLoadForMainFrame):
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
        (WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.

2015-06-29  Yongjun Zhang  <yongjun_zhang@apple.com>

        Disable default gesture recognizers on preview.
        https://bugs.webkit.org/show_bug.cgi?id=146424
        rdar://problem/21572828

        We should disable default gesture recognizers on preview, to avoid activating links or
        triggering touch events accidentally. We can enable them after preview finishes.

        Reviewed by Beth Dakin.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
        (-[WKContentView didDismissPreviewViewController:committing:]):

2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>

        Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
        https://bugs.webkit.org/show_bug.cgi?id=146379

        Reviewed by Darin Adler.

        Since font panel doesn't open in WebKit2 at the moment, just add an empty implementation of didApplyStyle

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::didApplyStyle):
        * WebProcess/WebCoreSupport/WebEditorClient.h:
        * WebProcess/WebPage/WebPage.h:

2015-06-29  Dean Jackson  <dino@apple.com>

        Setting to enable/disable media controls sizing on page zoom
        https://bugs.webkit.org/show_bug.cgi?id=146423
        <rdar://problem/18379634>

        Reviewed by Eric Carlson.

        Add a new setting "MediaControlsScaleWithPageZoom" that can disable
        the behaviour we currently implement on iOS, where the media controls
        attempt to remain at a fixed size independent of page zoom.

        * Shared/WebPreferencesDefinitions.h: Initialize to false on iOS, true otherwise.
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMediaControlsScaleWithPageZoom):
        (WKPreferencesGetMediaControlsScaleWithPageZoom):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-06-29  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
        https://bugs.webkit.org/show_bug.cgi?id=146415
        <rdar://problem/21595801>

        Reviewed by Tim Horton.

        Swipe gesture snapshot previously stayed up for 3 seconds when swiping
        back after a top-hit navigation. This is because we do not restore the
        scroll position in this case and the ViewGestureController was waiting
        for the scroll position to be restored before taking down the snapshot.

        This patch adds a fail-safe mechanism so that the WebProcess can let
        the UIProcess know (via a CouldNotRestorePageState IPC) that the page
        state (including scroll position) could not be restored so that it can
        let the ViewGestureController it should not wait for the scroll
        position to be restored.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _couldNotRestorePageState]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::couldNotRestorePageState):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::couldNotRestorePageState):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::restorePageState):

2015-06-29  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Add WKWebView private API to save a back/forward snapshot
        https://bugs.webkit.org/show_bug.cgi?id=146398
        <rdar://problem/21584231>

        Reviewed by Dan Bernstein.

        Add WKWebView private API to save a back/forward snapshot so that the
        client can make sure a back/forward snapshot is available even when
        swapping WKWebView upon navigation.

        This matches the WKView.saveBackForwardSnapshotForItem API we have on
        Mac.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView saveBackForwardSnapshotForItem:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:

2015-06-29  Anders Carlsson  <andersca@apple.com>

        Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
        https://bugs.webkit.org/show_bug.cgi?id=146413

        Reviewed by Andreas Kling.

        Replace SPI with API.

        * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
        (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Deleted.

2015-06-29  Enrica Casucci  <enrica@apple.com>

        [iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view.
        https://bugs.webkit.org/show_bug.cgi?id=146290
        rdar://problem/18466015

        We don't normally get called by the keyboard to handle the event if we are not
        interacting with editable content. In order to receive all the hardware keyboard events
        we need to implement _handleKeyUIEvent which is called for every key event
        when the view is first responder. This gives us the opportunity to send each keystroke
        to the WebProcess to let any Javascript handler intercept it and then perform the default
        action for the key combination.
        Unfortunately this mechanism does not provide key repeat, which is implemented in the
        keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands
        mechanism only for those.

        Reviewed by Darin Adler.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _scrollByOffset:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView canPerformAction:withSender:]):
        (-[WKContentView keyCommands]):
        (-[WKContentView _arrowKey:]):
        (-[WKContentView _handleKeyUIEvent:]):
        (-[WKContentView handleKeyEvent:]):
        (-[WKContentView handleKeyWebEvent:]):
        (-[WKContentView _interpretKeyEvent:isCharEvent:]):

2015-06-28  Dan Bernstein  <mitz@apple.com>

        Fixed the iOS 8.x build after r186066.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::create):

2015-06-28  Dan Bernstein  <mitz@apple.com>

        Fixed the iOS build after r186059.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:

2015-06-28  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS: Crash at accessibilityObjectForMainFramePlugin()
        https://bugs.webkit.org/show_bug.cgi?id=146399

        Reviewed by Darin Adler.

        Could not reproduce issue, but the invalid address seems to indicate this is a nullptr access is happening when we try to get the plugin of the m_page variable when
        it has not been initialized.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::accessibilityObjectForMainFramePlugin):

2015-06-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use Ref/RefPtr instead of PassRefPtr in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=146190

        Reviewed by Darin Adler.

        As a step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.

        * Shared/API/c/WKContextMenuItem.cpp:
        (WKContextMenuItemCreateAsAction):
        (WKContextMenuItemCreateAsCheckableAction):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::create):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
        (WebKit::ThreadSafeCoordinatedSurface::create):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::create):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * Shared/Plugins/NPRemoteObjectMap.cpp:
        (WebKit::NPRemoteObjectMap::create):
        * Shared/Plugins/NPRemoteObjectMap.h:
        * Shared/WebBatteryStatus.h:
        (WebKit::WebBatteryStatus::create):
        * Shared/WebCertificateInfo.h:
        (WebKit::WebCertificateInfo::create):
        * Shared/WebContextMenuItem.h:
        (WebKit::WebContextMenuItem::create):
        * Shared/WebRenderObject.cpp:
        (WebKit::WebRenderObject::create):
        * Shared/WebRenderObject.h:
        (WebKit::WebRenderObject::create):
        * UIProcess/API/APINavigationData.h:
        (API::NavigationData::create):
        * UIProcess/API/APISession.cpp:
        (API::Session::createEphemeral):
        * UIProcess/API/APISession.h:
        * UIProcess/API/APISessionState.cpp:
        (API::SessionState::create):
        * UIProcess/API/APISessionState.h:
        * UIProcess/API/APIUserScript.h:
        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::createNonPersistentDataStore):
        (API::WebsiteDataStore::create):
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/C/WKCredential.cpp:
        (WKCredentialCreate):
        (WKCredentialCreateWithCertificateInfo):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageCopySessionState):
        (WKPageSetPageContextMenuClient):
        * UIProcess/API/C/WKSessionStateRef.cpp:
        (WKSessionStateCreateFromData):
        * UIProcess/API/C/WKUserScriptRef.cpp:
        (WKUserScriptCreateWithSource):
        * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
        (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
        * UIProcess/API/Cocoa/WKProcessGroup.mm:
        (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]):
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (+[WKWebsiteDataStore nonPersistentDataStore]):
        * UIProcess/API/efl/ewk_auth_request_private.h:
        (EwkAuthRequest::create):
        * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
        (EwkBackForwardListItem::create):
        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::create):
        * UIProcess/API/efl/ewk_context_menu_private.h:
        (EwkContextMenu::create):
        * UIProcess/API/efl/ewk_download_job_private.h:
        (EwkDownloadJob::create):
        * UIProcess/API/efl/ewk_file_chooser_request_private.h:
        (EwkFileChooserRequest::create):
        * UIProcess/API/efl/ewk_form_submission_request_private.h:
        (EwkFormSubmissionRequest::create):
        * UIProcess/API/efl/ewk_navigation_data_private.h:
        (EwkNavigationData::create):
        * UIProcess/API/efl/ewk_security_origin_private.h:
        (EwkSecurityOrigin::create):
        * UIProcess/Authentication/AuthenticationChallengeProxy.h:
        (WebKit::AuthenticationChallengeProxy::create):
        * UIProcess/Authentication/AuthenticationDecisionListener.h:
        (WebKit::AuthenticationDecisionListener::create):
        * UIProcess/Authentication/WebCredential.h:
        (WebKit::WebCredential::create):
        * UIProcess/Authentication/WebProtectionSpace.h:
        (WebKit::WebProtectionSpace::create):
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::create):
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Launcher/ProcessLauncher.h:
        (WebKit::ProcessLauncher::create):
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
        (WebKit::WebNotificationManagerProxy::create):
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::create):
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
        (WebKit::RemoteScrollingTree::create):
        * UIProcess/Scrolling/RemoteScrollingTree.h:
        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        * UIProcess/efl/WebPopupMenuListenerEfl.h:
        (WebKit::WebPopupMenuListenerEfl::create):
        * UIProcess/efl/WebViewEfl.cpp:
        (WebKit::WebView::create):
        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::create):

2015-06-28  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Remove _WKSecurityOrigin.{h,mm}
        https://bugs.webkit.org/show_bug.cgi?id=146402

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Declare and define _WKSecurityOrigin here.
        (-[WKSecurityOrigin methodSignatureForSelector:]): Moved into a WKBinaryCompatibility
        category.
        (-[WKSecurityOrigin forwardInvocation:]): Ditto.
        * UIProcess/API/Cocoa/_WKSecurityOrigin.h: Removed.
        * UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Removed.
        * WebKit2.xcodeproj/project.pbxproj: Removed references to _WKSecurityOrigin.{h,mm}.

2015-06-28  Dan Bernstein  <mitz@apple.com>

        Tried to fix the EFL buid after r186046.

        * UIProcess/efl/PageUIClientEfl.cpp:
        (WebKit::PageUIClientEfl::PageUIClientEfl):

2015-06-28  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21581792> REGRESSION (r185915): Source-incompatible change in WKPageUIClient
        https://bugs.webkit.org/show_bug.cgi?id=146396

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKPageUIClient.h: Renamed
        runJavaScript{Alert,Confirm,Prompt}_deprecatedForUseWithV0 back to runJavaScript{Alert,Confirm,Prompt}
        in client versions prior to V5.

2015-06-28  Tim Horton  <timothy_horton@apple.com>

        REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
        https://bugs.webkit.org/show_bug.cgi?id=146393
        <rdar://problem/21113217>

        Reviewed by Sam Weinig.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
        Don't include the top content inset in the layout size.

2015-06-26  Antti Koivisto  <antti@apple.com>

        Make NetworkCache::traverse faster
        https://bugs.webkit.org/show_bug.cgi?id=146354

        Reviewed by Anders Carlsson.

        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        (WebKit::NetworkCache::IOChannel::path):
        (WebKit::NetworkCache::IOChannel::type):
        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::open):
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::write):
        (WebKit::NetworkCache::IOChannel::readSync): Deleted.

            Not needed anymore.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
        (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):

            Add TraverseOperation, similar to Read/Write.

        (WebKit::NetworkCache::Storage::open):
        (WebKit::NetworkCache::Storage::traverse):

            Use async I/O.
            Use condition variable to allow maximum 5 parallel file reads.

        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] NetworkCache: Make NetworkProcess::clearDiskCache actually clear the the resources depending on the date
        https://bugs.webkit.org/show_bug.cgi?id=146316

        Reviewed by Sergio Villar Senin.

        And make sure the completion handler is called, as well. This
        functionality is already implemented in Storage::clear(), so we
        just need to pass the time point and completion handler to Cache::clear().

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::clearDiskCache):

2015-06-26  Beth Dakin  <bdakin@apple.com>

        Rubber-stamped by Tim Horton.

        As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of  
        getting the screen size was problematic on multiple counts. Fixed here by using 
        UIScreen. 
        * UIProcess/WKImagePreviewViewController.mm:
        (-[WKImagePreviewViewController initWithCGImage:]):

2015-06-26  Beth Dakin  <bdakin@apple.com>

        WebPage::getPositionInformation() should not copy an image that is larger than the  
        screen
        https://bugs.webkit.org/show_bug.cgi?id=146367

        Reviewed by Tim Horton.

        Maintain aspectRatio, but scale down the buffer size if the image is larger than 
        the screen.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-06-26  Mark Lam  <mark.lam@apple.com>

        Re-instating the #import and assertion removed in r186014.
        https://bugs.webkit.org/show_bug.cgi?id=146358

        Not reviewed.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        - Speculative fix: should have used <wtf/MainThread.h> instead of <WTF/MainThread.h>.

2015-06-26  Mark Lam  <mark.lam@apple.com>

        Gardening: remove an assertion and a #import to green the bot.
        https://bugs.webkit.org/show_bug.cgi?id=146358

        Not reviewed.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        - Not sure why the <WTF/MainThread.h> cannot be found on some bots, but I'm
          removing it (and the assertion that needed it) for now while I investigate
          further.

2015-06-26  Mark Lam  <mark.lam@apple.com>

        ScriptMessageHandlerDelegate::didPostMessage() should reuse its JSContext instance.
        https://bugs.webkit.org/show_bug.cgi?id=146358

        Reviewed by Anders Carlsson.

        Currently, ScriptMessageHandlerDelegate::didPostMessage() creates a new JSContext each
        time it is called.  This JSContext is used only once to deserialized a JSON object
        and then destroyed.  We will change ScriptMessageHandlerDelegate to cache the JSContext
        and reuse it in all subsequent calls to didPostMessage().

        Also added a @autoreleasepool scope in didPostMessage() so that transient ObjC objects
        will be release sooner.

        * UIProcess/API/Cocoa/WKUserContentController.mm:

2015-06-26  Beth Dakin  <bdakin@apple.com>

        Add support for image previews
        https://bugs.webkit.org/show_bug.cgi?id=146350
        -and corresponding-
        rdar://problem/20640234

        Reviewed by Tim Horton.

        For images, use the actual image instead of a snapshot.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

        ViewController for image preview.
        * UIProcess/WKImagePreviewViewController.h: Added.
        * UIProcess/WKImagePreviewViewController.mm: Added.
        (-[WKImagePreviewViewController loadView]):
        (-[WKImagePreviewViewController initWithCGImage:]):
        (-[WKImagePreviewViewController viewDidLayoutSubviews]):
        (_scaleSizeWithinSize):

        New enum and member variable to keep track of preview type.
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:

        Only apply the http restriction to non-image links since we can still preview the 
        image of a non-http image link.
        (-[WKContentView gestureRecognizerShouldBegin:]):

        Handle links and images.
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):

        Return early for non-link previews.
        (-[WKContentView commitPreviewViewController:]):

        New files.
        * WebKit2.xcodeproj/project.pbxproj:

        Just use the actual image in the PositionInformation for image elements rather 
        than taking a screen shot.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2015-06-26  Matt Rajca  <mrajca@apple.com>

        Wireless Playback Target-related #import should be a #include
        https://bugs.webkit.org/show_bug.cgi?id=146283

        Reviewed by Eric Carlson.

        * Shared/WebCoreArgumentCoders.cpp:

2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Add Support for OS X Full Screen Mode
        https://bugs.webkit.org/show_bug.cgi?id=123510

        Reviewed by Timothy Hatcher.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::createInspectorWindow):
        Allow full screen.

2015-06-25  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Make send / receive messages to communicate the Web and UI Processes using Injected Bundle.
        https://bugs.webkit.org/show_bug.cgi?id=145685

        Reviewed by Gyuyoung Kim.

        To have extensible port specific API facility using Injected Bundle,
        we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.

        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::EwkContext):
        (EwkContext::findOrCreateWrapper):
        (bundlePathForExtension):
        (EwkContext::create):
        (EwkContext::allowSpecificHTTPSCertificateForHost):
        (EwkContext::isDefaultBundle):
        (ewk_context_default_get):
        * UIProcess/API/efl/ewk_context_private.h:
        * WebProcess/efl/ExtensionManagerEfl.cpp:
        (WebKit::ExtensionManagerEfl::initialize):

2015-06-25  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
        https://bugs.webkit.org/show_bug.cgi?id=146329
        rdar://problem/21233010

        Reviewed by Tim Horton.
        
        When doing a back swipe, views interposed between the WKWebView and the WKContentView
        get positions and animations for the swipe. This -_updateVisibleContentRects to
        compute bad visible and unobscured rects, so we lose tiles.
        
        Fix by "freezing" the visible and unobscured content rects in the view being
        swiped for the duration of the navigation gesture. When swiping the main view,
        we just plumb through navigationGestureDidEnd(). When Reader is showing and the
        swiped view is different from the navigating view, use the new navigationGestureDidEnd()
        override which takes no arguments.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _updateVisibleContentRects]):
        (-[WKWebView _navigationGestureDidBegin]):
        (-[WKWebView _navigationGestureDidEnd]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::navigationGestureDidEnd):
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/CoordinatedGraphics/WebView.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::navigationGestureDidEnd):
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::navigationGestureDidBegin):
        (WebKit::PageClientImpl::navigationGestureDidEnd):
        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::endSwipeGesture):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::navigationGestureDidEnd):

2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
        https://bugs.webkit.org/show_bug.cgi?id=146324

        Reviewed by Timothy Hatcher.

        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _startWindowDrag]):
        Add a way to start a window drag from a WKView using the most
        recent mouse down event.

        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::startWindowDrag):
        Send a message that we should start a window drag.

        * UIProcess/WebInspectorProxy.messages.in:
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::startWindowDrag):
        (WebKit::WebInspectorProxy::platformStartWindowDrag):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformStartWindowDrag):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformStartWindowDrag):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformStartWindowDrag):
        Let the platform start a window drag. Only implemented by Mac.

2015-06-25  Tim Horton  <timothy_horton@apple.com>

        [iOS] When using the back swipe gesture in Safari, the previous webpage will flash for a second
        https://bugs.webkit.org/show_bug.cgi?id=146326
        <rdar://problem/17811304>

        Reviewed by Dean Jackson.

        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::hideContentUntilPendingUpdate):
        (WebKit::DrawingAreaProxy::hideContentUntilAnyUpdate):
        (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilAnyUpdate):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Deleted.
        (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
        Make it possible to distinguish between hiding the content until *any* commit
        comes in (for example, when we're coming back from being suspended and don't want
        to show anything until we are sure all the layers are valid) and hiding the content
        until the currently pending commit corresponding to the current state in the UI process
        has arrived (which is what we want when e.g. hiding content after a gesture navigation
        and not showing it until the commit including the navigation lands).

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _hideContentUntilNextUpdate]):
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _applicationWillEnterForeground]):
        Make use of "hideContentUntilAnyUpdate".

        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::endSwipeGesture):
        Make use of "hideContentUntilPendingUpdate".

2015-06-25  Tim Horton  <timothy_horton@apple.com>

        Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
        https://bugs.webkit.org/show_bug.cgi?id=146322
        <rdar://problem/21413884>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
        Inflate the fixed layout height (by the viewScale) so that it's the size of the view.

2015-06-25  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Drop WebKitNetworkCacheTemporarilyDisabledForTesting NSUserDefaults
        https://bugs.webkit.org/show_bug.cgi?id=146323
        <rdar://problem/21552370>

        Reviewed by Antti Koivisto.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::isNetworkCacheEnabled):

2015-06-25  Tim Horton  <timothy_horton@apple.com>

        Crash in ViewGestureController::didRestoreScrollPosition() running WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError test
        https://bugs.webkit.org/show_bug.cgi?id=146309
        <rdar://problem/21476651>

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]):
        Null-check. _gestureController can be null if allowsBackForwardNavigationGestures is NO.

2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add initial WebKitWebsiteDataManager API for process configuration options
        https://bugs.webkit.org/show_bug.cgi?id=146149

        Reviewed by Sergio Villar Senin.

        Add WebKitWebsiteDataManager to replace the different ways we have
        to configure data store
        directories. WebKitWebContext:indexed-db-directory property has
        been removed, since it was added only in trunk, and
        WebKitWebContext:local-storage-directory has been deprecated. The
        method webkit_web_context_set_disk_cache_directory() has been
        deprecated too in favor of WebKitWebsiteDataManager.

        * PlatformGTK.cmake: Add new files to compilation.
        * UIProcess/API/gtk/WebKitPrivate.h: Move networkCacheSubdirectory
        definition here.
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextGetProperty): Replace indexed-db-directory getter
        with website-data-manager one.
        (webkitWebContextSetProperty): Replace indexed-db-directory setter
        with website-data-manager one.
        (webkitWebContextConstructed): Use the user provided
        WebKitWebsiteDataManager to configure the context or create a
        default WebKitWebsiteDataManager if not provided.
        (webkit_web_context_class_init): Replace indexed-db-directory
        property with website-data-manager.
        (webkit_web_context_new_with_website_data_manager):
        (webkit_web_context_get_website_data_manager):
        (webkitWebContextCreatePageForWebView): Get the WebsiteDataStore
        from the WebKitWebsiteDataManager.
        * UIProcess/API/gtk/WebKitWebContext.h:
        * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp: Added.
        (webkitWebsiteDataManagerGetProperty):
        (webkitWebsiteDataManagerSetProperty):
        (webkit_website_data_manager_class_init):
        (webkitWebsiteDataManagerCreate):
        (webkitWebsiteDataManagerGetDataStore):
        (webkit_website_data_manager_new):
        (webkit_website_data_manager_get_local_storage_directory):
        (webkit_website_data_manager_get_disk_cache_directory):
        (webkit_website_data_manager_get_offline_application_cache_directory):
        (webkit_website_data_manager_get_indexeddb_directory):
        (webkit_website_data_manager_get_websql_directory):
        * UIProcess/API/gtk/WebKitWebsiteDataManager.h: Added.
        * UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h: Added.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_website_data_manager_get_type.
        * UIProcess/API/gtk/webkit2.h: Include WebKitWebsiteDataManager.h.

2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Do not use legacy data store options in WebKit2 GTK+ API
        https://bugs.webkit.org/show_bug.cgi?id=146145

        Reviewed by Gustavo Noronha Silva.

        Use a custom WebsiteDataStore in WebKitWebContext, configured with
        the context options, and passed to every page created. This is in
        preparation for exposing WebsiteDataStore in the public API.

        * PlatformGTK.cmake: Add APIWebsiteDataStore.cpp to compilation.
        * UIProcess/API/APIWebsiteDataStore.cpp:
        * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
        (API::WebsiteDataStore::defaultNetworkCacheDirectory):
        (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
        (API::WebsiteDataStore::defaultLocalStorageDirectory):
        (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
        (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
        (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
        (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (websiteDataStoreConfigurationForWebProcessPoolConfiguration):
        Helper function to create the WebsiteDataStore configuration with
        the WebProcessPool configuration options.
        (webkitWebContextConstructed): Do not create a
        WebProcessPoolConfiguration with legacy options and create a WebsiteDataStore.
        (webkitWebContextCreatePageForWebView): Set the WebsiteDataStore
        and session ID in web page configuration.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseCreate): Create a WebPageConfiguration for the
        given options and pass it to webkitWebViewBaseCreateWebPage.
        (webkitWebViewBaseCreateWebPage): It receives now a
        WebPageConfiguration, instead of creating it based on the given parameters.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
        * UIProcess/gtk/WebProcessPoolGtk.cpp: Use WebsiteDataStore default configuration.
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):

2015-06-24  Anders Carlsson  <andersca@apple.com>

        Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
        https://bugs.webkit.org/show_bug.cgi?id=146301

        Reviewed by Tim Horton.

        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::hasEntitlement):
        (WebKit::isViewService):

2015-06-24  Anders Carlsson  <andersca@apple.com>

        WebContent process is unreponsive/idle when WKWebView is inside a view service.
        https://bugs.webkit.org/show_bug.cgi?id=146296

        Reviewed by Tim Horton.

        * Platform/spi/ios/AssertionServicesSPI.h: Renamed from Source/WebKit2/Platform/spi/ios/BKSProcessAssertionSPI.h.
        Rename this and add SPI for BKSApplicationStateMonitor.

        * Platform/spi/ios/UIKitSPI.h:
        Add _UIApplicationIsExtension SPI.

        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::isViewService):
        Return whether we're an extension or the safari view controller service.

        (WebKit::isBackgroundState):
        Helper function that returns whether a given BKSApplicationState is a background state.

        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        If we're a view service, create a BKSApplicationStateMonitor and listen for state changes for our pid.

        * UIProcess/ios/ProcessAssertionIOS.mm:
        Update #import.

        * WebKit2.xcodeproj/project.pbxproj:
        Update for rename.

2015-06-24  Matt Rajca  <mrajca@apple.com>

        MediaSession: propagate MediaSessionMetadata to WebPageProxy
        https://bugs.webkit.org/show_bug.cgi?id=146282

        Reviewed by Darin Adler and Tim Horton.

        * Shared/WebCoreArgumentCoders.cpp: Added ArgumentEncoder support for MediaSessionMetadata so we can send it
          through the web page proxy.
        (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
        (IPC::ArgumentCoder<MediaSessionMetadata>::decode):
        * Shared/WebCoreArgumentCoders.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::mediaSessionMetadataDidChange):
        * UIProcess/WebPageProxy.h: Receive mediaSessionMetadataDidChange in the web page proxy.
        * UIProcess/WebPageProxy.messages.in: Added a new MediaSessionMetadataDidChange message.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::mediaSessionMetadataDidChange): Push a mediaSessionMetadataDidChange message through the web page proxy.
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [Mac] A checkmark is briefly visible next to the webpage context menu items when they're clicked
        https://bugs.webkit.org/show_bug.cgi?id=146284
        <rdar://problem/20297182>

        Reviewed by Darin Adler.
        
        The default value of [NSPopUpButtonCell altersStateOfSelectedItem] is YES.
        This makes the popup menu items checkable by default. We need to change the
        value of this attribute to NO when creating the popup menu, so the items
        are uncheckable. The value of this property needs to change back to YES
        if context menu is about selecting an option and not executing a command.
        
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::populate):

2015-06-24  Brady Eidson  <beidson@apple.com>

        Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
        <rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249

        Reviewed by Alex Christensen.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient): Call the new signature if the client has it set.
          Otherwise fall back to the old signature.
        * UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
          one to the newest V5 client structure.

2015-06-24  Ryuan Choi  <ryuan.choi@navercorp.com>

        Remove some dead code from Download
        https://bugs.webkit.org/show_bug.cgi?id=146268

        Reviewed by Darin Adler.

        retrieveDestinationWithSuggestedFilename() was introduced for DownloadCFNetWin.cpp since r77585.
        didDecideDestination and others are also introduced for WebKit2 Windows port since r77055.
        Since WebKit2 Windows port is dropped, no one uses them now.

        * Shared/Downloads/Download.cpp:
        (WebKit::Download::decideDestinationWithSuggestedFilename):
        (WebKit::Download::retrieveDestinationWithSuggestedFilename): Deleted.
        * Shared/Downloads/Download.h:
        (WebKit::Download::destination): Deleted.
        * Shared/Downloads/ios/DownloadIOS.mm:
        (WebKit::Download::didDecideDestination): Deleted.
        * Shared/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::didDecideDestination): Deleted.
        * Shared/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::didDecideDestination): Deleted.

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager init]):

2015-06-23  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Crash performing drag-and-drop
        https://bugs.webkit.org/show_bug.cgi?id=146267

        Reviewed by Darin Adler.

        Return early if gtk_get_current_event() returns null to avoid a crash. Note that this does
        not fix drag-and-drop. Note also this prevents the web process from forcing the UI process
        to crash by sending fake startDrag messages.

        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::startDrag):

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Add a class that tracks whether we're a background or foreground application
        https://bugs.webkit.org/show_bug.cgi?id=146259
        rdar://problem/19833808

        Reviewed by Darin Adler.

        First step towards being able to send out these notifications for view services.

        * UIProcess/ApplicationStateTracker.h: Added.
        (WebKit::ApplicationStateTracker::isInBackground):
        * UIProcess/ApplicationStateTracker.mm: Added.
        (WebKit::ApplicationStateTracker::singleton):
        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        (WebKit::ApplicationStateTracker::addListener):
        (WebKit::ApplicationStateTracker::applicationDidEnterBackground):
        (WebKit::ApplicationStateTracker::applicationWillEnterForeground):
        (WebKit::ApplicationStateTracker::invokeListeners):
        (WebKit::ApplicationStateTracker::pruneListeners):
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager init]):
        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
        (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]):
        (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]):
        (-[WKProcessAssertionBackgroundTaskManager dealloc]): Deleted.
        (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]): Deleted.
        (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]): Deleted.
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
        (-[WKContentView isBackground]):
        (-[WKContentView _applicationDidEnterBackground]):
        (-[WKContentView _applicationWillEnterForeground]):
        (-[WKContentView _applicationDidEnterBackground:]): Deleted.
        (-[WKContentView _applicationWillEnterForeground:]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Remove windowResizerRect code, nobody is using it anymore
        https://bugs.webkit.org/show_bug.cgi?id=146265

        Reviewed by Beth Dakin.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::windowResizerRect): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::windowResizerRect): Deleted.
        * WebProcess/WebPage/WebPage.h:

2015-06-23  Dan Bernstein  <mitz@apple.com>

        Restore binary compatibility with iOS 8 Safari after r185877
        https://bugs.webkit.org/show_bug.cgi?id=146263

        Reviewed by Anders Carlsson.

        * Platform/spi/Cocoa: Added.
        * Platform/spi/Cocoa/NSInvocationSPI.h: Added.

        * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
        (-[WKSecurityOrigin methodSignatureForSelector:]): Override to check _WKSecurityOrigin for
        possible category methods with the specified selector.
        (-[WKSecurityOrigin forwardInvocation:]): Invoke using the implementation of the
        _WKSecurityOrigin category method.

        * WebKit2.xcodeproj/project.pbxproj:

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Add operator! and copy/move constructors to WeakObjCPtr
        https://bugs.webkit.org/show_bug.cgi?id=146255

        Reviewed by Andreas Kling.

        * Shared/mac/WeakObjCPtr.h:
        (WebKit::WeakObjCPtr::WeakObjCPtr):
        (WebKit::WeakObjCPtr::operator!):

2015-06-23  Antti Koivisto  <antti@apple.com>

        CrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy const &
        https://bugs.webkit.org/show_bug.cgi?id=146236
        rdar://problem/21380700

        Reviewed by Andreas Kling.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::clear):

            Don't crash if this is called with network cache disabled.

2015-06-23  Simon Fraser  <simon.fraser@apple.com>

        Expose some more rendering progress events, and have MiniBrowser log for each of them
        https://bugs.webkit.org/show_bug.cgi?id=146227

        Reviewed by Darin Adler.

        Add _WKRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering and 
        _WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering to the private
        header, and convert them to/from WebCore milestones.

        * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
        * Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
        (renderingProgressEvents):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (layoutMilestones):

2015-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r185876 and r185877.

        * UIProcess/API/gtk/WebKitUIClient.cpp:
        * UIProcess/API/gtk/WebKitUserContentManager.cpp:
        * UIProcess/API/gtk/WebKitWebView.cpp:

2015-06-23  Anders Carlsson  <andersca@apple.com>

        Get rid of the window resizer size
        https://bugs.webkit.org/show_bug.cgi?id=146240

        Reviewed by Darin Adler.

        This code was only used by older versions of GTK+, so get rid of it.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseNotifyResizerSize): Deleted.
        (toplevelWindowResizeGripVisibilityChanged): Deleted.
        (webkitWebViewBaseSetToplevelOnScreenWindow): Deleted.
        (resizeWebKitWebViewBaseFromAllocation): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setWindowResizerSize): Deleted.
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::windowResizerRect):
        (WebKit::WebPage::setWindowResizerSize): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-06-23  Brady Eidson  <beidson@apple.com>

        WKFrameInfo should have an accessor for the Frame's current security origin.
        https://bugs.webkit.org/show_bug.cgi?id=146162

        Reviewed by Dan Bernstein.

        This patch:
        - Promotes _WKSecurityOrigin to API.
        - Makes the WKSecurityOrigin Cocoa API object work with API::SecurityOrigin.
        - Adds a WKSecurityOrigin accessor to WKFrameInfo.
        - Changes IPC messaging so every handler that calls out with a WKFrameInfo object
          gets a relevant SecurityOrigin to wrap.

        * Shared/API/APISecurityOrigin.h:
        (API::SecurityOrigin::create):
        (API::SecurityOrigin::SecurityOrigin):

        * Shared/API/Cocoa/WebKit.h:

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toCopiedAPI):

        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):

        * Shared/SecurityOriginData.cpp:
        (WebKit::SecurityOriginData::fromFrame):
        * Shared/SecurityOriginData.h:

        * UIProcess/API/APIFrameInfo.cpp:
        (API::FrameInfo::FrameInfo):
        * UIProcess/API/APIFrameInfo.h:

        * UIProcess/API/APINavigationClient.h:
        (API::NavigationClient::didFailProvisionalLoadInSubframeWithError):

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::createNewPage):
        (API::UIClient::runJavaScriptAlert):
        (API::UIClient::runJavaScriptConfirm):
        (API::UIClient::runJavaScriptPrompt):

        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetApplicationCacheOrigins):

        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):

        * UIProcess/API/C/WKOriginDataManager.cpp:
        (WKOriginDataManagerGetOrigins):

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        (WKPageSetPageNavigationClient):

        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (WKResourceCacheManagerGetCacheOrigins):

        * UIProcess/API/Cocoa/WKFrameInfo.h:
        * UIProcess/API/Cocoa/WKFrameInfo.mm:
        (-[WKFrameInfo securityOrigin]):

        * UIProcess/API/Cocoa/WKSecurityOrigin.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.h.
        * UIProcess/API/Cocoa/WKSecurityOrigin.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.mm.
        (-[WKSecurityOrigin dealloc]):
        (-[WKSecurityOrigin description]):
        (-[WKSecurityOrigin protocol]):
        (-[WKSecurityOrigin host]):
        (-[WKSecurityOrigin port]):
        (-[WKSecurityOrigin _apiObject]):
        * UIProcess/API/Cocoa/WKSecurityOriginInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOriginInternal.h.
        (API::wrapper):

        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

        * UIProcess/API/Cocoa/WKUserContentController.mm:

        * UIProcess/API/Cocoa/_WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
        (-[_WKSecurityOrigin _initWithSecurityOrigin:]): Deleted.
        (-[_WKSecurityOrigin protocol]): Deleted.
        (-[_WKSecurityOrigin host]): Deleted.
        (-[_WKSecurityOrigin port]): Deleted.

        * UIProcess/Cocoa/NavigationState.h:
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):

        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::createNewPage):
        (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
        (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
        (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
        (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
        (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):

        * UIProcess/UserContent/WebScriptMessageHandler.h:

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::didPostMessage):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::decidePolicyForResponseSync):
        (WebKit::WebPageProxy::createNewPage):
        (WebKit::WebPageProxy::runJavaScriptAlert):
        (WebKit::WebPageProxy::runJavaScriptConfirm):
        (WebKit::WebPageProxy::runJavaScriptPrompt):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * WebKit2.xcodeproj/project.pbxproj:

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createWindow):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

2015-06-23  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
        https://bugs.webkit.org/show_bug.cgi?id=145886

        Reviewed by Sam Weinig.

        * Shared/WebCertificateInfo.h:
        (WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.

        * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
        PageLoadState::Observer functions to PageLoadStateObserver.

        * UIProcess/API/Cocoa/WKProcessGroup.mm:
        (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
        WebCertificateInfo::create.

        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.

        * UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
        state, or an empty array if there is no certificate chain.

        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.

        * UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
        functions.
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::willChangeCertificateInfo): Override to call
        -willChangeValueForKey:.
        (WebKit::NavigationState::didChangeCertificateInfo): Override to call
        -didChangeValueForKey:.

        * UIProcess/PageLoadState.cpp:
        (WebKit::PageLoadState::commitChanges): Call the new observer functions
        willChangeCertificateInfo and didChangeCertificateInfo.
        (WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
        in the uncommitted state.
        * UIProcess/PageLoadState.h:
        (WebKit::PageLoadState::certificateInfo): Added this getter.

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
        WebCore::CertificateInfo to WebCertificateInfo.
        * UIProcess/WebFrameProxy.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
        PageLoadState::didCommitLoad.

2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL][CustomProtocol] Do not add duplicated custom scheme
        https://bugs.webkit.org/show_bug.cgi?id=146199

        Reviewed by Carlos Garcia Campos.

        WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
        a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
        However application can register duplicate scheme by mistake or on purpose. Thus it would be good
        if we don't register it instead of registering it or generating a crash when trying to regiseter
        duplicated scheme.

        EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
        is modified to test it.

        Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.

        * UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
        (EWK2ContextTest::schemeRequestCallback1):
        (EWK2ContextTest::schemeRequestCallback2):
        (TEST_F):
        (EWK2ContextTest::schemeRequestCallback): Deleted.
        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
        (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):

2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.

        * gtk/NEWS: Add release notes for 2.9.3.

2015-06-22  Dan Bernstein  <mitz@apple.com>

        Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
        https://bugs.webkit.org/show_bug.cgi?id=146197

        Rubber-stamped by Anders Carlsson.

        * WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.

2015-06-22  Dean Jackson  <dino@apple.com>

        Rename PlatformCA*Mac to PlatformCA*Cocoa
        https://bugs.webkit.org/show_bug.cgi?id=146224
        <rdar://problem/21497182>

        Reviewed by Simon Fraser.

        Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
        to the more accurate Cocoa suffix.

        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
        (WebKit::PlatformCALayerRemoteCustom::create):
        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):

2015-06-22  Anders Carlsson  <andersca@apple.com>

        Simplify Connection::SyncMessageState
        https://bugs.webkit.org/show_bug.cgi?id=146213

        Reviewed by Andreas Kling.

        Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
        into a singleton and get rid of the RunLoop -> SyncMessageState hash map.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::SyncMessageState::singleton):
        (IPC::Connection::SyncMessageState::SyncMessageState):
        (IPC::Connection::SyncMessageState::processIncomingMessage):
        (IPC::Connection::SyncMessageState::dispatchMessages):
        (IPC::Connection::waitForSyncReply):
        (IPC::Connection::processIncomingSyncReply):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
        (IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
        (IPC::Connection::SyncMessageState::getOrCreate): Deleted.
        (IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
        (IPC::Connection::Connection): Deleted.
        * Platform/IPC/Connection.h:

2015-06-20  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Add SPI to reload without content blocking.
        https://bugs.webkit.org/show_bug.cgi?id=146128
        rdar://problem/20351903

        Reviewed by Sam Weinig.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetCustomUserAgent):
        (WKPageSetUserContentExtensionsEnabled):
        (WKPageSupportsTextEncoding):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _customUserAgent]):
        (-[WKWebView _setUserContentExtensionsEnabled:]):
        (-[WKWebView _userContentExtensionsEnabled]):
        (-[WKWebView _setCustomUserAgent:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
        (WebKit::WebPageProxy::setUserContentExtensionsEnabled):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::userContentExtensionsEnabled):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::reinitializeWebPage):
        (WebKit::WebPage::setShouldScaleViewToFitDocument):
        (WebKit::WebPage::setUserContentExtensionsEnabled):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Pass a boolean from the API to WebCore.

2015-06-22  Anders Carlsson  <andersca@apple.com>

        Remove m_clientRunLoop from IPC::Connection
        https://bugs.webkit.org/show_bug.cgi?id=146212

        Reviewed by Sam Weinig.

        We only ever create connections whose messages are dispatched to the main run loop, so we can 
        vastly simplify the code by only allowing messages to be dispatched there.

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::createServerConnection):
        (IPC::Connection::createClientConnection):
        (IPC::Connection::Connection):
        (IPC::Connection::addWorkQueueMessageReceiver):
        (IPC::Connection::removeWorkQueueMessageReceiver):
        (IPC::Connection::waitForMessage):
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::dispatchDidReceiveInvalidMessage):
        (IPC::Connection::enqueueIncomingMessage):
        (IPC::Connection::wakeUpRunLoop):
        * Platform/IPC/Connection.h:
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::receiveSourceEventHandler):
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::WebProcessConnection):
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::initialize):
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::didFinishLaunching):
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::didFinishLaunching):
        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::NetworkProcessConnection):
        * WebProcess/Plugins/PluginProcessConnection.cpp:
        (WebKit::PluginProcessConnection::PluginProcessConnection):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::createInspectorPage):
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::establishConnection):

2015-06-22  Anders Carlsson  <andersca@apple.com>

        Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
        https://bugs.webkit.org/show_bug.cgi?id=146211
        rdar://problem/17180615

        Reviewed by Sam Weinig.

        If we're inside a sendSync message when we're being called, just bail.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::acceptsFirstMouse):

2015-06-22  Dan Bernstein  <mitz@apple.com>

        Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
        https://bugs.webkit.org/show_bug.cgi?id=146197

        Reviewed by Anders Carlsson.

        * Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
        of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
        * WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
        target, and change the destination path in its Copy Files build phase to INSTALL_PATH.

2015-06-22  Antti Koivisto  <antti@apple.com>

        Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
        https://bugs.webkit.org/show_bug.cgi?id=146201

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _beginAnimatedResizeWithUpdates:]):

        No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
        and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.

        Fix by checking that [_contentView bounds] is not empty like is done with other inputs.

2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r182303): [GTK] Context menu API is broken since r182303
        https://bugs.webkit.org/show_bug.cgi?id=146202

        Reviewed by Žan Doberšek.

        The problem is that ContextMenuclient API changed in r182303, but
        we didn't notice it either, and the default handler for
        getContextMenuFromProposedMenu was executed. An override keyword
        would have caught this.

        * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
        WebContextMenuItemData as expected by our API, and add add
        override keyword to ensure this doesn't happen again.

2015-06-22  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
        https://bugs.webkit.org/show_bug.cgi?id=146143

        Reviewed by Carlos Garcia Campos.

        IPC handling in Unix-specific IPC::Connection implementation should use
        FastMalloc to allocate on-heap resources, instead of allocating via the
        system allocator.

        The AttachmentInfo class is marked as allocatable through FastMalloc.
        That way it can be allocated through FastMalloc while still handled
        through std::unique_ptr<>.

        The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
        are now handled through a MallocPtr<> object.

        In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
        arrays are now only allocated if there are actual attachments contained
        in the message. The code that's conditioned with a non-empty attachments
        Vector is now also grouped together, in a single branch.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::readBytesFromSocket):
        (IPC::Connection::sendOutgoingMessage):

2015-06-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] test_ewk2_application_cache_manager has been failed since r185527
        https://bugs.webkit.org/show_bug.cgi?id=146016

        Reviewed by Csaba Osztrogonác.

        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
        (TEST_F): Disable this test for now. This test will be enabled again.

2015-06-16  Gavin Barraclough  <barraclough@apple.com>

        Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
        https://bugs.webkit.org/show_bug.cgi?id=146198

        Unreviewed rollout.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_prefetch_dns):

2015-06-21  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
        https://bugs.webkit.org/show_bug.cgi?id=146180

        Reviewed by Sam Weinig.

        Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()

        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerDeleteEntriesForOrigin):

2015-06-21  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
        https://bugs.webkit.org/show_bug.cgi?id=146195

        Reviewed by Sam Weinig.

        * Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
        INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
        * Configurations/PluginService.64.xcconfig: Ditto.

2015-06-21  Dan Bernstein  <mitz@apple.com>

        Build fix.

        * Shared/API/Cocoa/WKFoundation.h: Don’t use generics if the SDK doesn’t support them.

2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Use GTask in WebKitSoupRequestInputStream
        https://bugs.webkit.org/show_bug.cgi?id=146184

        Reviewed by Carlos Garcia Campos.

        Replace deprecated use of GSimpleAsyncResult with GTask.

        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
        (AsyncReadData::AsyncReadData):
        (webkitSoupRequestInputStreamReadAsyncResultComplete):
        (webkitSoupRequestInputStreamPendingReadAsyncComplete):
        (webkitSoupRequestInputStreamReadAsync):
        (webkitSoupRequestInputStreamReadFinish):

2015-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
        https://bugs.webkit.org/show_bug.cgi?id=146172

        Reviewed by Darin Adler.

        Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
        (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
        (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
        (WebKit::WebIDBServerConnection::deleteDatabase):
        (WebKit::WebIDBServerConnection::didDeleteDatabase):
        (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
        (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
        (WebKit::WebIDBServerConnection::openTransaction):
        (WebKit::WebIDBServerConnection::didOpenTransaction):
        (WebKit::WebIDBServerConnection::beginTransaction):
        (WebKit::WebIDBServerConnection::didBeginTransaction):
        (WebKit::WebIDBServerConnection::commitTransaction):
        (WebKit::WebIDBServerConnection::didCommitTransaction):
        (WebKit::WebIDBServerConnection::resetTransaction):
        (WebKit::WebIDBServerConnection::didResetTransaction):
        (WebKit::WebIDBServerConnection::rollbackTransaction):
        (WebKit::WebIDBServerConnection::didRollbackTransaction):
        (WebKit::WebIDBServerConnection::createObjectStore):
        (WebKit::WebIDBServerConnection::didCreateObjectStore):
        (WebKit::WebIDBServerConnection::createIndex):
        (WebKit::WebIDBServerConnection::didCreateIndex):
        (WebKit::WebIDBServerConnection::deleteIndex):
        (WebKit::WebIDBServerConnection::didDeleteIndex):
        (WebKit::WebIDBServerConnection::get):
        (WebKit::WebIDBServerConnection::put):
        (WebKit::WebIDBServerConnection::didPutRecord):
        (WebKit::WebIDBServerConnection::didGetRecord):
        (WebKit::WebIDBServerConnection::didOpenCursor):
        (WebKit::WebIDBServerConnection::didAdvanceCursor):
        (WebKit::WebIDBServerConnection::didIterateCursor):
        (WebKit::WebIDBServerConnection::count):
        (WebKit::WebIDBServerConnection::didCount):
        (WebKit::WebIDBServerConnection::deleteRange):
        (WebKit::WebIDBServerConnection::didDeleteRange):
        (WebKit::WebIDBServerConnection::clearObjectStore):
        (WebKit::WebIDBServerConnection::didClearObjectStore):
        (WebKit::WebIDBServerConnection::deleteObjectStore):
        (WebKit::WebIDBServerConnection::didDeleteObjectStore):
        (WebKit::WebIDBServerConnection::changeDatabaseVersion):
        (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
        (WebKit::WebIDBServerConnection::openCursor):
        (WebKit::WebIDBServerConnection::cursorAdvance):
        (WebKit::WebIDBServerConnection::cursorIterate):

2015-06-20  Tim Horton  <timothy_horton@apple.com>

        Deselection of text causes a noticeable jump on force touch machines
        https://bugs.webkit.org/show_bug.cgi?id=146173
        <rdar://problem/20992842>

        Reviewed by Sam Weinig.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<TextIndicatorData>::encode):
        (IPC::ArgumentCoder<TextIndicatorData>::decode):
        Encode/decode wantsMargin.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performImmediateActionHitTestAtLocation):
        (WebKit::textIndicatorTransitionForImmediateAction): Deleted.
        Get rid of TextIndicatorPresentationTransition::Crossfade.

2015-06-20  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
        https://bugs.webkit.org/show_bug.cgi?id=146183

        Reviewed by Sam Weinig.

        * Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
        WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.

        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
        -_loadRequest:withOptions:.

        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
        halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
        not the same.

        * mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.

2015-06-20  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
        https://bugs.webkit.org/show_bug.cgi?id=146179
        <rdar://problem/20923432>

        Reviewed by Tim Horton.

        After r170787, viewStateChange() would cause a synchronous IPC between
        the UIProcess and the WebProcess when the view becomes visible. This
        was to avoid painting empty / black tiles when unsuspending the
        WebProcess on tab switch, in the event volatile IOSurfaces were purged.

        However, this sync IPC can have performance implications and is not
        needed when the content is not actually visible yet (e.g.
        hideContentUntilNextUpdate() was called, or the tab was killed).

        This patch avoids the synchronous IPC when the content is hidden and
        exposes a private API on WKWebView so that clients can ask for the
        content to be hidden until the next update. This would allow for
        clients to avoid the synchronous IPC if they don't need the content
        to be displayed synchronously (e.g. the view is obscured).

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _hideContentUntilNextUpdate]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::hasVisibleContent):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::dispatchViewStateChange):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):

2015-06-20  Michael Catanzaro  <mcatanzaro@igalia.com>

        Check for SHA1 certificates ignores subresources
        https://bugs.webkit.org/show_bug.cgi?id=146159

        Reviewed by Dan Bernstein.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame): Call
        PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
        SHA1 certificate when the frame is not the main frame.

2015-06-20  Dan Bernstein  <mitz@apple.com>

        Added availability information to a recently-added delegate method.

        Suggested by Alexey Proskuryakov and Anders Carlsson.

        * UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.

2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
        https://bugs.webkit.org/show_bug.cgi?id=146171

        Reviewed by Gyuyoung Kim.

        * PlatformEfl.cmake:
        Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
        not to allow jhbuild directory.
        * Shared/efl/ProcessExecutablePathEfl.cpp:
        (WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).

2015-06-18  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
        https://bugs.webkit.org/show_bug.cgi?id=145890
        <rdar://problem/21390877>

        Reviewed by Darin Adler and Tim Horton.

        The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
        this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
        because changing the shape of an NSAttributedString is less likely to result in problems rather than
        changing the shape of an NSDictionary.

        * Shared/mac/ArgumentCodersMac.mm:
        (IPC::fontIsSerializable):
        (IPC::filterUnserializableValues):
        (IPC::encode):

2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Fix return-type-c-linkage warning after r185553
        https://bugs.webkit.org/show_bug.cgi?id=146014

        Reviewed by Martin Robinson.

        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
        (WebKit::CustomProtocolManagerImpl::start): webkitSoupRequestGenericGetRequest now returns
        a pointer rather than a reference.

2015-06-19  Brady Eidson  <beidson@apple.com>

        Rename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
        https://bugs.webkit.org/show_bug.cgi?id=146152

        Reviewed by Dan Bernstein.

        * CMakeLists.txt:

        * Shared/API/c/WKSecurityOriginRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp.
        * Shared/API/c/WKSecurityOriginRef.h: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h.

        * UIProcess/API/efl/ewk_security_origin.cpp:
        * UIProcess/API/efl/ewk_storage_manager.cpp:

        * WebKit2.xcodeproj/project.pbxproj:

2015-06-18  Brent Fulgham  <bfulgham@apple.com>

        [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
        https://bugs.webkit.org/show_bug.cgi?id=145318
        <rdar://problem/21081501>

        Reviewed by Simon Fraser.

        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        (ArgumentCoder<ScrollingStateScrollingNode>::encode): Handle scroll snap point offset indices.
        (ArgumentCoder<ScrollingStateScrollingNode>::decode): Ditto.
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        (WebKit::RemoteScrollingCoordinatorProxy::currentSnapPointIndicesDidChange): Added. Send message
        to WebProcess when scroll snap indices have changed.
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
        (WebKit::RemoteScrollingTree::currentSnapPointIndicesDidChange): Added. Notify the
        RemoteScrollingCoordinatorProxy when scroll snap indices have changed.
        * UIProcess/Scrolling/RemoteScrollingTree.h:
        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
        (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Revised.
        Identify changes in the current scroll snap point offset index (in either the horizontal or vertical
        directions), and send a notification when this happens.
        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::currentSnapPointIndicesDidChange): Added. Notify the
        Scrolling Tree when indices changed.
        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
        (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Revised. Always compute
        the new scroll snap offset index (even when we will rubber band).
        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Add a new message to relay changes in scroll
        snap index.
        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        (WebKit::RemoteScrollingCoordinator::currentSnapPointIndicesChangedForNode): Added.

2015-06-19  Jeremy Jones  <jeremyj@apple.com>

        Revert switch to _synchronizedDrawingFence.
        https://bugs.webkit.org/show_bug.cgi?id=146136
        <rdar://problem/21227992>

        Reviewed by Simon Fraser.

        Revert _synchronizedDrawingFence code path that leaks a port.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):

2015-06-19  Anders Carlsson  <andersca@apple.com>

        Address review feedback from Darin.

        * Shared/mac/HangDetectionDisablerMac.mm:
        (WebKit::clientsMayIgnoreEvents):

2015-06-19  Anders Carlsson  <andersca@apple.com>

        Disable SpinTracer detection while loading sync XHR
        https://bugs.webkit.org/show_bug.cgi?id=146150
        rdar://problem/21462023

        Reviewed by Dan Bernstein.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::loadResourceSynchronously):

2015-06-19  Anders Carlsson  <andersca@apple.com>

        Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=146124
        rdar://problem/21449395

        Reviewed by Geoffrey Garen.

        Add a HangDetectionDisabler RAII object and use it for JavaScript panels.

        * Shared/HangDetectionDisabler.h: Added.
        (WebKit::HangDetectionDisabler::HangDetectionDisabler):
        (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
        * Shared/mac/HangDetectionDisablerMac.mm: Added.
        (WebKit::clientsMayIgnoreEvents):
        (WebKit::setClientsMayIgnoreEvents):
        (WebKit::HangDetectionDisabler::HangDetectionDisabler):
        (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):

2015-06-19  Dan Bernstein  <mitz@apple.com>

        Fixed the build for platforms that don’t have SafariServices.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):
        (-[WKContentView commitPreviewViewController:]):
        (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):

2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>

        Remove unnecessary svn:executable flags
        https://bugs.webkit.org/show_bug.cgi?id=146107

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/efl/EwkView.cpp: Removed property svn:executable.

2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>

        [WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
        https://bugs.webkit.org/show_bug.cgi?id=145252

        Reviewed by Tim Horton.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::PluginView): Added the necessary ifdef guard.
        * WebProcess/Plugins/PluginView.h: Added the necessary ifdef guard.
        * WebProcess/WebPage/WebPage.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC to WTF.

2015-06-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Do not store configuration parameters twice in WebProcessPool
        https://bugs.webkit.org/show_bug.cgi?id=146102

        Reviewed by Sam Weinig.

        Since we are copying the given WebProcessPoolConfiguration and
        keeping it as a member, we don't need to keep an additional copy
        of its contents as extra members. This also prevents
        inconsistencies between the values in the configuration and the
        members when any of them are modified by WebProcessPool API.

        * UIProcess/API/APIProcessPoolConfiguration.h: Return a const
        reference instead of a temporary in methods returning a String.
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::updateProcessSuppressionState):
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setProcessModel):
        (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
        (WebKit::WebProcessPool::networkingProcessConnection):
        (WebKit::WebProcessPool::languageChanged):
        (WebKit::WebProcessPool::setUsesNetworkProcess):
        (WebKit::WebProcessPool::usesNetworkProcess):
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::ensureDatabaseProcess):
        (WebKit::WebProcessPool::ensureSharedWebProcess):
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::warmInitialProcess):
        (WebKit::WebProcessPool::disconnectProcess):
        (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
        (WebKit::WebProcessPool::createWebPage):
        (WebKit::WebProcessPool::postMessageToInjectedBundle):
        (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
        (WebKit::WebProcessPool::setCacheModel):
        (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
        (WebKit::WebProcessPool::requestWebContentStatistics):
        (WebKit::WebProcessPool::requestNetworkingStatistics):
        * UIProcess/WebProcessPool.h:
        (WebKit::WebProcessPool::sendToNetworkingProcess):
        (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
        (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
        (WebKit::WebProcessPool::sendToOneProcess):
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess):

2015-06-18  Jon Lee  <jonlee@apple.com>

        Update AVKit usage of pip
        https://bugs.webkit.org/show_bug.cgi?id=146095
        <rdar://problem/21386853>

        Reviewed by Eric Carlson.

        - Rename preference key
        - Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp: Remove unused preference calls.
        (WKPreferencesSetAllowsAlternateFullscreen): Deleted.
        (WKPreferencesGetAllowsAlternateFullscreen): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _isShowingVideoPictureInPicture]): Renamed.
        (-[WKWebView _isShowingVideoOptimized]): Deleted.
        (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): Renamed.
        (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Deleted.
        (shouldAllowPictureInPictureMediaPlayback): Renamed.
        (shouldAllowAlternateFullscreen): Deleted.
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Rename local variables.
        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture): Renamed.
        (WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoOptimized): Deleted.
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/ios/WebVideoFullscreenManager.mm:

2015-06-18  Jeremy Jones  <jeremyj@apple.com>

        Fix crash when entering fullscreen during exit fullscreen animation.
        https://bugs.webkit.org/show_bug.cgi?id=146117

        Reviewed by Simon Fraser.

        A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface
        objects. Instead, complete the teardown and don't reuse the objects.

        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async.
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again.

2015-06-18  Anders Carlsson  <andersca@apple.com>

        Remove shouldInterruptJavaScript
        https://bugs.webkit.org/show_bug.cgi?id=146118

        Reviewed by Antti Koivisto.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::shouldInterruptJavaScript): Deleted.
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient): Deleted.
        * UIProcess/API/C/WKPageUIClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::shouldInterruptJavaScript): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::shouldInterruptJavaScript): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2015-06-18  Tim Horton  <timothy_horton@apple.com>

        Use SFSafariViewController for previews
        https://bugs.webkit.org/show_bug.cgi?id=146092

        Reviewed by Darin Adler.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):
        (-[WKContentView commitPreviewViewController:]):
        * WebKit2.xcodeproj/project.pbxproj:
        * Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h:

2015-06-18  Antti Koivisto  <antti@apple.com>

        ~4% Membuster regression after WebKit r185452
        https://bugs.webkit.org/show_bug.cgi?id=146112
        rdar://problem/21406677

        Reviewed by Chris Dumez.

        Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
        don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.

        This also makes sense for process suspension where we send simulated critical memory event.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::lowMemoryHandler):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::clearWriteQueue):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>

        Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145921

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
        (WebKitNotificationProvider::WebKitNotificationProvider):

2015-06-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] test_ewk2_context has been failed since r185529
        https://bugs.webkit.org/show_bug.cgi?id=146046

        Reviewed by Csaba Osztrogonác.

        ewk_context_network_process_model test has been failed since r185529.
        This patch modifies the test which is similar to ewk_context_network_process_model
        based on multiple process model to fix the failure. Besides ewk_context_network_process_model
        seems to be fixed indirectly. So we enable it again.

        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
        (TEST_F):

2015-06-17  Yongjun Zhang  <yongjun_zhang@apple.com>

        Also turn off long press on link preview.
        https://bugs.webkit.org/show_bug.cgi?id=146084

        Also turn off long presss gesture when previewing. Turn that back on when preview is completed.

        Reviewed by Tim Horton.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
        (-[WKContentView didDismissPreviewViewController:committing:]):

2015-06-17  Brent Fulgham  <bfulgham@apple.com>

        Overflow regions with scroll snap points are not reliably rubber banding
        https://bugs.webkit.org/show_bug.cgi?id=142522
        <rdar://problem/20100726>

        Reviewed by Darin Adler.

        Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
        the end of the scroll container.

        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
        (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
        target point if we were going to scroll past the edges of the scroll container.

2015-06-17  Anders Carlsson  <andersca@apple.com>

        Would like a way, in the API, to get notified about a web process crash
        https://bugs.webkit.org/show_bug.cgi?id=146085
        rdar://problem/17358828

        Reviewed by Darin Adler.

        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/Cocoa/NavigationState.h:
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::setNavigationDelegate):
        (WebKit::NavigationState::NavigationClient::processDidCrash):

2015-06-17  Tim Horton  <timothy_horton@apple.com>

        Swipe gesture can get stuck, preventing scrolling and other gestures
        https://bugs.webkit.org/show_bug.cgi?id=146088
        <rdar://problem/16056087>

        Reviewed by Darin Adler.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::trackSwipeGesture):
        Ignore mouse events that come in while we're doing a swipe.
        This prevents potentially problematic mouse events (especially context menus)
        won't be processed during a swipe, avoiding situations that can cause
        the swipe gesture to get stuck.

2015-06-17  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove willSendEventToPlugin() from PluginController.h.
        https://bugs.webkit.org/show_bug.cgi?id=146054

        Reviewed by Darin Adler.

        PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
        This method had been used only for WebKit2 on Windows, and no one uses it now.
        So we can remove it.

        No new tests, no behavior change.

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
        * PluginProcess/PluginControllerProxy.h:
        * WebProcess/Plugins/PluginController.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::willSendEventToPlugin): Deleted.
        * WebProcess/Plugins/PluginView.h:

2015-06-17  Tim Horton  <timothy_horton@apple.com>

        Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
        https://bugs.webkit.org/show_bug.cgi?id=146083
        <rdar://problem/20974232>

        Reviewed by Darin Adler.

        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
        (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
        It is possible to get didSameDocumentNavigationForMainFrame *before*
        endSwipeGesture, while the user is still interactively swiping. We
        cannot remove the snapshot in this case, nor should we start the active
        load monitoring timer; all of these things should happen only after the
        swipe is completed and we've performed the navigation.

        This was particularly bad (a crash instead of just a disappearing snapshot)
        because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
        to be nulled out, but then it is dereferenced during endSwipeGesture.

        Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
        waiting to remove the swipe snapshot (because the gesture had completed).
        Most callers already did ensure this, but these two did not.

2015-06-17  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Improve Full Screen support for Web Inspector windows
        https://bugs.webkit.org/show_bug.cgi?id=146036

        Reviewed by Timothy Hatcher.

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
        (-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
        (WebKit::WebInspectorProxy::platformCanAttach):
        (WebKit::WebInspectorProxy::windowFullScreenDidChange):
        When entering / leaving full screen update attach availability to
        potentially show / hide the frontend's docking buttons.

        (WebKit::WebInspectorProxy::createInspectorWindow):
        Allow a Web Inspector window to be a full screen auxillary window,
        so that if the application with a WebView opens a detached inspector
        window it can be shown on the same desktop as the full screen app.
        Also, reduce the minimum window size requirements for full screen tiling.

2015-06-17  Tim Horton  <timothy_horton@apple.com>

        Safari tabs still have shrunken content after coming out of fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=146037
        <rdar://problem/21105960>

        Reviewed by Simon Fraser and Darin Adler.

        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::useFixedLayoutDidChange):
        (WebKit::WebPageProxy::fixedLayoutSizeDidChange):
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setUseFixedLayout):
        (WebKit::WebPage::setFixedLayoutSize):
        Keep the UI process up-to-date when fixed layout is enabled or the size changes.
        This is important because these things can change from the Web process side too,
        and the UI process uses its (potentially stale) version to do some short-circuiting.
        This was causing us to fail to turn off fixed layout when it was turned
        on from the Web process side (by TiledCoreAnimationDrawingArea).

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
        Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
        makes heavy use of, just like the others.

2015-06-17  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
        https://bugs.webkit.org/show_bug.cgi?id=145957

        Reviewed by Darin Adler.

        * UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
        * UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
        (WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
        code that calls the old private method if it’s implemented.

2015-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
        https://bugs.webkit.org/show_bug.cgi?id=146053

        Reviewed by Martin Robinson.

        The cache is disabled in WebProcess::platformSetCacheModel() when
        the cache model is CacheModelDocumentViewer, but it's enabled
        again by WebProcess::setMemoryCacheDisabled() when
        memoryCacheDisabled creation parameter is processed. We need to
        make sure the cache model and memoryCacheDisabled parameters are consistent.

        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
        memoryCacheDisabled parameter to true if memory cache was
        explicitly disabled or cache model is CacheModelDocumentViewer.

2015-06-17  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] valueForKey() shouldn't copy the defaults map
        https://bugs.webkit.org/show_bug.cgi?id=146050

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.

2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Inhibit screen saver when playing full screen video
        https://bugs.webkit.org/show_bug.cgi?id=145795

        Reviewed by Gustavo Noronha Silva.

        Use Freedesktop.org DBus API to inhibit/unhinibit the screen saver
        when entering/leaving fullscreen.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (screenSaverInhibitedCallback):
        (webkitWebViewBaseSendInhibitMessageToScreenSaver):
        (screenSaverProxyCreatedCallback):
        (webkitWebViewBaseInhibitScreenSaver):
        (webkitWebViewBaseUninhibitScreenSaver):
        (webkitWebViewBaseEnterFullScreen):
        (webkitWebViewBaseExitFullScreen):

2015-06-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr with Ref or RefPtr
        https://bugs.webkit.org/show_bug.cgi?id=146001

        Reviewed by Darin Adler.

        As step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
        If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function
        returns RefPtr.

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::create):
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
        (WebKit::DatabaseProcessIDBConnection::create):
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
        (WebKit::UniqueIDBDatabase::create):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::create):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/RemoteNetworkingContext.h:
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::create):
        * PluginProcess/WebProcessConnection.h:
        * Shared/API/APINumber.h:
        (API::Number::create):
        * Shared/API/APISecurityOrigin.h:
        (API::SecurityOrigin::createFromString):
        (API::SecurityOrigin::create):
        * Shared/API/APISerializedScriptValue.h:
        (API::SerializedScriptValue::create):
        (API::SerializedScriptValue::adopt):
        * Shared/APIWebArchive.h:
        * Shared/APIWebArchive.mm:
        (API::WebArchive::create):
        * Shared/APIWebArchiveResource.h:
        * Shared/APIWebArchiveResource.mm:
        (API::WebArchiveResource::create):
        * Shared/AsyncRequest.h:
        * UIProcess/API/efl/ewk_url_request_private.h:
        (EwkUrlRequest::create):
        * UIProcess/API/efl/ewk_url_response_private.h:
        (EwkUrlResponse::create):
        * UIProcess/API/efl/ewk_url_scheme_request_private.h:
        (EwkUrlSchemeRequest::create):
        * UIProcess/API/efl/ewk_window_features_private.h:
        (EwkWindowFeatures::create):
        * UIProcess/API/efl/tests/test_ewk2_object.cpp:
        (TestEwkObject1::create):
        (TestEwkObject2::create):
        * UIProcess/API/gtk/WebKitBatteryProvider.cpp:
        (WebKitBatteryProvider::create):
        * UIProcess/API/gtk/WebKitBatteryProvider.h:
        * UIProcess/API/gtk/WebKitColorChooser.cpp:
        (WebKit::WebKitColorChooser::create):
        * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
        (WebKitGeolocationProvider::create):
        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
        (WebKitNotificationProvider::create):
        * UIProcess/API/gtk/WebKitNotificationProvider.h:
        * UIProcess/GeolocationPermissionRequestProxy.h:
        (WebKit::GeolocationPermissionRequestProxy::create):
        * UIProcess/InspectorServer/HTTPRequest.h:
        (WebKit::HTTPRequest::create):
        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
        (WebKit::WebSoupCustomProtocolRequestManager::create):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::create):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Notifications/NotificationPermissionRequest.cpp:
        (WebKit::NotificationPermissionRequest::create):
        * UIProcess/Notifications/NotificationPermissionRequest.h:
        * UIProcess/Notifications/WebNotification.h:
        (WebKit::WebNotification::create):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scriptValueCallback):
        * UIProcess/WebVibrationProxy.cpp:
        (WebKit::WebVibrationProxy::create):
        * UIProcess/WebVibrationProxy.h:
        * UIProcess/WebViewportAttributes.h:
        (WebKit::WebViewportAttributes::create):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::createNonPersistent):
        (WebKit::WebsiteDataStore::create):
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        * UIProcess/gtk/WebColorPickerGtk.cpp:
        (WebKit::WebColorPickerGtk::create):
        * UIProcess/gtk/WebColorPickerGtk.h:
        * UIProcess/gtk/WebContextMenuProxyGtk.h:
        (WebKit::WebContextMenuProxyGtk::create):
        * UIProcess/gtk/WebPopupMenuProxyGtk.h:
        (WebKit::WebPopupMenuProxyGtk::create):
        * UIProcess/mac/ViewSnapshotStore.h:
        * UIProcess/mac/ViewSnapshotStore.mm:
        (WebKit::ViewSnapshot::create):
        * UIProcess/mac/WebColorPickerMac.h:
        * UIProcess/mac/WebColorPickerMac.mm:
        (WebKit::WebColorPickerMac::create):
        * UIProcess/mac/WebContextMenuProxyMac.h:
        (WebKit::WebContextMenuProxyMac::create):
        * UIProcess/mac/WebPopupMenuProxyMac.h:
        (WebKit::WebPopupMenuProxyMac::create):
        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
        (WebKit::WebToDatabaseProcessConnection::create):
        * WebProcess/FullScreen/WebFullScreenManager.cpp:
        (WebKit::WebFullScreenManager::create):
        * WebProcess/FullScreen/WebFullScreenManager.h:
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        (WebKit::InjectedBundleRangeHandle::create):
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
        (WebKit::InjectedBundleBackForwardList::create):

2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        Unreviewed build fix after r185615.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_clear_cache): Comment the call to the code
        removed and write down the bugzilla link for reimplementation.

2015-06-16  Anders Carlsson  <andersca@apple.com>

        Get rid of performAPICallbackWithSecurityOriginDataVector
        https://bugs.webkit.org/show_bug.cgi?id=146039

        Reviewed by Andreas Kling.

        Get rid of performAPICallbackWithSecurityOriginDataVector since it's now no longer used
        and add a bunch of includes to make up for SecurityOriginData.h no longer including GenericCallback.h.
        * DatabaseProcess/DatabaseProcess.cpp:
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
        * Shared/SecurityOriginData.cpp:
        (WebKit::performAPICallbackWithSecurityOriginDataVector): Deleted.
        * Shared/SecurityOriginData.h:
        * Shared/WebsiteData/WebsiteData.cpp:
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
        * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:

2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>

        Unreviewed build fix attempt on CMake based port after r185623.

        * CMakeLists.txt:

2015-06-16  Anders Carlsson  <andersca@apple.com>

        Move LocalStorageDetails into the local storage database tracker
        https://bugs.webkit.org/show_bug.cgi?id=146034

        Reviewed by Andreas Kling.

        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
        (WKKeyValueStorageManagerDeleteAllEntries):
        * UIProcess/LocalStorageDetails.h: Removed.
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::originDetails):
        (WebKit::LocalStorageDatabaseTracker::details): Deleted.
        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getLocalStorageOriginDetails):
        (WebKit::StorageManager::getLocalStorageDetailsByOrigin): Deleted.
        (WebKit::StorageManager::deleteAllLocalStorageEntries): Deleted.
        * UIProcess/Storage/StorageManager.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-16  Dan Bernstein  <mitz@apple.com>

        Removed the WebKit2SandboxProfiles target.

        Rubber-stamped by Anders Carlsson.

        WebKit2SandboxProfiles was just an alias for the Sandbox Profiles target, and it’s not
        needed anymore.

        * WebKit2.xcodeproj/project.pbxproj:

2015-06-16  Anders Carlsson  <andersca@apple.com>

        Fold WebKeyValueStorageManager into WKKeyValueStorageManager
        https://bugs.webkit.org/show_bug.cgi?id=146030

        Reviewed by Andreas Kling.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetKeyValueStorageManager):
        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetTypeID):
        (WKKeyValueStorageManagerGetOriginKey):
        (WKKeyValueStorageManagerGetCreationTimeKey):
        (WKKeyValueStorageManagerGetModificationTimeKey):
        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
        (WKKeyValueStorageManagerDeleteEntriesForOrigin):
        (WKKeyValueStorageManagerDeleteAllEntries):
        * UIProcess/WebKeyValueStorageManager.cpp: Removed.
        (WebKit::WebKeyValueStorageManager::supplementName): Deleted.
        (WebKit::WebKeyValueStorageManager::originKey): Deleted.
        (WebKit::WebKeyValueStorageManager::creationTimeKey): Deleted.
        (WebKit::WebKeyValueStorageManager::modificationTimeKey): Deleted.
        (WebKit::WebKeyValueStorageManager::create): Deleted.
        (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): Deleted.
        (WebKit::WebKeyValueStorageManager::~WebKeyValueStorageManager): Deleted.
        (WebKit::WebKeyValueStorageManager::refWebContextSupplement): Deleted.
        (WebKit::WebKeyValueStorageManager::derefWebContextSupplement): Deleted.
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): Deleted.
        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin): Deleted.
        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): Deleted.
        (WebKit::WebKeyValueStorageManager::deleteAllEntries): Deleted.
        * UIProcess/WebKeyValueStorageManager.h: Removed.
        * UIProcess/WebProcessPool.cpp:
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-16  Alex Christensen  <achristensen@webkit.org>

        CMake build fix after r185615.

        * CMakeLists.txt:
        Remove WebResourceCacheManager from CMake build system.

2015-06-16  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Implement branch compaction for DFA bytecode.
        https://bugs.webkit.org/show_bug.cgi?id=145619

        Reviewed by Benjamin Poulain.

        * UIProcess/API/APIUserContentExtensionStore.h:
        Increment version number to reflect changes to bytecode.

2015-06-16  Anders Carlsson  <andersca@apple.com>

        WebResourceCacheManager is unused, get rid of it
        https://bugs.webkit.org/show_bug.cgi?id=146027

        Reviewed by Sam Weinig.

        * DerivedSources.make:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/WebProcessPool.cpp:
        * UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
        (WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
        (WebKit::WebResourceCacheManagerProxy::create): Deleted.
        (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
        (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
        (WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
        (WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
        (WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
        (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
        (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
        (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
        * UIProcess/WebResourceCacheManagerProxy.h: Removed.
        * UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
        (WebKit::WebResourceCacheManager::supplementName): Deleted.
        (WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
        (WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
        (WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
        (WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
        (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
        * WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
        * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
        (WebKit::partitionName): Deleted.
        (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
        (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Deleted.

2015-06-16  Alex Christensen  <achristensen@webkit.org>

        CMake build fix after r185601.

        * CMakeLists.txt:
        Remove application cache manager classes.

2015-06-16  Anders Carlsson  <andersca@apple.com>

        Stop calling into WebResourceCacheManager
        https://bugs.webkit.org/show_bug.cgi?id=146026

        Reviewed by Andreas Kling.

        Copy the cache clearing code into NetworkProcessCocoa in preparation of getting rid of
        the WebResourceCacheManager code.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::clearDiskCacheEntries):
        (WebKit::cfURLCacheOrigins): Deleted.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::partitionName):
        (WebKit::NetworkProcess::cfURLCacheOrigins):
        (WebKit::NetworkProcess::clearCFURLCacheForOrigins):

2015-06-16  Anders Carlsson  <andersca@apple.com>

        Get rid of the application cache manager classes, they are no longer used
        https://bugs.webkit.org/show_bug.cgi?id=146024

        Reviewed by Sam Weinig.

        * DerivedSources.make:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/WebApplicationCacheManagerProxy.cpp: Removed.
        (WebKit::WebApplicationCacheManagerProxy::supplementName): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::create): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::processPoolDestroyed): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::processDidClose): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::shouldTerminate): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): Deleted.
        (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): Deleted.
        * UIProcess/WebApplicationCacheManagerProxy.h: Removed.
        * UIProcess/WebApplicationCacheManagerProxy.messages.in: Removed.
        * UIProcess/WebProcessPool.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Removed.
        (WebKit::WebApplicationCacheManager::supplementName): Deleted.
        (WebKit::WebApplicationCacheManager::WebApplicationCacheManager): Deleted.
        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): Deleted.
        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): Deleted.
        (WebKit::WebApplicationCacheManager::deleteAllEntries): Deleted.
        (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): Deleted.
        * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Removed.
        * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Removed.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::clearApplicationCache):
        (WebKit::InjectedBundle::setAppCacheMaximumSize):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Deleted.

2015-06-16  Brady Eidson  <beidson@apple.com>

        IDB: Records table migration doesn't work with all versions of SQLite.
        https://bugs.webkit.org/show_bug.cgi?id=145993

        Reviewed by Darin Adler, provisionally reviewed by Jon Lee.

        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::v1RecordsTableSchema):
        (WebKit::v1RecordsTableSchemaAlternate):
        (WebKit::v2RecordsTableSchema):
        (WebKit::v2RecordsTableSchemaAlternate):
        (WebKit::createOrMigrateRecordsTableIfNecessary): Check both v1 and v1 Alternate whenever we check for the v1 schema.
          Ditto for the v2 schema. Crash all builds if the current schema is none of these.

2015-06-16  Dan Bernstein  <mitz@apple.com>

        Build fix.

        * mac/postprocess-framework-headers.sh:

2015-06-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r185552.
        https://bugs.webkit.org/show_bug.cgi?id=146015

         It broke some WK2 API tests on EFL bots (Requested by
        gyuyoung on #webkit).

        Reverted changeset:

        "[EFL] Make send/receive messages to communicate the Web and
        UI Processes using Injected Bundle."
        https://bugs.webkit.org/show_bug.cgi?id=145685
        http://trac.webkit.org/changeset/185552

2015-06-16  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Add API tests for ewk_page
        https://bugs.webkit.org/show_bug.cgi?id=146004

        Reviewed by Gyuyoung Kim.

        Add unit test for load_started/load_finished callbacks of ewk_page.

        * PlatformEfl.cmake:
        * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
        * UIProcess/API/efl/tests/test_ewk2_page.cpp: Added.
        (EWK2PageTest::messageReceivedCallback):
        (EWK2PageTest::EWK2PageTest):
        (TEST_F):

2015-06-15  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] position:fixed elements sometimes truncated on scroll view bouncing
        https://bugs.webkit.org/show_bug.cgi?id=146000
        rdar://problem/19448439

        Reviewed by Benjamin Poulain.
        
        When in the middle of a rubber-band (UIScrollView bounce), we could send a bad 
        fixed position rect down to WebCore, causing 100% height elements to get laid out
        at the wrong height, possible too short. This occurred when -_updateVisibleContentRects
        said we were in a stable state, but the rubber-band offset caused WebPageProxy::computeCustomFixedPositionRect()
        to compute a bad rect via constrainedUnobscuredRect.intersect(documentRect).
        
        Fix by not claiming to be in a stable state during rubber-banding. Added _scrollViewIsRubberBanding
        to compute that, taking care with floating point comparisons for 3x devices.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (isGreaterInDevicePixels):
        (-[WKWebView _scrollViewIsRubberBanding]):
        (-[WKWebView _updateVisibleContentRects]):

2015-06-15  Ryuan Choi  <ryuan.choi@navercorp.com>

        Fix build break when ENABLE_SECCOMP_FILTERS is ON
        https://bugs.webkit.org/show_bug.cgi?id=145967

        Reviewed by Carlos Garcia Campos.

        Since r183189, ArgumentEncoder::addAttachment requires rvalue reference.

        * Shared/linux/SeccompFilters/OpenSyscall.cpp:
        (WebKit::OpenSyscallResult::encode): Use WTF::move().

2015-06-15  Chris Dumez  <cdumez@apple.com>

        [WK2] BrowsingContextController.loadData API is leaking Navigation objects
        https://bugs.webkit.org/show_bug.cgi?id=145977
        <rdar://problem/21305706>

        Reviewed by Darin Adler.

        BrowsingContextController.loadData API was leaking Navigation objects.
        The issue was due to WebPageProxy::loadData() creating a Navigation
        object but not passing along the navigationID to the WebProcess when
        sending the Messages::WebPage::LoadData IPC. As a result, the
        WebProcess would use 0 as navigationID and we would end up creating a
        new Navigation object later on for the same navigation.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadData):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadData):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-06-15  Dan Bernstein  <mitz@apple.com>

        REGRESSION (r185298): Databases service has Web Content service’s entitlements
        https://bugs.webkit.org/show_bug.cgi?id=145980

        Reviewed by Darin Adler.

        * Configurations/DatabaseService.xcconfig: Set WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE to
        Databases-iOS.

2015-06-11  Jon Lee  <jonlee@apple.com>

        [WK2] Add allowsPictureInPictureMediaPlayback
        https://bugs.webkit.org/show_bug.cgi?id=145901
        rdar://problem/21349851

        Reviewed by Anders Carlsson.

        Replace _allowsAlternateFullscreen with allowsPictureInPictureMediaPlayback.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Add allowsPictureInPictureMediaPlayback.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Remove _allowsAlternateFullscreen.
        (-[WKWebViewConfiguration copyWithZone:]): Replace the variable.
        (-[WKWebViewConfiguration _allowsAlternateFullscreen]): Deleted.
        (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Remove the SPI.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]): Update to use the new API.

2015-06-12  Alexey Proskuryakov  <ap@apple.com>

        -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
        https://bugs.webkit.org/show_bug.cgi?id=145900

        Reviewed by Sam Weinig.

        We used to conflate to cases: (1) when there was a JavaScript exception, and
        (2) when the result could not be serialized for IPC. Turns out that it was quite
        misleading!

        * UIProcess/API/C/WKPage.cpp:
        (WKPageRunJavaScriptInMainFrame):
        * UIProcess/API/Cocoa/WKError.h:
        * UIProcess/API/Cocoa/WKError.mm:
        (localizedDescriptionForErrorCode):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView evaluateJavaScript:completionHandler:]):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
        (WebKit::WebPageProxy::scriptValueCallback):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_run_javascript):
        (resourcesStreamReadCallback):

2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
        https://bugs.webkit.org/show_bug.cgi?id=145969

        Reviewed by Sergio Villar Senin.

        Use the WebKitSoupRequestGeneric request instead of creating a new one
        from the SoupRequest URI, since that is the network one and doesn't
        contain the fragment identifier part.

        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
        (WebKit::CustomProtocolManagerImpl::start):

2015-06-15  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
        https://bugs.webkit.org/show_bug.cgi?id=145685

        Reviewed by Gyuyoung Kim.

        To have extensible port specific API facility using Injected Bundle,
        we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.

        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::EwkContext):
        (EwkContext::~EwkContext):
        (EwkContext::findOrCreateWrapper):
        (bundlePathForExtension):
        (EwkContext::create): Deleted.
        * UIProcess/API/efl/ewk_context_private.h:
        * WebProcess/efl/ExtensionManagerEfl.cpp:
        (WebKit::ExtensionManagerEfl::initialize):

2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Move WebKitSoupRequestGeneric to platform layer
        https://bugs.webkit.org/show_bug.cgi?id=145968

        Reviewed by Sergio Villar Senin.

        * PlatformEfl.cmake: Remove WebKitSoupRequestGeneric.
        * PlatformGTK.cmake: Ditto.
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:

2015-06-15  Csaba Osztrogonác  <ossy@webkit.org>

        Fix unused private field warning in PageBanner.h
        https://bugs.webkit.org/show_bug.cgi?id=145925

        Reviewed by Darin Adler.

        * WebProcess/WebPage/PageBanner.cpp:
        (WebKit::PageBanner::~PageBanner):
        * WebProcess/WebPage/PageBanner.h: Initialize m_type, m_webPage, m_mouseDownInBanner, and m_isHidden here instead of in the constructor.
        * WebProcess/WebPage/mac/PageBannerMac.mm: Use PLATFORM(MAC) instead of !PLATFORM(IOS), they are same in objc files.

2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Make WebKitSoupRequestGeneric independent from CustomProtocolManagerImpl
        https://bugs.webkit.org/show_bug.cgi?id=145966

        Reviewed by Sergio Villar Senin.

        Add WebKitSoupRequestGenericClient with start and finish methods,
        that are implemented by WebKitSoupRequestGeneric.
        This allows us to move WebKitSoupRequestGeneric to platform layer.

        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
        (WebKit::CustomProtocolManagerImpl::registerScheme):
        (WebKit::CustomProtocolManagerImpl::start):
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
        * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
        (webkitSoupRequestGenericSendAsync):
        (webkitSoupRequestGenericSendFinish):
        * WebProcess/soup/WebKitSoupRequestGeneric.h:
        * WebProcess/soup/WebKitSoupRequestGenericClient.h: Added.

2015-06-14  Dan Bernstein  <mitz@apple.com>

        Fixed the build.

        * mac/postprocess-framework-headers.sh:

2015-06-14  Michael Catanzaro  <mcatanzaro@igalia.com>

        Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145960

        Reviewed by Darin Adler.

        Use PRIu64 and PRIi64 to print uint64_t and int64_t, respectively. These things are
        different types on x86_64 Linux (unsigned long) and on Mac (unsigned long long).

        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
        (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
        (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
        (WebKit::DatabaseProcessIDBConnection::openTransaction):
        (WebKit::DatabaseProcessIDBConnection::beginTransaction):
        (WebKit::DatabaseProcessIDBConnection::commitTransaction):
        (WebKit::DatabaseProcessIDBConnection::resetTransaction):
        (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
        (WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion):
        (WebKit::DatabaseProcessIDBConnection::createObjectStore):
        (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
        (WebKit::DatabaseProcessIDBConnection::clearObjectStore):
        (WebKit::DatabaseProcessIDBConnection::createIndex):
        (WebKit::DatabaseProcessIDBConnection::deleteIndex):
        (WebKit::DatabaseProcessIDBConnection::putRecord):
        (WebKit::DatabaseProcessIDBConnection::getRecord):
        (WebKit::DatabaseProcessIDBConnection::count):
        (WebKit::DatabaseProcessIDBConnection::deleteRange):
        (WebKit::DatabaseProcessIDBConnection::openCursor):
        (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
        (WebKit::DatabaseProcessIDBConnection::cursorIterate):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):

2015-06-14  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Clean up postprocess-framework-headers.sh
        https://bugs.webkit.org/show_bug.cgi?id=145962

        Reviewed by Darin Adler.

        * mac/postprocess-framework-headers.sh: Gather all the sed options in a variable, and then
        run sed only once on each header. Also, correctly exit with the sed return value if it
        fails.

2015-06-13  Chris Dumez  <cdumez@apple.com>

        [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
        https://bugs.webkit.org/show_bug.cgi?id=145948

        Reviewed by Darin Adler.

        API::Navigation objects were leaked on history navigation to
        HistoryItems in PageCache. In such case, we would create 2 Navigation
        objects instead of 1 and the first one would be leaked. The reason
        we create the second one is because we fail to pass along the
        navigationID from the UIProcess to the WebProcess and then back to the
        UIProcess. On the IPC back to the UIProcess, the navigationID ends up
        being 0 so the UIProcess creates a new Navigation object, thinking that
        the load was triggered by the WebContent process.

        We now pass along the navigationID, even if the HistoryItem is in the
        PageCache and we end up reusing the cached DocumentLoader, instead of
        creating a new one. A new updateCachedDocumentLoader() delegate is
        added to the FrameLoaderClient, similarly to the pre-existing
        createDocumentLoader() but for the case where the DocumentLoader gets
        reused.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::updateCachedDocumentLoader):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::goForward):
        (WebKit::WebPage::goBack):
        (WebKit::WebPage::goToBackForwardItem):
        (WebKit::WebPage::updateCachedDocumentLoader):
        * WebProcess/WebPage/WebPage.h:

2015-06-12  Gavin Barraclough  <barraclough@apple.com>

        Add private API to force page to always run at foreground priority
        https://bugs.webkit.org/show_bug.cgi?id=145946
        <rdar://problem/21267221>

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
            - copy _alwaysRunsAtForegroundPriority to WebPageConfiguration.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
        (-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):
            - added _alwaysRunsAtForegroundPriority.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
            - added _alwaysRunsAtForegroundPriority.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
            - initialize m_alwaysRunsAtForegroundPriority.
        (WebKit::WebPageProxy::updateActivityToken):
            - if m_alwaysRunsAtForegroundPriority is set always take the foreground activity token.
        * UIProcess/WebPageProxy.h:
            - added m_alwaysRunsAtForegroundPriority, alwaysRunsAtForegroundPriority.

2015-06-12  Anders Carlsson  <andersca@apple.com>

        Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
        https://bugs.webkit.org/show_bug.cgi?id=145951

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetResourceCacheManager):
        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (WKResourceCacheManagerGetTypeID):
        (toWebsiteDataTypes):
        (WKResourceCacheManagerGetCacheOrigins):
        (WKResourceCacheManagerClearCacheForOrigin):
        (WKResourceCacheManagerClearCacheForAllOrigins):

2015-06-12  Anders Carlsson  <andersca@apple.com>

        Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
        https://bugs.webkit.org/show_bug.cgi?id=145950

        Reviewed by Dan Bernstein.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetTypeID):
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        (WKApplicationCacheManagerDeleteEntriesForOrigin):
        (WKApplicationCacheManagerDeleteAllEntries):
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetApplicationCacheManager):
        (WKContextGetPluginSiteDataManager):

2015-06-12  Anders Carlsson  <andersca@apple.com>

        Clean up IndexedDB website data retrieval and removal
        https://bugs.webkit.org/show_bug.cgi?id=145941

        Reviewed by Andreas Kling.

        - Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData
        safely between threads.
        
        - Use std::chrono instead of double for modification times.
        
        - Get rid of endTime since it's not used.
        
        - Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take
        a vector of origins instead of a single one.

        - Get rid of deleteAllIndexedDatabaseEntries.

        - Change SecurityOriginData::securityOrigin to call isolatedCopy on the origin components, since it's common
        to pass origins to other threads and we want that to be safe.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        (WebKit::DatabaseProcess::indexedDatabaseOrigins):
        (WebKit::removeAllDatabasesForOriginPath):
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins):
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince):
        (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): Deleted.
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): Deleted.
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
        (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): Deleted.
        * DatabaseProcess/DatabaseProcess.h:
        * Shared/SecurityOriginData.cpp:
        (WebKit::SecurityOriginData::securityOrigin):

2015-06-12  Antti Koivisto  <antti@apple.com>

        Network Cache: Use SHA1 for header checksum
        https://bugs.webkit.org/show_bug.cgi?id=145928

        Reviewed by Chris Dumez.

        Use SHA1 everywhere for consistency and robustness.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::bodyPathForKey):
        (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
        (WebKit::NetworkCache::decodeRecordMetaData):
        (WebKit::NetworkCache::decodeRecordHeader):
        (WebKit::NetworkCache::encodeRecordMetaData):
        (WebKit::NetworkCache::Storage::encodeRecord):
        (WebKit::NetworkCache::hashData): Deleted.

            This was the last user of 32 bit hashes in cache code.

        * NetworkProcess/cache/NetworkCacheStorage.h:

            Also bump the cache version number as recent changes have changed the format.
            Old caches would transition fine but this makes it easier to identify which version user has.

2015-06-12  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Video with reflection crashes WebKit and Safari
        https://bugs.webkit.org/show_bug.cgi?id=145905
        rdar://problem/18364939

        Reviewed by Anders Carlsson.
        
        On iOS, AVPlayerLayers are contained inside a WebVideoContainerLayer, but
        the layer type is still LayerTypeAVPlayerLayer.
        
        Avoid throwing exceptions when cloning such layers by checking the layer class.

        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
        (WebKit::PlatformCALayerRemoteCustom::clone):

2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Fix unused private field warning in WebContextMenuProxyEfl.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145911

        Reviewed by Darin Adler.

        * UIProcess/efl/WebContextMenuProxyEfl.cpp:
        (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): Deleted.
        * UIProcess/efl/WebContextMenuProxyEfl.h:

2015-06-12  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed build fix after r185502.

        * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
        GRefPtr.h header has been moved to a different place.

2015-06-12  Zan Dobersek  <zdobersek@igalia.com>

        [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
        https://bugs.webkit.org/show_bug.cgi?id=145799

        Reviewed by Carlos Garcia Campos.

        Update header inclusions for headers that have been moved
        to Source/WTF/wtf/glib/.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * Shared/Downloads/soup/DownloadSoup.cpp:
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
        * Shared/PrintInfo.h:
        * Shared/gtk/ArgumentCodersGtk.cpp:
        * Shared/gtk/ArgumentCodersGtk.h:
        * Shared/gtk/KeyedDecoder.h:
        * Shared/gtk/KeyedEncoder.h:
        * Shared/gtk/ProcessExecutablePathGtk.cpp:
        * UIProcess/API/gtk/WebKitBackForwardList.cpp:
        * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
        * UIProcess/API/gtk/WebKitColorChooser.h:
        * UIProcess/API/gtk/WebKitContextMenu.cpp:
        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
        * UIProcess/API/gtk/WebKitCookieManager.cpp:
        * UIProcess/API/gtk/WebKitDownload.cpp:
        * UIProcess/API/gtk/WebKitDownloadClient.cpp:
        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
        * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
        * UIProcess/API/gtk/WebKitFindController.cpp:
        * UIProcess/API/gtk/WebKitFormClient.cpp:
        * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
        * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
        * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
        * UIProcess/API/gtk/WebKitMimeInfo.cpp:
        * UIProcess/API/gtk/WebKitNavigationAction.cpp:
        * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
        * UIProcess/API/gtk/WebKitPolicyClient.cpp:
        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
        * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
        * UIProcess/API/gtk/WebKitUIClient.cpp:
        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        * UIProcess/API/gtk/WebKitUserContentManager.cpp:
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        * UIProcess/API/gtk/WebKitWebInspector.cpp:
        * UIProcess/API/gtk/WebKitWebResource.cpp:
        * UIProcess/API/gtk/WebKitWebView.cpp:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        * UIProcess/InspectorServer/WebSocketServer.h:
        * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        * UIProcess/Plugins/gtk/PluginInfoCache.h:
        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
        * UIProcess/gtk/DragAndDropHandler.cpp:
        * UIProcess/gtk/GestureController.h:
        * UIProcess/gtk/InputMethodFilter.cpp:
        * UIProcess/gtk/InputMethodFilter.h:
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
        * UIProcess/gtk/WebPopupMenuProxyGtk.h:
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
        * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
        * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
        * WebProcess/WebPage/gtk/PrinterListGtk.h:
        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
        * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
        * WebProcess/gtk/WebGtkExtensionManager.h:
        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
        * WebProcess/soup/WebProcessSoup.cpp:
        * WebProcess/soup/WebSoupRequestManager.h:

2015-06-12  Antti Koivisto  <antti@apple.com>

        Network Cache: Use SHA1 for key hash
        https://bugs.webkit.org/show_bug.cgi?id=143829

        Reviewed by Anders Carlsson.

        For consistency with blobs, use SHA1 instead of MD5.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<MD5::Digest>::encode): Deleted.
        (WebKit::NetworkCache::Coder<MD5::Digest>::decode): Deleted.

            No longer needed.

        * NetworkProcess/cache/NetworkCacheCoders.h:
        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::hashString):
        (WebKit::NetworkCache::Key::computeHash):
        * NetworkProcess/cache/NetworkCacheKey.h:

2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>

        Fix mismatched-tags warning in Source/WebKit2/UIProcess/gtk/InputMethodFilter.h
        https://bugs.webkit.org/show_bug.cgi?id=145923

        Reviewed by Carlos Garcia Campos.

        * UIProcess/gtk/InputMethodFilter.h:

2015-06-12  Antti Koivisto  <antti@apple.com>

        Use SHA1 for cache coder checksums
        https://bugs.webkit.org/show_bug.cgi?id=145880

        Reviewed by Anders Carlsson.

        Make cache data error detection more robust by using SHA1 for checksums.

        * NetworkProcess/cache/NetworkCacheDecoder.cpp:
        (WebKit::NetworkCache::Decoder::Decoder):
        (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
        (WebKit::NetworkCache::Decoder::decodeNumber):
        (WebKit::NetworkCache::Decoder::verifyChecksum):
        * NetworkProcess/cache/NetworkCacheDecoder.h:
        * NetworkProcess/cache/NetworkCacheEncoder.cpp:
        (WebKit::NetworkCache::Encoder::Encoder):
        (WebKit::NetworkCache::Encoder::grow):
        (WebKit::NetworkCache::Encoder::updateChecksumForData):
        (WebKit::NetworkCache::Encoder::encodeFixedLengthData):
        (WebKit::NetworkCache::Encoder::encodeNumber):
        (WebKit::NetworkCache::Encoder::encodeChecksum):
        * NetworkProcess/cache/NetworkCacheEncoder.h:
        (WebKit::NetworkCache::Encoder::buffer):
        (WebKit::NetworkCache::Encoder::bufferSize):
        (WebKit::NetworkCache::Encoder::updateChecksumForNumber):

2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Fix deprecated declarations warnings related to WK2 versioned structs
        https://bugs.webkit.org/show_bug.cgi?id=145913

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/ewk_favicon_database.cpp:
        (EwkFaviconDatabase::EwkFaviconDatabase):
        * UIProcess/efl/ContextHistoryClientEfl.cpp:
        (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
        * UIProcess/efl/ContextMenuClientEfl.cpp:
        (ContextMenuClientEfl::ContextMenuClientEfl):
        * UIProcess/efl/DownloadManagerEfl.cpp:
        (WebKit::DownloadManagerEfl::DownloadManagerEfl):
        * UIProcess/efl/FindClientEfl.cpp:
        (WebKit::FindClientEfl::FindClientEfl):
        * UIProcess/efl/FormClientEfl.cpp:
        (WebKit::FormClientEfl::FormClientEfl):
        * UIProcess/efl/PageUIClientEfl.cpp:
        (WebKit::PageUIClientEfl::PageUIClientEfl):

2015-06-11  Mark Lam  <mark.lam@apple.com>

        WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
        https://bugs.webkit.org/show_bug.cgi?id=145872

        Reviewed by Michael Saboff.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::reportException):
        - Don't assume we have an Exception object.  Let WebCore::reportException() take
          care of it.

2015-06-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [CMake] Unreviewed build fix after r185479.

        * CMakeLists.txt: Unlist the files that r185479 deleted.

2015-06-11  Anders Carlsson  <andersca@apple.com>

        Get rid of WebOriginDataManager
        https://bugs.webkit.org/show_bug.cgi?id=145896

        Reviewed by Andreas Kling.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::DatabaseProcess): Deleted.
        (WebKit::DatabaseProcess::getOrigins): Deleted.
        (WebKit::DatabaseProcess::deleteEntriesForOrigin): Deleted.
        (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates): Deleted.
        (WebKit::DatabaseProcess::deleteAllEntries): Deleted.
        * DatabaseProcess/DatabaseProcess.h:
        * DerivedSources.make:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::didReceiveMessage): Deleted.
        * UIProcess/WebOriginDataManagerProxy.cpp: Removed.
        (WebKit::WebOriginDataManagerProxy::supplementName): Deleted.
        (WebKit::WebOriginDataManagerProxy::create): Deleted.
        (WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy): Deleted.
        (WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy): Deleted.
        (WebKit::WebOriginDataManagerProxy::processPoolDestroyed): Deleted.
        (WebKit::WebOriginDataManagerProxy::processDidClose): Deleted.
        (WebKit::WebOriginDataManagerProxy::shouldTerminate): Deleted.
        (WebKit::WebOriginDataManagerProxy::refWebContextSupplement): Deleted.
        (WebKit::WebOriginDataManagerProxy::derefWebContextSupplement): Deleted.
        (WebKit::CallbackSynchronizer::create): Deleted.
        (WebKit::CallbackSynchronizer::~CallbackSynchronizer): Deleted.
        (WebKit::CallbackSynchronizer::taskStarted): Deleted.
        (WebKit::CallbackSynchronizer::taskCompleted): Deleted.
        (WebKit::CallbackSynchronizer::CallbackSynchronizer): Deleted.
        (WebKit::createSynchronizedCallback): Deleted.
        (WebKit::sendMessageToAllProcessesInProcessPool): Deleted.
        (WebKit::WebOriginDataManagerProxy::getOrigins): Deleted.
        (WebKit::WebOriginDataManagerProxy::didGetOrigins): Deleted.
        (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Deleted.
        (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Deleted.
        (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Deleted.
        (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Deleted.
        (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Deleted.
        * UIProcess/WebOriginDataManagerProxy.h: Removed.
        * UIProcess/WebOriginDataManagerProxy.messages.in: Removed.
        * UIProcess/WebProcessPool.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/OriginData/WebOriginDataManager.cpp: Removed.
        (WebKit::WebOriginDataManager::WebOriginDataManager): Deleted.
        (WebKit::WebOriginDataManager::getOrigins): Deleted.
        (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Deleted.
        (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Deleted.
        (WebKit::WebOriginDataManager::deleteAllEntries): Deleted.
        * WebProcess/OriginData/WebOriginDataManager.h: Removed.
        * WebProcess/OriginData/WebOriginDataManager.messages.in: Removed.
        * WebProcess/OriginData/WebOriginDataManagerSupplement.h: Removed.
        (WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement): Deleted.
        (WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::~WebProcess):
        (WebKit::WebProcess::WebProcess): Deleted.
        (WebKit::WebProcess::getOrigins): Deleted.
        (WebKit::WebProcess::deleteEntriesForOrigin): Deleted.
        (WebKit::WebProcess::deleteEntriesModifiedBetweenDates): Deleted.
        (WebKit::WebProcess::deleteAllEntries): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:

2015-06-11  Matt Rajca  <mrajca@apple.com>

        Media Session: Add plumbing for media control event delivery.
        https://bugs.webkit.org/show_bug.cgi?id=145859

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageHandleMediaEvent):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::handleMediaEvent):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::handleMediaEvent):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-06-11  Myles C. Maxfield  <mmaxfield@apple.com>

        [OS X] Decoding fonts may return nil when using force click
        https://bugs.webkit.org/show_bug.cgi?id=145890

        Reviewed by Beth Dakin.

        [NSFontDescriptor fontDescriptorWithFontAttributes] might return nil, which
        causes the encoding of an NSFont to erroneously return true.

        * Shared/mac/ArgumentCodersMac.mm:
        (IPC::decode):

2015-06-11  Anders Carlsson  <andersca@apple.com>

        Reimplement WKOriginDataManager in terms of API::WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=145889

        Reviewed by Dan Bernstein.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetOriginDataManager):
        * UIProcess/API/C/WKOriginDataManager.cpp:
        (WKOriginDataManagerGetTypeID):
        (WKOriginDataManagerGetOrigins):
        (WKOriginDataManagerDeleteEntriesForOrigin):
        (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
        (WKOriginDataManagerDeleteAllEntries):

2015-06-11  Brent Fulgham  <bfulgham@apple.com>

        Full screen video space can be resized to 1pt wide
        https://bugs.webkit.org/show_bug.cgi?id=145895
        <rdar://problem/20907914>

        Reviewed by Simon Fraser.

        Prior to the upcoming OS X, full screen mode was not resizable. Now that it is,
        we need to set a minimum window width that is large enough to hold the media
        controls. This makes our full-screen video behave the same as the QuickTimeX player.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Active that new
        kWKLayoutModeDynamicSizeWithMinimumViewSize style, and set the minimum view size to
        be the width of our media controls, with 20 pixels of padding on either side.
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Set the layout
        mode back to the default style.

2015-06-11  Jon Lee  <jonlee@apple.com>

        Update media controls JS and CSS to use picture-in-picture
        https://bugs.webkit.org/show_bug.cgi?id=145827
        <rdar://problem/21311576>

        Reviewed by Dean Jackson.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Deleted GetMediaUIImageData.

2015-06-11  Alex Christensen  <achristensen@webkit.org>

        Speculative build fix for GTK after r185463.

        * CMakeLists.txt:
        Remove WebPluginSiteDataManager.cpp from CMake build.

2015-06-11  Anders Carlsson  <andersca@apple.com>

        Remove WebPluginSiteDataManager
        https://bugs.webkit.org/show_bug.cgi?id=145884

        Reviewed by Andreas Kling.

        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::clearSiteData): Deleted.
        * PluginProcess/PluginProcess.h:
        * PluginProcess/PluginProcess.messages.in:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::clearSiteData): Deleted.
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::clearSiteData): Deleted.
        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Deleted.
        (WebKit::PluginProcessProxy::didFinishLaunching): Deleted.
        (WebKit::PluginProcessProxy::didClearSiteData): Deleted.
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp: Removed.
        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState): Deleted.
        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState): Deleted.
        (WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::create): Deleted.
        (WebKit::WebPluginSiteDataManager::WebPluginSiteDataManager): Deleted.
        (WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager): Deleted.
        (WebKit::WebPluginSiteDataManager::invalidate): Deleted.
        (WebKit::WebPluginSiteDataManager::getSitesWithData): Deleted.
        (WebKit::WebPluginSiteDataManager::didGetSitesWithData): Deleted.
        (WebKit::WebPluginSiteDataManager::clearSiteData): Deleted.
        (WebKit::WebPluginSiteDataManager::didClearSiteData): Deleted.
        (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins): Deleted.
        (WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin): Deleted.
        (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins): Deleted.
        * UIProcess/Plugins/WebPluginSiteDataManager.h: Removed.
        (WebKit::WebPluginSiteDataManager::processPool): Deleted.
        (WebKit::WebPluginSiteDataManager::clearProcessPool): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::~WebProcessPool): Deleted.
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessProxy.cpp:
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-11  Anders Carlsson  <andersca@apple.com>

        Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=145882

        Reviewed by Dan Bernstein.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetPluginSiteDataManager):
        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
        (WKPluginSiteDataManagerGetTypeID):
        (WKPluginSiteDataManagerGetSitesWithData):
        (WKPluginSiteDataManagerClearSiteData):
        (WKPluginSiteDataManagerClearAllSiteData):

2015-06-11  Antti Koivisto  <antti@apple.com>

        Network process crashes decoding invalid cache entry on 32bit system
        https://bugs.webkit.org/show_bug.cgi?id=145842
        rdar://problem/21228334

        Reviewed by Anders Carlsson.

        After cache scheme changes we may end up decoding invalid cache entries. This is by design,
        we should just fail decoding and delete these entries.

        However Decoder::bufferIsLargeEnoughToContain test in some cases would allow corrupted large
        sizes due to overflow in 32bit pointer math and we would crash when allocating a string.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<CString>::decode):
        (WebKit::NetworkCache::decodeStringText):
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):
        (WebKit::NetworkCache::Coder<MD5::Digest>::encode):
        * NetworkProcess/cache/NetworkCacheCoders.h:
        * NetworkProcess/cache/NetworkCacheDecoder.cpp:
        (WebKit::NetworkCache::Decoder::Decoder):
        (WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain):

            Reshuffle to avoid sum.

        (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
        * NetworkProcess/cache/NetworkCacheDecoder.h:
        (WebKit::NetworkCache::Decoder::bufferSize):
        (WebKit::NetworkCache::Decoder::currentOffset):
        (WebKit::NetworkCache::Decoder::length): Deleted.
        (WebKit::NetworkCache::Decoder::isInvalid): Deleted.
        (WebKit::NetworkCache::Decoder::markInvalid): Deleted.

            Remove these, they are not really used or needed.

2015-06-10  Anders Carlsson  <andersca@apple.com>

        Rewrite WKPluginSiteDataManager using WebsiteDataStore functions
        https://bugs.webkit.org/show_bug.cgi?id=145868

        Reviewed by Antti Koivisto.

        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
        (WKPluginSiteDataManagerGetSitesWithData):
        (WKPluginSiteDataManagerClearSiteData):
        (WKPluginSiteDataManagerClearAllSiteData):
        (toNPClearSiteDataFlags): Deleted.
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
        (WebKit::WebPluginSiteDataManager::processPool):

2015-06-11  Antti Koivisto  <antti@apple.com>

        3% cold PLT regression from network cache on iOS
        https://bugs.webkit.org/show_bug.cgi?id=145694
        rdar://problem/21158245

        Reviewed by Chris Dumez.

        Cache does not help in cold page loads but it shouldn't' be hurting either. Write I/O needs to be toned down a bit.

        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::IOChannel):
        (WebKit::NetworkCache::IOChannel::open):

            Dispatch channels inherit their I/O priority from the target queue. Use background queue for write I/O.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
        (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):

            Only write one file at a time instead of maximum of three.

        (WebKit::NetworkCache::Storage::retrieve):

            For consistency with store prepend new entries here too.

        (WebKit::NetworkCache::Storage::store):

            Delay start of the first write operation by 1s.
            Prepend instead of append to the pending write deque so retrieveFromMemory lookup finds newest entries first in case of duplicates

        (WebKit::NetworkCache::Storage::traverse):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-06-10  Yongjun Zhang  <yongjun_zhang@apple.com>

        Don't send touch events on link preview.
        https://bugs.webkit.org/show_bug.cgi?id=145863

        Disable web touch event recognizer on link preview. We do the same when finding nodes in inspector or when long press gesture
        is recognized (by _cancelAllTouches). 

        Reviewed by Beth Dakin.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Remove touch event gesture recognizer on preview start.
        (-[WKContentView didDismissPreviewViewController:committing:]): Add the gesture recognizer back on dismiss.

2015-06-10  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore should handle removing plug-in data for individual records
        https://bugs.webkit.org/show_bug.cgi?id=145864

        Reviewed by Beth Dakin.

        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::deleteWebsiteDataForHostNames):
        * PluginProcess/PluginProcess.h:
        * PluginProcess/PluginProcess.messages.in:
        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
        (WebKit::PluginProcessProxy::didFinishLaunching):
        (WebKit::PluginProcessProxy::didDeleteWebsiteDataForHostNames):
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::removeData):

2015-06-10  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore should handle removing plug-in data
        https://bugs.webkit.org/show_bug.cgi?id=145862

        Reviewed by Sam Weinig.

        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::deleteWebsiteData):
        * PluginProcess/PluginProcess.h:
        * PluginProcess/PluginProcess.messages.in:
        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::deleteWebsiteData):
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::~PluginProcessProxy):
        (WebKit::PluginProcessProxy::deleteWebsiteData):
        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
        (WebKit::PluginProcessProxy::didFinishLaunching):
        (WebKit::PluginProcessProxy::didDeleteWebsiteData):
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::removeData):

2015-06-10  Brent Fulgham  <bfulgham@apple.com>

        [WK2] Do not indicate Media Keys are present when they are not
        https://bugs.webkit.org/show_bug.cgi?id=145713
        <rdar://problem/19752566>

        Reviewed by Dean Jackson.

        Correct the reporting of Media Key presence by checking for the actual
        media key file, not just the directory. Sometimes the directory will exist
        with no media key files (e.g., if a user navigates to the directory using
        the Finder).

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::computeMediaKeyFile): Moved earlier in file so it could be used by
        the 'mediaKeyOrigins' method.
        (WebKit::WebsiteDataStore::mediaKeyOrigins): Only indicate we have a media key
        origin if the folder actually contains the media key file.
        (WebKit::WebsiteDataStore::removeMediaKeys): Use the existing 'computeMediaKeyFile',
        rather than manually building the file from strings.

2015-06-09  Anders Carlsson  <andersca@apple.com>

        Support fetching website data
        https://bugs.webkit.org/show_bug.cgi?id=145828

        Reviewed by Darin Adler.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::plugins):
        * UIProcess/WebsiteData/WebsiteDataStore.h:

2015-06-10  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed. Fixing the build for the GTK port with Clang.

        * UIProcess/gtk/InputMethodFilter.h: Add the <functional> header inclusion
        to avoid compilation errors due to missing std::function<>.

2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
        https://bugs.webkit.org/show_bug.cgi?id=145840

        Reviewed by Martin Robinson.

        It's currently used only by WebKit2 in the UI process and it's
        another file built twice because of the GTK2 plugin process.

        * PlatformGTK.cmake:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        * UIProcess/gtk/KeyBindingTranslator.cpp: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.cpp.
        (WebKit::backspaceCallback):
        (WebKit::selectAllCallback):
        (WebKit::cutClipboardCallback):
        (WebKit::copyClipboardCallback):
        (WebKit::pasteClipboardCallback):
        (WebKit::toggleOverwriteCallback):
        (WebKit::popupMenuCallback):
        (WebKit::showHelpCallback):
        (WebKit::deleteFromCursorCallback):
        (WebKit::moveCursorCallback):
        (WebKit::KeyBindingTranslator::KeyBindingTranslator):
        (WebKit::KeyBindingTranslator::commandsForKeyEvent):
        * UIProcess/gtk/KeyBindingTranslator.h: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.h.
        (WebKit::KeyBindingTranslator::addPendingEditorCommand):

2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
        https://bugs.webkit.org/show_bug.cgi?id=145598

        Reviewed by Žan Doberšek.

        We are sending GetEditorCommandsForKeyEvent sync message from web
        process to the UI process for every key pressed. And if the
        keydown event doesn't handle the key, the message is sent again
        for the keypress event, so in many cases it happens twice per
        keypress. We can get the list of commands when the key press event
        happens in the web view, and send it to the web process as part of
        the keyboard event like mac port does. In the web process,
        commands not inserting text will be handled by keydown and the
        rest in keypress without having to use any other IPC message for that.

        * Shared/NativeWebKeyboardEvent.h: Add command list parameter to
        the constructor.
        * Shared/WebEvent.h: Add GTK specific constructor that receives a
        list of commands and whether the event was handled by input methods.
        (WebKit::WebKeyboardEvent::commands): Returns the list of commands.
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
        Also copy the commands and handledByInputMethod member.
        * Shared/WebKeyboardEvent.cpp:
        (WebKit::WebKeyboardEvent::WebKeyboardEvent): Implement GTK
        specific constructor that receives a list of commands and whether
        the event was handled by input methods.
        (WebKit::WebKeyboardEvent::encode): Encode commands and handledByInputMethod.
        (WebKit::WebKeyboardEvent::decode): Decode commands and handledByInputMethod.
        * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add
        command list parameter to the constructor.
        * Shared/gtk/WebEventFactory.cpp:
        (WebKit::WebEventFactory::createWebKeyboardEvent): Use the new
        WebKeyboardEvent constructor and simplify the code. We don't need
        to explicitly set VK_PROCESSKEY as windows virtual key code when
        the event was handled by input methods. The WebCore event handler
        already does that.
        * Shared/gtk/WebEventFactory.h:
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Deleted.
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add a
        KeyBindingTranslator member.
        (webkitWebViewBaseKeyPressEvent): Use the new
        InputMethodFilter::filterKeyEvent() API and get the list of
        commands for the key when events was not handled by input methods.
        (webkitWebViewBaseKeyReleaseEvent): Use the new
        InputMethodFilter::filterKeyEvent() API.
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.messages.in: Remove GetEditorCommandsForKeyEvent message.
        * UIProcess/gtk/InputMethodFilter.cpp:
        (WebKit::InputMethodFilter::handleKeyboardEvent): Call the
        completation handler.
        (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults): Ditto.
        (WebKit::InputMethodFilter::filterKeyEvent): Use a completion
        handler for the task, so that the caller (the web view) can handle
        the keyboard event.
        * UIProcess/gtk/InputMethodFilter.h:
        * UIProcess/gtk/WebPageProxyGtk.cpp:
        (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Deleted.
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::handleKeyboardEvent): Return earlier if
        the event was handled by input methods. And get the list of
        commands from the PlatformKeyboardEvent instead of sending a sync
        message to the UI process.
        (WebKit::WebEditorClient::handleInputMethodKeydown): If the event
        was handled by inpout methods, set the event as default handled so
        that the WebCore event handler sets VK_PROCESSKEY as windows
        virtual key code.
        (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Deleted.

2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK build after r185412.

        Add missing include.

        * NetworkProcess/cache/NetworkCacheFileSystem.cpp:

2015-06-10  Antti Koivisto  <antti@apple.com>

        NetworkCache: Delete old cache versions
        https://bugs.webkit.org/show_bug.cgi?id=145800

        Reviewed by Darin Adler.

        * CMakeLists.txt:
        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
        (WebKit::NetworkCache::BlobStorage::synchronize):
        * NetworkProcess/cache/NetworkCacheFileSystem.cpp: Added.
        (WebKit::NetworkCache::directoryEntryType):
        (WebKit::NetworkCache::traverseDirectory):

            Pass entry type as callback argument.

        (WebKit::NetworkCache::deleteDirectoryRecursively):

            Add helper.

        (WebKit::NetworkCache::fileTimes):
        (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
        * NetworkProcess/cache/NetworkCacheFileSystem.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h.

            Move code to cpp.

        (WebKit::NetworkCache::traverseDirectory): Deleted.
        (WebKit::NetworkCache::traverseCacheFiles): Deleted.
        (WebKit::NetworkCache::fileTimes): Deleted.
        (WebKit::NetworkCache::updateFileModificationTimeIfNeeded): Deleted.
        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h: Removed.
        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::makeBlobDirectoryPath):
        (WebKit::NetworkCache::traverseRecordsFiles):

            Move cache hierarchy aware traversal code here from NetworkCacheFileSystem (for better layering).
            Rename for clarity.

        (WebKit::NetworkCache::deleteEmptyRecordsDirectories):

            Factor to a function.

        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::synchronize):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::clear):

            Use traverseRecordsFiles for traversal.

        (WebKit::NetworkCache::Storage::shrink):
        (WebKit::NetworkCache::Storage::deleteOldVersions):

            Delete version subdirectories with version number less than the current version.
            Remove code for clearing unversioned V1 caches. No one should have them.

        * NetworkProcess/cache/NetworkCacheStorage.h:
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-10  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Web Inspector is broken
        https://bugs.webkit.org/show_bug.cgi?id=145836

        Reviewed by Carlos Garcia Campos.

        * PlatformGTK.cmake: Thread the InspectorBackendCommands.js file as a separate
        dependency of InspectorGResourceBundle.xml. It can't be listed under the InspectorFiles
        variable and then searched via the CMake glob command because it probably won't exist
        at the time the command is run (since it's copied into the specified path), so it won't
        be listed among the dependencies at all.

2015-06-09  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):

2015-06-09  Anders Carlsson  <andersca@apple.com>

        Change the PluginProcessManager data fetching function to take a completion handler
        https://bugs.webkit.org/show_bug.cgi?id=145821

        Reviewed by Sam Weinig.

        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::fetchWebsiteData):
        (WebKit::PluginProcessManager::getSitesWithData): Deleted.
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::generateCallbackID):
        (WebKit::PluginProcessProxy::~PluginProcessProxy):
        (WebKit::PluginProcessProxy::fetchWebsiteData):
        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
        (WebKit::PluginProcessProxy::didFinishLaunching):
        (WebKit::PluginProcessProxy::didGetSitesWithData):
        (WebKit::PluginProcessProxy::getSitesWithData): Deleted.
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):

2015-06-09  Anders Carlsson  <andersca@apple.com>

        Add code to keep track of plug-in data host names in website data records
        https://bugs.webkit.org/show_bug.cgi?id=145818

        Reviewed by Andreas Kling.

        * Shared/WebsiteData/WebsiteData.cpp:
        (WebKit::WebsiteData::encode):
        (WebKit::WebsiteData::decode):
        * Shared/WebsiteData/WebsiteData.h:
        * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
        (WebKit::WebsiteDataRecord::displayNameForPluginDataHostName):
        (WebKit::WebsiteDataRecord::addPluginDataHostName):
        (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Deleted.
        * UIProcess/WebsiteData/WebsiteDataRecord.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):

2015-06-09  Anders Carlsson  <andersca@apple.com>

        Add Plug-in type declarations to WKWebsiteDataRecord and friends
        https://bugs.webkit.org/show_bug.cgi?id=145816

        Reviewed by Andreas Kling.

        * Shared/WebsiteData/WebsiteDataTypes.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:

2015-06-09  Antti Koivisto  <antti@apple.com>

        REGRESSION(r185262): NetworkCache is in wrong location on OS X
        https://bugs.webkit.org/show_bug.cgi?id=145812

        Reviewed by Anders Carlsson.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
        (WebKit::WebProcessPool::isNetworkCacheEnabled):

            Make sure static functions that use NSUserDefaults call registerUserDefaultsIfNeeded() first.

2015-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>

        Crash when passing Symbol to NPAPI plugin objects
        https://bugs.webkit.org/show_bug.cgi?id=145798

        Reviewed by Darin Adler.

        When the symbol is passed, `propertyName.publicName()` becomes nullptr.
        So dereferencing it causes null dereference errors.
        At first, this bug appears in the https://bugs.webkit.org/show_bug.cgi?id=145556,
        plugin[@@toStringTag] ("string" + plugin) causes SEGV in plugins/embed-inside-object.html test.

        This patch avoids it by early returning when the symbols are passed.
        Methods for symbols are not implemented in the NPObject side, so it works correctly.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::npIdentifierFromIdentifier):
        (WebKit::JSNPObject::callMethod):
        (WebKit::JSNPObject::getOwnPropertySlot):
        (WebKit::JSNPObject::put):
        (WebKit::JSNPObject::deleteProperty):
        (WebKit::JSNPObject::propertyGetter):
        (WebKit::JSNPObject::methodGetter):

2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
        https://bugs.webkit.org/show_bug.cgi?id=145791

        Reviewed by Sergio Villar Senin.

        Keep using G_PRIORITY_DEFAULT for reads, but use
        G_PRIORITY_DEFAULT_IDLE for writes now.

        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::outputStreamWriteReadyCallback): Use
        G_PRIORITY_DEFAULT_IDLE for write async operations.
        (WebKit::NetworkCache::IOChannel::write): Pass
        G_PRIORITY_DEFAULT_IDLE to runTaskInQueue().

2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation
        https://bugs.webkit.org/show_bug.cgi?id=145797

        Reviewed by Žan Doberšek.

        I misunderstood what the WorkQueue parameter meant in the IO
        channel operations. It's the queue where the completion handler
        should be run, not the whole operation. Since our operations are
        already non-blocking, we can just run the read/writes in the main
        thread, and schedule the completion handler in the given work
        queue when the operation finishes.

        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::inputStreamReadReadyCallback):
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::readSync):
        (WebKit::NetworkCache::outputStreamWriteReadyCallback):
        (WebKit::NetworkCache::IOChannel::write):

2015-06-09  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r185357): Fix build for iOS 8.x

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (fallbackIconForFile): Add cast prior to iOS 9.

2015-06-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Fix a crash on MiniBrowser when running on debug mode
        https://bugs.webkit.org/show_bug.cgi?id=145793

        Reviewed by Carlos Garcia Campos.

        r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.

        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess):

2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>

        [cmake] Fix the style issues in cmake project files
        https://bugs.webkit.org/show_bug.cgi?id=145755

        Reviewed by Darin Adler.

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:

2015-06-02  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] UI process memory spike, hang when uploading a very large JPEG

        <https://bugs.webkit.org/show_bug.cgi?id=145567>
        <rdar://problem/21206699>

        When uploading an image, we generate a thumbnail to use for an icon
        that sits next to the control. To do this, we load the image and draw
        it into a thumbnail-sized canvas. This can be very expensive for large
        images.

        To fix this, we'll use CGImageSource API, which will allow us to get
        any existing thumbnail that exists in the source file.

        Reviewed by Darin Adler.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (squareCropRectForSize):
        Use std::round, based on Darin's review feedback that a) rintf is
        incorrect in 64-bit systems where CGFloat is a double, b) rintf uses a
        variable rounding mode, which is undesirable.
        (squareImage):
        Changed to take a CGImageRef.
        Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
        this file.
        (thumbnailSizedImageForImage):
        Changed to take a CGImageRef and to use iconSideLength.
        (iconForImageFile):
        Create an image source for the file, then use CGImageSource API to
        generate a thumbnail.
        (-[_WKImageFileUploadItem initWithFileURL:originalImage:]): Deleted.
        (-[_WKImageFileUploadItem displayImage]):
        Use iconForImageFile() rather than trying to generate an icon from the
        UIImage.
        (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
        Removed originalImage parameter; _WKImageFileUploadItem no longer uses
        it.
        (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
        (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):

2015-06-08  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Use generics in framework headers
        https://bugs.webkit.org/show_bug.cgi?id=145781

        Reviewed by Sam Weinig.

        * mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.

2015-06-08  Chris Dumez  <cdumez@apple.com>

        Access GCController instance via GCController::singleton() instead of a free function
        https://bugs.webkit.org/show_bug.cgi?id=145776

        Reviewed by Darin Adler.

        Access GCController instance via GCController::singleton() instead of a
        free function as per coding style and for consistency with other
        singleton classes in the codebase.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
        (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::terminate):
        (WebKit::WebProcess::didClose):
        (WebKit::WebProcess::garbageCollectJavaScriptObjects):
        (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):

2015-06-08  Anders Carlsson  <andersca@apple.com>

        Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
        https://bugs.webkit.org/show_bug.cgi?id=145775

        Reviewed by Simon Fraser.

        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (+[WKWebsiteDataStore allWebsiteDataTypes]):

2015-06-08  Anders Carlsson  <andersca@apple.com>

        Move the snapshot layer contents SPI to the web view
        https://bugs.webkit.org/show_bug.cgi?id=145771

        Reviewed by Geoffrey Garen.

        We need to potentially ask the web page to take a snapshot of the current item,
        so move the SPI to WKWebView and name it appropriately.

        * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
        (-[WKBackForwardListItem _snapshotLayerContents]): Deleted.
        * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Removed.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-08  Brady Eidson  <beidson@apple.com>

        Completely remove all IDB properties/constructors when it is disabled at runtime.
        rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034

        Reviewed by Geoffrey Garen.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.

2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
        https://bugs.webkit.org/show_bug.cgi?id=145542

        Reviewed by Alexey Proskuryakov.

        Add documentation to webkit_web_context_prefetch_dns to indicate that the function does
        nothing if the system configuration indicates we should use a proxy to resolve the host.

        * UIProcess/API/gtk/WebKitWebContext.cpp:

2015-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251
        https://bugs.webkit.org/show_bug.cgi?id=145751

        Reviewed by Darin Adler.

        In r185251 the CFNetwork cache was disabled in the web process,
        but it also removed the disk cache directory web process
        initialization parameter. While we support networking in the web
        process when shared secondary process model is used, the network
        cache should still work. We can remove this if we eventually
        switch to use the network process unconditionally.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Encode disk cache directory.
        (WebKit::WebProcessCreationParameters::decode): Decode disk cache directory.
        * Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again.

2015-06-08  Csaba Osztrogonác  <ossy@webkit.org>

        [GTK] Remove the unused scroll function from WebPageGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145756

        Reviewed by Carlos Garcia Campos.

        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
        (WebKit::scroll): Deleted.

2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
        https://bugs.webkit.org/show_bug.cgi?id=145752

        Reviewed by Carlos Garcia Campos.

        EFL port needs to add different prefix for network cache directory since r185262.
        Modify it basedon GTK port fix.

        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):

2015-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r185262): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work after r185262
        https://bugs.webkit.org/show_bug.cgi?id=145735

        Reviewed by Darin Adler.

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess): Use
        the directory name to clear the old cache, since the disk cache
        subdirectory is now added in the UI process.
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_set_disk_cache_directory): Update the
        WebProcessPool configuration to override the disk cache directory.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess): Use the
        configuration to get the disk cache directory.
        (WebKit::WebProcessPool::WebProcessPool): Remove
        m_diskCacheDirectory member initialization.
        * UIProcess/WebProcessPool.h: Remove m_diskCacheDirectory member.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
        Append the disk cache subdirectory.

2015-06-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL][GTK] Fix build  break since r185262
        https://bugs.webkit.org/show_bug.cgi?id=145724

        Unreviewed, fix build break for EFL and GTK ports.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::defaultLocalStorageDirectory):
        (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
        (API::WebsiteDataStore::defaultNetworkCacheDirectory):
        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
        (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
        (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
        (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-06-06  Dan Bernstein  <mitz@apple.com>

        Don’t enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.

        * Configurations/DebugRelease.xcconfig:

2015-06-06  Dan Bernstein  <mitz@apple.com>

        [iOS] Can’t debug with Development XPC services due to automatic sandboxing
        https://bugs.webkit.org/show_bug.cgi?id=145731

        Rubber-stamped by Darin Adler.

        In iOS, the XPC services are automatically sandboxed based on their entitlements. The
        sandbox doesn’t allow them to re-exec, which is necessary for linking against engineering
        builds of the WebKit frameworks placed in a non-system location.

        The solution is to opt Engineering builds into manual sandboxing.

        * Configurations/BaseTarget.xcconfig:
        - Add ENABLE_MANUAL_SANDBOXING to
          GCC_PREPROCESSOR_DEFINITIONS when WK_MANUAL_SANDBOXING_ENABLED is YES.
        - Set WK_MANUAL_SANDBOXING_ENABLED to YES for OS X, because we always use manual
          sandboxing on that platform.

        * Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
          WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.

        * Configurations/BaseXPCService.xcconfig: Define CODE_SIGN_ENTITLEMENTS for iOS to be empty
          if the service is not installed; to use the base entitlements file from Configurations if
          manual sandboxing is not enabled; and to use a derived entitlements file, which doesn’t
          specify a sandbox profile, if manual sandboxing is enabled.

        * Configurations/DatabaseService.Development.xcconfig: Define
          WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
          CODE_SIGN_ENTITLEMENTS for iOS.

        * Configurations/DatabaseService.xcconfig: Ditto.
        * Configurations/NetworkService.Development.xcconfig: Ditto.
        * Configurations/NetworkService.xcconfig: Ditto.
        * Configurations/WebContentService.Development.xcconfig: Ditto.
        * Configurations/WebContentService.xcconfig: Ditto.

        * WebKit2.xcodeproj/project.pbxproj:
        - In the Derived Sources target, added a Derive Entitlements for Manual Sandboxing script
          build phase. When building for iOS with manual sandboxing enabled, it creates copies of
          the iOS entitlements files with a -no-sandbox suffix and the seatbelt-profiles key
          removed.
        - In the WebKit target, added a Copy iOS Sandbox Profiles for Manual Sandboxing script build
          phase. When building for iOS with manual sandboxing enabled, it copies the iOS sandbox
          profiles into the framework, so that the services can apply them to themselves at runtime.

        * Shared/ios/ChildProcessIOS.mm:
        (WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and don’t define it
        here.

        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
        and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.

2015-06-06  Anders Carlsson  <andersca@apple.com>

        Remove support from getting plug-in information from Carbon resources
        https://bugs.webkit.org/show_bug.cgi?id=145730

        Reviewed by Dan Bernstein.

        No current plug-in versions use this feature, and both Chrome and Mozilla for
        Mac stopped looking at Carbon resources years ago.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo):
        (WebKit::ResourceMap::ResourceMap): Deleted.
        (WebKit::ResourceMap::~ResourceMap): Deleted.
        (WebKit::ResourceMap::isValid): Deleted.
        (WebKit::getStringListResource): Deleted.
        (WebKit::getPluginInfoFromCarbonResources): Deleted.

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Only allow plug-ins to create custom MIME property lists on older versions of OS X
        https://bugs.webkit.org/show_bug.cgi?id=145716

        Reviewed by Dan Bernstein.

        * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
        * Shared/Plugins/Netscape/NetscapePluginModule.h:
        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::getMIMETypesFromPluginBundle):
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

2015-06-05  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Limit the number of vnodes used by the WebContent processes
        https://bugs.webkit.org/show_bug.cgi?id=145672
        <rdar://problem/21126637>

        Reviewed by Antti Koivisto.

        Have the WebContent process register a vnode pressure handler on iOS,
        which calls the memory pressure handler.

        On non-critical pressure, it will prune dead resources from the memory
        cache, which should free up some vnodes. On critical pressure, the
        handler will clear the PageCache and do a JS GC, which should free even
        more vnodes.

        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Fix refacto, don't put IndexedDB databases in the cache directory
        https://bugs.webkit.org/show_bug.cgi?id=145714

        Reviewed by Antti Koivisto.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Make the network cache directory part of WKContextConfigurationRef
        https://bugs.webkit.org/show_bug.cgi?id=145711

        Reviewed by Antti Koivisto.

        Also, make the UI process be in control of where we place the new network cache.
        When using the Modern WebKit API, put the cache in ~/Library/Caches/<Bundle ID>/WebKit/NetworkCache,
        and put the cache in ~/Library/Caches/<Bundle ID>/WebKitCache otherwise (this is just for Safari).

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::open):
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetDiskCacheDirectory): Deleted.
        * UIProcess/API/C/WKContextConfigurationRef.cpp:
        (WKContextConfigurationCopyDiskCacheDirectory):
        (WKContextConfigurationSetDiskCacheDirectory):
        * UIProcess/API/C/WKContextConfigurationRef.h:
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
        (WebKit::WebProcessPool::isNetworkCacheEnabled):
        (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration):
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::diskCacheDirectory): Deleted.
        * UIProcess/WebProcessPool.h:

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Make the application cache directory part of WKContextConfigurationRef
        https://bugs.webkit.org/show_bug.cgi?id=145704

        Reviewed by Geoffrey Garen.

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetApplicationCacheDirectory): Deleted.
        * UIProcess/API/C/WKContextConfigurationRef.cpp:
        (WKContextConfigurationCopyApplicationCacheDirectory):
        (WKContextConfigurationSetApplicationCacheDirectory):
        * UIProcess/API/C/WKContextConfigurationRef.h:
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::applicationCacheDirectory): Deleted.
        * UIProcess/WebProcessPool.h:

2015-06-05  Mark Lam  <mark.lam@apple.com>

        finally blocks should not set the exception stack trace when re-throwing the exception.
        https://bugs.webkit.org/show_bug.cgi?id=145525

        Reviewed by Geoffrey Garen.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::reportException):
        - Changed to use the new Exception object.

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Disable the CFNetwork cache in the web process
        https://bugs.webkit.org/show_bug.cgi?id=145700
        rdar://problem/20243343

        Reviewed by Geoffrey Garen.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::open):
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
        (WebKit::WebProcessCreationParameters::encode): Deleted.
        (WebKit::WebProcessCreationParameters::decode): Deleted.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Deleted.
        (WebKit::WebProcess::initializeWebProcess): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformClearResourceCaches):
        (WebKit::WebProcess::platformInitializeWebProcess):
        (WebKit::WebProcess::platformSetCacheModel): Deleted.
        (WebKit::WebProcess::platformTerminate): Deleted.

2015-06-05  Anders Carlsson  <andersca@apple.com>

        Consolidate default website data directory computations
        https://bugs.webkit.org/show_bug.cgi?id=145698

        Reviewed by Andreas Kling.

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
        (API::WebsiteDataStore::defaultNetworkCacheDirectory):
        (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
        (API::WebsiteDataStore::defaultLocalStorageDirectory):
        (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
        (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        (API::applicationCacheDirectory): Deleted.

2015-06-01  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] Uploading an animated GIF from the photo library uploads a JPEG

        <https://bugs.webkit.org/show_bug.cgi?id=145539>
        <rdar://problem/19760877

        Selecting a photo from the photo library using UIImagePickerController
        results in an NSDictionary with image info and a UIImage with the
        image. It's not possible to get the original image data from the
        UIImage, only a PNG or JPEG representation, so we were getting a JPEG
        representation and uploading that to the server. For animated GIFs,
        this meant a JPEG representation of the first frame.

        To fix this, we'll get the asset URL, if available, and use the Photos
        API to query for the original image data.

        Reviewed by Andy Estes and Joe Pecoraro.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        Soft link the Photos framework.

        (-[WKFileUploadPanel _uploadItemForImageData:originalImage:imageName:successBlock:failureBlock:]):
        Save the image's data to a temporary location, and create a
        _WKImageFileUploadItem. Code moved from
        -_uploadItemFromMediaInfo:successBlock:failureBlock:.

        (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
        Get a JPEG representation of the UIImage, and create an upload item
        from that data.

        (uploadImageNameFromUTI):
        Return a filename for the uploaded image based on the UTI.

        (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
        Fetch the photo asset with the given asset URL. Create an image manager
        object, and request the image data for the photo asset. Create an
        upload item from that data. If we fail, fall back to a JPEG
        representation.

        (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
        Return early if the media item is not an image type. If it is, and we
        have an asset URL, try to create an upload item for the native image.
        If we don't have an asset URL, use a JPEG representation of the image.

2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        REGRESSION(r185091): Crash happens on indexdb tests
        https://bugs.webkit.org/show_bug.cgi?id=145549

        Reviewed by Darin Adler.

        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Remove leakRef() use.
        (WebKit::WebIDBServerConnection::didCreateObjectStore):
        (WebKit::WebIDBServerConnection::didCreateIndex):
        (WebKit::WebIDBServerConnection::didDeleteIndex):
        (WebKit::WebIDBServerConnection::didPutRecord):
        (WebKit::WebIDBServerConnection::didGetRecord):
        (WebKit::WebIDBServerConnection::didOpenCursor):
        (WebKit::WebIDBServerConnection::didAdvanceCursor):
        (WebKit::WebIDBServerConnection::didIterateCursor):
        (WebKit::WebIDBServerConnection::didCount):
        (WebKit::WebIDBServerConnection::didDeleteRange):
        (WebKit::WebIDBServerConnection::didClearObjectStore):
        (WebKit::WebIDBServerConnection::didDeleteObjectStore):
        (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):

2015-06-04  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
        https://bugs.webkit.org/show_bug.cgi?id=143912

        Reviewed by Simon Fraser.

        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setDragImage):
        When using the WKWebView, convert the position from the WKView's
        coordinate system to the WKWebView's.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView draggingUpdated:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _dragImageForView:withImage:at:linkDrag:]):
        Whitespace cleanup in original drag code.

2015-06-04  Dan Bernstein  <mitz@apple.com>

        Fixed the build.

        * UIProcess/API/Cocoa/WKErrorPrivate.h:

2015-06-04  Dan Bernstein  <mitz@apple.com>

        Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.

        Rubber-stamped by Anders Carlsson.

        * WebKit2.xcodeproj/project.pbxproj: Renamed the target. For now, added an aggregate
        target with the old name that depends on the renamed target. We can remove it once the build
        system doesn’t reference to old name.

2015-06-03  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Expose interruptedForPolicyChangeError
        https://bugs.webkit.org/show_bug.cgi?id=145627

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
        kWKErrorCodeFrameLoadInterruptedByPolicyChange.

2015-06-04  Chris Dumez  <cdumez@apple.com>

        [WK2] Prune more resources from the MemoryCache before process suspension
        https://bugs.webkit.org/show_bug.cgi?id=145633

        Reviewed by Andreas Kling.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::lowMemoryHandler):
        (WebKit::NetworkProcess::initializeNetworkProcess):
        (WebKit::NetworkProcess::processWillSuspendImminently):
        (WebKit::NetworkProcess::prepareToSuspend):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformLowMemoryHandler):
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::initializeProcess):

        Update low memory handler prototype to match WebCore changes.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::actualPrepareToSuspend):

        Pass Synchronous::Yes argument to MemoryPressureHandler::releaseMemory()
        to request that the memory is free up synchronously (e.g. synchronous
        JS garbage collection) as the process is about to be suspended.
        Previously, the memory pressure handler was trying to detect this case
        by checking if the system was really under memory pressure but this was
        a bit hackish and it wouldn't work if the process happened to get
        suspended while the system was under memory pressure.

2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] [Wayland] Build is broken on trunk
        https://bugs.webkit.org/show_bug.cgi?id=142879

        Reviewed by Carlos Garcia Campos.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
        is enabled GLNativeWindowType is not an u_int64 type.
        Cast contextID to avoid a build failure.

2015-06-03  Dan Bernstein  <mitz@apple.com>

        Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.

        * WebKit2.xcodeproj/project.pbxproj:

2015-06-03  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Implement window_object_cleared callback in EwkPageClient.
        https://bugs.webkit.org/show_bug.cgi?id=145603

        Reviewed by Gyuyoung Kim.

        We need to provide right timing for custom JS API that may need to work at the beginning of the page.

        * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
        * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
        (EwkPage::EwkPage):
        (EwkPage::didStartProvisionalLoadForFrame):
        (EwkPage::didClearWindowObjectForFrame):
        (EwkPage::didFinishDocumentLoadForFrame):
        * WebProcess/InjectedBundle/API/efl/ewk_page.h:
        * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:

2015-06-03  Anders Carlsson  <andersca@apple.com>

        Add SPI that returns the snapshot layer contents for a given back/forward list item
        https://bugs.webkit.org/show_bug.cgi?id=145621

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
        (-[WKBackForwardListItem _snapshotLayerContents]):
        * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
        * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItemInternal.h.
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-02  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Implement load_started callback in EwkPageClient.
        https://bugs.webkit.org/show_bug.cgi?id=145545

        Reviewed by Gyuyoung Kim.

        We need to provide load_started callback to web extension module.

        * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
        * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
        (EwkPage::EwkPage):
        (EwkPage::remove):
        (EwkPage::didStartProvisionalLoadForFrame):
        (EwkPage::didFinishDocumentLoadForFrame):
        * WebProcess/InjectedBundle/API/efl/ewk_page.h:
        * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:

2015-06-02  Gavin Barraclough  <barraclough@apple.com>

        PDFs always think they're visible on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=145493
        <rdar://problem/19668879>

        Reviewed by Andreas Kling & Sam Weinig.

        The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
        that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
        the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
        (which is in the view hierarchy) does not listen for these events.

        Visibility of the page should really just track the visibility of the WKWebView (and when
        actually assessing the visibility it largely does - the page client checks the web view's
        visibility, bar a FIXME, and the foreground/background check, which needs to change).
        So notifications should really just come from the WKWebView.

        The WKWebView already listens for the didMoveToWindow notification, it just was only updating
        the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
        WKContentView can just be removed.

        There is one problem with this in that it would reverse the order of the calls to
        viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
        updating the screen pixel density. To fix this, moving the call to _updateForScreen:
        to willMoveToWindow:, to ensure it occurs before the page becomes visible.

        This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
        within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
        to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
        IPC traffic).

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView didMoveToWindow]):
            - should update all view state flags.
        * UIProcess/API/ios/WKViewIOS.mm:
        (-[WKView didMoveToWindow]):
            - added to match WKWebView.mm, for WebKitTestRunner.
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
            - should _updateForScreen:
        (-[WKContentView didMoveToWindow]): Deleted.
            - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].

2015-06-02  Chris Dumez  <cdumez@apple.com>

        [iOS][WK2] Always mark layers as volatile for background pages
        https://bugs.webkit.org/show_bug.cgi?id=145547
        <rdar://problem/20663184>

        Reviewed by Simon Fraser.

        We previously marked layers as volatile when the WebProcess was about
        to be suspended. Most of the time the WebProcess gets suspended when a
        page goes into the background. However, it is not always true (see
        radar), in which case the layers won't be marked as volatile and use
        memory even though they are not visible.

        We now mark layers as volatile as soon as the page goes into the
        background, instead of relying on the WebProcess suspension mechanism
        to do so.

        A new ApplicationDidEnterBackground IPC message from the UIProcess to
        the WebProcess is added (in addition to the pre-existing
        ApplicationWillEnterForeground one). When the WebProcess receives this
        message, it will freeze the layer tree state and mark the layers as
        volatile (with a timer to keep retrying if needed), similarly to what
        is already done in WebProcess::actualPrepareToSuspend().
        When the ApplicationWillEnterForeground is received, we unfreeze the
        layer tree state. The layers' volatile state will be automatically
        updated when they are displayed (see setBufferVolatility() call in
        RemoteLayerBackingStore::display()).

        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _applicationDidEnterBackground:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidEnterBackground):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::setLayerTreeStateIsFrozen):
        (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::volatilityTimerFired):
        (WebKit::WebPage::applicationDidEnterBackground):
        (WebKit::WebPage::applicationWillEnterForeground):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::markAllLayersVolatileIfPossible):
        (WebKit::WebProcess::setAllLayerTreeStatesFrozen):

2015-06-02  Brady Eidson  <beidson@apple.com>

        WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
        rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
        
        Reviewed by Alex Christensen.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::clickedLink):
        
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::performFrameLoadURLRequest):
        (WebKit::PluginView::loadURL):
        
        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::searchWithGoogle):
        
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchCreatePage):
        
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::openInNewTab):
        
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadURLInFrame):
        (WebKit::WebPage::loadRequest):
        (WebKit::WebPage::loadDataImpl):
        (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):

2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        REGRESSION(r185091): Crash happens on indexdb tests
        https://bugs.webkit.org/show_bug.cgi?id=145549

        Reviewed by Csaba Osztrogonác.

        r185091 caused crash on some indexeddb tests. The crash happens because IDBDatabaseError::create() doesn't
        dereference count by using ptr(). It makes a crash when dereferencing on ~Ref() destructor. To fix this issue,
        this patch uses leakRef() instead of ptr().

        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
        (WebKit::WebIDBServerConnection::didCreateObjectStore):
        (WebKit::WebIDBServerConnection::didCreateIndex):
        (WebKit::WebIDBServerConnection::didDeleteIndex):
        (WebKit::WebIDBServerConnection::didPutRecord):
        (WebKit::WebIDBServerConnection::didGetRecord):
        (WebKit::WebIDBServerConnection::didOpenCursor):
        (WebKit::WebIDBServerConnection::didAdvanceCursor):
        (WebKit::WebIDBServerConnection::didIterateCursor):
        (WebKit::WebIDBServerConnection::didCount):
        (WebKit::WebIDBServerConnection::didDeleteRange):
        (WebKit::WebIDBServerConnection::didClearObjectStore):
        (WebKit::WebIDBServerConnection::didDeleteObjectStore):
        (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):

2015-06-01  Enrica Casucci  <enrica@apple.com>

        [iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection.
        https://bugs.webkit.org/show_bug.cgi?id=145538
        rdar://problem/18504199

        Reviewed by Darin Adler.

        The extend parameter was ignored in all the functions below.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _moveUp:withHistory:]):
        (-[WKContentView _moveDown:withHistory:]):
        (-[WKContentView _moveLeft:withHistory:]):
        (-[WKContentView _moveRight:withHistory:]):
        (-[WKContentView _moveToStartOfWord:withHistory:]):
        (-[WKContentView _moveToStartOfParagraph:withHistory:]):
        (-[WKContentView _moveToStartOfLine:withHistory:]):
        (-[WKContentView _moveToStartOfDocument:withHistory:]):
        (-[WKContentView _moveToEndOfWord:withHistory:]):
        (-[WKContentView _moveToEndOfParagraph:withHistory:]):
        (-[WKContentView _moveToEndOfLine:withHistory:]):
        (-[WKContentView _moveToEndOfDocument:withHistory:]):

2015-06-01  Anders Carlsson  <andersca@apple.com>

        Use xpc_connection_set_oneshot_instance where possible
        https://bugs.webkit.org/show_bug.cgi?id=145535
        rdar://problem/21109994

        Reviewed by Sam Weinig.

        Use xpc_connection_set_oneshot_instance where possible; this will make sure that the 
        web process instances go away when the web process exits.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService):
        (WebKit::connectToReExecService):

2015-06-01  Enrica Casucci  <enrica@apple.com>

        [iOS] Hardware Keyboard: Command + left arrow does not work.
        https://bugs.webkit.org/show_bug.cgi?id=145531
        rdar://problem/18576402

        Reviewed by Anders Carlsson.

        We were calling a non existent command (moveToStartOfLine) instead of
        moveToBeginningOfLine.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _moveToStartOfLine:withHistory:]):

2015-06-01  Brady Eidson  <beidson@apple.com>

        Add WKTR support for "should open external URLs".
        https://bugs.webkit.org/show_bug.cgi?id=145505

        Reviewed by Darin Adler.

        Expose C-spi to allow WKTR to set this bit on new loads:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
        * UIProcess/API/C/WKPagePrivate.h:
        
        Expose the bit on NavigationAction for the policy delegate:        
        * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
        (WKBundleNavigationActionGetShouldOpenExternalURLs):
        * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h.

        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
        (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
    
        * WebKit2.xcodeproj/project.pbxproj:

2015-06-01  Gavin Barraclough  <barraclough@apple.com>

        PDFs always think they're visible on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=145493
        <rdar://problem/19668879>

        Unreviewed roll-out.

        Temporarily reverting this change – will need a workaround for test harness craziness.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView didMoveToWindow]):
        (-[WKWebView setOpaque:]):
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
        (-[WKContentView didMoveToWindow]):
        (-[WKContentView browsingContextController]):

2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Remove unused const variable from EwkView.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145512

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/EwkView.cpp:

2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>

        [cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
        https://bugs.webkit.org/show_bug.cgi?id=145264

        Reviewed by Carlos Garcia Campos.

        * CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.

2015-05-31  Gavin Barraclough  <barraclough@apple.com>

        PDFs always think they're visible on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=145493
        <rdar://problem/19668879>

        Reviewed by Andreas Kling.

        The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
        that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
        the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
        (which is in the view hierarchy) does not listen for these events.

        Visibility of the page should really just track the visibility of the WKWebView (and when
        actually assessing the visibility it largely does - the page client checks the web view's
        visibility, bar a FIXME, and the foreground/background check, which needs to change).
        So notifications should really just come from the WKWebView.

        The WKWebView already listens for the didMoveToWindow notification, it just was only updating
        the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
        WKContentView can just be removed.

        There is one problem with this in that it would reverse the order of the calls to
        viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
        updating the screen pixel density. To fix this, move the call to _updateForScreen: to
        willMoveToWindow:, to ensure it occurs before the page becomes visible.

        This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
        within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
        to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
        IPC traffic).

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView didMoveToWindow]):
            - should update all view state flags.
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
            - should _updateForScreen:
        (-[WKContentView didMoveToWindow]): Deleted.
            - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].

2015-05-30  Brady Eidson  <beidson@apple.com>

        Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
        https://bugs.webkit.org/show_bug.cgi?id=145495

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):

2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Crash closing a related tab with Web Inspector open while page is refreshing
        https://bugs.webkit.org/show_bug.cgi?id=145488

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::~WebInspector):
        Ensure, no matter how we close, that we have invalidated the
        frontend connection of which we are the client.

        (WebKit::WebInspector::createInspectorPage):
        This member variable will never be null.

2015-05-29  Andreas Kling  <akling@apple.com>

        [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
        <https://webkit.org/b/145487>
        <rdar://problem/20989389>

        Reviewed by Benjamin Poulain.

        Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
        when we bounce back from being pinch-zoomed past the maximum scale.

        This fixes an issue where the bounce-back animation would cause a burst of
        unnecessary tile generation.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::adjustVelocityDataForBoundedScale):
        (WebKit::WebPage::updateVisibleContentRects):

2015-05-29  Jon Lee  <jonlee@apple.com>

        Fix preferences for wireless playback
        https://bugs.webkit.org/show_bug.cgi?id=145477
        rdar://problem/21166767

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
        * UIProcess/API/C/WKPreferencesRef.h:

2015-05-29  Enrica Casucci  <enrica@apple.com>

        [iOS] Cursor hidden in text area once it scrolls.
        https://bugs.webkit.org/show_bug.cgi?id=145451
        rdar://problem/20356413

        Reviewed by Simon Fraser.

        This patch fixes both the touch scrolling inside the
        overflow area as well as the programmatic scroll that
        occurs when inserting a new line. The first issue is fixed by
        implementing the chrome client methods didLayout,
        didStartOverflowScroll and didEndOverflowScroll. The second
        required changing the implementation of notifyRevealedSelectionByScrollingFrame.
        We not only need to notify the client to redraw the selection,
        but we also need to recompute the editorState, because scrolling
        might have occurred.
        I've removed the NotifyRevealedSelection message that was not needed
        any longer, since EditorStateChanged will do exactly what we want.

        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::editorStateChanged):
        (WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
        (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
        (WebKit::WebChromeClient::didLayout):
        (WebKit::WebChromeClient::didStartOverflowScroll):
        (WebKit::WebChromeClient::didEndOverflowScroll):

2015-05-29  Chris Dumez  <cdumez@apple.com>

        [iOS] Update WebContent process sandbox profile for AWD logging
        https://bugs.webkit.org/show_bug.cgi?id=145473
        <rdar://problem/20543269>

        Reviewed by Darin Adler.

        Update WebContent process sandbox profile for AWD logging.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2015-05-29  Anders Carlsson  <andersca@apple.com>

        WebKit.framework installs or references Mac-only headers on iOS
        https://bugs.webkit.org/show_bug.cgi?id=145471
        rdar://problem/21161459

        Reviewed by Dan Bernstein.

        * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
        Add an #if !TARGET_OS_IPHONE guard around the entire header.

2015-05-29  Anders Carlsson  <andersca@apple.com>

        WKScriptMessageInternal.h should be a project header, not a private header
        https://bugs.webkit.org/show_bug.cgi?id=145464
        rdar://problem/21161639

        Reviewed by Dan Bernstein.

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-28  Alexey Proskuryakov  <ap@apple.com>

        Clean up VisitedLinkProvider teardown
        https://bugs.webkit.org/show_bug.cgi?id=145450
        rdar://problem/20244726

        Reviewed by Brady Eidson.

        * UIProcess/VisitedLinkProvider.cpp:
        (WebKit::VisitedLinkProvider::~VisitedLinkProvider):

2015-05-28  Brady Eidson  <beidson@apple.com>

        Change method of signaling "should open external urls" to WebKit.
        https://bugs.webkit.org/show_bug.cgi?id=145454

        Reviewed by Dan Bernstein.

        Making this a property on the request was never a good idea.

        Adding a new extensible load SPI seems much better.

        * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
        * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.

        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
        (-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
          it always gets the default restrictive behavior.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView loadRequest:]):
        (-[WKWebView loadRequest:withOptions:]): Take an options dictionary that, for now, 
          only supports one option.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-28  Anders Carlsson  <andersca@apple.com>

        Make sure that we create the private WebKit.framework symlinks last
        https://bugs.webkit.org/show_bug.cgi?id=145442
        <rdar://problem/21142213>

        Reviewed by Dan Bernstein.

        Move the "Add Symlinks in /System/Library/PrivateFrameworks/WebKit.framework" build phase to
        the "All" aggregate target. Also update the script now that INSTALL_PATH is different.

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Code clean up for extracting information from the mix of WritingMode and TextDirection
        https://bugs.webkit.org/show_bug.cgi?id=143399

        Reviewed by Darin Adler.

        * Shared/WebPopupItem.h:
        * UIProcess/API/C/efl/WKAPICastEfl.h:
        * UIProcess/WebPopupMenuProxy.h:
        enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
        WritingMode.h instead of including TextFlags.h.

2015-05-28  Antti Koivisto  <antti@apple.com>

        Disable network cache for old clients
        https://bugs.webkit.org/show_bug.cgi?id=145418

        Reviewed by Andreas Kling.

        Follow-up: Don't do linked-on-or-after checks for iOS Safari.

        * UIProcess/Cocoa/VersionChecks.mm:
        (WebKit::linkTimeVersion):
        (WebKit::linkedOnOrAfter):

2015-05-28  Matt Rajca  <mrajca@apple.com>

        Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
        https://bugs.webkit.org/show_bug.cgi?id=145415

        Reviewed by Eric Carlson.

        * Configurations/FeatureDefines.xcconfig:

2015-05-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Unreviewed, Fix build break since r184930.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
        in isSameSchemeHostPort().

2015-05-28  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed. Fixing the build after r184950.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
        now expects a Ref<WebCore::SecurityOrigin> object.

2015-05-28  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
        https://bugs.webkit.org/show_bug.cgi?id=145373

        Reviewed by Andreas Kling.

        WebCore::SecurityOrigin creation functions in most cases return a
        Ref<WebCore::SecurityOrigin> object. In the WebKit2 layer, those objects
        were still largely converted to RefPtr<>s.

        This patch switches to using Ref<> where possible. The remaining uses of
        RefPtr<WebCore::SecurityOrigin> are present due to HashTables, to-be-copied
        Vectors, WebCore::DatabaseManager::origins() API and code where non-null
        WebCore::SecurityOrigin can't be guaranteed.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::cfURLCacheOrigins):
        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::create):
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        (WebKit::LocalStorageDatabase::openDatabase):
        (WebKit::LocalStorageDatabase::close):
        * UIProcess/Storage/LocalStorageDatabase.h:
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::origins):
        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::securityOrigin):
        (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
        (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
        (WebKit::StorageManager::StorageArea::create):
        (WebKit::StorageManager::StorageArea::StorageArea):
        (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
        (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
        (WebKit::StorageManager::SessionStorageNamespace::origins):
        (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
        (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
        (WebKit::InjectedBundle::resetApplicationCacheOriginQuota):
        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
        (WebKit::WebResourceCacheManager::returnCacheOrigins):
        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
        (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
        (WebKit::WebDatabaseManager::setQuotaForOrigin):

2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] When viewing an MJPEG stream as the main resource, only the first
        frame paints

        <https://bugs.webkit.org/show_bug.cgi?id=145185>
        <rdar://problem/20124694>

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
        Tell the WebPage that we will replace multipart content.

        (WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
        Tell the WebPage that we did replace multipart content.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/DrawingArea.h:

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::willReplaceMultipartContent):
        Save the exposed content rect.
        (WebKit::WebPage::didReplaceMultipartContent):
        Restore the exposed content rect that was saved before this load. This
        fixes the issue for WK2.

        * WebProcess/WebPage/WebPage.h:

        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):

2015-05-22  Jon Lee  <jonlee@apple.com>

        Fix macros for wireless playback
        https://bugs.webkit.org/show_bug.cgi?id=145239
        rdar://problem/21049541

        Reviewed by Anders Carlsson.

        Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
        category section.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Update name of variables to reflect new property names.
        (-[WKWebViewConfiguration copyWithZone:]): Ditto.
        (-[WKWebViewConfiguration mediaPlaybackAllowsAirPlay]): Get and set off of the new
        variable.
        (-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
        (-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
        (-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.

2015-05-27  Brady Eidson  <beidson@apple.com>

        Add a "should open urls externally" flag to DocumentLoader.
        rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417

        Reviewed by Geoff Garen.

        Rename "user initiated" to "should open external URLs":
        * Shared/API/Cocoa/_WKNSURLRequestExtras.h:
        * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
        (-[NSURLRequest _web_shouldOpenExternalURLs]):
        (-[NSMutableURLRequest _web_setShouldOpenExternalURLs:]):
        (-[NSURLRequest _web_isUserInitiated]): Deleted.
        (-[NSMutableURLRequest _web_setIsUserInitiated:]): Deleted.
        
        Hold the new flag as a bool, and encode/decode it across IPC:
        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode):
        (WebKit::NavigationActionData::decode):
        (WebKit::NavigationActionData::NavigationActionData): Deleted.
        * Shared/NavigationActionData.h:

        * UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
        (WKPageLoadURLRequestWithUserData): Ditto.

        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
        (-[WKBrowsingContextController loadRequest:userData:]): Set the value of the flag
          based on whether or not the initiating NSURLRequest was user initiated.

        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView loadRequest:]): Set the value of the flag based on whether or not the
          initiating NSURLRequest was user initiated.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadRequest): Pass the value down to the WebProcess to load.
        (WebKit::WebPageProxy::loadFile): Ditto, but always with "ShouldNotAllow".
        * UIProcess/WebPageProxy.h:

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate 
          the NavigationAction flag to a bool in the NavigationActionData object.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
          will be loaded.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-05-27  Anders Carlsson  <andersca@apple.com>

        Can't load local files in WKWebView from containerized app
        https://bugs.webkit.org/show_bug.cgi?id=145424
        rdar://problem/20831176

        Reviewed by Dan Bernstein.

        Allow the network process to load local files from its bundle as long as it has
        the sandbox extensions to do so.

        This was originally added to only allow SSO to read the Info.plist inside its own application
        bundle, but being able to read the application bundle from within the network process should be OK.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

2015-05-27  Andreas Kling  <akling@apple.com>

        [WK2] Local storage areas should get torn down when they have no remaining references.
        <https://webkit.org/b/143339>
        <rdar://problem/20156436>

        Reviewed by Darin Adler.

        Let StorageNamespaceImpl own its StorageAreaMaps weakly instead of through RefPtr.
        Ownership is flipped so that StorageAreaMap refs the StorageNamespaceImpl instead.
        This allows the StorageAreaMaps to get destroyed once all of its clients are gone.

        Practically speaking, this means that the garbage collector now decides when local
        storage databases can be closed, instead of us keeping them open for the lifetime
        of the web process.

        For session storage, it works a bit differently. In the web process, they get torn
        down when their last client disappears, but they stay alive in the UI process.
        If/when the web process asks the UI process to open session storage for an origin,
        the UI process checks if one already exists, and if so, just updates the ID of the
        old storage with the new one provided by the web process.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::isSessionStorage):
        (WebKit::StorageManager::createTransientLocalStorageMap):
        (WebKit::StorageManager::createSessionStorageMap):
        (WebKit::StorageManager::destroyStorageMap):
        * WebProcess/Storage/StorageAreaImpl.cpp:
        (WebKit::StorageAreaImpl::securityOrigin):
        * WebProcess/Storage/StorageAreaImpl.h:
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::StorageAreaMap):
        (WebKit::StorageAreaMap::~StorageAreaMap):
        * WebProcess/Storage/StorageAreaMap.h:
        (WebKit::StorageAreaMap::securityOrigin):
        * WebProcess/Storage/StorageNamespaceImpl.cpp:
        (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
        (WebKit::StorageNamespaceImpl::storageArea):
        * WebProcess/Storage/StorageNamespaceImpl.h:

2015-05-27  Antti Koivisto  <antti@apple.com>

        Disable network cache for old clients
        https://bugs.webkit.org/show_bug.cgi?id=145418
        rdar://problem/21126587

        Reviewed by Andy Estes.

        Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.

        * UIProcess/Cocoa/VersionChecks.h: Added.
        * UIProcess/Cocoa/VersionChecks.mm: Added.

            Add linked-on-or-after check mechanism similar to WebKit1.

        (WebKit::linkTimeVersion):
        (WebKit::linkedOnOrAfter):
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):

            Use it when deciding whether to enable the cache.

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-27  Dean Jackson  <dino@apple.com>

        img.currentSrc problem in strict mode with old picturefill
        https://bugs.webkit.org/show_bug.cgi?id=144095
        <rdar://problem/21087013>

        Reviewed by Simon Fraser.

        Add a PICTURE_SIZES flag.

        * Configurations/FeatureDefines.xcconfig:

2015-05-27  Chris Dumez  <cdumez@apple.com>

        Assertion hit in WebPage::didChangeSelection()
        https://bugs.webkit.org/show_bug.cgi?id=145413
        <rdar://problem/21001129>

        Reviewed by Ryosuke Niwa.

        We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
        assertion in WebPage::didChangeSelection(). We manage to prevent
        synchronous layouts in most cases when calling editorState(). However,
        it seems it can still happen in some cases. Crashing in this case seems
        overkill and can be annoying to other developers, especially
        considering the implications are only on performance.

        This patch drops the assertion.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection): Deleted.

2015-05-27  Anders Carlsson  <andersca@apple.com>

        Address a follow-up review comment from Darin.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::removeMediaKeys):

2015-05-26  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore should handle media keys
        https://bugs.webkit.org/show_bug.cgi?id=145394
        rdar://problem/20617794.

        Reviewed by Darin Adler.

        * Shared/WebsiteData/WebsiteDataTypes.h:
        Add WebsiteDataTypeMediaKeys enum.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        Set up mediaKeysStorageDirectory.

        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Added.
        Add _WKWebsiteDataTypeMediaKeys.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration):
        Set up mediaKeysStorageDirectory.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        Set m_mediaKeysStorageDirectory.

        (WebKit::WebsiteDataStore::fetchData):
        Make CallbackAggregator ThreadSafeRefCounted.
        Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.

        (WebKit::WebsiteDataStore::removeData):
        Make CallbackAggregator ThreadSafeRefCounted.
        Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.

        (WebKit::WebsiteDataStore::mediaKeyOrigins):
        Compute the origins.

        (WebKit::computeMediaKeyFile):
        Add helper function that returns the media key given a containing directory.

        (WebKit::WebsiteDataStore::removeMediaKeys):
        Remove media key files.

        * UIProcess/WebsiteData/WebsiteDataStore.h:
        Add new members.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.

        * gtk/NEWS: Add release notes for 2.9.2.

2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: Handle the case when we fail to create the IO stream
        https://bugs.webkit.org/show_bug.cgi?id=145406

        Reviewed by Sergio Villar Senin.

        We were asserting in that case, but it can happen that we
        fail to create the stream. It happened to me after r184690, that
        changed the NetworkCache::Key hash. Since this was not expected to
        happen, the async operation never finished and the completion
        handler never called, leaving resources loading forever. We
        should make sure we call the completion handler with an error
        code, so that the load finishes and the entry is silently removed
        from the cache.

        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::readSync):
        (WebKit::NetworkCache::IOChannel::write):

2015-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        Network Cache: Add cache capacity to the totals of JSON file
        https://bugs.webkit.org/show_bug.cgi?id=145246

        Reviewed by Antti Koivisto.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::dumpContentsToFile):
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::capacity):

2015-05-26  Anders Carlsson  <andersca@apple.com>

        Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.

        rdar://problem/21111232.

        Reviewed by Dan Bernstein.

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-26  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] webview should be updated from (0,0) when using the evasGL.
        https://bugs.webkit.org/show_bug.cgi?id=137948

        Reviewed by Gyuyoung Kim.

        Changed the point of the start position to update the evasObject
        correctly when using the evasGL for graphics backend.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::displayTimerFired):

2015-05-26  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21104551> Update build settings

        Reviewed by Anders Carlsson.

        * Configurations/DebugRelease.xcconfig:
        * Configurations/FeatureDefines.xcconfig:
        * Configurations/Version.xcconfig:
        * Configurations/WebContentService.Development.xcconfig:
        * Configurations/WebContentService.xcconfig:

2015-05-26  Milan Crha  <mcrha@redhat.com>

        [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
        https://bugs.webkit.org/show_bug.cgi?id=138134

        Reviewed by Žan Doberšek.

        * PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
        is a limit on Windows. It's better to expand wildcards inside the python script.

2015-05-25  Dan Bernstein  <mitz@apple.com>

        ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
        https://bugs.webkit.org/show_bug.cgi?id=145372

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.

2015-05-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
        https://bugs.webkit.org/show_bug.cgi?id=140882

        Reviewed by Gustavo Noronha Silva.

        Add WebKitWebContext:indexed-db-database-directory construct only property.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextGetProperty):
        (webkitWebContextSetProperty):
        (webkitWebContextConstructed):
        (webkit_web_context_class_init):

2015-05-24  Sam Weinig  <sam@webkit.org>

        Crash when using a removed ScriptMessageHandler
        <rdar://problem/20888499>
        https://bugs.webkit.org/show_bug.cgi?id=145359

        Reviewed by Dan Bernstein.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
        Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
        goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
        is destroyed (which will happen if all the pages get destroyed).

2015-05-23  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
        https://bugs.webkit.org/show_bug.cgi?id=145354

        Reviewed by David Kilzer.

        * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
        the dylib symlink.

2015-05-23  Sungmann Cho  <sungmann.cho@navercorp.com>

        Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
        https://bugs.webkit.org/show_bug.cgi?id=145288

        Reviewed by Sam Weinig.

        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
        (WebKit::ShareableResource::map):
        (WebKit::ShareableResource::create): Deleted.
        * Shared/ShareableResource.h:

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackAllowsInline
        https://bugs.webkit.org/show_bug.cgi?id=145315

        Reviewed by Eric Carlson.

        Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
        The C API will not change in a future patch.
        (WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Ditto.

        * UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
        (webkit_settings_get_media_playback_allows_inline):
        (webkit_settings_set_media_playback_allows_inline):

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackAllowsAirPlay
        https://bugs.webkit.org/show_bug.cgi?id=145316

        Reviewed by Eric Carlson.

        In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
        to allowsAirPlayForMediaPlayback.

        * Shared/WebPreferencesDefinitions.h: Update the name.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]): Ditto.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Update the call to settings.

2015-05-22  Jon Lee  <jonlee@apple.com>

        Unreviewed GTK fix after r184802.

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webkit_settings_get_media_playback_requires_user_gesture):
        (webkit_settings_set_media_playback_requires_user_gesture):

2015-05-22  Jon Lee  <jonlee@apple.com>

        Rename MediaPlaybackRequiresUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=145314

        Reviewed by Anders Carlsson.

        In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
        to requiresUserGestureForMediaPlayback.

        No changes are being made to the API in this patch.

        * Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
        * UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
        (WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
        (WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Ditto.

2015-05-22  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183647.
        https://bugs.webkit.org/show_bug.cgi?id=145326

        broke some toolbar blurring behavior (Requested by thorton on
        #webkit).

        Reverted changeset:

        "Asynchronous (or timed-out synchronous) resize flashes white
        instead of page background color"
        https://bugs.webkit.org/show_bug.cgi?id=144468
        http://trac.webkit.org/changeset/183647

2015-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>

        Image link doesn't create a preview view controller.
        https://bugs.webkit.org/show_bug.cgi?id=145320

        Also try to create the preview view controller if the hit-tested node
        is a image link.

        Reviewed by Beth Dakin.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView gestureRecognizerShouldBegin:]):
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):

2015-05-22  Tim Horton  <timothy_horton@apple.com>

        Avoid doing an extra layout in some cases while doing scale-to-fit
        https://bugs.webkit.org/show_bug.cgi?id=145321
        <rdar://problem/21051165>

        Reviewed by Beth Dakin.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
        If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
        the view width is still less than the last-known minimum document size,
        and the document size hasn't changed, update the view scale without
        doing an extra layout, keeping the fixed layout size at the previously
        computed minimum document size.

2015-05-22  Beth Dakin  <bdakin@apple.com>

        Yellow highlight and DD popover don't go away when scrolling an iframe
        https://bugs.webkit.org/show_bug.cgi?id=145312
        -and corresponding-
        rdar://problem/19692334

        Reviewed by Tim Horton.

        Match what Lookup already does for their popover and dismiss our popovers on 
        scroll.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView scrollWheel:]):

        This should not be needed anymore.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::pageDidScroll):

2015-05-22  Tim Horton  <timothy_horton@apple.com>

        Remove action menu support
        https://bugs.webkit.org/show_bug.cgi?id=145305
        <rdar://problem/21070771>

        Reviewed by Anders Carlsson.

        * Configurations/WebKit.xcconfig:
        * Shared/API/c/WKActionMenuItemTypes.h:
        * Shared/API/c/WKActionMenuTypes.h:
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
        (-[WKView dealloc]): Deleted.
        (-[WKView mouseDown:]): Deleted.
        (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
        (-[WKView prepareForMenu:withEvent:]): Deleted.
        (-[WKView willOpenMenu:withEvent:]): Deleted.
        (-[WKView didCloseMenu:withEvent:]): Deleted.
        (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
        (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
        (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
        (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
        (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
        (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
        (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
        (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
        (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
        * UIProcess/mac/WKActionMenuController.h: Removed.
        * UIProcess/mac/WKActionMenuController.mm: Removed.
        * UIProcess/mac/WKImmediateActionController.h:
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
        (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
        (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
        (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
        (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
        (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
        * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
        (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
        (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/WebPageOverlay.cpp:
        (WebKit::WebPageOverlay::actionContextForResultAtPoint):
        * WebProcess/WebPage/WebPageOverlay.h:
        (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::textIndicatorTransitionForImmediateAction):
        (WebKit::WebPage::performImmediateActionHitTestAtLocation):
        (WebKit::textIndicatorTransitionForActionMenu): Deleted.
        (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
        (WebKit::WebPage::selectLastActionMenuRange): Deleted.
        (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
        Remove everything, except some enums that clients still refer to.
        Also, leave SPI that used to be shared between immediate actions and
        action menus intact, even if it had "action menu" in the name. We can
        deprecate and rename in another patch... except for the very recently-added
        support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2, 
        which was not adopted by any clients.

2015-05-22  Brady Eidson  <beidson@apple.com>

        Rework how the ResourceRequest user initiated property key is used.
        Followup to https://bugs.webkit.org/show_bug.cgi?id=145281

        Reviewed by Dan Bernstein.

        * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
        (-[NSURLRequest _web_isUserInitiated]):
        (-[NSMutableURLRequest _web_setIsUserInitiated:]):

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (WKResourceRequestIsUserInitiatedKey): Deleted.
        (InitWebCoreSystemInterface): Deleted.

2015-05-21  Gavin Barraclough  <barraclough@apple.com>

        Networking process sometimes suspended while WebContent runnable
        https://bugs.webkit.org/show_bug.cgi?id=145291
        <rdar://problem/21033029>

        Reviewed by Andreas Kling.

        There is an asymmetry in how the Networking process suspension is managed.
        We drop the assertion (& suspend the process) whenever the WebProcess says
        it is ready to suspend, but we only take the assertion (& resume execution)
        when the WebContent process is actually resumed. This leaves a race – where
        the WebContent process was willing to be suspended, but the UI app changed
        its mind suspending it. Since the WebContent process never actually suspended
        (we only prepared it to), we never send a resume, and since we never resume,
        we never wake the Networking process.

        The fix is pretty clean. A web process should take a token on the networking
        process precisely whenever it holds an assertion on the web content process.
        This also enables a nice refinement, that when holding a BG assertion on the
        WebContent process we only need to hold a BG assertion on the networking
        process.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didSetAssertionState):
            - no-op
        * UIProcess/Network/NetworkProcessProxy.h:
            - added didSetAssertionState.
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::updateAssertionNow):
        (WebKit::ProcessThrottler::updateAssertion):
        (WebKit::ProcessThrottler::didConnectToProcess):
            - whenever taking/updating the assertion, inform the client via didSetAssertionState.
        * UIProcess/ProcessThrottlerClient.h:
            - added didSetAssertionState.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didFinishLaunching):
            removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
        (WebKit::WebProcessProxy::sendProcessDidResume):
            - removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
        (WebKit::WebProcessProxy::processReadyToSuspend):
            - removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
        (WebKit::WebProcessProxy::didSetAssertionState):
            - update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
        (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
            - updated via didSetAssertionState.
        * UIProcess/WebProcessProxy.h:
            - added didSetAssertionState, added separate FG/BG activity tokens for Networking process.

2015-05-22  Dan Bernstein  <mitz@apple.com>

        Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
        https://bugs.webkit.org/show_bug.cgi?id=145287

        Reviewed by Anders Carlsson.

        * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.

2015-05-21  Brady Eidson  <beidson@apple.com>

        Add an "initiated by user gesture" flag to ResourceRequest.
        https://bugs.webkit.org/show_bug.cgi?id=145281

        Reviewed by Alex Christensen.

        Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
        * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
        * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
        (-[NSURLRequest _web_isUserInitiated]):
        (-[NSMutableURLRequest _web_setIsUserInitiated:]):

        * WebKit2.xcodeproj/project.pbxproj:

        Expose the new property key to WebCore:
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (WKResourceRequestIsUserInitiatedKey):
        (InitWebCoreSystemInterface):

2015-05-21  Daniel Bates  <dabates@apple.com>

        Rollout <http://trac.webkit.org/changeset/183909>
        (https://bugs.webkit.org/show_bug.cgi?id=144657)

        Revert <http://trac.webkit.org/changeset/183909> since pausing the database
        thread prevents in-progress transactions from completing. We need to think
        about this change some more.

        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _applicationDidEnterBackground:]): Deleted.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::applicationWillEnterForeground): Deleted.
        (WebKit::WebPage::applicationDidEnterBackground): Deleted.

2015-05-21  Enrica Casucci  <enrica@apple.com>

        [iOS] Crash when taking a snapshot of a large PDF.
        https://bugs.webkit.org/show_bug.cgi?id=145286
        rdar://problem/20892362

        Reviewed by Tim Horton.

        The code for the PDF case was incorrectly computing the snapshot rect.
        On top of that drawViewHierarchyInRect was ignoring the rect and
        always creating an image using the view bounds causing the crash.
        We are now always using the IOSurface if we are parented or
        an image context when we are not.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

2015-05-21  Anders Carlsson  <andersca@apple.com>

        Symlink the WebKit dylib instead of just the framework directory
        https://bugs.webkit.org/show_bug.cgi?id=145287
        rdar://problem/20830673

        Reviewed by Dan Bernstein.

        * WebKit2.xcodeproj/project.pbxproj:

2015-05-21  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
        https://bugs.webkit.org/show_bug.cgi?id=145279
        rdar://problem/20657912

        Reviewed by Dan Bernstein.

        Special-case iOS Safari and WebApp when computing the default application cache directory.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::applicationCacheDirectory):
        (API::WebsiteDataStore::defaultDataStoreConfiguration):

2015-05-21  Brian Weinstein  <bweinstein@apple.com>

        Add a _WKWebKitContentExtensionStore initializer that takes a path.
        https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>

        Reviewed by Anders Carlsson.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::storeWithPath):
        * UIProcess/API/APIUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (+[_WKUserContentExtensionStore storeWithURL:]):

2015-05-21  Alexey Proskuryakov  <ap@apple.com>

        Build fix. Silence some deprecation warnings.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
        * UIProcess/ios/forms/WKFormInputControl.mm:
        (-[WKDateTimePopover initWithView:datePickerMode:]):
        * UIProcess/ios/forms/WKFormPopover.h:
        * UIProcess/ios/forms/WKFormPopover.mm:
        * UIProcess/ios/forms/WKFormSelectPopover.mm:
        (-[WKSelectPopover initWithView:hasGroups:]):

2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Remove an unused private field from EwkPopupMenuItem class
        https://bugs.webkit.org/show_bug.cgi?id=145249

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/ewk_popup_menu.cpp:
        (EwkPopupMenu::EwkPopupMenu):
        * UIProcess/API/efl/ewk_popup_menu_private.h:

2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
        https://bugs.webkit.org/show_bug.cgi?id=145129

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/EwkViewCallbacks.h:
        * UIProcess/API/efl/ewk_application_cache_manager.h:
        * UIProcess/API/efl/ewk_auth_request.h:
        * UIProcess/API/efl/ewk_back_forward_list.h:
        * UIProcess/API/efl/ewk_back_forward_list_item.h:
        * UIProcess/API/efl/ewk_color_picker.h:
        * UIProcess/API/efl/ewk_context.h:
        * UIProcess/API/efl/ewk_context_menu_item.h:
        * UIProcess/API/efl/ewk_cookie_manager.h:
        * UIProcess/API/efl/ewk_database_manager.h:
        * UIProcess/API/efl/ewk_download_job.h:
        * UIProcess/API/efl/ewk_error.h:
        * UIProcess/API/efl/ewk_favicon_database.h:
        * UIProcess/API/efl/ewk_file_chooser_request.h:
        * UIProcess/API/efl/ewk_form_submission_request.h:
        * UIProcess/API/efl/ewk_navigation_data.h:
        * UIProcess/API/efl/ewk_navigation_policy_decision.h:
        * UIProcess/API/efl/ewk_object.h:
        * UIProcess/API/efl/ewk_page_group.h:
        * UIProcess/API/efl/ewk_popup_menu.h:
        * UIProcess/API/efl/ewk_popup_menu_item.h:
        * UIProcess/API/efl/ewk_security_origin.h:
        * UIProcess/API/efl/ewk_settings.h:
        * UIProcess/API/efl/ewk_storage_manager.h:
        * UIProcess/API/efl/ewk_url_request.h:
        * UIProcess/API/efl/ewk_url_response.h:
        * UIProcess/API/efl/ewk_url_scheme_request.h:
        * UIProcess/API/efl/ewk_view.h:
        * UIProcess/API/efl/ewk_window_features.h:
        * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
        * WebProcess/InjectedBundle/API/efl/ewk_page.h:

2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>

        Fix mismatched-tags warnings related to CoordinatedGraphics
        https://bugs.webkit.org/show_bug.cgi?id=145130

        Reviewed by Darin Adler.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Unreviewed GTK build fix since r184686.

        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
        (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.

2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Unreviewed EFL build fix since r184686.

        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
        (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.

2015-05-20  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Update WebContent process sandbox profile for AWD logging
        https://bugs.webkit.org/show_bug.cgi?id=145229
        <rdar://problem/20543269>

        Reviewed by Alexey Proskuryakov.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2015-05-20  Gavin Barraclough  <barraclough@apple.com>

        dispatchViewStateChange should not wait for sync reply if the page isn't visible
        https://bugs.webkit.org/show_bug.cgi?id=145242
        <rdar://problem/20967937>

        Reviewed by Ben Poulain.

        This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.


        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::dispatchViewStateChange):
        (WebKit::WebPageProxy::waitForDidUpdateViewState):

2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>

        Enable disk cache for range requests
        https://bugs.webkit.org/show_bug.cgi?id=144682

        Reviewed by Antti Koivisto.

        Add Range header value to the network cache key constructor so we take
        into account this value. The 206 response code is also marked to be cached.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeCacheKey):
        (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::Key::Key):
        (WebKit::NetworkCache::Key::operator=):
        (WebKit::NetworkCache::Key::computeHash):
        (WebKit::NetworkCache::Key::operator==):
        (WebKit::NetworkCache::Key::encode):
        (WebKit::NetworkCache::Key::decode):
        (WebKit::NetworkCache::Key::stringToHash): Deleted.
        * NetworkProcess/cache/NetworkCacheKey.h:

2015-05-20  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
        https://bugs.webkit.org/show_bug.cgi?id=145238
        rdar://problem/20581175

        Reviewed by Tim Horton.

        Make sure to set the application cache and WebSQL directories when using the legacy data store.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
        (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
        Rename this and move it to the right place.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration):
        Rename this and add the application cache and WebSQL directories.

        (WebKit::WebProcessPool::WebProcessPool):
        Call legacyWebsiteDataStoreConfiguration.

        (WebKit::WebProcessPool::applicationCacheDirectory):
        Call legacyPlatformDefaultApplicationCacheDirectory.

        * UIProcess/WebProcessPool.h:

2015-05-20  Enrica Casucci  <enrica@apple.com>

        [iOS] Using CSS viewport units causes incorrect layout.
        https://bugs.webkit.org/show_bug.cgi?id=145225
        rdar://problem/20924495

        Reviewed by Benjamin Poulain.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):

2015-05-20  Tim Horton  <timothy_horton@apple.com>

        Allow overriding the waitForDidUpdateViewState timeout
        https://bugs.webkit.org/show_bug.cgi?id=145230
        <rdar://problem/20990162>

        Reviewed by Darin Adler.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
        Use the value from NSUserDefaults, if it exists.
        We'll only check once, so changing the default requires a restart of the UI process.

2015-05-20  Anders Carlsson  <andersca@apple.com>

        Make sure we always have a process pool to perform data store operations with
        https://bugs.webkit.org/show_bug.cgi?id=145231
        rdar://problem/20618248

        Reviewed by Tim Horton.

        Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
        find the process pool we're a part of and use that. Otherwise, create a new one.
    
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::processPools):

2015-05-19  Jer Noble  <jer.noble@apple.com>

        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
        https://bugs.webkit.org/show_bug.cgi?id=145193

        Reviewed by Eric Carlson.

        Use HTMLMediaElementEnums instead of HTMLMediaElement.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
        (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
        (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/ios/WebVideoFullscreenManager.h:
        (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
        (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
        (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.

2015-05-20  Anders Carlsson  <andersca@apple.com>

        Refactor process pool enumeration code in WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=145218

        Reviewed by Tim Horton.

        Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
        operations. This is the first step towards having the data store create a single process pool lazily if
        there are no web views associated with the data store.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        (WebKit::WebsiteDataStore::processPools):
        * UIProcess/WebsiteData/WebsiteDataStore.h:

2015-05-20  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Relax restrictions on triggers that match everything.
        https://bugs.webkit.org/show_bug.cgi?id=145069

        Reviewed by Benjamin Poulain.

        * UIProcess/API/APIUserContentExtensionStore.h:
        Increment version number to reflect changes in DFABytecode.

2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>

        Minor cleanups to PluginProcessProxy.
        https://bugs.webkit.org/show_bug.cgi?id=145199

        Reviewed by Anders Carlsson.

        1. Remove unnecessary forward declaration.
        2. Remove unnecessary #include.

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        * UIProcess/Plugins/PluginProcessProxy.h:

2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>

        [GTK] Add some documentation to WebKitWebExtension
        https://bugs.webkit.org/show_bug.cgi?id=142786

        Reviewed by Carlos Garcia Campos.

        WebKitWebExtension API documentation lacks of some details and the information
        available is in some contributors blog posts. I add the section
        documentation with a small guide about how to use WebExtensions.

        The code examples were taken from Carlos García and Adrián Pérez blog
        posts.

        * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:

2015-05-20  Sungmann Cho  <sungmann.cho@navercorp.com>

        Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
        https://bugs.webkit.org/show_bug.cgi?id=145111

        Reviewed by Darin Adler.

        This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::isPersistent):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        (WebKit::WebsiteDataStore::isPersistent):
        (WebKit::WebsiteDataStore::isNonPersistent): Deleted.

2015-05-20  Hyungwook Lee  <hyungwook.lee@navercorp.com>

        [EFL] Fix build failure, linker does not find libXext.
        https://bugs.webkit.org/show_bug.cgi?id=144100

        Reviewed by Gyuyoung Kim.

        Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.

        * PlatformEfl.cmake:

2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
        https://bugs.webkit.org/show_bug.cgi?id=144380

        Reviewed by Antti Koivisto.

        It improves the network cache performance, by mmaping big
        resources and sending only the file descriptor to the web process
        instead of the actual file data. It needs some changes in
        cross-platform code, because we can't use the same approach as
        mac (it uses a platform specific implementation not available in
        other platforms).

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store): Use
        Data::tryCreateSharedMemory() to create the shared memory used by
        the ShareableResource. Also add an ASSERT instead of checking the
        shareable resource created is not nullptr, because the
        ShareableResource::create() that receives a shared memory should
        never return nullptr.
        * NetworkProcess/cache/NetworkCacheData.h:
        * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
        (WebKit::NetworkCache::Data::tryCreateSharedMemory):
        * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
        (WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
        SharedMemory object to wrap the mapped file, but keeping the ownership.
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
        Use Data::tryCreateSharedMemory() to create the shared memory used
        bythe ShareableResource. Also add an ASSERT instead of checking
        the shareable resource created is not nullptr, because the
        ShareableResource::create() that receives a shared memory should
        never return nullptr.
        * Platform/SharedMemory.h:
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::map): Use wrapMap() and initialize
        m_isWrappingMap to false.
        (WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
        the given map, without taking its ownership.
        (WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
        file descriptor if m_isWrappingMap is true.
        * Shared/ShareableResource.cpp:
        (WebKit::createShareableResourceDeallocator):
        (WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
        wrapping the ShareableResource data.
        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
        a ShareableResource for the handle and create a SharedBuffer
        wrapping it.
        * Shared/ShareableResource.h:
        * WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResource): Get the CFData
        from the SharedBuffer for QuickLook instead of wrapping the handle again.

2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: Disable network cache efficacy logging
        https://bugs.webkit.org/show_bug.cgi?id=145172

        Reviewed by Martin Robinson.

        Disable network cache efficacy logging by default, since we are
        not currently using the collected data.

        * UIProcess/soup/WebProcessPoolSoup.cpp:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):

2015-05-19  Michael Saboff  <msaboff@apple.com>

        REGRESSION(183787): JIT is enabled for all builds
        https://bugs.webkit.org/show_bug.cgi?id=145179

        Reviewed by Geoffrey Garen.

        Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
        set it depending on OS and CPU type.

        * Configurations/FeatureDefines.xcconfig:

2015-05-19  Brady Eidson  <beidson@apple.com>

        X-Frame-Options headers not respected when loading from application cache.
        <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadDataImpl):

2015-05-19  Sungmann Cho  <sungmann.cho@navercorp.com>

        Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
        https://bugs.webkit.org/show_bug.cgi?id=145173

        Reviewed by Anders Carlsson.

        WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
        So we need to add PLUGIN_ARCHITECTURE(MAC) around it.

        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:

2015-05-19  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
        https://bugs.webkit.org/show_bug.cgi?id=145175
        <rdar://problem/21023785>

        Reviewed by Beth Dakin.

        Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.

        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.

2015-05-19  Jeremy Jones  <jeremyj@apple.com>

        WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
        https://bugs.webkit.org/show_bug.cgi?id=145158

        Reviewed by Eric Carlson.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):

2015-05-19  Ting-Wei Lan  <lantw44@gmail.com>

        [SOUP] Use st_birthtime to get creation time of files on systems support it
        https://bugs.webkit.org/show_bug.cgi?id=144989

        Reviewed by Carlos Garcia Campos.

        FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
        with the same name in stat. It is better to use it instead of manually
        setting xattr, which is unreliable because both operating systems and
        file systems support are required.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes):
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::IOChannel::IOChannel):

2015-05-19  Chris Dumez  <cdumez@apple.com>

        Mark static variables as const when possible
        https://bugs.webkit.org/show_bug.cgi?id=145161

        Reviewed by Andreas Kling.

        * Platform/IPC/MessageEncoder.cpp:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::networkProcessLatencyQOS):
        (WebKit::networkProcessThroughputQOS):
        (WebKit::webProcessLatencyQOS):
        (WebKit::webProcessThroughputQOS):
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
        (WebKit::pluginProcessLatencyQOS):
        (WebKit::pluginProcessThroughputQOS):
        * WebProcess/WebPage/WebPage.cpp:

2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        [CMake] Ignore warnings in system headers
        https://bugs.webkit.org/show_bug.cgi?id=144747

        Reviewed by Darin Adler.

        Separate include directories into WebKit project includes and system includes. Suppress all
        warnings from headers in system include directories using the SYSTEM argument to
        the include_directories command.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:

2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>

        Fix return-type warnings in test_ewk2_color_picker.cpp
        https://bugs.webkit.org/show_bug.cgi?id=145122

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
        (EWK2ColorPickerTest::hideColorPicker):
        (EWK2ColorPickerTest::hideColorPickerByRemovingElement):

2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>

        [ES6] Arrow function syntax. Feature flag for arrow function
        https://bugs.webkit.org/show_bug.cgi?id=145108

        Reviewed by Ryosuke Niwa.

        Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function

        * Configurations/FeatureDefines.xcconfig:

2015-05-18  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore should fully support session storage
        https://bugs.webkit.org/show_bug.cgi?id=145145
        rdar://problem/10690447

        Reviewed by Sam Weinig.

        Add a session store data type and handle it when clearing and fetching data.

        * Shared/WebsiteData/WebsiteDataTypes.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (+[WKWebsiteDataStore allWebsiteDataTypes]):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::SessionStorageNamespace::origins):
        (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
        (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
        (WebKit::StorageManager::getSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2015-05-18  Brady Eidson  <beidson@apple.com>

        Followup to: Networking process on iOS can be suspended and never exit
        https://bugs.webkit.org/show_bug.cgi?id=144971.

        Unreviewed. Fixing API tests that revealed the unintentional change in behavior.

        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
          was adopted from had an m_connection null check, and that null check needs to remain.

2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>

        [GTK] URTBF after r184503.

        * PlatformGTK.cmake:

2015-05-18  Brady Eidson  <beidson@apple.com>

        Networking process on iOS can be suspended and never exit.
        <rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971

        Reviewed by Darin Adler.

        There's a few issues here.
        
        1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
            the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
            We already solved this with WebProcess with a watchdog timer keeping both the process assertion
            and xpc_connection alive while the process shuts down. This patch expands that to the network
            process, and it will be easy to expand that to database and plugin processes doing forward.
        
        2 - All of our child processes either decide to self-terminate or listen for their connection to
            close at which point they terminate. This leads to various races. We should
            move to a model where the UI process explicitly tells them to shutdown, and this patch starts us 
            down that path.
        
        * CMakeLists.txt:
        * DerivedSources.make:
        * WebKit2.xcodeproj/project.pbxproj:
        
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
        
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
          process do cleanup work before it is terminated.
        * Shared/ChildProcess.h:
        * Shared/ChildProcess.messages.in: Added.
        
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message 
          the process to ShutDown.
        (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
        * Shared/ChildProcessProxy.h:
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
        
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
          code to ChildProcessProxy::shutDownProcess.
        
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.

2015-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        Network Cache: Make Data::adoptMap take the ownership of the file descriptor
        https://bugs.webkit.org/show_bug.cgi?id=144950

        Reviewed by Antti Koivisto.

        It will be required to implement ShareableResource for soup
        network backend. Also move the common code of Data to a common
        file and add mapToFile(). The mapFile version that receives a file
        descriptor has been renamed to adoptAndMapFile().

        * CMakeLists.txt: Add new file to compilation.
        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
        (WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
        * NetworkProcess/cache/NetworkCacheData.cpp: Added.
        (WebKit::NetworkCache::Data::mapToFile): Write the data to the
        given file and map it.
        (WebKit::NetworkCache::mapFile):
        (WebKit::NetworkCache::adoptAndMapFile):
        (WebKit::NetworkCache::computeSHA1):
        (WebKit::NetworkCache::bytesEqual):
        * NetworkProcess/cache/NetworkCacheData.h:
        * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
        (WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
        * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
        (WebKit::NetworkCache::Data::Data): Use a constructor that
        receives a file descriptor instead of the one receiving
        Backing. If the file descriptor is not -1 then the Data is a map.
        (WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
        file descriptor.
        (WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
        to the MapWrapper and create the Data passing the file descriptor.
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::openAndMapContentExtension): Use mapFile that receives a
        file path.
        (API::compiledToFile): Use adoptAndMapFile() and don't close the
        descriptor.

2015-05-16  Andy Estes  <aestes@apple.com>

        [iOS] WKPDFView should not follow javascript: links
        https://bugs.webkit.org/show_bug.cgi?id=145101

        Reviewed by Dan Bernstein.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
        (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
        reflect that this function is exclusively for following PDF links.
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
        (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
        (WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-05-16  Brent Fulgham  <bfulgham@apple.com>

        [iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
        https://bugs.webkit.org/show_bug.cgi?id=145059
        <rdar://problem/20975978>

        Reviewed by Simon Fraser.

        The web view needs to update its scroll snap point offsets to take into account any
        adjustments to the view size caused by content insets. We also need to update the
        offstes after device rotation.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
        computed content inset for the view and incorporate into any scroll snap point adjustments.
        (-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points, 
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
        (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
        for content inset.
        (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
        active index is valid.
        (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
        current active snap offset index.
        (WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
        (WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
        scroll position incorporating any snap point and content insets.

2015-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>

        Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
        https://bugs.webkit.org/show_bug.cgi?id=145081

        We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
        back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
        removed from the window, we don't need reset it in cleanupInteraction.

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView cleanupInteraction]):

2015-05-15  James Savage  <james.savage@apple.com>

        REGRESSION (r181910): WKWebView incorrectly scales snapshot
        https://bugs.webkit.org/show_bug.cgi?id=145076

        Reviewed by Tim Horton.

        We added a fast path to snapshotting using IOSurfaces with
        http://trac.webkit.org/changeset/181910 which incorrectly determined
        scale and transform and resulted in bad snapshots in some situations.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
        When snapshotting an IOSurface we need to compute our scale based off of
        the rect in the WKWebView coordinates, we also failed to account for
        non-zero origins in the snapshot rect. Remove an unused varible while
        we're here.

2015-05-15  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Fail to load old content extension files
        https://bugs.webkit.org/show_bug.cgi?id=145027

        Reviewed by Eric Carlson.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::openAndMapContentExtension):
        * UIProcess/API/APIUserContentExtensionStore.h:

2015-05-15  Jeremy Jones  <jeremyj@apple.com>

        Limit alternate fullscreen with linked on or after.
        https://bugs.webkit.org/show_bug.cgi?id=144894

        Reviewed by Dean Jackson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (shouldAllowAlternateFullscreen): Added.
        (-[WKWebView initWithFrame:configuration:]):

2015-05-15  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
        https://bugs.webkit.org/show_bug.cgi?id=145061
        <rdar://problem/20939743>

        Reviewed by Tim Horton.

        When swiping back from a video search result to the list of video
        search results on bing.com, the back swipe gesture tab snapshot takes
        ~3 seconds to be removed, even though the page gets loaded almost
        instantly from PageCache. The tab snapshot should be removed as soon as
        the load is done.

        The issue is that we only cleared the back swipe gesture tab snapshot
        after PageClient::didFinishLoadForMainFrame() has been called. However,
        PageClient::didFinishLoadForMainFrame() was only being called by
        WebPageProxy if the main frame loaded *without* error. In case the main
        frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
        called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
        remove the gesture snapshot until the 3 seconds timeout.

        This patch calls PageClient::didFinishLoadForMainFrame() from
        WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
        error case as well.

        The reason didFailLoadForFrame() is being called on bing.com video
        search results is because a "ping" load is aborted when the page is
        entering PageCache. Aborting any kind of resource load sets a
        "cancellation" error on the main document.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFailLoadForFrame):

2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
        https://bugs.webkit.org/show_bug.cgi?id=144738

        Reviewed by Alexey Proskuryakov.

        When converting the main resource handle to a download, the
        NetworkResourceLoader is aborted, and the ResourceHandle is
        cleaned up aborting the download operation. We need to use a
        different ResourceHandle for the download operation.

        * Shared/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
        instead of reusing the given handle.

2015-05-14  Brady Eidson  <beidson@apple.com>

        Rename connectionDidClose and related methods to be more clear.
        https://bugs.webkit.org/show_bug.cgi?id=145030

        Reviewed by Darin Adler.

        These methods were easy to confuse with "Connection::Client::didClose()", yet they
        were about something much more explicit: A child process being shut down by the UI Process.

        Let's call them as such.

        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::shutDownProcess):
        (WebKit::ChildProcessProxy::clearConnection): Deleted.
        (WebKit::ChildProcessProxy::connectionDidClose): Deleted.
        * Shared/ChildProcessProxy.h:

        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::processWillShutDown):
        * UIProcess/Databases/DatabaseProcessProxy.h:

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::processWillShutDown):
        * UIProcess/Network/NetworkProcessProxy.h:

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::processWillShutDown):
        * UIProcess/Plugins/PluginProcessProxy.h:

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::webProcessWillShutDown):
        (WebKit::WebFrameProxy::disconnect): Deleted.
        * UIProcess/WebFrameProxy.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::webProcessWillShutDown):
        (WebKit::WebPageProxy::connectionDidClose): Deleted.
        * UIProcess/WebPageProxy.h:

        * UIProcess/WebProcessLifetimeTracker.cpp:
        (WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
        (WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
        * UIProcess/WebProcessLifetimeTracker.h:

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::processWillShutDown):
        (WebKit::WebProcessProxy::shutDown):
        (WebKit::WebProcessProxy::removeWebPage):
        (WebKit::WebProcessProxy::didClose):
        (WebKit::WebProcessProxy::disconnectFramesFromPage):
        (WebKit::WebProcessProxy::shouldTerminate):
        (WebKit::WebProcessProxy::requestTermination):
        (WebKit::WebProcessProxy::connectionDidClose): Deleted.
        (WebKit::WebProcessProxy::disconnect): Deleted.
        * UIProcess/WebProcessProxy.h:

2015-05-14  Zhuo Li  <zachli@apple.com>

        Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
        https://bugs.webkit.org/show_bug.cgi?id=145025.
        and
        rdar://problem/20646308.

        Reviewed by Alexey Proskuryakov.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):

2015-05-14  Timothy Horton  <timothy_horton@apple.com>

        Add a layout mode that scales down the view to try to fit the document
        https://bugs.webkit.org/show_bug.cgi?id=145022
        <rdar://problem/19790341>

        Reviewed by Dean Jackson.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::setShouldScaleViewToFitDocument):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::setShouldScaleViewToFitDocument):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Plumb shouldScaleViewToFitDocument through to the DrawingArea.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
        (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
        (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
        * UIProcess/API/C/WKLayoutMode.h:
        * UIProcess/API/Cocoa/_WKLayoutMode.h:
        Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
        and otherwise behaves as normal.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
        (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        On every flush where either the document size or view size has changed,
        or layout is outstanding, do a layout with fixed layout off to determine
        whether the document fits inside the view. If it doesn't, scale it down
        to fit. This will require an extra layout for every resize while in the
        scaled-down state, but there is potential for future optimization.

2015-05-14  Anders Carlsson  <andersca@apple.com>

        Local storage origins should include origins with transient local storage
        https://bugs.webkit.org/show_bug.cgi?id=145017
        rdar://problem/10690447

        Reviewed by Sam Weinig.

        The transient local storage namespaces are used for third party data blocking and will stay
        around until the UI process exits so we need to be able to include website data from transient storage
        in the website data store APIs.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
        (WebKit::StorageManager::getLocalStorageOrigins):
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):

2015-05-14  Beth Dakin  <bdakin@apple.com>

        Change range of possible forces for mouseforcechanged DOM event
        https://bugs.webkit.org/show_bug.cgi?id=144987
        -and corresponding-
        rdar://problem/20472802

        Reviewed by Tim Horton.

        Change to a 0-3 range.
        * Shared/mac/WebEventFactory.mm:
        (WebKit::WebEventFactory::createWebMouseEvent):

2015-05-14  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
        https://bugs.webkit.org/show_bug.cgi?id=144994

        Reviewed by Carlos Garcia Campos.

        This fixes the build when configured with Netscape plugin API
        support disabled.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_set_additional_plugins_directory):
        (webkitWebContextGetPluginThread):
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::launchProcess):

2015-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
        https://bugs.webkit.org/show_bug.cgi?id=144953

        Reviewed by Martin Robinson.

        Return early if we fail to get the birthtime xattr.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes):

2015-05-13  Daniel Bates  <dabates@apple.com>

        Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
        https://bugs.webkit.org/show_bug.cgi?id=144619
        <rdar://problem/20812779>

        Reviewed by Andy Estes.

        The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
        functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
        and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
        to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
        associated {Network, Web}ProcessProxy message names to better describe their purpose.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::prepareToSuspend):
        (WebKit::NetworkProcess::cancelPrepareToSuspend):
        (WebKit::NetworkProcess::processWillSuspend): Deleted.
        (WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::sendPrepareToSuspend):
        (WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
        (WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
        (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::updateAssertion):
        * UIProcess/ProcessThrottlerClient.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
        (WebKit::WebProcessProxy::sendPrepareToSuspend):
        (WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
        (WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
        (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
        * UIProcess/WebProcessProxy.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::prepareToSuspend):
        (WebKit::WebProcess::cancelPrepareToSuspend):
        (WebKit::WebProcess::processWillSuspend): Deleted.
        (WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2015-05-13  Anders Carlsson  <andersca@apple.com>

        Don't create a per-pool data store when using the modern API
        https://bugs.webkit.org/show_bug.cgi?id=144963
        rdar://problem/20331756

        Reviewed by Tim Horton.

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        Keep track of whether the process pool should have a data store.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetWebsiteDataStore):
        * UIProcess/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
        Update now that WebProcessPool::dataStore() no longer returns a reference.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        Only create a data store if the configuration states that we should.

        * UIProcess/WebProcessPool.h:
        Change dataStore() to return a pointer instead of a reference.

2015-05-13  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Sandbox violation reading SubmitDiagInfo.domains
        https://bugs.webkit.org/show_bug.cgi?id=144962
        rdar://problem/20719330

        Reviewed by Darin Adler.

        * WebProcess/com.apple.WebProcess.sb.in:

2015-05-13  Beth Dakin  <bdakin@apple.com>

        Speculative build fix.

        * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:

2015-05-13  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK][CMake] Extra include directory when libnotify is present but disabled
        https://bugs.webkit.org/show_bug.cgi?id=144941

        Reviewed by Martin Robinson.

        Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
        rather than checking LIBNOTIFY_FOUND.

        * PlatformGTK.cmake:

2015-05-13  Beth Dakin  <bdakin@apple.com>

        Need SPI to set the overlay scroll bar style
        https://bugs.webkit.org/show_bug.cgi?id=144928
        -and corresponding-
        rdar://problem/20143614

        Reviewed by Anders Carlsson.

        Make scrollbarOverlayStyle a part of the creation parameters. 
        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:

        New SPI.
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _setOverlayScrollbarStyle:]):
        (-[WKView _overlayScrollbarStyle]):

        Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::setOverlayScrollbarStyle):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::overlayScrollbarStyle):
        * WebKit2.xcodeproj/project.pbxproj:

        Return WebPage’s scrollbarOverlayStyle().
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

        Cache the scrollbarOverlayStyle() here for the WebProcess. 
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::setScrollbarOverlayStyle):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::scrollbarOverlayStyle):
        * WebProcess/WebPage/WebPage.messages.in:

2015-05-13  Anders Carlsson  <andersca@apple.com>

        Rename some StorageManager functions to indicate that they work on local storage entries
        https://bugs.webkit.org/show_bug.cgi?id=144958
        First part of rdar://problem/10690447.

        Reviewed by Beth Dakin.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getLocalStorageOrigins):
        (WebKit::StorageManager::getLocalStorageDetailsByOrigin):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
        (WebKit::StorageManager::deleteAllLocalStorageEntries):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
        (WebKit::StorageManager::getOrigins): Deleted.
        (WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
        (WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
        (WebKit::StorageManager::deleteAllEntries): Deleted.
        (WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>

        Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
        https://bugs.webkit.org/show_bug.cgi?id=144957

        Reviewed by Simon Fraser.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::attachAvailabilityChanged):

2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>

        Pass String as reference in more places
        https://bugs.webkit.org/show_bug.cgi?id=144769

        Reviewed by Daniel Bates.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::showMainResourceForFrame):
        * WebProcess/WebPage/WebInspectorUI.h:

2015-05-13  Timothy Horton  <timothy_horton@apple.com>

        View scale changes are temporarily lost after restoring a page from the page cache
        https://bugs.webkit.org/show_bug.cgi?id=144934

        Reviewed by Brady Eidson.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::scalePage):
        (WebKit::WebPage::scalePageInViewCoordinates):
        (WebKit::WebPage::pageScaleFactor):
        (WebKit::WebPage::viewScaleFactor):
        (WebKit::WebPage::scaleView):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::viewScaleFactor): Deleted.
        Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.

2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>

        Minor cleanups to PluginProxy.cpp.
        https://bugs.webkit.org/show_bug.cgi?id=144948

        Reviewed by Gyuyoung Kim.

        1. Remove unnecessary #include.
        2. Remove unnecessary return statement from PluginProxy::paint().

        No new tests, no behavior change.

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::paint):

2015-05-13  Daegyu Lee  <daegyu.lee@navercorp.com>

        REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
        https://bugs.webkit.org/show_bug.cgi?id=144906

        Reviewed by Gyuyoung Kim.

        * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
        (WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
        call applyScaleAfterRenderingContents function to apply correct scale.

2015-05-12  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/17414349> In Safari, Debug > Get Bytecode Profile crashes the Web Content process
        https://bugs.webkit.org/show_bug.cgi?id=144944

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
        because it is when the profiler is disabled, which is the default. In that case, return
        after sending back the empty string, rather than continuing to dereference a null pointer.

2015-05-12  Jon Honeycutt  <jhoneycutt@apple.com>

        Crash when using <input type=file>

        <https://bugs.webkit.org/show_bug.cgi?id=144939>
        <rdar://problem/20172315>

        Reviewed by Andy Estes.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
        WKFileUploadPanel can outlive it.

2015-05-12  Simon Fraser  <simon.fraser@apple.com>

        Turn antialiased font dilation off by default
        https://bugs.webkit.org/show_bug.cgi?id=144940
        rdar://problem/20923031

        Reviewed by Sam Weinig.

        Turn antialised font dilation off by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferencesRefPrivate.h:

2015-05-12  Daniel Bates  <dabates@apple.com>

        Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
        https://bugs.webkit.org/show_bug.cgi?id=144886

        Reviewed by Darin Adler.

        {Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
        interface that defines the callbacks that ProcessThrottler makes to a client. We
        do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
        So, we should use private inheritance to represent the relationship between
        {Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.

        Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
        of holding a smart pointer to a ProcessThrottler instance because we always want to
        have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
        is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
        (WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
        m_throttler by reference instead of by pointer.
        (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
        (WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
        (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
        * UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
        (WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
        instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
        a lvalue reference instead of a pointer.
        (WebKit::ProcessThrottler::updateAssertion): Ditto.
        (WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
        * UIProcess/ProcessThrottler.h: Ditto.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
        instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance. 
        (WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
        m_throttler by reference instead of by pointer.
        (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
        (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
        (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
        * UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
        (WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
        instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.

2015-05-12  Anders Carlsson  <andersca@apple.com>

        Production builds should link against the shims directly
        https://bugs.webkit.org/show_bug.cgi?id=144922
        rdar://problem/19708579

        Reviewed by Dan Bernstein.

        * Configurations/NetworkService.xcconfig:
        Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
        Link directly against SecItemShim.dylib where possible.

        * Configurations/PluginProcessShim.xcconfig:
        Set the install name and install path.

        * Configurations/PluginService.32.xcconfig:
        Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
        Link directly against PluginProcessShim.dylib where possible.

        * Configurations/PluginService.64.xcconfig:
        Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
        Link directly against PluginProcessShim.dylib where possible.

        * Configurations/SecItemShim.xcconfig:
        Set the install name and install path.

        * Configurations/WebContentService.xcconfig:
        Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
        Link directly against WebProcessShim.dylib where possible.

        * Configurations/WebProcessShim.xcconfig:
        Set the install name and install path.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
        Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
        Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
        Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.

2015-05-12  Alexey Proskuryakov  <ap@apple.com>

        Undo a mistaken part of r184211.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
        * UIProcess/WebProcessPool.h:
        cookieStorageDirectory() is used on iOS, so bring it back.

2015-05-08  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Share cookie storage between UI process and secondary processes
        https://bugs.webkit.org/show_bug.cgi?id=144820
        rdar://problem/20572830

        Reviewed by Darin Adler.

        Pass a cookie storage descriptor that includes file path as well as other data that
        CFNetwork needs to use the same cookies storage as in another process (session cookies
        are still separate).

        While at it, started to clean up code that passes cookie storage path. It was mostly
        dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        * Shared/Network/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * Shared/Network/NetworkProcessCreationParameters.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::cookieStorageDirectory):
        * UIProcess/WebProcessPool.h:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-05-12  Chris Dumez  <cdumez@apple.com>

        [WK2] Log using diagnostic logging how far back in history we navigate
        https://bugs.webkit.org/show_bug.cgi?id=144919
        <rdar://problem/20920043>

        Reviewed by Gavin Barraclough.

        Log using diagnostic logging how far back in history we navigate.
        When a back navigation or a backward indexed navigation occurs, we
        log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.

        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::goToItem):

2015-05-11  Sam Weinig  <sam@webkit.org>

        ChildProcess should take an os_activity
        https://bugs.webkit.org/show_bug.cgi?id=141781

        Reviewed by Ryosuke Niwa.

        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
        (DatabaseServiceInitializer):
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
        (NetworkServiceInitializer):
        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
        (PluginServiceInitializer):
        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer):
        Start an os_activity in the initializer for each XPC service.

        * config.h:
        Add HAVE_OS_ACTIVITY where available.

2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ debug build after r184197.

        * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.

2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
        https://bugs.webkit.org/show_bug.cgi?id=144521

        Reviewed by Darin Adler.

        Use XUniquePtr and XUniqueResource to free X resources.

        * PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
        to the include dir list.
        * PlatformGTK.cmake: Ditto.
        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit::BackingStore::createBackend): Do not pass the display to
        the BackingStoreBackendCairoX11 constructor.
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::resize):
        (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
        (WebKit::RedirectedXCompositeWindow::surface):
        * UIProcess/gtk/RedirectedXCompositeWindow.h:
        (WebKit::RedirectedXCompositeWindow::windowID):
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::NetscapePlugin::platformPostInitializeWindowless):
        (WebKit::NetscapePlugin::platformDestroy):
        (WebKit::NetscapePlugin::platformGeometryDidChange):
        (WebKit::NetscapePlugin::platformPaint):

2015-05-11  Dan Bernstein  <mitz@apple.com>

        WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL

        Reviewed by Alexey Proskuryakov.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
        same way we update it for server redirects, but don’t make client callbacks. Clients
        observing the URL property will see it change.
        * UIProcess/WebPageProxy.h:

        * UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
        FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
        process.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2015-05-11  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
        https://bugs.webkit.org/show_bug.cgi?id=144891

        Reviewed by Darin Adler.

        Sometimes, Find on Page’s constant 1.6 scale factor is too much. Smart magnification is
        designed to choose a scale factor that is just right.

        * UIProcess/ios/SmartMagnificationController.h:
        * UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
        * UIProcess/ios/SmartMagnificationController.mm:
        (WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
        -[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
        * WebProcess/WebPage/ios/FindControllerIOS.mm:
        (WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
        get the surrounding render rect (the area we would target for a double-tap at the beginning
        of the selection), and tell the magnification controller to target it. Use the center of the
        start of the selection as the origin.

2015-05-11  Brent Fulgham  <bfulgham@apple.com>

        Scroll snap logic should be triggered when resizing the WebView
        https://bugs.webkit.org/show_bug.cgi?id=142590
        <rdar://problem/20125088>

        Reviewed by Simon Fraser.

        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
        (RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
        argument I added. This is currently not used for anything on iOS.
        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.

2015-05-11  Andreas Kling  <akling@apple.com>

        Force a rebuild of JSNPObject.cpp on bots.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::callMethod):

2015-05-11  Anders Carlsson  <andersca@apple.com>

        Simplify shim path computation
        https://bugs.webkit.org/show_bug.cgi?id=144884
        Part of rdar://problem/19708579.

        Reviewed by Sam Weinig.

        Factor the code that computes the shim path out into a separate function. Also make this mac only
        since we don't have any shims on iOS.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::computeProcessShimPath):
        (WebKit::addDYLDEnvironmentAdditions):

2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>

        Unreviewed build fix

        Unreviewed.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::compiledToFile):

2015-05-11  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Support domain-specific rules and exceptions.
        https://bugs.webkit.org/show_bug.cgi?id=144833

        Reviewed by Darin Adler.

        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
        (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
        (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
        (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
        (WebKit::WebCompiledContentExtension::domainFiltersBytecode):
        (WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
        (WebKit::WebCompiledContentExtension::bytecode): Deleted.
        (WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
        * Shared/WebCompiledContentExtension.h:
        * Shared/WebCompiledContentExtensionData.cpp:
        (WebKit::WebCompiledContentExtensionData::encode):
        (WebKit::WebCompiledContentExtensionData::decode):
        * Shared/WebCompiledContentExtensionData.h:
        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::ContentExtensionMetaData::fileSize):
        (API::encodeContentExtensionMetaData):
        (API::decodeContentExtensionMetaData):
        (API::compiledToFile):
        (API::createExtension):
        Keep track of 3 different types of bytecode to be able to handle domain-specific rules.

2015-05-11  Tim Horton  <timothy_horton@apple.com>

        Page overlay action context override should indicate the source of the request
        https://bugs.webkit.org/show_bug.cgi?id=144832
        <rdar://problem/20562594>

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
        * WebProcess/WebPage/WebPageOverlay.cpp:
        (WebKit::WebPageOverlay::actionContextForResultAtPoint):
        * WebProcess/WebPage/WebPageOverlay.h:
        (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
        clients can tell whether the requested action context should be targetted
        at an action menu or immediate action.

2015-05-11  Daniel Bates  <dabates@apple.com>

        [iOS] Close all open databases in expiration handler of process assertion
        https://bugs.webkit.org/show_bug.cgi?id=144661
        <rdar://problem/20845052>

        Reviewed by Darin Adler.

        For WebKit2, close all open databases when the process assertion expiration
        handler is called.

        When the process assertion expiration handler is called we dispatch a synchronous
        message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
        them that they will be suspended imminently. The {Web, Network} process will always
        service this message regardless if they were waiting for another message. In the
        WebProcess, we will close all open databases among other tasks upon receiving this
        message. In the NetworkProcess, we will purge some data from memory.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
        to process the synchronous ProcessWillSuspendImminently message.
        (WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
        * Shared/ChildProcessProxy.h:
        (WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
        a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
        to process the message regardless of whether it is waiting for another message.
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
        ProcessWillSuspendImminently to the NetworkProcess.
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/ProcessAssertion.cpp:
        (WebKit::ProcessAndUIAssertion::setClient): Added.
        * UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
        (WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
        (WebKit::ProcessAssertion::setClient): Added.
        (WebKit::ProcessAssertion::client): Added.
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::didConnectToProcess):
        (WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
        interface. Notify the process throttler clients that the assertion is near expiration.
        * UIProcess/ProcessThrottler.h:
        * UIProcess/ProcessThrottlerClient.h: Added 
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
        ProcessWillSuspendImminently to the WebProcess.
        * UIProcess/WebProcessProxy.h:
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
        (-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
        to notify ProcessAssertionClient clients that the assertion is near expiration.
        (WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
        (WebKit::ProcessAndUIAssertion::setClient): Added.
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
        the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
        since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
        (WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
        be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
        it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
        such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
        the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
        is called).
        (WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
        (WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
        (WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
        message to the WebProcessProxy.
        (WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
        did not mark all its graphics layers as volatile before process suspension.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.

2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use Ref instead of PassRefPtr in WebCore/page
        https://bugs.webkit.org/show_bug.cgi?id=144841

        Reviewed by Darin Adler.

        To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
        in WebCore/page.

        (WebKit::WebUserContentController::WebUserContentController):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setTextIndicator):
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformDictionaryLookup):
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::WebUserContentController):

2015-05-10  Philip Chimento  <philip.chimento@gmail.com>

        [GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
        https://bugs.webkit.org/show_bug.cgi?id=144554

        Reviewed by Darin Adler.

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
        instead of local function. Also use WTF::MB instead of dividing by
        1024 * 1024.
        (WebKit::getMemorySize): Deleted.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformSetCacheModel): Ditto.
        (WebKit::getMemorySize): Deleted.

2015-05-10  Yongjun Zhang  <yongjun_zhang@apple.com>

        Use preview view controller from WebKitSystemInterface.
        https://bugs.webkit.org/show_bug.cgi?id=144836

        Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
        for client that doesn't provide preview view controller, use the default view controller prepared
        by WebKitSystemInterface.

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        (-[WKWebView _allowsLinkPreview]):
        (-[WKWebView _setAllowsLinkPreview:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _registerPreviewInWindow:]):
        (-[WKContentView _unregisterPreviewInWindow:]):
        (-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
            preview delegate, use preview view controller in WebKitSystemInterface.
        (-[WKContentView commitPreviewViewController:]):

2015-05-10  Darin Adler  <darin@apple.com>

        Fix internal Apple builds on Mavericks.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
        some code that is for OS X 10.10 or newer only. There were similar conditionals around
        other nearby code in this file, and around other uses of the same method in other files,
        so matched the style.

2015-05-10  Dan Bernstein  <mitz@apple.com>

        iOS internal build fix.

        * Platform/mac/MenuUtilities.mm:

2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove unnecessary semicolons.
        https://bugs.webkit.org/show_bug.cgi?id=144844

        Reviewed by Darin Adler.

        No new tests, no behavior change.

        * Shared/Downloads/mac/DownloadMac.mm:
        (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::transformHandlesToObjects):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::idToHistoryItemMap):

2015-05-10  Darin Adler  <darin@apple.com>

        Fix build.

        * Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
        I committed before.

2015-05-10  Darin Adler  <darin@apple.com>

        [Cocoa] Don't soft link DataDetectorsCore
        https://bugs.webkit.org/show_bug.cgi?id=144837

        Reviewed by Dan Bernstein.

        * Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.

        * WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
        DataDetectorsSPI.h.

2015-05-09  Dan Bernstein  <mitz@apple.com>

        Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
        https://bugs.webkit.org/show_bug.cgi?id=144831

        Reviewed by Sam Weinig.

        Reverted r182846 and r182904.

        * Shared/API/Cocoa/WKFoundation.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-05-09  Yoav Weiss  <yoav@yoav.ws>

        Remove the PICTURE_SIZES build flag
        https://bugs.webkit.org/show_bug.cgi?id=144679

        Reviewed by Benjamin Poulain.

        Removed the PICTURE_SIZES build time flag.

        * Configurations/FeatureDefines.xcconfig:

2015-05-08  Beth Dakin  <bdakin@apple.com>

        Shuffle touch-related code to keep the internal builds working
        https://bugs.webkit.org/show_bug.cgi?id=144812

        Reviewed by Benjamin Poulain.

        * Shared/NativeWebTouchEvent.h:
        * Shared/WebEvent.h:
        * Shared/WebEventConversion.cpp:
        * Shared/ios/NativeWebTouchEventIOS.mm:
        (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
        (WebKit::extractWebTouchPoint): Deleted.
        * Shared/ios/WebPlatformTouchPointIOS.cpp:

2015-05-08  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
        https://bugs.webkit.org/show_bug.cgi?id=144818

        Reviewed by Anders Carlsson.

        Allow NSString instances that contain unpaired surrogates to be encoded by
        WKRemoteObjectCoder by encoding them directly rather than using
        -[NSString encodeWithCoder:].

        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (encodeString): Added. Sets an API::String as the object to encode.
        (encodeObject): Changed to use encodeString for NSString instances.
        (decodeString): Added. Gets an API::String from the dictionary and returns it as an
        NSString.
        (decodeObject): Changed to use decodeString for NSString instances.

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::createFencePort):

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
        https://bugs.webkit.org/show_bug.cgi?id=144816

        Reviewed by Simon Fraser.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
        Factor out _updateTransientScale from updateLayout.
        Keep track of the last viewScaleFactor that we know is being displayed
        (_lastCommittedViewScale) and use that for computing the transient scale,
        so that we can recompute the transient scale while the UI process's notion
        of the actual view scale might have moved ahead of what the Web process has
        painted.

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/WebPageProxy.cpp:

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::createFencePort):

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::createFencePort):

2015-05-08  Timothy Horton  <timothy_horton@apple.com>

        Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
        https://bugs.webkit.org/show_bug.cgi?id=144810

        Reviewed by Simon Fraser.

        Send the fence from the Web process to the UI process, instead of vice versa.
        This means that we won't keep the UI process CAContext blocked for the whole
        time that the Web process is doing layout/painting/etc. Instead, we'll start
        blocking the Web process CAContext immediately after flushing and before committing,
        and send the fence to the UI process to be applied immediately. This minimizes
        the amount of time in both processes spent blocked on the fence.

        * Platform/mac/LayerHostingContext.h:
        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::createFencePort):
        Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
        Note that you must setFencePort() with this port if you want the LayerHostingContext's
        CAContext to block on it!

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
        (WebKit::WebPageProxy::machSendRightCallback):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
        When called back, install the fence port in our CAContext; when the commit goes through,
        remove the transient scale as we did previously.

        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::replyWithFenceAfterNextFlush):
        (WebKit::DrawingArea::updateGeometry): Deleted.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Instead of installing a fence created in the UI process, tell the DrawingArea
        to create one and reply to the UI process with it after the next flush.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        (WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
        After flushing, before committing, create a fence and reply to any
        callbacks that requested fences, and install it in our context.

2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>

        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
        https://bugs.webkit.org/show_bug.cgi?id=144746

        Reviewed by Carlos Garcia Campos.

        Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.

        * Shared/gtk/ProcessExecutablePathGtk.cpp:
        (WebKit::findWebKitProcess):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (injectedBundleDirectory):
        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::enchantTextChecker):

2015-05-08  Anders Carlsson  <andersca@apple.com>

        Fix ProcessLauncher port leak
        https://bugs.webkit.org/show_bug.cgi?id=144807
        rdar://problem/20593291

        Reviewed by Sam Weinig.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService):
        xpc_dictionary_set_mach_send increments the send right count so make sure to
        balance it with a call to mach_port_deallocate.

2015-05-08  Beth Dakin  <bdakin@apple.com>

        Fix performance tests after r183954
        https://bugs.webkit.org/show_bug.cgi?id=144805

        Reviewed by Alexey Proskuryakov.

        Web* is traditionally a WK1 prefix, so use the WK2 prefix instead in WK2 so that 
        we don’t have two classes with the same name in the two projects.
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _defaultAnimationController]):

2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
        https://bugs.webkit.org/show_bug.cgi?id=144748

        Reviewed by Sergio Villar Senin.

        This is needed by local applications loaded as a file URI that do XMLHttpRequests.

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webKitSettingsSetProperty):
        (webKitSettingsGetProperty):
        (webkit_settings_class_init):
        (webkit_settings_get_allow_file_access_from_file_urls):
        (webkit_settings_set_allow_file_access_from_file_urls):
        * UIProcess/API/gtk/WebKitSettings.h:
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

2015-05-08  Andreas Kling  <akling@apple.com>

        Optimize serialization of quoted JSON strings.
        <https://webkit.org/b/144754>

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.

2015-05-08  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183945.
        https://bugs.webkit.org/show_bug.cgi?id=144789

        "It broke all the GTK+ tests" (Requested by KaL on #webkit).

        Reverted changeset:

        "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
        https://bugs.webkit.org/show_bug.cgi?id=144746
        http://trac.webkit.org/changeset/183945

2015-05-07  Conrad Shultz  <conrad_shultz@apple.com>

        Don't register for Lookup notifications until needed
        https://bugs.webkit.org/show_bug.cgi?id=144783

        Reviewed by Tim Horton.

        * UIProcess/API/mac/WKView.mm:
        Add a WKViewData ivar to track whether we've already registered for popover notifications.
        (-[WKView _prepareForDictionaryLookup]):
        Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        Move notification registration to -_prepareForDictionaryLookup.

        * UIProcess/API/mac/WKViewInternal.h:
        Expose -_prepareForDictionaryLookup.

        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformDictionaryLookup):
        Send -[WKView _prepareForDictionaryLookup].

        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _animationControllerForText]):
        Ditto.

2015-05-07  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183961.
        https://bugs.webkit.org/show_bug.cgi?id=144784

        Broke js/dom/JSON-stringify.html (Requested by kling on
        #webkit).

        Reverted changeset:

        "Optimize serialization of quoted JSON strings."
        https://bugs.webkit.org/show_bug.cgi?id=144754
        http://trac.webkit.org/changeset/183961

2015-05-07  Anders Carlsson  <andersca@apple.com>

        Build fixes.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        Use the regular init method.

        * UIProcess/mac/WKSharingServicePickerDelegate.mm:
        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::handleSelectionServiceClick):
        Pass empty dictionaries instead of nil.

2015-05-07  Chris Dumez  <cdumez@apple.com>

        ASSERTION when pasting text into the WebInspector console
        https://bugs.webkit.org/show_bug.cgi?id=144774

        Reviewed by Ryosuke Niwa.

        Fix assertion in didChangeSelection() meant to check that calling
        editorState() does not cause a synchronous layout. The assertion
        was not correct as it was relying on FrameView::needsLayout() and
        we would hit it if calling editorState() would schedule a layout.
        Instead, the new assertion relies on FrameView::layoutCount(),
        which is more accurate.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection):

2015-05-07  Andreas Kling  <akling@apple.com>

        Optimize serialization of quoted JSON strings.
        <https://webkit.org/b/144754>

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.

2015-05-07  Martin Robinson  <mrobinson@igalia.com>

        Followup fixes to r183936

        I neglected to include a few review comments when I landed the patch.

        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::checkerState): Remove double semicolons.
        (WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
        give the function a better name.
        (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
        (WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
        (WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
        (WebKit::updateStateForAllContexts): Deleted.

2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
        https://bugs.webkit.org/show_bug.cgi?id=144746

        Reviewed by Martin Robinson.

        Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.

        * Shared/gtk/ProcessExecutablePathGtk.cpp:
        (WebKit::findWebKitProcess):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (injectedBundleDirectory):
        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::enchantTextChecker):

2015-05-06  Dean Jackson  <dino@apple.com>

        Handle backdrop views that have to tile
        https://bugs.webkit.org/show_bug.cgi?id=142317
        <rdar://problem/20049088>

        Reviewed by Simon Fraser.

        Take 2 - this was rolled out because Mavericks was crashing.

        Add some better logging for custom appearance.

        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTextStream::operator<<):

2015-05-07  Sungmann Cho  <sungmann.cho@navercorp.com>

        Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
        https://bugs.webkit.org/show_bug.cgi?id=144490

        Reviewed by Darin Adler.

        m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
        the windowed plugins, and the windowed plugins are only supported on X11. So we can
        guard it with PLUGIN_ARCHITECTURE(X11).

        No new tests, no behavior change.

        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::geometryDidChange):
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:

2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>

        Revert "Introducing the Platform Abstraction Layer (PAL)"
        https://bugs.webkit.org/show_bug.cgi?id=144751

        Unreviewed.

        PAL should be a new target inside WebCore, rather than a top-level folder.

        * Configurations/FeatureDefines.xcconfig: Updated

2015-05-07  Jer Noble  <jer.noble@apple.com>

        [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
        https://bugs.webkit.org/show_bug.cgi?id=144744

        Reviewed by Darin Adler.

        One of the requirements of entering low-power compositing mode is that no masking layers
        are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
        transition animation completes, remove the mask layer entirely from our clipping layer.
        This means it needs to be re-created and added when entering fullscreen, rather than just
        at initialization time.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController initWithWindow:webView:]):
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):

2015-05-07  Martin Robinson  <mrobinson@igalia.com>

        [GTK] All spell checking layout tests fail
        https://bugs.webkit.org/show_bug.cgi?id=144648

        Reviewed by Carlos Garcia Campos.

        Simplify and complete the GTK+ spell-checking implementation. Instead of using
        the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
        in TextCheckerGtk. The per-context spell checking API is an illusion, since all
        WKTextChecker implementations will adjust the same singleton. This can be a first step
        toward removing it entirely.

        Also complete the implementation of the TextChecker interface by duplicating the EFL code,
        which reuses other methods in the same class. Eventually this duplication will collapse,
        once GTK+ and EFL can share an Enchant implementation.

        * PlatformGTK.cmake:
        * UIProcess/API/gtk/WebKitPrivate.h:
        * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
        * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
        * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
        replace it with calls directly to the TextChecker singleton via static methods.
        * UIProcess/TextChecker.h:
        * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
        here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
        Also initialize languages properly when building for developer builds. This
        allows WebKitTestRunner to work even when it doesn't explicitly set the languages.

2015-05-07  Ada Chan  <adachan@apple.com>

        Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
        https://bugs.webkit.org/show_bug.cgi?id=144666

        Reviewed by Darin Adler.

        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::backForwardListState):
        If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
        If all the items are filtered out, set currentIndex to the uninitialized value.

2015-05-07  Csaba Osztrogonác  <ossy@webkit.org>

        [WK2] Remove Windows cruft
        https://bugs.webkit.org/show_bug.cgi?id=144745

        Reviewed by Darin Adler.

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::getMemorySize):
        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
        (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::getMemorySize):

2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r182032): [GTK] Production build is broken after r182032
        https://bugs.webkit.org/show_bug.cgi?id=144736

        Reviewed by Martin Robinson.

        The problem is that r182032 moved the NetworkProcess sources from
        WebKit2 sources to NetworkProcess sources. That's not a problem
        for developer builds where all internal symbols are exported, but
        doesn't work for production builds because all those internal
        symbols are private.

        * CMakeLists.txt: Use a different name for common network process
        sources variable.
        * PlatformMac.cmake: Append common network process sources to the
        network process source list for Mac.

2015-05-07  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
        https://bugs.webkit.org/show_bug.cgi?id=144727

        Reviewed by Darin Adler.

        * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
        INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
        * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
        derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
        because we define LD_DYLIB_INSTALL_NAME directly where needed.

2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.

        * gtk/NEWS: Add release notes for 2.9.1.

2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove dock button from Web Inspector window
        https://bugs.webkit.org/show_bug.cgi?id=144728

        Reviewed by Sergio Villar Senin.

        We added the dock buttons to the headerbar, because they were
        removed from the inspector toolbar, but with the new tabbed
        design, the dock buttons are back in the toolbar and look redundant.

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::createInspectorWindow):
        (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
        (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.

2015-05-06  Jer Noble  <jer.noble@apple.com>

        [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
        https://bugs.webkit.org/show_bug.cgi?id=144716

        Reviewed by Darin Adler.

        We create a mask animation for the transition between windowed and fullscreen modes, on the
        assumption that the element being taken into fullscreen mode does not have visible children
        who extend beyond that elements bounds. This assumption breaks down in the case where div
        with absolutely positioned children is taken fullscreen. While we can't necessarily make the
        transition look correct in this case, we can remove the mask after the transition completes.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
        (WebKit::removeAllMediaKeyStorageForOriginPath):

2015-05-06  Jinwoo Jeong  <jw00.jeong@samsung.com>

        Fix a build break on EFL debug build
        https://bugs.webkit.org/show_bug.cgi?id=144654

        Reviewed by Gyuyoung Kim.

        No new tests, just build fix.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):

2015-05-06  Daniel Bates  <dabates@apple.com>

        [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
        https://bugs.webkit.org/show_bug.cgi?id=144657
        <rdar://problem/18894598>

        Reviewed by Andy Estes.

        Pause and resume the database thread when the UIProcess enters and leaves the background,
        respectively, so that we avoid WebProcess termination due to holding a locked SQLite
        database file when the WebProcess is suspended. This behavior matches the analagous
        behavior in Legacy WebKit.

        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
        when the UIProcess enters the background.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
        We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
        WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
        notification.
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
        add empty lines to help demarcate this message and the other UIKit application lifecycle-related
        messages from the rest of the list of messages.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
        (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.

2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] ewk_view_page_contents_get() API test is flaky
        https://bugs.webkit.org/show_bug.cgi?id=144683

        Reviewed by Gyuyoung Kim.

        Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.

        * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
        (ewkViewPageContentsAsMHTMLCallback):

2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
        https://bugs.webkit.org/show_bug.cgi?id=144714

        Reviewed by Timothy Hatcher.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::createInspectorPage):
        (WebKit::WebInspectorProxy::attachAvailabilityChanged):
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::setDockingUnavailable):
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.messages.in:
        When docking availability changes, inform the inspector page
        so it can respond by updating its UI.

2015-05-06  Joonghun Park  <jh718.park@samsung.com>

        [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
        https://bugs.webkit.org/show_bug.cgi?id=144689

        Reviewed by Darin Adler.

        Remove duplicated typename and ::type from AsyncRequestImpl related
        function parameters.

        * Shared/AsyncRequest.h:

2015-05-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183894.
        https://bugs.webkit.org/show_bug.cgi?id=144719

        crashes on mavericks (Requested by dino on #webkit).

        Reverted changeset:

        "Handle backdrop views that have to tile"
        https://bugs.webkit.org/show_bug.cgi?id=142317
        http://trac.webkit.org/changeset/183894

2015-05-06  Brady Eidson  <beidson@apple.com>

        Addition review followup for:
        Crash executing null AsyncRequest in IDB code.
        <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715

        Reviewed by Darin Adler.

        This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future. 
 
         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
          make it a single line which reads better.
        (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
        (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.

        Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
        in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
        never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
        * Shared/AsyncRequest.h:
        (WebKit::AsyncRequestMap::AsyncRequestMap):
        (WebKit::AsyncRequestMap::take):
        (WebKit::AsyncRequestMap::add):
        (WebKit::AsyncRequestMap::clear):
        (WebKit::AsyncRequestMap::values):

2015-05-06  Brady Eidson  <beidson@apple.com>

        Crash executing null AsyncRequest in IDB code.
        <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715

        Reviewed by Darin Adler.

        When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
        dispatches an AsyncRequest ID back to the main thread with an error callback.

        For two of its operations it would then also dispatch the success callback.

        In those cases the main thread would first take the AsyncRequest for the error callback out
        of a map and then execute it.

        It would then try to take the same AsyncRequest out of the map again, fail to do so, then
        execute a null AsyncRequest.

        This patch fixes the two functions to not dispatch both an error and success callback.

        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
        (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.

2015-05-06  Dean Jackson  <dino@apple.com>

        Handle backdrop views that have to tile
        https://bugs.webkit.org/show_bug.cgi?id=142317
        <rdar://problem/20049088>

        Reviewed by Simon Fraser.

        Add some better logging for custom appearance.

        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTextStream::operator<<):

2015-05-06  Chris Dumez  <cdumez@apple.com>

        Disable network cache efficacy logging
        https://bugs.webkit.org/show_bug.cgi?id=144703
        <rdar://problem/20439143>

        Reviewed by Andreas Kling.

        Disable network cache efficacy logging by default as we have sufficient
        data for now.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::registerUserDefaultsIfNeeded):

2015-05-06  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):

2015-05-06  Dan Bernstein  <mitz@apple.com>

        No way to get a WKWebProcessPlugInFrame’s parent frame
        https://bugs.webkit.org/show_bug.cgi?id=144705

        Reviewed by Sam Weinig.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
        (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
        _parentFrame property.

2015-05-06  Timothy Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):

2015-04-02  Myles C. Maxfield  <mmaxfield@apple.com>

        Introducing the Platform Abstraction Layer (PAL)
        https://bugs.webkit.org/show_bug.cgi?id=143358

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig: Updated

2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WK2] The WebKit network disk cache is not enabled
        https://bugs.webkit.org/show_bug.cgi?id=142821

        Reviewed by Martin Robinson.

        Enable NetworkCache for the GTK+ port.

        * config.h:

2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
        https://bugs.webkit.org/show_bug.cgi?id=144672

        Reviewed by Gyuyoung Kim.

        ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.

        * UIProcess/efl/ViewClientEfl.cpp:
        (WebKit::ViewClientEfl::didChangeViewportAttributes):
        Removes condition that checks whether fixed layout is enabled.

2015-05-05  Alexey Proskuryakov  <ap@apple.com>

        NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
        https://bugs.webkit.org/show_bug.cgi?id=144641
        rdar://problem/20250960

        Reviewed by David Kilzer.

        * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
        Clear the client pointer.

        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::useCredentialForChallenge):
        (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
        (WebKit::AuthenticationManager::cancelChallenge):
        (WebKit::AuthenticationManager::performDefaultHandling):
        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
        Updated comments, which were not accurate, at least on Mac.

2015-05-05  Tim Horton  <timothy_horton@apple.com>

        Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
        https://bugs.webkit.org/show_bug.cgi?id=144656

        Reviewed by Dan Bernstein.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
        Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.

2015-05-05  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::setFencePort):

2015-05-05  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/mac/WKViewLayoutStrategy.mm:
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):

2015-05-05  Timothy Horton  <timothy_horton@apple.com>

        Add a layout mode for computing fixed layout size from a minimum size
        https://bugs.webkit.org/show_bug.cgi?id=144610
        <rdar://problem/19790341>

        Reviewed by Simon Fraser.

        Add a layout mode where WebKit determines the layout size with a set of
        (still in flux) heuristics, trying hard to keep the page usable below a
        particular client-defined threshold view size.

        This can mean that WebKit will start scaling down the page inside the view
        to make the whole page fit, using the viewScale mechanism.

        * UIProcess/API/C/WKLayoutMode.h:
        * UIProcess/API/Cocoa/_WKLayoutMode.h:
        Add the new layout mode, and documentation for the two complicated ones.
        
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _layoutMode]):
        (-[WKWebView _setLayoutMode:]):
        (-[WKWebView _setViewScale:]):
        (-[WKWebView _setMinimumViewSize:]):
        (-[WKWebView _minimumViewSize]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        Forward the layoutMode and viewScale parameters to WKView if we have one.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView dealloc]):
        (-[WKView viewWillStartLiveResize]):
        (-[WKView viewDidEndLiveResize]):
        (-[WKView setFrameSize:]):
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        (-[WKView disableFrameSizeUpdates]):
        (-[WKView enableFrameSizeUpdates]):
        (-[WKView frameSizeUpdatesDisabled]):
        (-[WKView _layoutMode]):
        (-[WKView _setLayoutMode:]):
        (-[WKView _setViewScale:]):
        (-[WKView _setMinimumViewSize:]):
        (-[WKView _minimumViewSize]):
        Store the minimum view size, and update the fixed layout size if needed.

        (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
        (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
        (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
        Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
        bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.

        * UIProcess/API/mac/WKViewInternal.h:

        * UIProcess/mac/WKViewLayoutStrategy.h: Added.
        * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
        (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
        (-[WKViewLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewLayoutStrategy willDestroyView:]):
        (-[WKViewLayoutStrategy layoutMode]):
        (-[WKViewLayoutStrategy updateLayout]):
        (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
        (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
        (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
        (-[WKViewLayoutStrategy didChangeViewScale]):
        (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
        (-[WKViewLayoutStrategy willStartLiveResize]):
        (-[WKViewLayoutStrategy didEndLiveResize]):
        (-[WKViewLayoutStrategy didChangeFrameSize]):
        (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
        (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewViewSizeLayoutStrategy updateLayout]):
        (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewFixedSizeLayoutStrategy updateLayout]):
        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
        (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
        Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.

        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
        While in live resize with the new layout mode, disable frame size updates.
        The new layout mode will do a live scale during part of the resize, and
        we don't always want to send the new view size to the Web process.

        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
        (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
        While in the new layout mode, maintain the viewScale as the minimum of the
        scale required to fit the current view frame size inside the minimumViewSize.
        If no scaling is required, carry on as usual, pushing the new view frame size
        to the DrawingArea and on to the Web process.
        If scaling is required, apply a transform to the view in the UI process,
        until the live resize completes, in which case we send a fenced viewScale
        adjustment to the Web process (so that the tiles paint at the new viewScale
        synchronized with the removal of the transform in the UI process).

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scaleViewFenced):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::addFence):
        (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::addFence):
        Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
        TiledCoreAnimationDrawingArea's CAContext.

        Add the ability to send updateGeometry out-of-band, so that
        we can send it synchronously inside the message along with the CA fence.
        We have to both change the viewScale and updateGeometry simultaneously
        in the same CA commit that we install the fence into, in order to ensure
        that there is no flash.

2015-05-05  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Release input NSString when finished copying it.
        https://bugs.webkit.org/show_bug.cgi?id=144642

        Reviewed by Brian Weinstein.

        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):

2015-05-05  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Use less memory to store the json input.
        https://bugs.webkit.org/show_bug.cgi?id=144604

        Reviewed by Benjamin Poulain.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::compiledToFile):
        (API::UserContentExtensionStore::compileContentExtension):
        * UIProcess/API/APIUserContentExtensionStore.h:
        Don't copy strings as much or keep them alive after done using them.

2015-05-04  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Use less memory when writing byte code to file
        https://bugs.webkit.org/show_bug.cgi?id=144602

        Reviewed by Darin Adler.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::decodeContentExtensionMetaData):
        (API::writeDataToFile):
        (API::compiledToFile):
        (API::createExtension):
        Compile and write each DFA to file, then come back and write the header when finalizing.
        Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
        bytecode in memory at a time.

2015-05-05  Sungmann Cho  <sungmann.cho@navercorp.com>

        Make all FrameLoadState data members private.
        https://bugs.webkit.org/show_bug.cgi?id=144562

        Reviewed by Darin Adler.

        Previously, all of the data members in FrameLoadState were public and accessed directly
        from outside the class. But these should all be private as noted in FrameLoadState.h
        for better encapsulation.

        No new tests, no behavior change.

        * UIProcess/API/C/WKFrame.cpp:
        (WKFrameGetFrameLoadState):
        * UIProcess/FrameLoadState.h:
        (WebKit::FrameLoadState::state):
        (WebKit::FrameLoadState::url):
        (WebKit::FrameLoadState::provisionalURL):
        (WebKit::FrameLoadState::unreachableURL):
        * UIProcess/WebFrameProxy.h:
        (WebKit::WebFrameProxy::url):
        (WebKit::WebFrameProxy::provisionalURL):
        (WebKit::WebFrameProxy::unreachableURL):

2015-05-05  Alexey Proskuryakov  <ap@apple.com>

        Crashes in SandboxExtension::consumePermanently when uploading
        https://bugs.webkit.org/show_bug.cgi?id=144611
        rdar://problem/10156710

        Reviewed by Darin Adler.

        This only fixes the crashes, uploading still won't work.
        Added null checks and some logging that may help us get to the root cause eventually.

        * Shared/SandboxExtension.h:
        (WebKit::SandboxExtension::createHandle):
        (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
        * Shared/mac/SandboxExtensionMac.mm:
        (WebKit::SandboxExtension::createHandle):
        (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::extendSandboxForFileFromOpenPanel):

2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>

        Remove TextureMapperImageBuffer
        https://bugs.webkit.org/show_bug.cgi?id=143561

        Reviewed by Žan Doberšek.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):

2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Network Cache: IOChannel operations are not sent to the right thread
        https://bugs.webkit.org/show_bug.cgi?id=144542

        Reviewed by Darin Adler.

        We are ignoring the given WorkQueue and running the async
        operations in the current thread. Check the given WorkQueue
        instead and schedule the operation to the given queue. If the
        given queue is nullptr, which means the operation should be run in
        the main context, the operation is run directly if the current
        context is the main one or sent to the main context using a
        GMainLoopSource.

        Fixes crashes due to asserts when running disk-cache layout tests
        in a Debug build.

        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::readSync):
        (WebKit::NetworkCache::IOChannel::write):

2015-05-04  Dan Bernstein  <mitz@apple.com>

        WebKit always goes through LaunchServices for main frame navigation actions
        https://bugs.webkit.org/show_bug.cgi?id=144608

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
        _WKNavigationActionPolicyAllowWithoutTryingAppLink.
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
        is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.

2015-05-04  Enrica Casucci  <enrica@apple.com>

        [iOS WK2] editorState should include information about selection clipping rectangle.
        https://bugs.webkit.org/show_bug.cgi?id=144603
        rdar://problem/20521252

        Reviewed by Chris Dumez.

        Adding selectionClipRect to the post-layout portion of EditorState.
        This way we can compute the selection clipping rectangle based on
        up-to-date information instead of using the rectangle provided when
        then element was first focused.

        * Shared/EditorState.cpp:
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _selectionClipRect]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::platformEditorState):

2015-05-04  Antti Koivisto  <antti@apple.com>

        Network Cache: Support time based cache clearing
        https://bugs.webkit.org/show_bug.cgi?id=144568
        <rdar://problem/19769820>

        Reviewed by Andreas Kling.

        Support clearing cache entries newer than given time only.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::deleteDumpFile):
        (WebKit::NetworkCache::Storage::traverse):

            Also fix thread safety of traverse handler function.

        (WebKit::NetworkCache::Cache::clear):

            Also add completion handler to support the API properly.

        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::clear):
        * NetworkProcess/cache/NetworkCacheStorage.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::clearNSURLCache):

            Factor to a function.

        (WebKit::NetworkProcess::clearDiskCache):

2015-05-04  Zan Dobersek  <zdobersek@igalia.com>

        [WTF] Remove Functional.h inclusions
        https://bugs.webkit.org/show_bug.cgi?id=144400

        Reviewed by Darin Adler.

        Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
        header that was previously indirectly included through the Functional.h header.
        * WebProcess/WebPage/DrawingArea.cpp:

2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>

        [ARM] Don't compare unsigned chars to EOF (-1)
        https://bugs.webkit.org/show_bug.cgi?id=144439

        Reviewed by Geoffrey Garen.

        * Shared/linux/WebMemorySamplerLinux.cpp:
        (WebKit::nextToken): Don't cast return value of fgetc() to char.

2015-05-04  Antti Koivisto  <antti@apple.com>

        Remove NetworkResourceLoadScheduler
        https://bugs.webkit.org/show_bug.cgi?id=144550

        Reviewed by Sam Weinig.

        It doesn't really do anything.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
        (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::getNetworkProcessStatistics):
        * NetworkProcess/NetworkProcess.h:
        (WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
        * NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
        * NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::cleanup):
        * NetworkProcess/NetworkResourceLoader.h:
        (WebKit::NetworkResourceLoader::create):
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::initializeNetworkSettings):

            Moved from NetworkResourceLoadSchedulerMac.mm.

        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
        * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2015-05-03  Alexey Proskuryakov  <ap@apple.com>

        Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
        https://bugs.webkit.org/show_bug.cgi?id=144509
        rdar://problem/18731910

        Reviewed by Daniel Bates.

        No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
        it work is hard.

        * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
        (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
        (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):

2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][EFL] Unify platform display handling
        https://bugs.webkit.org/show_bug.cgi?id=144517

        Reviewed by Martin Robinson.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
        to checkt the display type.
        (webkitWebViewBaseCreateWebPage): Ditto.
        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit::BackingStore::createBackend): Pass the native X11 shared
        display to BackingStoreBackendCairoX11.
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
        shared display.

2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store):

2015-05-01  Dan Bernstein  <mitz@apple.com>

        WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
        https://bugs.webkit.org/show_bug.cgi?id=144501

        Reviewed by Darin Adler.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
        didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
        failure.
        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
        it in new member variable m_failingProvisionalLoadURL for the duration of the client’s
        handling of this message.
        * UIProcess/WebPageProxy.h:

        * UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
        DidFailProvisionalLoadForFrame.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
        to the UI process.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loader’s state to
        reflect the provisional load error being handled.

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
        LoadAlternateHTMLString.

2015-05-01  Martin Robinson  <mrobinson@igalia.com>

        USE(...) macro should expect unprefixed variables
        https://bugs.webkit.org/show_bug.cgi?id=144454

        Reviewed by Daniel Bates.

        * Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
        * WebKit2.xcodeproj/project.pbxproj: Ditto.

2015-05-01  Brady Eidson  <beidson@apple.com>

        Add API to disable meta refreshes.
        <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269

        Reviewed by Alexey Proskuryakov.

        Add a preference to enable/disable meta refreshes, enabled by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMetaRefreshEnabled):
        (WKPreferencesGetMetaRefreshEnabled):
        (WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-05-01  Antti Koivisto  <antti@apple.com>

        Remove network process load serialization code
        https://bugs.webkit.org/show_bug.cgi?id=144448

        Reviewed by Alexey Proskuryakov.

        TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
        with network process. We don't reorder loads anyway so test results are consistent.
        There or no other clients for this code.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
        (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::getNetworkProcessStatistics):
        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
        (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
        (WebKit::NetworkResourceLoadScheduler::removeLoader):
        (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
        * NetworkProcess/NetworkResourceLoadScheduler.h:
        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleSetTabKeyCyclesThroughElements):
        (WKBundleSetSerialLoadingEnabled): Deleted.
        (WKBundleDispatchPendingLoadRequests): Deleted.
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
        (WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.

            Remove also this as it does nothing.

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
        (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
        (WebKit::WebResourceLoadScheduler::resumePendingRequests):

            Remove implementation, it does nothing.

        (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
        * WebProcess/Network/WebResourceLoadScheduler.h:

2015-04-30  Timothy Horton  <timothy_horton@apple.com>

        Remove long-deprecated unused WKView minimumLayoutWidth properties
        https://bugs.webkit.org/show_bug.cgi?id=144480

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView minimumLayoutWidth]): Deleted.
        (-[WKView setMinimumLayoutWidth:]): Deleted.
        (-[WKView minimumWidthForAutoLayout]): Deleted.
        (-[WKView setMinimumWidthForAutoLayout:]): Deleted.
        These were replaced with minimumSizeForAutoLayout long ago.

2015-04-30  Simon Fraser  <simon.fraser@apple.com>

        Fixed elements end up in the middle of the view with pageScale < 1
        https://bugs.webkit.org/show_bug.cgi?id=144428
        rdar://problem/20404982

        Reviewed by Tim Horton.

        Encode/decode fixedElementsLayoutRelativeToFrame.

        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):

2015-04-30  Tim Horton  <timothy_horton@apple.com>

        Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
        https://bugs.webkit.org/show_bug.cgi?id=144468

        Reviewed by Simon Fraser and Dan Bernstein.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _viewBackgroundColor]):
        (-[WKView updateLayer]):
        Use the pageExtendedBackgroundColor for the background color of the WKView,
        if we have one (and aren't using a transparent background). This means
        during asynchronous resize or other cases where the Web process isn't keeping
        up with the UI process during a resize, we'll see background color instead of white.

2015-04-30  Beth Dakin  <bdakin@apple.com>

        Should choose UIScrollView indicatorStyle based on the document background color
        https://bugs.webkit.org/show_bug.cgi?id=144473
        -and corresponding-
        rdar://problem/19897699

        Reviewed by Simon Fraser.

        Update the indicator style whenever the background color changes.  
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _updateScrollViewBackground]):

2015-04-30  Enrica Casucci  <enrica@apple.com>

        [iOS] tapping in the middle of a word in editable content should not select the word.
        https://bugs.webkit.org/show_bug.cgi?id=144421
        rdar://problem/20710948

        Reviewed by Tim Horton.

        Reverting to the original behavior.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::selectWithGesture):

2015-04-29  Hunseop Jeong  <hs85.jeong@samsung.com>

        Fix the EFL build after r183595
        https://bugs.webkit.org/show_bug.cgi?id=144427

        Reviewed by Gyuyoung Kim.

        updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).

        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::updateWheelEventTestTriggersIfNeeded):

2015-04-29  Brent Fulgham  <bfulgham@apple.com>

        Expand test infrastructure to support scrolling tests
        https://bugs.webkit.org/show_bug.cgi?id=143684
        <rdar://problem/20375516>

        Reviewed by Simon Fraser.

        Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageClearWheelEventTestTriggers): Added.
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
        * UIProcess/WebPageProxy.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
        the Page, rather than MainFrame.
        (WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
        active test triggers.
        * WebPage/EventDispatcher.mm:
        (WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
        defer tests until a Scrolling Thread Sync has occurred.
        * WebPage/WebPage.cpp:
        (WebKit::WebPage::clearWheelEventTestTrigger): Added.
        * WebPage/WebPage.h:
        * WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.

2015-04-29  Enrica Casucci  <enrica@apple.com>

        Adding the ability to move selection by granularity on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=144410
        rdar://problem/19213337

        Reviewed by Benjamin Poulain.

        This patch also correctly sets _usingGestureForSelection for all
        the functions that change the selection with a gesture.
        This way we make sure that the selection drawing is not delayed
        until the next time we paint.

        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):

2015-04-29  Tim Horton  <timothy_horton@apple.com>

        UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
        https://bugs.webkit.org/show_bug.cgi?id=144418
        <rdar://problem/20740278>

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _takeViewSnapshot]):
        Null-check the array before checking if it has any items.
        If the window is off-screen, we can't snapshot it.

2015-04-29  Simon Fraser  <simon.fraser@apple.com>

        Allow testing of plug-ins that handle wheel events.
        https://bugs.webkit.org/show_bug.cgi?id=144413

        Reviewed by Tim Horton.
        
        Allow the Test Netscape Plug-in to pretend to handle wheel events,
        so layout tests can use it.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::determineQuirks):

2015-04-29  Filip Pizlo  <fpizlo@apple.com>

        JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
        https://bugs.webkit.org/show_bug.cgi?id=144397

        Reviewed by Andreas Kling.

        If you override getCallData() and you want to be called a "function", then you need to use the
        new TypeOfShouldCallGetCallData flag.

        * WebProcess/Plugins/Netscape/JSNPObject.h:

2015-04-29  Antti Koivisto  <antti@apple.com>

        ResourceLoadPriority should be enum class
        https://bugs.webkit.org/show_bug.cgi?id=144326

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.

            Remove this unused message.

        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeStoreDecision):
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
        (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::servePendingRequests):
        * WebProcess/Network/WebResourceLoadScheduler.h:

2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>

        [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
        https://bugs.webkit.org/show_bug.cgi?id=132159

        Reviewed by Darin Adler.

        Add SPI to set the font whitelist.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetFontWhitelist):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setFontWhitelist):
        * UIProcess/WebProcessPool.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-04-29  Martin Robinson  <mrobinson@igalia.com>

        [CMake] [GTK] Organize and clean up unused CMake variables
        https://bugs.webkit.org/show_bug.cgi?id=144364

        Reviewed by Gyuyoung Kim.

        * PlatformGTK.cmake: Add variables specific to this project.
        * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
        * webkit2gtk.pc.in: Ditto.

2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
        https://bugs.webkit.org/show_bug.cgi?id=144388

        Reviewed by Brady Eidson.

        Move the WebContextMenuClient::shareMenuItem() implementation to
        platform files, since platforms not supporting share menu item
        should return a null ContextMenuIem instead.

        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
        * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
        (WebKit::WebContextMenuClient::shareMenuItem):
        * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
        (WebKit::WebContextMenuClient::shareMenuItem):
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::shareMenuItem):

2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
        https://bugs.webkit.org/show_bug.cgi?id=144381

        Reviewed by Darin Adler.

        A requester enum value is passed now as part of the
        ResourceRequest, but it's not encoded/decoded for soup.

        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.

2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Use xattrs to get/set the creation time of disk cache files
        https://bugs.webkit.org/show_bug.cgi?id=144251

        Reviewed by Martin Robinson.

        The network process disk cache uses the creation time to compute a
        worth value used to determine the order in which cached resources
        are deleted when the cache is shrunk. In some operating systems
        like Linux there's no st_birthtime in struct stat, but since cache
        files are always created and deleted by us, we could use a custom
        xattr to store and retrieve the creation time of cached resources.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes):
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::IOChannel::IOChannel):

2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
        https://bugs.webkit.org/show_bug.cgi?id=144337

        Reviewed by Antti Koivisto.

        We send a buffer or a memory mapped handler to the web process
        depending on whether the resource body is mapped or not, but we
        are always creating a shared buffer even for mapped resources.
        Split initializeBufferFromStorageRecord() moving the mapped memory
        handler initialization to its own method.

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
        Initialize the mapped memory handler if the body data is mapped.
        (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
        Initialize the buffer by wrapping the mapped memory if the body
        data is mapped, or using the body data directly otherwise.
        (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
        initializeShareableResourceHandleFromStorageRecord() if the
        handler is null.
        * NetworkProcess/cache/NetworkCacheEntry.h:

2015-04-28  Simon Fraser  <simon.fraser@apple.com>

        Make a non-static version of FrameView::yPositionForRootContentLayer()
        https://bugs.webkit.org/show_bug.cgi?id=144375

        Reviewed by Andy Estes.

        There were two calls to the static FrameView::yPositionForRootContentLayer()
        which passed in all the arguments for the same FrameView. Make a member
        function for convenience.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::shadowLayerPositionForFrame):

2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
        https://bugs.webkit.org/show_bug.cgi?id=143001

        Reviewed by Gyuyoung Kim.

        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setSize):
        (WebKit::WebPage::setUseFixedLayout):
        (WebKit::WebPage::canHandleUserEvents):
        * WebProcess/WebPage/WebPage.h:

2015-04-28  Timothy Horton  <timothy_horton@apple.com>

        [TextIndicator] Yellow highlight takes too long to fade out on scroll
        https://bugs.webkit.org/show_bug.cgi?id=144358
        <rdar://problem/19451011>

        Reviewed by Beth Dakin.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView renewGState]):
        (-[WKView viewDidMoveToWindow]):
        (-[WKView _dictionaryLookupPopoverWillClose:]):
        (-[WKView _setTextIndicator:]):
        (-[WKView _setTextIndicator:withLifetime:]):
        (-[WKView _clearTextIndicatorWithAnimation:]):
        (-[WKView magnifyWithEvent:]):
        (-[WKView smartMagnifyWithEvent:]):
        (-[WKView setMagnification:centeredAtPoint:]):
        (-[WKView setMagnification:]):
        (-[WKView _dismissContentRelativeChildWindows]):
        (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
        (-[WKView _setTextIndicator:fadeOut:]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::pageDidScroll):
        (WebKit::WebPageProxy::setTextIndicator):
        (WebKit::WebPageProxy::clearTextIndicator):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::setTextIndicator):
        (WebKit::PageClientImpl::clearTextIndicator):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setTextIndicator):
        (WebKit::PageClientImpl::clearTextIndicator):
        (WebKit::PageClientImpl::didPerformDictionaryLookup):
        (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _defaultAnimationController]):
        (-[WKImmediateActionController _animationControllerForDataDetectedText]):
        (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
        (-[WKImmediateActionController _animationControllerForText]):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::updateFindIndicator):
        Make _setTextIndicator take a reference.
        Add a variant of _setTextIndicator that takes a Lifetime.
        Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
        Make dismissContentRelativeChildWindows take a parameter indicating
        whether the dismissal should include animation or not (currently
        only applies to TextIndicator).
        Don't animate when dismissal occurs because of scrolling, zooming,
        or other things in which the content will have changed significantly
        underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.

2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
        https://bugs.webkit.org/show_bug.cgi?id=144304

        Reviewed by Geoffrey Garen.

        Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.

        * Configurations/FeatureDefines.xcconfig:

2015-04-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183514.
        https://bugs.webkit.org/show_bug.cgi?id=144359

        It broke cloop test bots (Requested by mcatanzaro on #webkit).

        Reverted changeset:

        "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
        https://bugs.webkit.org/show_bug.cgi?id=144304
        http://trac.webkit.org/changeset/183514

2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
        https://bugs.webkit.org/show_bug.cgi?id=144304

        Reviewed by Geoffrey Garen.

        Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.

        * Configurations/FeatureDefines.xcconfig:

2015-04-28  Enrica Casucci  <enrica@apple.com>

        Add support for lookup on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=144342
        rdar://problem/19994090

        Reviewed by Tim Horton.

        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _lookup:]):
        (-[WKContentView canPerformAction:withSender:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::getLookupContextAtPoint):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getLookupContextAtPoint):

2015-04-28  Brady Eidson  <beidson@apple.com>

        Consolidate most "frame load" arguments into FrameLoadRequest.
        https://bugs.webkit.org/show_bug.cgi?id=144276

        Reviewed by Alexey Proskuryakov.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::loadURL):
        
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchCreatePage):
        
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::openInNewTab):

2015-04-28  Chris Dumez  <cdumez@apple.com>

        [WK2][Mac] Update WebContent process' sandbox profile for AWD
        https://bugs.webkit.org/show_bug.cgi?id=144315
        <rdar://problem/20719293>

        Reviewed by Alexey Proskuryakov.

        Update sandbox profile for AWD similarly to what was done for iOS in
        r182278.

        * WebProcess/com.apple.WebProcess.sb.in:

2015-04-28  Antti Koivisto  <antti@apple.com>

        Network Cache: Disk cache getting filled by YouTube video data
        https://bugs.webkit.org/show_bug.cgi?id=144259

        Reviewed by Darin Adler.

        MSE media is loaded via XHR and tends to eventually fill the cache.

        YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
        We can reduce disk writes and keep more useful resources around by not caching them

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeStoreDecision):

            Don't store if the requester is XHR and response has video or audio content type.

        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
        * Shared/Network/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
        (WebKit::NetworkResourceLoadParameters::encode):
        (WebKit::NetworkResourceLoadParameters::decode):
        * Shared/Network/NetworkResourceLoadParameters.h:

            The requester type is now part of the ResourceRequest, no need for separate parameter.

        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::scheduleLoad):

2015-04-28  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::UserContentURLPattern creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144225

        Reviewed by Darin Adler.

        Have API::UserContentURLPattern creation functions return Ref<>.
        Call-sites are also updated, using and operating on the returned Ref<>
        object where possible.

        * Shared/API/APIUserContentURLPattern.h:
        (API::UserContentURLPattern::create):
        * Shared/API/c/WKUserContentURLPattern.cpp:
        (WKUserContentURLPatternCreate):

2015-04-28  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144224

        Reviewed by Darin Adler.

        Have API::URLRequest and API::URLResponse creation functions return Ref<>.
        The call-sites are also updated, using and operating on the returned Ref<> object
        where possible.

        * Shared/API/APIURLRequest.h:
        (API::URLRequest::create):
        * Shared/API/APIURLResponse.h:
        (API::URLResponse::create):
        * Shared/API/c/WKURLRequest.cpp:
        (WKURLRequestCreateWithWKURL):
        * Shared/API/c/mac/WKURLRequestNS.mm:
        (WKURLRequestCreateWithNSURLRequest):
        * Shared/API/c/mac/WKURLResponseNS.mm:
        (WKURLResponseCreateWithNSURLResponse):
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetDownloadClient):
        * UIProcess/API/C/WKDownload.cpp:
        (WKDownloadCopyRequest):
        * UIProcess/API/C/WKNavigationDataRef.cpp:
        (WKNavigationDataCopyOriginalRequest):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPagePolicyClient):
        (WKPageSetPageUIClient):
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
        (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
        (willSendRequestForFrame):
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144223

        Reviewed by Darin Adler.

        Have API::Point, API::Size and API::Rect creation functions return Ref<>.
        Call-sites are also updated, using and operating on the returned Ref<> object
        where possible.

        * Shared/API/APIGeometry.h:
        (API::Size::create):
        (API::Point::create):
        (API::Rect::create):
        * Shared/API/c/WKGeometry.cpp:
        (WKPointCreate):
        (WKSizeCreate):
        (WKRectCreate):

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::Error creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144222

        Reviewed by Darin Adler.

        Have API::Error creation functions return Ref<>.
        The call-sites are also updated, using and operating
        on the returned Ref<> object where possible.

        * Shared/API/APIError.h:
        (API::Error::create):
        * Shared/API/c/cf/WKErrorCF.cpp:
        (WKErrorCreateWithCFError):
        * UIProcess/API/C/WKOriginDataManager.cpp:
        (WKOriginDataManagerDeleteEntriesForOrigin):
        (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
        (WKOriginDataManagerDeleteAllEntries):
        * UIProcess/API/C/WKPage.cpp:
        (toGenericCallbackFunction):
        (WKPageForceRepaint):
        (WKPageValidateCommand):
        (WKPageComputePagesForPrinting):
        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
        (WKPluginSiteDataManagerClearSiteData):
        (WKPluginSiteDataManagerClearAllSiteData):
        * UIProcess/GenericCallback.h:
        (WebKit::toGenericCallbackFunction):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::printFinishedCallback):

2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>

        [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
        https://bugs.webkit.org/show_bug.cgi?id=144312

        Reviewed by Martin Robinson.

        No new tests, no behavior change.

        * UIProcess/API/gtk/WebKitNotificationProvider.h:

2015-04-27  Brent Fulgham  <bfulgham@apple.com>

        PDF action menu fixes
        https://bugs.webkit.org/show_bug.cgi?id=144299
        <rdar://problem/20702215>

        Reviewed by Tim Horton.

        Make two corrections to how PDFs are handled:
        1. When calculating the view rect for the user's selection, make sure
        that we get coordinates for the correct PDF page. The existing code assumed
        that the current PDFLayerControler's current page was correct, but this will
        not be true if you zoom the PDF out so that several pages are displayed at
        once. Each selection keeps track of the page it is referenced against.
        
        2. Revise the offsets calculated for the TextIndicator to take into account
        the font descender (as well as the ascender), and to adjust by the scaled
        amount of margin around the selected text.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
        the coordinates.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
        and (scaled) margin when adjusting the hit target for the TextIndicator to draw.

2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>

        Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
        https://bugs.webkit.org/show_bug.cgi?id=144193

        Reviewed by Darin Adler.

        * CMakeLists.txt:

2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>

        Context menus are not reshown after an orientation change

        <https://bugs.webkit.org/show_bug.cgi?id=144143>
        <rdar://problem/20679931>

        Reviewed by Darin Adler.

        * UIProcess/ios/WKActionSheet.mm:
        (-[WKActionSheet updateSheetPosition]):
        Return early if we're still in a rotation, not if the rotation is
        complete.

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::Dictionary creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144221

        Reviewed by Darin Adler.

        Have API::Dictionary creation functions return Ref<>.
        The call-sites are also updated, using and operating
        on the returned Ref<> object where possible.

        * Shared/API/APIDictionary.cpp:
        (API::Dictionary::create):
        * Shared/API/APIDictionary.h:
        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (createEncodedObject):
        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
        (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
        * Shared/API/c/WKDictionary.cpp:
        (WKDictionaryCreate):
        * Shared/API/c/WKMutableDictionary.cpp:
        (WKMutableDictionaryCreate):
        * Shared/Plugins/Netscape/PluginInformation.cpp:
        (WebKit::createPluginInformationDictionary):
        * Shared/Plugins/Netscape/PluginInformation.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_prefetch_dns):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_get_snapshot):
        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
        * UIProcess/Plugins/PlugInAutoStartProvider.h:
        * UIProcess/StatisticsRequest.cpp:
        (WebKit::createDictionaryFromHashMap):
        (WebKit::StatisticsRequest::completedRequest):
        * UIProcess/WebFormClient.cpp:
        (WebKit::WebFormClient::willSubmitForm):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFailToInitializePlugin):
        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
        (didInitiateLoadForResource):
        (willSendRequestForFrame):
        (didReceiveResponseForResource):
        (didReceiveContentLengthForResource):
        (didFinishLoadForResource):
        (didFailLoadForResource):
        (webkitWebPageDidReceiveMessage):
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
        (WebKit::InjectedBundlePageFormClient::willSubmitForm):

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::Data creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144220

        Reviewed by Darin Adler.

        Have API::Data creation functions return Ref<>.
        The call-sites are also updated, using and operating
        on the returned Ref<> object where possible.

        * Shared/API/APIData.h:
        (API::Data::createWithoutCopying):
        (API::Data::create):
        * Shared/API/c/WKData.cpp:
        (WKDataCreate):
        * Shared/API/c/mac/WKWebArchive.cpp:
        (WKWebArchiveCopyData):
        * Shared/API/c/mac/WKWebArchiveResource.cpp:
        (WKWebArchiveResourceCopyData):
        * Shared/APIWebArchive.h:
        * Shared/APIWebArchive.mm:
        (API::WebArchive::data):
        * Shared/APIWebArchiveResource.h:
        * Shared/APIWebArchiveResource.mm:
        (API::WebArchiveResource::data):
        * Shared/Cocoa/APIDataCocoa.mm:
        (API::Data::createWithoutCopying):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        (webkitURISchemeRequestReadCallback):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_load_bytes):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::createData):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::dataCallback):
        (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::URL creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144219

        Reviewed by Darin Adler.

        Have API::URL creation functions return Ref<>.
        The call-sites are also updated, using and operating in the
        returned Ref<> object, where possible.

        * Shared/API/APIURL.h:
        (API::URL::create):
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toCopiedURLAPI):
        * Shared/API/c/WKURL.cpp:
        (WKURLCreateWithUTF8CString):
        (WKURLCreateWithBaseURL):
        * UIProcess/API/gtk/WebKitWebResource.cpp:
        (webkit_web_resource_get_data):
        * UIProcess/WebIconDatabase.cpp:
        (WebKit::WebIconDatabase::didChangeIconForPageURL):
        (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::userAgent):

2015-04-27  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] API::String creation functions should return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=144218

        Reviewed by Darin Adler.

        Have API::String creation functions return Ref<>.
        The call-sites are also updated, using and operating on the returned
        Ref<> object, where possible.

        * Shared/API/APIString.h:
        * Shared/API/c/WKPluginInformation.cpp:
        (WKPluginInformationBundleIdentifierKey):
        (WKPluginInformationBundleVersionKey):
        (WKPluginInformationBundleShortVersionKey):
        (WKPluginInformationPathKey):
        (WKPluginInformationDisplayNameKey):
        (WKPluginInformationDefaultLoadPolicyKey):
        (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
        (WKPluginInformationHasSandboxProfileKey):
        (WKPluginInformationFrameURLKey):
        (WKPluginInformationMIMETypeKey):
        (WKPluginInformationPageURLKey):
        (WKPluginInformationPluginspageAttributeURLKey):
        (WKPluginInformationPluginURLKey):
        (WKPlugInInformationReplacementObscuredKey):
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::ProxyingRefPtr::ProxyingRefPtr):
        (WebKit::toCopiedAPI):
        * Shared/API/c/WKString.cpp:
        (WKStringCreateWithUTF8CString):
        (WKStringCreateWithJSString):
        * UIProcess/API/C/WKDatabaseManager.cpp:
        (WKDatabaseManagerGetOriginKey):
        (WKDatabaseManagerGetOriginQuotaKey):
        (WKDatabaseManagerGetOriginUsageKey):
        (WKDatabaseManagerGetDatabaseDetailsKey):
        (WKDatabaseManagerGetDatabaseDetailsNameKey):
        (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
        (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
        (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
        (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
        (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetOriginKey):
        (WKKeyValueStorageManagerGetCreationTimeKey):
        (WKKeyValueStorageManagerGetModificationTimeKey):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetSessionHistoryURLValueType):
        (WKPageGetSessionBackForwardListItemValueType):
        (toGenericCallbackFunction):
        (WKPageValidateCommand):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::didReceiveInvalidMessage):

2015-04-27  Brady Eidson  <beidson@apple.com>

        Make 'enum NavigationType' be an enum class
        https://bugs.webkit.org/show_bug.cgi?id=144270

        Reviewed by Alex Christensen.

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        
        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::NavigationActionData):
        
        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (toWKNavigationType):
        
        * UIProcess/API/gtk/WebKitPrivate.cpp:
        (toWebKitNavigationType):
        
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::openInNewTab):

2015-04-27  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(r182879): Images and video can no longer be downloaded
        https://bugs.webkit.org/show_bug.cgi?id=144267
        <rdar://problem/20702844>

        Reviewed by Simon Fraser.

        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
        "!WebCore::protocolIs(..., "file")" for image and media downloads.

2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
        https://bugs.webkit.org/show_bug.cgi?id=143874

        Reviewed by Gyuyoung Kim.

        * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
        * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.

2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Add initial implementation of NetworkProcess disk cache
        https://bugs.webkit.org/show_bug.cgi?id=143872

        Reviewed by Martin Robinson.

        Implement the platform specific parts of the disk cache
        implementation for Soup. It's mainly NetworkCache::Data and
        NetworkCache::IOChannel.

        * CMakeLists.txt:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::dumpFileChanged):
        (WebKit::NetworkCache::Cache::initialize):
        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
        * NetworkProcess/cache/NetworkCacheData.h:
        (WebKit::NetworkCache::Data::soupBuffer):
        * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
        (WebKit::NetworkCache::Data::Data):
        (WebKit::NetworkCache::Data::empty):
        (WebKit::NetworkCache::Data::data):
        (WebKit::NetworkCache::Data::isNull):
        (WebKit::NetworkCache::Data::apply):
        (WebKit::NetworkCache::Data::subrange):
        (WebKit::NetworkCache::concatenate):
        (WebKit::NetworkCache::MapWrapper::~MapWrapper):
        (WebKit::NetworkCache::deleteMapWrapper):
        (WebKit::NetworkCache::mapFile):
        (WebKit::NetworkCache::Data::adoptMap):
        (WebKit::NetworkCache::computeSHA1):
        (WebKit::NetworkCache::bytesEqual):
        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
        (WebKit::NetworkCache::IOChannel::IOChannel):
        (WebKit::NetworkCache::IOChannel::open):
        (WebKit::NetworkCache::fillDataFromReadBuffer):
        (WebKit::NetworkCache::inputStreamReadReadyCallback):
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::readSync):
        (WebKit::NetworkCache::outputStreamWriteReadyCallback):
        (WebKit::NetworkCache::IOChannel::write):
        * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
        * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
        (WebKit::NetworkProcess::platformSetCacheModel):
        (WebKit::NetworkProcess::clearDiskCache):
        * PlatformGTK.cmake:

2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Implement ES6 template literals
        https://bugs.webkit.org/show_bug.cgi?id=142691

        Reviewed by Darin Adler.

        Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.

        * Configurations/FeatureDefines.xcconfig:

2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove PluginView::renderer().
        https://bugs.webkit.org/show_bug.cgi?id=144216

        Reviewed by Darin Adler.

        Nobody should have to know about the plug-in view's renderer except the plug-in view itself.

        No new tests, no behavior change.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
        (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::renderer): Deleted.
        * WebProcess/Plugins/PluginView.h:

2015-04-26  Doug Russell  <d_russell@apple.com>

        AX: richer text change notifications (142719)
        https://bugs.webkit.org/show_bug.cgi?id=142719

        Reviewed by Darin Adler.

        Richer accessibility value change notifications. Introduce AXTextEditType,
        postTextStateChangeNotification and postTextReplacementNotification to give assistive
        tech apps more reliable context for responding to changes in web content. Also implement
        a mechanism to post value changes in password form fields in coalesced ticks to thwart
        analyzing the cadence of changes.

        Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
        and an overload of postTextReplacementNotification to give assistive tech apps more
        reliable context for responding to changes in web content selection. Also block posting
        selection changes on password fields.

        * UIProcess/WebEditCommandProxy.cpp:
        (WebKit::WebEditCommandProxy::nameForEditAction):

2015-04-26  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
        https://bugs.webkit.org/show_bug.cgi?id=144233

        Reviewed by Simon Fraser.

        Have the plug-in service link against WebKit.framework rather than WebKit2.framework.

        * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
        and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
        we can just do it in the target’s Link Binary With Libraries build phase.

        * Configurations/PluginService.64.xcconfig: Ditto.

        * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
        Binariy With Libraries build phases (one service already had WebKit).

2015-04-26  Dan Bernstein  <mitz@apple.com>

        Fixed the build.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
        of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].

2015-04-25  Tim Horton  <timothy_horton@apple.com>

        Further update gesture swipe shadow style
        https://bugs.webkit.org/show_bug.cgi?id=144215
        <rdar://problem/19295843>

        Reviewed by Dan Bernstein.

        * Resources/mac/SwipeShadow.png: Removed.
        * Resources/mac/SwipeShadow@2x.png: Removed.
        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        * WebKit2.xcodeproj/project.pbxproj:
        Use a CAGradientLayer instead of PNGs for the swipe shadow.

2015-04-25  Dan Bernstein  <mitz@apple.com>

        WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
        https://bugs.webkit.org/show_bug.cgi?id=144201

        Reviewed by Darin Adler.

        Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
        9876.5.

        * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
        headers, look for "9876_5" rather than "TBA".

2015-04-24  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Remove native window dock controls
        https://bugs.webkit.org/show_bug.cgi?id=144184

        Reviewed by Joseph Pecoraro.

        * Resources/DockBottom.pdf: Removed.
        * Resources/DockBottomLegacy.pdf: Removed.
        * Resources/DockRight.pdf: Removed.
        * Resources/DockRightLegacy.pdf: Removed.
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::createInspectorWindow):
        (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-25  Martin Robinson  <mrobinson@igalia.com>

        Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
        https://bugs.webkit.org/show_bug.cgi?id=144182

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

2015-04-24  Simon Fraser  <simon.fraser@apple.com>

        Have the web inspector report accurate memory use for layers with detached backing store
        https://bugs.webkit.org/show_bug.cgi?id=144179

        Reviewed by Dean Jackson.
        
        Remote layers can make their backing store volatile, so the backing only contributes
        to reported memory use when attached.

        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2015-04-24  Andreas Kling  <akling@apple.com>

        theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
        <https://webkit.org/b/144175>
        <rdar://problem/20694585>

        Reviewed by Anders Carlsson.

        Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
        IPC request to the UI process that would give the same result, but spend way
        more time and CPU cycles to do so.

        With this change, theverge.com CPU usage goes from 100% to ~20% when idle.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::windowRect):

2015-04-24  Brent Fulgham  <bfulgham@apple.com>

        TextIndicator for embedded PDFs is slightly offset
        https://bugs.webkit.org/show_bug.cgi?id=144172
        <rdar://problem/20691304>

        Reviewed by Tim Horton.

        When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
        step where the font ascent was used to adjust the origin used for the TextIndicator. This
        patch determines the correct ascent for the range of characters in the selection, and
        adjusts the offset by the difference between the ascent and the height of the selection rect.
        
        Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
        an equivalent text bounding box by insetting the rect by half the size of the ascent.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
        * WebProcess/Plugins/PDF/PDFPlugin.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
        font ascent and scale factor into account.

2015-04-24  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]

        Fixes the following build failures:

            WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
                CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
                                                        ^~~~~~~~~~~~~~~~~~~~~~
            WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
                CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
                       ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        * Platform/spi/ios/UIKitSPI.h:
        (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.

2015-04-24  Anders Carlsson  <andersca@apple.com>

        Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=144171

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _websiteDataStore]):
        (-[WKWebViewConfiguration _setWebsiteDataStore:]):
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (-[_WKWebsiteDataStore initWithDataStore:]):
        (+[_WKWebsiteDataStore defaultDataStore]):
        (+[_WKWebsiteDataStore nonPersistentDataStore]):
        (-[_WKWebsiteDataStore isNonPersistent]):
        (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-24  Tim Horton  <timothy_horton@apple.com>

        WKPDFView does not support password-protected PDFs
        https://bugs.webkit.org/show_bug.cgi?id=144162
        <rdar://problem/18411512>

        Reviewed by Andy Estes.

        * Platform/spi/ios/UIKitSPI.h:
        Add some SPI.

        * UIProcess/ios/WKPDFView.h:
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView _didLoadPDFDocument]):
        (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
        Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
        and initial setup of the page views out into _didLoadPDFDocument.

        If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
        we'll continue on to _didLoadPDFDocument as previously.

        (-[WKPDFView web_setMinimumSize:]):
        Resize the password UI instead of the PDF pages if we have it.

        (-[WKPDFView _computePageAndDocumentFrames]):
        Don't bother doing any work revalidating PDF pages if the document is locked.

        (-[WKPDFView _updatePasswordEntryField]):
        Make sure that the UIDocumentPassword view is always the size of the scrollview.
        This takes care of rotation.

        (-[WKPDFView _keyboardDidShow:]):
        Make sure that we scroll the password field around, if necessary, to keep it
        on screen when editing begins.

        (-[WKPDFView _showPasswordEntryField]):
        (-[WKPDFView _hidePasswordEntryField]):
        Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
        while it's up. The UIDocumentPassword view is installed into the scroll view
        to match UIWebView behavior.

        (-[WKPDFView userDidEnterPassword:forPasswordView:]):
        (-[WKPDFView didBeginEditingPassword:inView:]):
        (-[WKPDFView didEndEditingPassword:inView:]):
        (-[WKPDFView _didFailToUnlock]):
        Pop up a dialog informing the user that they entered the wrong password.

        (-[WKPDFView _tryToUnlockWithPassword:]):
        Try to unlock the document. If it succeeds, hide the unlock UI and go back to
        _didLoadPDFDocument.

2015-04-24  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r183266.
        https://bugs.webkit.org/show_bug.cgi?id=144164

        Broke 32-bit build and a test. (Requested by ap on #webkit).

        Reverted changeset:

        "AX: richer text change notifications (142719)"
        https://bugs.webkit.org/show_bug.cgi?id=142719
        http://trac.webkit.org/changeset/183266

2015-04-24  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION: WebKit2.ActionMenusTest API test fails
        https://bugs.webkit.org/show_bug.cgi?id=144149
        <rdar://problem/20677770>

        Reviewed by Tim Horton.

        Tested by TestWebKitAPI 

        The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
        was receiving from root view to the plugin view. Consequently, full page PDFs
        did hit testing correctly, but an <embed> PDF would not.

        Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
        expect 'root view' coordinates and perform the requisite conversions, rather
        than expecting 'plugin view' coordinates.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
        for the input.
        (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
        coordinates to the PDF's view coordinate space.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
        not content coordinates.

2015-04-24  Anders Carlsson  <andersca@apple.com>

        Address a review comment from Joe Pecoraro.

        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:

2015-04-24  Anders Carlsson  <andersca@apple.com>

        Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
        https://bugs.webkit.org/show_bug.cgi?id=144158

        Reviewed by Beth Dakin.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::isPersistent):
        (API::WebsiteDataStore::isNonPersistent): Deleted.
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore isPersistent]):
        (-[WKWebsiteDataStore isNonPersistent]): Deleted.
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (-[_WKWebsiteDataStore isNonPersistent]):
        * UIProcess/WebsiteData/WebsiteDataStore.h:

2015-04-24  Brent Fulgham  <bfulgham@apple.com>

        Immediate action not functional for embedded PDFs
        https://bugs.webkit.org/show_bug.cgi?id=143952
        <rdar://problem/19842365>        

        Reviewed by Tim Horton.

        Add a new method to retrieve appropriate dictionary lookup content and update the
        hit test result with relevant dictionary content and the bounding rect of the
        selection.

        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
        * WebProcess/Plugins/PDF/PDFPlugin.h:
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
        convert PDF 'in page' units to the equivalent view units.
        (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
        (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
        its bounding rect and return the result in view units.
        * WebProcess/Plugins/Plugin.h:
        * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
        * WebProcess/Plugins/PluginProxy.h: Add stub.
        * WebProcess/Plugins/PluginView.cpp: 
        (WebKit::PluginView::viewRectForSelection): Added.
        * WebProcess/Plugins/PluginView.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
        (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
        (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
        with relevant dictionary lookup content, and mark the result as a text node (if
        appropriate).

2015-04-24  Jer Noble  <jer.noble@apple.com>

        [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
        https://bugs.webkit.org/show_bug.cgi?id=144153

        Reviewed by Alexey Proskuryakov.

        Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange):

2015-04-24  Antti Koivisto  <antti@apple.com>

        CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
        https://bugs.webkit.org/show_bug.cgi?id=144147

        Reviewed by Chris Dumez.

        Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
        This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
        RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.

        Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
        ReadOperation: count the active operations in progress and delete WriteOperation when everything is
        finished. This way we don't need to copy the function out from WriteOperation.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
        (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):

            Move definition here from the header.

        (WebKit::NetworkCache::Storage::~Storage):
        (WebKit::NetworkCache::Storage::storeBodyAsBlob):

            Increment the operation count when storing a blob, call finishWriteOperation when done.

        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::Storage::finishReadOperation):

            Count active operations instead of finished operations. This makes the code clearer.

        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::Storage::finishWriteOperation):

            Mirror the way ReadOperations work.

        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.

2015-04-24  Timothy Hatcher  <timothy@apple.com>

        REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
        https://bugs.webkit.org/show_bug.cgi?id=144150

        Reviewed by Brian Burg.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
        instead of strings by not using the string version of evaluateCommandOnLoad.

2015-04-23  Anders Carlsson  <andersca@apple.com>

        Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=144138

        Reviewed by Darin Adler.

        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):

2015-04-24  Doug Russell  <d_russell@apple.com>

        AX: richer text change notifications (142719)
        https://bugs.webkit.org/show_bug.cgi?id=142719

        Reviewed by Darin Adler.

        Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.

        Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.

        * UIProcess/WebEditCommandProxy.cpp:
        (WebKit::WebEditCommandProxy::nameForEditAction):

2015-04-24  Darin Adler  <darin@apple.com>

        Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
        https://bugs.webkit.org/show_bug.cgi?id=128007

        Reviewed by Anders Carlsson.

        * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
        needed that was inherited from OwnPtr.h before.

2015-04-24  Antti Koivisto  <antti@apple.com>

        Network Cache: Make path functions members
        https://bugs.webkit.org/show_bug.cgi?id=144146

        Reviewed by Carlos Garcia Campos.

        This simplifies the code.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::partitionPathForKey):
        (WebKit::NetworkCache::Storage::recordPathForKey):
        (WebKit::NetworkCache::Storage::bodyPathForKey):
        (WebKit::NetworkCache::Storage::storeBodyAsBlob):
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::Storage::finishReadOperation):
        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::partitionPathForKey): Deleted.
        (WebKit::NetworkCache::recordPathForKey): Deleted.
        (WebKit::NetworkCache::bodyPathForKey): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Remove incorrect assert after r183189.

        In this case the assert was already there, but it's incorrect
        because we are handling uninitialized attachments below in the
        same function, and also when sending messages. So, if it's ok to
        send uninitialized attachments, it's ok to receive them. This
        didn't fail before r183189, because we were only invaliding the
        attachments by setting the file descriptor to -1, and they were
        handled as null attachments. After r183189, the move operator
        resets the moved attachment leaving it uninitialized again.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage):

2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Use a webkit subdirectory for the disk cache
        https://bugs.webkit.org/show_bug.cgi?id=144048

        Reviewed by Martin Robinson.

        Recent versions of libsoup remove any file in cache dir not
        referenced by the index when the cache is loaded to workaround
        leaked resources when load/dump is unbalanced for whatever reason,
        like a crash. We currently use $XDG_CACHE_HOME/app-name as default
        disk cache directory, but that directory could be used by apps to
        cache other things, and the soup cache might end up deleting other
        stuff. The soup cache assumes the given directory is only for the
        disk cache, so we should ensure that.

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
        webkit to the given disk cache and clear the previous soup cache if it exists.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformInitializeWebProcess): Ditto.

2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Remove incorrect ASSERT added in r183176.

        We allow to encode null attachments.

        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::releaseAttachment):

2015-04-23  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.

        Reviewed by Andy Estes.

        * mac/postprocess-framework-headers.sh:

2015-04-23  Simon Fraser  <simon.fraser@apple.com>

        Make it possible to detach GraphicsLayerCA backing store
        https://bugs.webkit.org/show_bug.cgi?id=144140

        Reviewed by Tim Horton.
        
        This changes makes it possible to denote a GraphicsLayerCA's backing store
        as "attached" or not. When not attached, the backing store is made volatile
        and can be purged. This will be used in a future patch.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
        (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
        returns true, this indicates that the backing store was brought out of the
        "unreachable" list, so return true even if the backing store doesn't require
        painting.
        * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
        (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
        (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
        if the caller will need to submit the backing store in the current transaction.
        (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
        explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
        store, and it's attached.
        * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
        (WebKit::dumpChangedLayers):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
        on the backing store if it's attached.
        (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
        (WebKit::PlatformCALayerRemote::backingStoreAttached):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
        (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):

2015-04-23  Tim Horton  <timothy_horton@apple.com>

        Quick Look preview popover is not dismissed on scroll in Mail
        https://bugs.webkit.org/show_bug.cgi?id=144119
        <rdar://problem/19752045>

        Reviewed by Anders Carlsson.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView renewGState]):
        If we have a TextIndicator, dismiss all content relative child windows
        on renewGState, not just the TextIndicator itself.

        This will fix cases like Mail, where WebKit isn't driving the scrolling,
        and we have no way (except renewGState) to know that scrolling is happening.

2015-04-23  Simon Fraser  <simon.fraser@apple.com>

        Changing TiledBacking velocity should schedule a tile revalidation
        https://bugs.webkit.org/show_bug.cgi?id=144123

        Reviewed by Tim Horton.
        
        Drive-by fix: use the FrameView& that we have already.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):

2015-04-23  Jer Noble  <jer.noble@apple.com>

        [Mac] Disable QTKit by default on future OS X.
        https://bugs.webkit.org/show_bug.cgi?id=144082

        Reviewed by Darin Adler.

        QTKitEnabled defaults to false.

        * Shared/WebPreferencesDefinitions.h:

2015-04-23  Jer Noble  <jer.noble@apple.com>

        [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
        https://bugs.webkit.org/show_bug.cgi?id=144120

        Reviewed by Eric Carlson.

        Tweak the curve to ease-in faster when the fullscreen animation duration is short.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (timingFunctionForDuration):
        (zoomAnimation):
        (maskAnimation):
        (fadeAnimation):

2015-04-23  Enrica Casucci  <enrica@apple.com>

        iOS build fix after r183208.

        Unreviewed.

        * UIProcess/ios/WKContentViewInteraction.mm:

2015-04-22  Alexey Proskuryakov  <ap@apple.com>

        [iOS] WebKit services should inherit environment variables for home
        https://bugs.webkit.org/show_bug.cgi?id=144078
        rdar://problem/20571678

        Reviewed by Dan Bernstein.

        Pass current environment variables as XPC bootstrap. Also while at it, made
        _CFBundleSetupXPCBootstrap not soft linked.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
        (main):
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService):

2015-04-23  Enrica Casucci  <enrica@apple.com>

        Support share button.
        https://bugs.webkit.org/show_bug.cgi?id=144077
        rdar://problem/19772892

        Reviewed by Darin Adler.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _share:]):
        (-[WKContentView canPerformAction:withSender:]):
        (-[WKContentView _define:]):
        (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
        (-[WKContentView moveByOffset:]):
        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
        (-[WKContentView accessoryTab:]):
        (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
        (-[WKContentView executeEditCommandWithCallback:]):

2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [UNIX] Do not allow copies of IPC::Attachment
        https://bugs.webkit.org/show_bug.cgi?id=144096

        Reviewed by Darin Adler.

        It ensures that the file descriptor ownership is always correctly
        transferred. This way we can remove the dispose() method to
        explicitly close the file descriptor and always close it in the
        Attachment destructor (unless explicitly transferred to
        IPC::Connection or SharedMemory). It simplifies the code and
        ensure we don't leak file descriptors.

        * Platform/IPC/ArgumentDecoder.cpp:
        (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
        explicitly dispose attachments.
        (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
        * Platform/IPC/ArgumentEncoder.cpp:
        (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
        explicitly dispose attachments.
        (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
        (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
        * Platform/IPC/ArgumentEncoder.h:
        * Platform/IPC/Attachment.cpp:
        (IPC::Attachment::encode): Move a copy of the attachment, and
        reset the file descriptor, since the ownership is passed to the encoder.
        * Platform/IPC/Attachment.h: Make copy constructor and assignment
        private to not allow public copies. The only copy allowed is done
        by Attachment::encode(). Make m_fileDescriptor mutable so that we
        can reset it in Attachment::encode() after passing the ownership
        to the encoder.
        * Platform/IPC/unix/AttachmentUnix.cpp:
        (IPC::Attachment::~Attachment): Close the file descriptor if it
        hasn't been released explicitly.
        (IPC::Attachment::dispose): Deleted.
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
        (IPC::Connection::sendOutgoingMessage): Ditto.
        (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
        (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
        (WebKit::SharedMemory::Handle::clear): Reset the attachment.
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        Call releaseFileDescriptor() instead of fileDescritpro() since the
        ownership is passed to the connection.

2015-04-23  Alexey Proskuryakov  <ap@apple.com>

        Build fix.

        * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.

2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix debug build after r183176.

        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::decode):
        (WebKit::SharedMemory::createHandle):

2015-04-23  Andreas Kling  <akling@apple.com>

        There should only be one way to get the system memory size.
        <https://webkit.org/b/144081>

        Reviewed by Antti Koivisto.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformSetCacheModel):
        (WebKit::memorySize): Deleted.
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformSetCacheModel):
        (WebKit::memorySize): Deleted.

2015-04-23  Chris Dumez  <cdumez@apple.com>

        [WK2] WebDiagnosticLoggingClient is leaking
        https://bugs.webkit.org/show_bug.cgi?id=144089
        <rdar://problem/19706214>

        Reviewed by Darin Adler.

        WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
        constructor but there is no code destroying it.

        This patch adds a new xxxDestroyed() virtual function to
        DiagnosticLoggingClient and that is overriden in
        WebDiagnosticLoggingClient to call "delete this". This is the same
        pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
        WebProgressTrackerClient).

        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
        (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:

2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [UNIX] Simplify the file descriptor handling in SharedMemory
        https://bugs.webkit.org/show_bug.cgi?id=144046

        Reviewed by Darin Adler.

        Simplify the file descriptor handling and clarify its ownership by
        using IPC::Attachment in SharedMemory::Handle instead of fd and
        size members. SharedMemory::Handle::adoptFromAttachment() has been
        renamed as SharedMemory::Handle::adoptAttachment() and receives an
        IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
        has been renamed as SharedMemory::Handle::releaseAttachment().

        * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
        * Platform/IPC/Connection.h:
        (IPC::Connection::identifierIsNull): A file descriptor is null
        when it's -1 no 0.
        * Platform/IPC/unix/AttachmentUnix.cpp:
        (IPC::Attachment::Attachment):
        (IPC::Attachment::operator=):
        (IPC::Attachment::dispose): Reset the file descriptor after
        closing it.
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage): Use
        SharedMemory::Handle::adoptAttachment() that receives an
        IPC::Attachment now.
        (IPC::Connection::sendOutgoingMessage): Use
        SharedMemory::Handle::releaseAttachment().
        * Platform/SharedMemory.h:
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::Handle): Remove initializers for
        file descriptor and size members.
        (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
        (WebKit::SharedMemory::Handle::isNull): Handle is null if the
        attachment file descriptor is -1.
        (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
        (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
        (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
        using move.
        (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
        (WebKit::SharedMemory::map): Use
        IPC::Attachment::releaseFileDescriptor() instead of manually
        changing the member.
        (WebKit::SharedMemory::createHandle): Initialize the handle
        attachment with the duplicated file descriptor and size.

2015-04-22  Darin Adler  <darin@apple.com>

        Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=143943

        Reviewed by Anders Carlsson.

        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        Removed unneeded include.

2015-04-22  Brent Fulgham  <bfulgham@apple.com>

        VisibleSelection should only accept Range by reference
        https://bugs.webkit.org/show_bug.cgi?id=144047

        Reviewed by Tim Horton.

        Update all uses of VisibleSelection to pass a Range reference instead
        of a Range pointer.

        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        (WebKit::InjectedBundleRangeHandle::renderedImage):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::getImageForFindMatch):
        (WebKit::FindController::selectFindMatch):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::insertTextAsync):
        (WebKit::WebPage::setCompositionAsync):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::insertDictatedTextAsync):

2015-04-22  Anders Carlsson  <andersca@apple.com>

        Add WK_ARRAY and WK_SET annotations
        https://bugs.webkit.org/show_bug.cgi?id=144075
        rdar://problem/19417770

        Reviewed by Dan Bernstein.

        * Shared/API/Cocoa/WKFoundation.h:
        * UIProcess/API/Cocoa/WKBackForwardList.h:
        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * mac/postprocess-framework-headers.sh:

2015-04-22  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed build fix after r183136.

        * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
        'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'

2015-04-21  Brent Fulgham  <bfulgham@apple.com>

        Extend action menus to support PDF
        https://bugs.webkit.org/show_bug.cgi?id=143895
        <rdar://problem/19003333>

        Reviewed by Tim Horton.

        If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
        content is under the mouse. For now, we only support copying text and handling URLs.

        If no text is selected, use the dictionary lookup service to find a semantically appropriate
        selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
        views. If some text is already selected, and the mouse is over the existing selection, continue
        using the selected text. Otherwise, discard the old selection and select the most appropriate
        region under the mouse pointer.

        * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
        * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
        (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
        menu entries.
        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
        * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
        'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
        * WebProcess/Plugins/PDF/PDFPlugin.h:
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
        (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
        (WebKit::PDFPlugin::lookupTextAtLocation): Added.
        * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
        * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::getSelectionForWordAtPoint): Added.
        (WebKit::PluginView::existingSelectionContainsPoint): Added.
        (WebKit::PluginView::lookupTextAtLocation): Added.
        * WebProcess/Plugins/PluginView.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
        relevant content to support later action menu handling.

2015-04-22  Eric Carlson  <eric.carlson@apple.com>

        Update AirPlay sandbox rules
        https://bugs.webkit.org/show_bug.cgi?id=144062
        <rdar://problem/19869448>

        Reviewed by Alexey Proskuryakov.

        * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.

2015-04-22  Alexey Proskuryakov  <ap@apple.com>

        [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
        https://bugs.webkit.org/show_bug.cgi?id=144052
        rdar://problem/19754404

        Reviewed by Darin Adler.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
        (main): Make XPC transaction tracking work again after a re-exec.

2015-04-22  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Have API::Array creation methods return Ref<>
        https://bugs.webkit.org/show_bug.cgi?id=143933

        Reviewed by Darin Adler.

        API::Array::create() and API::Array::createStringArray() should return Ref<> objects
        as the return values are never null. It's up to the caller to implicitly convert the
        returned objects to RefPtr<> if so required. All the call-sites have been updated to
        reflect that.

        * Shared/API/APIArray.cpp:
        (API::Array::create):
        (API::Array::createStringArray):
        (API::Array::copy):
        * Shared/API/APIArray.h:
        * Shared/API/APIDictionary.cpp:
        (API::Dictionary::keys):
        * Shared/API/APIDictionary.h:
        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (ensureObjectStream):
        * Shared/API/c/WKArray.cpp:
        (WKArrayCreate):
        (WKArrayCreateAdoptingValues):
        * Shared/API/c/WKContextMenuItem.cpp:
        (WKContextMenuCopySubmenuItems):
        * Shared/API/c/WKDictionary.cpp:
        (WKDictionaryCopyKeys):
        * Shared/API/c/WKMutableArray.cpp:
        (WKMutableArrayCreate):
        * Shared/Cocoa/WKNSDictionary.mm:
        (-[WKNSDictionary keyEnumerator]):
        * Shared/SecurityOriginData.cpp:
        (WebKit::performAPICallbackWithSecurityOriginDataVector):
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
        * Shared/WebContextMenuItem.h:
        * Shared/WebOpenPanelParameters.cpp:
        (WebKit::WebOpenPanelParameters::acceptMIMETypes):
        (WebKit::WebOpenPanelParameters::selectedFileNames):
        * Shared/WebOpenPanelParameters.h:
        * UIProcess/API/C/WKBackForwardListRef.cpp:
        (WKBackForwardListCopyBackListWithLimit):
        (WKBackForwardListCopyForwardListWithLimit):
        * UIProcess/API/C/WKGrammarDetail.cpp:
        (WKGrammarDetailCopyGuesses):
        * UIProcess/API/C/WKOpenPanelParameters.cpp:
        (WKOpenPanelParametersCopyAcceptedMIMETypes):
        (WKOpenPanelParametersCopySelectedFileNames):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageContextMenuClient):
        (WKPageCopyRelatedPages):
        * UIProcess/API/Cocoa/WKBackForwardList.mm:
        (-[WKBackForwardList backList]):
        (-[WKBackForwardList forwardList]):
        * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
        (createWKArray):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        * UIProcess/API/gtk/WebKitBackForwardList.cpp:
        (webkit_back_forward_list_get_back_list_with_limit):
        (webkit_back_forward_list_get_forward_list_with_limit):
        * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
        (webkit_file_chooser_request_get_mime_types):
        (webkit_file_chooser_request_get_mime_types_filter):
        (webkit_file_chooser_request_select_files):
        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
        (WebKitNotificationProvider::notificationCloseCallback):
        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
        (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
        * UIProcess/Notifications/WebNotificationProvider.cpp:
        (WebKit::WebNotificationProvider::clearNotifications):
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
        * UIProcess/StatisticsRequest.cpp:
        (WebKit::StatisticsRequest::completedRequest):
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::backList):
        (WebKit::WebBackForwardList::forwardList):
        (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
        (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
        * UIProcess/WebBackForwardList.h:
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
        * UIProcess/WebDatabaseManagerProxy.cpp:
        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
        (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
        * UIProcess/WebGrammarDetail.cpp:
        (WebKit::WebGrammarDetail::guesses):
        * UIProcess/WebGrammarDetail.h:
        * UIProcess/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
        * UIProcess/WebMediaCacheManagerProxy.cpp:
        (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
        * UIProcess/WebOriginDataManagerProxy.cpp:
        (WebKit::WebOriginDataManagerProxy::didGetOrigins):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFindStringMatches):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
        (-[WKWebProcessPlugInFrame childFrames]):
        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
        (WKBundleBackForwardListItemCopyChildren):
        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFrameCopyChildFrames):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageCopyTrackedRepaintRects):
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
        (WebKit::InjectedBundleBackForwardListItem::children):
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
        (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::findLargestFrameInFrameSet):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::childFrames):
        * WebProcess/WebPage/WebFrame.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::trackedRepaintRects):
        * WebProcess/WebPage/WebPage.h:

2015-04-21  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Use one playback target for all web processes
        https://bugs.webkit.org/show_bug.cgi?id=144009

        Reviewed by Tim Horton.

        Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
        picker.

        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::resetState):
        (WebKit::WebPageProxy::isPlayingMediaDidChange):
        (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
        (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
        (WebKit::WebPageProxy::showPlaybackTargetPicker):
        (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
        (WebKit::WebPageProxy::setPlaybackTarget):
        (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
        (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
        (WebKit::WebPageProxy::devicePickerProxy): Deleted.
        (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
        (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
        (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isPlayingAudio):
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::mediaSessionManager):
        (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
        * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
        (WebKit::WebMediaSessionManagerMac::singleton):
        (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
        (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
        (WebKit::WebMediaSessionManagerMac::targetPicker):
        * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
        * WebProcess/Plugins/PluginView.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::isPlayingMediaDidChange):
        (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
        (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
        (WebKit::WebChromeClient::showPlaybackTargetPicker):
        (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
        (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
        (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::playbackTargetSelected):
        (WebKit::WebPage::playbackTargetAvailabilityDidChange):
        (WebKit::WebPage::setShouldPlayToPlaybackTarget):

2015-04-21  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore doesn't track and remove IndexedDB databases
        https://bugs.webkit.org/show_bug.cgi?id=144032
        rdar://problem/20242856

        Reviewed by Tim Horton.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:
        * Shared/WebsiteData/WebsiteDataTypes.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::generateCallbackID):
        (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
        (WebKit::DatabaseProcessProxy::fetchWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::DatabaseProcessProxy::didClose):
        (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
        (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
        (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Databases/DatabaseProcessProxy.messages.in:
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2015-04-21  Anders Carlsson  <andersca@apple.com>

        Add module maps for WebKit
        https://bugs.webkit.org/show_bug.cgi?id=144026
        rdar://problem/19665428

        Reviewed by Dan Bernstein.

        * Configurations/WebKit.xcconfig:
        * Modules/OSX.modulemap: Added.
        * Modules/iOS.modulemap: Added.

2015-04-21  Tim Horton  <timothy_horton@apple.com>

        Long pause under _takeViewSnapshot when screen updates are disabled
        https://bugs.webkit.org/show_bug.cgi?id=144017
        <rdar://problem/20548397>

        Reviewed by Simon Fraser.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _takeViewSnapshot]):
        Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
        the next commit, and can succeed while screen updates are disabled
        without blocking.

2015-04-21  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
        https://bugs.webkit.org/show_bug.cgi?id=144014

        Reviewed by Antti Koivisto.

        Better account of resource revalidations in efficacy logging.
        Prevously, resources that were in the cache but needed revalidation
        were counted as retrieval successes, which is not entirely accurate.

        We now distinguish "is in the cache and is directly usable" from
        "is in the cache but needs revalidation". We also log how many of these
        revalidations are successful.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::update):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
        (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
        * NetworkProcess/cache/NetworkCacheStatistics.h:

2015-04-21  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Framework header postprocessing should respect additional definitions
        https://bugs.webkit.org/show_bug.cgi?id=144018

        Reviewed by Anders Carlsson.

        * mac/postprocess-framework-headers.sh: Read definitons from
        /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
        have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
        sed.

2015-04-21  Anders Carlsson  <andersca@apple.com>

        Fix block signatures
        https://bugs.webkit.org/show_bug.cgi?id=144002

        Reviewed by Andreas Kling.

        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
        (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
        (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):

2015-04-21  Timothy Horton  <timothy_horton@apple.com>

        PDFs still don't snapshot properly in iOS Safari
        https://bugs.webkit.org/show_bug.cgi?id=143976
        <rdar://problem/18283459>

        Reviewed by Anders Carlsson.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
        * UIProcess/WebPageProxy.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
        Inform the client that we've passed all reasonable layout milestones
        as soon as the custom content provider has been handed its data.
        WKPDFView, the only custom content provider, synchronously lays out
        its subviews upon initial receipt of data, so this works fine for it.
        This ensures that clients that normally depend on layout milestones firing
        won't break when a custom content view is installed.

        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
        Fall back to renderInContext: if the custom content view is not parented
        when a snapshot is requested.

2015-04-21  Dan Bernstein  <mitz@apple.com>

        Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
        (-[WKBackForwardListItem _item]):
        (-[WKBackForwardListItem _apiObject]):
        * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:

2015-04-21  Chris Dumez  <cdumez@apple.com>

        Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
        https://bugs.webkit.org/show_bug.cgi?id=143970

        Reviewed by Darin Adler.

        Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
        constructor explicit as it copies the vector and it is easy to call it
        by mistake.

        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
        (WebKit::WebIDBServerConnection::setIndexKeys):
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:

2015-04-20  Dan Bernstein  <mitz@apple.com>

        Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
        https://bugs.webkit.org/show_bug.cgi?id=143973

        Reviewed by Anders Carlsson.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
        delegate methods.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
        property.
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
        (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
        useful to delegates getting an array of nodes via the new method.

        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
        shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.

2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>

        Cleanup some StringBuilder use
        https://bugs.webkit.org/show_bug.cgi?id=143550

        Reviewed by Darin Adler.

        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
        (WebKit::buildObjectStoreStatement):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::v2RecordsTableSchema):
        * Shared/Databases/IndexedDB/IDBUtilities.cpp:
        (WebKit::uniqueDatabaseIdentifier):
        * UIProcess/API/APIUserScript.cpp:
        (API::UserScript::generateUniqueURL):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::didReceiveInvalidMessage):
        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
        (WebKit::combinedSecurityOriginIdentifier):

2015-04-20  Anders Carlsson  <andersca@apple.com>

        Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
        https://bugs.webkit.org/show_bug.cgi?id=143966

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString):
        (-[WKWebsiteDataRecord dataTypes]):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (+[WKWebsiteDataStore allWebsiteDataTypes]):
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (toWKWebsiteDataTypes):
        (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):

2015-04-20  Beth Dakin  <bdakin@apple.com>

        Should remove mouseForceClick and mouseForceCancelled from DOM force events
        https://bugs.webkit.org/show_bug.cgi?id=143904
        -and corresponding-
        rdar://problem/20578842

        Reviewed by Dan Bernstein.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::immediateActionDidCancel):

2015-04-20  Tim Horton  <timothy_horton@apple.com>

        Implement immediate action support for tel: and mailto: URLs
        https://bugs.webkit.org/show_bug.cgi?id=143916
        <rdar://problem/19721711>

        Reviewed by Darin Adler.

        * Shared/API/c/WKImmediateActionTypes.h:
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _defaultAnimationController]):
        (-[WKImmediateActionController _animationControllerForDataDetectedText]):
        (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
        (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
        Add _animationControllerForDataDetectedLink and use it when
        building immediate actions for tel: and mailto: links.

2015-04-20  Alex Christensen  <achristensen@webkit.org>

        Properly report errors from _WKUserContentExtensionStore.
        https://bugs.webkit.org/show_bug.cgi?id=143808

        Reviewed by Darin Adler.

        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
        (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
        (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):

2015-04-18  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r181656): Animated tiled layers are missing content
        https://bugs.webkit.org/show_bug.cgi?id=143911
        rdar://problem/20596328

        Reviewed by Darin Adler.
        
        After r181656, all requestAnimationFrame was falling back to timers, and not
        using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
        fumble.
        
        Replace this confusing Optional<> code with simpler code that just forces the
        clients to make a DisplayRefreshMonitor if they can, first asking
        ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
        
        Make lots of things into references, and use C++11 initialization in some places.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createDisplayRefreshMonitor):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2015-04-18  Dan Bernstein  <mitz@apple.com>

        SwipeShadow images are installed on iOS
        https://bugs.webkit.org/show_bug.cgi?id=143915

        Reviewed by Tim Horton.

        * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
        EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
        individual patterns.
        * Resources/SwipeShadow.png: Moved to mac.
        * Resources/SwipeShadow@2x.png: Moved to mac.
        * Resources/mac: Added.
        * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
        * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
        * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
        SwipeShadow*.png into it. Updated for file moves.

2015-04-18  Chris Dumez  <cdumez@apple.com>

        Fix NetworkCache Statistics database bootstrapping after r182803
        https://bugs.webkit.org/show_bug.cgi?id=143890

        Reviewed by Darin Adler.

        Update the NetworkCache Statistics database bootstrapping code to use
        the records path instead of the version path. Also check that the
        filenames in the folder are valid hashes to discard the *-body files.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::recordsPath):
        (WebKit::NetworkCache::Cache::storagePath): Deleted.
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
        (WebKit::NetworkCache::Statistics::shrinkIfNeeded):

2015-04-17  Tim Horton  <timothy_horton@apple.com>

        Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
        https://bugs.webkit.org/show_bug.cgi?id=143901
        <rdar://problem/20488655>

        Reviewed by Anders Carlsson.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForMessage):
        InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
        a sync message arrives while waiting, but it should also avoid waiting
        if there's a sync message already in the queue when the waiting starts,
        as that will have the same nasty effect.

        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
        If a synchronous message comes in from the Web process while we're waiting,
        cancel our synchronous wait for DidUpdateGeometry. This will cause the size
        change to not synchronize with the Web process' painting, but that is better
        than pointlessly blocking for 500ms.

2015-04-17  Chris Dumez  <cdumez@apple.com>

        Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
        https://bugs.webkit.org/show_bug.cgi?id=143899
        <rdar://problem/20584215>

        Reviewed by Anders Carlsson.

        WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
        check that m_page.corePage() was non-null before dereferencing, thus
        causing crashes when it is null.

        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

2015-04-17  Yongjun Zhang  <yongjun_zhang@apple.com>

        WebKit client should be able to add view controller for link preview.
        https://bugs.webkit.org/show_bug.cgi?id=143686

        Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
        for link preview and react to the dismissal of this view controller. Also connect WKContentView to
        preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
        in WKUIDelegatePrivate.

        Reviewed by Beth Dakin.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView willMoveToWindow:]):
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView cleanupInteraction]):
        (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
        (-[WKContentView gestureRecognizerShouldBegin:]):
        (-[WKContentView previewViewControllerForPosition:inSourceView:]):
        (-[WKContentView commitPreviewViewController:]):
        (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
        (-[WKContentView didDismissPreviewViewController:committing:]):

2015-04-17  Beth Dakin  <bdakin@apple.com>

        Force mouse events should go through normal mouse event handling code paths
        https://bugs.webkit.org/show_bug.cgi?id=143749
        -and corresponding-
        rdar://problem/20472895

        Reviewed by Dean Jackson.

        This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
        NSEventTypePressures that is gets and sends those down to the web process.

        Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
        NSEventTypePressure, the new name makes it clear how the second parameter differs 
        from the first.
        * Shared/NativeWebMouseEvent.h:

        New event types for the new types of events.
        * Shared/WebEvent.h:
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
        * Shared/mac/NativeWebMouseEventMac.mm:
        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
        * Shared/mac/WebEventFactory.h:

        All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
        events into WebMouseEvents is taken care of here.
        * Shared/mac/WebEventFactory.mm:
        (WebKit::mouseButtonForEvent):
        (WebKit::globalPointForEvent):
        (WebKit::pointForEvent):
        (WebKit::WebEventFactory::createWebMouseEvent):

        Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
        and handle it.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):

        Handle the new types.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveEvent):

        Can delete inputDeviceForceDidChange since it’s no longer used.
        (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
        * UIProcess/WebPageProxy.h:

        Handle the new types of mouse events properly.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::handleMouseEvent):

        Delete inputDeviceForceDidChange() and m_lastForceStage.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::inputDeviceForceDidChange): Deleted.

        Handle new WebEvent types.
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

2015-04-17  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r182912 and r182920.
        https://bugs.webkit.org/show_bug.cgi?id=143881

        Build breakage in some configurations (Requested by ap on
        #webkit).

        Reverted changesets:

        "Force mouse events should go through normal mouse event
        handling code paths"
        https://bugs.webkit.org/show_bug.cgi?id=143749
        http://trac.webkit.org/changeset/182912

        http://trac.webkit.org/changeset/182920

2015-04-17  Antti Koivisto  <antti@apple.com>

        Network Cache: Read resource record and body in parallel
        https://bugs.webkit.org/show_bug.cgi?id=143879

        Reviewed by Chris Dumez.

        We currently first fetch the record file and then fetch the body blob if needed.
        We can do both operations in parallel to reduce latency.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::traverseCacheFiles):

            Do all validation in the client.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::synchronize):

            Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
            Delete any unknown file in cache directory.

        (WebKit::NetworkCache::Storage::addToRecordFilter):

            More informative name for record filter.

        (WebKit::NetworkCache::Storage::mayContain):
        (WebKit::NetworkCache::Storage::readRecord):
        (WebKit::NetworkCache::Storage::storeBodyAsBlob):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):

            Start record read IO and body blob read IO in parallel.

        (WebKit::NetworkCache::Storage::finishReadOperation):

            The read is finished when we have both the record and the blob.

        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::Storage::retrieve):
        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::clear):
        (WebKit::NetworkCache::Storage::shrink):
        (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
        (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):

            ReadOperation is now mutable and gathers the read result.

2015-04-16  Anders Carlsson  <andersca@apple.com>

        Stop installing WebKit2.framework
        https://bugs.webkit.org/show_bug.cgi?id=143860
        rdar://problem/18298491

        Reviewed by Dan Bernstein.

        * Configurations/WebKit2.xcconfig:
        Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.

2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.

2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
        https://bugs.webkit.org/show_bug.cgi?id=143867

        Reviewed by Sergio Villar Senin.

        Encode/Decode the ResourceRequest cache policy.

        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>

        Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
        https://bugs.webkit.org/show_bug.cgi?id=143750

        Reviewed by Darin Adler.

        No new tests, no behavior change.

        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
        (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):

2015-04-16  Brady Eidson  <beidson@apple.com>

        Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
        https://bugs.webkit.org/show_bug.cgi?id=143834

        Reviewed by Anders Carlsson.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::compiledToFile): Use moveFile() instead of renameFile()

2015-04-16  Anders Carlsson  <andersca@apple.com>

        Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=143844

        Reviewed by Dan Bernstein.

        * Shared/API/Cocoa/WKFoundation.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _validate]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * mac/postprocess-framework-headers.sh:

2015-04-16  Alex Christensen  <achristensen@webkit.org>

        Removed unused WKUserContentFilterRef.
        https://bugs.webkit.org/show_bug.cgi?id=143852

        Reviewed by Sam Weinig.

        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
        (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
        (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
        * Shared/WebCompiledContentExtension.h:
        * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
        * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
        * UIProcess/API/C/WebKit2_C.h:
        * UIProcess/API/Cocoa/_WKUserContentFilter.h:
        * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
        (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-16  Beth Dakin  <bdakin@apple.com>

        Rubber-stamped by Tim Horton.

        Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
        make sure to use the most up-to-date pressure information when setting the force 
        on a WebMouseEvent.

        * Shared/mac/WebEventFactory.mm:
        (WebKit::WebEventFactory::createWebMouseEvent):

2015-04-13  Jer Noble  <jer.noble@apple.com>

        [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
        https://bugs.webkit.org/show_bug.cgi?id=143680

        Reviewed by Simon Fraser.

        The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
        single video element and its full screen state. With multiple animations in and out of fullscreen combined with
        multiple fullscreen modes, this assumption no longer holds true.

        Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
        /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
        WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
        communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
        WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
        are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
        WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.

        Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
        manager or manager proxy, and each method on the context simply calls the matching method on the manager and
        passes its contextId as a parameter.

        Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
        cross-process messages.

        On the other side, the manager and proxy also have a map between contextIds and their matching
        WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
        WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).

        While this change is large by LoC, it is almost entirely boilerplate.  The new and interesting pieces are these:

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
        (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
        (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
        (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
            a new model and interface object.
        (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
        (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if 
            any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
            exit fullscreen.
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
        (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
        (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
        (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
        (WebKit::WebVideoFullscreenManager::ensureModelAndInterface):  Added. Lazily create, and add to the m_contextMap
            a new model and interface object.
        (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
        (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().

        New classes and methods which just forward on to their owning objects:

        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        (WebKit::WebVideoFullscreenModelContext::create):
        (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
        (WebKit::WebVideoFullscreenModelContext::invalidate):
        (WebKit::WebVideoFullscreenModelContext::layerHost):
        (WebKit::WebVideoFullscreenModelContext::setLayerHost):
        (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
        (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenModelContext::play):
        (WebKit::WebVideoFullscreenModelContext::pause):
        (WebKit::WebVideoFullscreenModelContext::togglePlayState):
        (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
        (WebKit::WebVideoFullscreenModelContext::endScrubbing):
        (WebKit::WebVideoFullscreenModelContext::seekToTime):
        (WebKit::WebVideoFullscreenModelContext::fastSeek):
        (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
        (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
        (WebKit::WebVideoFullscreenModelContext::endScanning):
        (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
        (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
        (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
        (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
        (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
        (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
        (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
        (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
        (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
        (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
        (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
        (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
        (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
        * WebProcess/ios/WebVideoFullscreenManager.h:
        (WebKit::WebVideoFullscreenInterfaceContext::create):
        (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
        (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
        (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
        (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
        (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
        (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
        (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
        (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
        (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
        (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
        (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
        (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
        (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
        (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
        (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
        (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
        (WebKit::WebVideoFullscreenInterfaceContext::setRate):
        (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
        (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
        (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
        (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
        (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
        (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):

        Cross-process methods which now take a contextId parameter:

        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
        (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
        (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
        (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
        (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
        (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
        (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
        (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
        (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
        (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
        (WebKit::WebVideoFullscreenManagerProxy::setDuration):
        (WebKit::WebVideoFullscreenManagerProxy::setRate):
        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
        (WebKit::WebVideoFullscreenManagerProxy::play):
        (WebKit::WebVideoFullscreenManagerProxy::pause):
        (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
        (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
        (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
        (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
        (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
        (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
        (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
        (WebKit::WebVideoFullscreenManagerProxy::endScanning):
        (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
        (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
        (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
        (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
        (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
        (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
        (WebKit::WebVideoFullscreenManager::resetMediaState):
        (WebKit::WebVideoFullscreenManager::setDuration):
        (WebKit::WebVideoFullscreenManager::setCurrentTime):
        (WebKit::WebVideoFullscreenManager::setBufferedTime):
        (WebKit::WebVideoFullscreenManager::setRate):
        (WebKit::WebVideoFullscreenManager::setVideoDimensions):
        (WebKit::WebVideoFullscreenManager::setSeekableRanges):
        (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
        (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
        (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
        (WebKit::WebVideoFullscreenManager::setExternalPlayback):
        (WebKit::WebVideoFullscreenManager::play):
        (WebKit::WebVideoFullscreenManager::pause):
        (WebKit::WebVideoFullscreenManager::togglePlayState):
        (WebKit::WebVideoFullscreenManager::beginScrubbing):
        (WebKit::WebVideoFullscreenManager::endScrubbing):
        (WebKit::WebVideoFullscreenManager::seekToTime):
        (WebKit::WebVideoFullscreenManager::fastSeek):
        (WebKit::WebVideoFullscreenManager::beginScanningForward):
        (WebKit::WebVideoFullscreenManager::beginScanningBackward):
        (WebKit::WebVideoFullscreenManager::endScanning):
        (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
        (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
        (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
        (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
        (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
        (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
        (WebKit::WebVideoFullscreenManager::didExitFullscreen):
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
        (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
        (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
        (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.

2015-04-16  Beth Dakin  <bdakin@apple.com>

        Force mouse events should go through normal mouse event handling code paths
        https://bugs.webkit.org/show_bug.cgi?id=143749
        -and corresponding-
        rdar://problem/20472895

        Reviewed by Dean Jackson.

        This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
        NSEventTypePressures that is gets and sends those down to the web process.

        Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
        NSEventTypePressure, the new name makes it clear how the second parameter differs 
        from the first.
        * Shared/NativeWebMouseEvent.h:

        New event types for the new types of events.
        * Shared/WebEvent.h:
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
        * Shared/mac/NativeWebMouseEventMac.mm:
        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
        * Shared/mac/WebEventFactory.h:

        All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
        events into WebMouseEvents is taken care of here.
        * Shared/mac/WebEventFactory.mm:
        (WebKit::mouseButtonForEvent):
        (WebKit::globalPointForEvent):
        (WebKit::pointForEvent):
        (WebKit::WebEventFactory::createWebMouseEvent):

        Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
        and handle it.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):

        Handle the new types.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveEvent):

        Can delete inputDeviceForceDidChange since it’s no longer used.
        (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
        * UIProcess/WebPageProxy.h:

        Handle the new types of mouse events properly.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::handleMouseEvent):

        Delete inputDeviceForceDidChange() and m_lastForceStage.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::inputDeviceForceDidChange): Deleted.

        Handle new WebEvent types.
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

2015-04-16  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.

        Reviewed by Tim Horton.

        * WebKit2.xcodeproj/project.pbxproj:

2015-04-16  Timothy Horton  <timothy_horton@apple.com>

        Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
        https://bugs.webkit.org/show_bug.cgi?id=143740
        <rdar://problem/20468540>

        Reviewed by Dan Bernstein.

        In the C SPI, add three WKPageLoaderClient callbacks for the three
        navigation gesture events (did begin, will end, did end).

        * UIProcess/API/C/WKPageLoaderClient.h:
        Add the callbacks.

        * UIProcess/API/APILoaderClient.h:
        (API::LoaderClient::navigationGestureDidBegin):
        (API::LoaderClient::navigationGestureWillEnd):
        (API::LoaderClient::navigationGestureDidEnd):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::navigationGestureDidBegin):
        (WebKit::WebPageProxy::navigationGestureWillEnd):
        (WebKit::WebPageProxy::navigationGestureDidEnd):
        Dispatch navigation gesture events to the loader client as well as
        (after a bounce through the PageClient) the navigation delegate.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageLoaderClient):
        Call the callbacks.

        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::trackSwipeGesture):
        (WebKit::ViewGestureController::willEndSwipeGesture):
        While we were already informing WebPageProxy of 'did begin' and 'did end'
        navigation gesture events, we were missing 'will end'. Add it.

2015-04-16  Tim Horton  <timothy_horton@apple.com>

        Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
        https://bugs.webkit.org/show_bug.cgi?id=143812
        <rdar://problem/19866038>

        Reviewed by Simon Fraser.

        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        No cats in transaction (more of these below, too).

        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
        (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::handleTap):
        (WebKit::WebPage::commitPotentialTap):
        (WebKit::WebPage::dynamicViewportSizeUpdate):
        Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
        the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
        back to the UI process (dynamicViewportUpdateChangedTarget). If we have
        dispatched another dynamicViewportSizeUpdate in the interim, ignore
        the intermediate target.

2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove PluginController::isPluginVisible().
        https://bugs.webkit.org/show_bug.cgi?id=143830

        Reviewed by Darin Adler.

        PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
        This method had been used only for WebKit2 on Windows, and no one uses it now.
        So we can remove it.

        No new tests, no behavior change.

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
        * PluginProcess/PluginControllerProxy.h:
        * WebProcess/Plugins/PluginController.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::isPluginVisible): Deleted.
        * WebProcess/Plugins/PluginView.h:

2015-04-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Disable a flaky ewk_context_network_process_model() API test
        https://bugs.webkit.org/show_bug.cgi?id=143824

        Reviewed by Csaba Osztrogonác.

        ewk_context_network_process_model has been often failed. Though Bug 142967
        was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
        disables it until fixing it.

        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
        (TEST_F):

2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>

        [WK2] Forwarding headers generator shouldn't generate unnecessary headers
        https://bugs.webkit.org/show_bug.cgi?id=143820

        Reviewed by Carlos Garcia Campos.

        * Scripts/generate-forwarding-headers.pl:
        (collectNeededHeaders):

2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>

        [GTK] Run forwarding headers generator unconditionally
        https://bugs.webkit.org/show_bug.cgi?id=143819

        Reviewed by Carlos Garcia Campos.

        * PlatformGTK.cmake:

2015-04-15  Brent Fulgham  <bfulgham@apple.com>

        [Mac] Disable "Save to Downloads" option for local files
        https://bugs.webkit.org/show_bug.cgi?id=143794

        Reviewed by Tim Horton.

        Disable the Image and Media download options if the download
        target is a local file. We can only download web resources;
        anything else is actually a no-op.

        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _defaultMenuItemsForVideo]):
        (-[WKActionMenuController _defaultMenuItemsForImage]):

2015-04-15  Anders Carlsson  <andersca@apple.com>

        Make websiteDataStore on WKWebViewConfiguration public
        https://bugs.webkit.org/show_bug.cgi?id=143810

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration websiteDataStore]):
        (-[WKWebViewConfiguration setWebsiteDataStore:]):
        (-[WKWebViewConfiguration _websiteDataStore]):
        (-[WKWebViewConfiguration _setWebsiteDataStore:]):

2015-04-15  Anders Carlsson  <andersca@apple.com>

        Make WKWebsiteDataStore public
        https://bugs.webkit.org/show_bug.cgi?id=143805

        Reviewed by Dan Bernstein.

        Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
        types of the defaultDataStore and nonPersistentDataStore class methods.
        
        Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
        and forwards the defaultDataStore and nonPersistentDataStore method calls.

        * Shared/API/Cocoa/WebKit.h:
        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _websiteDataStore]):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
        (+[WKWebsiteDataStore defaultDataStore]):
        (+[WKWebsiteDataStore nonPersistentDataStore]):
        (-[WKWebsiteDataStore dealloc]):
        (-[WKWebsiteDataStore isNonPersistent]):
        (toSystemClockTime):
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        (toWebsiteDataRecords):
        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
        (-[WKWebsiteDataStore _apiObject]):
        * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
        (WebKit::wrapper):
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (+[_WKWebsiteDataStore defaultDataStore]):
        (+[_WKWebsiteDataStore nonPersistentDataStore]):
        (-[_WKWebsiteDataStore dealloc]): Deleted.
        (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
        (toWebsiteDataTypes): Deleted.
        (toSystemClockTime): Deleted.
        (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
        (-[_WKWebsiteDataStore _apiObject]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-15  Timothy Horton  <timothy_horton@apple.com>

        Custom CSS cursors do not use -webkit-image-set on retina displays
        https://bugs.webkit.org/show_bug.cgi?id=120783

        Reviewed by Beth Dakin.
        Patch by Evan Wallace <evan.exe@gmail.com>.

        Serialize the cursor image scale for SetCursor messages so custom
        CSS cursors work with -webkit-image-set on retina displays.

        * Shared/WebCoreArgumentCoders.cpp:
        (CoreIPC::ArgumentCoder<Cursor>::encode):
        (CoreIPC::ArgumentCoder<Cursor>::decode):

2015-04-15  Alex Christensen  <achristensen@webkit.org>

        Progress towards CMake on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=143785

        Reviewed by Csaba Osztrogonác.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:

2015-04-15  Anders Carlsson  <andersca@apple.com>

        Make WKWebsiteDataRecord public
        https://bugs.webkit.org/show_bug.cgi?id=143796

        Reviewed by Dan Bernstein.

        Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
        add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
        inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
        to allocate _WKWebsiteDataRecord objects.

        * Shared/API/Cocoa/WebKit.h:
        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
        (-[WKWebsiteDataRecord dealloc]):
        (dataTypesToString):
        (-[WKWebsiteDataRecord description]):
        (-[WKWebsiteDataRecord displayName]):
        (-[WKWebsiteDataRecord dataTypes]):
        (-[WKWebsiteDataRecord _apiObject]):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
        (WebKit::wrapper):
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
        (toWebsiteDataRecords):
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-13  Jer Noble  <jer.noble@apple.com>

        [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
        https://bugs.webkit.org/show_bug.cgi?id=143674

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
        (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
        (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/ios/WebVideoFullscreenManager.h:
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
        (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.

2015-04-15  Antti Koivisto  <antti@apple.com>

        Network Cache: Inline small body data to record file
        https://bugs.webkit.org/show_bug.cgi?id=143783

        Reviewed by Chris Dumez.

        We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
        by inlining smaller resource bodies with the header.

        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::read):
        (WebKit::NetworkCache::IOChannel::readSync):
        (WebKit::NetworkCache::IOChannel::write):

            Add WorkQueue argument to allow specifying which queue the result is submitted to.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::decodeRecordMetaData):

            Add a boolean indicating whether the body is inlined.

        (WebKit::NetworkCache::decodeRecordHeader):
        (WebKit::NetworkCache::Storage::decodeRecord):
        (WebKit::NetworkCache::encodeRecordMetaData):
        (WebKit::NetworkCache::Storage::storeBodyAsBlob):
        (WebKit::NetworkCache::Storage::encodeRecord):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):

            Read the record first, then read the blob if needed.
            Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
            and that uses O_NONBLOCK.
            Process the read results in the IO work queue where we now do the blob retrieval.

        (WebKit::NetworkCache::shouldStoreBodyAsBlob):

            The current threshold for saving a separate blob is 16KB.

        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::createRecord): Deleted.
        (WebKit::NetworkCache::encodeRecordHeader): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-04-15  Tim Horton  <timothy_horton@apple.com>

        Non-local keyboards don't update scroll view parameters
        https://bugs.webkit.org/show_bug.cgi?id=143791
        <rdar://problem/18974020>

        * Platform/spi/ios/UIKitSPI.h:
        Fix the build.

2015-04-15  Tim Horton  <timothy_horton@apple.com>

        Non-local keyboards don't update scroll view parameters
        https://bugs.webkit.org/show_bug.cgi?id=143791
        <rdar://problem/18974020>

        Reviewed by Enrica Casucci.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
        (-[WKWebView _keyboardWillChangeFrame:]):
        (-[WKWebView _keyboardWillShow:]):
        Make sure that we update scroll view parameters (obscured insets, etc.)
        if we have a non-local keyboard, in addition to the cases where we have an assisted node.

2015-04-15  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
        https://bugs.webkit.org/show_bug.cgi?id=143786

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
        insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
        that we can check if the macro is already defined.
        * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
        replace the placeholder with a definition of __NSi_{current deployment target} if not
        already defined.

2015-04-14  Anders Carlsson  <andersca@apple.com>

        Make creating send rights from shared memory more robust
        https://bugs.webkit.org/show_bug.cgi?id=143730
        rdar://problem/16595870

        Reviewed by Darin Adler.

        This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
        to send more than 128 MB of shared memory in a single object.

        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::makeMemoryEntry):
        New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
        that memory objects larger than 128 MB will be handled correctly.

        (WebKit::SharedMemory::create):
        Call makeMemoryEntry.

        (WebKit::SharedMemory::createHandle):
        Call createSendRight.

        (WebKit::SharedMemory::createSendRight):
        Call makeMemoryEntry and add the necessary assertions.

2015-04-15  Eric Carlson  <eric.carlson@apple.com>

        Generalize "isPlayingAudio" to include other media characteristics
        https://bugs.webkit.org/show_bug.cgi?id=143713

        Reviewed by Jer Noble.

        * UIProcess/API/C/WKPage.cpp:
        (toGenericCallbackFunction): Scope CallbackBase.
        (WKPageForceRepaint): Ditto.
        (WKPageValidateCommand): Ditto.
        (WKPageComputePagesForPrinting): Ditto.

        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
        (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView becomeFirstResponder]): Ditto.
        (-[WKView updateFontPanelIfNeeded]): Ditto.
        (-[WKView validateUserInterfaceItem:]): Ditto.
        (-[WKView startSpeaking:]): Ditto.
        (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
        (-[WKView markedRangeWithCompletionHandler:]): Ditto.
        (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
        (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
        (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
        (-[WKView characterIndexForPoint:completionHandler:]): Ditto.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
        (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
        * UIProcess/WebPageProxy.h:

        * UIProcess/WebPageProxy.messages.in:

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.

        * UIProcess/mac/WKPrintingView.mm:
        (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
        (-[WKPrintingView _askPageToComputePageRects]): Ditto.
        (-[WKPrintingView _drawPreview:]): Ditto.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::setPluginIsPlayingAudio):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::isPlayingMediaDidChange):
        (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2015-04-15  Antti Koivisto  <antti@apple.com>

        Network Cache: Add thread-safe accessors for storage paths
        https://bugs.webkit.org/show_bug.cgi?id=143668

        Reviewed by Darin Adler.

        Less need to use StringCapture.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::dumpFilePath):
        (WebKit::NetworkCache::Cache::storagePath):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::makeRecordsDirectoryPath):
        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::basePath):
        (WebKit::NetworkCache::Storage::versionPath):
        (WebKit::NetworkCache::Storage::recordsPath):
        (WebKit::NetworkCache::Storage::synchronize):
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::Storage::finishReadOperation):
        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::clear):
        (WebKit::NetworkCache::Storage::shrink):
        (WebKit::NetworkCache::Storage::deleteOldVersions):
        (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
        (WebKit::NetworkCache::Storage::directoryPath): Deleted.

2015-04-14  Tim Horton  <timothy_horton@apple.com>

        Update gesture swipe shadow style
        https://bugs.webkit.org/show_bug.cgi?id=143616
        <rdar://problem/19295843>

        Reviewed by Darin Adler.

        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        For the modern shadow style, use a layer stretched along the edge of the swiping content
        with the newly added PNGs as the layer contents.

        Add a dimming layer over the lower layer of content which fades in/out
        during the swipe.

        (WebKit::ViewGestureController::handleSwipeGesture):
        Fade the dimming layer in and out during the entire swipe.
        Fade the shadow layer out during the last few pixels of the swipe.

        (WebKit::ViewGestureController::removeSwipeSnapshot):
        Unparent the new layers.

        * WebKit2.xcodeproj/project.pbxproj:
        * Resources/SwipeShadow.png:
        * Resources/SwipeShadow@2x.png:
        Add the new resources.

2015-04-14  Brian Weinstein  <bweinstein@apple.com>

        Add SPI to clear HSTS hosts added since a date.
        https://bugs.webkit.org/show_bug.cgi?id=143726
        and
        rdar://problem/16664597

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
        after the given date.
        * UIProcess/WebProcessPool.h:

2015-04-14  Anders Carlsson  <andersca@apple.com>

        More work on making the SharedMemory interface more sane
        https://bugs.webkit.org/show_bug.cgi?id=143718

        Reviewed by Andreas Kling.

        Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
        SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
        by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
        since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.

        * Platform/SharedMemory.h:
        (WebKit::SharedMemory::data):
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::allocate):
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::map):
        (WebKit::SharedMemory::~SharedMemory):
        (WebKit::SharedMemory::createHandle):

2015-04-14  Antti Koivisto  <antti@apple.com>

        Network Cache: Deduplicate body data
        https://bugs.webkit.org/show_bug.cgi?id=143652

        Reviewed by Darin Adler.

        It is common to have cache entries with identical body data. This happens when the same resource is loaded from
        a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
        referenced from different cache partitions.

        We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.

        This patch splits the body data out from the record file. The new record file contains meta data and response
        headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
        SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
        is reused by creating a hard link to it.

        The new disk structure looks like this:

        WebKitCache/
            Version 3/
                Blobs/
                    0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
                    0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
                    ...
                Records/
                    apple.com/
                        0B8645B04E7EC78C178B7460052601C2
                        0B8645B04E7EC78C178B7460052601C2-body
                        0CB1A3638D1C5A09C5E3283A74FA040B
                        0CB1A3638D1C5A09C5E3283A74FA040B-body
                        ...

        Each record file has an associated -body which is a hard link to a file in the Blobs directory.

        The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
        resources are used in multiple tabs.

        Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
        files and blobs used for larger files only.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::update):

            Adopt the new storage interface.

        (WebKit::NetworkCache::Cache::dumpContentsToFile):
        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
        (WebKit::NetworkCache::BlobStorage::BlobStorage):
        (WebKit::NetworkCache::BlobStorage::synchronize):

            Compute size and delete unused files from the Blobs directory (link count == 1).

        (WebKit::NetworkCache::BlobStorage::blobPath):
        (WebKit::NetworkCache::BlobStorage::add):
        (WebKit::NetworkCache::BlobStorage::get):

            Interface for storing and retrieving data blobs. Blobs are deduplicated on add.

        (WebKit::NetworkCache::BlobStorage::remove):

            Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().

        (WebKit::NetworkCache::BlobStorage::shareCount):

            Checks the link count to get the number of clients.

        * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
        (WebKit::NetworkCache::BlobStorage::approximateSize):
        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
        (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
        * NetworkProcess/cache/NetworkCacheCoders.h:
        * NetworkProcess/cache/NetworkCacheData.h:
        (WebKit::NetworkCache::Data::isEmpty):
        * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
        (WebKit::NetworkCache::Data::empty):
        (WebKit::NetworkCache::Data::fromMap):
        (WebKit::NetworkCache::mapFile):
        (WebKit::NetworkCache::computeSHA1):
        (WebKit::NetworkCache::bytesEqual):

            Add some helpers.

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::asJSON):
        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::IOChannel):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::makeRecordDirectoryPath):
        (WebKit::NetworkCache::makeBlobDirectoryPath):
        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::approximateSize):
        (WebKit::NetworkCache::Storage::synchronize):
        (WebKit::NetworkCache::partitionPathForKey):
        (WebKit::NetworkCache::recordPathForKey):
        (WebKit::NetworkCache::bodyPath):
        (WebKit::NetworkCache::decodeRecordMetaData):
        (WebKit::NetworkCache::decodeRecordHeader):
        (WebKit::NetworkCache::createRecord):
        (WebKit::NetworkCache::encodeRecordMetaData):
        (WebKit::NetworkCache::encodeRecordHeader):
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::Storage::updateFileModificationTime):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):

            Read both the blob and the record entry.

        (WebKit::NetworkCache::Storage::finishReadOperation):

            Factor to a function.

        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
        (WebKit::NetworkCache::Storage::dispatchWriteOperation):

            We don't need separate full write and header write paths anymore. Everything is treated
            as a full write and deduplication stops us writing the body again.

            This simplifies the code and data structures.

        (WebKit::NetworkCache::Storage::finishWriteOperation):

            Factor to a function.

        (WebKit::NetworkCache::Storage::clear):
        (WebKit::NetworkCache::deletionProbability):

            Take the sharing count into account when computing deletion probability.
            It is less useful to delete a record that shares its body with others as data won't get deleted.

        (WebKit::NetworkCache::Storage::shrinkIfNeeded):
        (WebKit::NetworkCache::Storage::shrink):
        (WebKit::NetworkCache::Storage::deleteOldVersions):
        (WebKit::NetworkCache::directoryPathForKey): Deleted.
        (WebKit::NetworkCache::filePathForKey): Deleted.
        (WebKit::NetworkCache::openFileForKey): Deleted.
        (WebKit::NetworkCache::decodeRecord): Deleted.
        (WebKit::NetworkCache::Storage::update): Deleted.

            No need for separate update interface anymore. Regular store() avoids unnecessary body write.

        (WebKit::NetworkCache::Storage::dispatchFullWriteOperation): Deleted.
        (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-14  Chris Dumez  <cdumez@apple.com>

        REGRESSION(r182603): [GTK] More than 500 crashes on the layout tests with the debug build.
        https://bugs.webkit.org/show_bug.cgi?id=143715

        Reviewed by Darin Adler.

        Enable assertions checking that calling editorState() does not cause a
        synchronous layout only on Mac and iOS. This assertion does not
        necessarily hold true on other ports as each one as its own
        platformEditorState() implementation. In particular, this assertion
        was being hit on GTK.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection):

2015-04-13  Alexey Proskuryakov  <ap@apple.com>

        Build fixes after r182772.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Make a CGSize, not an NSSize.
        (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Moved implementation
        to the correct place.
        (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Ditto.
        (-[WKView _layoutMode]): Use a memeber from _data directly, not via a method.

2015-04-13  Alexey Proskuryakov  <ap@apple.com>

        More build fix.

        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setDragImage):

2015-04-13  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL][GTK] Fix build break after r182753 
        https://bugs.webkit.org/show_bug.cgi?id=143689

        Reviewed by Anders Carlsson.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage):
        (IPC::Connection::sendOutgoingMessage):
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::allocate):
        (WebKit::accessModeMMap):
        (WebKit::SharedMemory::map):
        (WebKit::SharedMemory::create): Deleted.

2015-04-13  Alexey Proskuryakov  <ap@apple.com>

        Build fix.

        * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage):

2015-04-13  Anders Carlsson  <andersca@apple.com>

        Keep track of each shared memory object's protection when deciding whether to return our existing port
        https://bugs.webkit.org/show_bug.cgi?id=143687

        Reviewed by Tim Horton.

        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::machProtection):
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::map):
        (WebKit::SharedMemory::createHandle):

2015-04-13  Tim Horton  <timothy_horton@apple.com>

        Add a persistent, fixed scale factor to make it easy to scale down WK(Web)Views
        https://bugs.webkit.org/show_bug.cgi?id=143560
        <rdar://problem/16302047>

        Reviewed by Darin Adler.

        Add a new "view" scale factor to WKView and WKWebView.

        Unlike page scale (or "magnification" in the API), view scale:
            - persists between page loads
            - persists between Web process crashes
            - is not user adjustable
            - can reliably be < 1

        The page scale and view scale are multiplied together whenever we push
        a new page scale down into WebCore, so the implementation of view scale
        is transparent to WebCore, and acts effectively as a constant multiplier
        for the (user-adjustable) page scale factor.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scaleView):
        Add scaleView, which updates our cached viewScaleFactor and pushes it to the Web process.

        (WebKit::WebPageProxy::creationParameters):
        Plumb viewScaleFactor through the page creation parameters.

        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::viewScaleFactor): Added.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        If the viewScaleFactor is not 1 at creation time, call scalePage with a page scale of 1.
        Internally, scalePage will multiply in the viewScaleFactor and push it all to the Web process.

        (WebKit::WebPage::scalePage):
        Multiply the page scale factor by the view scale factor before passing it to WebCore.

        (WebKit::WebPage::scalePageInViewCoordinates):
        Early returns need to check the total scale, not just the new page scale.

        (WebKit::WebPage::totalScaleFactor):
        The scale that we get back from WebCore::Page::pageScaleFactor is the product
        of WebKit2's view and page scales. So, here we'll call that the totalScaleFactor.
        (Might need a different name because it seems like "total" should include deviceScale too).

        (WebKit::WebPage::pageScaleFactor):
        WebKit2's notion of the pageScaleFactor does not include the view scale, so
        divide it out of WebCore's page scale.

        (WebKit::WebPage::scaleView):
        Apply a new view scale, maintaining the current scroll position.

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::viewScaleFactor):
        * WebProcess/WebPage/WebPage.messages.in:

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        Plumb viewScaleFactor through the page creation parameters.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _viewScale]):
        (-[WKWebView _setViewScale:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _viewScale]):
        (-[WKView _setViewScale:]):
        Push the new view scale to WebPage.

        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
        (-[WKWebView _automaticallyComputesFixedLayoutSizeFromViewScale]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView setFrameSize:]):
        (-[WKView _updateAutomaticallyComputedFixedLayoutSize]):
        (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
        (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]):
        * UIProcess/API/mac/WKViewInternal.h:
        Add a new layout mode, "DynamicSizeComputedFromViewScale",
        which turns on fixed layout size mode, and sets the fixed layout size
        based on the view's frame and view scale. The fixed layout size is maintained
        as the frame of the view scaled by the inverse of the view scale. This
        makes it very easy to maintain a WK(Web)View that is scaled down by
        a constant amount, but is laid out as if it were not.
        
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
        Because the transient zoom mechanism touches layers that WebCore owns,
        it mostly need to operate with totalScaleFactor, because that is what WebCore sees.

2015-04-10  Brent Fulgham  <bfulgham@apple.com>

        Expand test infrastructure to support scrolling tests
        https://bugs.webkit.org/show_bug.cgi?id=143286
        <rdar://problem/20375516>

        Reviewed by Simon Fraser.

        Extend the WK2 testing API to include a method for setting a JSC callback function to be triggered
        by the new WebCore::WheelEventTestTrigger singleton.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageStartMonitoringScrollOperations): WK2 method that causes the testing system to begin tracking wheel events.
        (WKBundlePageRegisterScrollOperationCompletionCallback): WK2 method to set the callback function for testing.
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:

2015-04-13  Enrica Casucci  <enrica@apple.com>

        Clients of WKWebView should be able to override drag functions.
        https://bugs.webkit.org/show_bug.cgi?id=143618

        Reviewed by Darin Adler.

        WKWebView now implements the drag protocol functions and
        forwards the calls to the inner WKView.
        In the page client, when we receive a request to start drag
        from the WebProcess, we call _dragImageForView in WKView with
        the target view. The function calls dragImage on the given view,
        so that its clients can override the dragImage function.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView draggingEntered:]):
        (-[WKWebView draggingUpdated:]):
        (-[WKWebView draggingExited:]):
        (-[WKWebView prepareForDragOperation:]):
        (-[WKWebView performDragOperation:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _dragImageForView:withImage:at:linkDrag:]):
        (-[WKView _setDragImage:at:linkDrag:]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setDragImage):

2015-04-13  Alex Christensen  <achristensen@webkit.org>

        [iOS] Unreviewed build fix after r182760.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::encodeSharedBuffer):
        (IPC::decodeSharedBuffer):
        Update SharedMemory function names.

2015-04-13  Anders Carlsson  <andersca@apple.com>

        Rename SharedMemory::create overloads
        https://bugs.webkit.org/show_bug.cgi?id=143679

        Reviewed by Beth Dakin.

        Rename the SharedMemory::create overload that allocates memory to SharedMemory::allocate,
        and the SharedMemory::create overload that maps in a handle to SharedMemory::map.

        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::allocate):
        (WebKit::SharedMemory::map):
        (WebKit::SharedMemory::create): Deleted.
        * Shared/ShareableBitmap.cpp:
        (WebKit::ShareableBitmap::createShareable):
        (WebKit::ShareableBitmap::create):
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::create):
        * Shared/ShareableResource.h:
        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
        * Shared/WebCompiledContentExtensionData.cpp:
        (WebKit::WebCompiledContentExtensionData::decode):
        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::Data):
        (WebKit::WebHitTestResult::Data::decode):
        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
        (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
        (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
        * UIProcess/VisitedLinkProvider.cpp:
        (WebKit::VisitedLinkProvider::resizeTable):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::dataSelectionForPasteboard):
        (WebKit::WebPageProxy::setPromisedDataForImage):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::writeItemsToPasteboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::bufferForType):
        (WebKit::WebPlatformStrategies::setBufferForType):
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::WebDragClient::declareAndWriteDragImage):
        * WebProcess/WebPage/VisitedLinkTableController.cpp:
        (WebKit::VisitedLinkTableController::setVisitedLinkTable):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::getDataSelectionForPasteboard):

2015-04-13  Brady Eidson  <beidson@apple.com>

        Share sheets from Share menus appear outside the browser window.
        <rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620

        Reviewed by Darin Adler.

        Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::internalShowContextMenu):
        (WebKit::WebPageProxy::platformInitializeShareMenuItem):
        * UIProcess/WebPageProxy.h:

        * UIProcess/mac/WKSharingServicePickerDelegate.h: Added.
        * UIProcess/mac/WKSharingServicePickerDelegate.mm: Added.
        (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
        (-[WKSharingServicePickerDelegate menuProxy]):
        (-[WKSharingServicePickerDelegate setMenuProxy:]):
        (-[WKSharingServicePickerDelegate setPicker:]):
        (-[WKSharingServicePickerDelegate setFiltersEditingServices:]):
        (-[WKSharingServicePickerDelegate setHandlesEditingReplacement:]):
        (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
        (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
        (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
        (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):

        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::setupServicesMenu):
        (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]): Deleted.
        (-[WKSharingServicePickerDelegate menuProxy]): Deleted.
        (-[WKSharingServicePickerDelegate setMenuProxy:]): Deleted.
        (-[WKSharingServicePickerDelegate setPicker:]): Deleted.
        (-[WKSharingServicePickerDelegate setIncludeEditorServices:]): Deleted.
        (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]): Deleted.
        (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]): Deleted.
        (-[WKSharingServicePickerDelegate sharingService:willShareItems:]): Deleted.
        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Deleted.
        (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]): Deleted.

        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::platformInitializeShareMenuItem):

        * WebKit2.xcodeproj/project.pbxproj:

2015-04-13  Anders Carlsson  <andersca@apple.com>

        Begin cleaning up the shared memory interface
        https://bugs.webkit.org/show_bug.cgi?id=143677

        Reviewed by Andreas Kling.

        Rename createFromVMBuffer to create and add a protection parameter (which is currently unused).
        Also, turn SharedMemory::Protection into a proper enum class.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::tryGetShareableHandleFromCFData):
        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::create):
        (WebKit::machProtection):
        (WebKit::SharedMemory::createHandle):
        (WebKit::SharedMemory::createFromVMBuffer): Deleted.
        * Shared/ContextMenuContextData.cpp:
        (WebKit::ContextMenuContextData::encode):
        (WebKit::ContextMenuContextData::decode):
        * Shared/ShareableBitmap.h:
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::create):
        (WebKit::ShareableResource::createHandle):
        * Shared/WebCompiledContentExtensionData.cpp:
        (WebKit::WebCompiledContentExtensionData::encode):
        (WebKit::WebCompiledContentExtensionData::decode):
        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::encode):
        (WebKit::WebHitTestResult::Data::decode):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::createExtension):
        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
        (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
        (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
        (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
        * UIProcess/VisitedLinkProvider.cpp:
        (WebKit::VisitedLinkProvider::sendTable):
        * UIProcess/mac/WKPrintingView.mm:
        (pageDidDrawToImage):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::dataSelectionForPasteboard):
        (WebKit::WebPageProxy::setPromisedDataForImage):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::writeItemsToPasteboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::bufferForType):
        (WebKit::WebPlatformStrategies::setBufferForType):
        (WebKit::WebPlatformStrategies::readBufferFromPasteboard):
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::WebDragClient::declareAndWriteDragImage):
        * WebProcess/WebPage/VisitedLinkTableController.cpp:
        (WebKit::VisitedLinkTableController::setVisitedLinkTable):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::takeSnapshot):
        (WebKit::WebPage::drawRectToImage):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::getDataSelectionForPasteboard):

2015-04-10  Jon Honeycutt  <jhoneycutt@apple.com>

        Cannot click "Next" button on Google two-factor auth setup page

        <https://bugs.webkit.org/show_bug.cgi?id=143624>
        <rdar://problem/19175714>

        This issue occurs when this site focuses the submit button. When it
        receives focus, we try to assist it. While we consider ourselves to be
        assisting it, we ignore further gesture inputs for that node, including
        the tap gesture.

        To fix this, only assist input types that we know are assistable,
        including text fields, select and date elements, etc.

        Reviewed by Darin Adler.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (isAssistableInputType):
        If the type is a known-assistable type, return true.
        (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
        Call isAssistableInputType() to determine whether we should do any kind
        of assistance for this node.

2015-04-13  Beth Dakin  <bdakin@apple.com>

        Add force property to MouseEvents
        https://bugs.webkit.org/show_bug.cgi?id=143569
        -and corresponding-
        rdar://problem/20472954

        Reviewed by Darin Adler.

        In order to accommodate adding force to all PlatformMouseEvents, we have to add it 
        to pass a caches pressure event to NativeWebMouseEvent and add force to 
        WebMouseEvent.

        NativeWebMouseEvent now requires a second NSEvent for the pressureEvent. 
        * Shared/NativeWebMouseEvent.h:

        WebMouseEvent takes a force parameter.
        * Shared/WebEvent.h:
        (WebKit::WebMouseEvent::force):
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
        * Shared/WebMouseEvent.cpp:
        (WebKit::WebMouseEvent::WebMouseEvent):
        (WebKit::WebMouseEvent::encode):
        (WebKit::WebMouseEvent::decode):
        * Shared/mac/NativeWebMouseEventMac.mm:
        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
        * Shared/mac/WebEventFactory.h:
        * Shared/mac/WebEventFactory.mm:
        (WebKit::WebEventFactory::createWebMouseEvent):

        Cache the most recent pressureEvent in _data so that it can be sent along to the 
        NativeWebMouseEvent constructor.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):
        (-[WKView acceptsFirstMouse:]):
        (-[WKView shouldDelayWindowOrderingForEvent:]):
        (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
        (-[WKView initWithFrame:processPool:configuration:webView:]):

        WebMouseEvent takes a force parameter.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::showContextMenuAtPoint):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::createWebEvent):

        MouseEvent and PlatformMouseEvent both take force parameters too.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::navigateToURLWithSimulatedClick):
        (WebKit::WebPage::contextMenuAtPointInWindow):
        (WebKit::WebPage::dragEnded):
        (WebKit::WebPage::simulateMouseDown):
        (WebKit::WebPage::simulateMouseUp):
        (WebKit::WebPage::simulateMouseMotion):

        The functions that dispatch the force events no longer take a PlatformMouseEvent 
        as a parameter.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::inputDeviceForceDidChange):
        (WebKit::WebPage::immediateActionDidCancel):

2015-04-13  Andreas Kling  <akling@apple.com>

        Don't segregate heap objects based on Structure immortality.
        <https://webkit.org/b/143638>

        Reviewed by Darin Adler.

        * WebProcess/Plugins/Netscape/JSNPObject.h:

2015-04-13  Timothy Horton  <timothy_horton@apple.com>

        javascript: links in inline PDFs shouldn't execute JavaScript in the context of the host website
        https://bugs.webkit.org/show_bug.cgi?id=143642
        <rdar://problem/18259355>

        Reviewed by Darin Adler.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::clickedLink):
        Don't follow javascript: URLs.

2015-04-10  Alex Christensen  <achristensen@webkit.org>

        [Content Extensions] Don't unmap shared memory while using it.
        https://bugs.webkit.org/show_bug.cgi?id=143625

        Reviewed by Darin Adler.

        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
        * Shared/WebCompiledContentExtensionData.h:
        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::createExtension):
        Keep the Data object alive as long as the SharedMemory that uses it.

2015-04-12  Darin Adler  <darin@apple.com>

        [Cocoa] Localizable strings are inconsistent and need to be regenerated
        https://bugs.webkit.org/show_bug.cgi?id=143661

        Reviewed by Dan Bernstein.

        * UIProcess/WebEditCommandProxy.cpp:
        (WebKit::WebEditCommandProxy::nameForEditAction): Also added a comment
        about the fact that we have two copies of all the localizable strings.

2015-04-12  Sungmann Cho  <sungmann.cho@navercorp.com>

        Fix trival typos related to the word "coordinate".
        https://bugs.webkit.org/show_bug.cgi?id=143644

        Reviewed by Alexey Proskuryakov.

        No new tests, no behavior change.

        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::encode):
        (WebKit::WebHitTestResult::Data::decode):
        * Shared/WebHitTestResult.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        (WebKit::WebPage::lookupTextAtLocation):

2015-04-12  Sungmann Cho  <sungmann.cho@navercorp.com>

        Remove PluginModuleInfo.cpp from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=143643

        Reviewed by Darin Adler.

        Remove PluginModuleInfo.cpp from WebKit2 because it is totally empty.

        No new tests, no behavior change.

        * CMakeLists.txt:
        * Shared/Plugins/PluginModuleInfo.cpp: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2015-04-11  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Enable Symbol in web pages
        https://bugs.webkit.org/show_bug.cgi?id=143375

        Reviewed by Ryosuke Niwa.

        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

2015-04-08  Sam Weinig  <sam@webkit.org>

        Allow LaunchServices to handle URLs on link navigations
        <rdar://problem/19446826>
        https://bugs.webkit.org/show_bug.cgi?id=143544

        Reviewed by Anders Carlsson.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::tryAppLink):
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
        Only let LaunchServices have a crack at the URL if the navigation is:
            1) a main frame navigation
            2) a result of a user gesture

2015-04-10  Tim Horton  <timothy_horton@apple.com>

        Replace setFixedLayoutSizeEnabled: with an enum of layout modes
        https://bugs.webkit.org/show_bug.cgi?id=143576

        Reviewed by Simon Fraser.

        * UIProcess/API/C/WKLayoutMode.h: Added.
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _layoutMode]):
        (-[WKWebView _setLayoutMode:]):
        (-[WKWebView _isFixedLayoutEnabled]): Deleted.
        (-[WKWebView _setFixedLayoutEnabled:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _layoutMode]):
        (-[WKView _setLayoutMode:]):
        (-[WKView _isFixedLayoutEnabled]): Deleted.
        (-[WKView _setFixedLayoutEnabled:]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:
        Add enums for "layout mode". Currently we have two values: "ViewSize",
        which is the normal behavior, and "FixedSize", which is fixed layout mode.
        More values will come in the future.

2015-04-10  Anders Carlsson  <andersca@apple.com>

        _WKWebsiteDataStore doesn't track and remove offline application cache entries
        https://bugs.webkit.org/show_bug.cgi?id=143614
        rdar://problem/20243235

        Reviewed by Andreas Kling.

        * Shared/WebsiteData/WebsiteDataTypes.h:
        Add WebsiteDataTypeOfflineWebApplicationCache.

        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
        (dataTypesToString):
        * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        Add WKWebsiteDataTypeOfflineWebApplicationCache.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        Create a custom application cache storage and fetch the origins from it.

        (WebKit::WebsiteDataStore::removeData):
        Delete either all the cache entries (since we don't track time in the application cache),
        or the ones specified by the given entries.

2015-04-10  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Refactor MediaPlaybackTarget
        https://bugs.webkit.org/show_bug.cgi?id=143571

        Reviewed by Jer Noble.

        Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
        * Shared/WebCoreArgumentCoders.h:
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
        * Shared/mac/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
        (IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
        (IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.

2015-04-10  Hunseop Jeong  <hs85.jeong@samsung.com>

        Fix some minor typos related to the WebProcessCreationParameter. 
        https://bugs.webkit.org/show_bug.cgi?id=143598

        Reviewed by Csaba Osztrogonác.

        No new tests, no behavior change.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2015-04-09  Andy Estes  <aestes@apple.com>

        [Cocoa] Add a HAVE(AVKIT) and use it
        https://bugs.webkit.org/show_bug.cgi?id=143593

        Reviewed by David Kilzer.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
        (WebKit::WebPageProxy::reattachToWebProcess): Ditto.
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
        the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).

2015-04-09  Hunseop Jeong  <hs85.jeong@samsung.com>

        Use modern loops in WebProcess 
        https://bugs.webkit.org/show_bug.cgi?id=143302

        Reviewed by Darin Adler.

        Use modern range for-loops in WebProcess.

        No new tests, no behavior change.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection):
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::focusedWebPage):
        (WebKit::WebProcess::webPageGroup):
        (WebKit::WebProcess::setTextCheckerState):
        (WebKit::WebProcess::resetAllGeolocationPermissions):

2015-04-09  Gordon Sheridan  <gordon_sheridan@apple.com>

        Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
        https://bugs.webkit.org/show_bug.cgi?id=143517.

        Reviewed by Brady Eidson.

        * UIProcess/WebIconDatabase.messages.in:
        Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::connectionDidClose):
        Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.

        (WebKit::WebProcessProxy::retainIconForPageURL):
        Track retain counts for page URLs and call through to WebIconDatabase.

        (WebKit::WebProcessProxy::releaseIconForPageURL):
        Ditto.

        (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
        Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.

        * UIProcess/WebProcessProxy.h:
        Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
        Declare hash map to track number of retains per page URL.

        * UIProcess/WebProcessProxy.messages.in:
        Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.

        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
        (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
        Modify the receiver of the message to be WebProcessProxy.

        (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
        Ditto.

2015-04-09  Chris Dumez  <cdumez@apple.com>

        [WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure handler before suspending
        https://bugs.webkit.org/show_bug.cgi?id=143575
        <rdar://problem/20484338>

        Reviewed by Andreas Kling.

        After r182194, the NetworkProcess is calling the memory pressure
        handler before getting suspended to free-up as much memory as possible
        at this point.

        However, we were calling the default memory pressure handling code
        instead of the custom handler registered by the NetworkProcess. This
        patch fixes the problem.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::lowMemoryHandler):
        (WebKit::NetworkProcess::initializeNetworkProcess):
        (WebKit::NetworkProcess::processWillSuspend):
        * NetworkProcess/NetworkProcess.h:

2015-04-09  Brady Eidson  <beidson@apple.com>

        REGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying an image
        rdar://problem/20486551 and https://bugs.webkit.org/show_bug.cgi?id=143574

        Reviewed by Brent Fulgham.

        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::Data): Clear up a name scoping issue.

2015-04-09  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] editorState() should not cause a synchronous layout
        https://bugs.webkit.org/show_bug.cgi?id=142536
        <rdar://problem/20041506>

        Reviewed by Enrica Casucci.

        platformEditorState() on iOS does a synchronous layout to compute some
        of the EditorState members (e.g. caretRectAtStart / caretRectAtEnd).
        This is bad for performance as this is called every time the selection
        is changed (which happens for e.g. when you set the value of a focused
        HTMLInputElement).

        This patch updates the behavior on iOS to only send a partial EditorState
        on selection change so that the UIProcess gets most of the information
        (the ones that do not require style recalc or layout) ASAP. A full Editor
        state is then sent after the asynchronous layout is done.

        With this change, I see a 38% improvement on Speedometer (26.4 +/- 0.37
        -> 36.5 +/- 0.54) on iPhone 6 Plus.

        * Shared/EditorState.cpp:
        (WebKit::EditorState::encode):
        (WebKit::EditorState::decode):
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:
        (WebKit::EditorState::EditorState): Deleted.
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _didCommitLayerTree:]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
        (-[WKContentView webSelectionRects]):
        (-[WKContentView _addShortcut:]):
        (-[WKContentView selectedText]):
        (-[WKContentView isReplaceAllowed]):
        (-[WKContentView _promptForReplace:]):
        (-[WKContentView _transliterateChinese:]):
        (-[WKContentView textStylingAtPosition:inDirection:]):
        (-[WKContentView canPerformAction:withSender:]):
        (-[WKContentView _showDictionary:]):
        (-[WKContentView _characterBeforeCaretSelection]):
        (-[WKContentView _characterInRelationToCaretSelection:]):
        (-[WKContentView _selectionAtDocumentStart]):
        (-[WKContentView selectedTextRange]):
        (-[WKContentView hasContent]):
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::didChangeSelectionAndUpdateLayout):
        * WebProcess/WebCoreSupport/WebEditorClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):
        (WebKit::WebPage::didChangeSelection):
        (WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/efl/WebPageEfl.cpp:
        (WebKit::WebPage::platformEditorState):
        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
        (WebKit::WebPage::platformEditorState):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::platformEditorState):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformEditorState):

2015-04-09  Antti Koivisto  <antti@apple.com>

        Network Cache: Crash in WebCore::CachedResource::tryReplaceEncodedData
        https://bugs.webkit.org/show_bug.cgi?id=143562

        Reviewed by Anders Carlsson.

        If another thread comes and truncates the file before we map it we end up with a map that crashes when accessed.

        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::IOChannel):

            When creating a new file unlink any existing file instead of using O_TRUNC.

2015-04-09  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
        https://bugs.webkit.org/show_bug.cgi?id=142907

        Unreviewed typo fix after r182595.

        * PlatformGTK.cmake:

2015-04-09  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
        https://bugs.webkit.org/show_bug.cgi?id=142907

        Reviewed by Carlos Garcia Campos.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.

2015-04-08  Joseph Pecoraro  <pecoraro@apple.com>

        Exception in console and broken right click after attempting to show context menu in Inspector
        https://bugs.webkit.org/show_bug.cgi?id=143556

        Reviewed by Brady Eidson.

        * Shared/mac/NativeContextMenuItem.mm:
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):
        Add an ASSERT to immediately catch a menu item created with a nil native menu item.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::internalShowContextMenu):
        Gracefully handle a null share context menu item.

2015-04-08  Brent Fulgham  <bfulgham@apple.com>

        [Mac] Unreviewed test fix after r182584
        https://bugs.webkit.org/show_bug.cgi?id=143452

        Correct bit comparison to use the correct value for the Control-key

        * Shared/mac/WebEventFactory.mm:
        (WebKit::typeForEvent):

2015-04-08  Jaehun Lim  <ljaehun.lim@samsung.com>

        [EFL] Create PageUIClientEfl after sending CreateWebPage message
        https://bugs.webkit.org/show_bug.cgi?id=143514

        Reviewed by Gyuyoung Kim.

        UIProcess sends some messages to WebPage before WebPage is created. It makes some error logs on debug build.
        So this patch moves the initialization of m_pageUIClient after calling WKViewInitialize().

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):

2015-04-08  Brent Fulgham  <bfulgham@apple.com>

        [Mac] WebKit is not honoring OS preferences for secondary click behaviors
        https://bugs.webkit.org/show_bug.cgi?id=143452
        <rdar://problem/20437483>

        Reviewed by Tim Horton.

        We cannot rely on the event's button number to decide behavior. The OS settings might have
        mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
        the proper button press behavior is.

        * Shared/mac/WebEventFactory.mm:
        (WebKit::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.

2015-04-08  Brady Eidson  <beidson@apple.com>

        Expose the "Share" menu for links, images, and media.
        <rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502

        Reviewed by Tim Horton.

        * Shared/ContextMenuContextData.cpp:
        (WebKit::ContextMenuContextData::ContextMenuContextData):

        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::Data):
        * Shared/WebHitTestResult.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::internalShowContextMenu):

        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::shareMenuItem):
        * WebProcess/WebCoreSupport/WebContextMenuClient.h:

        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): Deleted.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):

2015-04-08  Anders Carlsson  <andersca@apple.com>

        Add encoding and decoding of ints to WKRemoteObjectCoder
        https://bugs.webkit.org/show_bug.cgi?id=143538

        Reviewed by Tim Horton.

        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (-[WKRemoteObjectEncoder encodeInt:forKey:]):
        (-[WKRemoteObjectDecoder decodeIntForKey:]):

2015-04-08  Anders Carlsson  <andersca@apple.com>

        Delete ApplicationCache static member functions
        https://bugs.webkit.org/show_bug.cgi?id=143534

        Reviewed by Tim Horton.

        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
        (WebKit::WebApplicationCacheManager::deleteAllEntries):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::clearApplicationCacheForOrigin):
        (WebKit::InjectedBundle::appCacheUsageForOrigin):

2015-04-08  Enrica Casucci  <enrica@apple.com>

        32-bit build fix after r182554.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView resignFirstResponder]):

2015-04-08  Beth Dakin  <bdakin@apple.com>

        Force events should not require preventDefault in order to fire
        https://bugs.webkit.org/show_bug.cgi?id=143503
        -and corresponding-
        rdar://problem/20458916

        Reviewed by Tim Horton.

        We no longer need m_lastActionMenuHitTestPreventsDefault since we’ll always 
        dispatch the events to Element.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        (WebKit::WebPage::inputDeviceForceDidChange):
        (WebKit::WebPage::immediateActionDidCancel):

2015-04-08  Enrica Casucci  <enrica@apple.com>

        Calling makeFirstResponder on WKWebView doesn't work.
        https://bugs.webkit.org/show_bug.cgi?id=143482
        rdar://problem/20298166

        Reviewed by Dan Bernstein.

        Adding forwarding of the responder status to the WKView.
        We also need to avoid doing any cleanup in resignFirstResponder
        if we know we are about to regain responder status again.
        Same goes for becomeFirstResponder.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView becomeFirstResponder]):
        (-[WKWebView acceptsFirstResponder]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView becomeFristResponder]):
        (-[WKView resignFirstResponder]):

2015-04-07  Tim Horton  <timothy_horton@apple.com>

        Fix the build.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _setFixedLayoutSize:]):

2015-04-07  Tim Horton  <timothy_horton@apple.com>

        Expose and test fixedLayoutSize via modern WebKit SPI
        https://bugs.webkit.org/show_bug.cgi?id=143500

        Reviewed by Simon Fraser.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _isFixedLayoutEnabled]):
        (-[WKWebView _setFixedLayoutEnabled:]):
        (-[WKWebView _fixedLayoutSize]):
        (-[WKWebView _setFixedLayoutSize:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _isFixedLayoutEnabled]):
        (-[WKView _setFixedLayoutEnabled:]):
        (-[WKView _fixedLayoutSize]):
        (-[WKView _setFixedLayoutSize:]):
        Add API for adjusting the fixed layout size, and whether or not we use it.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
        Repair a mistake I made in r139822, where I brought odd TILED_BACKING_STORE-only
        logic (which disables scrollbars if fixedLayoutSize is enabled) to the rest of the ports.
        Put it back as TILED_BACKING_STORE-only.

        Persist the fixedLayoutSize through view creation; we already persist the enabled state,
        but not the size, which doesn't make any sense.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::fixedLayoutSize):
        * WebProcess/WebPage/WebPage.h:
        Add a fixedLayoutSize() getter.

2015-04-07  Brady Eidson  <beidson@apple.com>

        ContextMenuItem refactoring
        https://bugs.webkit.org/show_bug.cgi?id=143485

        Reviewed by Beth Dakin.

        * Shared/mac/NativeContextMenuItem.mm:
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):

2015-04-07  Simon Fraser  <simon.fraser@apple.com>

        Add a new setting, AntialiasedFontDilationEnabled, exposed via WK2.
        https://bugs.webkit.org/show_bug.cgi?id=143495

        Reviewed by Tim Horton.
        
        Exposed the antialiasedFontDilationEnabled setting via WK C SPI and Objective-C SPI.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAntialiasedFontDilationEnabled):
        (WKPreferencesGetAntialiasedFontDilationEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _antialiasedFontDilationEnabled]):
        (-[WKPreferences _setAntialiasedFontDilationEnabled:]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-04-07  Beth Dakin  <bdakin@apple.com>

        Should only propagate pressure events with relevant phases
        https://bugs.webkit.org/show_bug.cgi?id=143494
        -and corresponding-
        rdar://problem/20453738

        Reviewed by Tim Horton.

        We only care about the changed, began, and ended phases. 
        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):

2015-04-07  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix; make calls to new SPI conditional on iOS version.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):

2015-04-06  Anders Carlsson  <andersca@apple.com>

        Create the web inspector process pool lazily
        https://bugs.webkit.org/show_bug.cgi?id=143456
        rdar://problem/20146520

        Reviewed by Mark Lam.

        Add and implement WebInspectorProxy::isInspectorProcessPool instead of always creating the inspector process pool
        when trying to determine if a given process pool is the inspector process pool.

        This should speed up initialization somewhat and avoid creating a storage manager for example.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::inspectorProcessPool):
        (WebKit::WebInspectorProxy::isInspectorProcessPool):
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::getLaunchOptions):

2015-04-06  Brady Eidson  <beidson@apple.com>

        Combine ActionMenuHitTestResult with WebHitTestResult
        https://bugs.webkit.org/show_bug.cgi?id=143444

        Reviewed by Beth Dakin.

        * Shared/mac/ActionMenuHitTestResult.h: Removed.
        * Shared/mac/ActionMenuHitTestResult.mm: Removed.

        * Shared/WebHitTestResult.cpp:
        (WebKit::WebHitTestResult::Data::Data):
        (WebKit::WebHitTestResult::Data::encode):
        (WebKit::WebHitTestResult::Data::decode):
        (WebKit::WebHitTestResult::Data::platformEncode):
        (WebKit::WebHitTestResult::Data::platformDecode):
        * Shared/WebHitTestResult.h:
        * Shared/mac/WebHitTestResult.mm: Added.
        (WebKit::WebHitTestResult::Data::platformEncode):
        (WebKit::WebHitTestResult::Data::platformDecode):

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]):
        (-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didPerformActionMenuHitTest):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformActionMenuHitTest):
        * UIProcess/mac/WKActionMenuController.h:
        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController willDestroyView:]):
        (-[WKActionMenuController _clearActionMenuState]):
        (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
        (-[WKActionMenuController _hitTestResultDataImage]):
        (-[WKActionMenuController _defaultMenuItemsForImage]):
        (-[WKActionMenuController _copyImage:]):
        (-[WKActionMenuController _addImageToPhotos:]):
        (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
        (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
        (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
        (-[WKActionMenuController _webHitTestResult]):
        (-[WKActionMenuController _defaultMenuItems]):
        (-[WKActionMenuController _hitTestResultImage]): Deleted.
        * UIProcess/mac/WKImmediateActionController.h:
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController willDestroyView:]):
        (-[WKImmediateActionController _clearImmediateActionState]):
        (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]):
        (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
        (-[WKImmediateActionController _webHitTestResult]):
        (-[WKImmediateActionController _defaultAnimationController]):
        (-[WKImmediateActionController _updateImmediateActionItem]):
        (-[WKImmediateActionController _menuItemForDataDetectedText]):
        (-[WKImmediateActionController _animationControllerForText]):
        (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):

2015-04-06  Jer Noble  <jer.noble@apple.com>

        Synchronize fullscreen animation between processes.
        https://bugs.webkit.org/show_bug.cgi?id=143131

        Reviewed by Simon Fraser.

        Support synchronize resizing by animating within the UIProcess. Since setVideoLayerFrameFenced() is now only
        ever called from within a 0-duration transaction, make that the official contract of the function and wrap
        the WebProcess side of that method in its own 0-duration transaction.

        * Platform/spi/ios/BackBoardServicesSPI.h: Added.
        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Remember the initial rect.
        (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Added; simple getter.
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): Use a different synchronization fence primative.
            Save the cached frame value.
        (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Added; simple getter.
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity): Save the cached gravity value.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): Wrap in a 0-length transaction.

2015-04-06  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
        https://bugs.webkit.org/show_bug.cgi?id=143451
        <rdar://problem/20437994>

        Reviewed by Anders Carlsson.

        Initialize WebProcess::m_webSQLiteDatabaseTracker and
        NetworkProcess::m_webSQLiteDatabaseTracker in their respective class
        constructors instead of doing it later in the initializeWebProcess() /
        initializeNetworkProcess() methods.

        If we do it later, it can happen that the tracker gets set after
        a SQLiteTransactionInProgressAutoCounter initialization and before
        the actual transaction. When this happens, the
        SQLiteTransactionInProgressAutoCounter variable fails to increment the
        transaction count. Then when the transaction is executed,
        SQLiteDatabaseTracker::hasTransactionInProgress() can return false.
        This would lead to possible assertions on start up on iOS.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::NetworkProcess):
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcess.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        (WebKit::WebProcess::initializeConnection):
        * WebProcess/WebProcess.h:

2015-04-06  Beth Dakin  <bdakin@apple.com>

        https://trac.webkit.org/changeset/182338 introduced a build failure that I 
        attempted to fix with https://trac.webkit.org/changeset/182341 , but that disabled 
        the feature accidentally.  This should do the right thing.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):

2015-04-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r182296.
        https://bugs.webkit.org/show_bug.cgi?id=143448

        This will disturb network cache efficacy logging, we should
        reland this later. (Requested by cdumez__ on #webkit).

        Reverted changeset:

        "[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key"
        https://bugs.webkit.org/show_bug.cgi?id=143348
        http://trac.webkit.org/changeset/182296

2015-04-06  Žan Doberšek  <zdobersek@igalia.com>

        [WK2] API::Array::copy() should move the resulting Vector<> of copies into the Array::create() call
        https://bugs.webkit.org/show_bug.cgi?id=143413

        Reviewed by Darin Adler.

        Move the Vector<> object containing the copied elements into the Array::create()
        call, avoiding copying all the elements again.

        While here, change the Vector<> parameters for Array::create() and the Array
        constructor to rvalue references. This will ensure that the passed-in object
        is moved into the Array::create() call if possible, or explicitly copied
        otherwise. The constructor is moved into the header for inlining opportunities
        and the unnecessary parameter in the create(Vector<>&&) method declaration
        removed.

        * Shared/API/APIArray.cpp:
        (API::Array::create):
        (API::Array::copy):
        (API::Array::Array): Deleted.
        * Shared/API/APIArray.h:

2015-04-06  Žan Doberšek  <zdobersek@igalia.com>

        UserScript, UserStyleSheet constructors should take in Vector<String> rvalues
        https://bugs.webkit.org/show_bug.cgi?id=143411

        Reviewed by Darin Adler.

        Move the whitelist and blacklist Vector<String> objects into the
        UserScript and UserStyleSheet constructors in ArgumentCoder<T>::decode
        functions.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<UserStyleSheet>::decode):
        (IPC::ArgumentCoder<UserScript>::decode):

2015-04-05  Darin Adler  <darin@apple.com>

        [Mac] Spins seen in WKSetApplicationInformationItem, so it should not be called on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=143423
        rdar://problem/18773785

        Reviewed by Alexey Proskuryakov.

        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::origin): Factored out this helper function from updateActivePages below, so
        the function below is easier to read.
        (WebKit::WebProcess::updateActivePages): Refactored to use the new origin function.
        Use dispatch_async to call WKSetApplicationInformationItem without blocking.

2015-04-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Use constants of sqlite3 directly for status of SQL result in webdatabase
        https://bugs.webkit.org/show_bug.cgi?id=143329

        Reviewed by Darin Adler.

        In webdatabase, it has used own constant variables as well as using sqlite3 constants directly.
        If sqlite3 constants are changed in the library, we should modify many files as well. Besides
        it can cause to use if~else statement which consumes more cpu cycles compared to switch~case.

        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
        (WebKit::SQLiteIDBCursor::createSQLiteStatement):
        (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
        (WebKit::SQLiteIDBCursor::bindArguments):
        (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::createOrMigrateRecordsTableIfNecessary):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::executeSQLStatement):
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::queryWasEverRequested):
        (WebKit::NetworkCache::Statistics::addHashesToDatabase):
        (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::importItems):
        (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
        (WebKit::LocalStorageDatabase::databaseIsEmpty):
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
        (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
        (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
        (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
        (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
        * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp:
        (webkitSoupCookieJarSqliteLoad):
        (webkitSoupCookieJarSqliteInsertCookie):
        (webkitSoupCookieJarSqliteDeleteCookie):

2015-04-05  Simon Fraser  <simon.fraser@apple.com>

        Remove "go ahead and" from comments
        https://bugs.webkit.org/show_bug.cgi?id=143421

        Reviewed by Darin Adler, Benjamin Poulain.

        Remove the phrase "go ahead and" from comments where it doesn't add
        anything (which is almost all of them).

        * Platform/unix/EnvironmentUtilities.cpp:
        (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::didClose):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView insertText:replacementRange:]):
        (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):

2015-04-05  Antti Koivisto  <antti@apple.com>

        Bloom filter should support longer hashes
        https://bugs.webkit.org/show_bug.cgi?id=143419

        Reviewed by Dan Bernstein.

        Use the hash digest directly in the contents filter instead of going via shortHash.

        * NetworkProcess/cache/NetworkCacheKey.h:
        (WebKit::NetworkCache::Key::hash):
        (WebKit::NetworkCache::Key::shortHash): Deleted.
        (WebKit::NetworkCache::Key::toShortHash): Deleted.

            No longer needed.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::synchronize):
        (WebKit::NetworkCache::Storage::addToContentsFilter):
        (WebKit::NetworkCache::Storage::mayContain):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-04-05  Antti Koivisto  <antti@apple.com>

        Network cache Bloom filter is too big
        https://bugs.webkit.org/show_bug.cgi?id=143400

        Follow-up: Fix an ineffective assert.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::setMaximumSize): Average resource size is closer to 50KB than 50MB.

2015-04-05  Antti Koivisto  <antti@apple.com>

        Rename Cache::setMaximumSize to setCapacity
        https://bugs.webkit.org/show_bug.cgi?id=143418

        Reviewed by Dan Bernstein.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::setCapacity):
        (WebKit::NetworkCache::Cache::setMaximumSize): Deleted.
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::retrieve):
        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::update):
        (WebKit::NetworkCache::Storage::setCapacity):
        (WebKit::NetworkCache::Storage::shrinkIfNeeded):
        (WebKit::NetworkCache::Storage::shrink):
        (WebKit::NetworkCache::Storage::setMaximumSize): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformSetCacheModel):

2015-04-04  Antti Koivisto  <antti@apple.com>

        Network cache Bloom filter is too big
        https://bugs.webkit.org/show_bug.cgi?id=143400

        Reviewed by Chris Dumez.

        It is currently 1MB.

        This patch switches the cache from a counting filter (CountingBloomFilter) to a bit filter (BloomFilter).

        It also reduces the filter size from 2^20 to 2^18 elements which is good for ~26000 cache entries while
        still keeping false positive rate below 1%. The current cache capacity allows around 4000 entries
        with typical web contents.

        The new filter size is 32KB.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::synchronize):

            Turn initialization function into general purpose synchronization function.

        (WebKit::NetworkCache::Storage::addToContentsFilter):

            Collect newly added hashes so we don't miss entries that were added during synchronization.

        (WebKit::NetworkCache::Storage::mayContain):
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::Storage::retrieve):
        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
        (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
        (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
        (WebKit::NetworkCache::Storage::setMaximumSize):
        (WebKit::NetworkCache::Storage::clear):
        (WebKit::NetworkCache::Storage::shrinkIfNeeded):
        (WebKit::NetworkCache::Storage::shrink):

            Non-counting Bloom filter does not support removals so this requires a new strategy.

            Shrink code now simply deletes entries. The filter is updated by calling synchronize() at the end.
            While we could synchronize the filter during traversal it is better to just have one function for that.

        (WebKit::NetworkCache::Storage::initialize): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::mayContain):
        (WebKit::NetworkCache::Storage::cacheMayContain): Deleted.

2015-04-04  Andy Estes  <aestes@apple.com>

        [Content Filtering] Blocked page is not always displayed when it should be
        https://bugs.webkit.org/show_bug.cgi?id=143410

        Reviewed by Andreas Kling.

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::didStartProvisionalLoad): Stopped clearing m_contentFilterUnblockHandler here.
        (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Started doing it here instead.

2015-04-04  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Add a way to temporarily disable the WebKit Network Cache for testing
        https://bugs.webkit.org/show_bug.cgi?id=143392
        <rdar://problem/20315669>

        Reviewed by Antti Koivisto.

        Add a way to temporarily disable the WebKit Network Cache for testing.
        It will be used temporarily for comparing page load times with and
        without the WebKit network disk cache enabled.

        This is in addition to the existing "WebKitNetworkCacheEnabled"
        NSUserDefaults:
        webkitNetworkCacheIsEnabled = [defaults boolForKey:WebKitNetworkCacheEnabledDefaultsKey]
            && ![defaults boolForKey:WebKitNetworkCacheTemporarilyDisabledForTestingKey];

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):

2015-04-04  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r182215): Feedly crashes when closing article
        https://bugs.webkit.org/show_bug.cgi?id=143405
        rdar://problem/20382734, rdar://problem/20395497

        Reviewed by Tim Horton.
        
        Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
        is bad, because it can cause FrameView::layout() to get called in the middle of
        RenderObject destruction, which leaves the render tree in a bad state.
        
        Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.
        
        AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
        a flag to say that the non-fast region needs to be recomputed, and that schedules
        a scrolling tree commit. When the commit happens, we recompute the region. If the
        region didn't change, and no other changes are pending, there's no need to commit.

        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        (WebKit::RemoteScrollingCoordinator::buildTransaction):
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Outdent #ifdefs.

2015-04-03  Beth Dakin  <bdakin@apple.com>

        Attempted build fix.

        * UIProcess/API/mac/WKView.mm:

2015-04-03  Simon Fraser  <simon.fraser@apple.com>

        Fix the firing of the ReachedSessionRestorationRenderTreeSizeThreshold milestone on iOS
        https://bugs.webkit.org/show_bug.cgi?id=143394

        Reviewed by Tim Horton.
        
        A client reshuffle at some point broke the dispatch of the ReachedSessionRestorationRenderTreeSizeThreshold
        milestone. Fix by using WebPageProxy::didLayout() to fire the milestone.

        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::didCommitLayerTree):

2015-04-03  Beth Dakin  <bdakin@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=143387
        Improvements to webkitmouseforce web API
        -and corresponding-
        rdar://problem/20281808
        rdar://problem/20281853

        Reviewed by Darin Adler.

        This patch:
        1. Dispatches webkitmouseforceup and webkitmouseforceclick at the right time.
        2. Dispatches webkitmouseforcechanged from mousedown all the way through through 
        mouseup.
        3. Uses force values from pressureChangeWithEvent instead of the immediate action 
        gesture recognizer.

        Listen for this NSResponder method, and pass the relevant info to WebPageProxy to 
        dispatch to the web process.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView pressureChangeWithEvent:]):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::inputDeviceForceDidChange):
        (WebKit::WebPageProxy::immediateActionDidUpdate):
        * UIProcess/WebPageProxy.h:

        The web process still needs to know when the immediate action gesture recognizer 
        is updating, but it doesn’t need the force information. That will come from 
        pressureChangeWithEvent.
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):

        Cache m_lastForceStage so that we can determine if we are 
        transitioning to a new stage.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        * WebProcess/WebPage/WebPage.h:

        New message for InputDeviceForceDidChange and modified message for 
        ImmediateActionDidUpdate
        * WebProcess/WebPage/WebPage.messages.in:

        inputDeviceForceDidChange now takes care of dispatching mouseforcechanged, 
        mouseforcedown, mouseforceup, and mouseforceclick.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::inputDeviceForceDidChange):

        We still need to keep track of the ImmediateActionStages in WebCore::EventHandler 
        so that we can have the right default behavior on mouseup based on whether or not 
        that action began and was completed. (In other words, to ensure we don’t navigate 
        to a link after force clicking it.)
        (WebKit::WebPage::immediateActionDidUpdate):
        (WebKit::WebPage::immediateActionDidComplete):

2015-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>

        InjectedBundleNodeHandle::renderedImage() needs to be exposed from the Cocoa WebAPI layer.
        https://bugs.webkit.org/show_bug.cgi?id=143341.

        Reviewed by Anders Carlsson.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
        (-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Expose rendered
        image injected bundle API from the Cocoa layer. A node in the page can be
        rendered to an NSImage on MacOS and to a UIImage on iOS.

2015-04-03  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] We should prevent NetworkProcess suspension while it has pending SQL transactions
        https://bugs.webkit.org/show_bug.cgi?id=143278
        <rdar://problem/20180799>

        Reviewed by Anders Carlsson.

        Prevent NetworkProcess suspension while it has pending SQL transactions,
        similarly to what we already did for WebProcesses. This patch moves the
        WebSQLiteDatabaseTracker from WebProcess/ to Shared/ and make it usable
        by the NetworkProcess class as well.

        Whenever there are locked files to due SQL transactions, the
        NetworkProcess will send an IPC message to the NetworkProcessProxy
        which will hold a background process assertion until the NetworkProcess'
        SQL transactions are complete. This way, it is no longer possible for
        the NetworkProcess to get suspended while SQL transactions are running
        and a database file is locked.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcess.h:
        * Shared/WebSQLiteDatabaseTracker.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp.
        (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
        (WebKit::m_childProcessType):
        (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
        (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
        (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
        * Shared/WebSQLiteDatabaseTracker.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h.
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didClose):
        (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        (WebKit::WebProcess::initializeConnection):
        * WebProcess/WebProcess.h:

2015-04-03  Antti Koivisto  <antti@apple.com>

        Add non-counting Bloom filter implementation
        https://bugs.webkit.org/show_bug.cgi?id=143366

        Reviewed by Sam Weinig.

        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-04-03  Zan Dobersek  <zdobersek@igalia.com>

        Fix the EFL and GTK build after r182243
        https://bugs.webkit.org/show_bug.cgi?id=143361

        Reviewed by Csaba Osztrogonác.

        * PlatformGTK.cmake: Add a custom command that copies the
        InspectorBackendCommands.js file into the proper directory
        under DerivedSources/WebInspectorUI/.

2015-04-03  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, GTK build fix.

        * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
        * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
        * UIProcess/gtk/WebContextMenuProxyGtk.h:

2015-04-02  Csaba Osztrogonác  <ossy@webkit.org>

        Typo fix.

        * PlatformGTK.cmake:

2015-04-02  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r182303, stub NativeContextMenuItem implemetations added for EFL and GTK.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * Shared/efl/NativeContextMenuItemEfl.cpp: Added.
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):
        * Shared/gtk/NativeContextMenuItemGtk.cpp: Added.
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):

2015-04-02  Timothy Horton  <timothy_horton@apple.com>

        De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
        https://bugs.webkit.org/show_bug.cgi?id=143342

        * Platform/mac/LayerHostingContext.h:
        * Platform/mac/LayerHostingContext.mm:
        Actually, not available on Mavericks. Fix the build.

2015-04-02  Brady Eidson  <beidson@apple.com>

        Unreviewed: Re-applied change after rollout.

        Expose the "Share" menu for text selections on platforms where it's available.
        rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318

        * Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        (WebKit::toImpl):

        * Shared/ContextMenuContextData.cpp:
        (WebKit::ContextMenuContextData::ContextMenuContextData):
        (WebKit::ContextMenuContextData::encode):
        (WebKit::ContextMenuContextData::decode):
        * Shared/ContextMenuContextData.h:
        (WebKit::ContextMenuContextData::selectedText):

        Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
        * Shared/NativeContextMenuItem.h:
        (WebKit::NativeContextMenuItem::~NativeContextMenuItem):
        (WebKit::NativeContextMenuItem::nsMenuItem):
        * Shared/mac/NativeContextMenuItem.mm:
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):

        Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::WebContextMenuItem):
        * Shared/WebContextMenuItem.h:
        (WebKit::WebContextMenuItem::create):
        (WebKit::WebContextMenuItem::nativeContextMenuItem):

        * UIProcess/API/APIContextMenuClient.h:
        (API::ContextMenuClient::getContextMenuFromProposedMenu):
        (API::ContextMenuClient::showContextMenu):

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageContextMenuClient):

        * UIProcess/WebContextMenuProxy.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
          native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
          can be attached to them.

        * UIProcess/mac/WebContextMenuProxyMac.h:
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (-[WKMenuTarget forwardContextMenuAction:]):
        (WebKit::nsMenuItem):
        (WebKit::nsMenuItemVector):
        (WebKit::WebContextMenuProxyMac::populate):
        (WebKit::WebContextMenuProxyMac::showContextMenu):

        * WebKit2.xcodeproj/project.pbxproj:

        * WebProcess/WebCoreSupport/WebContextMenuClient.h:
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
          context menu with a placeholder item. It will be translated into the real Share menu in the UI process.

2015-04-02  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r182293.
        https://bugs.webkit.org/show_bug.cgi?id=143355

        Broke GTK and EFL builds. (Requested by bfulgham on #webkit).

        Reverted changeset:

        "Expose the "Share" menu for text selections on platforms
        where it's available."
        https://bugs.webkit.org/show_bug.cgi?id=143318
        http://trac.webkit.org/changeset/182293

2015-04-02  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
        https://bugs.webkit.org/show_bug.cgi?id=143348

        Reviewed by Antti Koivisto.

        Drop HTTP method from NetworkCache::Key as we only cache GET responses
        for now. Even when we start caching HEAD responses, we likely will not
        want the method to be part of the key because:
        - A HEAD response can be used to update the headers of a previously cached response to GET
        - A cached GET response may be used to satisfy subsequent HEAD requests

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeCacheKey):
        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::Key::Key):
        (WebKit::NetworkCache::Key::operator=):
        (WebKit::NetworkCache::Key::computeHash):
        (WebKit::NetworkCache::Key::operator==):
        (WebKit::NetworkCache::Key::encode):
        (WebKit::NetworkCache::Key::decode):
        * NetworkProcess/cache/NetworkCacheKey.h:
        (WebKit::NetworkCache::Key::method): Deleted.

2015-04-02  Jer Noble  <jer.noble@apple.com>

        [Mac][WK2] Fullscreen animation incorrect when initiated on non-primary monitor
        https://bugs.webkit.org/show_bug.cgi?id=143237

        Reviewed by Brent Fulgham.

        The animation calculations have an implicit assumptions of a screen whose origin is 0,0. Account
        for the screen origin by passing the window's screen's frame into the zoomAnimation() and maskAnimation()
        methods.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController initWithWindow:webView:]):
        (zoomAnimation):
        (maskAnimation):
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):

2015-04-02  Brady Eidson  <beidson@apple.com>

        Expose the "Share" menu for text selections on platforms where it's available.
        rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318

        Reviewed by Sam Weinig.

        * Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        (WebKit::toImpl):

        * Shared/ContextMenuContextData.cpp:
        (WebKit::ContextMenuContextData::ContextMenuContextData):
        (WebKit::ContextMenuContextData::encode):
        (WebKit::ContextMenuContextData::decode):
        * Shared/ContextMenuContextData.h:
        (WebKit::ContextMenuContextData::selectedText):

        Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
        * Shared/NativeContextMenuItem.h:
        (WebKit::NativeContextMenuItem::~NativeContextMenuItem):
        (WebKit::NativeContextMenuItem::nsMenuItem):
        * Shared/mac/NativeContextMenuItem.mm:
        (WebKit::NativeContextMenuItem::NativeContextMenuItem):

        Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::WebContextMenuItem):
        * Shared/WebContextMenuItem.h:
        (WebKit::WebContextMenuItem::create):
        (WebKit::WebContextMenuItem::nativeContextMenuItem):

        * UIProcess/API/APIContextMenuClient.h:
        (API::ContextMenuClient::getContextMenuFromProposedMenu):
        (API::ContextMenuClient::showContextMenu):

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageContextMenuClient):

        * UIProcess/WebContextMenuProxy.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
          native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
          can be attached to them.

        * UIProcess/mac/WebContextMenuProxyMac.h:
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (-[WKMenuTarget forwardContextMenuAction:]):
        (WebKit::nsMenuItem):
        (WebKit::nsMenuItemVector):
        (WebKit::WebContextMenuProxyMac::populate):
        (WebKit::WebContextMenuProxyMac::showContextMenu):

        * WebKit2.xcodeproj/project.pbxproj:

        * WebProcess/WebCoreSupport/WebContextMenuClient.h:
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
          context menu with a placeholder item. It will be translated into the real Share menu in the UI process.

2015-04-02  Timothy Horton  <timothy_horton@apple.com>

        De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
        https://bugs.webkit.org/show_bug.cgi?id=143342

        Reviewed by Myles C. Maxfield.

        * Platform/mac/LayerHostingContext.h:
        * Platform/mac/LayerHostingContext.mm:
        (WebKit::LayerHostingContext::setFencePort):
        There's nothing iOS specific about this.

2015-04-02  Oliver Hunt  <oliver@apple.com>

        Ensure that we always set network ATS context in the network process
        https://bugs.webkit.org/show_bug.cgi?id=143343

        Reviewed by Dan Bernstein.

        If a custom cache location or size we were early returning before setting
        the CFNetwork ATS context. This is clearly an error.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

2015-04-02  Alexey Proskuryakov  <ap@apple.com>

        Make checkURLReceivedFromWebProcess not rely on details of platform URL implementation.
        https://bugs.webkit.org/show_bug.cgi?id=143222
        rdar://problem/19978997

        Reviewed by Sam Weinig.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

2015-04-02  Yusuke Suzuki  <utatane.tea@gmail.com>

        Clean up EnumerationMode to easily extend
        https://bugs.webkit.org/show_bug.cgi?id=143276

        Reviewed by Geoffrey Garen.

        Use default EnumerationMode().

        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
        (WebKit::NPJSObject::enumerate):

2015-04-02  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Update the WebContent process' sandbox profile for AWD
        https://bugs.webkit.org/show_bug.cgi?id=143340
        <rdar://problem/20375170>

        Reviewed by Alexey Proskuryakov.

        Update the WebContent process' sandbox profile for AWD.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2015-04-01  Antti Koivisto  <antti@apple.com>

        Use std::chrono types to represent time in response and cache classes
        https://bugs.webkit.org/show_bug.cgi?id=143316

        Reviewed by Andreas Kling.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFinishLoading):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::responseHasExpired):
        (WebKit::NetworkCache::responseNeedsRevalidation):
        (WebKit::NetworkCache::makeStoreDecision):
        (WebKit::NetworkCache::Cache::store):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):
        (WebKit::NetworkCache::Entry::asJSON):
        * NetworkProcess/cache/NetworkCacheEntry.h:
        (WebKit::NetworkCache::Entry::timeStamp):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::decodeRecordMetaData):
        (WebKit::NetworkCache::decodeRecord):

            Sanity check the timestamp on decode.

        (WebKit::NetworkCache::encodeRecordMetaData):
        (WebKit::NetworkCache::encodeRecordHeader):
        (WebKit::NetworkCache::Storage::traverse):
        * NetworkProcess/cache/NetworkCacheStorage.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::lastModifiedDateMS):
        (WebKit::PluginView::Stream::didReceiveResponse):
        (WebKit::PluginView::manualLoadDidReceiveResponse):
        (WebKit::lastModifiedDate): Deleted.

2015-04-01  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Add didFailProvisionalLoadWithErrorForFrame callback to WKWebProcessPlugInLoadDelegate
        https://bugs.webkit.org/show_bug.cgi?id=143319
        <rdar://problem/19463834>

        Reviewed by Dan Bernstein.

        Add didFailProvisionalLoadWithErrorForFrame callback to
        WKWebProcessPlugInLoadDelegate so that the client side can track all
        types page load completions:
        - didFailProvisionalLoadWithErrorForFrame
        - didFailLoadWithErrorForFrame
        - didFinishLoadForFrame

        Note that this event is already exposed on UIProcess side via the
        WKPageLoaderClient.didFailLoadWithErrorForFrame callback.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (didFailProvisionalLoadWithErrorForFrame):
        (setUpPageLoaderClient):

2015-04-01  Enrica Casucci  <enrica@apple.com>

        Injected bundle messages should be at the page level.
        https://bugs.webkit.org/show_bug.cgi?id=143283

        Reviewed by Alexey Proskuryakov.

        All the messages between the injected bundle and the UI
        process should be page level messages instead of context.
        The author of this patch is Tim Horton, I just finished it.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageInjectedBundleClient):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/API/C/WKPageInjectedBundleClient.h: Added.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _pageForTesting]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/WebPageInjectedBundleClient.cpp: Added.
        (WebKit::WebPageInjectedBundleClient::didReceiveMessageFromInjectedBundle):
        (WebKit::WebPageInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
        * UIProcess/WebPageInjectedBundleClient.h: Added.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setInjectedBundleClient):
        (WebKit::WebPageProxy::handleMessage):
        (WebKit::WebPageProxy::handleSynchronousMessage):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::injectedBundleClient):
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::handleMessage):
        * WebKit2.xcodeproj/project.pbxproj:
        * CMakeLists.txt:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePagePostMessage):
        (WKBundlePagePostSynchronousMessage):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::postMessage):
        (WebKit::WebPage::postSynchronousMessage):
        * WebProcess/WebPage/WebPage.h:

2015-04-01  Alexey Proskuryakov  <ap@apple.com>

        [iOS] WebContent should have access to the entirety of its caches directory
        https://bugs.webkit.org/show_bug.cgi?id=143312
        rdar://problem/20314916

        Reviewed by Oliver Hunt.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        * Shared/Network/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * Shared/Network/NetworkProcessCreationParameters.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::networkingCachesDirectory):
        (WebKit::WebProcessPool::webContentCachesDirectory):
        (WebKit::WebProcessPool::openGLCacheDirectory): Deleted.
        (WebKit::WebProcessPool::networkingHSTSDatabasePath): Deleted.
        (WebKit::WebProcessPool::webContentHSTSDatabasePath): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::createNewWebProcess):
        * UIProcess/WebProcessPool.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-04-01  Timothy Horton  <timothy_horton@apple.com>

        Smart magnification gesture sometimes shoots to the middle of the page
        https://bugs.webkit.org/show_bug.cgi?id=143296
        <rdar://problem/18209280>

        Reviewed by Dean Jackson.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
        Constrain the target rect to the viewport, and if it had overflowed the viewport,
        scroll halfway towards the gesture origin.

2015-03-31  Simon Fraser  <simon.fraser@apple.com>

        Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
        https://bugs.webkit.org/show_bug.cgi?id=143288
        rdar://problem/16049624

        Reviewed by Beth Dakin.

        Remove the wheel event counting that Document does, and passes into the scrolling tree.
        The ScrollingTree now just uses the non-fast scrollable region to determine when to
        fast scroll on pages with wheel event handlers.
        
        If a handler includes position:fixed renderers, we just cover the whole document
        with the slow-scrolling region currently. This could be improved.

        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
        (WebKit::RemoteScrollingTreeTextStream::dump):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::wheelEventHandlersChanged):
        (WebKit::WebChromeClient::numWheelEventHandlersChanged): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::wheelEventHandlersChanged):
        (WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
        (WebKit::WebPage::numWheelEventHandlersChanged): Deleted.
        * WebProcess/WebPage/WebPage.h:

2015-03-31  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20365675> [iOS] Include Add to Reading List link action only where supported
        https://bugs.webkit.org/show_bug.cgi?id=143289

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/_WKElementAction.h: Excluded _WKElementActionTypeAddToReadingList from
        the _WKElementActionType enum when Reading List is not supported.

        * UIProcess/API/Cocoa/_WKElementAction.mm:
        (+[_WKElementAction elementActionWithType:customTitle:]): Made Add to Reading List code
        conditional on HAVE(SAFARI_SERVICES_FRAMEWORK).

        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showImageSheet]): Ditto.
        (-[WKActionSheetAssistant showLinkSheet]): Ditto.

        * config.h: Defined HAVE_SAFARI_SERVICES_FRAMEWORK.

2015-03-31  Timothy Horton  <timothy_horton@apple.com>

        TextIndicator for <span> inside an <a> only highlights the <span>, should highlight the whole <a>
        https://bugs.webkit.org/show_bug.cgi?id=143287
        <rdar://problem/20318342>

        Reviewed by Beth Dakin.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        Instead of just highlighting the hit element, highlight the whole
        element that the link URL comes from.

2015-03-31  Timothy Horton  <timothy_horton@apple.com>

        WKView should stop using endGestureWithEvent
        https://bugs.webkit.org/show_bug.cgi?id=143285
        <rdar://problem/20357007>

        Reviewed by Simon Fraser.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView magnifyWithEvent:]):
        (-[WKView endGestureWithEvent:]): Deleted.
        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::endMagnificationGesture):
        (WebKit::ViewGestureController::endActiveGesture): Deleted.
        While there is no visible symptom, it is recommended that we check
        the phase of normal magnification events instead of using the
        special gesture end events.

2015-03-31  Timothy Horton  <timothy_horton@apple.com>

        Swipes occur in the wrong direction in RTL
        https://bugs.webkit.org/show_bug.cgi?id=143257
        <rdar://problem/20300862>

        Reviewed by Simon Fraser.

        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
        When choosing which edge to attach our gesture recognizers to,
        flip them in RTL.

        (-[WKSwipeTransitionController directionForTransition:]):
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::canSwipeInDirection):
        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
        (WebKit::ViewGestureController::trackSwipeGesture):
        (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::handleSwipeGesture):
        Adjust SwipeDirection to be in logical back-forward list direction
        instead of physical edge direction.

2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>

        Move ExpansionBehaviorFlags and TextDirection to their own file
        https://bugs.webkit.org/show_bug.cgi?id=143273

        Reviewed by Simon Fraser.

        This is a mechanical change. It just moves code around.

        This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608

        * Shared/WebPopupItem.h:
        * UIProcess/API/C/efl/WKAPICastEfl.h:
        * UIProcess/API/efl/EwkView.h:
        * UIProcess/WebPopupMenuProxy.h:
        * UIProcess/efl/WebUIPopupMenuClient.h:

2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>

        Clean up Identifier factories to clarify the meaning of StringImpl*
        https://bugs.webkit.org/show_bug.cgi?id=143146

        Reviewed by Filip Pizlo.

        Just change to Identifier::fromString.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::getOwnPropertyNames):
        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
        (WebKit::identifierFromIdentifierRep):

2015-03-31  Timothy Horton  <timothy_horton@apple.com>

        WebKit briefly shows wrong webpage after swiping back (gigaom.com, or any site on a slow network)
        https://bugs.webkit.org/show_bug.cgi?id=143256
        <rdar://problem/19458648>

        Reviewed by Dan Bernstein.

        Instead of allowing a flash of the previous page when the swipe snapshot
        timeouts fire (removing the snapshot before the new page is loaded), show
        the snapshotted background color.

        This fixes the problem on iOS, where UI-side compositing makes it easy to fix,
        but not yet on OS X.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (baseScrollViewBackgroundColor):
        (scrollViewBackgroundColor):
        If the ViewGestureController returns a valid background color, use that
        instead of the page's background color.

        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        Expose _updateScrollViewBackground.

        * UIProcess/PageClient.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::didChangeBackgroundColor):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didChangeBackgroundColor):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didChangeBackgroundColor):
        * UIProcess/WebPageProxy.h:
        Add and plumb didChangeBackgroundColor, which calls
        _updateScrollViewBackground on iOS.
        
        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::endSwipeGesture):
        Hide the content of the drawing area until the next commit. This way,
        even if the snapshot is removed (say, because a timeout fired), we won't
        ever show the old page content (but we will show background color).

        Store the background color associated with the current snapshot.

        Let WKWebView know that it needs to recompute the background color.

        (WebKit::ViewGestureController::removeSwipeSnapshot):
        Clear the background color so that the next time we commit, WKWebView
        will get an invalid color from ViewGestureController and fall back
        to the page's extended background color instead.

        * UIProcess/mac/ViewGestureController.h:
        (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::removeSwipeSnapshot):
        Keep backgroundColorForCurrentSnapshot up to date on Mac too, even
        though we don't use it yet.

2015-03-31  Timothy Horton  <timothy_horton@apple.com>

        [iOS] Rotating PDF in Safari scrolls to the wrong position
        https://bugs.webkit.org/show_bug.cgi?id=143259
        <rdar://problem/19872693>

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView web_setMinimumSize:]):
        Maintan the relative top/left within the rescaled document.

2015-03-31  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Extend ProcessThrottler use to the NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=143249
        <rdar://problem/20231539>

        Reviewed by Gavin Barraclough.

        Extend ProcessThrottler use to the NetworkProcess instead of only the
        WebProcesses. This is needed so that the NetworkProcess gets notified
        before suspension. We now use this notification to free-up memory
        before suspending by calling the critical memory pressure handler, as
        we already do for WebProcesses (rdar://problem/20231539). In the
        future, this infrastructure will be used to delay suspension until the
        pending SQL transactions are done as well (rdar://problem/20180799).

        Previously, the NetworkProcessProxy would hold a foreground assertion
        on behalf of the NetworkProcess but would never release that assertion.
        In this patch, we change this so that WebProcessProxies hold assertions
        on behalf of the NetworkProcess, and release those assertions before
        suspending. As a result, the NetworkProcess gets suspended when all
        WebProcesses are suspended.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::processWillSuspend):
        (WebKit::NetworkProcess::cancelProcessWillSuspend):
        (WebKit::NetworkProcess::processDidResume):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::NetworkProcessProxy):
        (WebKit::NetworkProcessProxy::didFinishLaunching):
        (WebKit::NetworkProcessProxy::sendProcessWillSuspend):
        (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend):
        (WebKit::NetworkProcessProxy::didCancelProcessSuspension):
        (WebKit::NetworkProcessProxy::sendProcessDidResume):
        (WebKit::NetworkProcessProxy::processReadyToSuspend):
        * UIProcess/Network/NetworkProcessProxy.h:
        (WebKit::NetworkProcessProxy::throttler):
        * UIProcess/Network/NetworkProcessProxy.messages.in:
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::ProcessThrottler):
        (WebKit::ProcessThrottler::didConnectToProcess):
        (WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
        * UIProcess/ProcessThrottler.h:
        * UIProcess/ProcessThrottlerClient.h: Added.
        (WebKit::ProcessThrottlerClient::~ProcessThrottlerClient):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess):
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didFinishLaunching):
        (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken):
        (WebKit::WebProcessProxy::sendProcessDidResume):
        (WebKit::WebProcessProxy::processReadyToSuspend):
        * UIProcess/WebProcessProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-03-31  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed, revert accidental change by r182138.

        * Scripts/generate-forwarding-headers.pl:
        (createForwardingHeadersForFramework):

2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build with REDIRECTED_XCOMPOSITE_WINDOW disabled in X11 platform.

        Also fix some unused parameter warnings when
        REDIRECTED_XCOMPOSITE_WINDOW is disabled.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewRenderAcceleratedCompositingResults):
        (resizeWebKitWebViewBaseFromAllocation):

2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] DnD icon/widget has odd background
        https://bugs.webkit.org/show_bug.cgi?id=143217

        Reviewed by Martin Robinson.

        Use gtk_drag_set_icon_surface() to set the drag icon image,
        instead of DragIcon class.

        * UIProcess/API/gtk/WebKitWebView.cpp:
        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::startDrag):
        * UIProcess/gtk/DragAndDropHandler.h:

2015-03-30  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r182172.
        https://bugs.webkit.org/show_bug.cgi?id=143250

        Since this class is an API object, we don't know for sure when
        it will be destroyed. (Requested by kling on #webkit).

        Reverted changeset:

        "WebBackForwardList doesn't need to manually clear the
        snapshot of an entry when removing it."
        https://bugs.webkit.org/show_bug.cgi?id=143231
        http://trac.webkit.org/changeset/182172

2015-03-30  Andreas Kling  <akling@apple.com>

        WebBackForwardList doesn't need to manually clear the snapshot of an entry when removing it.
        <https://webkit.org/b/143231>

        Reviewed by Tim Horton.

        Now that we don't keep WebBackForwardListItem objects alive forever, it's not necessary
        to clear the snapshot when removing them from the WebBackForwardList, since the entire
        object will be deleted shortly after that anyway.

        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::didRemoveItem):

2015-03-30  Enrica Casucci  <enrica@apple.com>

        [iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects.
        https://bugs.webkit.org/show_bug.cgi?id=143234
        <rdar://problem/18571345>

        Reviewed by Tim Horton.

        This is a speculative fix that adds a null check before referencing the range.
        In both places where the check has been added the range returned by the call
        that should create it could be null.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::platformEditorState):

2015-03-30  Sam Weinig  <sam@webkit.org>

        [Content Extensions] Flesh out the UserContentExtensionStore
        https://bugs.webkit.org/show_bug.cgi?id=143123

        Reviewed by Benjamin Poulain.

        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
        * Shared/WebCompiledContentExtensionData.cpp:
        (WebKit::WebCompiledContentExtensionData::encode):
        (WebKit::WebCompiledContentExtensionData::decode):
        * Shared/WebCompiledContentExtensionData.h:
        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
        Switch the order in memory of actions and bytecode (and switch the order of the
        variables as well, to keep it clear). This will become necessary when streaming
        the data to disk, as actions are created before the bytecode and we would have to keep them
        in memory until the bytecode was finished compiling if they didn't come before in the file.

        * UIProcess/API/APIUserContentExtensionStore.h:
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::defaultStore):
        Add accessor for the processes default shared store.

        (API::constructedPath):
        Helper for constructing the path to a file in the store based on identifier.

        (API::encodeContentExtensionMetaData):
        (API::decodeContentExtensionMetaData):
        Helpers for encoding/decoding the file metadata (version, bytecode size, actions size).

        (API::openAndMapContentExtension):
        Helper to open and map a filed back content extension.

        (API::writeDataToFile):
        Helper to write a Data object to a file.

        (API::compiledToFile):
        Helper to run the content extension compiler and write it to disk. It first
        writes it to a temporary file and then does an atomic rename operation to put
        the file in the final location. Doing this means that if the process crashes while
        the compile is taking place, the partially written file won't end up in the cache, 
        but rather, will be cleaned up by the OS.
 
        (API::UserContentExtensionStore::lookupContentExtension):
        API entry point to lookup an extension that has been compiled to disk. On a background queue,
        it attempts to open and map the extension (based on the identifier passed in) and return it
        to the caller via the callback function passed in.
        
        (API::UserContentExtensionStore::compileContentExtension):
        API entry point to compile an extension and write it to store. On a background queue, it 
        compiles the file to disk and if successful, returns the memory mapped data via the callback
        function passed in.

        (API::UserContentExtensionStore::removeContentExtension):
        API entry point to remove an extension from the store. On a background queue, it 
        unlinks the extension (based on the identifier passed in) and tells the caller it completed
        the action vial the callback function passed in.

        (API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
        Helper for testing which synchronously unlinks all the files in the store.

        (API::userContentExtensionStoreErrorCategory):
        std::error_code adaptor for some generic errors that can happen in the store. We will want
        to flesh these out further.

        * UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm: Added.
        (API::UserContentExtensionStore::defaultStorePath):
        Helper to get the platform specific path for the store.

        * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
        (WKUserContentExtensionStoreGetTypeID):
        Add ENABLE(CONTENT_EXTENSIONS) guards.

        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (-[_WKUserContentExtensionStore dealloc]):
        (+[_WKUserContentExtensionStore defaultStore]):
        (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
        (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
        (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
        (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
        (-[_WKUserContentExtensionStore init]): Deleted.
        * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h: Added.
        SPI wrappers for the store.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2015-03-30  Antti Koivisto  <antti@apple.com>

        Don't cache resources that are very unlikely to be reused
        https://bugs.webkit.org/show_bug.cgi?id=143226

        Reviewed by Chris Dumez.

        Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeStoreDecision):

2015-03-30  Antti Koivisto  <antti@apple.com>

        Include cache entry worth to json dump
        https://bugs.webkit.org/show_bug.cgi?id=143202

        Follow-up fix.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::computeRecordWorth):

            This accidentally gave the error case worth 1 rather than 0 as it should be.

2015-03-30  Antti Koivisto  <antti@apple.com>

        Don't cache resources that are very unlikely to be reused
        https://bugs.webkit.org/show_bug.cgi?id=143226
        <rdar://problem/20347160>

        Reviewed by Geoff Garen.

        We are writing lots of resources to the cache that are never used again.

        In browse-around-randomly test this reduced number of cache entries created by ~20% and bytes written by ~5%.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeUseDecision):
        (WebKit::NetworkCache::makeRetrieveDecision):

            Rename for clarity.

        (WebKit::NetworkCache::makeStoreDecision):

            Store only if the resource has non-zero expiration or has validation headers.

            Very High priority resources (main resources) keep the existing policy to minimize impact
            on back navigation and tab restore.

        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::canUse): Deleted.
        (WebKit::NetworkCache::canRetrieve): Deleted.
        (WebKit::NetworkCache::canStore): Deleted.
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::storeDecisionToDiagnosticKey):

2015-03-30  Tim Horton  <timothy_horton@apple.com>

        Swipe snapshot removed too early (jumps around) on arstechnica and NYT
        https://bugs.webkit.org/show_bug.cgi?id=143199
        <rdar://problem/18420467>

        Reviewed by Dan Bernstein.

        Make ViewGestureControllerIOS's snapshot removal timing behave more like the Mac version.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]):
        Let ViewGestureController know when the page has finished state restoration.

        (-[WKWebView _didFinishLoadForMainFrame]):
        (-[WKWebView _didSameDocumentNavigationForMainFrame:]):
        Forward these to ViewGestureController.

        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::didFinishLoadForMainFrame):
        Forward didFinishLoadForMainFrame to WKWebView.

        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::ViewGestureController):
        (WebKit::ViewGestureController::endSwipeGesture):
        Split the swipe snapshot removal state into a bunch of bools.

        (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
        (WebKit::ViewGestureController::setRenderTreeSize):
        (WebKit::ViewGestureController::removeSwipeSnapshotIfReady):
        (WebKit::ViewGestureController::removeSwipeSnapshot):
        Unify the snapshot removal logic into one function; removeSwipeSnapshotIfReady
        completely owns the decision. For now, we're waiting for everything, but
        we can do better in the future (using firstVisuallyNonEmptyLayout like Mac used to).

        (WebKit::ViewGestureController::didRestoreScrollPosition):
        (WebKit::ViewGestureController::didFinishLoadForMainFrame):
        (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
        (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
        Add more conditions for swipe snapshot removal. We'll now wait for
        didFinishLoadForMainFrame (or didSameDocumentNavigationForMainFrame),
        for active loads to finish, and for the scroll position to be restored.
        This brings the iOS implementation in line with the slightly better Mac
        implementation, and also sets the stage for deduplication of all of this code.
        
        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::ViewGestureController):

2015-03-30  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
        https://bugs.webkit.org/show_bug.cgi?id=143159
        <rdar://problem/20333296>

        Reviewed by Antti Koivisto.

        Add support for "Cache-Control: max-stale" request header:
        https://tools.ietf.org/html/rfc7234#section-5.2.1.2

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::responseHasExpired):
        (WebKit::NetworkCache::requestRequiresRevalidation):
        (WebKit::NetworkCache::canUse):

2015-03-30  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL][GTK] WebKit2's generate-forwarding-headers.pl should fail if clashing headers found
        https://bugs.webkit.org/show_bug.cgi?id=142909

        Reviewed by Philippe Normand.

        * Scripts/generate-forwarding-headers.pl:
        (createForwardingHeadersForFramework):

2015-03-29  Antti Koivisto  <antti@apple.com>

        Include cache entry worth to json dump
        https://bugs.webkit.org/show_bug.cgi?id=143202

        Reviewed by Darin Adler.

        This is useful for analyzing cache performance.
        Also include the body size, total item count and average worth.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::traverse):
        (WebKit::NetworkCache::Cache::dumpContentsToFile):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::asJSON):
        * NetworkProcess/cache/NetworkCacheEntry.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::traverse):

            Add flags for specificying what sort of information is needed.

        (WebKit::NetworkCache::computeRecordWorth):

            Factor to a function.

        (WebKit::NetworkCache::deletionProbability):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-03-29  Simon Fraser  <simon.fraser@apple.com>

        Fix iOS scrollperf crash after a web process crash
        https://bugs.webkit.org/show_bug.cgi?id=143110

        Reviewed by Dean Jackson.
        
        When we destroy the drawing area after a web process crash, we also need to destroy
        the scrollingPerformanceData which has a reference to the drawing area.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::resetState):

2015-03-29  Simon Fraser  <simon.fraser@apple.com>

        Convert arguments to ScrollingCoordinator functions to references
        https://bugs.webkit.org/show_bug.cgi?id=143198

        Reviewed by Darin Adler.

        Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
        references, and use references in a few other places.

        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):

2015-03-29  Enrica Casucci  <enrica@apple.com>

        [iOS WK2] WKContentView should implement _selectionClipRect
        https://bugs.webkit.org/show_bug.cgi?id=143143
        rdar://problem/20330075

        Reviewed by Benjamin Poulain.

        UIKit checks if the text delegate responds to this selector
        to retrieve the clipping rectangle for the editable element
        where the selection is being create.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _selectionClipRect]):

2015-03-29  Antti Koivisto  <antti@apple.com>

        Use st_mtime instead of st_atime to track file access time
        https://bugs.webkit.org/show_bug.cgi?id=143200

        Reviewed by Darin Adler.

        On OS X atime updates automatically on read so calling Storage::traverse() would always ends up updating access times
        for all cache entries to the current time. This would make entry worth computation produce unexpected results.
        We update mtime manually on successful cache retrieve only so switching to it fixes the problem.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes):
        (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
        (WebKit::NetworkCache::updateFileAccessTimeIfNeeded): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::updateFileModificationTime):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::deletionProbability):
        (WebKit::NetworkCache::Storage::updateFileAccessTime): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>

        [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
        https://bugs.webkit.org/show_bug.cgi?id=142386

        Reviewed by Žan Doberšek.

        TextureMapper and TextureMapperGL are bloated and tightly coupled with
        BitmapTexture. We should move these classes to seperated file of their own.
        Also, this patch removes friend relationship from TextureMapperGL and  its
        subsidiary classes.

        The main purpose of this refactoring is to expose BitmapTexturePool to
        renderers of platformlayers like Video and Canvas. By doing this, each
        renderer can acquire textures from the global texture pool to paint
        their contents directly.

        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Include BitmapTextureGL.h explicitly

2015-03-27  Anders Carlsson  <andersca@apple.com>

        Use a typedef for the WKPluginLoadClientPolicy enum
        https://bugs.webkit.org/show_bug.cgi?id=143161

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKPluginLoadPolicy.h:

2015-03-27  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Use WTF::WorkQueue abstraction inside NetworkCacheStatistics
        https://bugs.webkit.org/show_bug.cgi?id=143154

        Reviewed by Antti Koivisto.

        Use WTF::WorkQueue abstraction inside NetworkCacheStatistics, like we
        already do in NetworkCacheStorage.

        * NetworkProcess/cache/NetworkCacheStatistics.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm.
        (WebKit::NetworkCache::executeSQLCommand):
        (WebKit::NetworkCache::executeSQLStatement):
        (WebKit::NetworkCache::Statistics::open):
        (WebKit::NetworkCache::Statistics::Statistics):
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
        (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
        (WebKit::NetworkCache::Statistics::recordRetrievalRequest):
        (WebKit::NetworkCache::Statistics::recordNotCachingResponse):
        (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
        (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
        (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
        (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
        (WebKit::NetworkCache::Statistics::markAsRequested):
        (WebKit::NetworkCache::Statistics::writeTimerFired):
        (WebKit::NetworkCache::Statistics::queryWasEverRequested):
        (WebKit::NetworkCache::Statistics::clear):
        (WebKit::NetworkCache::Statistics::addHashesToDatabase):
        (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
        * NetworkProcess/cache/NetworkCacheStatistics.h:
        (WebKit::NetworkCache::Statistics::serialBackgroundIOQueue):
        * WebKit2.xcodeproj/project.pbxproj:

2015-03-27  Ryosuke Niwa  <rniwa@webkit.org>

        Safari clears selection when its window gets activated via mouse down
        https://bugs.webkit.org/show_bug.cgi?id=143157

        Reviewed by Anders Carlsson.

        The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
        even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.

        Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.

        * Shared/WebEvent.h:
        (WebKit::WebMouseEvent::eventNumber):
        * Shared/WebEventConversion.cpp:
        (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
        * Shared/WebMouseEvent.cpp:
        (WebKit::WebMouseEvent::WebMouseEvent):
        (WebKit::WebMouseEvent::encode):
        (WebKit::WebMouseEvent::decode):
        * Shared/mac/WebEventFactory.mm:
        (WebKit::WebEventFactory::createWebMouseEvent):

2015-03-27  Anders Carlsson  <andersca@apple.com>

        Only do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
        https://bugs.webkit.org/show_bug.cgi?id=143141
        rdar://problem/19471284

        Reviewed by Andreas Kling.

        * Platform/IPC/Connection.h:
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::platformInvalidate):
        (IPC::Connection::platformInitialize):
        (IPC::Connection::open):
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::didFinishLaunching):
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::didFinishLaunching):

2015-03-27  Tim Horton  <timothy_horton@apple.com>

        Implement iOS WebKit2 PDF Find-in-Page
        https://bugs.webkit.org/show_bug.cgi?id=143065
        <rdar://problem/16793370>

        Reviewed by Dan Bernstein.

        * Platform/spi/ios/CorePDFSPI.h:
        Add some SPI.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _countStringMatches:options:maxCount:]):
        (-[WKWebView _findString:options:maxCount:]):
        (-[WKWebView _hideFindUI]):
        If we have a custom content view, forward find-in-page methods to it.
        
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/Cocoa/_WKFindOptions.h:
        Move _WKFindOptions into its own file.

        * UIProcess/Cocoa/WKWebViewContentProvider.h:
        Add find-related methods to the WKWebViewContentProvider protocol.

        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView web_initWithFrame:webView:]):
        (-[WKPDFView dealloc]):
        Maintain a dispatch queue for searching the PDF.

        (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
        Fix a type.

        (-[WKPDFView _ensureViewForPage:]):
        Split the code to create/parent a page view out from _revalidateViews,
        so that the find code can create/parent the targetted UIPDFPageView
        in order to install the find highlight in it, but before it is scrolled into view.

        (-[WKPDFView _revalidateViews]):
        Use the stored page index instead of counting again.
        Don't unparent page views that have find-in-page highlights in them, because
        we won't know enough to recreate them later.

        (-[WKPDFView _computePageAndDocumentFrames]):
        Put the page index in PDFPageInfo, for reference elsewhere.

        (-[WKPDFView _stringCompareOptionsFromWKFindOptions:]):
        (-[WKPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
        Asynchronously (and on our serial queue) search the PDF for the given string.
        We'll cache the most recent results to avoid searching more than once,
        cancel existing searches when another begins (since it's a serial queue,
        this ensures we'll only have one search active at a time).

        (-[WKPDFView web_countStringMatches:options:maxCount:]):
        Count the number of matches for the given string, and inform the FindClient
        of the result.

        (-[WKPDFView _didFindMatch:]):
        When we find a match, create a view for it, highlight the match, and
        zoom so that it's in-view.

        (-[WKPDFView web_findString:options:maxCount:]):
        Incrementally search the document for the given string. We do an incremental
        search even if we have all of the results so that we can anchor the search
        in the right place if the new string is a prefix of the old string, etc.
        Wrap around appropriately when searching past the beginning or end of the
        document. If we have all of the results (there were less than maxCount results),
        look through the cached matches for the incrementally-found result and
        report its index to the client.

        (-[WKPDFView web_hideFindUI]):
        Dismiss the selection and clear some state so we start the next search afresh.

        * WebKit2.xcodeproj/project.pbxproj:

2015-03-27  Andreas Kling  <akling@apple.com>

        WebProcessProxy should not retain WebBackForwardListItems forever.
        <https://webkit.org/b/143152>
        <rdar://problem/19925709>

        Reviewed by Anders Carlsson.

        Have WebProcessProxy actually forget about a WebBackForwardListItem after it's removed from
        the WebBackForwardList.

        This ensures that we don't accumulate too many of these objects, which can get quite large
        due to the session state encoded in them.

        We already have graceful handling of the case where an incoming IPC message references
        a removed back/forward list item.

        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::didRemoveItem):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::backForwardRemovedItem):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::removeBackForwardItem):
        * UIProcess/WebProcessProxy.h:

2015-03-27  Simon Fraser  <simon.fraser@apple.com>

        Use the correct timebase to log scrollperf blank pixel counts on iOS
        https://bugs.webkit.org/show_bug.cgi?id=143149

        Reviewed by Tim Horton.
        
        MobileSafari and WebKit need to collect scrollperf data using the same timebase;
        MobileSafari can't call WTF::monotonicallyIncreasingTime(), so use CFAbsoluteTimeGetCurrent()
        everywhere.

        * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm:
        (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):

2015-03-27  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
        https://bugs.webkit.org/show_bug.cgi?id=143137

        Reviewed by Antti Koivisto.

        Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
        think it is more accurate. It is not the request that needs revalidating.
        The requests just requires us to revalidate the response.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::requestRequiresRevalidation):
        (WebKit::NetworkCache::canUse):
        (WebKit::NetworkCache::requestNeedsRevalidation): Deleted.

2015-03-27  Oliver Hunt  <oliver@apple.com>

        Forward additional CFNetwork ATS information to child processes
        https://bugs.webkit.org/show_bug.cgi?id=143136

        Reviewed by Anders Carlsson.

        Add additional process creation parameter information, and pass it
        to the child processes that actually use CFNetwork.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        * Shared/Network/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * Shared/Network/NetworkProcessCreationParameters.h:
        * Shared/Plugins/PluginProcessCreationParameters.cpp:
        (WebKit::PluginProcessCreationParameters::encode):
        (WebKit::PluginProcessCreationParameters::decode):
        * Shared/Plugins/PluginProcessCreationParameters.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::platformInitializePluginProcess):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-03-27  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
        https://bugs.webkit.org/show_bug.cgi?id=143125
        <rdar://problem/20321172>

        Reviewed by Antti Koivisto.

        We Previously only cached responses with status codes that are cacheable
        by default [1]. However, RFC 7234 [2] allows us to cache responses with
        other status codes, as long as they have explicit headers allowing
        caching:
        - 'Expires' header field
        - 'max-age' response directive

        This patch updates our caching policy accordingly to improve efficiency.

        [1] http://tools.ietf.org/html/rfc7231#page-48
        [2] http://tools.ietf.org/html/rfc7234#section-4.3.2

        Test: http/tests/cache/disk-cache/disk-cache-307-status-code.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canStore):

2015-03-26  Antti Koivisto  <antti@apple.com>

        Respect cache-control directives in request
        https://bugs.webkit.org/show_bug.cgi?id=143121
        rdar://problem/19714040

        Reviewed by Chris Dumez.

        Better support for https://tools.ietf.org/html/rfc7234#section-5.2.1

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canUse):

            Consider requests with Cache-control: no-cache and max-age=0 expired.

        (WebKit::NetworkCache::canStore):

            Don't store requests with Cache-control: no-store.

        (WebKit::NetworkCache::Cache::store):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
        (WebKit::NetworkCache::storeDecisionToDiagnosticKey):

2015-03-25  Jon Honeycutt  <jhoneycutt@apple.com>

        iOS file upload panel menu items need icons
        <https://bugs.webkit.org/show_bug.cgi?id=143042>
        <rdar://problem/20178678>

        Reviewed by Andy Estes.

        * Platform/spi/ios/UIKitSPI.h:
        Declare new SPI methods _UIImageGetWebKitTakePhotoOrVideoIcon and
        _UIImageGetWebKitPhotoLibraryIcon().

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (photoLibraryIcon):
        (cameraIcon):
        If UIKit SPI exists, use it. Otherwise, return nil.

        (-[WKFileUploadPanel _showDocumentPickerMenu]):
        Use icons.

2015-03-26  Enrica Casucci  <enrica@apple.com>

        OS X build fix after r182037.

        Unreviewed.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _addFontPanelObserver]):
        (-[WKView removeWindowObservers]):
        (-[WKView observeValueForKeyPath:ofObject:change:context:]):

2015-03-26  Enrica Casucci  <enrica@apple.com>

        iOS build fix after r182037.

        Unreviewed.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _setEditable:]):

2015-03-26  Enrica Casucci  <enrica@apple.com>

        REGRESSION(r1807689): Slower startup time for WKWebView.
        https://bugs.webkit.org/show_bug.cgi?id=143115
        rdar://problem/20233711

        Reviewed by Anders Carlsson.

        In http://trac.webkit.org/changeset/180768 we added an observer to
        track visibility of the NSFontPanel to ensure we could fetch the font
        information for the current selection when the panel first becomes visible.
        It turns out that adding the observer requires the shared font panel
        object to be created.
        That is apparently a very expensive operation that is regressing
        the initialization time for the WKWebView.
        We should initialize the NSFontPanel lazily, only when we make the entire
        view editable.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _setEditable:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView addWindowObserversForWindow:]):
        (-[WKView _addFontPanelObserver]):
        (-[WKView removeWindowObservers]):
        (-[WKView observeValueForKeyPath:ofObject:change:context:]):
        * UIProcess/API/mac/WKViewInternal.h:

2015-03-26  Alex Christensen  <achristensen@webkit.org>

        Progress towards CMake on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=143112

        Reviewed by Chris Dumez.

        * CMakeLists.txt:
        * PlatformMac.cmake:
        * UIProcess/Cocoa/WebPageProxyCocoa.mm:

2015-03-26  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Add private API to override the network disk cache size
        https://bugs.webkit.org/show_bug.cgi?id=143113
        <rdar://problem/20315669>

        Reviewed by Antti Koivisto.

        Add private API to let the client override the network disk cache size.
        By default, the network disk cache is automatically determined based on
        the CacheModel and the available disk space. However, for testing
        purposes, it can be used for the client-side to be able to override
        the disk cache size.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::setMaximumSize):
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformSetCacheModel):
        * Shared/Network/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * Shared/Network/NetworkProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
        (-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::WebProcessPool::ensureNetworkProcess):
        * UIProcess/WebProcessPool.h:

2015-03-26  Andreas Kling  <akling@apple.com>

        [Darwin] Boost the web process QoS level while handling a synchronous IPC message.
        <https://webkit.org/b/142988>
        <rdar://problem/20264346>

        Reviewed by Antti Koivisto and Anders Carlsson.

        Add a mechanism for IPC::Connection to boost the main thread for the duration
        of processing a synchronous message.

        This fixes an issue where the UI process would block on a synchronous request
        to the web process that was being carried out at a lower QoS level.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::Connection): Save the main thread's pthread_t while we have
        a chance to retreive it.

        (IPC::Connection::processIncomingMessage): Optionally boost the main thread when
        processing an incoming message with the IsSyncMessage flag set.

        * Platform/IPC/Connection.h:
        (IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Added. When this mode is
        enabled, Connection will give a temporary QoS override to the main thread when
        receiving a synchronous message. Ownership of the override is handed to the
        MessageDecoder, which resets the main thread QoS in its destructor.

        * Platform/IPC/MessageDecoder.cpp:
        (IPC::MessageDecoder::~MessageDecoder): Remove any QoS override owned by this message.

        * Platform/IPC/MessageDecoder.h:
        (IPC::MessageDecoder::setQOSClassOverride): Added. Takes ownership of a QoS override
        to make sure it stays in effect until this message has been dispatched.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection): Set up main thread QoS boosting for the
        web process's connection to the UI process.

2015-03-26  Ryosuke Niwa  <rniwa@webkit.org>

        Cursor doesn't change back to pointer when leaving Mail
        https://bugs.webkit.org/show_bug.cgi?id=132038

        Reviewed by Anders Carlsson.

        Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
        AppKit will reset the cursor as it leaves the WebView.

        We use nil cursor here since we manually update the cursor by calling [NSCursor set].

        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):

2015-03-26  Michael Catanzaro  <mcatanzaro@igalia.com>

        [Linux] SeccompFilters: improve the port-agnostic whitelist
        https://bugs.webkit.org/show_bug.cgi?id=140064

        Reviewed by Žan Doberšek.

        Allow the web process to access several files and directories that it
        was previously prohibited from accessing. This makes the web process
        much less likely to break.

        * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
        (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):

2015-03-26  Antti Koivisto  <antti@apple.com>

        Remove unneeded isConditionalRequest check from NetworkResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=143096

        Reviewed by Anders Carlsson.

        This check is leftover from implementation that allowed disk cache to validate conditional
        request itself. The case can't happen as NetworkCache canRetrieve test does not allow
        conditional requests in the first place.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
        (WebKit::isConditionalRequest): Deleted.

2015-03-26  Antti Koivisto  <antti@apple.com>

        Rename Storage::Entry to Storage::Record
        https://bugs.webkit.org/show_bug.cgi?id=143101

        Reviewed by Chris Dumez.

        Lets have just one type called Entry in the cache code.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::update):
        (WebKit::NetworkCache::Cache::traverse):
        (WebKit::NetworkCache::Cache::dumpContentsToFile):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):
        (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
        (WebKit::NetworkCache::Entry::decodeStorageRecord):
        (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
        (WebKit::NetworkCache::Entry::buffer):
        (WebKit::NetworkCache::Entry::shareableResourceHandle):
        (WebKit::NetworkCache::Entry::encode): Deleted.
        (WebKit::NetworkCache::Entry::decode): Deleted.
        (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry): Deleted.
        * NetworkProcess/cache/NetworkCacheEntry.h:
        (WebKit::NetworkCache::Entry::sourceStorageRecord):
        (WebKit::NetworkCache::Entry::sourceStorageEntry): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
        (WebKit::NetworkCache::decodeRecordMetaData):
        (WebKit::NetworkCache::decodeRecordHeader):
        (WebKit::NetworkCache::decodeRecord):
        (WebKit::NetworkCache::encodeRecordMetaData):
        (WebKit::NetworkCache::encodeRecordHeader):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::retrieveFromMemory):
        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::update):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
        (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
        (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
        (WebKit::NetworkCache::EntryMetaData::EntryMetaData): Deleted.
        (WebKit::NetworkCache::decodeEntryMetaData): Deleted.
        (WebKit::NetworkCache::decodeEntryHeader): Deleted.
        (WebKit::NetworkCache::decodeEntry): Deleted.
        (WebKit::NetworkCache::encodeEntryMetaData): Deleted.
        (WebKit::NetworkCache::encodeEntryHeader): Deleted.
        * NetworkProcess/cache/NetworkCacheStorage.h:

2015-03-26  Chris Dumez  <cdumez@apple.com>

        [WK2] Let the compiler generate the NetworkCache::Key move constructor
        https://bugs.webkit.org/show_bug.cgi?id=143079

        Reviewed by Antti Koivisto.

        Let the compiler generate the NetworkCache::Key move constructor. The
        generated one will do exactly the same thing as the one we had except
        that it will move the m_hash member as well. I don't see any reason why
        we weren't moving this member before (it is an std::array<uint8_t, 16>).

        Also have the compiler generate a move assignment operator for
        consistency. Although it is not currently useful, it could be at some
        point.

        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::Key::Key): Deleted.
        * NetworkProcess/cache/NetworkCacheKey.h:

2015-03-26  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Compute if a cached response has expired only when actually needed
        https://bugs.webkit.org/show_bug.cgi?id=143070

        Reviewed by Antti Koivisto.

        Compute if a cached response has expired only when actually needed:
        - This is not a history navigation
        and
        - It does not have "Cache-Control: no-cache" header

        Previously, we would always determine if the response has expired and
        we often end up not using this information.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::responseHasExpired):
        (WebKit::NetworkCache::canUse):

2015-03-26  Zan Dobersek  <zdobersek@igalia.com>

        Avoid the Vector<> copy in WebTouchEvent constructor
        https://bugs.webkit.org/show_bug.cgi?id=143043

        Reviewed by Carlos Garcia Campos.

        Have the WebTouchEvent accept a Vector<> rvalue.
        The relevant code is updated so the Vector<> object is moved
        through the call chain and finally into the WebTouchEvent constructor.

        * Shared/NativeWebTouchEvent.h:
        * Shared/WebEvent.h:
        * Shared/WebTouchEvent.cpp:
        (WebKit::WebTouchEvent::WebTouchEvent):
        * Shared/efl/WebEventFactory.cpp:
        (WebKit::WebEventFactory::createWebTouchEvent):
        * Shared/gtk/NativeWebTouchEventGtk.cpp:
        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
        * Shared/gtk/WebEventFactory.cpp:
        (WebKit::WebEventFactory::createWebTouchEvent):
        * Shared/gtk/WebEventFactory.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseTouchEvent):

2015-03-25  Chris Dumez  <cdumez@apple.com>

        [WK2] WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always call the FramePolicyFunction
        https://bugs.webkit.org/show_bug.cgi?id=143036
        <rdar://problem/20252438>
        <rdar://problem/13811738>

        Reviewed by Alexey Proskuryakov.

        WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always
        call the FramePolicyFunction. Previously, it would fail to do in 2
        cases:
        - m_frame->page() returns null
        or
        - webPage->sendSync() returns false

        If the FramePolicyFunction is not called, we will fail to clear the
        callback in the PolicyChecker and
        DocumentLoader::continueAfterContentPolicy() will not be called.

        DocumentLoader::continueAfterContentPolicy() is in charge of resetting
        m_waitingForContentPolicy flag to false. This could therefore explain
        the following assertion being hit in DocumentLoader::detachFromFrame()
        (see <rdar://problem/20252438>):
        RELEASE_ASSERT(!m_waitingForContentPolicy)

        Also, as the PolicyChecker callback is not cleared, it could make it
        possible for DocumentLoader::continueAfterContentPolicy() to be called
        *after* the load is finished, when later canceling the PolicyCallback:
        FrameLoader::stopAllLoaders()
         -> PolicyChecker::stopCheck()
          -> PolicyCallback::cancel()
           -> DocumentLoader::continueAfterContentPolicy(PolicyIgnore)

        Calling continueAfterContentPolicy(PolicyIgnore) after the load is
        finished would be bad and could explain some of the crashes we've seen
        in DocumentLoader::continueAfterContentPolicy() ->
        DocumentLoader:: stopLoadingForPolicyChange() (see
        <rdar://problem/13811738>).

        This patch also applies the same fix to
        dispatchDecidePolicyForNewWindowAction() and
        dispatchDecidePolicyForNavigationAction() as they use the same pattern.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

2015-03-25  Tim Horton  <timothy_horton@apple.com>

        Add a preference to prevent "user-scalable=no" from having any effect
        https://bugs.webkit.org/show_bug.cgi?id=143032

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        Add a preference and push it to the ViewportConfiguration.

2015-03-25  Beth Dakin  <bdakin@apple.com>

        REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
        https://bugs.webkit.org/show_bug.cgi?id=143064
        -and corresponding-
        rdar://problem/20251440

        Reviewed by Tim Horton.

        The TextIndicator was getting set to nil by the call to 
        _dismissContentRelativeChildWindows in mouseDown. That line of code was added by 
        http://trac.webkit.org/changeset/177242 to work around a bug in another component 
        that has now been resolved, so it no longer appears to be necessary. 

        * UIProcess/API/mac/WKView.mm:
        (-[WKView mouseDown:]):

2015-03-25  Anders Carlsson  <andersca@apple.com>

        Add network and application cache directories to WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=143063

        Reviewed by Sam Weinig.

        Create a WebKit directory under ~/Library/Caches/<Bundle ID> for non-sandboxed applications,
        and ~/Library/Caches for sandboxed applications. Create NetworkCache and OfflineWebApplicationCache
        subdirectories. These directories will be used with the modern WebKit API.

        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        * UIProcess/WebsiteData/WebsiteDataStore.h:

2015-03-25  Sam Weinig  <sam@webkit.org>

        Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.

        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
        * UIProcess/API/C/WKUserContentFilterRef.cpp:
        (WKUserContentFilterCreate):
        * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
        (-[_WKUserContentFilter initWithName:serializedRules:]):

2015-03-25  Sam Weinig  <sam@webkit.org>

        [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
        https://bugs.webkit.org/show_bug.cgi?id=143059

        Reviewed by Alex Christensen.

        * Shared/WebCompiledContentExtension.cpp:
        * Shared/WebCompiledContentExtension.h:
        (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient):
        (WebKit::LegacyContentExtensionCompilationClient::writeBytecode):
        (WebKit::LegacyContentExtensionCompilationClient::writeActions):
        Add subclass of ContentExtensionCompilationClient for use with the non-file backed content
        extensions.

        * UIProcess/API/C/WKUserContentFilterRef.cpp:
        (WKUserContentFilterCreate):
        * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
        (-[_WKUserContentFilter initWithName:serializedRules:]):
        Update to use the new interface of compileRuleList().

2015-03-25  Ryosuke Niwa  <rniwa@webkit.org>

        Web Inspector: Switching tabs to window with inspector open prohibits typing into console
        https://bugs.webkit.org/show_bug.cgi?id=126800

        Reviewed by Anders Carlsson.

        This is a regression from r85356 and r83814. These two patches made WKWebView clear its selection
        when WKView resigns the first responder without ever restoring it even if WKView later becomes
        the first responder again. This is problematic when a text field or a editing host element had been
        focused and selected prior to the resignation since the editing code uses the selection to determine
        the editability of the element.

        Fixed the bug by restoring selection in [WKView becomeFirstResponder] if the selection is empty.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView becomeFirstResponder]):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-03-25  Beth Dakin  <bdakin@apple.com>

        REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
        force preview
        https://bugs.webkit.org/show_bug.cgi?id=143057
        -and corresponding-
        rdar://problem/20251436

        Reviewed by Tim Horton.

        Always call _page->immediateActionDidUpdate() so that the EventHandler’s 
        ImmediateActionStage is appropriately updated.
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):

        Update the EventHandler’s ImmediateActionStage.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::immediateActionDidUpdate):

2015-03-25  Antti Koivisto  <antti@apple.com>

        Separate entry decoding from validation
        https://bugs.webkit.org/show_bug.cgi?id=143052

        Reviewed by Chris Dumez.

        Make NetworkCache::Cache a class and move it to a file of its own.
        Move the encoding/decoding code there.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::sendReplyToSynchronousRequest):
        (WebKit::NetworkResourceLoader::start):
        (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
        (WebKit::NetworkResourceLoader::validateCacheEntry):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::collectVaryingRequestHeaders):
        (WebKit::NetworkCache::canUse):

            Focused function for deciding if we can use a cache entry and if it needs validation.

        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::update):
        (WebKit::NetworkCache::Cache::traverse):
        (WebKit::NetworkCache::encodeStorageEntry): Deleted.
        (WebKit::NetworkCache::decodeStorageEntry): Deleted.
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheEntry.cpp: Added.
        (WebKit::NetworkCache::Entry::Entry):
        (WebKit::NetworkCache::Entry::encode):
        (WebKit::NetworkCache::Entry::decode):
        (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry):
        (WebKit::NetworkCache::Entry::buffer):
        (WebKit::NetworkCache::Entry::shareableResourceHandle):
        (WebKit::NetworkCache::Entry::needsValidation):
        (WebKit::NetworkCache::Entry::setNeedsValidation):
        * NetworkProcess/cache/NetworkCacheEntry.h: Added.
        (WebKit::NetworkCache::Entry::key):
        (WebKit::NetworkCache::Entry::timeStamp):
        (WebKit::NetworkCache::Entry::response):
        (WebKit::NetworkCache::Entry::varyingRequestHeaders):
        (WebKit::NetworkCache::Entry::sourceStorageEntry):
        * NetworkProcess/cache/NetworkCacheStatistics.h:
        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
        (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
        (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
        * WebKit2.xcodeproj/project.pbxproj:

2015-03-25  David Hyatt  <hyatt@apple.com>

        Add a pref to enable the new block-inside-inline model
        https://bugs.webkit.org/show_bug.cgi?id=143050

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetNewBlockInsideInlineModelEnabled):
        (WKPreferencesGetNewBlockInsideInlineModelEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-03-25  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] WebUserMediaClient::pageDestroyed() virtual method should be marked as override
        https://bugs.webkit.org/show_bug.cgi?id=143046

        Reviewed by Carlos Garcia Campos.

        * WebProcess/WebCoreSupport/WebUserMediaClient.h: Mark the WebUserMediaClient::pageDestroyed()
        method, inherited from the WebCore::UserMediaClient, as an override.

2015-03-25  Zan Dobersek  <zdobersek@igalia.com>

        [GTK][WK2] WebPageProxy::failedToShowPopupMenu() virtual method should be marked as override
        https://bugs.webkit.org/show_bug.cgi?id=143045

        Reviewed by Carlos Garcia Campos.

        * UIProcess/WebPageProxy.h: Mark the failedToShowPopupMenu(), inherited from
        the WebPopupMenuProxy::Client class, as overridden.

2015-03-25  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Clean up DrawingAreaImpl vtable overrides
        https://bugs.webkit.org/show_bug.cgi?id=143044

        Reviewed by Carlos Garcia Campos.

        Declare virtual methods of the DrawingAreaImpl class as overridden where necessary.

        * WebProcess/WebPage/DrawingAreaImpl.h:
        (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Deleted.
        (WebKit::DrawingAreaImpl::layerTreeHost): Deleted.

2015-03-24  Ryosuke Niwa  <rniwa@webkit.org>

        Inspector doesn't get focused when opened in dock mode
        https://bugs.webkit.org/show_bug.cgi?id=143030

        Reviewed by Anders Carlsson.

        The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
        which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
        subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformBringToFront):
        (WebKit::WebInspectorProxy::platformAttach):

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Responses with 302 HTTP Status Code should not be cached
        https://bugs.webkit.org/show_bug.cgi?id=143028
        <rdar://problem/19714040>

        Reviewed by Antti Koivisto.

        Responses with 302 HTTP Status Code should not be cached as per
        RFC 7231:
        http://tools.ietf.org/html/rfc7231#section-6.1

        This patch updates our disk cache policy accordingly.

        Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canStore):

2015-03-24  Anders Carlsson  <andersca@apple.com>

        Fix crash in WebKit::RemoteObjectRegistry::sendInvocation
        https://bugs.webkit.org/show_bug.cgi?id=143027
        rdar://problem/20208674

        Reviewed by Sam Weinig.

        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (-[WKWebProcessPlugInBrowserContextController dealloc]):
        Make sure to invalidate the _WKRemoteObjectRegistry like we do in the UI process.

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Responses with 204 HTTP Status Code should be cacheable by default
        https://bugs.webkit.org/show_bug.cgi?id=143020
        <rdar://problem/20281529>

        Reviewed by Antti Koivisto.

        Make responses with 204 HTTP Status Code cacheable by default, as
        per RFC 7231:
        http://tools.ietf.org/html/rfc7231#section-6.3.5

        Test: http/tests/cache/disk-cache/disk-cache-204-status-code.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canStore):

2015-03-24  Enrica Casucci  <enrica@apple.com>

        [iOS] Remove unused keyboard code in WKSelectPopover class.
        https://bugs.webkit.org/show_bug.cgi?id=143021

        Reviewed by Joseph Pecoraro.

        WKSelectPopover created an instance of UIKeyboard that was
        initialized in initWithView but never used. Removing the
        obsolete code.

        * UIProcess/ios/forms/WKFormSelectPopover.mm:
        (-[WKSelectPopover initWithView:hasGroups:]):

2015-03-24  Dan Bernstein  <mitz@apple.com>

        WebKit2 part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
        https://bugs.webkit.org/show_bug.cgi?id=143023

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): If the view is in a
        window, use CARenderServerRenderLayerWithTransform to synchronously capture a snapshot of
        its layer tree into an IOSurfcae, then call the completion handler with an image created
        from the IOSurface.

2015-03-24  Beth Dakin  <bdakin@apple.com>

        Add events related to force click gesture
        https://bugs.webkit.org/show_bug.cgi?id=142836
        -and corresponding-
        rdar://problem/20210239

        Reviewed by Dean Jackson.

        ActionMenuHitTestResult has a new bool indicating whether to not the HitTestResult 
        will prevent default. 
        * Shared/mac/ActionMenuHitTestResult.h:
        * Shared/mac/ActionMenuHitTestResult.mm:
        (WebKit::ActionMenuHitTestResult::encode):
        (WebKit::ActionMenuHitTestResult::decode):

        Send immediateActionDidUpdate and the normalized force over the the WebProcess.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::immediateActionDidUpdate):
        * UIProcess/WebPageProxy.h:

        We need a dummy animation controller when web content is overriding the default 
        behavior.
        * UIProcess/mac/WKImmediateActionController.mm:

        Send along the update information.
        (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):

        Use the dummy animation controller if default has been prevented.
        (-[WKImmediateActionController _defaultAnimationController]):
        (-[WKImmediateActionController _updateImmediateActionItem]):

        Keep track of whether m_lastActionMenuHitTes prevented the default immediate 
        action behavior.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

        Call dispatchMouseForceMayBegin() at hit test time.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):

        Call dispatchMouseForceChanged() if appropriate.
        (WebKit::WebPage::immediateActionDidUpdate):

        Call dispatchMouseForceCancelled() if appropriate.
        (WebKit::WebPage::immediateActionDidCancel):

        Call dispatchMouseForceDown() if appropriate.
        (WebKit::WebPage::immediateActionDidComplete):

2015-03-24  Anders Carlsson  <andersca@apple.com>

        Fix designated initializer violations
        https://bugs.webkit.org/show_bug.cgi?id=143016
        rdar://problem/20268858

        Reviewed by Dan Bernstein.

        Move -[WKProcessPool _initWithConfiguration:] to a class extension so we can make it the designated initializer.

        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _initWithConfiguration:]):
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Responses with 404 HTTP Status Code should be cacheable by default
        https://bugs.webkit.org/show_bug.cgi?id=143014
        <rdar://problem/20280310>

        Reviewed by Antti Koivisto.

        Make responses with 404 HTTP Status Code cacheable by default, as
        per RFC 7231:
        http://tools.ietf.org/html/rfc7231#section-6.5.4

        Test: http/tests/cache/disk-cache/disk-cache-404-status-code.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canStore):

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Remove NetworkCache FIXME comment about caching responses to OPTIONS requests
        https://bugs.webkit.org/show_bug.cgi?id=143009

        Reviewed by Andreas Kling.

        Remove NetworkCache FIXME comment about caching responses to OPTIONS
        method as RFC 7234 says "Responses to the OPTIONS method are not
        cacheable" [1].

        [1] http://tools.ietf.org/html/rfc7231#page-31

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canRetrieve):

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] NetworkCache retrievals fail for entries with no body
        https://bugs.webkit.org/show_bug.cgi?id=142979
        <rdar://problem/20264100>

        Reviewed by Antti Koivisto.

        NetworkCache retrievals were failing for entries with no body because
        decodeEntry() doesn't correctly handle this case. In particular, the
        following check fails:
        "metaData.bodyOffset + metaData.bodySize == fileData.size()".
        This is because bodyOffset is pageSize-aligned.

        As a result, the following resource on apple.com is stored in the cache
        but we fail to reuse it and reload it from the network every time:
        http://images.apple.com/home/styles/promos.css

        This patch updates decodeEntry() to create a null Data object for the
        body if bodySize is 0.

        * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
        (WebKit::NetworkCache::Data::data):
        Do not attempt to initialize m_data if m_dispatchData is null as the
        call to dispatch_data_create_map() would then crash. We now return
        null in this case. This is needed as decodeStorageEntry() in
        NetworkCache.cpp constructs a SharedBuffer from
        storageEntry.body.data() and the body may be null.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::decodeEntry):

2015-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] The WebKit network cache does not cache responses with "Content-Disposition: attachment" header
        https://bugs.webkit.org/show_bug.cgi?id=142989
        <rdar://problem/20265992>

        Reviewed by Antti Koivisto.

        Update our WebKit network cache policy to cache responses with
        "Content-Disposition: attachment" header. There is no reason we cannot
        cache these and our memory cache already does.

        This was causing a decent amount of cache misses in the wild. I have
        noticed for example that when loading disney.com, we fail to cache the
        following resources because of this policy:
        http://pagead2.googlesyndication.com/pagead/osd.js
        http://pagead2.googlesyndication.com/pagead/show_companion_ad.js

        Those resources have Cache-Control headers that indicate they are meant
        to be cacheable.

        Test: http/tests/cache/disk-cache-validation-attachment.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canStore):

2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>

        Unreviewed, another attempt to fix 32-bit build after r181881.

        * UIProcess/WebInspectorProxy.h:

2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>

        Unreviewed, attempt to fix 32-bit build after r181881.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:

2015-03-19  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Support attaching to another view other than the WKView
        https://bugs.webkit.org/show_bug.cgi?id=142892

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKInspector.cpp:
        (WKInspectorAttach): Drive by fix so it used the last attachment side.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _inspectorAttachmentView]): Added.
        (-[WKView _setInspectorAttachmentView:]): Added.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::createInspectorPage):
        (WebKit::WebInspectorProxy::attachAvailabilityChanged):
        Use platformCanAttach as a final check incase there is a different
        attachment view that the platform knows about.

        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::attachmentSide): Added.
        (WebKit::WebInspectorProxy::platformCanAttach): Added.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
        (WebKit::WebInspectorProxy::closeTimerFired):
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        (WebKit::WebInspectorProxy::platformCanAttach):
        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
        (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
        (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
        (WebKit::WebInspectorProxy::platformAttach):
        (WebKit::WebInspectorProxy::platformDetach):
        Use the _inspectorAttachmentView and change how the frame change notification
        is observed and follow the attachment view as it changes.

2015-03-23  Tim Horton  <timothy_horton@apple.com>

        Images shared to photos via action menu are padded with zeroes at the end
        https://bugs.webkit.org/show_bug.cgi?id=142985

        Reviewed by Anders Carlsson.

        * Shared/mac/ActionMenuHitTestResult.h:
        * Shared/mac/ActionMenuHitTestResult.mm:
        (WebKit::ActionMenuHitTestResult::encode):
        (WebKit::ActionMenuHitTestResult::decode):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        Send the size of the image separately from the SharedMemory.
        The SharedMemory's size can be rounded up, so we need to keep the original
        size around in order to write the data to disk.

        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _hitTestResultImage]):
        (-[WKActionMenuController _addImageToPhotos:]):
        Use the image size instead of the SharedMemory size.

2015-03-23  Enrica Casucci  <enrica@apple.com>

        [iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
        https://bugs.webkit.org/show_bug.cgi?id=142913
        rdar://problem/16400033

        Reviewed by Sam Weinig.

        When looking for the best candidate range at the given position,
        we should skip nodes that don't have a renderer.
        This is a speculative fix.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::rangeForWebSelectionAtPosition):

2015-03-23  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION (Yosemite): WKView visibility notifications are messed up
        https://bugs.webkit.org/show_bug.cgi?id=142945

        Reviewed by Tim Horton.

        As these notifications cannot be used by NSView subclasses, create a separate
        object for observing them.

        * UIProcess/API/mac/WKView.mm:
        (-[WKWindowVisibilityObserver initWithView:]):
        (-[WKWindowVisibilityObserver startObserving:]):
        (-[WKWindowVisibilityObserver stopObserving:]):
        (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
        (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
        (-[WKView addWindowObserversForWindow:]):
        (-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
        which we never start to observe.
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        * UIProcess/API/mac/WKViewInternal.h:

2015-03-23  Anders Carlsson  <andersca@apple.com>

        Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
        https://bugs.webkit.org/show_bug.cgi?id=133692
        rdar://problem/17255947

        Reviewed by Alexey Proskuryakov.

        Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
        where we need the plug-in to stay around after the call.

        * Shared/Plugins/NPObjectMessageReceiver.cpp:
        (WebKit::NPObjectMessageReceiver::invoke):
        (WebKit::NPObjectMessageReceiver::invokeDefault):
        (WebKit::NPObjectMessageReceiver::getProperty):
        (WebKit::NPObjectMessageReceiver::setProperty):
        (WebKit::NPObjectMessageReceiver::construct):

2015-03-23  Anders Carlsson  <andersca@apple.com>

        Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
        https://bugs.webkit.org/show_bug.cgi?id=142975
        rdar://problem/19863930

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKWebView.h:

2015-03-23  Tim Horton  <timothy_horton@apple.com>

        Add a share item to the link action menu
        https://bugs.webkit.org/show_bug.cgi?id=142961
        <rdar://problem/19198374>

        Reviewed by Beth Dakin.

        * UIProcess/mac/WKActionMenuController.mm:
        (-[WKActionMenuController _hitLinkURL]):
        Factor out _hitLinkURL from various places.

        (-[WKActionMenuController _openURLFromActionMenu:]):
        (-[WKActionMenuController _addToReadingListFromActionMenu:]):
        (-[WKActionMenuController _defaultMenuItemsForVideo]):
        (-[WKActionMenuController _defaultMenuItemsForImage]):
        (-[WKActionMenuController _createActionMenuItemForTag:]):
        (-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
        Adopt -[NSMenuItem standardShareMenuItemWithItems].
        All of the null-checking is unnecessary as it's impossible to enter
        these functions with a null image/etc.

        (-[WKActionMenuController _defaultMenuItemsForLink]):
        * Shared/API/c/WKActionMenuItemTypes.h:
        Add a 'Share' item to the link menu.

2015-03-23  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
        https://bugs.webkit.org/show_bug.cgi?id=142964

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
        instead of C's abs(). The templated nature of std::abs() ensures the proper
        computation that matches the types of the passed-in values, and shuts down
        a warning when compiling with Clang.

2015-03-23  Zan Dobersek  <zdobersek@igalia.com>

        [GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
        https://bugs.webkit.org/show_bug.cgi?id=142963

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitBackForwardList.cpp:
        (webkitBackForwardListChanged): This function only reads from the passed-in
        Vector of removed items, so only a const lvalue reference to the Vector
        is needed.
        * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:

2015-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add a configure option to build without Redirected XComposite Window
        https://bugs.webkit.org/show_bug.cgi?id=142865

        Reviewed by Žan Doberšek.

        Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
        USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseRealize): Use the XID of the WebKitWebView
        window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
        is disabled.
        (webkitWebViewRenderAcceleratedCompositingResults):
        (resizeWebKitWebViewBaseFromAllocation):
        (webkitWebViewBaseEnterAcceleratedCompositingMode):
        (webkitWebViewBaseExitAcceleratedCompositingMode):
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        * UIProcess/gtk/RedirectedXCompositeWindow.h:

2015-03-22  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
        https://bugs.webkit.org/show_bug.cgi?id=142940

        Reviewed by Sam Weinig.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.

2015-03-22  Anders Carlsson  <andersca@apple.com>

        _WKWebsiteDataStore should clear WebSQL databases
        https://bugs.webkit.org/show_bug.cgi?id=142947
        rdar://problem/20242174

        Reviewed by Sam Weinig.

        * Shared/WebsiteData/WebsiteDataTypes.h:
        Add WebsiteDataTypeWebSQLDatabases.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        Initialize configuration.webSQLDatabaseDirectory.

        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        Add WKWebsiteDataTypeWebSQLDatabases.

        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
        (dataTypesToString):
        Handle WKWebsiteDataTypeWebSQLDatabases.

        * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        Initialize m_webSQLDatabaseDirectory and add a queue member variable.

        (WebKit::WebsiteDataStore::fetchData):
        Fetch database origins.
    
        (WebKit::WebsiteDataStore::removeData):
        Remove databases.

        * UIProcess/WebsiteData/WebsiteDataStore.h:
        Add new members.

2015-03-22  Dan Bernstein  <mitz@apple.com>

        [iOS] Expose WebPageProxy::setInitialFocus as SPI
        https://bugs.webkit.org/show_bug.cgi?id=142951

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
        Just calls through to WKWebContentView, but allows a nil completion handler.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:

        * UIProcess/API/mac/WKView.mm:
        (-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
        WebPageProxy::setInitialFocus.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
        call it.
        * UIProcess/WebPageProxy.h:

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
        Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
        focused and if so, becomes first responder, then calls the completion handler.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
        callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
        process won’t ignore any StartAssistingNode message resulting from the focus change.
        * WebProcess/WebPage/WebPage.h:

        * WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.

2015-03-21  Dean Jackson  <dino@apple.com>

        Remove the prefix for CSS Transforms
        https://bugs.webkit.org/show_bug.cgi?id=142927
        <rdar://problem/11568151>

        Reviewed by Simon Fraser.

        Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<TextureMapperAnimation>::encode):

2015-03-21  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL][GTK] Make WebKit2's generate-forwarding-headers.pl less verbose
        https://bugs.webkit.org/show_bug.cgi?id=142908

        Reviewed by Žan Doberšek.

        * Scripts/generate-forwarding-headers.pl:
        (createForwardingHeadersForFramework):

2015-03-21  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r181824.
        https://bugs.webkit.org/show_bug.cgi?id=142935

        Broke Windows build (Requested by ap on #webkit).

        Reverted changeset:

        "Remove the prefix for CSS Transforms"
        https://bugs.webkit.org/show_bug.cgi?id=142927
        http://trac.webkit.org/changeset/181824

2015-03-20  Dean Jackson  <dino@apple.com>

        Remove the prefix for CSS Transforms
        https://bugs.webkit.org/show_bug.cgi?id=142927
        <rdar://problem/11568151>

        Reviewed by Simon Fraser.

        Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<TextureMapperAnimation>::encode):

2015-03-20  Chris Dumez  <cdumez@apple.com>

        [WK2] NetworkCache retrievals sometimes fail on browser startup
        https://bugs.webkit.org/show_bug.cgi?id=142925
        <rdar://problem/20245368>

        Reviewed by Antti Koivisto.

        NetworkCache retrievals sometimes fail on browser startup for resources
        that are actually cached. The reason is that we are using a bloom filter
        for performance reasons to avoid unnecessary disk I/O and this bloom
        filter is populated on start up in a background thread by traversing the
        cache files on disk. However, when restoring the tabs on start-up we
        sometimes query this bloom filter before it is completely populated and
        we thus fail to retrieve cached entries because we think they don't
        exist and don't check the disk.

        This patch adds an "isPopulatingContentsFilter" flag that is turned ON
        on start up while we are populating the bloon filter. We then bypass
        the bloom filter and send queries directly to disk on start up if this
        flag is ON.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::initialize):
        (WebKit::NetworkCache::Storage::retrieve):
        (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
        (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::cacheMayContain):

2015-03-20  Chris Dumez  <cdumez@apple.com>

        [WK2] Allow stale content when restoring the browser's session state
        https://bugs.webkit.org/show_bug.cgi?id=142916
        <rdar://problem/20243493>

        Reviewed by Darin Adler.

        Allow stale content when restoring the browser's session state
        (restoring all tabs from previous session), e.g.
        - Via History > Reopen All windows from previous session on Safari
        - Happens on startup for MobileSafari

        I have verified that using "Open in tabs" on a bookmarks folder
        still does fresh loads (rdar://problem/8131355) as it is not using
        the restoreFromSessionState() code path.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reattachToWebProcessForReload):
        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
        (WebKit::WebPageProxy::goForward):
        (WebKit::WebPageProxy::goBack):
        (WebKit::WebPageProxy::goToBackForwardItem):
        (WebKit::WebPageProxy::restoreFromSessionState):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::goToBackForwardItem):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-03-20  Beth Dakin  <bdakin@apple.com>

        [Immediate Actions] Should re-enable immediate actions for iBooks
        https://bugs.webkit.org/show_bug.cgi?id=142915
        -and corresponding-
        rdar://problem/19585689

        Reviewed by Tim Horton.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:processPool:configuration:webView:]):

2015-03-20  Alex Christensen  <achristensen@webkit.org>

        Progress towards CMake on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=136003

        Reviewed by Chris Dumez.

        * PlatformMac.cmake:
        Add include directories and forwarding headers.
        * Shared/API/APIObject.h:
        (API::ObjectImpl::operator new):
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
        Fix some unused parameter warnings.

2015-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [CMake] Remove duplicated cmake function calls in WebKit2/CMakeLists.txt
        https://bugs.webkit.org/show_bug.cgi?id=142901

        Reviewed by Csaba Osztrogonác.

        add_depencencies(), install() can support multiple targets or location.
        We don't need to call it twice.

        * CMakeLists.txt: Additionaly move -DBUILDING_WEBKIT to PlatformGTK.cmake,
        because it is only used by GTK port.

2015-03-20  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Disable accelerated compositing on Wayland
        https://bugs.webkit.org/show_bug.cgi?id=142877

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
        accelerated compositing on Wayland until the proper support for it lands.

2015-03-19  Andy Estes  <aestes@apple.com>

        [Content Filtering] Add tests for unblock requests
        https://bugs.webkit.org/show_bug.cgi?id=142900

        Reviewed by Andreas Kling.

        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
        (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::contentFilterDidBlockLoad.
        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::didStartProvisionalLoad): Assigned a default-constructed ContentFilterUnblockHandler instead of calling clear().
        (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Renamed from contentFilterDidHandleNavigationAction.
        Updated to use ContentFilterUnblockHandler's new API.
        (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Deleted.
        * UIProcess/WebFrameProxy.h:
        (WebKit::WebFrameProxy::contentFilterDidBlockLoad): Renamed from setContentFilterUnblockHandler.
        (WebKit::WebFrameProxy::setContentFilterUnblockHandler): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Called WebFrameProxy::didHandleContentFilterUnblockNavigation.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): If the unblock handler needs the UI process,
        send WebPageProxy::ContentFilterDidBlockLoadForFrame. Oterwise, call PolicyChecker::setContentFilterUnblockHandler.

2015-03-20  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Properly guard X11-specific code in BackingStore::createBackend()
        https://bugs.webkit.org/show_bug.cgi?id=142875

        Reviewed by Martin Robinson.

        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit::BackingStore::createBackend): Guard the GTK- and X11-specific
        bit of code with PLATFORM(GTK) and PLATFORM(X11). Testing GDK_WINDOWING_X11
        ensures that the GTK+ dependency has X11 support, but does not ensure
        that WebKitGTK+ has been configured to build for X11 environments (which
        is what PLATFORM(X11) ensures).

2015-03-19  Chris Dumez  <cdumez@apple.com>

        [WK2] We should allow stale content when restoring a killed / crashed WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=142893
        <rdar://problem/19633737>
        <rdar://problem/19869257>

        Reviewed by Antti Koivisto.

        Allow stale content when restoring a killed / crashed WebProcess
        (similarly to a history navigation). This is actually what was intended
        as we call WebPage::goToBackForwardItem() in this case, which uses
        IndexedBackForward load type. However, this value was then ignored in
        FrameLoader::loadDifferentDocumentItem().

        This patch gets rid of the special casing in
        FrameLoader::loadDifferentDocumentItem() and makes it clear at call
        sites when calling goToBackForwardItem() if we should allow stale
        content or not. If goToBackForwardItem() is called with the
        allowStaleContent flag off, we'll keep using the IndexedBackForward
        frame load type. However, if the flag is on, we'll use the Standard
        frame load type and do a fresh load.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reattachToWebProcessForReload):
        Set allowStaleContent flag to true as we want to allow stale content
        when reloading a WebProcess after it crashed or was killed (behavior
        change).

        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
        Add allowStaleContent parameter so that call sites can decide which
        policy to use.

        (WebKit::WebPageProxy::goForward):
        (WebKit::WebPageProxy::goBack):
        Set allowStaleContent flag to true as this is our policy for history
        navigations.

        (WebKit::WebPageProxy::goToBackForwardItem):
        Add allowStaleContent parameter so that the call site can let us know
        what to do. This is useful as this is called not only for indexed
        back / forward navigations (allowing stale content) but also for
        restoring session state (forbidding state content:
        <rdar://problem/8131355>).

        (WebKit::WebPageProxy::restoreFromSessionState):
        Call goToBackForwardItem() with allowStaleContent flag set to false
        as users expect fresh contents in this case. This method is called
        when:
        - Tabs are restored on Safari / MobileSafari startup
        - Tabs are restored via "History > Reopen All windows from last session"

        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::goToBackForwardItem):
        Add allowStaleContent parameter and use "Standard" frame load type
        instead of "IndexedBackForward" if it is false. This is needed as
        "IndexedBackForward" frame load type allows using stale content.

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Add allowStaleContent flag to GoToBackForwardItem message.

2015-03-19  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Move MediaPlaybackTargetPicker
        https://bugs.webkit.org/show_bug.cgi?id=142889

        Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
        both WK2 and WK1.

        Reviewed by Tim Horton.

        * UIProcess/PageClient.h:
        * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
        * UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::devicePickerProxy):
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::createPlaybackTargetPicker):
        * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Removed.
        * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2015-03-19  Jessie Berlin  <jberlin@webkit.org>

        32-bit build fix after r181770.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController initWithWindow:webView:]):

2015-03-19  Anders Carlsson  <andersca@apple.com>

        Add support for deleting individual cache entries
        https://bugs.webkit.org/show_bug.cgi?id=142886

        Reviewed by Antti Koivisto.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        Remove an unnecessary call to cfURLCacheOrigins().

        (WebKit::clearDiskCacheEntries):
        Helper function for clearing disk cache entries. This handles both the old and new cache implementations.

        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        Call clearDiskCacheEntries if needed.

2015-03-19  Jer Noble  <jer.noble@apple.com>

        [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
        https://bugs.webkit.org/show_bug.cgi?id=142132

        Reviewed by Tim Horton.

        Use CALayer animations for the transition into and out of fullscreen.

        The fullscreen transition consists of three separate animations:
        1. An opacity animation for the black backdrop behind the fullscreen content
        2. A scale/translation animation from fullscreen element's initial screen to its final one.
        3. A clip animation from the fullscreen element's initial aspect ratio to its final one.

        The opacity animation will apply to the fullscreen window's content view's layer's
        background color. To separately animate the transform and mask of the web view's content, a
        layer-backed subview is added to the content view, and the scale/translation & clip
        animations are applied to its transform property and mask layer respectively.

        Utility methods to create each animation have been added, and each includes a parameter for
        the direction of the animation, so that the same methods can be used for entering and
        exiting fullscreen transitions.

        The user-visible changes to this new transition are when the aspect ratios of the initial
        and final screen locations are different: previously the transition would use a scale
        transform to "squish" the fullscreen content into the initial aspect ratio. The new
        transition instead "clips" the fullscreen content to the initial aspect ratio. For common
        operations such a <video> element with a different aspect ratio than the screen, this makes
        the black letterbox "grow" during the transition, and makes the transition overall much
        smoother.

        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController initWithWindow:webView:]): Create and initialze the clipping view.
        (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): _backgroundWindow was removed.
        (-[WKFullScreenWindowController enterFullScreen:]): Add the webView to the _clipView, not the contentView.
        (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): _backgroundWindow,
                _fadeAnimation, and _scaleAnimation are all removed.
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.  Hide the contentView's
                layer. Pause visibility updates.
        (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Resume visibility updates.
        (-[WKFullScreenWindowController close]): _fadeAnimation and _scaleAnimation are removed.
        (-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Return only the fullscreen
                window.
        (-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
        (zoomAnimation): Added.
        (maskAnimation): Added.
        (fadeAnimation): Added.
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Use the utility
                methods above to set up the animation.
        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
        (createBackgroundFullscreenWindow): Deleted.
        (windowFrameFromApparentFrames): Deleted.

2015-03-19  Enrica Casucci  <enrica@apple.com>

        <attachment> should put URLs on the pasteboard so that Finder can accept drops.
        https://bugs.webkit.org/show_bug.cgi?id=142801
        rdar://problem/19982527

        Reviewed by Tim Horton.

        This patch adds all the necessary support to write attachment elements into
        the pasteboard, including the promised type in WK2.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]):
        (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]):
        (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
        (-[WKView _setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setPromisedDataForImage):
        (WebKit::PageClientImpl::setPromisedDataForAttachment):
        (WebKit::PageClientImpl::setPromisedData): Deleted.
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::setPromisedDataForImage):
        (WebKit::WebPageProxy::setPromisedDataForAttachment):
        (WebKit::WebPageProxy::setPromisedData): Deleted.
        * WebProcess/WebCoreSupport/WebDragClient.h:
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::WebDragClient::declareAndWriteAttachment):
        (WebKit::WebDragClient::declareAndWriteDragImage):

2015-03-19  Anders Carlsson  <andersca@apple.com>

        Cache::remove should take a Key instead of an entry
        https://bugs.webkit.org/show_bug.cgi?id=142878

        Reviewed by Antti Koivisto.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::remove):
        * NetworkProcess/cache/NetworkCache.h:

2015-03-19  Chris Dumez  <cdumez@apple.com>

        Clean up DOMTimer related settings
        https://bugs.webkit.org/show_bug.cgi?id=142837

        Reviewed by Darin Adler.

        Stop setting the DOMTimers' default minimum interval to 4ms as this
        is now the default.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):

2015-03-19  Chris Dumez  <cdumez@apple.com>

        The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
        https://bugs.webkit.org/show_bug.cgi?id=142831
        <rdar://problem/20209957>

        Reviewed by Antti Koivisto.

        The network cache should ignore "no-cache" and "must-revalidate" as
        Cache-Control policy for history navigations to avoid unnecessary
        revalidation in this case. Our memory cache already behaves this way.

        On history navigation, our disk cache implementation currently
        revalidates unconditionally resources if "cache-control: no-cache" is
        used. It also revalidates expired resources if "cache-control:
        must-revalidate" is used. This is sub-optimal.

        RFC 7234 does not require us to do so [1]:
        """
          User agents often have history mechanisms, such as "Back" buttons and
          history lists, that can be used to redisplay a representation
          retrieved earlier in a session.

          The freshness model (Section 4.2) does not necessarily apply to
          history mechanisms.  That is, a history mechanism can display a
          previous representation even if it has expired.
        """

        Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.

        [1] https://tools.ietf.org/html/rfc7234#page-32
        [2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx

        Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::decodeStorageEntry):

2015-03-18  Simon Fraser  <simon.fraser@apple.com>

        Don't paint PDFs on every scroll
        https://bugs.webkit.org/show_bug.cgi?id=142857
        rdar://problem/20130207

        Reviewed by Tim Horton.
        
        Don't push a scale factor onto the PDF layer controller if it hasn't
        changed, since doing so causes a repaint.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):

2015-03-18  Anders Carlsson  <andersca@apple.com>

        Use && instead of & when deciding if the network cache should be cleared
        https://bugs.webkit.org/show_bug.cgi?id=142845

        Reviewed by Antti Koivisto.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteData):

2015-03-18  Anders Carlsson  <andersca@apple.com>

        Add WKContextGetWebsiteDataStore API
        https://bugs.webkit.org/show_bug.cgi?id=142832
        rdar://problem/16544715

        Reviewed by Sam Weinig.

        Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.

        * Shared/API/c/WKBase.h:
        Add new declaration.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::create):
        * UIProcess/API/APIWebsiteDataStore.h:
        Add a new function that takes a configuration.

        * UIProcess/API/C/WKAPICast.h:
        Add cast.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetWebsiteDataStore):
        Return the context's website data store.

        * UIProcess/API/C/WKContext.h:
        Add new declaration.

        * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
        * UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
        Add new files.

        * UIProcess/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
        Update now that WebProcessPool holds on to an API::WebsiteDataStore.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::WebProcessPool::createWebPage):
        * UIProcess/WebProcessPool.h:
        WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2015-03-18  Tim Horton  <timothy_horton@apple.com>

        Cannot invoke action menus anymore
        https://bugs.webkit.org/show_bug.cgi?id=142797
        <rdar://problem/20032670>

        * UIProcess/API/mac/WKView.mm:
        Need one more respondsToSelector check.

2015-03-18  Chris Dumez  <cdumez@apple.com>

        [WK2] Log the number of network cache requests that we have never seen before
        https://bugs.webkit.org/show_bug.cgi?id=142828
        <rdar://problem/19632130>

        Reviewed by Antti Koivisto.

        Log the number of network cache requests that we have never seen before
        using diagnostic logging.

        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):

2015-03-17  Antti Koivisto  <antti@apple.com>

        Prune least valuable cache entries first
        https://bugs.webkit.org/show_bug.cgi?id=142810
        rdar://problem/19632130

        Reviewed by Darin Adler.

        When pruning the cache estimate relative value of each entry using formula

        age = current time - creation time
        accessAge = last access time - creation time
        value = accessAge / age

        That is, we value entries that have been accessed recently and survived in the cache longest.

        The most valuable entries don't get deleted at all while the deletion probablity ramps up for
        lower value entries.

        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
        (WebKit::NetworkCache::fileTimes):

            Get the creation time and access time for a file.

        (WebKit::NetworkCache::updateFileAccessTimeIfNeeded):

            Update access time manually if the file system doesn't do it automatically.

        * NetworkProcess/cache/NetworkCacheIOChannel.h:
        (WebKit::NetworkCache::IOChannel::path):
        (WebKit::NetworkCache::IOChannel::type):
        * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
        (WebKit::NetworkCache::IOChannel::IOChannel):
        (WebKit::NetworkCache::IOChannel::open):

            Remember the file path and move most of the work to constructor.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::Storage):
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::Storage::updateFileAccessTime):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::deletionProbability):

            Compute the probability based on entry age and access time.

        (WebKit::NetworkCache::Storage::shrinkIfNeeded):
        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
        (WebKit::NetworkCache::Storage::deleteQueue): Deleted.

            More generic name.

2015-03-18  Chris Dumez  <cdumez@apple.com>

        [WK2] Log total number of network cache queries using diagnostic logging
        https://bugs.webkit.org/show_bug.cgi?id=142803
        <rdar://problem/19632130>

        Reviewed by Antti Koivisto.

        Log total number of network cache queries using diagnostic logging.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCacheStatistics.h:
        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
        (WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):

2015-03-18  Chris Dumez  <cdumez@apple.com>

        [WK2] We should not even try the network cache for non-HTTP protocol requests
        https://bugs.webkit.org/show_bug.cgi?id=142802
        <rdar://problem/19632130>

        Reviewed by Antti Koivisto.

        We should not even try the network cache for non-HTTP protocol requests
        and the network cache cannot handle those.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::start):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::canRetrieve):
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
        (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):

2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>

        Ignore some deprecation warnings
        https://bugs.webkit.org/show_bug.cgi?id=142813

        Reviewed by Mark Rowe.

        Fixing the deprecations is tracked by: <rdar://problem/20201450>

        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::populate):

2015-03-17  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Expose JavaScript binding interface through ewk_extension
        https://bugs.webkit.org/show_bug.cgi?id=142033

        Reviewed by Gyuyoung Kim.

        * PlatformEfl.cmake:
        * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
        * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
        (EWK2ContextTestWithExtension::messageReceivedCallback):
        (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
        (TEST_F):
        * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
        * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
        (EwkExtension::didCreatePage):
        (EwkExtension::willDestroyPage):
        * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
        * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
        * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
        (toEwkPage):
        (EwkPage::EwkPage):
        (EwkPage::append):
        (EwkPage::remove):
        (EwkPage::didFinishDocumentLoadForFrame):
        (ewk_page_js_global_context_get):
        (ewk_page_client_register):
        (ewk_page_client_unregister):
        * WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
        * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
        (EwkPage::page):
        * efl/ewebkit2-extension.pc.in:

2015-03-17  Tim Horton  <timothy_horton@apple.com>

        Cannot invoke action menus anymore
        https://bugs.webkit.org/show_bug.cgi?id=142797
        <rdar://problem/20032670>

        * UIProcess/API/mac/WKView.mm:
        Need a respondsToSelector check.

2015-03-17  Tim Horton  <timothy_horton@apple.com>

        Cannot invoke action menus anymore
        https://bugs.webkit.org/show_bug.cgi?id=142797
        <rdar://problem/20032670>

        Reviewed by Beth Dakin.

        * UIProcess/API/mac/WKView.mm:
        Don't process mouse events that would make an action menu; call super
        and let AppKit take care of it. We have to duplicate the macro so that
        we can avoid calling super for the internal-only methods.
        Also, otherMouseMoved is simply not a thing, so remove it.

2015-03-17  Beth Dakin  <bdakin@apple.com>

        DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
        10.10.2
        https://bugs.webkit.org/show_bug.cgi?id=142700
        -and corresponding-
        rdar://problem/20165168

        Reviewed by Tim Horton.

        No need to tell the WKImmediateActionController about mouse down any more since we 
        are expecting it at the beginning of an immediate action interaction.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView mouseDown:]):

        Set the delaysPrimaryMouseButtonEvents to NO for the 
        _immediateActionGestureRecognizer. This will cause AppKit to send up the mouse 
        events at the expected time.
        (-[WKView initWithFrame:processPool:configuration:webView:]):

        WebCore::EventHandler now needs to know if an immediate action cancelled or 
        completed. This plumbs that information down.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::immediateActionDidCancel):
        (WebKit::WebPageProxy::immediateActionDidComplete):
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/WKImmediateActionController.h:
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
        (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
        (-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

        Call EventHandler::setImmediateActionStage() with the appropriate stage.
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performActionMenuHitTestAtLocation):
        (WebKit::WebPage::immediateActionDidCancel):
        (WebKit::WebPage::immediateActionDidComplete):

2015-03-17  Timothy Horton  <timothy_horton@apple.com>

        Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
        https://bugs.webkit.org/show_bug.cgi?id=142776
        <rdar://problem/18921338>

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createDisplayRefreshMonitor):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        Adjust to the new signature.

2015-03-17  Antti Koivisto  <antti@apple.com>

        Disk cache should support Vary: Cookie
        https://bugs.webkit.org/show_bug.cgi?id=142770
        rdar://problem/19764945

        Reviewed by Anders Carlsson.

        Cookies are not part of the original request but are added by the networking layer when submitting the request.
        Fetch them explicitly when resolving Vary: Cookie.

        The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
        not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
        reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::headerValueForVary):
        (WebKit::NetworkCache::encodeStorageEntry):
        (WebKit::NetworkCache::verifyVaryingRequestHeaders):

2015-03-17  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Use C++ lambdas in IPC::Connection
        https://bugs.webkit.org/show_bug.cgi?id=138018

        Reviewed by Anders Carlsson.

        Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
        (IPC::Connection::invalidate):
        (IPC::Connection::sendMessage):
        (IPC::Connection::processIncomingMessage): Simplify the error messages so we
        don't have to format strings on-the-fly, removing the issues of cross-thread
        string copying altogether.
        (IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
        of the StringReference type.
        (IPC::Connection::enqueueIncomingMessage):
        * Platform/IPC/Connection.h:
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::receiveSourceEventHandler):
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::open):

2015-03-17  Zan Dobersek  <zdobersek@igalia.com>

        [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
        https://bugs.webkit.org/show_bug.cgi?id=142530

        Reviewed by Darin Adler.

        * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
        in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
        possible due to the new forwarding header for ANGLE's ShaderLang.h.

2015-03-17  Gwang Yoon Hwang  <yoon@igalia.com>

        REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor

        Unreviewed build fix.

        * WebProcess/WebPage/LayerTreeHost.h:
        Remove duplicated declaration of setNativeSurfaceHandleForCompositing.

2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>

        Enable ES6 classes by default
        https://bugs.webkit.org/show_bug.cgi?id=142774

        Reviewed by Gavin Barraclough.

        * Configurations/FeatureDefines.xcconfig:

2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>

        Don't pass nil as a fireDate for NSTimer
        https://bugs.webkit.org/show_bug.cgi?id=142765

        Reviewed by Dan Bernstein.

        While we're here, switch to a selector that conforms to documented NSTimer API.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController cancelOperation:]):
        Set the timer's fireDate as the future date matching the former interval; update the selector.
        (-[WKFullScreenWindowController _watchdogTimerFired:]):
        Timer callback; wrap -exitFullScreen.

2015-03-16  Alex Christensen  <achristensen@webkit.org>

        Progress towards CMake on Mac
        https://bugs.webkit.org/show_bug.cgi?id=142747

        Reviewed by Chris Dumez.

        * PlatformMac.cmake:
        Started adding Mac-specific directories and headers.

2015-03-16  Alexey Proskuryakov  <ap@apple.com>

        ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
        https://bugs.webkit.org/show_bug.cgi?id=142637

        Reviewed by Dean Jackson.

        * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
        m_plugin can be legitimately null.

2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>

        One more URTBF after r181578.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r181578.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.

2015-03-16  Dean Jackson  <dino@apple.com>

        Expose WK2 preference for Animation Triggers runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=142744

        Reviewed by Anders Carlsson.

        Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
        feature flag.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetCSSAnimationTriggersEnabled):
        (WKPreferencesGetCSSAnimationTriggersEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
        * WebProcess/InjectedBundle/InjectedBundle.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>

        Allow clients to selectively disable plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=142506

        Reviewed by Anders Carlsson.

        Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
        from the page). As part of this:

        1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
           set of plug-ins.

        2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
           down the stack.

        3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
           a concrete implementation thereof in WebPlatformStrategies in WebKit2.

        4) Add messaging infrastructure to allow clients to set and clear plug-in policies.

        While currently only used in a very limited manner, the new declarative plug-in policies are written generically
        so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo):
        Set new PluginInfo members.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<PluginInfo>::encode):
        Handle new PluginInfo members.
        (IPC::ArgumentCoder<PluginInfo>::decode):
        Ditto.

        * Shared/WebProcessCreationParameters.h:
        Declare a member to store client plug-in policies.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        Encode the policies.
        (WebKit::WebProcessCreationParameters::decode):
        Decode the policies.

        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toWKPluginLoadClientPolicy):
        Teach how to cast between WebCore and WebKit2 policy definitions.
        (WebKit::toPluginLoadClientPolicy):
        Ditto.

        * UIProcess/API/C/WKPluginLoadPolicy.h:
        Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextSetPluginLoadClientPolicy):
        New function; wrap WebProcessPool::setPluginLoadClientPolicy().
        (WKContextClearPluginClientPolicies):
        New function; wrap WebProcessPool::clearPluginClientPolicies().

        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        Copy any client plug-in policies to the new process' creation parameters.
        (WebKit::WebProcessPool::setPluginLoadClientPolicy):
        Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
        (WebKit::WebProcessPool::clearPluginClientPolicies):
        Send ClearPluginClientPolicies to all processes and clear any stashed policy info.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::pluginInfo):
        Set new PluginInfo member.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::pluginSupportsExtension):
        Adopt getWebVisibleMimesAndPluginIndices().
        (WebKit::WebFrameLoaderClient::objectContentType):
        Update to reflect reflect function rename.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::getPluginInfo):
        Pass the Page to populatePluginCache().
        (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
        New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
        to block on the current page.
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
        New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
        (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
        New member function; empty m_hostsToPluginIdentifierData.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
        New member function; look up the most specific policy for the given plug-in and host.
        (WebKit::WebPlatformStrategies::populatePluginCache):
        If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
        been populated since the Page, and therefore host, may change.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::canShowMIMEType):
        Update to reflect function rename.

        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        Enumerate and process the client plug-in policies in the creation parameters.
        (WebKit::WebProcess::setPluginLoadClientPolicy):
        New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
        (WebKit::WebProcess::clearPluginClientPolicies):
        New member function; wrap PluginStrategy::clearPluginClientPolicies().

        * WebProcess/WebProcess.messages.in:
        Add messages for setting and clearing policies.

2015-03-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Add new Notification classes to GTK+ API documentation.

        Add WebKitNotification and WebKitNotificationPermissionRequest to
        the documentation and fix some other typos causing warnings when
        generating HTML documentation.

        * UIProcess/API/gtk/WebKitUserContent.cpp:
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_class_init):
        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

2015-03-16  Przemyslaw Piorkowski  <p.piorkowski@samsung.com>

        [EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
        https://bugs.webkit.org/show_bug.cgi?id=141249

        Reviewed by Gyuyoung Kim.

        * PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.

2015-03-16  David Kilzer  <ddkilzer@apple.com>

        [iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref

        Follow-up fix for:
        [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
        <http://webkit.org/b/142702>

        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
        (WebKit::PageClientImpl::isViewFocused): Ditto.

2015-03-15  Simon Fraser  <simon.fraser@apple.com>

        Clean up related to wheelEvent names
        https://bugs.webkit.org/show_bug.cgi?id=142713

        Reviewed by Anders Carlsson.

        Add EventNames::isWheelEventType() and use it in places that test for the
        two wheel event names.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::handleEvent):

2015-03-15  Dan Bernstein  <mitz@apple.com>

        [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
        https://bugs.webkit.org/show_bug.cgi?id=142702

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
        WKContentView if possible.
        (-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
        affecting the active and focused state of the view. Increments a counter ivar and returns a
        completion block (which callers must call when they’re done) that decrements it back.
        * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
        with @package access.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.

        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
        maintained despite not being visible.
        (WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
        maintained despite not being active.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
        state is to be maintained.

2015-03-14  Simon Fraser  <simon.fraser@apple.com>

        Clean up use of flags in localToContainer-type functions
        https://bugs.webkit.org/show_bug.cgi?id=142704

        Reviewed by Alexey Proskuryakov.
        
        Pass UseTransforms explicitly to localToContainerPoint()

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getAssistedNodeInformation):

2015-03-14  Brent Fulgham  <bfulgham@apple.com>

        [iOS] scroll snap points are animating to the wrong positions.
        https://bugs.webkit.org/show_bug.cgi?id=142705
        <rdar://problem/20136946>

        Reviewed by Simon Fraser.

        Scroll snapping was landing in the wrong place on iOS because of two problems:
        (1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
        which caused it to always choose one of the earliest snap point options.
        (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
        to animate the snap. This caused it to select a target point beyond the 'screen' pixel
        we want to hit.
        
        The solution to both problems are to scale the scroll destination UIKit suggests so that
        we search among the scaled points with a valid value. Then, we need to scale the returned
        value back to screen units before handing it back to UIKit to process.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
        the end of the line.
        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
        (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):

2015-03-14  Dean Jackson  <dino@apple.com>

        Feature flag for Animations Level 2
        https://bugs.webkit.org/show_bug.cgi?id=142699
        <rdar://problem/20165097>

        Reviewed by Brent Fulgham.

        Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.

        * Configurations/FeatureDefines.xcconfig:

2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        [GStreamer] share GL context in pipeline
        https://bugs.webkit.org/show_bug.cgi?id=142693

        Reviewed by Philippe Normand.

        * WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
        GSTREAMER_GL is used, since GstGL elements use another thread for
        queuing GL operations.

2015-03-13  Alex Christensen  <achristensen@webkit.org>

        Progress towards CMake on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=142680

        Reviewed by Gyuyoung Kim.

        * PlatformMac.cmake: Added.

2015-03-13  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r181483.
        https://bugs.webkit.org/show_bug.cgi?id=142688

        Caused use-after-free on many tests (Requested by ap on
        #webkit).

        Reverted changeset:

        "Allow clients to selectively disable plug-ins"
        https://bugs.webkit.org/show_bug.cgi?id=142506
        http://trac.webkit.org/changeset/181483

2015-03-13  Eric Carlson  <eric.carlson@apple.com>

        [Mac] Enable WIRELESS_PLAYBACK_TARGET
        https://bugs.webkit.org/show_bug.cgi?id=142635

        Reviewed by Darin Adler.

        * Configurations/FeatureDefines.xcconfig:

2015-03-13  Timothy Horton  <timothy_horton@apple.com>

        Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
        https://bugs.webkit.org/show_bug.cgi?id=142664
        <rdar://problem/18859470>

        Reviewed by Benjamin Poulain.

        * UIProcess/ios/WKScrollView.mm:
        (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
        Now that the WKContentView can (without pinching) be smaller than the unobscured
        region of the WKWebView, we need to take that into account when deciding where
        to retarget scrolling.

2015-03-13  Mark Lam  <mark.lam@apple.com>

        Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
        <https://webkit.org/b/142674>

        Reviewed by Filip Pizlo.

        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::EventDispatcher):
        * WebProcess/WebPage/EventDispatcher.h:
        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
        (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
        * WebProcess/WebPage/ViewUpdateDispatcher.h:

2015-03-10  Conrad Shultz  <conrad_shultz@apple.com>

        Allow clients to selectively disable plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=142506

        Reviewed by Anders Carlsson.

        Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
        from the page). As part of this:

        1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
           set of plug-ins.

        2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
           down the stack.

        3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
           a concrete implementation thereof in WebPlatformStrategies in WebKit2.

        4) Add messaging infrastructure to allow clients to set and clear plug-in policies.

        While currently only used in a very limited manner, the new declarative plug-in policies are written generically
        so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo):
        Set new PluginInfo members.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<PluginInfo>::encode):
        Handle new PluginInfo members.
        (IPC::ArgumentCoder<PluginInfo>::decode):
        Ditto.

        * Shared/WebProcessCreationParameters.h:
        Declare a member to store client plug-in policies.