ChangeLog-2016-09-26   [plain text]


2016-09-26  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix -Wformat warnings in WebLoaderStrategy
        https://bugs.webkit.org/show_bug.cgi?id=162553

        Unreviewed

        Two of the format arguments are swapped. Fix them.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):

2016-09-25  Chris Dumez  <cdumez@apple.com>

        Regression(r206356): Caused crashes for !NETWORK_SESSION code path
        https://bugs.webkit.org/show_bug.cgi?id=162541

        Reviewed by Alexey Proskuryakov.

        After r206356, if Download is downloading a Blob instead of doing a
        network load, then m_resourceHandle / m_downloadClient are used to do
        the download. This broke some assumptions on Mac because the
        NETWORK_SESSION code path assumed it was relying on m_download and the
        !NETWORK_SESSION code path assumed it was using m_nsURLDownload /
        m_delegate.

        This patch refactors the code so that:
        - The Download destructor now takes care of invalidating
          m_resourceHandle and m_downloadClient before calling
          platformInvalidate(). For the SOUP code path,
          platformInvalidate() no longer needs to do anything
          because SOUP uses m_resourceHandle / m_downloadClient
          only. For the Mac !NETWORK_SESSION code path, we keep
          invalidating m_nsURLDownload / m_delegate but we no
          longer assume that those are initialized (given that
          they are not when downloading a blob). Other
          platforms do nothing in platformInvalidate() at the
          moment.
        - Download::cancel() now takes care of cancelling the
          download if we're downloading a blob. Otherwise, we
          call the platform specific cancelNetworkLoad(). This
          is the same pattern that is used for start() /
          startNetworkLoad().

        * NetworkProcess/Downloads/BlobDownloadClient.cpp:
        (WebKit::BlobDownloadClient::didCancel):
        * NetworkProcess/Downloads/BlobDownloadClient.h:
        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::~Download):
        (WebKit::Download::cancel):
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
        (WebKit::Download::cancelNetworkLoad):
        (WebKit::Download::cancel): Deleted.
        * NetworkProcess/Downloads/ios/DownloadIOS.mm:
        (WebKit::Download::cancelNetworkLoad):
        (WebKit::Download::cancel): Deleted.
        * NetworkProcess/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::cancelNetworkLoad):
        (WebKit::Download::platformInvalidate):
        (WebKit::Download::cancel): Deleted.
        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::cancelNetworkLoad):
        (WebKit::Download::platformInvalidate):
        (WebKit::Download::cancel): Deleted.

2016-09-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Enable support for 'download' attribute on anchor elements
        https://bugs.webkit.org/show_bug.cgi?id=162535

        Reviewed by Darin Adler.

        Enable support for 'download' attribute on anchor elements for WebKit2
        now that:
        - It works with our NETWORK_SESSION code path (Bug 162531)
        - Supports Blob / Data URLs (Bug 156099)
        - Requires user interaction / ignores synthetic clicks (Bug 156099)

        * Shared/WebPreferencesDefinitions.h:

2016-09-24  Chris Dumez  <cdumez@apple.com>

        <a download> does not support Blob URLs
        https://bugs.webkit.org/show_bug.cgi?id=156099
        <rdar://problem/25535520>

        Reviewed by Darin Adler.

        Add support for downloading Blob URLs to WebKit2. This should work for
        all WebKit2 port. This also works in combination with the download
        attribute on anchor elements. Note that the download attribute is only
        enabled at runtime in the context of the layout tests for now. I'll
        enable the download attribute on WK2 once I have fixed Bug 162531.

        * CMakeLists.txt:
        * NetworkProcess/Downloads/BlobDownloadClient.cpp: Added.
        (WebKit::BlobDownloadClient::BlobDownloadClient):
        (WebKit::BlobDownloadClient::didReceiveResponse):
        (WebKit::BlobDownloadClient::didReceiveBuffer):
        (WebKit::BlobDownloadClient::didFinishLoading):
        (WebKit::BlobDownloadClient::didFail):
        * NetworkProcess/Downloads/BlobDownloadClient.h: Added.
        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::start):
        (WebKit::Download::didStart):
        (WebKit::Download::didReceiveResponse):
        (WebKit::Download::decideDestinationWithSuggestedFilename):
        (WebKit::Download::~Download): Deleted.
        (WebKit::Download::didReceiveData): Deleted.
        (WebKit::Download::shouldDecodeSourceDataOfMIMEType): Deleted.
        * NetworkProcess/Downloads/Download.h:
        (WebKit::Download::Download):
        (WebKit::Download::suggestedName):
        (WebKit::Download::request):
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/ios/DownloadIOS.mm:
        (WebKit::Download::startNetworkLoad):
        * NetworkProcess/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::startNetworkLoad):
        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::startNetworkLoad):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Downloads/DownloadProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:

2016-09-24  Chris Dumez  <cdumez@apple.com>

        [WK2] anchor.download attribute value is ignored by NETWORK_SESSION code path
        https://bugs.webkit.org/show_bug.cgi?id=162531

        Reviewed by Darin Adler.

        Pipe the suggested filename through in the NETWORK_SESSION code path so
        that it is used when deciding the destination path.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::PendingDownload):
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::setSuggestedFilename):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::suggestedFilename):
        (WebKit::NetworkDataTask::setSuggestedFilename):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

2016-09-23  Wenson Hsieh  <wenson_hsieh@apple.com>

        Media controls playhead does not animate smoothly while playing
        https://bugs.webkit.org/show_bug.cgi?id=162399
        <rdar://problem/28115680>

        Reviewed by Beth Dakin.

        See WebCore ChangeLog for more details.

        In the UI process, we update the WebPlaybackSessionManager's timing value when the rate or current time changes.
        Each AVValueTiming is generated from the current time, system anchor time, and playback rate. The behavior of
        the first two properties is unaffected. However, the rate used to update the timing value is the effective
        playback rate, which is equal to the playback rate unless we are (1) not playing, (2) interacting with the media
        controls in such a way that the media is essentially not playing, or (3) the current time precedes the playback
        start time, accounting for playback direction. In these cases, our effective playback rate is 0, which means
        that we do not animate the playhead.

        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
        (WebKit::WebPlaybackSessionModelContext::beginScrubbing):
        (WebKit::WebPlaybackSessionModelContext::endScrubbing):
        (WebKit::WebPlaybackSessionModelContext::setPlaybackStartedTime):
        (WebKit::WebPlaybackSessionModelContext::setCurrentTime):
        (WebKit::WebPlaybackSessionManagerProxy::setPlaybackStartedTime):
        * WebProcess/cocoa/WebPlaybackSessionManager.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionInterfaceContext::playbackStartedTimeChanged):
        (WebKit::WebPlaybackSessionManager::playbackStartedTimeChanged):

2016-09-23  Caitlin Potter  <caitp@igalia.com>

        [JSC] Implement parsing of Async Functions
        https://bugs.webkit.org/show_bug.cgi?id=161409

        Reviewed by Yusuke Suzuki.

        * Configurations/FeatureDefines.xcconfig:

2016-09-23  Jonathan Bedard  <jbedard@apple.com>

        Fix Mac CMake build after r206261
        https://bugs.webkit.org/show_bug.cgi?id=162493

        Reviewed by Alex Christensen.

        * CMakeLists.txt: Exclude WebTextChecker from Mac CMake builds.
        * PlatformEfl.cmake: Ditto.
        * PlatformGTK.cmake: Ditto.

2016-09-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] BadDamage X error in /webkit2/WebKitWebView/preferred-size
        https://bugs.webkit.org/show_bug.cgi?id=162489

        Reviewed by Michael Catanzaro.

        Do a XSync right after creating/destroying the XDamage used by the redirected window in X11.

        * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
        (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
        (WebKit::AcceleratedBackingStoreX11::update):

2016-09-23  Antoine Quint  <graouts@apple.com>

        Add a new runtime flag for work on modern media controls (off by default)
        https://bugs.webkit.org/show_bug.cgi?id=162420
        <rdar://problem/27989489>

        Reviewed by Eric Carlson.

        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-09-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r194387): Crash on github.com in IntlDateTimeFormat::resolvedOptions in C locale
        https://bugs.webkit.org/show_bug.cgi?id=162139

        Reviewed by Michael Catanzaro.

        Handle the case of "C" locale passed by the user using "en-US" as default to match what
        WTF::platformUserPreferredLanguages() does.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_set_preferred_languages): Remove the call to languageDidChange() because
        overrideUserPreferredLanguages() already calls it, so we were actually notifying the observers twice.

2016-09-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Improve performance when resizing a window with multiple web views in X11
        https://bugs.webkit.org/show_bug.cgi?id=162413

        Reviewed by Michael Catanzaro.

        Resizing a window with a single way view performs good enough, but when adding more tabs, the performance
        decreases a lot. This is because resize is a sync operation, and the UI process waits for the web process to
        have a new update for the new size, while still draws the previous frame. This is needed for the visible web
        view, to avoid flickering and artifacts while resizing, but for all other hidden web views, we don't really need
        to block the UI process. This doesn't happen in Wayland, because in Wayland we never block the UI process while
        waiting for web process update after a resize.

        * UIProcess/AcceleratedDrawingAreaProxy.cpp:
        (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Return early if the web
        view is not visible.
        * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
        (WebKit::AcceleratedBackingStoreX11::update): Only schedule a redraw on a damage event when the view is visible.
        * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
        (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Do a XSync right after creating the new pixmap.
        (WebKit::AcceleratedSurfaceX11::resize): Ditto.

2016-09-22  Daniel Bates  <dabates@apple.com>

        Remove more ENABLE(TEXT_AUTOSIZING) code
        https://bugs.webkit.org/show_bug.cgi?id=162456

        Reviewed by Simon Fraser.

        * UIProcess/API/efl/ewk_settings.cpp:
        (ewk_settings_text_autosizing_enabled_set):
        (ewk_settings_text_autosizing_enabled_get):
        * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
        (TEST_F):

2016-09-22  Jonathan Bedard  <jbedard@apple.com>

        Automatic Text Replacement Testing in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=161919

        Reviewed by Ryosuke Niwa.

        Implemented test hooks for text replacement for WebKit2.
        Note that spell checking has not been implemented, so most tests which use text replacement still fail.

        * UIProcess/API/C/WKTextChecker.cpp: Added #ifdefs to include file for iOS and Mac.
        (WKTextCheckerSetTestingMode): Added.
        * UIProcess/API/C/WKTextChecker.h: Added #ifdefs to include file for iOS and Mac.
        * UIProcess/TextChecker.h: Added hooks to bypass writing to NSUserDefaults.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::toggleSmartInsertDelete):  New message to toggle TextChecker flag.
        (WebKit::WebPageProxy::toggleAutomaticQuoteSubstitution): Ditto.
        (WebKit::WebPageProxy::toggleAutomaticLinkDetection): Ditto.
        (WebKit::WebPageProxy::toggleAutomaticDashSubstitution): Ditto.
        (WebKit::WebPageProxy::toggleAutomaticTextReplacement): Ditto.
        * UIProcess/WebPageProxy.h: Added messages to toggle TextChecker flags.
        * UIProcess/WebPageProxy.messages.in: Ditto.
        * UIProcess/efl/TextCheckerEfl.cpp: Implemented new TextChecker hooks for non-Cocoa platforms.
        * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
        (WebKit::TextChecker::mutableState): Ditto.
        * UIProcess/ios/TextCheckerIOS.mm: Implemented new TextChecker hooks.
        (WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
        (WebKit::TextChecker::state): Call mutableState.
        (WebKit::TextChecker::accessSmartInsertDeleteEnabled): Dummy function.
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::refresh): Reload TextChecker configuration from NSUserDefaults.
        (WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
        (WebKit::TextChecker::state): Call mutableState().
        (WebKit::TextChecker::accessSmartInsertDeleteEnabled): Allow toggling of smartInsertDeleteEnabled without writing to NSUserDefaults.
        (WebKit::initializeState): Deleted.
        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleSetAutomaticLinkDetectionEnabled): Deleted.
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Removed WKBundleSetAutomaticLinkDetectionEnabled.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Deleted.
        * WebKit2.xcodeproj/project.pbxproj: Added WKTextChecker to Mac and iOS.
        * WebProcess/InjectedBundle/InjectedBundle.h: Remove setAutomaticLinkDetectionEnabled.
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::WebEditorClient::toggleSmartInsertDelete): Send message to UI process to toggle TextChecker.
        (WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution): Ditto.
        (WebKit::WebEditorClient::toggleAutomaticLinkDetection): Ditto.
        (WebKit::WebEditorClient::toggleAutomaticDashSubstitution): Ditto.
        (WebKit::WebEditorClient::toggleAutomaticTextReplacement): Ditto.

2016-09-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Rename DataObjectGtk as SelectionData
        https://bugs.webkit.org/show_bug.cgi?id=162380

        Reviewed by Žan Doberšek.

        * PlatformGTK.cmake:
        * Shared/gtk/ArgumentCodersGtk.cpp:
        (IPC::ArgumentCoder<SelectionData>::encode):
        (IPC::ArgumentCoder<SelectionData>::decode):
        * Shared/gtk/ArgumentCodersGtk.h:
        * Shared/gtk/WebSelectionData.cpp: Renamed from Source/WebKit2/Shared/gtk/PasteboardContent.cpp.
        (WebKit::WebSelectionData::WebSelectionData):
        (WebKit::WebSelectionData::encode):
        (WebKit::WebSelectionData::decode):
        * Shared/gtk/WebSelectionData.h: Renamed from Source/WebKit2/Shared/gtk/PasteboardContent.h.
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::startDrag):
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::performDragControllerAction):
        (WebKit::WebPageProxy::startDrag):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebPasteboardProxy.h:
        * UIProcess/WebPasteboardProxy.messages.in:
        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
        (WebKit::DragAndDropHandler::startDrag):
        (WebKit::DragAndDropHandler::fillDragData):
        (WebKit::DragAndDropHandler::finishDrag):
        (WebKit::DragAndDropHandler::dropDataSelection):
        (WebKit::DragAndDropHandler::dragEntered):
        (WebKit::DragAndDropHandler::dragDataSelection):
        (WebKit::DragAndDropHandler::dragMotion):
        (WebKit::DragAndDropHandler::dragLeave):
        (WebKit::DragAndDropHandler::drop):
        * UIProcess/gtk/DragAndDropHandler.h:
        * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
        (WebKit::WebPasteboardProxy::writeToClipboard):
        (WebKit::WebPasteboardProxy::readFromClipboard):
        (WebKit::WebPasteboardProxy::setPrimarySelectionOwner): Deleted.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::writeToClipboard):
        (WebKit::WebPlatformStrategies::readFromClipboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
        (WebKit::WebDragClient::startDrag):
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::performDragControllerAction):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-09-21  Dan Bernstein  <mitz@apple.com>

        [macOS] Upon layout, _webView:renderingProgressDidChange: fires before the intrinsic content size is updated
        https://bugs.webkit.org/show_bug.cgi?id=162359
        <rdar://problem/27776454>

        Reviewed by Tim Horton.

        Test: added to TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm

        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Fixed a bug where
          m_pendingNewlyReachedLayoutMilestones was never initialized.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Added
          m_pendingNewlyReachedLayoutMilestones member variable to this derived class as well.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers): If we have pending milestones, notify
          the WebPageProxy now, after any content size changes have been sent.
        (WebKit::TiledCoreAnimationDrawingArea::dispatchDidReachLayoutMilestone): New override that
          accumulates the milestones into m_pendingNewlyReachedLayoutMilestones and returns true,
          so that the caller won’t notify the WebPageProxy immediately.

2016-09-21  Anders Carlsson  <andersca@apple.com>

        support openPaymentSetup API on ApplePaySession object
        https://bugs.webkit.org/show_bug.cgi?id=162357
        rdar://problem/26776939

        Reviewed by Tim Horton.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
        (WebKit::WebPaymentCoordinatorProxy::openPaymentSetup):
        Call through to platformOpenPaymentSetup, and in the completion handler, send back a OpenPaymentSetupReply message.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        Add new members.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
        Add OpenPaymentSetup message.

        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
        Allocate a PKPassLibrary and call openPaymentSetupForMerchantIdentifier:domain:completion: on it.

        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
        (WebKit::generateOpenPaymentSetupReplyID):
        New helper function to generate a reply ID.

        (WebKit::WebPaymentCoordinator::openPaymentSetup):
        Add the completion handler to m_pendingOpenPaymentSetupCallbacks and send a OpenPaymentSetup message to the UI process.

        (WebKit::WebPaymentCoordinator::openPaymentSetupReply):
        Grab the callback given its ID and invoke it.

        * WebProcess/ApplePay/WebPaymentCoordinator.h:
        Add new members.

        * WebProcess/ApplePay/WebPaymentCoordinator.messages.in:
        Add OpenPaymentSetupReply message.

2016-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Unreviewed, build fix.

        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
        (WebKit::AcceleratedBackingStoreWayland::paint): fix usage of deviceScaleFactor variable which was
        removed.

2016-09-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Clean up DataObjectGtk handling
        https://bugs.webkit.org/show_bug.cgi?id=162267

        Reviewed by Michael Catanzaro.

        In some cases the ownership of DataObjectGtk instances is not clear enough, and we have hacks to avoid memory
        leaks because of that.

        * Shared/gtk/ArgumentCodersGtk.cpp:
        (IPC::encodeImage): Use Image instead of GdkPixbuf.
        (IPC::decodeImage): Ditto.
        (IPC::ArgumentCoder<DataObjectGtk>::encode):
        (IPC::ArgumentCoder<DataObjectGtk>::decode):
        (IPC::encode): Deleted.
        (IPC::decode): Deleted.
        (IPC::ArgumentCoder<DragData>::encode): Deleted.
        (IPC::ArgumentCoder<DragData>::decode): Deleted.
        * Shared/gtk/ArgumentCodersGtk.h:
        * Shared/gtk/PasteboardContent.cpp:
        (WebKit::PasteboardContent::PasteboardContent): Add empty constructor that creates a new DataObjectGtk, a
        constructor that receives a const reference and another one that takes the ownership of the given DataObjectGtk.
        (WebKit::PasteboardContent::encode):
        (WebKit::PasteboardContent::decode):
        * Shared/gtk/PasteboardContent.h: Use Ref instead of RefPtr for the DataObjectGtk member.
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::startDrag): Transfer the DataObjectGtk to the DragAndDropHandler, instead of using DragData.
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::performDragControllerAction): Instead of sending a DragData object to the web process,
        send the DataObjectGtk and DragData members needed as parameters.
        (WebKit::WebPageProxy::startDrag): Transfer the received DataObjectGtk to page client, instead of using
        DragData. Also notify the web process that drag started.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in: Update StartDrag message parameters.
        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::DragAndDropHandler): Remove unneeded initialization.
        (WebKit::DragAndDropHandler::startDrag): Take ownership of the given DataObjectGtk.
        * UIProcess/gtk/DragAndDropHandler.h:
        * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
        (WebKit::WebPasteboardProxy::writeToClipboard):
        (WebKit::WebPasteboardProxy::readFromClipboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::writeToClipboard):
        (WebKit::WebPlatformStrategies::readFromClipboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
        (WebKit::convertCairoSurfaceToShareableBitmap):
        (WebKit::WebDragClient::startDrag): Do not create a DragData and pass the DataObjectGtk directly to the
        message. Also notify the WebPage that drag is about to start.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::performDragControllerAction): Remove explicit DataObjectGtk derefs and simply create a
        DragData using the DataObjectGtk pointer as platform data.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Update PerformDragControllerAction message parameters.

2016-09-20  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] ewk_context_menu_item_select test have been failed
        https://bugs.webkit.org/show_bug.cgi?id=162143

        Reviewed by Gyuyoung Kim.

        ewk_context_menu_item_select has been waited until test page loading is finished, but it is
        unnecessary to wait the loading is finished. It would be good to pass if *testFinished*
        flag is true.

        * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
        (EWK2ContextMenuTest::checkBasicContextMenuItem):
        (EWK2ContextMenuTest::testContextMenu):
        (TEST_F):

2016-09-20  Keith Rollin  <krollin@apple.com>

        Add new logging for network resource loading
        https://bugs.webkit.org/show_bug.cgi?id=162237

        Reviewed by Antti Koivisto.

        Add new logging along the non-main path for resource loading. This
        logging should allow us to differentiate between lack-of-logging due
        execution along a path that doesn't have logging statements and
        lack-of-logging due to a hung process.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::start):
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        (WebKit::NetworkResourceLoader::setDefersLoading):
        (WebKit::NetworkResourceLoader::abort):
        (WebKit::NetworkResourceLoader::didReceiveBuffer):
        * NetworkProcess/NetworkResourceLoader.h:
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::loadResource):
        (WebKit::WebLoaderStrategy::scheduleLoad):

2016-09-20  Anders Carlsson  <andersca@apple.com>

        Can't present a payment sheet if a sheet is already active in another window
        https://bugs.webkit.org/show_bug.cgi?id=162314
        rdar://problem/27643511

        Reviewed by Tim Horton.

        Instead of keeping track of whether a sheet is active or not, keep track of its underlying payment coordinator proxy,
        so we can hide it and send a cancel event to WebCore if another sheet is being presented.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
        (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy):
        (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
        (WebKit::WebPaymentCoordinatorProxy::didReachFinalState):

2016-09-20  Keith Rollin  <krollin@apple.com>

        Adjust current networking logging
        https://bugs.webkit.org/show_bug.cgi?id=162235

        Reviewed by Antti Koivisto.

        Update the "always on" network logging in order to better track the
        loading of a particular resource and to better bind together the
        resources downloaded for a particular page and frame. Do this by
        consistently logging pageID, frameID, and resourceID.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        (WebKit::WebLoaderStrategy::startLocalLoad):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::create):
        (WebKit::WebResourceLoader::WebResourceLoader):
        (WebKit::WebResourceLoader::willSendRequest):
        (WebKit::WebResourceLoader::didReceiveResponse):
        (WebKit::WebResourceLoader::didReceiveData):
        (WebKit::WebResourceLoader::didFinishResourceLoad):
        (WebKit::WebResourceLoader::didFailResourceLoad):
        (WebKit::WebResourceLoader::didReceiveResource):
        * WebProcess/Network/WebResourceLoader.h:

2016-09-19  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add a unit test covering <https://trac.webkit.org/changeset/205983>
        https://bugs.webkit.org/show_bug.cgi?id=162112

        Reviewed by Beth Dakin.

        Adds some a test support method as SPI on WKWebView to determine whether to request candidates. See
        Tools/ChangeLog for more details.

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

2016-09-19  Anders Carlsson  <andersca@apple.com>

        Suppress JavaScript prompts early on in certain cases
        https://bugs.webkit.org/show_bug.cgi?id=162243
        rdar://problem/27661602

        Reviewed by Geoffrey Garen.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::shouldSuppressJavaScriptDialogs):
        Add helper function.

        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):
        Call helper function and return early if we should supress dialogs.

2016-09-19  Keith Rollin  <krollin@apple.com>

        Reduce logging from WebResourceLoader::didReceiveData
        https://bugs.webkit.org/show_bug.cgi?id=162233

        Reviewed by Antti Koivisto.

        Only log once even if called multiple times for a single resource.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveData):
        * WebProcess/Network/WebResourceLoader.h:

2016-09-19  Daniel Bates  <dabates@apple.com>

        Remove ENABLE(TEXT_AUTOSIZING) automatic text size adjustment code
        https://bugs.webkit.org/show_bug.cgi?id=162167

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-09-19  Alex Christensen  <achristensen@webkit.org>

        Only override URLParser::enabled if NSUserDefaults object exists
        https://bugs.webkit.org/show_bug.cgi?id=162131

        Reviewed by Sam Weinig.

        * Shared/Cocoa/WebKit2InitializeCocoa.mm:
        (WebKit::platformInitializeWebKit2):
        * Shared/WebKit2Initialize.cpp:
        When I enable URLParser by default, I will want the default to only be overwritten if there is a
        NSUserDefaults key for URLParserEnabled.  Right now it is setting URLParser::enabled to false always,
        which isn't a problem because the default is also false.  When the default is true, that will overwrite the default.

2016-09-19  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Bring the inspected page's window forward when activating element search
        https://bugs.webkit.org/show_bug.cgi?id=162114
        <rdar://problem/28349357>

        Reviewed by Brian Burg.

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::elementSelectionChanged):
        When element search is activated allow the platform to bring
        the window containing the inspected page to the foreground.

        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
        Default empty implementation for ports.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
        Bring the window containing the inspected page to the foreground.

2016-09-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Empty referer header after WebKit session state restoration trips Bad Behavior Wordpress plugin
        https://bugs.webkit.org/show_bug.cgi?id=159606

        Reviewed by Carlos Garcia Campos.

        Leave the referrer member of FrameState unset when restoring from session state, unless
        there is actually a nonempty referrer saved in the state. If we set it to an empty string,
        then an empty referrer gets sent to the server, which some servers do not accept. It
        triggers the Bad Behavior plugin on my WordPress blog, for instance. It also breaks vox.com.

        * UIProcess/API/gtk/WebKitWebViewSessionState.cpp:
        (decodeFrameState):

2016-09-18  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Remove unused methods from _WKInputDelegate
        https://bugs.webkit.org/show_bug.cgi?id=162098

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/_WKInputDelegate.h:

2016-09-18  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        [GTK] Stop using glReadPixels() to blit AC surfaces in the UIProcess under Wayland
        https://bugs.webkit.org/show_bug.cgi?id=161530

        Reviewed by Carlos Garcia Campos.

        Use gdk_cairo_draw_from_gl when all necessary conditions exist.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::create): take TextureMapper::PaintFlags as optional argument.
        (WebKit::ThreadedCompositor::ThreadedCompositor): ditto.
        (WebKit::ThreadedCompositor::renderLayerTree): relay paint flags to TextureMapper::beginPaint.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
        (WebKit::AcceleratedBackingStoreWayland::paint): use the faster gdk_cairo_draw_from_gl when a new
        enough GTK+ is in use.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): create compositor
        with PaintingMirrored flag if we have recent GTK+ and are running under Wayland.
        * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: implement shouldPaintMirrored by always
        returning false.
        * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: implement shouldPaintMirrored by always
        returning true.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::compositeLayersToContext): pass PaintingMirror flag to TextureMapper
        when under a recent enough GTK+ and Wayland.

2016-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move the rendering of auth dialog shadow to the auth dialog widget
        https://bugs.webkit.org/show_bug.cgi?id=162061

        Reviewed by Michael Catanzaro.

        Instead of rendering the shadow in the web view, we can let the auth dialog do it. This fixes the rendering of
        the shadow in Wayland when using gdk_cairo_draw_from_gl().

        * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
        (webkitAuthenticationDialogDraw): Draw the shadow before rendering the child.
        (webkitAuthenticationDialogSizeAllocate): Center the child on the allocated space.
        (webkit_authentication_dialog_class_init): Add size_allocate implementation.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseDraw): Do not draw the shadow when auth dialog is present.
        (webkitWebViewBaseSizeAllocate): Give the whole web view allocation to the auth dialog.

2016-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ThreadedCompositor] Scrolling artifacts on accelerated subframes
        https://bugs.webkit.org/show_bug.cgi?id=149060

        Reviewed by Michael Catanzaro.

        The problem is that we are scrolling the main frame even when scrolling is not delegated.

        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Return early if main frame view doesn't
        delegate scrolling.

2016-09-16  Simon Fraser  <simon.fraser@apple.com>

        WKWebViewConfiguration's _incrementalRenderingSuppressionTimeout should be an NSTimeInterval
        https://bugs.webkit.org/show_bug.cgi?id=162092

        Reviewed by Anders Carlsson.
        
        The _incrementalRenderingSuppressionTimeout property should be a NSTimeInterval, not a CGFloat.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
        (-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

2016-09-15  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        [GTK] Surface created for glReadPixels path on Wayland is bigger than needed
        https://bugs.webkit.org/show_bug.cgi?id=162025

        Reviewed by Carlos Garcia Campos.

        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
        (WebKit::AcceleratedBackingStoreWayland::paint): the texture created by the Wayland
        compositor is already scaled, so scaling its size when creating the surface causes it
        to end up bigger than necessary.

2016-09-16  David Kilzer  <ddkilzer@apple.com>

        ASSERT accidentally commented out in r204916
        <https://webkit.org/b/162077>

        Reviewed by Anders Carlsson.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::terminateProcess): Comment in the ASSERT
        back in.

2016-09-16  Wenson Hsieh  <wenson_hsieh@apple.com>

        Inserting a space after inserting an accepted candidate scrolls the document and causes a flicker
        https://bugs.webkit.org/show_bug.cgi?id=162009
        <rdar://problem/28086237>

        Reviewed by Tim Horton.

        After inserting a text candidate, if the candidate ended with a soft space, the next space we insert should just
        replace the soft space. This currently works because we leave the text insertion out of the list of
        KeypressCommands sent to the web process and instead replace the soft space via WebPage::InsertTextAsync.
        However, this means when the web process handles this keydown event, the current editor will not handle it,
        since the list of key commands is empty despite the text and unmodified text being non-empty.

        To fix this, when sending keydown or keyup events where we replace a soft space, we set the key event's text to
        an empty string instead of a space. This allows us to return early in EventHandler::keyEvent and avoid the
        codepath that tries to insert text into the current editor and (in the case of inserting a ' ') scrolls the
        document if necessary. Since we've already handled text insertion via WebPage::InsertTextAsync, there is no need
        to also dispatch the keypress to the editor.

        Additionally, this patch addresses flickering in the candidates UI due to the fact that we're asynchronously
        replacing the last soft space. During this operation, we select the range of the soft space and then insert the
        new text. This causes a momentary range selection which the web process notifies the UI process about, prompting
        us to hide the candidates list. To address this, we suppress the EditorStateChanged message fired from the web
        process to the UI process while we're selecting the original range to replace.

        This patch adds 3 new WebKit API tests.

        * Shared/NativeWebKeyboardEvent.h:
        * Shared/mac/NativeWebKeyboardEventMac.mm:
        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
        * Shared/mac/WebEventFactory.h:
        * Shared/mac/WebEventFactory.mm:
        (WebKit::textFromEvent):
        (WebKit::unmodifiedTextFromEvent):
        (WebKit::WebEventFactory::createWebKeyboardEvent):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _handleAcceptedCandidate:]):
        (-[WKWebView _didHandleAcceptedCandidate]):
        (-[WKWebView _didUpdateCandidateListVisibility:]):
        (-[WKWebView _forceRequestCandidates]):
        (-[WKWebView _handleControlledElementIDResponse:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didHandleAcceptedCandidate]):
        (-[WKView _didUpdateCandidateListVisibility:]):
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::forceRequestCandidatesForTesting):
        (WebKit::WebViewImpl::becomeFirstResponder):
        (WebKit::WebViewImpl::didHandleAcceptedCandidate):
        (WebKit::WebViewImpl::insertText):
        (WebKit::WebViewImpl::performKeyEquivalent):
        (WebKit::WebViewImpl::keyUp):
        (WebKit::WebViewImpl::keyDown):
        (WebKit::WebViewImpl::flagsChanged):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::insertTextAsync):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::insertTextAsync):
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-09-16  Anders Carlsson  <andersca@apple.com>

        Add support for enum class parameters in the message generator
        https://bugs.webkit.org/show_bug.cgi?id=162036

        Reviewed by Brady Eidson.

        Also, convert the WebPage::SetLayerHostingMode to take an actual enum class.

        * Scripts/webkit/messages.py:
        (function_parameter_type):
        Change this to take the parameter kind as well, and use the raw type for enums.

        (arguments_type):
        (message_to_struct_declaration):
        Pass the kind to function_parameter_type.

        (forward_declaration):
        (forward_declarations_for_namespace):
        Forward declare enums with "enum class".

        (headers_for_type):
        Add WebKit::LayerHostingMode as a special case.

        (generate_message_handler):
        Pass the kind to function_parameter_type.

        * Scripts/webkit/parser.py:
        (parse_parameters_string):
        Parse 'enum' as well.

        * Shared/LayerTreeContext.h:
        Add enum traits.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::viewDidEnterWindow):
        (WebKit::WebPageProxy::layerHostingModeDidChange):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::reinitializeWebPage):
        (WebKit::WebPage::setLayerHostingMode):
        * WebProcess/WebPage/WebPage.h:
        Change unsigned to LayerHostingMode.

        * WebProcess/WebPage/WebPage.messages.in:
        Change unsigned to LayerHostingMode.

2016-09-16  Commit Queue  <commit-queue@webkit.org>

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

        inadvertent GCC requirement bump (Requested by mcatanzaro on
        #webkit).

        Reverted changeset:

        "Add support for enum class parameters in the message
        generator"
        https://bugs.webkit.org/show_bug.cgi?id=162036
        http://trac.webkit.org/changeset/206000

2016-09-15  Brady Eidson  <beidson@apple.com>

        WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
        <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043

        Reviewed by Brent Fulgham. 

        * Scripts/webkit/messages.py:
        (headers_for_type): Add a custom header, and alphabetize existing ones.

        * Shared/WebCoreArgumentCoders.h: Add EnumTraits for HasInsecureContent.

        * UIProcess/PageLoadState.h:
        (WebKit::PageLoadState::committedHasInsecureContent):

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::hasInsecureContent):
        (WebKit::WebPageProxy::didCommitLoadForFrame): If the WebProcess included an existing "HasInsecureContent" value, use it.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): 
        (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): Save the "HasInsecureContent" value to the CachedFrame in
          case we restore it in the future.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2016-09-15  Anders Carlsson  <andersca@apple.com>

        Actually assign the decoded enum value to the output value
        https://bugs.webkit.org/show_bug.cgi?id=162042

        Reviewed by Brady Eidson.

        * Platform/IPC/Decoder.h:

2016-09-15  Anders Carlsson  <andersca@apple.com>

        Add support for enum class parameters in the message generator
        https://bugs.webkit.org/show_bug.cgi?id=162036

        Reviewed by Brady Eidson.

        Also, convert the WebPage::SetLayerHostingMode to take an actual enum class.

        * Scripts/webkit/messages.py:
        (function_parameter_type):
        Change this to take the parameter kind as well, and use the raw type for enums.

        (arguments_type):
        (message_to_struct_declaration):
        Pass the kind to function_parameter_type.

        (forward_declaration):
        (forward_declarations_for_namespace):
        Forward declare enums with "enum class".

        (headers_for_type):
        Add WebKit::LayerHostingMode as a special case.

        (generate_message_handler):
        Pass the kind to function_parameter_type.

        * Scripts/webkit/parser.py:
        (parse_parameters_string):
        Parse 'enum' as well.

        * Shared/LayerTreeContext.h:
        Add enum traits.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::viewDidEnterWindow):
        (WebKit::WebPageProxy::layerHostingModeDidChange):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::reinitializeWebPage):
        (WebKit::WebPage::setLayerHostingMode):
        * WebProcess/WebPage/WebPage.h:
        Change unsigned to LayerHostingMode.

        * WebProcess/WebPage/WebPage.messages.in:
        Change unsigned to LayerHostingMode.

2016-09-14  Beth Dakin  <bdakin@apple.com>

        dictionaryPopupInfoForRange() can change selection temporarily; updates should not 
        be sent to the UIProcess.
        https://bugs.webkit.org/show_bug.cgi?id=162008
        -and corresponding-
        rdar://problem/28312297

        Reviewed by Tim Horton.

        This patch prevents the selection changes that occur while gathering 
        dictionaryPopupInfo from being propagated to the UIProcess.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::dictionaryPopupInfoForRange):

2016-09-14  Wenson Hsieh  <wenson_hsieh@apple.com>

        Media controls behave strangely when changing media sources
        https://bugs.webkit.org/show_bug.cgi?id=161914
        <rdar://problem/28227805>

        Reviewed by Tim Horton.

        Allows a web page to have an active video for a media control manager even if no audio or video is currently
        being produced. This is because the media element may be in a state where it is changing its source and does not
        currently have a video or audio track.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::hasActiveVideoForControlsManager):

2016-09-14  Beth Dakin  <bdakin@apple.com>

        Add needsPlainTextQuirk and send it to the UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=161996
        -and corresponding-
        rdar://problem/26013388

        Rubber-stamped by Simon Fraser.

        Quick clean-up.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::needsPlainTextQuirk):

2016-09-14  Beth Dakin  <bdakin@apple.com>

        Add needsPlainTextQuirk and send it to the UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=161996
        -and corresponding-
        rdar://problem/26013388

        Reviewed by Anders Carlsson.

        WebPageProxy should keep track of m_needsPlainTextQuirk.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setNeedsPlainTextQuirk):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::needsPlainTextQuirk):
        (WebKit::WebPageProxy::needsHiddenContentEditableQuirk): Deleted.
        * UIProcess/WebPageProxy.messages.in:

        If m_needsPlainTextQuirk is true, set it back to false on page transition.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didStartPageTransition):

        The sites that need this quirk.
        (WebKit::needsPlainTextQuirk):
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:

2016-09-14  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Minor cleanup
        https://bugs.webkit.org/show_bug.cgi?id=161976

        Reviewed by Youenn Fablet and Dean Jackson.

        * UIProcess/UserMediaPermissionRequestProxy.cpp:

2016-09-14  Beth Dakin  <bdakin@apple.com>

        Add needsHiddenContentEditableQuirk and send it to the UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=161984
        -and corresponding-
        rdar://problem/26013388

        Reviewed by Anders Carlsson.

        Keep track of m_needsHiddenContentEditableQuirk in WebPageProxy.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setNeedsHiddenContentEditableQuirk):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::needsHiddenContentEditableQuirk):
        (WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction): Deleted.
        * UIProcess/WebPageProxy.messages.in:

        If m_needsHiddenContentEditableQuirk is true, set it back to false on page 
        transition.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didStartPageTransition):

        Google Docs and iCloud Pages are the sites that need this quirk.
        (WebKit::needsHiddenContentEditableQuirk):
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:

2016-09-14  Megan Gardner  <megan_gardner@apple.com>

        Long tap menu on an image link no longer includes "Save Image" button
        https://bugs.webkit.org/show_bug.cgi?id=161761
        <rdar://27202717>

        Reviewed by Beth Dakin.

        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
        Added share to image sheet as to not regress current functionality
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):
        Gather information for images as well as links, and they can be both

2016-09-14  Carlos Garnacho  <carlosg@gnome.org>

        [GTK][Wayland] Implement clipboard support
        https://bugs.webkit.org/show_bug.cgi?id=146574

        Reviewed by Carlos Garcia Campos.

        Add the necessary plumbing for the GTK+ backend to use the
        PlatformPasteboard in WebCore. All selection data is transmitted
        at once through the serialization of PasteboardContentGtk/DataObjectGtk.

        * PlatformGTK.cmake: Add PasteboardContentGtk.cpp and
        WebPasteboardProxyGtk.cpp
        * Shared/gtk/ArgumentCodersGtk.cpp:
        (IPC::encode):
        (IPC::decode): Renamed from encodeDataObject/decodeDataObject
        and made public.
        (IPC::ArgumentCoder<DragData>::encode):
        (IPC::ArgumentCoder<DragData>::decode): Update DataObjectGtk
        encode/decode callers. Encode the extra canSmartReplace field.
        * Shared/gtk/ArgumentCodersGtk.h: Expose encode/decode methods for
        DataObjectGtk.
        * Shared/gtk/PasteboardContent.cpp: Added. Wraps a DataObjectGtk
        so it can be serialized on WebProcess/UIProcess messaging.
        (WebKit::PasteboardContent::PasteboardContent):
        (WebKit::PasteboardContent::encode):
        (WebKit::PasteboardContent::decode): Methods to encode/decode a
        PasteboardContent.
        * Shared/gtk/PasteboardContent.h: Added.
        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::collapseSelection): Added plumbing to allow
        collapsing the global selection from the UI process side.
        * UIProcess/WebFrameProxy.h:
        * UIProcess/WebPasteboardProxy.h:
        * UIProcess/WebPasteboardProxy.messages.in: Added plumbing for the
        GTK+ pasteboard proxy functions.
        * UIProcess/gtk/WebPageProxyGtk.cpp:
        (WebKit::WebPageProxy::editorStateChanged):
        * UIProcess/gtk/WebPasteboardProxyGtk.cpp: Added.
        (WebKit::WebPasteboardProxy::writeToClipboard):
        (WebKit::WebPasteboardProxy::readFromClipboard): Implemented functions
        hooking into the PlatformPasteboard. Per-selection (ie.
        primary/clipboard) PlatformPasteboards are kept at this level, so those
        are independently set and dealt with.
        (WebKit::WebPasteboardProxy::setPrimarySelectionOwner):
        (WebKit::WebPasteboardProxy::didDestroyFrame): Implemented functions
        to manage the frame currently being currently interacted, so we can
        signal back when the global selection has been replaced.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::writeToClipboard):
        (WebKit::WebPlatformStrategies::readFromClipboard): Added methods to
        send the WebProcess->UIProcess messages.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::updateGlobalSelection): Remove GClosure to
        get notifications about changes in global selection ownership. This
        is done through a WebPage message now, as the UI process manages the
        clipboard.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
        (WebKit::WebPage::collapseSelectionInFrame): Added methods to send
        the UIProcess->WebProcess notification that the global selection has
        been replaced.

2016-09-13  Tim Horton  <timothy_horton@apple.com>

        Provide a mechanism to specify the maximum size of WKThumbnailView snapshots
        https://bugs.webkit.org/show_bug.cgi?id=161896
        <rdar://problem/28229827>

        Reviewed by Simon Fraser.

        Some clients know that their thumbnail views will only be displayed up to
        a specific size that is significantly smaller than the WKView size. Allow
        them to avoid wasting lots of memory on unnecessarily large snapshots.

        * UIProcess/API/Cocoa/_WKThumbnailView.h:
        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
        (-[_WKThumbnailView requestSnapshot]):
        (-[_WKThumbnailView _requestSnapshotIfNeeded]):
        (-[_WKThumbnailView setMaximumSnapshotSize:]):
        Add a maximumSnapshotSize property which can be changed dynamically.

2016-09-13  Anders Carlsson  <andersca@apple.com>

        REGRESSION (r196321): Amazon Videos are all black in Fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=161924
        rdar://problem/28208208

        Reviewed by Dan Bernstein.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
        (main):
        Set AppleMagnifiedMode to true.

2016-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Get rid of DataObjectGtk::forClipboard and cleanup pasteboard code
        https://bugs.webkit.org/show_bug.cgi?id=161907

        Reviewed by Michael Catanzaro.

        Update to DataObjectGtk and PasteboardHelper API changes.

        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::startDrag):
        (WebKit::DragAndDropHandler::fillDragData):
        (WebKit::DragAndDropHandler::dataObjectForDropData):
        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
        (WebKit::WebDragClient::startDrag):
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::collapseSelection):
        (WebKit::WebEditorClient::updateGlobalSelection): Remove wrong X11 guards, since that code is not X11 specific.

2016-09-12  DAN SAUNDERS  <dasau@microsoft.com>

        AX: WKWebView for macOS does not allow configuration of tabsToLinks
        https://bugs.webkit.org/show_bug.cgi?id=161394

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKPreferences.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences encodeWithCoder:]):
        (-[WKPreferences initWithCoder:]):
        (-[WKPreferences tabFocusesLinks]):
        (-[WKPreferences setTabFocusesLinks:]):

2016-09-12  Saam Barati  <sbarati@apple.com>

        Add WebKit support for an option in Safari's debug menu similar to "Get Bytecode Profile" but for the Sampling Profiler's data
        https://bugs.webkit.org/show_bug.cgi?id=161785

        Reviewed by Tim Horton.

        This patch follows in the steps of how we dump output for the
        internal JSC bytecode profiler tool, but now also for the internal
        JSC sampling profiler tool. This can be used when doing performance
        analysis work analyzing the JS execution of a page.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetSamplingProfilerOutput):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::getSamplingProfilerOutput):
        (WebKit::WebPageProxy::invalidateStringCallback):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::getSamplingProfilerOutput):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-09-12  Keith Rollin  <krollin@apple.com>

        Enhance Network logging
        https://bugs.webkit.org/show_bug.cgi?id=161771

        Reviewed by Antti Koivisto.

        Modify current logging statements to follow a consistent pattern in
        order to enhance readability and parsing.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::didReceiveResponse):
        (WebKit::Download::didReceiveData):
        (WebKit::Download::didFinish):
        (WebKit::Download::didFail):
        (WebKit::Download::didCancel):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):
        (WebKit::WebResourceLoader::didReceiveResponse):
        (WebKit::WebResourceLoader::didReceiveData):
        (WebKit::WebResourceLoader::didFinishResourceLoad):
        (WebKit::WebResourceLoader::didFailResourceLoad):
        (WebKit::WebResourceLoader::didReceiveResource):

2016-09-09  Tim Horton  <timothy_horton@apple.com>

        WKThumbnailView should expose a mode where it can be reparented without resnapshotting
        https://bugs.webkit.org/show_bug.cgi?id=161828
        <rdar://problem/28229756>

        Reviewed by Alex Christensen.

        * UIProcess/API/Cocoa/_WKThumbnailView.h:
        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
        (-[_WKThumbnailView initWithFrame:fromWKView:]):
        (-[_WKThumbnailView _viewWasUnparented]):
        Add such a mode. Bail from snapshot teardown when unparented if it is on.

2016-09-08  Dean Jackson  <dino@apple.com>

        Expose Apple Pencil data to Touch events
        https://bugs.webkit.org/show_bug.cgi?id=161783
        <rdar://problem/28218898>

        Reviewed by Beth Dakin.

        * Platform/spi/ios/UIKitSPI.h: Expose the new SPI. Since this is only used
        on public builds, guard it against everything that is <= iOS 10.0.
        * Shared/WebEvent.h: New properties.
        (WebKit::WebPlatformTouchPoint::setAltitudeAngle):
        (WebKit::WebPlatformTouchPoint::altitudeAngle):
        (WebKit::WebPlatformTouchPoint::setAzimuthAngle):
        (WebKit::WebPlatformTouchPoint::azimuthAngle):
        (WebKit::WebPlatformTouchPoint::setTouchType):
        (WebKit::WebPlatformTouchPoint::touchType):
        (WebKit::WebPlatformTouchPoint::force): Deleted.
        * Shared/WebEventConversion.cpp:
        (WebKit::webPlatformTouchTypeToPlatform):
        (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint): More
        parameters sent to parent constructor.
        * Shared/ios/NativeWebTouchEventIOS.mm:
        (WebKit::convertTouchType):
        (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
        * Shared/ios/WebPlatformTouchPointIOS.cpp:
        (WebKit::WebPlatformTouchPoint::encode):
        (WebKit::WebPlatformTouchPoint::decode):

2016-09-09  Tim Horton  <timothy_horton@apple.com>

        Text replacement candidates don't always overwrite the entire original string
        https://bugs.webkit.org/show_bug.cgi?id=161779
        <rdar://problem/28033492>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformEditorState):
        Make use of the shared implementation of contextRangeForCandidateRequest.

2016-09-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r205689.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
        (webkit_dom_html_o_list_element_set_start):

2016-09-08  Dan Bernstein  <mitz@apple.com>

        Re-landing the fix for

        [Mac] .tbd files for the shims end up installed when building with GENERATE_TEXT_BASED_STUBS=YES
        https://bugs.webkit.org/show_bug.cgi?id=161722

        without reintroducing https://webkit.org/b/161782

        * Configurations/Shim.xcconfig: Don’t install the shims. The Copy Shims build phase in the
          WebKit target will copy them into place without bringing their .tbd files along. Keep the
          install path set, though, because it determines the dylibs’ install names.

2016-09-08  Commit Queue  <commit-queue@webkit.org>

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

        Introduced a crash at launch and broke all our Mac perf
        testing (Requested by rniwa on #webkit).

        Reverted changeset:

        "[Mac] .tbd files for the shims end up installed when building
        with GENERATE_TEXT_BASED_STUBS=YES"
        https://bugs.webkit.org/show_bug.cgi?id=161722
        http://trac.webkit.org/changeset/205576

2016-09-08  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Move the BitmapImage platform dependent code to a new file named NativeImage[CG|Cairo].cpp
        https://bugs.webkit.org/show_bug.cgi?id=158684

        Reviewed by Simon Fraser.

        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
        (WKIconDatabaseTryGetCGImageForURL):
        (WKIconDatabaseTryCopyCGImageArrayForURL):
        It was the only place in the code which uses BitmapImage::getCGImageArray().
        Call BitmapImage::framesNativeImages() instead and form the returned
        Vector<NativeImagePtr> build the CFArrayRef.

        * UIProcess/WebIconDatabase.h:
        Include "NativeImage.h" instead of "NativeImagePtr.h".
        
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _presentationSnapshotForPreviewItemController:]):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::isAlmostSolidColor):
        Call BitmapImage::getCGImageRef() instead of calling BitmapImage::nativeImage().

2016-09-08  Zan Dobersek  <zdobersek@igalia.com>

        Move webkit2gtk.pc.in, webkit2gtk-web-extension.pc.in files under Source/WebKit2/gtk/
        https://bugs.webkit.org/show_bug.cgi?id=161703

        Reviewed by Carlos Garcia Campos.

        Move the pkg-config input files that are specific to the GTK+ port
        under the Source/WebKit2/gtk/ directory. Build rules are updated
        accordingly.

        * PlatformGTK.cmake:
        * gtk/webkit2gtk-web-extension.pc.in: Renamed from Source/WebKit2/webkit2gtk-web-extension.pc.in.
        * gtk/webkit2gtk.pc.in: Renamed from Source/WebKit2/webkit2gtk.pc.in.

2016-09-07  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Address some clang static analyzer warnings in WebKit
        https://bugs.webkit.org/show_bug.cgi?id=161597

        Reviewed by Darin Adler.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (-[WKLayerHostView makeBackingLayer]):
        * UIProcess/mac/WKSharingServicePickerDelegate.mm:
        (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
        * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
        (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):
        Address leaks caught by the static analyzer.

2016-09-07  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Remove stale WebSoupRequestManager headers
        https://bugs.webkit.org/show_bug.cgi?id=161691

        Reviewed by Sergio Villar Senin.

        WebSoupRequestManager, WebSoupRequestManagerProxy and WebSoupRequestManagerClient
        classes were used to implement custom URI scheme support for Soup. This API and
        the implementations of these classes were removed in r174584, but curiously the
        headers went unnoticed. This patch removes them, as well as the
        WebSoupRequestManagerProxy forwarding declaration in WKAPICastSoup.h.

        * UIProcess/API/C/soup/WKAPICastSoup.h:
        * UIProcess/soup/WebSoupRequestManagerClient.h: Removed.
        * UIProcess/soup/WebSoupRequestManagerProxy.h: Removed.
        (WebKit::WebSoupRequestManagerProxy::registeredURISchemes): Deleted.
        * WebProcess/soup/WebSoupRequestManager.h: Removed.

2016-09-07  Simon Fraser  <simon.fraser@apple.com>

        Enable the <meter> element on iOS
        https://bugs.webkit.org/show_bug.cgi?id=161714
        rdar://problem/8978410

        Reviewed by Tim Horton.

        Define ENABLE_METER_ELEMENT unconditionally now.

        * Configurations/FeatureDefines.xcconfig:

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

        [Mac] .tbd files for the shims end up installed when building with GENERATE_TEXT_BASED_STUBS=YES
        https://bugs.webkit.org/show_bug.cgi?id=161722

        Reviewed by Anders Carlsson.

        * Configurations/Shim.xcconfig: Don’t install the shims. The Copy Shims build phase in the
          WebKit target will copy them into place without bringing their .tbd files along.

2016-09-07  Mark Lam  <mark.lam@apple.com>

        Add CatchScope and force all exception checks to be via ThrowScope or CatchScope.
        https://bugs.webkit.org/show_bug.cgi?id=161498

        Reviewed by Geoffrey Garen.

        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
        (WebKit::NPJSObject::hasMethod):
        (WebKit::NPJSObject::hasProperty):
        (WebKit::NPJSObject::getProperty):
        (WebKit::NPJSObject::setProperty):
        (WebKit::NPJSObject::removeProperty):
        (WebKit::NPJSObject::construct):
        (WebKit::NPJSObject::invoke):

2016-09-07  Konstantin Tokarev  <annulen@yandex.ru>

        [GTK] Make inspection of Inspector conditional on DEVELOPER_MODE
        https://bugs.webkit.org/show_bug.cgi?id=161702

        Reviewed by Michael Catanzaro.

        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):

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

        [Cocoa] Update availability attributes per the macOS Sierra and iOS 10 GM seeds
        https://bugs.webkit.org/show_bug.cgi?id=161704

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/_WKHitTestResult.h:
        * UIProcess/API/Cocoa/WKErrorPrivate.h:
        * UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
        * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
        * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * UIProcess/API/Cocoa/WKPreviewActionItem.h:
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h:
        * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        * UIProcess/API/Cocoa/WKUserScriptPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKElementAction.h:
        * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/API/Cocoa/_WKInputDelegate.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentWorld.h:
        * UIProcess/API/Cocoa/_WKUserInitiatedAction.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataSize.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:

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

        [EFL] Switch to ENABLE_NETWORK_CACHE
        https://bugs.webkit.org/show_bug.cgi?id=152676

        Reviewed by Alex Christensen.

        Nowadays GTK+ always uses the network cache, and never the soup cache. Remove support for
        using the soup cache, and switch the EFL port to use network cache.

        * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
        (WebKit::NetworkCache::BlobStorage::add): Check return value of link to placate
        -Werror=unused-result on EFL builder
        * NetworkProcess/efl/NetworkProcessMainEfl.cpp:
        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::getCacheDiskFreeSize):
        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
        (WebKit::NetworkProcess::platformSetCacheModel):
        (WebKit::NetworkProcess::clearDiskCache):
        * PlatformEfl.cmake: Add files to build.
        * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp:
        (API::WebsiteDataStore::defaultNetworkCacheDirectory): Use a saner location.
        * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
        (API::WebsiteDataStore::defaultNetworkCacheDirectory):
        * UIProcess/API/gtk/WebKitPrivate.h:
        * UIProcess/soup/WebProcessPoolSoup.cpp:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        * WebProcess/efl/WebProcessMainEfl.cpp:
        * config.h:

2016-09-07  Youenn Fablet  <youenn@apple.com>

        [Streams API] Separate compile flag for ReadableStream and WritableStream
        https://bugs.webkit.org/show_bug.cgi?id=161044

        Reviewed by Alex Christensen.

        Moving from STREAMS_API to READABLE_STREAM_API and WRITABLE_STREAM_API compilation flags.

        * Configurations/FeatureDefines.xcconfig:

2016-09-07  Emanuele Aina  <emanuele.aina@collabora.com>

        [GTK] Clarify frame callbacks behaviour in Wayland compositor
        https://bugs.webkit.org/show_bug.cgi?id=161683

        Reviewed by Carlos Garcia Campos.

        The way we fire frame callbacks in the nested Wayland compositor can
        be puzzling to developers expecting Wayland semantics, but since we
        have our own mechanism to handle synchronization we don't care much
        about them. Add a comment to avoid surprised Wayland developers.

        * UIProcess/gtk/WaylandCompositor.cpp:
        (WebKit::WaylandCompositor::Surface::commit):

2016-09-07  Csaba Osztrogonác  <ossy@webkit.org>

        URTBF after r205369, just for fun.

        * PlatformMac.cmake: Added new files.

2016-09-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove unused GObject DOM unstable API
        https://bugs.webkit.org/show_bug.cgi?id=161440

        Reviewed by Philippe Normand.

        Remove unstable GObject DOM API now that we no longer auto-generate the bindings.

        * PlatformGTK.cmake:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimatable.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimatable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationEffect.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationEffect.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationEffectPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationTimeline.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationTimeline.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAnimationTimelinePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
        (webkit_dom_attr_get_property):
        (webkit_dom_attr_class_init):
        (webkit_dom_attr_get_prefix): Deleted.
        (webkit_dom_attr_get_local_name): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttrUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrack.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrack.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrackList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrackList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrackListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAudioTrackPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBarProp.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBarProp.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBarPropPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBatteryManager.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBatteryManager.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBatteryManagerPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
        (webkit_dom_blob_get_property):
        (webkit_dom_blob_class_init):
        (webkit_dom_blob_get_size):
        (webkit_dom_blob_init): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlobUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
        (webkit_dom_character_data_get_property):
        (webkit_dom_character_data_class_init):
        (webkit_dom_character_data_get_length):
        (webkit_dom_character_data_set_property): Deleted.
        (webkit_dom_character_data_substring_data): Deleted.
        (webkit_dom_character_data_append_data): Deleted.
        (webkit_dom_character_data_insert_data): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterDataUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMApplicationCache.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMApplicationCache.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMApplicationCachePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMCSSNamespace.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMCSSNamespace.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMCSSNamespacePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeType.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeType.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeTypeArray.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeTypeArray.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeTypeArrayPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMMimeTypePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMNamedFlowCollection.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMNamedFlowCollection.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMNamedFlowCollectionPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPlugin.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPlugin.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPluginArray.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPluginArray.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPluginArrayPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMPluginPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringMap.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringMap.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMStringMapPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowSpeechSynthesis.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowSpeechSynthesis.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDataCue.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDataCue.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDataCuePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDatabase.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDatabase.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDatabasePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentAnimation.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentAnimation.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTimeline.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTimeline.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTimelinePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
        (webkit_dom_document_type_get_name): Deleted.
        (webkit_dom_document_type_get_entities): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTypeUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
        (webkit_dom_event_get_property):
        (webkit_dom_event_class_init):
        (webkit_dom_event_init): Deleted.
        (webkit_dom_event_stop_propagation): Deleted.
        (webkit_dom_event_get_bubbles): Deleted.
        (webkit_dom_event_get_cancelable): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
        (webkit_dom_file_get_property):
        (webkit_dom_file_class_init):
        (webkit_dom_file_get_name):
        (webkit_dom_file_init): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGamepad.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGamepad.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGamepadList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGamepadList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGeolocation.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGeolocation.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMGeolocationPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
        (webkit_dom_html_anchor_element_set_property):
        (webkit_dom_html_anchor_element_get_property):
        (webkit_dom_html_anchor_element_class_init):
        (webkit_dom_html_anchor_element_init): Deleted.
        (webkit_dom_html_anchor_element_get_charset): Deleted.
        (webkit_dom_html_anchor_element_set_charset): Deleted.
        (webkit_dom_html_anchor_element_get_coords): Deleted.
        (webkit_dom_html_anchor_element_set_coords): Deleted.
        (webkit_dom_html_anchor_element_get_target): Deleted.
        (webkit_dom_html_anchor_element_set_target): Deleted.
        (webkit_dom_html_anchor_element_get_type_attr): Deleted.
        (webkit_dom_html_anchor_element_set_type_attr): Deleted.
        (webkit_dom_html_anchor_element_set_href): Deleted.
        (webkit_dom_html_anchor_element_get_protocol): Deleted.
        (webkit_dom_html_anchor_element_set_protocol): Deleted.
        (webkit_dom_html_anchor_element_set_hash): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
        (webkit_dom_html_area_element_set_property):
        (webkit_dom_html_area_element_get_property):
        (webkit_dom_html_area_element_class_init):
        (webkit_dom_html_area_element_init): Deleted.
        (webkit_dom_html_area_element_get_alt): Deleted.
        (webkit_dom_html_area_element_set_alt): Deleted.
        (webkit_dom_html_area_element_get_coords): Deleted.
        (webkit_dom_html_area_element_set_coords): Deleted.
        (webkit_dom_html_area_element_get_hostname): Deleted.
        (webkit_dom_html_area_element_set_hostname): Deleted.
        (webkit_dom_html_area_element_get_port): Deleted.
        (webkit_dom_html_area_element_set_port): Deleted.
        (webkit_dom_html_area_element_get_pathname): Deleted.
        (webkit_dom_html_area_element_get_hash): Deleted.
        (webkit_dom_html_area_element_set_hash): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAudioElement.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAudioElement.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAudioElementPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
        (webkit_dom_html_button_element_set_property):
        (webkit_dom_html_button_element_get_property):
        (webkit_dom_html_button_element_class_init):
        (webkit_dom_html_button_element_get_will_validate):
        (webkit_dom_html_button_element_get_autofocus): Deleted.
        (webkit_dom_html_button_element_set_autofocus): Deleted.
        (webkit_dom_html_button_element_get_disabled): Deleted.
        (webkit_dom_html_button_element_set_disabled): Deleted.
        (webkit_dom_html_button_element_get_form): Deleted.
        (webkit_dom_html_button_element_get_button_type): Deleted.
        (webkit_dom_html_button_element_set_button_type): Deleted.
        (webkit_dom_html_button_element_get_name): Deleted.
        (webkit_dom_html_button_element_set_value): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDetailsElement.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDetailsElement.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDetailsElementPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
        (webkit_dom_html_field_set_element_get_property):
        (webkit_dom_html_field_set_element_class_init):
        (webkit_dom_html_field_set_element_get_form):
        (webkit_dom_html_field_set_element_init): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
        (webkit_dom_html_form_element_set_property):
        (webkit_dom_html_form_element_get_property):
        (webkit_dom_html_form_element_class_init):
        (webkit_dom_html_form_element_get_length):
        (webkit_dom_html_form_element_submit): Deleted.
        (webkit_dom_html_form_element_reset): Deleted.
        (webkit_dom_html_form_element_get_action): Deleted.
        (webkit_dom_html_form_element_set_action): Deleted.
        (webkit_dom_html_form_element_get_enctype): Deleted.
        (webkit_dom_html_form_element_set_encoding): Deleted.
        (webkit_dom_html_form_element_get_method): Deleted.
        (webkit_dom_html_form_element_set_method): Deleted.
        (webkit_dom_html_form_element_set_target): Deleted.
        (webkit_dom_html_form_element_get_elements): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
        (webkit_dom_html_html_element_set_property):
        (webkit_dom_html_html_element_get_property):
        (webkit_dom_html_html_element_class_init):
        (webkit_dom_html_html_element_set_version):
        (webkit_dom_html_html_element_get_version): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
        (webkit_dom_html_iframe_element_set_property):
        (webkit_dom_html_iframe_element_get_property):
        (webkit_dom_html_iframe_element_class_init):
        (webkit_dom_html_iframe_element_init): Deleted.
        (webkit_dom_html_iframe_element_set_src): Deleted.
        (webkit_dom_html_iframe_element_get_width): Deleted.
        (webkit_dom_html_iframe_element_set_width): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
        (webkit_dom_html_image_element_set_property):
        (webkit_dom_html_image_element_get_property):
        (webkit_dom_html_image_element_class_init):
        (webkit_dom_html_image_element_set_long_desc): Deleted.
        (webkit_dom_html_image_element_get_src): Deleted.
        (webkit_dom_html_image_element_set_src): Deleted.
        (webkit_dom_html_image_element_get_natural_height): Deleted.
        (webkit_dom_html_image_element_get_natural_width): Deleted.
        (webkit_dom_html_image_element_get_x): Deleted.
        (webkit_dom_html_image_element_get_y): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
        (webkit_dom_html_input_element_set_property):
        (webkit_dom_html_input_element_get_property):
        (webkit_dom_html_input_element_class_init):
        (webkit_dom_html_input_element_set_capture_type):
        (webkit_dom_html_input_element_init): Deleted.
        (webkit_dom_html_input_element_select): Deleted.
        (webkit_dom_html_input_element_get_accept): Deleted.
        (webkit_dom_html_input_element_set_accept): Deleted.
        (webkit_dom_html_input_element_get_alt): Deleted.
        (webkit_dom_html_input_element_set_alt): Deleted.
        (webkit_dom_html_input_element_get_default_checked): Deleted.
        (webkit_dom_html_input_element_set_default_checked): Deleted.
        (webkit_dom_html_input_element_get_checked): Deleted.
        (webkit_dom_html_input_element_set_checked): Deleted.
        (webkit_dom_html_input_element_get_disabled): Deleted.
        (webkit_dom_html_input_element_get_files): Deleted.
        (webkit_dom_html_input_element_set_files): Deleted.
        (webkit_dom_html_input_element_set_height): Deleted.
        (webkit_dom_html_input_element_get_indeterminate): Deleted.
        (webkit_dom_html_input_element_get_max_length): Deleted.
        (webkit_dom_html_input_element_set_max_length): Deleted.
        (webkit_dom_html_input_element_get_name): Deleted.
        (webkit_dom_html_input_element_set_name): Deleted.
        (webkit_dom_html_input_element_get_size): Deleted.
        (webkit_dom_html_input_element_set_size): Deleted.
        (webkit_dom_html_input_element_get_src): Deleted.
        (webkit_dom_html_input_element_set_input_type): Deleted.
        (webkit_dom_html_input_element_get_default_value): Deleted.
        (webkit_dom_html_input_element_set_default_value): Deleted.
        (webkit_dom_html_input_element_set_value): Deleted.
        (webkit_dom_html_input_element_get_width): Deleted.
        (webkit_dom_html_input_element_set_width): Deleted.
        (webkit_dom_html_input_element_get_will_validate): Deleted.
        (webkit_dom_html_input_element_get_align): Deleted.
        (webkit_dom_html_input_element_set_align): Deleted.
        (webkit_dom_html_input_element_get_use_map): Deleted.
        (webkit_dom_html_input_element_set_use_map): Deleted.
        (webkit_dom_html_input_element_get_capture_type): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLKeygenElement.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLKeygenElement.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLKeygenElementPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
        (webkit_dom_html_label_element_get_property):
        (webkit_dom_html_label_element_class_init):
        (webkit_dom_html_label_element_init): Deleted.
        (webkit_dom_html_label_element_get_form): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
        (webkit_dom_html_link_element_set_property):
        (webkit_dom_html_link_element_get_property):
        (webkit_dom_html_link_element_class_init):
        (webkit_dom_html_link_element_get_disabled): Deleted.
        (webkit_dom_html_link_element_set_disabled): Deleted.
        (webkit_dom_html_link_element_get_charset): Deleted.
        (webkit_dom_html_link_element_set_charset): Deleted.
        (webkit_dom_html_link_element_get_href): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
        (webkit_dom_html_marquee_element_class_init):
        (webkit_dom_html_marquee_element_stop):
        (webkit_dom_html_marquee_element_init): Deleted.
        (webkit_dom_html_marquee_element_start): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMediaElement.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMediaElement.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMediaElementPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
        (webkit_dom_html_o_list_element_set_property):
        (webkit_dom_html_o_list_element_get_property):
        (webkit_dom_html_o_list_element_class_init):
        (webkit_dom_html_o_list_element_init): Deleted.
        (webkit_dom_html_o_list_element_get_compact): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
        (webkit_dom_html_object_element_get_property):
        (webkit_dom_html_object_element_class_init):
        (webkit_dom_html_object_element_set_property): Deleted.
        (webkit_dom_html_object_element_get_form): Deleted.
        (webkit_dom_html_object_element_get_code): Deleted.
        (webkit_dom_html_object_element_set_code): Deleted.
        (webkit_dom_html_object_element_get_align): Deleted.
        (webkit_dom_html_object_element_set_align): Deleted.
        (webkit_dom_html_object_element_get_archive): Deleted.
        (webkit_dom_html_object_element_set_archive): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
        (webkit_dom_html_options_collection_get_selected_index): Deleted.
        (webkit_dom_html_options_collection_set_selected_index): Deleted.
        (webkit_dom_html_options_collection_get_length): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollectionUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
        (webkit_dom_html_script_element_set_property):
        (webkit_dom_html_script_element_get_property):
        (webkit_dom_html_script_element_class_init):
        (webkit_dom_html_script_element_set_type_attr):
        (webkit_dom_html_script_element_init): Deleted.
        (webkit_dom_html_script_element_get_html_for): Deleted.
        (webkit_dom_html_script_element_set_html_for): Deleted.
        (webkit_dom_html_script_element_get_event): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
        (webkit_dom_html_select_element_set_property):
        (webkit_dom_html_select_element_get_property):
        (webkit_dom_html_select_element_class_init):
        (webkit_dom_html_select_element_get_will_validate):
        (webkit_dom_html_select_element_named_item): Deleted.
        (webkit_dom_html_select_element_get_autofocus): Deleted.
        (webkit_dom_html_select_element_set_autofocus): Deleted.
        (webkit_dom_html_select_element_get_disabled): Deleted.
        (webkit_dom_html_select_element_set_disabled): Deleted.
        (webkit_dom_html_select_element_get_form): Deleted.
        (webkit_dom_html_select_element_set_size): Deleted.
        (webkit_dom_html_select_element_get_select_type): Deleted.
        (webkit_dom_html_select_element_get_options): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
        (webkit_dom_html_style_element_set_property):
        (webkit_dom_html_style_element_get_property):
        (webkit_dom_html_style_element_class_init):
        (webkit_dom_html_style_element_get_sheet):
        (webkit_dom_html_style_element_get_disabled): Deleted.
        (webkit_dom_html_style_element_set_disabled): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
        (webkit_dom_html_table_element_set_property):
        (webkit_dom_html_table_element_get_property):
        (webkit_dom_html_table_element_class_init):
        (webkit_dom_html_table_element_insert_row): Deleted.
        (webkit_dom_html_table_element_set_summary): Deleted.
        (webkit_dom_html_table_element_get_width): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
        (webkit_dom_html_text_area_element_set_property):
        (webkit_dom_html_text_area_element_get_property):
        (webkit_dom_html_text_area_element_class_init):
        (webkit_dom_html_text_area_element_init): Deleted.
        (webkit_dom_html_text_area_element_set_selection_range): Deleted.
        (webkit_dom_html_text_area_element_set_autofocus): Deleted.
        (webkit_dom_html_text_area_element_get_disabled): Deleted.
        (webkit_dom_html_text_area_element_get_form): Deleted.
        (webkit_dom_html_text_area_element_get_name): Deleted.
        (webkit_dom_html_text_area_element_get_rows): Deleted.
        (webkit_dom_html_text_area_element_set_rows): Deleted.
        (webkit_dom_html_text_area_element_get_cols): Deleted.
        (webkit_dom_html_text_area_element_set_cols): Deleted.
        (webkit_dom_html_text_area_element_get_area_type): Deleted.
        (webkit_dom_html_text_area_element_get_default_value): Deleted.
        (webkit_dom_html_text_area_element_get_value): Deleted.
        (webkit_dom_html_text_area_element_set_value): Deleted.
        (webkit_dom_html_text_area_element_get_will_validate): Deleted.
        (webkit_dom_html_text_area_element_get_selection_start): Deleted.
        (webkit_dom_html_text_area_element_set_selection_start): Deleted.
        (webkit_dom_html_text_area_element_get_selection_end): Deleted.
        (webkit_dom_html_text_area_element_set_selection_end): Deleted.
        (webkit_dom_html_text_area_element_is_edited): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElementUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLVideoElement.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLVideoElement.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLVideoElementPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHistory.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHistory.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHistoryPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyframeEffect.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyframeEffect.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyframeEffectPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMLocation.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMLocation.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMLocationPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaController.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaController.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaControllerPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaDevices.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaDevices.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaDevicesPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaError.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaError.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaErrorPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaQueryList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaQueryList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaQueryListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaTrackSupportedConstraints.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaTrackSupportedConstraints.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaTrackSupportedConstraintsPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMessagePort.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMessagePort.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMessagePortPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
        (webkit_dom_mouse_event_get_property):
        (webkit_dom_mouse_event_class_init):
        (webkit_dom_mouse_event_get_y): Deleted.
        (webkit_dom_mouse_event_get_from_element): Deleted.
        (webkit_dom_mouse_event_get_to_element): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEventUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNavigator.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNavigator.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNavigatorMediaDevices.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNavigatorMediaDevices.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNavigatorPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
        (webkit_dom_node_get_property):
        (webkit_dom_node_class_init):
        (webkit_dom_node_init): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformance.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformance.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceEntry.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceEntry.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceEntryPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceNavigation.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceNavigation.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceNavigationPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformancePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceTiming.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceTiming.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformanceTimingPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:
        (WebKit::wrap): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMScreen.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMScreen.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMScreenPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesis.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesis.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisEvent.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisEvent.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisEventPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisUtterance.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisUtterance.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisUtterancePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisVoice.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisVoice.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMSpeechSynthesisVoicePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorage.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorage.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorageInfo.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorageInfo.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStoragePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorageQuota.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStorageQuota.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleMedia.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleMedia.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleMediaPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrack.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrack.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCue.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCue.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCueList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCueList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCueListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackCuePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTextTrackPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTimeRanges.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTimeRanges.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTimeRangesPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTouch.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTouch.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTouchPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTrackEvent.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTrackEvent.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTrackEventPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
        (webkit_dom_ui_event_get_property):
        (webkit_dom_ui_event_class_init):
        (webkit_dom_ui_event_get_page_y):
        (webkit_dom_ui_event_init): Deleted.
        (webkit_dom_ui_event_init_ui_event): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEventUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandler.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandler.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlerPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlersNamespace.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlersNamespace.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlersNamespacePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVTTCue.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVTTCue.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVTTCuePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMValidityState.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMValidityState.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMValidityStatePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoPlaybackQuality.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoPlaybackQuality.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoPlaybackQualityPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrack.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrack.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrackList.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrackList.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrackListPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMVideoTrackPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebAnimation.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebAnimation.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebAnimationPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamedFlow.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamedFlow.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamedFlowPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamespace.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamespace.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitNamespacePrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitPoint.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitPoint.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWebKitPointPrivate.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
        (webkit_dom_wheel_event_get_property):
        (webkit_dom_wheel_event_class_init):
        (webkit_dom_wheel_event_get_wheel_delta):
        (webkit_dom_wheel_event_init): Deleted.
        (webkit_dom_wheel_event_init_wheel_event): Deleted.
        (webkit_dom_wheel_event_get_wheel_delta_x): Deleted.
        (webkit_dom_wheel_event_get_wheel_delta_y): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEventUnstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups-unstable.h: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines-unstable.h: Removed.

2016-09-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move some GObject DOM unstable API to stable
        https://bugs.webkit.org/show_bug.cgi?id=161681

        Reviewed by Žan Doberšek.

        Move unstable API currently used by applications to the stable API in preparation for removing all unused
        unstable API.

        * PlatformGTK.cmake:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.cpp: Removed.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustom.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCustomUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
        (webkit_dom_dom_window_get_property):
        (webkit_dom_dom_window_class_init):
        (webkit_dom_dom_window_webkit_message_handlers_post_message):
        (webkit_dom_dom_window_set_property): Deleted.
        (webkit_dom_dom_window_get_computed_style): Deleted.
        (webkit_dom_dom_window_capture_events): Deleted.
        (webkit_dom_dom_window_get_frame_element): Deleted.
        (webkit_dom_dom_window_get_offscreen_buffering): Deleted.
        (webkit_dom_dom_window_get_outer_height): Deleted.
        (webkit_dom_dom_window_get_outer_width): Deleted.
        (webkit_dom_dom_window_get_inner_height): Deleted.
        (webkit_dom_dom_window_get_inner_width): Deleted.
        (webkit_dom_dom_window_get_screen_x): Deleted.
        (webkit_dom_dom_window_set_status): Deleted.
        (webkit_dom_dom_window_get_default_status): Deleted.
        (webkit_dom_dom_window_get_window): Deleted.
        (webkit_dom_dom_window_get_frames): Deleted.
        (webkit_dom_dom_window_get_parent): Deleted.
        (webkit_dom_dom_window_get_top): Deleted.
        (webkit_dom_dom_window_get_document): Deleted.
        (webkit_dom_dom_window_get_device_pixel_ratio): Deleted.
        (webkit_dom_dom_window_get_orientation): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
        (webkit_dom_document_get_property):
        (webkit_dom_document_webkit_cancel_fullscreen):
        (webkit_dom_document_get_webkit_is_fullscreen):
        (webkit_dom_document_get_webkit_fullscreen_keyboard_input_allowed):
        (webkit_dom_document_get_webkit_current_fullscreen_element):
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
        (webkit_dom_element_webkit_request_fullscreen): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
        (webkit_dom_html_input_element_is_edited):
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
        (webkit_dom_html_link_element_set_sizes):
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
        (webkit_dom_html_text_area_element_is_edited):
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRangeUnstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlersNamespace.cpp:
        (webkit_dom_user_message_handlers_namespace_get_handler):
        (webkit_dom_user_message_handlers_namespace_init): Deleted.
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUserMessageHandlersNamespace.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
        * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-docs.sgml:
        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines-unstable.h:
        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:

2016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] Several flaky tests
        https://bugs.webkit.org/show_bug.cgi?id=161242

        Reviewed by Michael Catanzaro.

        Reset the viewport attributes on SimpleViewportController when viewport attributes change and fixed layout is
        not used. We were only updating the viewport attributes when fixed layout was used, but not resetting them again
        when it's no longer used. That caused that reference tests run after fast/fixed-layout/fixed-layout.html or
        compositing/fixed-with-fixed-layout.html in the same worker thread were incorrectly rendered.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): Remove ifdefs and call
        WebPage::viewportPropertiesDidChange() unconditionally.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setSize): Pass current page viewport arguments to sendViewportAttributesChanged().
        (WebKit::WebPage::sendViewportAttributesChanged): It now receives the viewport arguments.
        (WebKit::WebPage::viewportPropertiesDidChange): Move the iOS implementation from WebPageIOS.mm and for
        coordinated graphics call sendViewportAttributesChanged() when fixed layout is used or reset the viewport
        attributes when not used in case of threaded compositor.
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::viewportPropertiesDidChange): Moved out of iOS ifdef.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::viewportPropertiesDidChange): Deleted.

2016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix the GTK+ build after r205524.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
        (webkit_dom_html_input_element_get_max_length):
        (webkit_dom_html_input_element_set_max_length):
        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
        (webkit_dom_html_text_area_element_get_max_length):
        (webkit_dom_html_text_area_element_set_max_length):

2016-09-06  Daniel Bates  <dabates@apple.com>

        [iOS] WebKit2 fails to build with iOS 10 beta SDK - "'UIWKTextInteractionAssistant' may not respond to 'selectAll:'"
        https://bugs.webkit.org/show_bug.cgi?id=161663

        Reviewed by Darin Adler.

        The UIResponderStandardEditActions extensions, including the selectAll: message, are now
        part of a formal protocol by the same name as of the iOS 10 beta SDK.

        * Platform/spi/ios/UIKitSPI.h:

2016-09-06  Ryosuke Niwa  <rniwa@webkit.org>

        Enable custom elements API in Safari Technology Preview
        https://bugs.webkit.org/show_bug.cgi?id=161518

        Reviewed by Chris Dumez.

        Re-enable custom elements API in Safari Technology Preview after r203296
        now that our implementation has caught up to the latest specification changes.

        * Shared/WebPreferencesDefinitions.h:

2016-09-01  Simon Fraser  <simon.fraser@apple.com>

        Use TemporaryChange<> to maintain m_userIsInteracting
        https://bugs.webkit.org/show_bug.cgi?id=161497

        Reviewed by Tim Horton.

        Replace some error-prone manual set/clear of m_userIsInteracting with
        TemporaryChange<>.

        No behavior change.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::keyEvent):
        (WebKit::WebPage::dispatchTouchEvent):

2016-09-06  Tim Horton  <timothy_horton@apple.com>

        Remove SwipeTransitionStyle; only Overlap has ever been used
        https://bugs.webkit.org/show_bug.cgi?id=161617

        Reviewed by Alex Christensen.

        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::handleSwipeGesture):
        Remove SwipeTransitionStyle::Push, and SwipeTransitionStyle itself entirely,
        because we've never used it and it is only supported by the Mac
        implementation of ViewGestureController.

2016-09-06  Daniel Bates  <dabates@apple.com>

        Remove EXTERN_C from WTF
        https://bugs.webkit.org/show_bug.cgi?id=161090

        Reviewed by Brent Fulgham.

        Guard external C declarations in WTF_EXTERN_C_BEGIN, WTF_EXTERN_C_END.

        * Platform/spi/ios/ManagedConfigurationSPI.h:

2016-09-06  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r205407.

        Not the correct way to implement this functionality

        Reverted changeset:

        "Consult with the FrameLoaderClient about whether or not
        content extensions should be enabled when loading this URL."
        https://bugs.webkit.org/show_bug.cgi?id=161441
        http://trac.webkit.org/changeset/205407

2016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Wayland] evince-browser-plugin prevents viewing PDFs
        https://bugs.webkit.org/show_bug.cgi?id=158697

        Reviewed by Michael Catanzaro.

        Use a different cache file for plugins depending on the current platform display. Plugins can claim to work on
        X11 but not on Wayland, for example, if they need XEmebed to work. That's the case of the evince browser plugin.

        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
        (WebKit::cacheFilenameForCurrentDisplay):
        (WebKit::PluginInfoCache::PluginInfoCache):

2016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Update timer should have lower priority than tasks scheduled in compositing thread
        https://bugs.webkit.org/show_bug.cgi?id=161625

        Reviewed by Sergio Villar Senin.

        This way, if a resize is scheduled, for example, and there are pending updates, the resize will happen first,
        and then the updates will happen at the right size.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::CompositingRunLoop): Use G_PRIORITY_HIGH_IDLE as update timer priority. The actual
        priority doesn't really matter as long as it's lower than G_PRIORITY_DEFAULT, because there are only two
        possible sources in the compositing run loop, one for the tasks scheduled, and another one for the update timer.

2016-09-06  Emanuele Aina  <emanuele.aina@collabora.com>

        [GTK] glImageTargetTexture2D() is a GL function, rename accordingly
        https://bugs.webkit.org/show_bug.cgi?id=161622

        Reviewed by Carlos Garcia Campos.

        glImageTargetTexture2D() is a GL function, not EGL, using the 'egl'
        prefix is misleading.

        * UIProcess/gtk/WaylandCompositor.cpp:
        (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
        (WebKit::WaylandCompositor::initializeEGL):

2016-09-06  Emanuele Aina  <emanuele.aina@collabora.com>

        [GTK][EFL] Make *_PROCESS_CMD_PREFIX conditional on DEVELOPER_MODE
        https://bugs.webkit.org/show_bug.cgi?id=161621

        Reviewed by Carlos Garcia Campos.

        Instead of enabling support for the *_PROCESS_CMD_PREFIX set of
        environment valiables (eg. WEB_PROCESS_CMD_PREFIX) on debug builds
        only, enable it when DEVELOPER_MODE is enabled as it already guards
        similar features (eg. WEBKIT_EXEC_PATH).

        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::getLaunchOptions):
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
        (WebKit::ProcessLauncher::launchProcess):
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::launchProcess):

2016-09-05  Zan Dobersek  <zdobersek@igalia.com>

        Fix ENABLE(GAMEPAD) build errors on non-Cocoa platforms
        https://bugs.webkit.org/show_bug.cgi?id=161596

        Reviewed by Darin Adler.

        This patch fixes build errors popping up when enabling Gamepad
        feature on non-Cocoa platforms.

        * CMakeLists.txt: Add the Source/WebCore/platform/gamepad/ directory to
        WebKit2_INCLUDE_DIRECTORIES. Add GamepadData.cpp, UIGamepad.cpp files to the build.
        * UIProcess/Gamepad/UIGamepadProvider.cpp: Don't include Cocoa-specific
        HIDGamepadProvider.h file. Update methods for the UIGamepadProvider class.
        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads): Deleted.
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads): Deleted.
        (WebKit::UIGamepadProvider::platformGamepads): Deleted.
        (WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput): Deleted.

2016-09-05  Tim Horton  <timothy_horton@apple.com>

        Remove some dead code in ViewGestureControllerMac
        https://bugs.webkit.org/show_bug.cgi?id=161616

        Reviewed by Darin Adler.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::endSwipeGesture):
        All other LEGACY_SWIPE_SHADOW_STYLE code has been removed, except for this.

2016-09-05  Darin Adler  <darin@apple.com>

        More bindings improvements, particularly things not needed for JavaScript bindings
        https://bugs.webkit.org/show_bug.cgi?id=161572

        Reviewed by Sam Weinig.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
        (webkit_dom_dom_implementation_has_feature): Call SVGTests::hasFeatureForLegacyBindings
        instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
        since this does not do anything that can invoke JavaScript.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
        (webkit_dom_document_get_default_charset): Call defaultCharsetForLegacyBindings.
        Also removed JSMainThreadNullState.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
        (webkit_dom_document_type_get_entities): Changed to simply return nullptr; same behavior
        as before, but with no dependency on WebCore. Also removed JSMainThreadNullState.
        (webkit_dom_document_type_get_notations): Ditto.
        (webkit_dom_document_type_get_internal_subset): Ditto.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
        (webkit_dom_node_is_supported): Call SVGTests::hasFeatureForLegacyBindings
        instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.

2016-09-05  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed, update stale variable name

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

2016-08-31  Filip Pizlo  <fpizlo@apple.com>

        Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
        https://bugs.webkit.org/show_bug.cgi?id=160125

        Reviewed by Geoffrey Garen and Keith Miller.
        
        Just rewiring some #includes.

        * UIProcess/ViewGestureController.cpp:
        * UIProcess/WebPageProxy.cpp:
        * UIProcess/WebProcessPool.cpp:
        * UIProcess/WebProcessProxy.cpp:
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        * WebProcess/Plugins/Netscape/JSNPObject.cpp:

2016-09-05  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed error message typo fix

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::removeUserContentWorlds):

2016-09-05  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Drop ".Development" suffix from XPC service bundle IDs, leave it only on the executable
        https://bugs.webkit.org/show_bug.cgi?id=161575

        Reviewed by Sam Weinig.

        Append the ".Development" suffix to the executable names, but not to the bundle names and
        bundle IDs.

        * Configurations/BaseTarget.xcconfig: No need for a preprocessor definition anymore.
        * Configurations/BaseXPCService.xcconfig: Set EXECUTABLE_SUFFIX.
        * Configurations/DatabaseService.xcconfig: No need to suffix the service name and bundle ID.
        * Configurations/NetworkService.xcconfig: Ditto.
        * Configurations/PluginService.32.xcconfig: Ditto.
        * Configurations/PluginService.64.xcconfig: Ditto.
        * Configurations/WebContentService.xcconfig: Ditto.
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::serviceName): Service names are no longer suffixed.
        * WebKit2.xcodeproj/project.pbxproj: Ditto.

2016-09-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        [GTK] GL_PACK_ROW_LENGTH is not available in GLES2
        https://bugs.webkit.org/show_bug.cgi?id=161484

        Reviewed by Carlos Garcia Campos.

        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
        (WebKit::AcceleratedBackingStoreWayland::paint): when under GLES2 we cannot rely on
        GL_PACK_ROW_LENGTH; use glReadPixel directly when stride matches width, read line
        by line manually otherwise. Colour conversion is also required to get the data out
        correctly.

2016-09-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] SetNativeSurfaceHandleForCompositing should not be compiled in for wayland build
        https://bugs.webkit.org/show_bug.cgi?id=161483

        Reviewed by Žan Doberšek.

        SetNativeSurfaceHandleForCompositing and DestroyNativeSurfaceHandleForCompositing messages should only be used
        for GTK+ port when compiled with OpenGL and X11 enabled and redirected XComposite window disabled. So, we should
        use USE(TEXTURE_MAPPER) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW) consistently.
        This fixes the build when building the GTK+ port with Wayland enabled and X11 disabled.

        * UIProcess/AcceleratedDrawingAreaProxy.cpp:
        (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
        * UIProcess/AcceleratedDrawingAreaProxy.h:
        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
        (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
        * WebProcess/WebPage/AcceleratedDrawingArea.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/DrawingArea.messages.in:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

2016-09-05  Zan Dobersek  <zdobersek@igalia.com>

        [GObject bindings] override handleEvent() method in GObjectEventListener
        https://bugs.webkit.org/show_bug.cgi?id=161593

        Reviewed by Carlos Garcia Campos.

        * WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.h: Override
        the handleMethod() which is inherited from the WebCore EventListener class.
        Suppresses the -Winconsistent-missing-override warning that Clang propagates.

2016-09-04  Joseph Pecoraro  <pecoraro@apple.com>

        Remove unnecessary RetainPtr.

        Review comments on earlier change.

        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _defaultAnimationController]):

2016-09-04  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Wrapping XPC service execution in os_activity is no longer needed
        https://bugs.webkit.org/show_bug.cgi?id=161577

        Reviewed by Sam Weinig.

        Removed code that created an os_activity around the execution of the XPC service
        code, because this workaround is no longer needed.

        * 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):

2016-09-04  Commit Queue  <commit-queue@webkit.org>

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

        Many bots see inspector test failures, rolling out now and
        investigating later. (Requested by brrian on #webkit).

        Reverted changeset:

        "Web Inspector: unify Main.html and Test.html sources and
        generate different copies with the preprocessor"
        https://bugs.webkit.org/show_bug.cgi?id=161212
        http://trac.webkit.org/changeset/205415

2016-09-01  Brian Burg  <bburg@apple.com>

        Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor
        https://bugs.webkit.org/show_bug.cgi?id=161212
        <rdar://problem/28017961>

        Reviewed by Joseph Pecoraro.

        Rearrange CMake rules so that most Inspector UI work is done in WebInspectorUI.

        * PlatformGTK.cmake:
        - Move the list of Inspector resources into WebInspectorUI/CMakeLists.txt.
        - Move generation of InspectorGResourceBundle into WebInspectorUI.
        - Copy over InspectorGResourceBundle.c into WebKit2's Derived Sources before compiling.

2016-09-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Refactor the heuristic for showing media controls to take all media sessions into account
        https://bugs.webkit.org/show_bug.cgi?id=161503
        <rdar://problem/28033783>

        Reviewed by Darin Adler.

        Adds an SPI testing hook for sending the element ID of the currently controlled video element from the web
        process to the UI process. See VideoControlsManager.mm in Tools/TestWebKitAPI/ for usage.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _requestControlledElementID]):
        (-[WKWebView _handleControlledElementIDResponse:]):
        (-[WKWebView _hasActiveVideoForControlsManager]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
        (WebKit::WebPlaybackSessionManagerProxy::handleControlledElementIDResponse):
        (WebKit::WebPlaybackSessionManagerProxy::requestControlledElementID):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::requestControlledElementID):
        (WebKit::WebPageProxy::handleControlledElementIDResponse):
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::handleControlledElementIDResponse):
        * WebProcess/cocoa/WebPlaybackSessionManager.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::handleControlledElementIDRequest):

2016-09-03  Darin Adler  <darin@apple.com>

        Streamline DOMImplementation, and move it to our new DOM exception system
        https://bugs.webkit.org/show_bug.cgi?id=161295

        Reviewed by Ryosuke Niwa.

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::isDisplayingMarkupDocument): Use isXMLMIMEType in its
        new location in MIMETypeRegistry rather than in DOMImplementation.
        (WebKit::WebFrameProxy::isDisplayingPDFDocument): Removed unneeded redundant
        check for empty string, already done by MIMETypeRegistry.

2016-09-03  Brian Weinstein  <bweinstein@apple.com>

        Implement WebFrameLoaderClient::shouldUseContentExtensionsForURL and consult the InjectedBundlePageLoaderClient.
        https://bugs.webkit.org/show_bug.cgi?id=161441

        Reviewed by Darin Adler.

        WebFrameLoaderClient::shouldUseContentExtensionsForURL only consults the injected bundle, because we don't want to
        defer the loading of every main resource to consult with the UI Process about whether or not we should use content
        extensions for the load.

        * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h: Bump the latest version to WKBundlePageLoaderClientV9 and
        add WKBundlePageShouldUseContentExtensionsForURLCallback.
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::shouldUseContentExtensionsForURL): Ask the client if we should use content
        extensions for this URL.
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::shouldUseContentExtensionsForURL): Only consult with the injected bundle about whether
        or not we should use content extensions for this URL.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
        (webkit_dom_dom_implementation_create_document_type): Updated to work with ExceptionOr.
        (webkit_dom_dom_implementation_create_document): Updated to work with ExceptionOr.
        (webkit_dom_dom_implementation_create_css_style_sheet): Updated since this function
        can no longer raise an exception.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
        (webkit_dom_document_set_xml_standalone): Updated since this function can no longer
        raise an exception.

2016-09-03  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Move WebKit2 WebInspector files to #pragma once
        https://bugs.webkit.org/show_bug.cgi?id=161550

        Reviewed by Darin Adler.

        * UIProcess/InspectorServer/WebInspectorServer.h:
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/gtk/WebInspectorClientGtk.h:
        * WebProcess/WebCoreSupport/WebInspectorClient.h:
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h:
        * WebProcess/WebPage/WebInspectorUI.h:

2016-09-02  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] -Wmissing-field-initializers on WaylandCompositor.cpp:295
        https://bugs.webkit.org/show_bug.cgi?id=161524

        Reviewed by Carlos Garcia Campos.

        * UIProcess/gtk/WaylandCompositor.cpp:

2016-09-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Move the viewport controller off the compositing thread
        https://bugs.webkit.org/show_bug.cgi?id=161532

        Reviewed by Michael Catanzaro.

        While working on bug #161242 I've realized that having the view port controller in the compositing thread makes
        everything more complex. The viewport controller receives changes about things like contents size, viewport
        size, etc. and uses that information to compute the visible contents rect and page scale factor. Then it
        notifies back to main thread about the computed visible contents rect and page scale. Those computations are not
        heave at all, so they could be done in the main thread and we would avoid communications between the main and
        compositing thread in both directions. The main thread needs the visible contents rect to notify the compositing
        coordinator and the page cale to scale the page in case of pixed layout. But the compositing thread only needs
        to know the effective scale and scroll position. So, instead of going to the compositing thread after every
        change that might update the visible contents rect and page scale factor, we could do those calculations in the
        main thread and only notify the compositing thread about the actual changes in the scroll position and effective scale.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::createTilesIfNeeded): Return early if backingStore is nullptr, which can
        happen if the layer shouldn't have a backing store and was removed by the previous call to prepareContentBackingStore().
        (WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded): Ditto.
        * Shared/CoordinatedGraphics/SimpleViewportController.cpp:
        (WebKit::SimpleViewportController::SimpleViewportController): Remove the client since we no longer need to
        notify about changes.
        (WebKit::SimpleViewportController::didChangeViewportSize): Remove call to syncVisibleContents().
        (WebKit::SimpleViewportController::didChangeContentsSize): Ditto.
        (WebKit::SimpleViewportController::didChangeViewportAttributes): Ditto.
        (WebKit::SimpleViewportController::didScroll): Removed unused scrollBy methods and renamed scrollTo as
        didiScroll for consistency. Save the position without calling boundContentsPosition, because that's already
        donde when the position is used to compute the contents visible rectangle.
        (WebKit::SimpleViewportController::visibleContentsRect): No need to notify about the changes.
        (WebKit::SimpleViewportController::visibleContentsSize): Deleted.
        * Shared/CoordinatedGraphics/SimpleViewportController.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::create): Pass a reference to the client instead of a pointer. It's no longer
        possible to have a valid pointer when the object has been destroyed, so we can better use a reference now.
        (WebKit::ThreadedCompositor::ThreadedCompositor): Ditto.
        (WebKit::ThreadedCompositor::~ThreadedCompositor): Remove assert.
        (WebKit::ThreadedCompositor::invalidate): No need to invalidate the client.
        (WebKit::ThreadedCompositor::setScaleFactor): Set the effective scale factor that should be used for rendering.
        (WebKit::ThreadedCompositor::setScrollPosition): Set the current scroll position and effective scale factor.
        (WebKit::ThreadedCompositor::setViewportSize): Set the viewport size and effective scale factor.
        (WebKit::ThreadedCompositor::renderNextFrame): Update m_client use that is no longer a pointer.
        (WebKit::ThreadedCompositor::commitScrollOffset): Ditto.
        (WebKit::ThreadedCompositor::renderLayerTree): Call glViewport after a resize and use m_viewportSize,
        m_scrollPosition and m_scaleFactor members.
        (WebKit::ThreadedCompositor::didChangeVisibleRect): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Pass the compositor client as a
        reference to ThreadedCompositor constructor.
        (WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Update the viewport and call didChangeViewport().
        (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Ditto.
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Pass the effective scale factor to
        the compositor.
        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange): Update the viewport, the compositor and call didChangeViewport().
        (WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Update the viewport and call didChangeViewport().
        (WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewport): Notify the compositing coordinator about the new
        visible contents rectangle, and update the threaded compositor if needed.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-09-02  Beth Dakin  <bdakin@apple.com>

        Need to updateEditorState if an element change edit-ability without changing 
        selection
        https://bugs.webkit.org/show_bug.cgi?id=161546
        -and corresponding-
        rdar://problem/27806012

        Reviewed by Ryosuke Niwa.

        Every time WebPage::editorState() is called, we now save whether the last state 
        was contentEditable. That way in updateEditorStateAfterLayoutIfNeeded() we can 
        assess whether or not edit-ability has changed. 

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient:: updateEditorStateAfterLayoutIfEditabilityChanged):
        * WebProcess/WebCoreSupport/WebEditorClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):
        (WebKit::WebPage:: updateEditorStateAfterLayoutIfEditabilityChanged):
        (WebKit::WebPage::didStartPageTransition):
        * WebProcess/WebPage/WebPage.h:

2016-09-02  Jonathan Bedard  <jbedard@apple.com>

        WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode
        https://bugs.webkit.org/show_bug.cgi?id=42547

        Reviewed by Darin Adler.

        Added access to setUseDashBoardCompatibilityMode for WebKit2.
        Note: this bug mistakenly called this function setDashboardCompatibilityMode, it is actually setUseDashboardCompatibilityMode.

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleSetUseDashboardCompatibilityMode): Added dashboard compatiblity mode setter.
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Ditto.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setUseDashboardCompatibilityMode): Ditto.
        * WebProcess/InjectedBundle/InjectedBundle.h: Ditto.

2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] RetainPtr misuse, AnimationController leaks
        https://bugs.webkit.org/show_bug.cgi?id=161552

        Reviewed by Tim Horton.

        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _defaultAnimationController]):

2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] RetainPtr misuse, DDActionContext leaks
        https://bugs.webkit.org/show_bug.cgi?id=161551

        Reviewed by Tim Horton.

        * Platform/mac/MenuUtilities.mm:
        (WebKit::menuItemForTelephoneNumber):
        (WebKit::menuForTelephoneNumber):

2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        Fix Mac CMake build, missing _WKRemoteWebInspectorViewController.mm

        Unreviewed build fix.

        * PlatformMac.cmake:

2016-09-02  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix; partial roll out of r205365 to remove unintentional change in WKWebView.mm.

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

2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: If inspector process crashes, re-inspecting the page does not work
        https://bugs.webkit.org/show_bug.cgi?id=161502
        <rdar://problem/28120368>

        Reviewed by Brian Burg.

        This is an issue on Mac because WebInspectorProxyMac's platformDidClose
        doesn't immediately get rid of the WKWebView for the inspector. This is
        intended so that a quick close and reopen of Web Inspector is faster,
        however in the case where the WebPage under the WKWebView crashed, we
        actually should clear things instead of using the timer path. Provide
        a stronger platform close handler when the inspector page crashed.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::closeForCrash):
        (WebKit::webProcessDidCrash):
        (WebKit::WebInspectorProxy::platformDidCloseForCrash):
        Go through a stronger path when the web process crashes.
        Some platforms may want to handle this differently then the user
        closing a web inspector window.
        
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformDidCloseForCrash):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformDidCloseForCrash):
        These platforms do not need to do anything special.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::closeTimerFired):
        Loosen this code. There is no need for it to be so strict.

        (WebKit::WebInspectorProxy::platformDidCloseForCrash):
        If the inspector page crashed, close our handles immediately.

2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Provide a way to open an inspector frontend for a remote target
        https://bugs.webkit.org/show_bug.cgi?id=161515
        <rdar://problem/13182127>

        Reviewed by Brian Burg.

        Provide an interface to open a Web Inspector window/webView for a
        remote debuggable. Unlike the local Web Inspector, the remote
        debuggable may be either a JSContext or WebPage, and may only
        support an older version of the protocol. The Inspector frontend
        already supports these configurations.

        This adds new RemoteWebInspector/Proxy classes that mirror the
        WebInspector/Proxy classes for local inspection, but have
        slightly different behavior as the inspected target is not
        directly available (and may not be a web page).

        The remote and local classes share a lot of inspector
        frontend implementation:

          - share most of the inspector frontend host implementation
          - share much of the frontend webview/window handling
          - use an inspector process for the frontend page

        But remains separate in some ways:

          - inspected target is unavailable
          - docking is never available
          - a few inspector frontend host methods are duplicated
          - some of the webview/window handling is duplicated

        * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: Added.
        * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: Added.
        (-[_WKRemoteWebInspectorViewController init]):
        (-[_WKRemoteWebInspectorViewController window]):
        (-[_WKRemoteWebInspectorViewController webView]):
        (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]):
        (-[_WKRemoteWebInspectorViewController close]):
        (-[_WKRemoteWebInspectorViewController show]):
        (-[_WKRemoteWebInspectorViewController sendMessageToFrontend:]):
        (-[_WKRemoteWebInspectorViewController sendMessageToBackend:]):
        (-[_WKRemoteWebInspectorViewController closeFromFrontend]):
        The interface that may be used to open an inspector window for
        a remote debuggable. There are only a few delegates to handle
        sending messages to the backend and knowing if the frontend
        closed itself (InspectorFrontendHost.closeWindow() or crashed).

        * UIProcess/WebInspectorUtilities.h:
        * UIProcess/WebInspectorUtilities.cpp: Added.
        (WebKit::pageLevelMap):
        (WebKit::inspectorLevelForPage):
        (WebKit::inspectorPageGroupIdentifierForPage):
        (WebKit::trackInspectorPage):
        (WebKit::untrackInspectorPage):
        (WebKit::inspectorProcessPool):
        (WebKit::isInspectorProcessPool):
        (WebKit::isInspectorPage):
        Extract utilities for determining if a page contains an inspector frontend.
        Previously this was part of WebInspectorProxy and subclasses but can
        now be used by multiple classes.

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::inspectionLevel):
        (WebKit::WebInspectorProxy::invalidate):
        (WebKit::WebInspectorProxy::isMainOrTestInspectorPage):
        (WebKit::decidePolicyForNavigationAction):
        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
        (WebKit::WebInspectorProxy::didClose):
        (WebKit::pageLevelMap): Deleted.
        (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier): Deleted.
        (WebKit::WebInspectorProxy::inspectorProcessPool): Deleted.
        (WebKit::WebInspectorProxy::isInspectorProcessPool): Deleted.
        (WebKit::WebInspectorProxy::isInspectorPage): Deleted.
        (WebKit::isMainOrTestInspectorPage): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::getLaunchOptions):
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Extract methods to utilities and use them.

        Also address an issue where WebInspectorProxy was untracking
        the wrong page. It should have been untracking the inspector
        page but was untracking the inspected page.

        * UIProcess/RemoteWebInspectorProxy.cpp: Added.
        (WebKit::RemoteWebInspectorProxy::RemoteWebInspectorProxy):
        (WebKit::RemoteWebInspectorProxy::~RemoteWebInspectorProxy):
        (WebKit::RemoteWebInspectorProxy::invalidate):
        (WebKit::RemoteWebInspectorProxy::load):
        (WebKit::RemoteWebInspectorProxy::closeFromBackend):
        (WebKit::RemoteWebInspectorProxy::closeFromCrash):
        (WebKit::RemoteWebInspectorProxy::show):
        (WebKit::RemoteWebInspectorProxy::sendMessageToFrontend):
        (WebKit::RemoteWebInspectorProxy::frontendDidClose):
        (WebKit::RemoteWebInspectorProxy::bringToFront):
        (WebKit::RemoteWebInspectorProxy::save):
        (WebKit::RemoteWebInspectorProxy::append):
        (WebKit::RemoteWebInspectorProxy::startWindowDrag):
        (WebKit::RemoteWebInspectorProxy::openInNewTab):
        (WebKit::RemoteWebInspectorProxy::sendMessageToBackend):
        (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
        (WebKit::RemoteWebInspectorProxy::closeFrontendPageAndWindow):
        This class behaves like WebInspectorProxy but without having a
        reference to the inspected target. It communicates with
        RemoteInspectorUI in an Inspector process to send and receive
        frontend messages. What can't be easily shared is duplicated.

        * UIProcess/mac/RemoteWebInspectorProxyMac.mm: Added.
        (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]):
        (-[WKRemoteWebInspectorProxyObjCAdapter webViewWebContentProcessDidTerminate:]):
        (-[WKRemoteWebInspectorProxyObjCAdapter webView:decidePolicyForNavigationAction:decisionHandler:]):
        (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
        (WebKit::RemoteWebInspectorProxy::platformCloseFrontendPageAndWindow):
        (WebKit::RemoteWebInspectorProxy::platformBringToFront):
        (WebKit::RemoteWebInspectorProxy::platformSave):
        (WebKit::RemoteWebInspectorProxy::platformAppend):
        (WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):
        (WebKit::RemoteWebInspectorProxy::platformOpenInNewTab):
        Platform implementation for the bits that are platform specific.
        What can't be easily shared is duplicated. Ideally we will
        eventually share this with WebInspectorProxyMac.

        * UIProcess/mac/WKWebInspectorWKWebView.h:
        * UIProcess/mac/WKWebInspectorWKWebView.mm: Added.
        (WebKit::getWindowFrame):
        (WebKit::setWindowFrame):
        (WebKit::exceededDatabaseQuota):
        (WebKit::runOpenPanel):
        (-[WKWebInspectorWKWebView initWithFrame:configuration:]):
        (-[WKWebInspectorWKWebView tag]):
        Extract Mac platform code for the inspector webview from WebInspectorProxyMac.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::closeTimerFired):
        (WebKit::WebInspectorProxy::createInspectorWindow):
        (WebKit::WebInspectorProxy::createFrontendConfiguration):
        (WebKit::WebInspectorProxy::createFrontendWindow):
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        (-[WKWebInspectorWKWebView tag]): Deleted.
        (WebKit::getWindowFrame): Deleted.
        (WebKit::setWindowFrame): Deleted.
        (WebKit::exceededDatabaseQuota): Deleted.
        (WebKit::runOpenPanel): Deleted.
        Extact Mac platform code to be shared for construction of a
        WKWebViewConfiguration, WKWebView, and NSWindow for an inspector webview.
        
        * WebProcess/WebPage/RemoteWebInspectorUI.cpp: Added.
        (WebKit::RemoteWebInspectorUI::create):
        (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI):
        (WebKit::RemoteWebInspectorUI::initialize):
        (WebKit::RemoteWebInspectorUI::didSave):
        (WebKit::RemoteWebInspectorUI::didAppend):
        (WebKit::RemoteWebInspectorUI::sendMessageToFrontend):
        (WebKit::RemoteWebInspectorUI::sendMessageToBackend):
        (WebKit::RemoteWebInspectorUI::windowObjectCleared):
        (WebKit::RemoteWebInspectorUI::frontendLoaded):
        (WebKit::RemoteWebInspectorUI::startWindowDrag):
        (WebKit::RemoteWebInspectorUI::moveWindowBy):
        (WebKit::RemoteWebInspectorUI::bringToFront):
        (WebKit::RemoteWebInspectorUI::closeWindow):
        (WebKit::RemoteWebInspectorUI::openInNewTab):
        (WebKit::RemoteWebInspectorUI::save):
        (WebKit::RemoteWebInspectorUI::append):
        (WebKit::RemoteWebInspectorUI::inspectedURLChanged):
        * WebProcess/WebPage/RemoteWebInspectorUI.h: Added.
        * WebProcess/WebPage/RemoteWebInspectorUI.messages.in: Added.
        * UIProcess/RemoteWebInspectorProxy.messages.in: Added.
        * UIProcess/RemoteWebInspectorProxy.mm: Added.
        Inspector frontend client that knows to talk
        with a RemoteWebInspectorProxy instead of a WebInspectorProxy.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
        (WebKit::webInspectorUILocalizedStringsURL):
        (WebKit::WebInspectorUI::localizedStringsURL):
        (WebKit::RemoteWebInspectorUI::localizedStringsURL):
        Simplify localized string URL lookup.

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

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::~WebPage):
        (WebKit::WebPage::remoteInspectorUI):
        (WebKit::WebPage::didReceiveMessage):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::isInspectorPage):
        An InspectorProcess WebPage may have either a WebInspectorUI or a RemoteWebInspectorUI.

2016-07-08  Jer Noble  <jer.noble@apple.com>

        Refactor WebPlaybackSessionModelMediaElement to be client based.
        https://bugs.webkit.org/show_bug.cgi?id=159580

        Reviewed by Eric Carlson.

        Adopt the changes made in the WebPlaybackSessionModel,Interface and WebVideoFullscreenModel,Interface
        in the WebPlaybackSessionManager,Proxy classes.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]): Deleted.
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
        (WebKit::WebPlaybackSessionModelContext::addClient):
        (WebKit::WebPlaybackSessionModelContext::removeClient):
        (WebKit::WebPlaybackSessionModelContext::setDuration):
        (WebKit::WebPlaybackSessionModelContext::setCurrentTime):
        (WebKit::WebPlaybackSessionModelContext::setBufferedTime):
        (WebKit::WebPlaybackSessionModelContext::setRate):
        (WebKit::WebPlaybackSessionModelContext::setSeekableRanges):
        (WebKit::WebPlaybackSessionModelContext::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionModelContext::setExternalPlayback):
        (WebKit::WebPlaybackSessionModelContext::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManagerProxy::createModelAndInterface):
        (WebKit::WebPlaybackSessionManagerProxy::removeClientForContext):
        (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime):
        (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime):
        (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):
        (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties):
        (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManagerProxy::setDuration):
        (WebKit::WebPlaybackSessionManagerProxy::setRate):
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenModelContext::addClient):
        (WebKit::WebVideoFullscreenModelContext::removeClient):
        (WebKit::WebVideoFullscreenManagerProxy::setHasVideo):
        (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
        * WebProcess/cocoa/WebPlaybackSessionManager.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionInterfaceContext::durationChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::currentTimeChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::bufferedTimeChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::rateChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::seekableRangesChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::canPlayFastReverseChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::audioMediaSelectionOptionsChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::legibleMediaSelectionOptionsChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::externalPlaybackChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::wirelessVideoPlaybackDisabledChanged):
        (WebKit::WebPlaybackSessionManager::~WebPlaybackSessionManager):
        (WebKit::WebPlaybackSessionManager::createModelAndInterface):
        (WebKit::WebPlaybackSessionManager::removeContext):
        (WebKit::WebPlaybackSessionManager::durationChanged):
        (WebKit::WebPlaybackSessionManager::currentTimeChanged):
        (WebKit::WebPlaybackSessionManager::bufferedTimeChanged):
        (WebKit::WebPlaybackSessionManager::rateChanged):
        (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
        (WebKit::WebPlaybackSessionManager::canPlayFastReverseChanged):
        (WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged):
        (WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged):
        (WebKit::WebPlaybackSessionManager::externalPlaybackChanged):
        (WebKit::WebPlaybackSessionManager::wirelessVideoPlaybackDisabledChanged):
        (WebKit::WebPlaybackSessionInterfaceContext::setDuration): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setCurrentTime): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setBufferedTime): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setRate): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setSeekableRanges): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setCanPlayFastReverse): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setAudioMediaSelectionOptions): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setLegibleMediaSelectionOptions): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setExternalPlayback): Deleted.
        (WebKit::WebPlaybackSessionInterfaceContext::setWirelessVideoPlaybackDisabled): Deleted.
        (WebKit::WebPlaybackSessionManager::setDuration): Deleted.
        (WebKit::WebPlaybackSessionManager::setCurrentTime): Deleted.
        (WebKit::WebPlaybackSessionManager::setBufferedTime): Deleted.
        (WebKit::WebPlaybackSessionManager::setRate): Deleted.
        (WebKit::WebPlaybackSessionManager::setSeekableRanges): Deleted.
        (WebKit::WebPlaybackSessionManager::setCanPlayFastReverse): Deleted.
        (WebKit::WebPlaybackSessionManager::setAudioMediaSelectionOptions): Deleted.
        (WebKit::WebPlaybackSessionManager::setLegibleMediaSelectionOptions): Deleted.
        (WebKit::WebPlaybackSessionManager::setExternalPlayback): Deleted.
        (WebKit::WebPlaybackSessionManager::setWirelessVideoPlaybackDisabled): Deleted.
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        (WebKit::WebVideoFullscreenInterfaceContext::create):
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
        (WebKit::WebVideoFullscreenInterfaceContext::hasVideoChanged):
        (WebKit::WebVideoFullscreenInterfaceContext::videoDimensionsChanged):
        (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
        (WebKit::WebVideoFullscreenManager::createModelAndInterface):
        (WebKit::WebVideoFullscreenManager::removeContext):
        (WebKit::WebVideoFullscreenManager::hasVideoChanged):
        (WebKit::WebVideoFullscreenManager::videoDimensionsChanged):
        (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setDuration): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setRate): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback): Deleted.
        (WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled): Deleted.
        (WebKit::WebVideoFullscreenManager::setVideoDimensions): Deleted.

2016-09-02  Zan Dobersek  <zdobersek@igalia.com>

        Fix GObject bindings build breakage when compiling with ENABLE_USER_TIMING disabled.

        Rubber-stamped by Carlos Garcia Campos.

        Add additional ENABLE(USER_TIMING) build guards to WebKitDOMPerformance bindings,
        avoiding build errors when building with that feature disabled. Previously this
        wasn't a problem because the four amended binding functions weren't generated
        when the feature was disabled due to the similar use of guards in the Performance.idl
        file.

        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPerformance.cpp:
        (webkit_dom_performance_webkit_mark):
        (webkit_dom_performance_webkit_clear_marks):
        (webkit_dom_performance_webkit_measure):
        (webkit_dom_performance_webkit_clear_measures):

2016-09-02  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed GTK+ build fix when compiling with Clang.

        * WebProcess/WebPage/gtk/AcceleratedSurface.cpp: Include WebPage.h.

2016-09-01  Yusuke Suzuki  <utatane.tea@gmail.com>

        Unreviewed, build fix after r205327

        * UIProcess/API/gtk/WebKitUIClient.cpp:

2016-09-01  Dan Bernstein  <mitz@apple.com>

        Build fix.

        * Configurations/FeatureDefines.xcconfig:

2016-09-01  Anders Carlsson  <andersca@apple.com>

        Use WTF::Function for completion handlers in API::UIClient
        https://bugs.webkit.org/show_bug.cgi?id=161516

        Reviewed by Tim Horton.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::runJavaScriptAlert):
        (API::UIClient::runJavaScriptConfirm):
        (API::UIClient::runJavaScriptPrompt):
        (API::UIClient::runBeforeUnloadConfirmPanel):
        (API::UIClient::exceededDatabaseQuota):
        (API::UIClient::reachedApplicationCacheOriginQuota):
        * UIProcess/API/C/WKPage.cpp:
        (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
        (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
        (WebKit::RunJavaScriptAlertResultListener::create):
        (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
        (WebKit::RunJavaScriptConfirmResultListener::create):
        (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
        (WebKit::RunJavaScriptPromptResultListener::create):
        (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
        (WKPageSetPageUIClient):
        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
        (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
        (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
        (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
        (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):

2016-09-01  JF Bastien  <jfbastien@apple.com>

        Fix cmake build, missing SecItemShim.messages.in
        https://bugs.webkit.org/show_bug.cgi?id=161496

        Reviewed by Alex Christensen.

        * PlatformMac.cmake:

2016-09-01  Joseph Pecoraro  <pecoraro@apple.com>

        [Mac] Web Inspector: Remove stale inspector process termination code
        https://bugs.webkit.org/show_bug.cgi?id=161465
        <rdar://problem/28106584>

        Reviewed by Brian Burg.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess): Deleted.
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (-[WKWebInspectorProxyObjCAdapter didRelaunchProcess]): Deleted.
        (-[WKWebInspectorWKWebView _didRelaunchProcess]): Deleted.
        This code doesn't appear to be run when the WebContent process inside
        of an Inspector process crashes. The general WebInspectorProxy has its
        own handling of when the page inside an inspector process crashes, so
        this Mac specific path appears to be unused and stale.

2016-09-01  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        [GTK] Fix configuration without wayland support
        https://bugs.webkit.org/show_bug.cgi?id=161475

        WebKit2WaylandClientProtocol.c is a derived source that is created
        conditionally on ENABLE_WAYLAND_TARGET.  It was being included
        in the sources list unconditionally, so configure failed whenever
        wayland support was unavailable.

        Reviewed by Žan Doberšek.

        * PlatformGTK.cmake: Include WebKit2WaylandClientProtocol.c in source list conditional on ENABLE_WAYLAND_TARGET

2016-08-31  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move GObject DOM bindings to WebKit2 layer and stop auto generating them
        https://bugs.webkit.org/show_bug.cgi?id=161438

        Reviewed by Michael Catanzaro.

        Move all GObject bindings code to WebProcess/InjectedBundle/API/gtk/DOM.

        * PlatformGTK.cmake:
        * WebProcess/InjectedBundle/API/gtk/DOM:

2016-08-31  Keith Rollin  <krollin@apple.com>

        WebKit should set a subsystem for os_log so it's easier to filter for WebKit log messages
        https://bugs.webkit.org/show_bug.cgi?id=160969
        <rdar://problem/26068734>

        Reviewed by Simon Fraser.

        - Specify a channel when using RELEASE_LOG macros.
        - Add some new channels so that we have something to pass to the
          RELEASE_LOG macros (ProcessSuspension, IPC, Layers).
        - Enable subsystem- and channel-related data and functions when using
          RELEASE_LOG macros.
        - Use the DECLARE_LOG_CHANNEL, DEFINE_LOG_CHANNEL, and
          LOG_CHANNEL_ADDRESS macros that are now defined in WTF.

        * NetworkProcess/Downloads/Download.cpp:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::prepareToSuspend):
        (WebKit::NetworkProcess::cancelPrepareToSuspend):
        (WebKit::NetworkProcess::processDidResume):
        * NetworkProcess/NetworkResourceLoader.cpp:
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForSyncReply):
        * Platform/LogInitialization.h:
        * Platform/Logging.cpp:
        (WebKit::initializeLogChannelsIfNecessary):
        * Platform/Logging.h:
        * Platform/foundation/LoggingFoundation.mm:
        * Platform/unix/LoggingUnix.cpp:
        * Shared/ChildProcess.cpp:
        (WebKit::didCloseOnConnectionWorkQueue):
        * Shared/WebKit2Initialize.cpp:
        (WebKit::InitializeWebKit2):
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::releaseNetworkActivityToken):
        (WebKit::NavigationState::didChangeIsLoading):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::updateAssertionNow):
        (WebKit::ProcessThrottler::updateAssertion):
        * UIProcess/WebPageProxy.cpp:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingTimer):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::fetchWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::WebProcessProxy::didSetAssertionState):
        (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
        (WebKit::ProcessAssertion::ProcessAssertion):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        * WebProcess/Network/WebResourceLoader.cpp:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::layerVolatilityTimerFired):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::actualPrepareToSuspend):
        (WebKit::WebProcess::processWillSuspendImminently):
        (WebKit::WebProcess::prepareToSuspend):
        (WebKit::WebProcess::cancelPrepareToSuspend):
        (WebKit::WebProcess::markAllLayersVolatile):
        (WebKit::WebProcess::processDidResume):

2016-08-31  Yoav Weiss  <yoav@yoav.ws>

        Add event support for link preload.
        https://bugs.webkit.org/show_bug.cgi?id=158466

        Reviewed by Alex Christensen.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::maximumBufferingTime): Removed LinkPreload.

2016-08-31  Alex Christensen  <achristensen@webkit.org>

        Add runtime flag for using URLParser
        https://bugs.webkit.org/show_bug.cgi?id=161363

        Reviewed by Sam Weinig.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * Shared/Cocoa/WebKit2InitializeCocoa.mm: Added.
        (WebKit::platformInitializeWebKit2):
        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
        (WebKit::XPCServiceInitializer):
        * Shared/WebKit2Initialize.cpp:
        (WebKit::InitializeWebKit2):
        * Shared/WebKit2Initialize.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * Shared/efl/WebKit2InitializeEFL.cpp: Added.
        (WebKit::platformInitializeWebKit2):
        * Shared/gtk/WebKit2InitializeGTK.cpp: Added.
        (WebKit::platformInitializeWebKit2):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::createNewWebProcess):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-08-30  Anders Carlsson  <andersca@apple.com>

        Use Connection::sendWithReply for the SecItem shim messages
        https://bugs.webkit.org/show_bug.cgi?id=161419

        Reviewed by Tim Horton.

        * DerivedSources.make:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeConnection):
        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
        * Shared/mac/SecItemShim.cpp:
        (WebKit::workQueue):
        (WebKit::sendSecItemRequest):
        (WebKit::webSecItemCopyMatching):
        (WebKit::webSecItemAdd):
        (WebKit::webSecItemUpdate):
        (WebKit::webSecItemDelete):
        (WebKit::initializeSecItemShim):
        (WebKit::responseMap): Deleted.
        (WebKit::SecItemShim::singleton): Deleted.
        (WebKit::SecItemShim::SecItemShim): Deleted.
        (WebKit::generateSecItemRequestID): Deleted.
        (WebKit::SecItemShim::secItemResponse): Deleted.
        (WebKit::SecItemShim::initialize): Deleted.
        (WebKit::SecItemShim::initializeConnection): Deleted.
        * Shared/mac/SecItemShim.h:
        * Shared/mac/SecItemShim.messages.in: Removed.
        * UIProcess/mac/SecItemShimProxy.cpp:
        (WebKit::SecItemShimProxy::didReceiveMessage):
        (WebKit::SecItemShimProxy::secItemRequest):
        * UIProcess/mac/SecItemShimProxy.h:
        * UIProcess/mac/SecItemShimProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeProcess):

2016-08-31  Andreas Kling  <akling@apple.com>

        DOM event handling should pass Event around by reference.
        <https://webkit.org/b/161398>

        Reviewed by Chris Dumez.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performNonEditingBehaviorForSelector):

2016-08-31  Brady Eidson  <beidson@apple.com>

        WK2 Gamepad provider on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=161412

        Reviewed by Tim Horton.

        * Configurations/FeatureDefines.xcconfig:

        * Platform/spi/ios/UIKitSPI.h:

        * UIProcess/Gamepad/UIGamepadProvider.cpp:

        * UIProcess/Gamepad/ios/UIGamepadProviderIOS.mm: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm.
        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):

        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:

        * WebKit2.xcodeproj/project.pbxproj:

2016-08-30  Anders Carlsson  <andersca@apple.com>

        Try to fix the 32-bit build.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/WebProcessProxy.h:

2016-08-30  Anders Carlsson  <andersca@apple.com>

        Switch more messages over to Connection::sendWithReply
        https://bugs.webkit.org/show_bug.cgi?id=161415

        Reviewed by Tim Horton.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::~WebProcessProxy):
        (WebKit::WebProcessProxy::processWillShutDown):
        (WebKit::WebProcessProxy::canTerminateChildProcess):
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::generateCallbackID): Deleted.
        (WebKit::WebProcessProxy::didDeleteWebsiteData): Deleted.
        (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins): Deleted.
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebProcessProxy.messages.in:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::deleteWebsiteData):
        (WebKit::WebProcess::deleteWebsiteDataForOrigins):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-08-30  Anders Carlsson  <andersca@apple.com>

        Add Connection::sendWithReply
        https://bugs.webkit.org/show_bug.cgi?id=161399

        Reviewed by Tim Horton.

        Connection::sendWithReply makes it easy to send a message and process its reply asynchronously on a given WorkQueue or RunLoop.
        The reply handler is guaranteed to be called. If the reply is successfully received, it will consist of an std::tuple with the arguments,
        otherwise it will be called with Nullopt.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::invalidate):
        Go through all reply handlers and dispatch them with a null Decoder.

        (IPC::Connection::sendMessageWithReply):
        Add the reply handler to the m_replyHandlers hash map, and send the message.

        (IPC::Connection::processIncomingSyncReply):
        Check if the incoming reply has an entry in m_replyHandlers. If it does, dispatch its handler using the given dispatcher.

        (IPC::Connection::connectionDidClose):
        Go through all reply handlers and dispatch them with a null Decoder.

        * Platform/IPC/Connection.h:
        (IPC::Connection::sendWithReply):
        Encode the message (we use the sync message ID infrastructure for this), then call sendMessageWithReply with a reply handler that
        decodes the reply and calls the real reply handler.

        * Platform/IPC/HandleMessage.h:
        Forward declare Connection.

        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.h:
        Forward declare WebsiteData.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::~WebProcessProxy):
        (WebKit::WebProcessProxy::processWillShutDown):
        Remove m_pendingFetchWebsiteDataCallbacks.

        (WebKit::WebProcessProxy::fetchWebsiteData):
        Use Connection::sendWithReply.

        (WebKit::WebProcessProxy::didFetchWebsiteData): Deleted.

        * UIProcess/WebProcessProxy.h:
        Remove members.

        * UIProcess/WebProcessProxy.messages.in:
        Remove DidFetchWebsiteData.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::fetchWebsiteData):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:
        Update the FetchWebsiteData message to have a reply parameter.

2016-08-30  Brady Eidson  <beidson@apple.com>

        Fix runtime error caused by missing export after https://bugs.webkit.org/show_bug.cgi?id=160846

        Rubberstamped by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:

2016-08-30  Brady Eidson  <beidson@apple.com>

        GameController.framework backend for gamepad API.
        https://bugs.webkit.org/show_bug.cgi?id=161086

        Reviewed by Alex Christensen.

        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (+[WKProcessPool _forceGameControllerFramework]):
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

        * UIProcess/Gamepad/UIGamepadProvider.h:

        * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: Renamed from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
        (WebKit::UIGamepadProvider::setUsesGameControllerFramework):
        (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):

        * WebKit2.xcodeproj/project.pbxproj:

2016-08-30  Mark Lam  <mark.lam@apple.com>

        Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.
        https://bugs.webkit.org/show_bug.cgi?id=161171

        Reviewed by Filip Pizlo and Geoffrey Garen.

        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
        (WebKit::callMethod):
        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::callMethod):
        (WebKit::JSNPObject::callObject):
        (WebKit::JSNPObject::callConstructor):
        (WebKit::JSNPObject::getOwnPropertySlot):
        (WebKit::JSNPObject::put):
        (WebKit::JSNPObject::deleteProperty):
        (WebKit::JSNPObject::getOwnPropertyNames):
        (WebKit::JSNPObject::propertyGetter):
        (WebKit::JSNPObject::methodGetter):
        (WebKit::JSNPObject::throwInvalidAccessError):
        * WebProcess/Plugins/Netscape/JSNPObject.h:
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Stop using m_client to indicate whether an IPC::Connection is valid
        https://bugs.webkit.org/show_bug.cgi?id=161362

        Reviewed by Andreas Kling.

        Instead, add an std::atomic<bool> so we can reliably check the state from other threads.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::Connection):
        (IPC::Connection::invalidate):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::dispatchSyncMessage):
        (IPC::Connection::dispatchDidReceiveInvalidMessage):
        (IPC::Connection::dispatchMessage):
        * Platform/IPC/Connection.h:
        (IPC::Connection::client):
        (IPC::Connection::isValid):
        (IPC::Connection::waitForAndDispatchImmediately):
        * UIProcess/WebGeolocationManagerProxy.cpp:
        (WebKit::WebGeolocationManagerProxy::startUpdating):
        (WebKit::WebGeolocationManagerProxy::stopUpdating):
        (WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):

2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r194846): [GTK] UI process crash visiting sites protected with HTTP auth when using GTK+ < 3.14
        https://bugs.webkit.org/show_bug.cgi?id=161385

        Reviewed by Antonio Gomes.

        Since r194846, we are chaining up webkitWebViewBaseMotionNotifyEvent, but before GTK+ 3.14
        GtkWidget::motion_notify_event was nullptr, so it can't be used unconditionally.

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

2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r205150.

        * UIProcess/API/gtk/WebKitUserContentManager.cpp:

2016-08-29  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>

        Unreviewed EFL/GTK build fix since r205150

        * CMakeLists.txt: Add Shared/FrameInfoData.cpp.

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Get rid of ChildProcessProxy::fromConnection
        https://bugs.webkit.org/show_bug.cgi?id=161357

        Reviewed by Tim Horton.

        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::fromConnection): Deleted.
        * UIProcess/ChildProcessProxy.h:
        * UIProcess/WebProcessProxy.h:
        (WebKit::WebProcessProxy::fromConnection): Deleted.

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Remove the last uses of WebProcessProxy::fromConnection
        https://bugs.webkit.org/show_bug.cgi?id=161355

        Reviewed by Tim Horton.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::webProcessProxyFromConnection):
        (WebKit::WebProcessPool::handleMessage):
        (WebKit::WebProcessPool::handleSynchronousMessage):
        (WebKit::WebProcessPool::startedUsingGamepads):
        (WebKit::WebProcessPool::stoppedUsingGamepads):

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Get rid of another use of WebProcessProxy::fromConnection
        https://bugs.webkit.org/show_bug.cgi?id=161331

        Reviewed by Dan Bernstein.

        WebUserContentControllerProxy::didPostMessage uses WebProcessProxy::fromConnection to be able to find a WebFrameProxy from
        a given frame ID. Since the WebFrameProxy is only used to construct an API::FrameInfo object from, introduce a FrameInfoData object
        and fill it in on the web process side and send it over to the UI process where an API::FrameInfo object can be created.

        * Shared/FrameInfoData.cpp: Added.
        (WebKit::FrameInfoData::encode):
        (WebKit::FrameInfoData::decode):
        * Shared/FrameInfoData.h: Added.
        * UIProcess/API/APIFrameInfo.cpp:
        (API::FrameInfo::create):
        (API::FrameInfo::FrameInfo):
        * UIProcess/API/APIFrameInfo.h:
        * UIProcess/API/Cocoa/WKUserContentController.mm:
        * UIProcess/UserContent/WebScriptMessageHandler.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::didPostMessage):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/UserContent/WebUserContentController.cpp:
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::info):
        * WebProcess/WebPage/WebFrame.h:

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Stop using WebProcessProxy::fromConnection in WebPageProxy
        https://bugs.webkit.org/show_bug.cgi?id=161322

        Reviewed by Dan Bernstein.

        The WebPageProxy already knows its WebProcessProxy - no need to look it up from the connection.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::handleMessage):
        (WebKit::WebPageProxy::handleSynchronousMessage):

2016-08-29  Anders Carlsson  <andersca@apple.com>

        Move some structs into Connection.cpp
        https://bugs.webkit.org/show_bug.cgi?id=161320

        Reviewed by Darin Adler.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::PendingSyncReply::PendingSyncReply):
        * Platform/IPC/Connection.h:
        (IPC::Connection::PendingSyncReply::PendingSyncReply): Deleted.

2016-08-26  Anders Carlsson  <andersca@apple.com>

        Remove sync message sending from secondary threads
        https://bugs.webkit.org/show_bug.cgi?id=161277

        Reviewed by Sam Weinig.

        This codepath hasn't been used for some time, and removing it will make it easier to make IPC::Connection backed by libxpc.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::processIncomingSyncReply):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::sendSyncMessageFromSecondaryThread): Deleted.
        * Platform/IPC/Connection.h:

2016-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Accelerated compositing does not work in Wayland
        https://bugs.webkit.org/show_bug.cgi?id=115803

        Reviewed by Michael Catanzaro.

        This is the initial implementation of accelerated compositing support in Wayland for the GTK+ port. It's based
        on previous patches written by Iago Toral, Žan Doberšek, Emanuele Aina and Emilio Pozuelo Monfort.

        The existing WebKitGTK+ Wayland interface previously added for this to WebCore has been moved to the WebKit2
        layer, since it's actually specific to WebKit2, and it's now actually used. The UI process runs a nested Wayland
        compositor that web processes connect to. Web processes create a Wayland surface in the nested compositor for
        the web page, and using the WebKitGTK+ Wayland protocol interface they tell the nested compositor the web page
        associated to the surface. A Wayland window is created for that surface that is then used as the native window
        handle for compositing. To communicate with the nested compositor and to ensure all GL operations happen in the
        nested compositor display, the web process creates a Wayland display that connects to the nested compositor,
        uses the WebKitGTK+ Wayland interface and it's set as the global shared display for compositing.

        The nested Wayland compositor creates a new display with a unique name that is sent to the web processes at
        start up. It implements the Wayland surface interface to handle the Wayland buffers created for every surface
        and scheduling redraws on the web pages when updates are available. It uses the WebKitGTK+ Wayland interface to
        associate the surfaces to a particular web page. A texture is created for every surface and updated with the
        Wayland buffer contents using an EGLImageKHR and eglImageTargetTexture2d API.

        To abstract the platform differences and avoid ifdefs as much as possible, new abstract classes have been added
        to represent the surfaces used in accelerated compositing. AcceleratedSurface is used by the web process and
        represents the surface where contents are rendered into. The X11 implementation is the redirected XComposite
        window, and the Wayland implementation is equivalent to the previous Wayland surface added to WebCore but never
        used. In the UI process the web view creates an abstract AcceleratedBackingStore that is used to render the
        AcceleratedSurface into the web view using cairo. The X11 implementation creates the cairo surface for the
        redirected XComposite window pixmap and uses XDamage extension to schedule redraws. The Wayland implementation
        asks the nested Wayland compositor for the texture associated to the web view page.

        Accelerated compositing is now always enabled by default in both X11 and Wayland, unless it's explicitly
        disabled by the user using the WEBKIT_DISABLE_COMPOSITING_MODE environment variable, or if any extension or
        feature required by X11 or Wayland implementations are not available.

        * PlatformGTK.cmake:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::glContext): Pass the shared display for compositing to GLContext::createContextForWindow()
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Encode wayland compositor display name.
        (WebKit::WebProcessCreationParameters::decode): Decode wayland compositor display name.
        * Shared/WebProcessCreationParameters.h: Add wayland compositor display name initial parameter.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseDispose):
        (webkitWebViewBaseDraw):
        (webkitWebViewBaseCreateWebPage):
        (webkitWebViewBaseEnterAcceleratedCompositingMode):
        (webkitWebViewBaseUpdateAcceleratedCompositingMode):
        (webkitWebViewBaseExitAcceleratedCompositingMode):
        (webkitWebViewBasePageClosed):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess): Initialize the wayland compositor display name initial parameter.
        * UIProcess/gtk/AcceleratedBackingStore.cpp: Added.
        (WebKit::AcceleratedBackingStore::create):
        (WebKit::AcceleratedBackingStore::AcceleratedBackingStore):
        (WebKit::AcceleratedBackingStore::~AcceleratedBackingStore):
        (WebKit::AcceleratedBackingStore::paint):
        * UIProcess/gtk/AcceleratedBackingStore.h: Added.
        (WebKit::AcceleratedBackingStore::update):
        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: Added.
        (WebKit::AcceleratedBackingStoreWayland::create):
        (WebKit::AcceleratedBackingStoreWayland::AcceleratedBackingStoreWayland):
        (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland):
        (WebKit::AcceleratedBackingStoreWayland::paint):
        * UIProcess/gtk/AcceleratedBackingStoreWayland.h: Added.
        * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Added.
        (WebKit::XDamageNotifier::singleton):
        (WebKit::XDamageNotifier::add):
        (WebKit::XDamageNotifier::remove):
        (WebKit::XDamageNotifier::filterXDamageEvent):
        (WebKit::XDamageNotifier::notify):
        (WebKit::AcceleratedBackingStoreX11::create):
        (WebKit::AcceleratedBackingStoreX11::AcceleratedBackingStoreX11):
        (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
        (WebKit::AcceleratedBackingStoreX11::update):
        (WebKit::AcceleratedBackingStoreX11::paint):
        * UIProcess/gtk/AcceleratedBackingStoreX11.h: Added.
        * UIProcess/gtk/WaylandCompositor.cpp: Added.
        (WebKit::WaylandCompositor::singleton):
        (WebKit::WaylandCompositor::Buffer::getOrCreate):
        (WebKit::WaylandCompositor::Buffer::Buffer):
        (WebKit::WaylandCompositor::Buffer::~Buffer):
        (WebKit::WaylandCompositor::Buffer::destroyListenerCallback):
        (WebKit::WaylandCompositor::Buffer::use):
        (WebKit::WaylandCompositor::Buffer::unuse):
        (WebKit::WaylandCompositor::Buffer::createImage):
        (WebKit::WaylandCompositor::Buffer::size):
        (WebKit::WaylandCompositor::Surface::Surface):
        (WebKit::WaylandCompositor::Surface::~Surface):
        (WebKit::WaylandCompositor::Surface::makePendingBufferCurrent):
        (WebKit::WaylandCompositor::Surface::attachBuffer):
        (WebKit::WaylandCompositor::Surface::requestFrame):
        (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
        (WebKit::WaylandCompositor::Surface::commit):
        (WebKit::WaylandCompositor::initializeEGL):
        (WebKit::createWaylandLoopSource):
        (WebKit::WaylandCompositor::WaylandCompositor):
        (WebKit::WaylandCompositor::getTexture):
        (WebKit::WaylandCompositor::bindSurfaceToWebPage):
        (WebKit::WaylandCompositor::registerWebPage):
        (WebKit::WaylandCompositor::unregisterWebPage):
        * UIProcess/gtk/WaylandCompositor.h: Added.
        (WebKit::WaylandCompositor::Buffer::createWeakPtr):
        (WebKit::WaylandCompositor::Surface::setWebPage):
        (WebKit::WaylandCompositor::isRunning):
        (WebKit::WaylandCompositor::displayName):
        * UIProcess/gtk/WebPreferencesGtk.cpp:
        (WebKit::WebPreferences::platformInitializeStore):
        * UIProcess/gtk/XDamageNotifier.cpp: Removed.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
        (WebKit::ThreadedCoordinatedLayerTreeHost::invalidate):
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/gtk/AcceleratedSurface.cpp: Added.
        (WebKit::AcceleratedSurface::create):
        (WebKit::AcceleratedSurface::AcceleratedSurface):
        (WebKit::AcceleratedSurface::~AcceleratedSurface):
        (WebKit::AcceleratedSurface::resize):
        * WebProcess/WebPage/gtk/AcceleratedSurface.h: Added.
        (WebKit::AcceleratedSurface::window):
        (WebKit::AcceleratedSurface::surfaceID):
        * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp: Added.
        (WebKit::waylandCompositorDisplay):
        (WebKit::AcceleratedSurfaceWayland::create):
        (WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):
        (WebKit::AcceleratedSurfaceWayland::~AcceleratedSurfaceWayland):
        (WebKit::AcceleratedSurfaceWayland::resize):
        * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: Added.
        * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp.
        (WebKit::AcceleratedSurfaceX11::create):
        (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11):
        (WebKit::AcceleratedSurfaceX11::~AcceleratedSurfaceX11):
        (WebKit::AcceleratedSurfaceX11::resize):
        * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/RedirectedXCompositeWindow.h.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
        (WebKit::LayerTreeHostGtk::makeContextCurrent):
        (WebKit::LayerTreeHostGtk::invalidate):
        (WebKit::LayerTreeHostGtk::sizeDidChange):
        (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
        (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler): Deleted.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess): Initialize the wayland compositor display name.
        * WebProcess/WebProcess.h:
        (WebKit::WebProcess::waylandCompositorDisplayName): Return the wayland compositor display name.

2016-08-27  Jonathan Bedard  <jbedard@apple.com>

        WTR needs an implementation of setAutomaticLinkDetectionEnabled
        https://bugs.webkit.org/show_bug.cgi?id=87162

        Reviewed by Darin Adler

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleSetAutomaticLinkDetectionEnabled): Added WKBundleSetAutomaticLinkDetectionEnabled definition.
        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetAutomaticLinkDetectionEnabled declaration.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Added setAutomaticLinkDetectionEnabled definition.
        * WebProcess/InjectedBundle/InjectedBundle.h: Added setAutomaticLinkDetectionEnabled declaration.
        * WebProcess/WebProcess.h: Declared setTextCheckerState public.

2016-08-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] Several flaky tests
        https://bugs.webkit.org/show_bug.cgi?id=161242

        Reviewed by Michael Catanzaro.

        We still have a lot of flaky tests since we switched to the threaded compositor. The UI process might
        take the screenshot too early, before everything is actually painted. I can't reproduce the problem, so this is
        actually a speculative fix or workaround. Our implementation of DrawingArea::dispatchAfterEnsuringDrawing() is
        quite simple, we just dispatch the callback in the next run loop iteration, which doesn't really ensures any
        drawing at all. So, we can wait for draw events before dispatching the given callback. Since we don't really
        know if draw events were already processed before dispatchAfterEnsuringDrawing() is called, or if there will be
        more than one damage event in a short time, this patch waits up to 1 second for draw events, and if a draw
        happens it stops if there isn't another draw event in the next 100ms. This should ensure a drawing if it was
        really needed.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::~DrawingMonitor):
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::webViewDrawCallback):
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::start):
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::stop):
        (WebKit::DrawingAreaProxyImpl::DrawingMonitor::didDraw):
        (WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
        * UIProcess/DrawingAreaProxyImpl.h:

2016-08-26  Sam Weinig  <sam@webkit.org>

        Remove support for ENABLE_LEGACY_WEB_AUDIO
        https://bugs.webkit.org/show_bug.cgi?id=161262

        Reviewed by Anders Carlsson.

        * Configurations/FeatureDefines.xcconfig:
        Remove ENABLE_LEGACY_WEB_AUDIO.

2016-08-26  Anders Carlsson  <andersca@apple.com>

        Get rid of NetworkResourceLoader::sendAbortingOnFailure
        https://bugs.webkit.org/show_bug.cgi?id=161267

        Reviewed by Dan Bernstein.

        NetworkResourceLoader::sendAbortingOnFailure sends an IPC message, and if IPC::Connection::send returns false,
        it will abort the network resource load.

        IPC::Connection::send will only return false if the connection is invalid, and when it becomes invalidated the
        connection client member function "didClose" is invoked. For the network process, this will call abort on all outstanding
        network loads.

        Auditing all the sendAbortingOnFailure call sites, shows that none of them can be called with an invalid connection,
        so replace sendAbortingOnFailure with send.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponse):
        This is a NetworkLoadClient function which won't be called if the load has been aborted.

        (WebKit::NetworkResourceLoader::didReceiveBuffer):
        Ditto.

        (WebKit::NetworkResourceLoader::didFinishLoading):
        Ditto. Also, update a call to sendBufferMaybeAborting to sendBuffer.

        (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
        This is another NetworkLoadClient function.

        (WebKit::NetworkResourceLoader::bufferingTimerFired):
        The buffering timer is stopped when abort() is called.

        (WebKit::NetworkResourceLoader::sendBuffer):
        Rename this from sendBufferMaybeAborting. It has three call sites:
        - didReceiveBuffer and didFinishLoading are both NetworkLoadClient functions.
        - didRetrieveCacheEntry is called from didFinishLoading (a NetworkLoadClient function) and from
          the completion function of retrieveCacheEntry, which has an early return for when the loader has been aborted.

        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
        This is called from the retrieveCacheEntry completion function, which has an early return for when the loader has been aborted.

        (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
        Ditto.

        (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
        * NetworkProcess/NetworkResourceLoader.h:

2016-08-26  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Infinite recursion calling -charValue on a WKNSNumber
        https://bugs.webkit.org/show_bug.cgi?id=161258

        Reviewed by Anders Carlsson.

        * Shared/Cocoa/WKNSNumber.mm:
        (-[WKNSNumber charValue]): Override this…
        (-[WKNSNumber boolValue]): …not this.

2016-08-26  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL][GTK] REGRESSION(204877): Fix the clean build
        https://bugs.webkit.org/show_bug.cgi?id=161240

        Reviewed by Carlos Garcia Campos.

        * Scripts/generate-forwarding-headers.pl: Added back multiple include-path support. (removed by r183389)

2016-08-26  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>

        Unreviewed EFL build fix since r204996.

        * UIProcess/efl/WebPageProxyEfl.cpp:
        (WebKit::WebPageProxy::editorStateChanged):
        (WebKit::WebPageProxy::setThemePath):
        (WebKit::WebPageProxy::confirmComposition):
        (WebKit::WebPageProxy::setComposition):
        (WebKit::WebPageProxy::cancelComposition):

2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r204986 and r204996.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::willSendSyncMessage):
        (IPC::Connection::didReceiveSyncReply):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::drawPagesForPrinting):

2016-08-25  Anders Carlsson  <andersca@apple.com>

        Replace all IPC message send flags with OptionSet
        https://bugs.webkit.org/show_bug.cgi?id=161211

        Reviewed by Tim Horton.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
        * NetworkProcess/NetworkResourceLoader.h:
        * Platform/IPC/Connection.cpp:
        (IPC::WaitForMessageState::WaitForMessageState):
        (IPC::Connection::sendMessage):
        (IPC::Connection::sendSyncReply):
        (IPC::Connection::waitForMessage):
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::waitForSyncReply):
        (IPC::Connection::processIncomingMessage):
        * Platform/IPC/Connection.h:
        (IPC::Connection::send):
        (IPC::Connection::sendSync):
        (IPC::Connection::waitForAndDispatchImmediately):
        * Platform/IPC/MessageSender.cpp:
        (IPC::MessageSender::sendMessage):
        * Platform/IPC/MessageSender.h:
        (IPC::MessageSender::send):
        (IPC::MessageSender::sendSync):
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::open):
        (IPC::Connection::willSendSyncMessage):
        (IPC::Connection::didReceiveSyncReply):
        * PluginProcess/mac/PluginControllerProxyMac.mm:
        (WebKit::PluginControllerProxy::setComplexTextInputState):
        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::sendMessage):
        (WebKit::ChildProcessProxy::didFinishLaunching):
        * UIProcess/ChildProcessProxy.h:
        (WebKit::ChildProcessProxy::send):
        (WebKit::ChildProcessProxy::sendSync):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::getPluginProcessConnection):
        * UIProcess/WebEditCommandProxy.cpp:
        (WebKit::WebEditCommandProxy::unapply):
        (WebKit::WebEditCommandProxy::reapply):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::printingSendOptions):
        (WebKit::WebPageProxy::preferencesDidChange):
        (WebKit::WebPageProxy::sendMessage):
        (WebKit::WebPageProxy::beginPrinting):
        (WebKit::WebPageProxy::endPrinting):
        (WebKit::WebPageProxy::computePagesForPrinting):
        (WebKit::WebPageProxy::drawRectToImage):
        (WebKit::WebPageProxy::drawPagesToPDF):
        (WebKit::WebPageProxy::drawPagesForPrinting):
        (WebKit::WebPageProxy::setMinimumLayoutSize): Deleted.
        (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight): Deleted.
        (WebKit::WebPageProxy::handleAlternativeTextUIResult): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::geometryDidChange):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):
        (WebKit::WebChromeClient::print):
        (WebKit::WebChromeClient::exceededDatabaseQuota):
        (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::createWithCoreMainFrame):
        (WebKit::WebFrame::createSubframe):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
        (WebKit::WebPage::postSynchronousMessageForTesting):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):

2016-08-25  Anders Carlsson  <andersca@apple.com>

        Remove some more MessageRecorder gunk
        https://bugs.webkit.org/show_bug.cgi?id=161209

        Reviewed by Tim Horton.

        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkProcess.h:
        * Platform/IPC/Connection.h:
        * Platform/IPC/ProcessType.h: Removed.
        * PluginProcess/PluginProcess.h:
        * PluginProcess/WebProcessConnection.h:
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/WebProcessProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
        * WebProcess/Network/NetworkProcessConnection.h:
        * WebProcess/Plugins/PluginProcessConnection.h:
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebProcess.h:

2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>

        Don't store networkLoadTiming in the disk cache
        https://bugs.webkit.org/show_bug.cgi?id=161161

        Reviewed by Antti Koivisto.

        * NetworkProcess/cache/NetworkCacheStorage.h: Updated version to 10.
        * NetworkProcess/cache/NetworkCacheDecoder.h:
        * NetworkProcess/cache/NetworkCacheEncoder.h:
        * Platform/IPC/Decoder.h:
        * Platform/IPC/Encoder.h:
        Added isIPCDecoder/isIPCEncoder static members.

2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] Several flaky tests due to differences in scrollbars
        https://bugs.webkit.org/show_bug.cgi?id=160450

        Reviewed by Michael Catanzaro.

        The issue is that ThreadedCompositor::didChangeVisibleRect() dispatches the setVisibleContentsRect() call that
        ends up in CompositingCoordinator. Since we're compositing the scrollbars as well, this visible contents rect
        needs to encompass the complete width of the view, but that's not happening.
        In case of non-overlay scrollbars, the scrollbars are clipped from this rect, but that doesn't prevent the
        scrollbar overlay layers to be flushed and rendered. What does happen is that during tile creation in the
        backing store the tiles that would normally intersect the visible rect of the view (if it were spanning over the
        whole actual visible area) are sorted by distance to the visible rect.
        The top of the two tiles used for the scrollbar is closer to the visible rect, so that gets created and filled
        in first. The second tile is stored as pending for creation, and does get rendered at the point of the next
        layer flush.

        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect): Update the visible rect taking into account
        the non-overlay scrollbars before passing it to the compositor.

2016-08-24  JF Bastien  <jfbastien@apple.com>

        cmake build broken by MessageRecorder removal
        https://bugs.webkit.org/show_bug.cgi?id=161175

        Reviewed by Dean Jackson.

        * PlatformMac.cmake:

2016-08-24  Jonathan Bedard  <jbedard@apple.com>

        FocusController multiple dereferenced NULL pointers
        https://bugs.webkit.org/show_bug.cgi?id=160808

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setInitialFocus): Should use nullptr, not 0 to initialize NULL pointer.

2016-08-23  Anders Carlsson  <andersca@apple.com>

        Add enum traits and use them in the IPC::Decoder
        https://bugs.webkit.org/show_bug.cgi?id=161103

        Reviewed by Sam Weinig.

        * Platform/IPC/Decoder.h:
        * Platform/IPC/Encoder.h:
        Add new encode/decode functions.

        * Shared/mac/ArgumentCodersMac.mm:
        Change NSType to be a strongly typed enum. Use encode/decode
        instead of encodeEnum/decodeEnum since the latter don't have the
        enum check.

2016-08-24  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, roll out r204901, r204897, r204866, r204856, r204854.

        * UIProcess/ViewGestureController.cpp:
        * UIProcess/WebPageProxy.cpp:
        * UIProcess/WebProcessPool.cpp:
        * UIProcess/WebProcessProxy.cpp:
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        * WebProcess/Plugins/Netscape/JSNPObject.cpp:

2016-08-24  Anders Carlsson  <andersca@apple.com>

        In some cases, an IPC::Connection won't know when the other end has gone away
        https://bugs.webkit.org/show_bug.cgi?id=161153
        rdar://problem/27896368

        Reviewed by Dan Bernstein.

        When being asked to invalidate a connection that isn't yet connected, make sure to release
        our send and receive rights so that the other end will get a failure when trying to connect.

        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::platformInvalidate):

2016-08-24  Dan Bernstein  <mitz@apple.com>

        Add a convenience function for creating a WKFrameHandleRef from a WKFrameRef without going through WKFrameInfoRef
        https://bugs.webkit.org/show_bug.cgi?id=161152

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKFrame.cpp:
        (WKFrameCreateFrameHandle): Added. Creates a handle with the frame’s frameID.
        * UIProcess/API/C/WKFrame.h:

2016-08-24  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Can’t "po" WKObject instances
        https://bugs.webkit.org/show_bug.cgi?id=161151

        Reviewed by Anders Carlsson.

        * Shared/Cocoa/WKObject.mm:
        (-[WKObject debugDescription]): Implement and forward to the target or print a generic
          description.

2016-08-24  Brady Eidson  <beidson@apple.com>

        Get timestamps and ids working in WK2 gamepads (and test them!)
        https://bugs.webkit.org/show_bug.cgi?id=161112

        Reviewed by Alex Christensen.

        * Shared/Gamepad/GamepadData.cpp:
        (WebKit::GamepadData::GamepadData):
        (WebKit::GamepadData::encode):
        (WebKit::GamepadData::decode):
        * Shared/Gamepad/GamepadData.h:
        (WebKit::GamepadData::id):
        (WebKit::GamepadData::index): Deleted.
        
        * UIProcess/Gamepad/UIGamepad.cpp:
        (WebKit::UIGamepad::UIGamepad):
        (WebKit::UIGamepad::condensedGamepadData):
        (WebKit::UIGamepad::fullGamepadData): Include the ID for initial WebGamepad creation.
        (WebKit::UIGamepad::gamepadData): Deleted.
        * UIProcess/Gamepad/UIGamepad.h:
        
        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::snapshotGamepads):
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::gamepadConnected):
        (WebKit::WebProcessPool::setInitialConnectedGamepads):
        
        * WebProcess/Gamepad/WebGamepad.cpp:
        (WebKit::WebGamepad::WebGamepad):
        (WebKit::WebGamepad::updateValues):

2016-08-24  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] Fix test_ewk2_view
        https://bugs.webkit.org/show_bug.cgi?id=161131

        Reviewed by Gyuyoung Kim.

        ewk_view_title_changed: null is treated as the string "null" after r203487.

        ewk_view_page_contents_get: aligned encoding labels after r204605.

        * UIProcess/API/efl/tests/resources/resultMHTML.mht:
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):

2016-08-23  Simon Fraser  <simon.fraser@apple.com>

        Add some logging for WKSelectionDrawingInfo
        https://bugs.webkit.org/show_bug.cgi?id=161055

        Reviewed by Tim Horton.

        Add a Selection logging channel for WK2, and dump WKSelectionDrawingInfo when it changes.

        * Platform/Logging.h:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (WebKit::operator<<):
        (-[WKContentView _updateChangedSelection:]):

2016-08-23  Ryosuke Niwa  <rniwa@webkit.org>

        Another CMake build fix attempt after r204852.

        * CMakeLists.txt:

2016-08-22  Filip Pizlo  <fpizlo@apple.com>

        Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
        https://bugs.webkit.org/show_bug.cgi?id=160125

        Reviewed by Geoffrey Garen.
        
        Just rewiring some #includes.

        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        * WebProcess/Plugins/Netscape/JSNPObject.cpp:

2016-08-23  Brady Eidson  <beidson@apple.com>

        WK2 Gamepad layout test support.
        https://bugs.webkit.org/show_bug.cgi?id=134671

        Reviewed by Alex Christensen.
        
        - Teach the UIGamepadProvider to use the default shared provider.
        - Especially if its the MockGamepadProvider, don't overwrite it.

        * Shared/Gamepad/GamepadData.cpp:
        (WebKit::GamepadData::GamepadData):
        (WebKit::GamepadData::encode):
        (WebKit::GamepadData::decode):
        (WebKit::GamepadData::loggingString):
        (WebKit::GamepadData::isNull): Deleted.
        * Shared/Gamepad/GamepadData.h:
        (WebKit::GamepadData::GamepadData):
        (WebKit::GamepadData::isNull):
        (WebKit::GamepadData::index):
        (WebKit::GamepadData::axisValues):
        (WebKit::GamepadData::buttonValues):

        * UIProcess/Gamepad/UIGamepad.h:

        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::UIGamepadProvider):
        (WebKit::UIGamepadProvider::~UIGamepadProvider):
        (WebKit::UIGamepadProvider::platformGamepadInputActivity):
        (WebKit::UIGamepadProvider::startMonitoringGamepads):
        (WebKit::UIGamepadProvider::stopMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
        * UIProcess/Gamepad/UIGamepadProvider.h:

        * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
        (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads): Deleted.
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads): Deleted.
        (WebKit::UIGamepadProvider::platformGamepads): Deleted.

        * UIProcess/WebPageProxy.h:

        * WebProcess/Gamepad/WebGamepad.cpp:
        (WebKit::WebGamepad::WebGamepad):
        (WebKit::WebGamepad::updateValues):
        * WebProcess/Gamepad/WebGamepad.h:

        * WebProcess/Gamepad/WebGamepadProvider.cpp:
        (WebKit::WebGamepadProvider::gamepadConnected):
        * WebProcess/Gamepad/WebGamepadProvider.h:

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebProcess.h:

2016-08-23  Dave Hyatt  <hyatt@apple.com>

        Add pref for enabling new CSS parsing and move parser files into subdirectory.
        https://bugs.webkit.org/show_bug.cgi?id=161095

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetNewCSSParserEnabled):
        (WKPreferencesGetNewCSSParserEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-08-23  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r204243.

        Caused some layout test failures

        Reverted changeset:

        "Write API test to cover crash fix in r204135"
        https://bugs.webkit.org/show_bug.cgi?id=160587
        http://trac.webkit.org/changeset/204243

2016-08-23  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] URTBF after r204743.

        * Shared/WebBatteryStatus.cpp: Remove Arguments.h.

2016-08-22  Yusuke Suzuki  <utatane.tea@gmail.com>

        Use Messages::XXX...::Reply explicitly
        https://bugs.webkit.org/show_bug.cgi?id=161075

        Reviewed by Carlos Garcia Campos.

        std::tuple's constructor is annotated as `explicit`.
        So we cannot use the implicit conversion here.
        This causes the build failure in EFL and GTK.

        Looking through code, the other places use ::Reply explicitly.
        So in this patch, we follow that.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
        * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
        (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen):

2016-08-22  Anders Carlsson  <andersca@apple.com>

        Remove Arguments.h
        https://bugs.webkit.org/show_bug.cgi?id=161060

        Reviewed by Tim Horton.

        * Platform/IPC/Arguments.h: Removed.
        (IPC::Arguments::Arguments): Deleted.
        (IPC::Arguments::encode): Deleted.
        (IPC::Arguments::decode): Deleted.
        * Platform/IPC/Connection.h:
        * Platform/IPC/HandleMessage.h:
        * Shared/AssistedNodeInformation.cpp:
        * Shared/Cocoa/DataDetectionResult.mm:
        * Shared/EditorState.cpp:
        * Shared/WebContextMenuItemData.cpp:
        * Shared/WebMouseEvent.cpp:
        * Shared/WebPlatformTouchPoint.cpp:
        * Shared/WebPopupItem.cpp:
        * Shared/WebTouchEvent.cpp:
        * Shared/WebWheelEvent.cpp:
        * Shared/ios/InteractionInformationAtPosition.mm:
        * Shared/ios/WebPlatformTouchPointIOS.cpp:
        * Shared/ios/WebTouchEventIOS.cpp:
        * Shared/mac/WebGestureEvent.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        * WebProcess/WebPage/WebPage.cpp:

2016-08-22  Anders Carlsson  <andersca@apple.com>

        Move tuple coding to ArgumentCoders.h
        https://bugs.webkit.org/show_bug.cgi?id=161059

        Reviewed by Tim Horton.

        * Platform/IPC/ArgumentCoders.h:
        (IPC::TupleCoder::encode):
        (IPC::TupleCoder::decode):
        * Platform/IPC/Arguments.h:
        (IPC::TupleCoder::encode): Deleted.
        (IPC::TupleCoder::decode): Deleted.
        * Scripts/webkit/messages.py:
        (forward_declarations_and_headers):

2016-08-22  Anders Carlsson  <andersca@apple.com>

        Simplify the generated message structs
        https://bugs.webkit.org/show_bug.cgi?id=161057

        Reviewed by Geoffrey Garen.

        Use a class template to transform the Reply and Argument tuple types for encoding/decoding
        instead of generating them for each message.

        * Platform/IPC/HandleMessage.h:
        (IPC::handleMessage):
        (IPC::handleMessageDelayed):
        * Scripts/webkit/messages.py:
        (reply_type):
        (message_to_struct_declaration):
        (decode_type): Deleted.

2016-08-19  Anders Carlsson  <andersca@apple.com>

        Remove MessageRecorder
        https://bugs.webkit.org/show_bug.cgi?id=161022

        Reviewed by Tim Horton.

        * Platform/IPC/ArgumentCoders.cpp:
        (IPC::ArgumentCoder<uuid_t>::encode): Deleted.
        (IPC::ArgumentCoder<uuid_t>::decode): Deleted.
        * Platform/IPC/ArgumentCoders.h:
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::sendMessage):
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::dispatchSyncMessage): Deleted.
        (IPC::Connection::dispatchMessage): Deleted.
        * Platform/IPC/Connection.h:
        * Platform/IPC/Encoder.cpp:
        (IPC::Encoder::encodeHeader): Deleted.
        * Platform/IPC/MessageRecorder.cpp: Removed.
        (IPC::MessageRecorder::isEnabled): Deleted.
        (IPC::MessageRecorder::recordOutgoingMessage): Deleted.
        (IPC::MessageRecorder::recordIncomingMessage): Deleted.
        (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken): Deleted.
        (IPC::MessageRecorder::MessageProcessingToken::~MessageProcessingToken): Deleted.
        * Platform/IPC/MessageRecorder.h: Removed.
        (IPC::MessageRecorder::MessageRecorder): Deleted.
        * Platform/IPC/MessageRecorderProbes.d: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-08-22  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build after r204717.

        * PlatformMac.cmake:

2016-08-22  Simon Fraser  <simon.fraser@apple.com>

        <select> menu on iPad causes shifting of hit-testing areas
        https://bugs.webkit.org/show_bug.cgi?id=150079

        Reviewed by Tim Horton.

        -isAssistingNode (aka the poorly named isEditable) is input into WebPageProxy::computeCustomFixedPositionRect(),
        so when it changes we have to update visible rects. We were doing this on focus, but failing
        to do it on blur.

        Added the ability to test by:
        1. Making it possible to initiate an animated scroll in the UI process
        2. Adding callbacks for starting and ending interaction with a form control. Sadly
        the "ending interaction" for <select> popovers on iPad isn't late enough, since we
        have no way currently to know when the dimming view behind the popover animates out,
        so for now the test keeps trying to tap a button.

        Test: fast/forms/ios/ipad/unfocus-inside-fixed-hittest.html

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _zoomToPoint:atScale:animated:]):
        (-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
        (-[WKWebView _scrollByContentOffset:]):
        (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
        (-[WKWebView didStartFormControlInteraction]):
        (-[WKWebView didEndFormControlInteraction]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView setIsEditable:]):
        (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
        (-[WKContentView _stopAssistingNode]):

2016-08-22  Daniel Bates  <dabates@apple.com>

        [iOS] <a ping> and <area ping> tests time out
        https://bugs.webkit.org/show_bug.cgi?id=156857

        Reviewed by Simon Fraser.

        Support single tapping on an HTML area element in WebKit2 just as we do in Legacy WebKit.

        WebKit2 commits to clicking a "clickable" DOM node on a single tap only if it has a
        renderer. An HTML area element represents a hyperlink in an image map and does not have
        a renderer.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Compute the tap highlight with respect
        to the renderer for the image map associated with the tapped HTML area element (if it has one).
        (WebKit::WebPage::commitPotentialTap): Allow committing a potential tap on an HTML area element.

2016-08-22  Darin Adler  <darin@apple.com>

        Move Objective-C DOM bindings from WebCore to legacy WebKit
        https://bugs.webkit.org/show_bug.cgi?id=160654

        Reviewed by Alex Christensen.

        * WebProcess/WebCoreSupport/WebEditorClient.h: Updated to use RefPtr.
        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
        (WebKit::WebEditorClient::documentFragmentFromDelegate): Ditto.

        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Removed unneeded includes
        of Objective-C DOM headers that are now part of legacy WebKit, not WebCore.
        But this file doesn't need to depend on those headers at all.

2016-08-22  Chris Dumez  <cdumez@apple.com>

        [iOS] Wait a few seconds before release network activity assertion after a load
        https://bugs.webkit.org/show_bug.cgi?id=160975
        <rdar://problem/27910964>

        Reviewed by Darin Adler.

        Some apps do several loads one after the other in a non-visible view.
        This causes us to release the background assertion every time a load
        completes and then take one again less than a second after. Every
        time we release the assertion, we send a PrepareToSuspend IPC to the
        WebContent process, which does all the clean up to get ready to
        suspend, only to get a CancelPrepareReadyToSuspend later on because
        the next load has started. To work around this problem, we now wait
        a few seconds before releasing the background activity after a load.

        * UIProcess/Cocoa/NavigationState.h:
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::NavigationState):
        (WebKit::NavigationState::releaseNetworkActivityToken):
        (WebKit::NavigationState::didChangeIsLoading):

2016-08-22  Youenn Fablet  <youenn@apple.com>

        [Fetch API] Activate fetch api runtime flag by default
        https://bugs.webkit.org/show_bug.cgi?id=160452

        Reviewed by Alex Christensen.

        * Shared/WebPreferencesDefinitions.h:

2016-08-22  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>

        [SOUP] Change MessageDecoder with Decoder
        https://bugs.webkit.org/show_bug.cgi?id=161040

        Reviewed by Darin Adler.

        Clean up MessageDecoder in files of Soup.

        * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
        (WebKit::WebPage::didReceiveMessage):
        * UIProcess/soup/WebSoupRequestManagerProxy.h:
        * WebProcess/soup/WebSoupRequestManager.h:

2016-08-21  Alex Christensen  <achristensen@webkit.org>

        Use Document& instead of Document* when getting cookies
        https://bugs.webkit.org/show_bug.cgi?id=161011

        Reviewed by Darin Adler.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
        (WebKit::WebAutomationSessionProxy::deleteCookie):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::cookiesForURL):
        (WebKit::PluginView::setCookiesForURL):
        (WebKit::PluginView::getAuthenticationInfo):

2016-08-20  Gyuyoung Kim  <gyuyoung.kim@navercorp.com>

        Unreviewed EFL build fix since r204668

        r204668 changed MessageDecoder with Decoder though, MessageDecoder remained
        in EFL specific files.

        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
        * UIProcess/WebVibrationProxy.h:
        * WebProcess/Battery/WebBatteryManager.h:
        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
        (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
        * WebProcess/WebPage/AcceleratedDrawingArea.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/LayerTreeHost.h:

2016-08-20  Dan Bernstein  <mitz@apple.com>

        [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
        https://bugs.webkit.org/show_bug.cgi?id=156668
        <rdar://problem/25429784>

        Reviewed by Sam Weinig.

        * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
          service is given the XPC domain extension entitlement.

2016-08-20  Javier Fernandez  <jfernandez@igalia.com>

        [GTK] Unreviewed GTK build fix since r204665 and 204668
        https://bugs.webkit.org/show_bug.cgi?id=161020

        * CMakeLists.txt:
        * Platform/IPC/MessageRecorder.cpp:
        (IPC::MessageRecorder::recordOutgoingMessage):
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage):
        (IPC::Connection::sendOutgoingMessage):
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::encode):
        (WebKit::SharedMemory::Handle::decode):
        * PlatformGTK.cmake:
        * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
        (WebKit::WebPage::didReceiveWebPageMessage):
        (WebKit::WebPage::didReceiveSyncWebPageMessage):
        * Scripts/webkit/LegacyMessages-expected.h:
        * Scripts/webkit/MessageReceiver-expected.cpp:
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
        (WebKit::WebPage::didReceiveMessage):
        (WebKit::WebPage::didReceiveSyncMessage):
        * Scripts/webkit/Messages-expected.h:
        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
        (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
        (IPC::ArgumentCoder<TransformOperations>::encode):
        (IPC::ArgumentCoder<TransformOperations>::decode):
        (IPC::encodeTimingFunction):
        (IPC::decodeTimingFunction):
        (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
        (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
        (IPC::ArgumentCoder<TextureMapperAnimations>::encode):
        (IPC::ArgumentCoder<TextureMapperAnimations>::decode):
        (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
        (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
        (IPC::ArgumentCoder<SurfaceUpdateInfo>::encode):
        (IPC::ArgumentCoder<SurfaceUpdateInfo>::decode):
        (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
        (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
        (IPC::ArgumentCoder<TileUpdateInfo>::encode):
        (IPC::ArgumentCoder<TileUpdateInfo>::decode):
        (IPC::ArgumentCoder<TileCreationInfo>::encode):
        (IPC::ArgumentCoder<TileCreationInfo>::decode):
        (IPC::encodeCoordinatedSurface):
        (IPC::decodeCoordinatedSurface):
        (IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
        (IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::Handle::encode):
        (WebKit::WebCoordinatedSurface::Handle::decode):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
        * Shared/WebBatteryStatus.cpp:
        (WebKit::WebBatteryStatus::Data::encode):
        (WebKit::WebBatteryStatus::Data::decode):
        * Shared/WebBatteryStatus.h:
        * Shared/gtk/ArgumentCodersGtk.cpp:
        (IPC::encodeImage):
        (IPC::decodeImage):
        (IPC::encodeDataObject):
        (IPC::decodeDataObject):
        (IPC::ArgumentCoder<DragData>::encode):
        (IPC::ArgumentCoder<DragData>::decode):
        (IPC::encodeGKeyFile):
        (IPC::decodeGKeyFile):
        (IPC::encode):
        (IPC::decode):
        * Shared/gtk/ArgumentCodersGtk.h:
        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
        (IPC::ArgumentCoder<CertificateInfo>::encode):
        (IPC::ArgumentCoder<CertificateInfo>::decode):
        (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
        (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
        (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData):
        (IPC::ArgumentCoder<Credential>::encodePlatformData):
        (IPC::ArgumentCoder<Credential>::decodePlatformData):
        * UIProcess/LegacySessionStateCodingNone.cpp:
        (WebKit::encodeLegacySessionState):
        (WebKit::decodeLegacySessionState):
        * UIProcess/WebBatteryManagerProxy.h:

2016-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>

        Unreviewed, build fix attempt after r204665 and r204668.

        * PlatformGTK.cmake:

2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>

        Another build fix attempt after r204665 and r204668.

        * CMakeLists.txt:

2016-08-19  Ryosuke Niwa  <rniwa@webkit.org>

        GTK+ / EFL build fix attempt after r204665.

        * CMakeLists.txt:

2016-08-19  Anders Carlsson  <andersca@apple.com>

        Merge MessageDecoder and ArgumentDecoder into Decoder
        https://bugs.webkit.org/show_bug.cgi?id=161019

        Reviewed by Tim Horton.

        * DatabaseProcess/DatabaseProcess.cpp:
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
        * NetworkProcess/Downloads/DownloadID.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkProcess.cpp:
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        * NetworkProcess/NetworkResourceLoadParameters.h:
        * NetworkProcess/NetworkResourceLoader.h:
        * Platform/IPC/ArgumentCoder.h:
        * Platform/IPC/ArgumentCoders.cpp:
        * Platform/IPC/ArgumentCoders.h:
        * Platform/IPC/ArgumentDecoder.cpp:
        * Platform/IPC/ArgumentDecoder.h:
        * Platform/IPC/Arguments.h:
        * Platform/IPC/Attachment.cpp:
        * Platform/IPC/Attachment.h:
        * Platform/IPC/Connection.cpp:
        * Platform/IPC/Connection.h:
        * Platform/IPC/DataReference.cpp:
        * Platform/IPC/DataReference.h:
        * Platform/IPC/Decoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp.
        * Platform/IPC/Decoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentDecoder.h.
        * Platform/IPC/HandleMessage.h:
        * Platform/IPC/MessageDecoder.cpp: Removed.
        * Platform/IPC/MessageDecoder.h: Removed.
        * Platform/IPC/MessageReceiver.h:
        * Platform/IPC/MessageReceiverMap.cpp:
        * Platform/IPC/MessageReceiverMap.h:
        * Platform/IPC/MessageRecorder.cpp:
        * Platform/IPC/MessageRecorder.h:
        * Platform/IPC/StringReference.cpp:
        * Platform/IPC/StringReference.h:
        * Platform/IPC/mac/ConnectionMac.mm:
        * Platform/IPC/mac/MachPort.h:
        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        * PluginProcess/PluginControllerProxy.h:
        * PluginProcess/PluginCreationParameters.cpp:
        * PluginProcess/PluginCreationParameters.h:
        * PluginProcess/PluginProcess.cpp:
        * PluginProcess/PluginProcess.h:
        * PluginProcess/WebProcessConnection.cpp:
        * PluginProcess/WebProcessConnection.h:
        * Scripts/webkit/messages.py:
        * Shared/API/APIData.cpp:
        * Shared/API/APIData.h:
        * Shared/API/APIError.cpp:
        * Shared/API/APIError.h:
        * Shared/API/APIFrameHandle.cpp:
        * Shared/API/APIFrameHandle.h:
        * Shared/API/APIGeometry.cpp:
        * Shared/API/APIGeometry.h:
        * Shared/API/APINumber.h:
        * Shared/API/APIPageGroupHandle.cpp:
        * Shared/API/APIPageGroupHandle.h:
        * Shared/API/APIPageHandle.cpp:
        * Shared/API/APIPageHandle.h:
        * Shared/API/APIURL.h:
        * Shared/API/APIURLRequest.cpp:
        * Shared/API/APIURLRequest.h:
        * Shared/API/APIURLResponse.cpp:
        * Shared/API/APIURLResponse.h:
        * Shared/API/Cocoa/RemoteObjectInvocation.h:
        * Shared/API/Cocoa/RemoteObjectInvocation.mm:
        * Shared/API/Cocoa/RemoteObjectRegistry.h:
        * Shared/AssistedNodeInformation.cpp:
        * Shared/AssistedNodeInformation.h:
        * Shared/Authentication/AuthenticationManager.h:
        * Shared/ChildProcess.h:
        * Shared/Cocoa/DataDetectionResult.h:
        * Shared/Cocoa/DataDetectionResult.mm:
        * Shared/Cocoa/LoadParametersCocoa.mm:
        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        * Shared/ContextMenuContextData.cpp:
        * Shared/ContextMenuContextData.h:
        * Shared/Databases/DatabaseProcessCreationParameters.cpp:
        * Shared/Databases/DatabaseProcessCreationParameters.h:
        * Shared/Databases/IndexedDB/WebIDBResult.cpp:
        * Shared/Databases/IndexedDB/WebIDBResult.h:
        * Shared/EditorState.cpp:
        * Shared/EditorState.h:
        * Shared/FontInfo.cpp:
        * Shared/FontInfo.h:
        * Shared/Gamepad/GamepadData.cpp:
        * Shared/Gamepad/GamepadData.h:
        * Shared/LayerTreeContext.cpp:
        * Shared/LayerTreeContext.h:
        * Shared/LoadParameters.cpp:
        * Shared/LoadParameters.h:
        * Shared/NavigationActionData.cpp:
        * Shared/NavigationActionData.h:
        * Shared/PlatformPopupMenuData.cpp:
        * Shared/PlatformPopupMenuData.h:
        * Shared/Plugins/NPIdentifierData.cpp:
        * Shared/Plugins/NPIdentifierData.h:
        * Shared/Plugins/NPObjectMessageReceiver.h:
        * Shared/Plugins/NPRemoteObjectMap.cpp:
        * Shared/Plugins/NPRemoteObjectMap.h:
        * Shared/Plugins/NPVariantData.cpp:
        * Shared/Plugins/NPVariantData.h:
        * Shared/Plugins/PluginProcessCreationParameters.cpp:
        * Shared/Plugins/PluginProcessCreationParameters.h:
        * Shared/PrintInfo.cpp:
        * Shared/PrintInfo.h:
        * Shared/SandboxExtension.h:
        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
        * Shared/SessionState.cpp:
        * Shared/SessionState.h:
        * Shared/ShareableBitmap.cpp:
        * Shared/ShareableBitmap.h:
        * Shared/ShareableResource.cpp:
        * Shared/ShareableResource.h:
        * Shared/StatisticsData.cpp:
        * Shared/StatisticsData.h:
        * Shared/UpdateInfo.cpp:
        * Shared/UpdateInfo.h:
        * Shared/UserData.cpp:
        * Shared/UserData.h:
        * Shared/VisibleContentRectUpdateInfo.cpp:
        * Shared/VisibleContentRectUpdateInfo.h:
        * Shared/WebBackForwardListItem.h:
        * Shared/WebCompiledContentExtensionData.cpp:
        * Shared/WebCompiledContentExtensionData.h:
        * Shared/WebConnection.h:
        * Shared/WebContextMenuItemData.cpp:
        * Shared/WebContextMenuItemData.h:
        * Shared/WebCoreArgumentCoders.cpp:
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebEvent.cpp:
        * Shared/WebEvent.h:
        * Shared/WebGeolocationPosition.cpp:
        * Shared/WebGeolocationPosition.h:
        * Shared/WebHitTestResultData.cpp:
        * Shared/WebHitTestResultData.h:
        * Shared/WebKeyboardEvent.cpp:
        * Shared/WebMouseEvent.cpp:
        * Shared/WebNavigationDataStore.h:
        * Shared/WebPageCreationParameters.cpp:
        * Shared/WebPageCreationParameters.h:
        * Shared/WebPageGroupData.cpp:
        * Shared/WebPageGroupData.h:
        * Shared/WebPlatformTouchPoint.cpp:
        * Shared/WebPopupItem.cpp:
        * Shared/WebPopupItem.h:
        * Shared/WebPreferencesStore.cpp:
        * Shared/WebPreferencesStore.h:
        * Shared/WebProcessCreationParameters.cpp:
        * Shared/WebProcessCreationParameters.h:
        * Shared/WebTouchEvent.cpp:
        * Shared/WebUserContentControllerDataTypes.cpp:
        * Shared/WebUserContentControllerDataTypes.h:
        * Shared/WebWheelEvent.cpp:
        * Shared/WebsiteData/WebsiteData.cpp:
        * Shared/WebsiteData/WebsiteData.h:
        * Shared/cf/ArgumentCodersCF.cpp:
        * Shared/cf/ArgumentCodersCF.h:
        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        * Shared/ios/QuickLookDocumentData.cpp:
        * Shared/ios/QuickLookDocumentData.h:
        * Shared/ios/WebPlatformTouchPointIOS.cpp:
        * Shared/ios/WebTouchEventIOS.cpp:
        * Shared/mac/ArgumentCodersMac.h:
        * Shared/mac/ArgumentCodersMac.mm:
        * Shared/mac/AttributedString.h:
        * Shared/mac/AttributedString.mm:
        * Shared/mac/ColorSpaceData.h:
        * Shared/mac/ColorSpaceData.mm:
        * Shared/mac/ObjCObjectGraph.h:
        * Shared/mac/ObjCObjectGraph.mm:
        * Shared/mac/RemoteLayerBackingStore.h:
        * Shared/mac/RemoteLayerBackingStore.mm:
        * Shared/mac/RemoteLayerTreeTransaction.h:
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        * Shared/mac/SandboxExtensionMac.mm:
        * Shared/mac/SecItemRequestData.cpp:
        * Shared/mac/SecItemRequestData.h:
        * Shared/mac/SecItemResponseData.cpp:
        * Shared/mac/SecItemResponseData.h:
        * Shared/mac/SecItemShim.h:
        * Shared/mac/WebCoreArgumentCodersMac.mm:
        * Shared/mac/WebGestureEvent.cpp:
        * Shared/mac/WebGestureEvent.h:
        * Shared/mac/WebHitTestResultData.mm:
        * UIProcess/API/APIHitTestResult.h:
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/ChildProcessProxy.cpp:
        * UIProcess/ChildProcessProxy.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/DrawingAreaProxy.h:
        * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        * UIProcess/VisitedLinkStore.h:
        * UIProcess/WebCookieManagerProxy.h:
        * UIProcess/WebFrameProxy.h:
        * UIProcess/WebFullScreenManagerProxy.h:
        * UIProcess/WebGeolocationManagerProxy.h:
        * UIProcess/WebIconDatabase.h:
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPasteboardProxy.h:
        * UIProcess/WebProcessPool.cpp:
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessProxy.cpp:
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebResourceLoadStatisticsStore.h:
        * UIProcess/ios/SmartMagnificationController.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/SecItemShimProxy.h:
        * UIProcess/mac/ViewGestureController.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/ApplePay/WebPaymentCoordinator.h:
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Cookies/WebCookieManager.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
        * WebProcess/FullScreen/WebFullScreenManager.cpp:
        * WebProcess/FullScreen/WebFullScreenManager.h:
        * WebProcess/Geolocation/WebGeolocationManager.h:
        * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
        * WebProcess/InjectedBundle/InjectedBundle.h:
        * WebProcess/Network/NetworkProcessConnection.cpp:
        * WebProcess/Network/NetworkProcessConnection.h:
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Notifications/WebNotificationManager.h:
        * WebProcess/Plugins/Plugin.cpp:
        * WebProcess/Plugins/Plugin.h:
        * WebProcess/Plugins/PluginProcessConnection.cpp:
        * WebProcess/Plugins/PluginProcessConnection.h:
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        * WebProcess/Plugins/PluginProcessConnectionManager.h:
        * WebProcess/Plugins/PluginProxy.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        * WebProcess/Storage/StorageAreaMap.h:
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/EventDispatcher.h:
        * WebProcess/WebPage/ViewGestureGeometryCollector.h:
        * WebProcess/WebPage/ViewUpdateDispatcher.h:
        * WebProcess/WebPage/VisitedLinkTableController.h:
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        * WebProcess/WebProcess.cpp:
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.h:

2016-08-19  Anders Carlsson  <andersca@apple.com>

        Update Xcode project.

        * WebKit2.xcodeproj/project.pbxproj:

2016-08-19  Anders Carlsson  <andersca@apple.com>

        Merge MessageEncoder and ArgumentEncoder into Encoder
        https://bugs.webkit.org/show_bug.cgi?id=161016

        Reviewed by Tim Horton.

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * NetworkProcess/Downloads/DownloadID.h:
        (IPC::ArgumentCoder<WebKit::DownloadID>::encode):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::didReceiveSyncMessage):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::encode):
        * NetworkProcess/NetworkResourceLoadParameters.h:
        * Platform/IPC/ArgumentCoder.h:
        (IPC::ArgumentCoder::encode):
        * Platform/IPC/ArgumentCoders.cpp:
        (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
        (IPC::ArgumentCoder<AtomicString>::encode):
        (IPC::ArgumentCoder<CString>::encode):
        (IPC::ArgumentCoder<String>::encode):
        (IPC::ArgumentCoder<uuid_t>::encode):
        * Platform/IPC/ArgumentCoders.h:
        (IPC::SimpleArgumentCoder::encode):
        (IPC::ArgumentCoder<OptionSet<T>>::encode):
        (IPC::ArgumentCoder<WTF::Optional<T>>::encode):
        * Platform/IPC/ArgumentEncoder.cpp:
        (IPC::allocBuffer): Deleted.
        (IPC::freeBuffer): Deleted.
        (IPC::ArgumentEncoder::ArgumentEncoder): Deleted.
        (IPC::ArgumentEncoder::~ArgumentEncoder): Deleted.
        (IPC::roundUpToAlignment): Deleted.
        (IPC::ArgumentEncoder::reserve): Deleted.
        (IPC::ArgumentEncoder::grow): Deleted.
        (IPC::ArgumentEncoder::encodeFixedLengthData): Deleted.
        (IPC::ArgumentEncoder::encodeVariableLengthByteArray): Deleted.
        (IPC::copyValueToBuffer): Deleted.
        (IPC::ArgumentEncoder::encode): Deleted.
        (IPC::ArgumentEncoder::addAttachment): Deleted.
        (IPC::ArgumentEncoder::releaseAttachments): Deleted.
        * Platform/IPC/ArgumentEncoder.h:
        (IPC::ArgumentEncoder::encodeEnum): Deleted.
        (IPC::ArgumentEncoder::encode): Deleted.
        (IPC::ArgumentEncoder::operator<<): Deleted.
        (IPC::ArgumentEncoder::buffer): Deleted.
        (IPC::ArgumentEncoder::bufferSize): Deleted.
        * Platform/IPC/Arguments.h:
        (IPC::TupleCoder::encode):
        (IPC::Arguments::encode):
        * Platform/IPC/Attachment.cpp:
        (IPC::Attachment::encode):
        * Platform/IPC/Attachment.h:
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
        (IPC::Connection::createSyncMessageEncoder):
        (IPC::Connection::sendMessage):
        (IPC::Connection::sendSyncReply):
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::sendOutgoingMessages):
        (IPC::Connection::dispatchSyncMessage):
        * Platform/IPC/Connection.h:
        (IPC::Connection::send):
        (IPC::Connection::sendSync):
        * Platform/IPC/DataReference.cpp:
        (IPC::DataReference::encode):
        (IPC::SharedBufferDataReference::encode):
        * Platform/IPC/DataReference.h:
        * Platform/IPC/Encoder.cpp: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp.
        (IPC::allocBuffer):
        (IPC::freeBuffer):
        (IPC::Encoder::Encoder):
        (IPC::Encoder::~Encoder):
        (IPC::Encoder::isSyncMessage):
        (IPC::Encoder::shouldDispatchMessageWhenWaitingForSyncReply):
        (IPC::Encoder::setIsSyncMessage):
        (IPC::Encoder::setShouldDispatchMessageWhenWaitingForSyncReply):
        (IPC::Encoder::setFullySynchronousModeForTesting):
        (IPC::Encoder::wrapForTesting):
        (IPC::roundUpToAlignment):
        (IPC::Encoder::reserve):
        (IPC::Encoder::encodeHeader):
        (IPC::Encoder::grow):
        (IPC::Encoder::encodeFixedLengthData):
        (IPC::Encoder::encodeVariableLengthByteArray):
        (IPC::copyValueToBuffer):
        (IPC::Encoder::encode):
        (IPC::Encoder::addAttachment):
        (IPC::Encoder::releaseAttachments):
        * Platform/IPC/Encoder.h: Renamed from Source/WebKit2/Platform/IPC/ArgumentEncoder.h.
        * Platform/IPC/HandleMessage.h:
        (IPC::handleMessage):
        (IPC::handleMessageDelayed):
        * Platform/IPC/MessageEncoder.cpp: Removed.
        (IPC::MessageEncoder::MessageEncoder): Deleted.
        (IPC::MessageEncoder::~MessageEncoder): Deleted.
        (IPC::MessageEncoder::encodeHeader): Deleted.
        (IPC::MessageEncoder::isSyncMessage): Deleted.
        (IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply): Deleted.
        (IPC::MessageEncoder::setIsSyncMessage): Deleted.
        (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): Deleted.
        (IPC::MessageEncoder::setFullySynchronousModeForTesting): Deleted.
        (IPC::MessageEncoder::wrapForTesting): Deleted.
        * Platform/IPC/MessageEncoder.h: Removed.
        (IPC::MessageEncoder::messageReceiverName): Deleted.
        (IPC::MessageEncoder::messageName): Deleted.
        (IPC::MessageEncoder::destinationID): Deleted.
        (IPC::MessageEncoder::UUID): Deleted.
        * Platform/IPC/MessageReceiver.h:
        (IPC::MessageReceiver::didReceiveSyncMessage):
        * Platform/IPC/MessageReceiverMap.cpp:
        (IPC::MessageReceiverMap::dispatchSyncMessage):
        * Platform/IPC/MessageReceiverMap.h:
        * Platform/IPC/MessageRecorder.h:
        * Platform/IPC/MessageSender.cpp:
        (IPC::MessageSender::sendMessage):
        * Platform/IPC/MessageSender.h:
        (IPC::MessageSender::send):
        * Platform/IPC/StringReference.cpp:
        (IPC::StringReference::encode):
        * Platform/IPC/StringReference.h:
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::open):
        (IPC::Connection::sendOutgoingMessage):
        * Platform/IPC/mac/MachPort.h:
        (IPC::MachPort::encode):
        * Platform/SharedMemory.h:
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::Handle::encode):
        * PluginProcess/PluginControllerProxy.h:
        * PluginProcess/PluginCreationParameters.cpp:
        (WebKit::PluginCreationParameters::encode):
        * PluginProcess/PluginCreationParameters.h:
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::didReceiveSyncMessage):
        * PluginProcess/WebProcessConnection.h:
        * Scripts/webkit/messages.py:
        (message_to_struct_declaration):
        (forward_declarations_and_headers):
        (generate_message_handler):
        (headers_for_type): Deleted.
        * Shared/API/APIData.cpp:
        (API::Data::encode):
        * Shared/API/APIData.h:
        * Shared/API/APIError.cpp:
        (API::Error::encode):
        * Shared/API/APIError.h:
        * Shared/API/APIFrameHandle.cpp:
        (API::FrameHandle::encode):
        * Shared/API/APIFrameHandle.h:
        * Shared/API/APIGeometry.cpp:
        (API::Point::encode):
        (API::Size::encode):
        (API::Rect::encode):
        * Shared/API/APIGeometry.h:
        * Shared/API/APINumber.h:
        (API::Number::encode):
        * Shared/API/APIPageGroupHandle.cpp:
        (API::PageGroupHandle::encode):
        * Shared/API/APIPageGroupHandle.h:
        * Shared/API/APIPageHandle.cpp:
        (API::PageHandle::encode):
        * Shared/API/APIPageHandle.h:
        * Shared/API/APIURL.h:
        (API::URL::encode):
        * Shared/API/APIURLRequest.cpp:
        (API::URLRequest::encode):
        * Shared/API/APIURLRequest.h:
        * Shared/API/APIURLResponse.cpp:
        (API::URLResponse::encode):
        * Shared/API/APIURLResponse.h:
        * Shared/API/Cocoa/RemoteObjectInvocation.h:
        * Shared/API/Cocoa/RemoteObjectInvocation.mm:
        (WebKit::RemoteObjectInvocation::encode):
        * Shared/AssistedNodeInformation.cpp:
        (WebKit::OptionItem::encode):
        (WebKit::AssistedNodeInformation::encode):
        * Shared/AssistedNodeInformation.h:
        * Shared/Cocoa/DataDetectionResult.h:
        * Shared/Cocoa/DataDetectionResult.mm:
        (WebKit::DataDetectionResult::encode):
        * Shared/Cocoa/LoadParametersCocoa.mm:
        (WebKit::LoadParameters::platformEncode):
        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        (IPC::ArgumentCoder<WebCore::Payment>::encode):
        (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
        (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
        (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
        (IPC::ArgumentCoder<PaymentRequest>::encode):
        (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
        (IPC::ArgumentCoder<PaymentRequest::LineItem>::encode):
        (IPC::ArgumentCoder<PaymentRequest::MerchantCapabilities>::encode):
        (IPC::ArgumentCoder<PaymentRequest::ShippingMethod>::encode):
        (IPC::ArgumentCoder<PaymentRequest::TotalAndLineItems>::encode):
        * Shared/ContextMenuContextData.cpp:
        (WebKit::ContextMenuContextData::encode):
        * Shared/ContextMenuContextData.h:
        * Shared/Databases/DatabaseProcessCreationParameters.cpp:
        (WebKit::DatabaseProcessCreationParameters::encode):
        * Shared/Databases/DatabaseProcessCreationParameters.h:
        * Shared/Databases/IndexedDB/WebIDBResult.cpp:
        (WebKit::WebIDBResult::encode):
        * Shared/Databases/IndexedDB/WebIDBResult.h:
        * Shared/EditorState.cpp:
        (WebKit::EditorState::encode):
        (WebKit::EditorState::PostLayoutData::encode):
        * Shared/EditorState.h:
        * Shared/FontInfo.cpp:
        (WebKit::FontInfo::encode):
        * Shared/FontInfo.h:
        * Shared/Gamepad/GamepadData.cpp:
        (WebKit::GamepadData::encode):
        * Shared/Gamepad/GamepadData.h:
        * Shared/LayerTreeContext.cpp:
        (WebKit::LayerTreeContext::encode):
        * Shared/LayerTreeContext.h:
        * Shared/LoadParameters.cpp:
        (WebKit::LoadParameters::encode):
        (WebKit::LoadParameters::platformEncode):
        * Shared/LoadParameters.h:
        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode):
        * Shared/NavigationActionData.h:
        * Shared/PlatformPopupMenuData.cpp:
        (WebKit::PlatformPopupMenuData::encode):
        * Shared/PlatformPopupMenuData.h:
        * Shared/Plugins/NPIdentifierData.cpp:
        (WebKit::NPIdentifierData::encode):
        * Shared/Plugins/NPIdentifierData.h:
        * Shared/Plugins/NPObjectMessageReceiver.h:
        * Shared/Plugins/NPRemoteObjectMap.cpp:
        (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
        * Shared/Plugins/NPRemoteObjectMap.h:
        * Shared/Plugins/NPVariantData.cpp:
        (WebKit::NPVariantData::encode):
        * Shared/Plugins/NPVariantData.h:
        * Shared/Plugins/PluginProcessCreationParameters.cpp:
        (WebKit::PluginProcessCreationParameters::encode):
        * Shared/Plugins/PluginProcessCreationParameters.h:
        * Shared/PrintInfo.cpp:
        (WebKit::PrintInfo::encode):
        * Shared/PrintInfo.h:
        * Shared/SandboxExtension.h:
        (WebKit::SandboxExtension::Handle::encode):
        (WebKit::SandboxExtension::HandleArray::encode):
        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        (ArgumentCoder<ScrollingStateNode>::encode):
        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateFixedNode>::encode):
        (ArgumentCoder<ScrollingStateStickyNode>::encode):
        (WebKit::encodeNodeAndDescendants):
        (WebKit::RemoteScrollingCoordinatorTransaction::encode):
        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
        * Shared/SessionState.cpp:
        (WebKit::HTTPBody::Element::encode):
        (WebKit::HTTPBody::encode):
        (WebKit::FrameState::encode):
        (WebKit::PageState::encode):
        (WebKit::BackForwardListItemState::encode):
        (WebKit::BackForwardListState::encode):
        * Shared/SessionState.h:
        * Shared/ShareableBitmap.cpp:
        (WebKit::ShareableBitmap::Handle::encode):
        * Shared/ShareableBitmap.h:
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::Handle::encode):
        * Shared/ShareableResource.h:
        * Shared/StatisticsData.cpp:
        (WebKit::StatisticsData::encode):
        * Shared/StatisticsData.h:
        * Shared/UpdateInfo.cpp:
        (WebKit::UpdateInfo::encode):
        * Shared/UpdateInfo.h:
        * Shared/UserData.cpp:
        (WebKit::UserData::encode):
        * Shared/UserData.h:
        * Shared/VisibleContentRectUpdateInfo.cpp:
        (WebKit::VisibleContentRectUpdateInfo::encode):
        * Shared/VisibleContentRectUpdateInfo.h:
        * Shared/WebBackForwardListItem.h:
        * Shared/WebCompiledContentExtensionData.cpp:
        (WebKit::WebCompiledContentExtensionData::encode):
        * Shared/WebCompiledContentExtensionData.h:
        * Shared/WebContextMenuItemData.cpp:
        (WebKit::WebContextMenuItemData::encode):
        * Shared/WebContextMenuItemData.h:
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<AffineTransform>::encode):
        (IPC::ArgumentCoder<EventTrackingRegions>::encode):
        (IPC::ArgumentCoder<TransformationMatrix>::encode):
        (IPC::ArgumentCoder<LinearTimingFunction>::encode):
        (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
        (IPC::ArgumentCoder<StepsTimingFunction>::encode):
        (IPC::ArgumentCoder<SpringTimingFunction>::encode):
        (IPC::ArgumentCoder<FloatPoint>::encode):
        (IPC::ArgumentCoder<FloatPoint3D>::encode):
        (IPC::ArgumentCoder<FloatRect>::encode):
        (IPC::ArgumentCoder<FloatSize>::encode):
        (IPC::ArgumentCoder<FloatRoundedRect>::encode):
        (IPC::ArgumentCoder<FloatQuad>::encode):
        (IPC::ArgumentCoder<ViewportArguments>::encode):
        (IPC::ArgumentCoder<IntPoint>::encode):
        (IPC::ArgumentCoder<IntRect>::encode):
        (IPC::ArgumentCoder<IntSize>::encode):
        (IPC::pathEncodeApplierFunction):
        (IPC::ArgumentCoder<Path>::encode):
        (IPC::ArgumentCoder<RecentSearch>::encode):
        (IPC::ArgumentCoder<Region::Span>::encode):
        (IPC::ArgumentCoder<Region>::encode):
        (IPC::ArgumentCoder<Length>::encode):
        (IPC::ArgumentCoder<ViewportAttributes>::encode):
        (IPC::ArgumentCoder<MimeClassInfo>::encode):
        (IPC::ArgumentCoder<PluginInfo>::encode):
        (IPC::ArgumentCoder<AuthenticationChallenge>::encode):
        (IPC::ArgumentCoder<ProtectionSpace>::encode):
        (IPC::ArgumentCoder<Credential>::encode):
        (IPC::encodeImage):
        (IPC::encodeOptionalImage):
        (IPC::ArgumentCoder<Cursor>::encode):
        (IPC::ArgumentCoder<ResourceRequest>::encode):
        (IPC::ArgumentCoder<ResourceError>::encode):
        (IPC::ArgumentCoder<SelectionRect>::encode):
        (IPC::ArgumentCoder<WindowFeatures>::encode):
        (IPC::ArgumentCoder<Color>::encode):
        (IPC::ArgumentCoder<CompositionUnderline>::encode):
        (IPC::ArgumentCoder<Cookie>::encode):
        (IPC::ArgumentCoder<DatabaseDetails>::encode):
        (IPC::ArgumentCoder<Highlight>::encode):
        (IPC::encodeSharedBuffer):
        (IPC::ArgumentCoder<PasteboardWebContent>::encode):
        (IPC::ArgumentCoder<PasteboardImage>::encode):
        (IPC::ArgumentCoder<DictationAlternative>::encode):
        (IPC::ArgumentCoder<FileChooserSettings>::encode):
        (IPC::ArgumentCoder<GrammarDetail>::encode):
        (IPC::ArgumentCoder<TextCheckingRequestData>::encode):
        (IPC::ArgumentCoder<TextCheckingResult>::encode):
        (IPC::ArgumentCoder<URL>::encode):
        (IPC::ArgumentCoder<UserStyleSheet>::encode):
        (IPC::ArgumentCoder<MediaSessionMetadata>::encode):
        (IPC::ArgumentCoder<UserScript>::encode):
        (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
        (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
        (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
        (IPC::ArgumentCoder<FilterOperation>::encode):
        (IPC::ArgumentCoder<FilterOperations>::encode):
        (IPC::ArgumentCoder<SessionID>::encode):
        (IPC::ArgumentCoder<BlobPart>::encode):
        (IPC::ArgumentCoder<TextIndicatorData>::encode):
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode):
        (IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
        (IPC::ArgumentCoder<ExceptionDetails>::encode):
        (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebEvent.cpp:
        (WebKit::WebEvent::encode):
        * Shared/WebEvent.h:
        * Shared/WebGeolocationPosition.cpp:
        (WebKit::WebGeolocationPosition::Data::encode):
        * Shared/WebGeolocationPosition.h:
        * Shared/WebHitTestResultData.cpp:
        (WebKit::WebHitTestResultData::encode):
        (WebKit::WebHitTestResultData::platformEncode):
        * Shared/WebHitTestResultData.h:
        * Shared/WebKeyboardEvent.cpp:
        (WebKit::WebKeyboardEvent::encode):
        * Shared/WebMouseEvent.cpp:
        (WebKit::WebMouseEvent::encode):
        * Shared/WebNavigationDataStore.h:
        (WebKit::WebNavigationDataStore::encode):
        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        * Shared/WebPageCreationParameters.h:
        * Shared/WebPageGroupData.cpp:
        (WebKit::WebPageGroupData::encode):
        * Shared/WebPageGroupData.h:
        * Shared/WebPlatformTouchPoint.cpp:
        (WebKit::WebPlatformTouchPoint::encode):
        * Shared/WebPopupItem.cpp:
        (WebKit::WebPopupItem::encode):
        * Shared/WebPopupItem.h:
        * Shared/WebPreferencesStore.cpp:
        (WebKit::WebPreferencesStore::Value::encode):
        (WebKit::WebPreferencesStore::encode):
        * Shared/WebPreferencesStore.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        * Shared/WebProcessCreationParameters.h:
        * Shared/WebTouchEvent.cpp:
        (WebKit::WebTouchEvent::encode):
        * Shared/WebUserContentControllerDataTypes.cpp:
        (WebKit::WebUserScriptData::encode):
        (WebKit::WebUserStyleSheetData::encode):
        (WebKit::WebScriptMessageHandlerData::encode):
        * Shared/WebUserContentControllerDataTypes.h:
        * Shared/WebWheelEvent.cpp:
        (WebKit::WebWheelEvent::encode):
        * Shared/WebsiteData/WebsiteData.cpp:
        (WebKit::WebsiteData::Entry::encode):
        (WebKit::WebsiteData::encode):
        * Shared/WebsiteData/WebsiteData.h:
        * Shared/cf/ArgumentCodersCF.cpp:
        (IPC::encode):
        * Shared/cf/ArgumentCodersCF.h:
        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        (WebKit::InteractionInformationAtPosition::encode):
        * Shared/ios/QuickLookDocumentData.cpp:
        (WebKit::QuickLookDocumentData::encode):
        * Shared/ios/QuickLookDocumentData.h:
        * Shared/ios/WebPlatformTouchPointIOS.cpp:
        (WebKit::WebPlatformTouchPoint::encode):
        * Shared/ios/WebTouchEventIOS.cpp:
        (WebKit::WebTouchEvent::encode):
        * Shared/mac/ArgumentCodersMac.h:
        * Shared/mac/ArgumentCodersMac.mm:
        (IPC::encode):
        * Shared/mac/AttributedString.h:
        * Shared/mac/AttributedString.mm:
        (WebKit::AttributedString::encode):
        * Shared/mac/ColorSpaceData.h:
        * Shared/mac/ColorSpaceData.mm:
        (WebKit::ColorSpaceData::encode):
        * Shared/mac/ObjCObjectGraph.h:
        * Shared/mac/ObjCObjectGraph.mm:
        (WebKit::ObjCObjectGraph::encode):
        * Shared/mac/RemoteLayerBackingStore.h:
        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::encode):
        * Shared/mac/RemoteLayerTreeTransaction.h:
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::encode):
        * Shared/mac/SandboxExtensionMac.mm:
        (WebKit::SandboxExtension::Handle::encode):
        (WebKit::SandboxExtension::HandleArray::encode):
        * Shared/mac/SecItemRequestData.cpp:
        (WebKit::SecItemRequestData::encode):
        * Shared/mac/SecItemRequestData.h:
        * Shared/mac/SecItemResponseData.cpp:
        (WebKit::SecItemResponseData::encode):
        * Shared/mac/SecItemResponseData.h:
        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
        (IPC::ArgumentCoder<CertificateInfo>::encode):
        (IPC::encodeNSError):
        (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
        (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
        (IPC::ArgumentCoder<Credential>::encodePlatformData):
        (IPC::ArgumentCoder<MachSendRight>::encode):
        (IPC::ArgumentCoder<KeypressCommand>::encode):
        (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
        (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
        * Shared/mac/WebGestureEvent.cpp:
        (WebKit::WebGestureEvent::encode):
        * Shared/mac/WebGestureEvent.h:
        * Shared/mac/WebHitTestResultData.mm:
        (WebKit::WebHitTestResultData::platformEncode):
        * UIProcess/API/APIHitTestResult.h:
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::sendMessage):
        (WebKit::ChildProcessProxy::dispatchSyncMessage):
        (WebKit::ChildProcessProxy::didFinishLaunching):
        * UIProcess/ChildProcessProxy.h:
        (WebKit::ChildProcessProxy::send):
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Notifications/WebNotification.cpp:
        * UIProcess/Notifications/WebNotification.h:
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/WebFullScreenManagerProxy.h:
        * UIProcess/WebIconDatabase.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::sendMessage):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPasteboardProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::dispatchSyncMessage):
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didReceiveSyncMessage):
        * UIProcess/WebProcessProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
        * WebProcess/Network/NetworkProcessConnection.h:
        * WebProcess/Plugins/Plugin.cpp:
        (WebKit::Plugin::Parameters::encode):
        * WebProcess/Plugins/Plugin.h:
        * WebProcess/Plugins/PluginProcessConnection.cpp:
        (WebKit::PluginProcessConnection::didReceiveSyncMessage):
        * WebProcess/Plugins/PluginProcessConnection.h:
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        * WebProcess/Plugins/PluginProxy.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didReceiveSyncMessage):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode):
        (WebKit::PlatformCAAnimationRemote::Properties::encode):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didReceiveSyncMessage):
        * WebProcess/WebProcess.h:

2016-08-16  Simon Fraser  <simon.fraser@apple.com>

        Rename didLayout(LayoutMilestones) to didReachLayoutMilestone(), and related WK2 functions
        https://bugs.webkit.org/show_bug.cgi?id=160923

        Reviewed by Tim Horton.

        didLayout(LayoutMilestones) -> didReachLayoutMilestone(LayoutMilestones)
        dispatchDidLayout(LayoutMilestones) -> dispatchDidReachLayoutMilestone(LayoutMilestones)

        Avoided changing functions that are exposed as API/SPI.

        * UIProcess/API/APILoaderClient.h:
        (API::LoaderClient::didReachLayoutMilestone):
        (API::LoaderClient::didLayout): Deleted.
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageLoaderClient):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
        (WebKit::WebPageProxy::didReachLayoutMilestone):
        (WebKit::WebPageProxy::didLayout): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::didCommitLayerTree):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (didReachLayoutMilestone):
        (setUpPageLoaderClient):
        (didLayout): Deleted.
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
        (WebKit::InjectedBundlePageLoaderClient::didLayout): Deleted.
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
        (WebKit::WebFrameLoaderClient::dispatchDidLayout): Deleted.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::dispatchDidReachLayoutMilestone):
        (WebKit::DrawingArea::dispatchDidLayout): Deleted.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::dispatchDidReachLayoutMilestone):
        (WebKit::WebPage::dispatchDidLayout): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone):
        (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout): Deleted.

2016-08-18  Daniel Bates  <dabates@apple.com>

        Ld warns of non-existent PrivateFrameworks directory when building WebKit with the public iOS 9.3 SDK
        https://bugs.webkit.org/show_bug.cgi?id=160979

        Rubber-stamped by Simon Fraser.

        Only add the SDK PrivateFrameworks directory to the FRAMEWORK_SEARCH_PATH when building for
        iOS Simulator, building with an iOS SDK that does not support text-based stubs, or building
        an Apple-internal build.

        * Configurations/BaseTarget.xcconfig:

2016-08-18  Hunseop Jeong  <hs85.jeong@samsung.com>

        Unreviewed, Fix CMake build after r204614

        * PlatformMac.cmake:

2016-08-18  Chris Dumez  <cdumez@apple.com>

        [iOS] Network Processes & Database processes do not exit promptly
        https://bugs.webkit.org/show_bug.cgi?id=160978
        <rdar://problem/27914081>

        Reviewed by Anders Carlsson.

        Network Processes & Database processes do not exit promptly. They hang
        for 10 seconds until they log the following message:
        > com.apple.WebKit.Networking: (WebKit) #WK: Exiting process early due to unacknowledged closed-connection

        Then forcefully call exit(0).

        To address the issue, we now call ChildProcess::stopRunLoop() instead
        of RunLoop::current().stop(). stopRunLoop() works as expected on iOS
        after r202723.

        There is no impact on Mac because stopRunLoop() calls
        RunLoop::current().stop().

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::didClose):
        (WebKit::DatabaseProcess::didReceiveInvalidMessage):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::didClose):
        (WebKit::NetworkProcess::didReceiveInvalidMessage):

2016-08-18  Dan Bernstein  <mitz@apple.com>

        [Cocoa] API::Number needs to be wrapped by an NSNumber
        https://bugs.webkit.org/show_bug.cgi?id=160977
        <rdar://problem/27877735>

        Reviewed by Anders Carlsson.

        We introduce a single WKNSNumber class to wrap three distinct API::Number instantiations
        corresponding to the Boolean, UInt64 and Double types.

        Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKNSNumber.mm

        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject): Create a WKNSNumber to contain any of the number types, and set
          its _type ivar accordingly.
        * Shared/Cocoa/WKNSNumber.h: Added.
        (WebKit::wrapper):
        * Shared/Cocoa/WKNSNumber.mm: Added.
        (-[WKNSNumber dealloc]): Call the appropriate destructor.
        (-[WKNSNumber objCType]): Implement this NSValue primitive method.
        (-[WKNSNumber getValue:]): Ditto.
        (-[WKNSNumber boolValue]): Implement this NSNumber method corresponding to one of our
          possible types.
        (-[WKNSNumber doubleValue]): Ditto.
        (-[WKNSNumber unsignedLongLongValue]): Ditto.
        (-[WKNSNumber copyWithZone:]): Implement this NSCopying method by retaining self.
        (-[WKNSNumber _apiObject]): Implement this WKObject method by returning the appropriate
          API object.

        * WebKit2.xcodeproj/project.pbxproj: Added references to new files.

2016-08-18  Andy Estes  <aestes@apple.com>

        [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
        https://bugs.webkit.org/show_bug.cgi?id=160964

        Reviewed by Anders Carlsson.

        Followed the guidelines for SPI naming.

        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _isCookieStoragePartitioningEnabled]): Renamed from -cookieStoragePartitioningEnabled.
        (-[WKProcessPool _setCookieStoragePartitioningEnabled:]): Renamed from -setCookieStoragePartitioningEnabled:.
        (-[WKProcessPool cookieStoragePartitioningEnabled]): Renamed to -_isCookieStoragePartitioningEnabled.
        (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Renamed to -_setCookieStoragePartitioningEnabled:.
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

2016-08-18  Andy Estes  <aestes@apple.com>

        Generated messages headers should use #pragma once
        https://bugs.webkit.org/show_bug.cgi?id=160965

        Reviewed by Anders Carlsson.

        * Scripts/webkit/messages.py:
        (generate_messages_header): Used #pragma once instead of a header guard.

2016-08-18  Andy Estes  <aestes@apple.com>

        [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
        https://bugs.webkit.org/show_bug.cgi?id=160964

        Reviewed by Brent Fulgham.

        * NetworkProcess/NetworkProcess.h: Declared setCookieStoragePartitioningEnabled().
        * NetworkProcess/NetworkProcess.messages.in: Added message SetCookieStoragePartitioningEnabled.
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode): Encoded cookieStoragePartitioningEnabled.
        (WebKit::NetworkProcessCreationParameters::decode): Decoded cookieStoragePartitioningEnabled.
        * NetworkProcess/NetworkProcessCreationParameters.h: Declared cookieStoragePartitioningEnabled.
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        Called NetworkStorageSession::setCookieStoragePartitioningEnabled() given the cookieStoragePartitioningEnabled parameter.
        (WebKit::NetworkProcess::setCookieStoragePartitioningEnabled):
        Called NetworkStorageSession::setCookieStoragePartitioningEnabled().
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool cookieStoragePartitioningEnabled]): Returned WebProcessPool::cookieStoragePartitioningEnabled().
        (-[WKProcessPool setCookieStoragePartitioningEnabled:]): Called WebProcessPool::setCookieStoragePartitioningEnabled().
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared cookieStoragePartitioningEnabled as a property.
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        Set the cookieStoragePartitioningEnabled parameter from m_cookieStoragePartitioningEnabled.
        (WebKit::WebProcessPool::setCookieStoragePartitioningEnabled):
        Set m_cookieStoragePartitioningEnabled and sent the NetworkProcess::SetCookieStoragePartitioningEnabled message.
        * UIProcess/WebProcessPool.h: Declared cookieStoragePartitioningEnabled.

2016-08-17  Anders Carlsson  <andersca@apple.com>

        Add support for additional networks
        https://bugs.webkit.org/show_bug.cgi?id=160951
        rdar://problem/27807479

        Reviewed by Sam Weinig.

        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        (IPC::ArgumentCoder<PaymentRequest>::decode):
        (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::encode): Deleted.
        (IPC::ArgumentCoder<PaymentRequest::SupportedNetworks>::decode): Deleted.
        * Shared/WebCoreArgumentCoders.h:
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (WebKit::toAdditionalSupportedNetwork):
        (WebKit::toSupportedNetwork):
        (WebKit::toSupportedNetworks):
        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
        (WebKit::WebPaymentCoordinator::supportsVersion):

2016-08-17  Anders Carlsson  <andersca@apple.com>

        Remove a couple of unused WKSI function pointers
        https://bugs.webkit.org/show_bug.cgi?id=160946

        Reviewed by Dan Bernstein.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Deleted.

2016-08-17  Dan Bernstein  <mitz@apple.com>

        [Cocoa] -[NSString isEqualToString:] returns NO for any WKNSString argument
        https://bugs.webkit.org/show_bug.cgi?id=160938
        <rdar://problem/27876652>

        Reviewed by Anders Carlsson.

        -[NSString isEqualToString:] calls an internal NSObject method on its argument, which
        NSString subclasses override to return YES, but WKObject does not override and does not
        forward to its target NSString.

        To fix this issue and other similar issues, we make WKObject a root class instead of an
        NSObject subclass.

        Test: TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm

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

        * Shared/Cocoa/WKObject.h: Make WKObject a root class instead of inhereting from NSObject.

        * Shared/Cocoa/WKObject.mm:
        (+[WKObject class]): Return self.
        (-[WKObject allowsWeakReference]): Added. Called by the Objective-C runtime.
        (-[WKObject retainWeakReference]): Ditto.
        (-[WKObject hash]): If we don’t have a target, return our address.
        (-[WKObject superclass]): Implement this NSObject protocol method.
        (-[WKObject class]): Ditto.
        (-[WKObject self]): Ditto.
        (-[WKObject performSelector:]): Ditto.
        (-[WKObject performSelector:withObject:]): Ditto.
        (-[WKObject performSelector:withObject:withObject:]): Ditto.
        (-[WKObject isProxy]): Ditto.
        (-[WKObject respondsToSelector:]): Changed to not call super.
        (-[WKObject conformsToProtocol:]): Ditto.
        (-[WKObject description]): Ditto.
        (-[WKObject retain]): Implement this NSObject protocol method.
        (-[WKObject release]): Ditto.
        (-[WKObject autorelease]): Ditto.
        (-[WKObject retainCount]): Ditto.
        (-[WKObject zone]): Ditto.
        (-[WKObject dealloc]): Deleted.
        (-[WKObject classForCoder]): Deleted.
        (-[WKObject classForKeyedArchiver]): Deleted.
        (-[WKObject _cfTypeID]): Deleted.

        * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.

2016-08-17  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] Fix test_ewk2_view after r203612 
        https://bugs.webkit.org/show_bug.cgi?id=160937

        Reviewed by Gyuyoung Kim.

        Default parameter values for window.alert() / prompt() / confirm() was
        changed from "undefined" to the empty string after r203612.

        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):

2016-08-16  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Don't throw touchMove events on the floor
        https://bugs.webkit.org/show_bug.cgi?id=160935

        Reviewed by Tim Horton.
        
        EventDispatcher claimed to coalesce touchMove events, but actually threw away any
        touchMove if there was one in the queue when the next non-move event came along.
        
        Fix to strictly coalesce touchMove events, so a start/move/end stream always fires
        a move event. This is necessary for move-based interaction to work in testing,
        for example the added range slider test.
        
        Test: fast/forms/ios/drag-range-thumb.html

        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::touchEvent):

2016-08-16  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Clean up form select code
        https://bugs.webkit.org/show_bug.cgi?id=160915

        Reviewed by Enrica Casucci.
        
        Some minor forms-related cleanup:
        1. Give WKFormSelectPopover and WKFormSelectPicker their own header files, making
        things easier to find.
        
        2. Remove WKContentView *_view member variables from classes which also stored
        the view in their base classes.
        
        Sort the project file.

        * UIProcess/ios/forms/WKFormPopover.h:
        * UIProcess/ios/forms/WKFormPopover.mm:
        (-[WKFormRotatingAccessoryPopover accessoryDone]):
        (-[WKFormRotatingAccessoryPopover initWithView:]): Deleted.
        * UIProcess/ios/forms/WKFormSelectControl.h:
        * UIProcess/ios/forms/WKFormSelectControl.mm:
        * UIProcess/ios/forms/WKFormSelectPicker.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
        * UIProcess/ios/forms/WKFormSelectPicker.mm:
        * UIProcess/ios/forms/WKFormSelectPopover.h: Copied from Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h.
        * UIProcess/ios/forms/WKFormSelectPopover.mm:
        (-[WKSelectPopover initWithView:hasGroups:]):
        * WebKit2.xcodeproj/project.pbxproj:

2016-08-16  Daniel Bates  <dabates@apple.com>

        WKSI static library should be named by major iOS revision, not individual updates
        https://bugs.webkit.org/show_bug.cgi?id=160727
        <rdar://problem/22274848>

        Reviewed by Alexey Proskuryakov.

        * Configurations/Base.xcconfig:
        * Configurations/BaseTarget.xcconfig:
        * Configurations/DebugRelease.xcconfig:

2016-08-16  Simon Fraser  <simon.fraser@apple.com>

        Make it possible to test iOS select elements, and add iPhone and iPad tests for them
        https://bugs.webkit.org/show_bug.cgi?id=160909

        Reviewed by Enrica Casucci.
        
        Hook up form-related UIScriptController functions, and plumb through the various
        <select> pickers the ability to select a row.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView dismissFormAccessoryView]):
        (-[WKWebView selectFormAccessoryPickerRow:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView selectFormAccessoryPickerRow:]):
        * UIProcess/ios/forms/WKFormSelectControl.h:
        * UIProcess/ios/forms/WKFormSelectControl.mm:
        (-[WKFormSelectControl selectRow:inComponent:extendingSelection:]):
        * UIProcess/ios/forms/WKFormSelectPicker.mm:
        (-[WKMultipleSelectPicker selectRow:inComponent:extendingSelection:]):
        (-[WKSelectSinglePicker selectRow:inComponent:extendingSelection:]):
        * UIProcess/ios/forms/WKFormSelectPopover.mm:
        (-[WKSelectPopover selectRow:inComponent:extendingSelection:]):

2016-08-16  Brady Eidson  <beidson@apple.com>

        Cleanup WK2 platform gamepad handling.
        https://bugs.webkit.org/show_bug.cgi?id=160871

        Reviewed by Alex Christensen.

        This patch does a few things:
        1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
        2 - Uses this new concept to much more cleanly handle the case where we are not currently
            monitoring gamepad inputs because an interested WKWebView is not front and center.
        3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
        
        * Platform/Logging.h:
        
        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
        (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::viewBecameActive):
        (WebKit::UIGamepadProvider::viewBecameInactive):
        (WebKit::UIGamepadProvider::stopMonitoringGamepads):
        (WebKit::UIGamepadProvider::snapshotGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):
        (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
        (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
        (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
        * UIProcess/Gamepad/UIGamepadProvider.h:
        
        * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setInitialConnectedGamepads):
        * UIProcess/WebProcessPool.h:
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp:
        (WebKit::WebGamepadProvider::setInitialGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h:
        
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::setInitialGamepads):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-08-15  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Add iPad viewport and form tests, and revert the iPad-testing part of r202132
        https://bugs.webkit.org/show_bug.cgi?id=160878

        Reviewed by Tim Horton.

        Remove testing-specific "forceIPadStyleZoomOnInputFocus" behavior added in r202132
        now that we have the ability to run tests in the iPad simulator.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView forceIPadStyleZoomOnInputFocus]): Deleted.
        (-[WKWebView setForceIPadStyleZoomOnInputFocus:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _displayFormNodeInputView]):
        (-[WKContentView requiresAccessoryView]):
        (-[WKContentView inputAccessoryView]):
        (-[WKContentView requiresAccessoryView:]): Deleted.
        (-[WKContentView forceIPadStyleZoomOnInputFocus]): Deleted.
        (-[WKContentView setForceIPadStyleZoomOnInputFocus:]): Deleted.

2016-08-16  Alex Christensen  <achristensen@webkit.org>

        Clean up WebSockets
        https://bugs.webkit.org/show_bug.cgi?id=160889

        Reviewed by Darin Adler.

        * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
        (WebKit::WebSocketServerConnection::didCloseSocketStream):
        (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
        * UIProcess/InspectorServer/WebSocketServerConnection.h:

2016-08-16  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r204506.

        Broke the build

        Reverted changeset:

        "Cleanup WK2 platform gamepad handling."
        https://bugs.webkit.org/show_bug.cgi?id=160871
        http://trac.webkit.org/changeset/204506

2016-08-16  Darin Adler  <darin@apple.com>

        [Cocoa] Remove dependency on Objective-C bindings in WebKit2 editing code
        https://bugs.webkit.org/show_bug.cgi?id=160891

        Reviewed by Anders Carlsson.

        * WebProcess/WebCoreSupport/WebEditorClient.h: Removed documentFragmentFromAttributedString.
        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
        (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::createExcludedElementsForAttributedStringConversion): Deleted.
        (WebKit::WebEditorClient::documentFragmentFromAttributedString): Deleted.

2016-08-16  Brady Eidson  <beidson@apple.com>

        Cleanup WK2 platform gamepad handling.
        https://bugs.webkit.org/show_bug.cgi?id=160871

        Reviewed by Alex Christensen.

        This patch does a few things:
        1 - Separates the concepts of "monitoring gamepads" and "monitoring gamepad inputs"
        2 - Uses this new concept to much more cleanly handle the case where we are not currently
            monitoring gamepad inputs because an interested WKWebView is not front and center.
        3 - Pre-populates the "initial set of gamepads" in WebProcesses that start listening for gamepads.
        
        * Platform/Logging.h:
        
        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
        (WebKit::UIGamepadProvider::setInitialConnectedGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::viewBecameActive):
        (WebKit::UIGamepadProvider::viewBecameInactive):
        (WebKit::UIGamepadProvider::stopMonitoringGamepads):
        (WebKit::UIGamepadProvider::snapshotGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):
        (WebKit::UIGamepadProvider::UIGamepadProvider): Deleted.
        (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring): Deleted.
        (WebKit::UIGamepadProvider::disableMonitoringTimerFired): Deleted.
        * UIProcess/Gamepad/UIGamepadProvider.h:
        
        * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
        (WebKit::UIGamepadProvider::platformStopMonitoringInput):
        (WebKit::UIGamepadProvider::platformStartMonitoringInput):
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setInitialConnectedGamepads):
        * UIProcess/WebProcessPool.h:
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp:
        (WebKit::WebGamepadProvider::setInitialGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h:
        
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::setInitialGamepads):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-08-15  Alex Christensen  <achristensen@webkit.org>

        Rename SocketStreamHandleBase to SocketStreamHandle and SocketStreamHandle to SocketStreamHandleImpl
        https://bugs.webkit.org/show_bug.cgi?id=160858

        Reviewed by Brady Eidson.

        * WebProcess/Network/WebSocketProvider.cpp:
        (WebKit::WebSocketProvider::createSocketStreamHandle):

2016-08-15  Anders Carlsson  <andersca@apple.com>

        Fix iOS build.

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

2016-08-15  Keith Rollin  <krollin@apple.com>

        Rename LOG_ALWAYS
        https://bugs.webkit.org/show_bug.cgi?id=160768

        Rename LOG_ALWAYS and friends, given that the first parameter to it is
        a boolean expression that determines whether or not logging should be
        performed.

        Reviewed by Chris Dumez.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::didReceiveResponse):
        (WebKit::Download::didReceiveData):
        (WebKit::Download::didFinish):
        (WebKit::Download::didFail):
        (WebKit::Download::didCancel):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::prepareToSuspend):
        (WebKit::NetworkProcess::cancelPrepareToSuspend):
        (WebKit::NetworkProcess::processDidResume):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForSyncReply):
        * Shared/ChildProcess.cpp:
        (WebKit::didCloseOnConnectionWorkQueue):
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::didChangeIsLoading):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::updateAssertionNow):
        (WebKit::ProcessThrottler::updateAssertion):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::updateActivityToken):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::fetchWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::WebProcessProxy::didSetAssertionState):
        (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
        (WebKit::ProcessAssertion::ProcessAssertion):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):
        (WebKit::WebResourceLoader::didReceiveResponse):
        (WebKit::WebResourceLoader::didReceiveData):
        (WebKit::WebResourceLoader::didFinishResourceLoad):
        (WebKit::WebResourceLoader::didFailResourceLoad):
        (WebKit::WebResourceLoader::didReceiveResource):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::layerVolatilityTimerFired):
        (WebKit::WebPage::markLayersVolatile):
        (WebKit::WebPage::cancelMarkLayersVolatile):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::actualPrepareToSuspend):
        (WebKit::WebProcess::processWillSuspendImminently):
        (WebKit::WebProcess::prepareToSuspend):
        (WebKit::WebProcess::cancelPrepareToSuspend):
        (WebKit::WebProcess::markAllLayersVolatile):
        (WebKit::WebProcess::processDidResume):

2016-08-15  Daniel Bates  <dabates@apple.com>

        Cannot build WebKit for iOS device using Xcode 7.3/iOS 9.3 public SDK due to missing
        private frameworks and libraries
        https://bugs.webkit.org/show_bug.cgi?id=155931
        <rdar://problem/25807989>

        Reviewed by Dan Bernstein.

        Add directory WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/X to the framework search path
        where X is the major version of the active iOS SDK.

        * Configurations/BaseTarget.xcconfig:

2016-08-15  Simon Fraser  <simon.fraser@apple.com>

        Add a setting and preferences to enable visual viewport mode
        https://bugs.webkit.org/show_bug.cgi?id=160843

        Reviewed by Sam Weinig.
        
        Hook up the visualViewportEnabled setting for WebKit2.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _visualViewportEnabled]):
        (-[WKPreferences _setVisualViewportEnabled:]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-08-15  Joseph Pecoraro  <pecoraro@apple.com>

        Remove unused includes of wtf headers
        https://bugs.webkit.org/show_bug.cgi?id=160839

        Reviewed by Alex Christensen.

        * Lots of files.

2016-08-12  Anders Carlsson  <andersca@apple.com>

        Move the plug-in and WebGL blacklist code to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=160831

        Reviewed by Sam Weinig.

        Adopt the plug-in and WebGL blacklist code from WebCore instead of using the code from WebKitSystemInterface.

        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
        (WebKit::getPlatformPluginModuleInformation):
        * Shared/Plugins/PluginModuleInfo.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextIsPlugInUpdateAvailable):
        (WKContextShouldBlockWebGL):
        (WKContextShouldSuggestBlockWebGL):
        * UIProcess/Plugins/PluginInfoStore.h:
        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        (WebKit::shouldBlockPlugin):
        (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
        (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin):

2016-08-10  Brent Fulgham  <bfulgham@apple.com>

        Add Sandbox profile for Enterprise support version of Flash Player
        https://bugs.webkit.org/show_bug.cgi?id=160753
        <rdar://problem/17614483>

        Reviewed by Andy Estes.

        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Added.
        * WebKit2.xcodeproj/project.pbxproj: Add reference to new sandbox profile.

2016-08-14  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Remove deprecated _WKFormDelegate
        https://bugs.webkit.org/show_bug.cgi?id=160848

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/WebKitPrivate.h: Removed #import.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _formDelegate]): Moved into WKBinaryCompatibilityIOS10 cateogry implementation,
          chaged type to id <_WKInputDelegate>.
        (-[WKWebView _setFormDelegate:]): Ditto.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed property declaration.
        * UIProcess/API/Cocoa/_WKFormDelegate.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj: Removed reference to header.
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Fixed comment.

2016-08-14  Daniel Bates  <dabates@apple.com>

        Fix compiler errors when building iOS WebKit using the iOS 10 beta SDK
        https://bugs.webkit.org/show_bug.cgi?id=160725

        Reviewed by Sam Weinig.

        * Platform/spi/ios/UIKitSPI.h: Add SPI for UITextInputSuggestionDelegate.
        * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Remove unnecessary include of PKPaymentMerchantSession.h.

2016-08-14  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Remove deprecated _WKVisitedLinkProvider declarations that aren’t needed
        https://bugs.webkit.org/show_bug.cgi?id=160846

        Reviewed by Darin Adler.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _visitedLinkProvider]): Moved into WKBinaryCompatibilityIOS10
          cateogry implementation, changed type to _WKVisitedLinkStore.
        (-[WKWebViewConfiguration _setVisitedLinkProvider:]): Ditto.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Removed property declaration.

        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Removed.
        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Moved declaration in here.

        * WebKit2.xcodeproj/project.pbxproj: Updated for header removal.

2016-08-12  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Instances of WKObject subclasses don’t work correctly with CFGetTypeID()
        https://bugs.webkit.org/show_bug.cgi?id=160820
        <rdar://problem/27825875>

        Reviewed by Anders Carlsson.

        * Shared/Cocoa/WKObject.mm:
        (-[WKObject _cfTypeID]): Override this internal method and forward to the target object.

2016-08-12  Johan K. Jensen  <johan_jensen@apple.com>

        Rename DocumentLoadTiming and ResourceLoadTiming
        https://bugs.webkit.org/show_bug.cgi?id=160821

        Reviewed by Alex Christensen.

        Rename ResourceLoadTiming to NetworkLoadTiming.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

2016-08-12  Anders Carlsson  <andersca@apple.com>

        message loading never finishes in Mail
        https://bugs.webkit.org/show_bug.cgi?id=160806
        rdar://problem/27624095

        Reviewed by Dan Bernstein.

        Add more checks for when a process goes away before we've established a proper connection to it.

        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::receiveSourceEventHandler):
        Handle the MACH_NOTIFY_NO_SENDERS and MACH_NOTIFY_SEND_ONCE messages here. Also, once we receive a send
        right from the other side, stop listening for the MACH_NOTIFY_NO_SENDERS notification.

        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::didFinishLaunching):
        Null check the connection identifier.

        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::ProcessLauncher):
        (WebKit::processLauncherWorkQueue): Deleted.
        Get rid of the process launcher queue - we're not doing any blocking work here.

        * UIProcess/Launcher/ProcessLauncher.h:
        Add a weak factory.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::systemDirectoryPath):
        Move this before launchProcess().

        (WebKit::ProcessLauncher::launchProcess):
        Merge createService and connectToService into launchProcess. Also make the following changes:
        - Use mach_port_request_notification to get a notification for when our receive right loses all its senders.
        This lets us listen for the other process going away before we have a send right for it.
        - Use xpc_connection_set_event_handler to listen for errors, so we can detect the process going away before
        we've sent a message to it.
        
        (WebKit::connectToService): Deleted.
        (WebKit::createService): Deleted.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didFinishLaunching):
        If we failed to launch, call networkProcessCrashedOrFailedToLaunch so we'll unblock any waiting web processes.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didFinishLaunching):
        Null check the connection and XPC connection before trying to get its pid.

2016-08-11  Brady Eidson  <beidson@apple.com>

        [WK2] Don't monitor gamepads at all unless an interested WebPageProxy is in the active window.
        https://bugs.webkit.org/show_bug.cgi?id=160760

        Reviewed by Tim Horton.
        
        This patch makes it such that the UIProcess will only listen to the platform gamepad mechanism
        if a WebPageProxy that is interested in gamepads is in the active window.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::windowDidBecomeKey):
        (WebKit::WebViewImpl::windowDidResignKey):

        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::UIGamepadProvider):
        (WebKit::UIGamepadProvider::gamepadSyncTimerFired):
        (WebKit::UIGamepadProvider::scheduleGamepadStateSync):
        (WebKit::UIGamepadProvider::platformGamepadConnected):
        (WebKit::UIGamepadProvider::platformGamepadDisconnected):
        (WebKit::UIGamepadProvider::platformGamepadInputActivity):
        (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::viewBecameActive):
        (WebKit::UIGamepadProvider::viewBecameInactive):
        (WebKit::UIGamepadProvider::scheduleDisableGamepadMonitoring):
        (WebKit::UIGamepadProvider::disableMonitoringTimerFired):
        (WebKit::UIGamepadProvider::startMonitoringGamepads):
        (WebKit::UIGamepadProvider::stopMonitoringGamepads):
        (WebKit::UIGamepadProvider::updateTimerFired): Deleted.
        (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState): Deleted.
        * UIProcess/Gamepad/UIGamepadProvider.h:

2016-08-11  Brady Eidson  <beidson@apple.com>

        Make Gamepads be a WK2 ExperimentalFeature.
        https://bugs.webkit.org/show_bug.cgi?id=160788

        Reviewed by Alex Christensen.

        * Shared/WebPreferencesDefinitions.h:

2016-08-11  Alex Christensen  <achristensen@webkit.org>

        Don't use a NetworkingContext when creating SocketStreamHandles
        https://bugs.webkit.org/show_bug.cgi?id=160732

        Reviewed by Brady Eidson.

        * WebProcess/Network/WebSocketProvider.cpp:
        (WebKit::WebSocketProvider::createSocketStreamHandle):
        * WebProcess/Network/WebSocketProvider.h:

2016-08-11  Alex Christensen  <achristensen@webkit.org>

        Use StringBuilder::appendLiteral when possible don't append result of makeString
        https://bugs.webkit.org/show_bug.cgi?id=160772

        Reviewed by Sam Weinig.

        * Shared/Gamepad/GamepadData.cpp:
        (WebKit::GamepadData::isNull):
        (WebKit::GamepadData::loggingString):
        * Shared/Gamepad/GamepadData.h:
        * UIProcess/WebProcessPool.h:

2016-08-10  Alex Christensen  <achristensen@webkit.org>

        Fix crash when changing cookie accept policy after r204327
        https://bugs.webkit.org/show_bug.cgi?id=160758

        Reviewed by Simon Fraser.

        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):

2016-08-10  Simon Fraser  <simon.fraser@apple.com>

        Sort the feature flags in the FEATURE_DEFINES lines
        https://bugs.webkit.org/show_bug.cgi?id=160742

        Reviewed by Anders Carlsson.

        * Configurations/FeatureDefines.xcconfig:

2016-08-09  Alex Christensen  <achristensen@webkit.org>

        Move NetworkStorageSession management to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=160173

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::storageSession):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::NetworkProcess::deleteWebsiteData):
        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSession::sessionID):
        NetworkSessions no longer own NetworkStorageSessions, but they should still have the same lifetime.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
        (WebKit::NetworkSession::create):
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        (WebKit::NetworkSession::networkStorageSession):
        (WebKit::NetworkSession::clearCredentials):
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::storageSession):
        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
        * Shared/SessionTracker.cpp:
        (WebKit::SessionTracker::networkSession):
        (WebKit::SessionTracker::setSession):
        (WebKit::SessionTracker::destroySession):
        (WebKit::SessionTracker::storageSession): Deleted.
        (WebKit::staticStorageSessionMap): Deleted.
        (WebKit::SessionTracker::sessionID): Deleted.
        (WebKit::SessionTracker::forEachNetworkStorageSession): Deleted.
        * Shared/SessionTracker.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::cookiesForDOM):
        (WebKit::WebPlatformStrategies::setCookiesFromDOM):
        (WebKit::WebPlatformStrategies::cookiesEnabled):
        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
        (WebKit::WebPlatformStrategies::getRawCookies):
        (WebKit::WebPlatformStrategies::deleteCookie):
        (WebKit::WebPlatformStrategies::addCookie):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        (WebKit::WebFrameNetworkingContext::storageSession):
        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        * WebProcess/WebProcess.cpp:

2016-08-09  Anders Carlsson  <andersca@apple.com>

        Fix iOS build.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setPluginLoadClientPolicy): Deleted.
        (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.

2016-08-09  Anders Carlsson  <andersca@apple.com>

        Instantiate WebKit plug-ins at layout time, instead of at style resolution time
        https://bugs.webkit.org/show_bug.cgi?id=160715

        Reviewed by Tim Horton.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::objectContentType):

2016-08-09  Brady Eidson  <beidson@apple.com>

        [WK2] Only send gamepad input events to the currently focused page.
        https://bugs.webkit.org/show_bug.cgi?id=160699

        Reviewed by Tim Horton.
        
        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::updateTimerFired):
        (WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput):
        * UIProcess/Gamepad/UIGamepadProvider.h:
        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKViewInternal.h.
        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
        
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::gamepadActivity):
        * UIProcess/WebPageProxy.h:
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::gamepadActivity): Deleted.
        * UIProcess/WebProcessPool.h:
        
        * WebKit2.xcodeproj/project.pbxproj:
        
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::gamepadActivity):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::gamepadActivity): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-08-09  Anders Carlsson  <andersca@apple.com>

        Remove code that would tell clients whenever the list of installed plug-ins changes
        https://bugs.webkit.org/show_bug.cgi?id=160719

        Reviewed by Tim Horton.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::PluginInfoStore): Deleted.
        (WebKit::PluginInfoStore::loadPluginsIfNecessary): Deleted.
        * UIProcess/Plugins/PluginInfoStore.h:
        (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Deleted.
        (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Deleted.
        (WebKit::PluginInfoStore::setClient): Deleted.
        (WebKit::PluginInfoStore::client): Deleted.
        * UIProcess/WebContextClient.cpp:
        (WebKit::WebContextClient::plugInInformationBecameAvailable): Deleted.
        * UIProcess/WebContextClient.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingTimer): Deleted.
        (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins): Deleted.
        * UIProcess/WebProcessPool.h:

2016-08-09  George Ruan  <gruan@apple.com>

        Implement functionality of media capture on iOS
        https://bugs.webkit.org/show_bug.cgi?id=158945
        <rdar://problem/26893343>

        Reviewed by Tim Horton.

        For a input type file element on iOS, the media capture attribute can
        now be used to specify which camera to pull up immediately, as opposed
        to having to select the camera from a file picker menu. If the
        specified capture type camera device is unavailable, the other
        built-in camera will be pulled up instead. If no camera is available,
        then the file picker menu will be presented to the user.

        * Configurations/FeatureDefines.xcconfig: Enable Media Capture feature
        on iOS.
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<FileChooserSettings>::encode): Encode enum
        MediaCaptureType.
        (IPC::ArgumentCoder<FileChooserSettings>::decode): Decode enum
        MediaCaptureType.
        * UIProcess/API/APIOpenPanelParameters.cpp:
        (API::OpenPanelParameters::mediaCaptureType):
        (API::OpenPanelParameters::capture): Deleted.
        * UIProcess/API/APIOpenPanelParameters.h: Capture attribute is now
        represented with MediaCaptureType instead of boolean.
        * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
        (WKOpenPanelParametersGetMediaCaptureType): Change function name to
        better represent function.
        (WKOpenPanelParametersGetCaptureEnabled): Deleted.
        * UIProcess/API/C/WKOpenPanelParametersRef.h:
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (cameraDeviceForMediaCaptureType): Translate MediaCaptureType to media
        device.
        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
        Immediately pull up media capture device if devices are available and
        capture attribute is present.
        (-[WKFileUploadPanel _showDocumentPickerMenu]): Only show option to
        use media capture device if it is available for the source type.
        (-[WKFileUploadPanel _adjustMediaCaptureType]): Determines correct
        fallback option for the media capture device.
        (-[WKFileUploadPanel _shouldMediaCaptureOpenMediaDevice]): Checks if
        the media capture device should be immediately pulled up.
        (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]): Specified the
        media capture device to use.

2016-08-09  Brady Eidson  <beidson@apple.com>

        Implement "dumb" WK2 support for gamepads.
        https://bugs.webkit.org/show_bug.cgi?id=160700

        Reviewed by Alex Christensen.
        
        With this patch, gamepads work in WK2.

        Things known to be missing to make this mechanism more "smart":
          - Refresh values along with display sync instead of on a 60hz timer (bug 160673)
          - Only send updated values to the current focused web page (bug 160699)

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:
        
        * Shared/Gamepad/GamepadData.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
        (WebKit::GamepadData::encode):
        (WebKit::GamepadData::decode):
        (WebKit::GamepadData::isNull):
        (WebKit::GamepadData::loggingString):
        * Shared/Gamepad/GamepadData.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
        
        * UIProcess/Gamepad/UIGamepad.cpp: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
        (WebKit::UIGamepad::UIGamepad):
        (WebKit::UIGamepad::updateFromPlatformGamepad):
        (WebKit::UIGamepad::gamepadData):
        * UIProcess/Gamepad/UIGamepad.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepad.h.
        (WebKit::UIGamepad::index):
        
        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::UIGamepadProvider):
        (WebKit::UIGamepadProvider::updateTimerFired):
        (WebKit::UIGamepadProvider::startOrStopSynchingGamepadState):
        (WebKit::UIGamepadProvider::platformGamepadConnected):
        (WebKit::UIGamepadProvider::platformGamepadDisconnected):
        (WebKit::UIGamepadProvider::platformGamepadInputActivity):
        (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::platformGamepads):
        * UIProcess/Gamepad/UIGamepadProvider.h:
        * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
        (WebKit::UIGamepadProvider::platformGamepads):
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::gamepadConnected):
        (WebKit::WebProcessPool::gamepadDisconnected):
        (WebKit::WebProcessPool::gamepadActivity):
        * UIProcess/WebProcessPool.h:
        
        * WebProcess/Gamepad/WebGamepad.cpp:
        (WebKit::WebGamepad::WebGamepad):
        (WebKit::WebGamepad::axisValues):
        (WebKit::WebGamepad::buttonValues):
        (WebKit::WebGamepad::updateValues):
        * WebProcess/Gamepad/WebGamepad.h:
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp:
        (WebKit::WebGamepadProvider::gamepadConnected):
        (WebKit::WebGamepadProvider::gamepadDisconnected):
        (WebKit::WebGamepadProvider::gamepadActivity):
        (WebKit::WebGamepadProvider::platformGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h:
        
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::gamepadConnected):
        (WebKit::WebProcess::gamepadDisconnected):
        (WebKit::WebProcess::gamepadActivity):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-08-09  Anders Carlsson  <andersca@apple.com>

        Get rid of PluginStrategy
        https://bugs.webkit.org/show_bug.cgi?id=160696

        Reviewed by Dan Bernstein.

        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
        (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy): Deleted.
        * NetworkProcess/NetworkProcessPlatformStrategies.h:
        * WebProcess/Plugins/WebPluginInfoProvider.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createPluginStrategy): Deleted.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2016-08-09  Dan Bernstein  <mitz@apple.com>

        Add WKPage SPI for looking up a WKFrame given a WKFrameHandle
        https://bugs.webkit.org/show_bug.cgi?id=160695

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageLookUpFrameFromHandle): Added. Gets the frame from the map in the page’s process and
          returns it if it belongs to the page.
        * UIProcess/API/C/WKPagePrivate.h:

2016-08-08  Anders Carlsson  <andersca@apple.com>

        Move plug-in code from WebPlatformStrategies to WebPluginInfoProvider
        https://bugs.webkit.org/show_bug.cgi?id=160679

        Reviewed by Alex Christensen.

        * WebProcess/Plugins/WebPluginInfoProvider.cpp:
        (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
        (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
        (WebKit::WebPluginInfoProvider::refreshPlugins):
        (WebKit::WebPluginInfoProvider::getPluginInfo):
        (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
        (WebKit::WebPluginInfoProvider::populatePluginCache):
        (WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
        (WebKit::WebPluginInfoProvider::longestMatchedWildcardHostForHost):
        (WebKit::WebPluginInfoProvider::replaceHostWithMatchedWildcardHost):
        * WebProcess/Plugins/WebPluginInfoProvider.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createPluginStrategy):
        (WebKit::WebPlatformStrategies::WebPlatformStrategies): Deleted.
        (WebKit::WebPlatformStrategies::refreshPlugins): Deleted.
        (WebKit::WebPlatformStrategies::getPluginInfo): Deleted.
        (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo): Deleted.
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy): Deleted.
        (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
        (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost): Deleted.
        (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost): Deleted.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
        (WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::setPluginLoadClientPolicy):
        (WebKit::WebProcess::clearPluginClientPolicies):

2016-08-08  Anders Carlsson  <andersca@apple.com>

        Add a new PluginInfoProvider class, to replace PluginStrategy
        https://bugs.webkit.org/show_bug.cgi?id=160670

        Reviewed by Sam Weinig.

        Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Plugins/WebPluginInfoProvider.cpp: Added.
        (WebKit::WebPluginInfoProvider::singleton):
        (WebKit::WebPluginInfoProvider::WebPluginInfoProvider):
        (WebKit::WebPluginInfoProvider::~WebPluginInfoProvider):
        (WebKit::WebPluginInfoProvider::refreshPlugins):
        (WebKit::WebPluginInfoProvider::getPluginInfo):
        (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
        (WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
        (WebKit::WebPluginInfoProvider::clearPluginClientPolicies):
        * WebProcess/Plugins/WebPluginInfoProvider.h: Added.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_userInterfaceLayoutDirection):

2016-08-08  Brady Eidson  <beidson@apple.com>

        Addressing late review feedback in bug 160605
        https://bugs.webkit.org/show_bug.cgi?id=160605

        Reviewed by Darin's suggestions.

        * UIProcess/Gamepad/UIGamepadProvider.cpp:
        (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        * UIProcess/Gamepad/UIGamepadProvider.h:
        
        * UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
        
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::disconnectProcess):
        (WebKit::WebProcessPool::startedUsingGamepads):
        (WebKit::WebProcessPool::stoppedUsingGamepads):
        (WebKit::WebProcessPool::processStoppedUsingGamepads):
        * UIProcess/WebProcessPool.h:
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp:
        (WebKit::WebGamepadProvider::startMonitoringGamepads):
        (WebKit::WebGamepadProvider::stopMonitoringGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h:

2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Bad performance in accelerated compositing mode with the modesetting intel driver and DRI3 enabled
        https://bugs.webkit.org/show_bug.cgi?id=160491

        Reviewed by Michael Catanzaro.

        This is becoming the default in several linux distributions and it makes WebKitGTK+ unusable in accelerated
        compositing mode, which is now always enabled because since we switched to use the threaded compositor. The
        problem seems to be an optimization of the intel driver for windows that are offscreen, and our redirected
        window is always positioned at ScreenWidth + 1, 0. Using negative coordinates to position the redirected window
        offscreen fixes the problem.
        See also https://bugs.freedesktop.org/show_bug.cgi?id=85064.

        * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Position the parent window at -1, -1.

2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        Duplicated code in DrawingAreaProxyImpl and CoordinatedDrawingAreaProxy
        https://bugs.webkit.org/show_bug.cgi?id=160506

        Reviewed by Michael Catanzaro.

        Same logic as in r202855 but in the UI process. CoordinatedDrawingAreaProxy is just a copy paste of
        DrawingAreaProxyImpl with non-accelerated code path removed. There's actually nothing (or very little) specific
        to coordinated graphics in the CoordinatedDrawingAreaProxy implementation. This patch renames
        CoordinatedDrawingAreaProxy as AcceleratedDrawingAreaProxy and makes DrawingAreaProxyImpl inherit from it, so
        that in case of accelerated compositing the parent class is used, and DrawingAreaProxyImpl only adds the non
        accelerated code path.
        To simplify the common API of AcceleratedDrawingAreaProxy, I have changed CoordinatedLayerTreeHostProxy to
        receive a WebPageProxy in the constructor instead of a drawing area, since the drawing area was used just to get
        the page proxy.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * UIProcess/AcceleratedDrawingAreaProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp.
        (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
        (WebKit::AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy):
        (WebKit::AcceleratedDrawingAreaProxy::alwaysUseCompositing):
        (WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
        (WebKit::AcceleratedDrawingAreaProxy::sizeDidChange):
        (WebKit::AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange):
        (WebKit::AcceleratedDrawingAreaProxy::visibilityDidChange):
        (WebKit::AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint):
        (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
        (WebKit::AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode):
        (WebKit::AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode):
        (WebKit::AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode):
        (WebKit::AcceleratedDrawingAreaProxy::backingStoreStateDidChange):
        (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
        (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
        (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
        (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
        * UIProcess/AcceleratedDrawingAreaProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h.
        (WebKit::AcceleratedDrawingAreaProxy::isInAcceleratedCompositingMode):
        (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy):
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
        (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
        (WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
        (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
        (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
        (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
        (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
        * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
        (WebKit::PageViewportController::syncVisibleContents):
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
        (WebKit::DrawingAreaProxyImpl::paint):
        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
        (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): Deleted.
        (WebKit::DrawingAreaProxyImpl::update): Deleted.
        (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Deleted.
        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Deleted.
        (WebKit::DrawingAreaProxyImpl::discardBackingStore): Deleted.
        * UIProcess/DrawingAreaProxyImpl.h:
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::setVisible):
        (WebKit::WebView::coordinatedGraphicsScene):
        (WebKit::WebView::updateViewportSize):
        (WebKit::WebView::createDrawingAreaProxy):

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

        [Cocoa] Reply block leaks if the remote object doesn’t call it
        https://bugs.webkit.org/show_bug.cgi?id=160642

        Reviewed by Sam Weinig.

        * Shared/API/Cocoa/RemoteObjectRegistry.h: Declared new member functions.
        * Shared/API/Cocoa/RemoteObjectRegistry.messages.in: Added ReleaseUnusedReplyBlock message.
        * Shared/API/Cocoa/RemoteObjectRegistry.mm:
        (WebKit::RemoteObjectRegistry::sendUnusedReply): Send the ReleaseUnusedReplyBlock message.
        (WebKit::RemoteObjectRegistry::releaseUnusedReplyBlock): Message receiver that call through
          to -_releaseReplyWithID:.

        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
        (-[_WKRemoteObjectRegistry _invokeMethod:]): Define a ReplyBlockCallChecker object and
          capture an instance of it in the reply block we pass to the exported object. Have that
          block set a flag on the checker when it’s called. If the checker gets destroyed without
          the block having been called, which means that the block got destroyed without being
          called, call sendUnusedReply to let the other side know that the block will not be invoked.
        (-[_WKRemoteObjectRegistry _releaseReplyWithID:]): Added. Removed the pending reply from the
          map, which release the block.
        * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:

2016-08-07  Chris Dumez  <cdumez@apple.com>

        Write API test to cover crash fix in r204135
        https://bugs.webkit.org/show_bug.cgi?id=160587

        Reviewed by Darin Adler.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::terminateProcess):
        Stop calling resetStateAfterProcessExited() after calling
        requestTermination() because requestTermination() now calls
        didClose() which calls processDidCrash() which already calls
        resetStateAfterProcessExited(). Because the processDidCrash()
        delegates may start new loads, we really do not want to
        reset the state again after calling the delegates.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::requestTermination):
        - Call didClose() in WebProcessProxy::requestTermination() so that
          the processDidCrash() delegates get called in API tests whenever
          a WebContent process is terminated to simulate a crash.
        - Stop calling shutDown() and webConnection()->didClose() because
          didClose() already does this for us.

2016-08-06  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r204226.

        Broke some API tests

        Reverted changeset:

        "Write API test to cover crash fix in r204135"
        https://bugs.webkit.org/show_bug.cgi?id=160587
        http://trac.webkit.org/changeset/204226

2016-08-06  Dan Bernstein  <mitz@apple.com>

        [Cocoa] -[_WKRemoteObjectRegistry() _invokeMethod:] leaks a block
        https://bugs.webkit.org/show_bug.cgi?id=160636

        Reviewed by Darin Adler.

        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
        (-[_WKRemoteObjectRegistry _invokeMethod:]): Release the block returned from
          __NSMakeSpecialForwardingCaptureBlock.

2016-08-06  Chris Dumez  <cdumez@apple.com>

        Write API test to cover crash fix in r204135
        https://bugs.webkit.org/show_bug.cgi?id=160587

        Reviewed by Darin Adler.

        Call didClose() in WebProcessProxy::requestTermination() so that
        the processDidCrash() delegates get called in API tests whenever
        a WebContent process is terminated to simulate a crash.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::requestTermination):

2016-08-06  Brady Eidson  <beidson@apple.com>

        Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
        https://bugs.webkit.org/show_bug.cgi?id=160605

        Reviewed by Alex Christensen.

        This patch:
          - Introduces the GamepadProvider that the WebProcess will use (WebGamepadProvider)
          - Has that provider message to the UIProcess notifying interest in gamepad state
          - Introduces a GamepadProviderClient in the UIProcess (UIGamepadProvider) that will use
            one of the existing GamepadProviders to pass gamepad state along to WebProcesses.
          - Adds an empty skeleton for the soon-to-be-used WebGamepad, which will be the 
            "PlatformGamepad" for WebProcesses.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:

        * UIProcess/Gamepads/UIGamepadProvider.cpp: Added.
        (WebKit::UIGamepadProvider::singleton):
        (WebKit::UIGamepadProvider::UIGamepadProvider):
        (WebKit::UIGamepadProvider::~UIGamepadProvider):
        (WebKit::UIGamepadProvider::platformGamepadConnected):
        (WebKit::UIGamepadProvider::platformGamepadDisconnected):
        (WebKit::UIGamepadProvider::platformGamepadInputActivity):
        (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
        * UIProcess/Gamepads/UIGamepadProvider.h: Added.

        * UIProcess/Gamepads/mac/UIGamepadProviderHID.cpp: Added.
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::~WebProcessPool):
        (WebKit::WebProcessPool::disconnectProcess):
        (WebKit::WebProcessPool::startedUsingGamepads):
        (WebKit::WebProcessPool::stoppedUsingGamepads):
        (WebKit::WebProcessPool::processStoppedUsingGamepads):
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessPool.messages.in:
                
        * WebProcess/Gamepad/WebGamepad.cpp: Added.
        * WebProcess/Gamepad/WebGamepad.h: Added.
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp: Added.
        (WebKit::WebGamepadProvider::singleton):
        (WebKit::WebGamepadProvider::WebGamepadProvider):
        (WebKit::WebGamepadProvider::~WebGamepadProvider):
        (WebKit::WebGamepadProvider::startMonitoringGamepads):
        (WebKit::WebGamepadProvider::stopMonitoringGamepads):
        (WebKit::WebGamepadProvider::platformGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h: Added.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-08-05  Commit Queue  <commit-queue@webkit.org>

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

        This change causes assertion failures in LayoutTests and API
        tests. (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "Lay WebProcess/UIProcess groundwork for an IPC
        GamepadProvider."
        https://bugs.webkit.org/show_bug.cgi?id=160605
        http://trac.webkit.org/changeset/204195

2016-08-05  Brady Eidson  <beidson@apple.com>

        Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
        https://bugs.webkit.org/show_bug.cgi?id=160605

        Reviewed by Alex Christensen.

        This patch:
          - Introduces the GamepadProvider that the WebProcess will use (WebGamepadProvider)
          - Has that provider message to the UIProcess notifying interest in gamepad state
          - Introduces a GamepadProviderClient in the UIProcess (UIGamepadProvider) that will use
            one of the existing GamepadProviders to pass gamepad state along to WebProcesses.
          - Adds an empty skeleton for the soon-to-be-used WebGamepad, which will be the 
            "PlatformGamepad" for WebProcesses.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:

        * UIProcess/Gamepads/UIGamepadProvider.cpp: Added.
        (WebKit::UIGamepadProvider::singleton):
        (WebKit::UIGamepadProvider::UIGamepadProvider):
        (WebKit::UIGamepadProvider::~UIGamepadProvider):
        (WebKit::UIGamepadProvider::platformGamepadConnected):
        (WebKit::UIGamepadProvider::platformGamepadDisconnected):
        (WebKit::UIGamepadProvider::platformGamepadInputActivity):
        (WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
        (WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
        * UIProcess/Gamepads/UIGamepadProvider.h: Added.

        * UIProcess/Gamepads/mac/UIGamepadProviderHID.cpp: Added.
        (WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
        (WebKit::UIGamepadProvider::platformStopMonitoringGamepads):

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::~WebProcessPool):
        (WebKit::WebProcessPool::disconnectProcess):
        (WebKit::WebProcessPool::startedUsingGamepads):
        (WebKit::WebProcessPool::stoppedUsingGamepads):
        (WebKit::WebProcessPool::processStoppedUsingGamepads):
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessPool.messages.in:
                
        * WebProcess/Gamepad/WebGamepad.cpp: Added.
        * WebProcess/Gamepad/WebGamepad.h: Added.
        
        * WebProcess/Gamepad/WebGamepadProvider.cpp: Added.
        (WebKit::WebGamepadProvider::singleton):
        (WebKit::WebGamepadProvider::WebGamepadProvider):
        (WebKit::WebGamepadProvider::~WebGamepadProvider):
        (WebKit::WebGamepadProvider::startMonitoringGamepads):
        (WebKit::WebGamepadProvider::stopMonitoringGamepads):
        (WebKit::WebGamepadProvider::platformGamepads):
        * WebProcess/Gamepad/WebGamepadProvider.h: Added.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-08-05  Dan Bernstein  <mitz@apple.com>

        [Cocoa] WKRemoteObjectCoder doesn’t handle NSRange
        https://bugs.webkit.org/show_bug.cgi?id=160589

        Reviewed by Tim Horton.

        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (encodeInvocationArguments): Encode NSRange by wrapping in an NSValue.
        (decodeInvocationArguments): Decode wrapped NSRange.

2016-08-04  Chris Dumez  <cdumez@apple.com>

        Crash under NavigationState::NavigationClient::processDidCrash()
        https://bugs.webkit.org/show_bug.cgi?id=160563
        <rdar://problem/19814215>

        Reviewed by Sam Weinig.

        When WebPageProxy::close() gets called, make sure we destroy the page's
        navigationClient. If we don't then the navigationClient can outlive the
        navigationState, causing crashes when navigationClient tries to use its
        stale navigationState member reference later on. This happens when the
        WebPageProxy outlives its WKWebView because:
        1. WebPageProxy owns the navigationClient
        2. WKWebView owns the navigationState
        3. navigationClient has a reference to the navigationState as member.

        WebPageProxy can outlive the WKWebView because it is refCounted. It
        can happen for example when the client application uses the
        RelatedPage API as this extend the lifetime of the related WebPage's
        proxy but the application may not keep the related WKWebView alive.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close):
        Note that it is safe to null out m_navigationClient here instead of
        creating a fresh one because there is a null check before every use
        of m_navigationClient in WebPageProxy.

2016-08-03  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] Deduplicate WebProcessPool::setIgnoreTLSErrors
        https://bugs.webkit.org/show_bug.cgi?id=160489

        Reviewed by Alex Christensen.

        WebProcessPool::setIgnoreTLSErrors has identical implementation in WebProcessPoolEfl.cpp
        and WebProcessPoolGtk.cpp. We have WebProcessPoolSoup.cpp and this function is specific to
        the soup network backend, so move it there.

        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::setIgnoreTLSErrors): Deleted.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::setIgnoreTLSErrors): Deleted.
        * UIProcess/soup/WebProcessPoolSoup.cpp:
        (WebKit::WebProcessPool::setIgnoreTLSErrors):

2016-08-03  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Document how to initialize WebKitFaviconDatabase
        https://bugs.webkit.org/show_bug.cgi?id=160391

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:

2016-08-02  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r203385): Frequent RELEASE_ASSERT in WebKit::RemoteLayerTreeDrawingArea::flushLayers()
        https://bugs.webkit.org/show_bug.cgi?id=160481
        <rdar://problem/27534205>

        Reviewed by Simon Fraser.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
        If the UI process sends a didUpdate message while the Web process is in
        the middle of flushing on a background thread, the drawing area will
        allow another commit to start on the main thread, which then (rightfully)
        causes the RELEASE_ASSERT.

        This is normally not a problem, because didRefreshDisplay (which sends the didUpdate)
        bails if m_didUpdateMessageState is anything other than NotSent, and m_didUpdateMessageState
        is only NotSent if the Web process has sent a commit (and thus will not commit again until
        it gets a didUpdate). This is the fundamental mechanism that avoids multiple commits being
        in flight at once.

        In r203385, I added a path where didRefreshDisplay could be called
        before the first commit arrived (by way of
        _applicationWillEnterForeground -> viewStateDidChange -> waitForDidUpdateViewState).

        This caused trouble because m_didUpdateMessageState is initialized to NotSent,
        which means that we could end up sending a didUpdate immediately, before the first
        commit arrives - even worse, while the first commit is being flushed on a background thread,
        leading the aforementioned RELEASE_ASSERT to fire.

        Instead, initialize it to Sent (which I've renamed to DoesNotNeedDidUpdate), so that
        we won't send a didUpdate until after the first commit arrives (at which point
        the two processes are in agreement about the order of things).

        It's not currently possible to API test this for multiple reasons, though it is fairly
        easy to write a test app that reproduces reliably (by simulating suspend/resume notifications
        inside the didFinishNavigation: callback).

2016-08-02  Enrica Casucci  <enrica@apple.com>

        Allow building with content filtering disabled.
        https://bugs.webkit.org/show_bug.cgi?id=160454

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:
        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (IPC::ArgumentCoder<KeypressCommand>::decode):
        (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
        (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        (WebKit::blockedByContentFilterError):

2016-08-02  Brady Eidson  <beidson@apple.com>

        Refactor data passed along for a "GetRecord" request.
        https://bugs.webkit.org/show_bug.cgi?id=160352

        Reviewed by Tim Horton.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::getRecord):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::getRecord):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

2016-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move the redirected XComposite window to the web process
        https://bugs.webkit.org/show_bug.cgi?id=160389

        Reviewed by Žan Doberšek.

        In the current code, the UI process creates the redirected window that the web process uses to render
        accelerated contents. The redirected window is sent to the web process as native surface handle, and using
        XDamage extension the UI process takes a pixmap of the redirected window to render into the widget when there
        are updates. This requires several points of synchronization between UI and web processes. When the web view is
        resized, the UI process first resizes the redirected window and then sends a new backing store ID to the web
        process. The time between the redirected window is resized and the web process renders the new contents the UI
        process keeps rendering the previous contents with the previous size in the new window with the new size. This
        makes the resize process slow, and it produces rendering artifacts quite often. The redirected window is created
        when the web view is realized, to be able to inherit the XVisual from the parent window, and the native window
        handle is sent to the web process. The time until the window is realized, the web process doesn't have a context
        to render into, so the UI process simply renders an empty page. When the web view is unrealized, for example if
        the web view is reparented, the redirected window is destroyed, and a sync message is sent to the web process to
        destroy the current gl context and stop drawing. This needs to happen synchronously, because the UI process
        can't remove the redirected window until the web process has stopped rendering into it. This makes also the
        reparenting process quite unstable and risky.
        To all those synchronization points we now have to add the synchronization with the compositing thread when
        using the threaded compositor. The threaded compositor made resizing, reparenting, etc. even worse. We can't
        avoid the synchronization with the threaded compositor, but we can reduce the synchronization points and improve
        the current ones by moving the redirected window to the web process. In this case is web process who creates the
        redirected window, so we can be sure that it always has a valid native surface handle to render into. This means
        we no longer need the IPC message to send the native surface handle from the UI process to the web process, nor
        the sync message to destroy it either. This also means we no longer need to wait until the view is realized to
        start rendering accelerated contents, and we don't need to stop when it's unrealized either. We don't really
        need to inherit the XVisual from the parent window if the redirected window always uses always a RGBA visual
        when available. That way we always render into a transparent window that is composed into the web view
        widget. And when the web view is resized, we no longer need to destroy the GL context either, because we use the
        same redirected window as the native handle, but create a new pixmap that is what we send to the UI process as
        layer tree context ID. The layer tree context ID is already sent to the UI process by the drawing area as part
        of the backing store update process, so we don't need any new IPC message for this. When the web view is
        resized, the UI process sends a backing store state update message to the web process that updates its size,
        relayouts and then renders the new contents, so that when the update backing store state reply gets to the UI
        process, we already have a new pixmap with the new contents updated. This makes resizing smooth again, and
        avoids flickering and rendering artifacts. And finally all this also prevents several race conditions that were
        causing X errors and web process crashes.

        * PlatformGTK.cmake:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::create): Make it possible to optionally pass a native surface handle for
        compositing to the ThreadedCompositor contructor.
        (WebKit::ThreadedCompositor::ThreadedCompositor): Initialize the native surface handle and make the scene active
        after the thread initialization if we already have a valid handle.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::enterAcceleratedCompositingMode): Pass the layer tree context ID to the web view.
        (WebKit::PageClientImpl::updateAcceleratedCompositingMode): Notify the web view about the update.
        (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseSetAcceleratedCompositingPixmap): Helper function to update the pixmap used to render the
        accelerated contents.
        (webkitWebViewBaseRealize): Remove the code to create the redirected window.
        (webkitWebViewBaseUnrealize): Remove the code to destroy the redirected window.
        (webkitWebViewBaseDispose): Reset the accelerated compositing pixmap.
        (webkitWebViewRenderAcceleratedCompositingResults): Use the accelerated compositing pixmap surface.
        (webkitWebViewBaseSizeAllocate): Remove the code to resize the redirected window.
        (webkitWebViewBaseEnterAcceleratedCompositingMode): Update the accelerated compositing pixmap.
        (webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
        (webkitWebViewBaseExitAcceleratedCompositingMode): Reset the accelerated compositing pixmap.
        (webkitWebViewBaseDidRelaunchWebProcess): Remove the code to send native surface handle to the web process.
        (webkitWebViewBasePageClosed): Reset the accelerated compositing pixmap.
        (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
        * UIProcess/DrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxy.messages.in:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): Handle the case when the layer tree context ID
        changes without leaving the accelerated compositing mode, calling updateAcceleratedCompositingMode().
        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Let the web view know we are leaving accelerated
        compositing mode even when it's forced, since in case of web process crash we need to leave the accelerated
        compositing mode in the UI process.
        (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode): This message was added only to prepare the
        redirected window when the web process was about to enter accelerated compositing mode, so it's no longer needed.
        (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing): This is now only used when building
        without redirected XComposite window support.
        * UIProcess/DrawingAreaProxyImpl.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/efl/WebView.h:
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Removed.
        * UIProcess/gtk/XDamageNotifier.cpp: Helper class to be notified about XDamage events.
        (WebKit::XDamageNotifier::singleton):
        (WebKit::XDamageNotifier::XDamageNotifier):
        (WebKit::XDamageNotifier::add):
        (WebKit::XDamageNotifier::remove):
        (WebKit::XDamageNotifier::filterXDamageEvent):
        (WebKit::XDamageNotifier::notify):
        * UIProcess/gtk/XDamageNotifier.h: Added.
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode): Deleted.
        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
        (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Remove code to send
        WillEnterAcceleratedCompositingMode message.
        (WebKit::AcceleratedDrawingArea::setNativeSurfaceHandleForCompositing): This is now only used when building
        without redirected XComposite window support.
        * WebProcess/WebPage/AcceleratedDrawingArea.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Create a redirected window and
        pass the window ID as native surface handle to the threaded compositor. Use the redirected window pixmap as
        layer tree context.
        (WebKit::ThreadedCoordinatedLayerTreeHost::invalidate): Destroy the redirected window.
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Resize the redirected window and
        update the layer tree context.
        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange): Ditto.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/DrawingArea.messages.in:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Create a redirected window and texture mapper that uses the window
        ID as native surface handle. Use the redirected window pixmap as layer tree context.
        (WebKit::LayerTreeHostGtk::makeContextCurrent): Use the redirected window as native handle.
        (WebKit::LayerTreeHostGtk::invalidate): Destroy the redirected window.
        (WebKit::LayerTreeHostGtk::sizeDidChange): Resize the redirected window and update the layer tree context.
        (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged): Ditto.
        (WebKit::LayerTreeHostGtk::createTextureMapper): Helper function to create the texture mapper.
        (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): Use createTextureMapper().
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
        * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp: Added.
        (WebKit::RedirectedXCompositeWindow::create):
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::resize):
        * WebProcess/WebPage/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h.
        (WebKit::RedirectedXCompositeWindow::window):
        (WebKit::RedirectedXCompositeWindow::pixmap):

2016-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        Database Process: ASSERTION FAILED: filePaths.size() == result.handles().size() with SANDBOX_EXTENSIONS disabled
        https://bugs.webkit.org/show_bug.cgi?id=160398

        Reviewed by Brady Eidson.

        Same assert as in bug #160188, but this time in preregisterSandboxExtensionsIfNecessary.

        * DatabaseProcess/DatabaseProcess.cpp:
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::handleGetResult):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Databases/DatabaseProcessProxy.messages.in:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::preregisterSandboxExtensionsIfNecessary):

2016-08-01  Alex Christensen  <achristensen@webkit.org>

        _WKDownloadDelegate.didReceiveResponse should be called before decideDestinationWithSuggestedFilename
        https://bugs.webkit.org/show_bug.cgi?id=160437
        <rdar://problem/27578272>

        Reviewed by Brady Eidson.

        This preserves the behavior of the NSURLConnection/NSURLDownload code path.
        decideDestinationWithSuggestedFilename might need some information from the didReceiveResponse callback
        in order to decide what the suggested filename should be.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::didReceiveAuthenticationChallenge):
        (WebKit::Download::didReceiveResponse):
        (WebKit::Download::didReceiveData):
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        * NetworkProcess/NetworkLoad.h:
        (WebKit::NetworkLoad::pendingDownloadID):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::pendingDownloadCanceled):
        (WebKit::NetworkProcess::findPendingDownloadLocation):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

2016-07-31  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][Unix] Implement missing WebKit::SharedMemory::create() function
        https://bugs.webkit.org/show_bug.cgi?id=160364

        Reviewed by Carlos Garcia Campos.

        The WebKit::SharedMemory::create() function is missing for the Unix
        platform, which is also used by the GTK+ port. The latter is going
        to need this in place to use the common content filtering code.

        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::accessModeMMap): Added helper function to convert a
        SharedMemory::Protection value into flags useable with mmap().
        (WebKit::SharedMemory::create): Added. Implementation reuses code
        existing in the SharedMemory::allocate() function.
        (WebKit::SharedMemory::allocate): Reimplemented in terms of
        SharedMemory::create().

2016-07-30  Dan Bernstein  <mitz@apple.com>

        [Xcode] WebKit.framework is touched on incremental build even if nothing’s changed
        https://bugs.webkit.org/show_bug.cgi?id=160383

        Reviewed by Tim Horton.

        * WebKit2.xcodeproj/project.pbxproj: Removed the output files listed under the
          Copy iOS Sandbox Profiles for Manual Sandboxing script build phase, because it doesn’t
          produce those files on macOS. With no outputs listed, the script will still run every
          time, but the fact that it has run won’t trigger touching the framework.

2016-07-28  Ryosuke Niwa  <rniwa@webkit.org>

        Crash with an Invalid Web Process IPC Message ID: WebPageProxy.AttributedStringForCharacterRangeCallback
        https://bugs.webkit.org/show_bug.cgi?id=160334
        <rdar://problem/27078089>

        Reviewed by Alexey Proskuryakov.

        The crash is most likely caused by an MESSAGE_CHECK failure in WebPageProxy::attributedStringForCharacterRangeCallback
        which marks the currently dispatching message was invalid inside the macro.

        Make sure we never fail this check by sending an empty EditingRange in attributedSubstringForCharacterRangeAsync when
        the editing range we're about to send to the UIProcess is invalid in WebProcess.

        Unfortunately, no new tests since we don't have any reproduction and I couldn't spot any code path in which we end up
        with an invalid EditingRage here with multiple inspection of the relevant code.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):

2016-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Split calculateCacheSizes in two methods
        https://bugs.webkit.org/show_bug.cgi?id=160237

        Reviewed by Darin Adler.

        It's used to calculate memory and disk cache sizes, but only the web process is interested in memory caches, and
        the network process in disk cache. We can also avoid a lot of duplicated code between ports to set the cache model.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::setCacheModel): Use calculateURLCacheSizes to set the disk cache size and call
        platformSetURLCacheSize if not set to allow ports to setup platform specific cache.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformSetURLCacheSize): Remove common code that is now in cross-platform file.
        (WebKit::volumeFreeSize): Deleted.
        (WebKit::NetworkProcess::platformSetCacheModel): Renamed to platformSetURLCacheSize().
        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformSetURLCacheSize): Remove common code that is now in cross-platform file.
        (WebKit::getCacheDiskFreeSize): Deleted.
        (WebKit::NetworkProcess::platformSetCacheModel): Renamed to platformSetURLCacheSize().
        * Shared/CacheModel.cpp:
        (WebKit::calculateMemoryCacheSizes): Calculate the memory and page cache sizes.
        (WebKit::calculateURLCacheSizes): Calculate the disk cache size.
        (WebKit::calculateCacheSizes): Deleted.
        * Shared/CacheModel.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess): Tell the page cache to clear backing stores for GTK+ port too. This was done before when
        setting the cache model.
        (WebKit::WebProcess::setCacheModel): Use calculateMemoryCacheSizes to setup memory caches and call
        platformSetCacheModel to allow ports do more setup according to the cache model.
        (WebKit::WebProcess::clearResourceCaches): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformSetCacheModel): Remove common code that is now in cross-platform file.
        (WebKit::volumeFreeSize): Deleted.
        (WebKit::WebProcess::platformClearResourceCaches): Deleted.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformSetCacheModel): Remove common code that is now in cross-platform file.
        (WebKit::WebProcess::platformInitializeWebProcess):
        (WebKit::WebProcess::platformClearResourceCaches): Deleted.

2016-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Database Process: ASSERTION FAILED: paths.size() == handles.size() with SANDBOX_EXTENSIONS disabled
        https://bugs.webkit.org/show_bug.cgi?id=160188

        Reviewed by Sergio Villar Senin.

        This happens in ports with sandbox extensions disabled, and it's making several tests to crash in debug
        builds. The SandboxExtension implementation is empty in case of building with sandbox extensions disabled, so
        that we are actually allocating no extensions at all in
        NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs(). When the message arrives to database
        process, we have a list of paths, but an empty list of hanldes which causes the assertion. We can just avoid
        that message entirely in case of building without sandbox extensions.

        * DatabaseProcess/DatabaseProcess.cpp:
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):

2016-07-28  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove deprecated SPI for video inline / fullscreen controls
        https://bugs.webkit.org/show_bug.cgi?id=160318

        Reviewed by Tim Horton.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
        (WKPreferencesGetAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
        (WKPreferencesSetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
        (WKPreferencesGetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Deleted.
        (-[WKWebViewConfiguration copyWithZone:]): Deleted.
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithPlaysInlineAttribute]): Deleted.
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:]): Deleted.
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]): Deleted.
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Deleted.

2016-07-28  Tim Horton  <timothy_horton@apple.com>

        Frequent animation lags when interacting with Safari (sidebar, tab switching, etc.)
        https://bugs.webkit.org/show_bug.cgi?id=160289
        <rdar://problem/27553464>

        Reviewed by Simon Fraser.

        API Tests: WebKit2.AnimatedResizeDoesNotHang, WebKit2.ResizeWithHiddenContentDoesNotHang

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]):
        Avoid calling _endAnimatedResize when a commit comes in when we haven't yet received
        a dynamic viewport update reply (and thus don't have a transaction ID to wait on).
        Previously, in this case, _resizeAnimationTransformTransactionID would be 0,
        and *any* commit would cause _endAnimatedResize to be called, causing us to always
        fall into the worst-case sync wait.
        
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
        Make use of waitForDidUpdateViewState instead of having a separate waitForAndDispatchImmediately
        here, because it knows to do things like dispatch the didUpdate message if it's still
        pending. This also shortens the sync wait timeout from 1s to 500ms, which makes it
        consistent with e.g. the newly-parented-view timeout duration, and should be nothing
        but positive.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
        (IPC::Connection::waitForMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::waitForSyncReply):
        * Platform/IPC/Connection.h:
        (IPC::Connection::ignoreTimeoutsForTesting):
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration ignoreSynchronousMessagingTimeoutsForTesting]):
        (-[_WKProcessPoolConfiguration setIgnoreSynchronousMessagingTimeoutsForTesting:]):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::processDidFinishLaunching):
        Add a mechanism for clients to cause all synchronous message timeouts to be effectively infinite.
        The new API tests use this to ensure that the test will time out if they ever enter
        the bad state (otherwise, the shorter sync wait timeout could make the test still pass).

2016-07-27  Andy Estes  <aestes@apple.com>

        [iOS] Add WKUIDelegate SPI for specifying that an attachment list is from a managed source
        https://bugs.webkit.org/show_bug.cgi?id=160280
        <rdar://problem/27471815>

        Reviewed by Dan Bernstein.

        * Platform/spi/ios/UIKitSPI.h: Declared
        UIPreviewItemTypeAttachment, UIPreviewDataAttachmentList, and UIPreviewDataAttachmentIndex.
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared -_attachmentListForWebView:sourceIsManaged:.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Used UIPreviewItemTypeAttachment,
        UIPreviewDataAttachmentList, and UIPreviewDataAttachmentIndex. If uiDelegate responds to
        -_attachmentListForWebView:sourceIsManaged:, called it instead of -_attachmentListForWebView:.
        Set sourceIsManaged as the value for the UIPreviewDataAttachmentListSourceIsManaged key in dataForPreview.

2016-07-27  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Remove unused textContentType SPI from _WKFormInputSession
        https://bugs.webkit.org/show_bug.cgi?id=160260

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKFormInputSession.h: Remove unused SPI.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView textInputTraits]): Set textContentType of _traits to whatever we classify it as based
        on the assisted node info. The default textContentType is nil, and that is our fallback in our method
        for determining textContentType.
        (-[WKFormInputSession textContentType]): Deleted.
        (-[WKFormInputSession setTextContentType:]): Deleted.

2016-07-27  Chris Dumez  <cdumez@apple.com>

        Fix m_isInBackground initialization for Safari View Services
        https://bugs.webkit.org/show_bug.cgi?id=160255
        <rdar://problem/27569255>

        Reviewed by Tim Horton.

        Fix m_isInBackground initialization for Safari View Services. The
        code was using m_applicationStateMonitor without initializing it.
        Instead, use the local applicationStateMonitor and make sure we
        invalidate it before it gets released.

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

2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Coordinated Graphics] Improve scheduling of tasks between threads in CoordinatedGraphicsScene
        https://bugs.webkit.org/show_bug.cgi?id=160238

        Reviewed by Michael Catanzaro.

        This patch makes the following improvements:

         - Avoid scheduling tasks to the main thread if the scene is detached.
         - Do not take references when not actually sending tasks to another threads.
         - Use Function instead of std::function on dispatch methods.
         - Remove purgeBackingStores that is actually never called. It's only scheduled from purgeGLResources() that
           is always called after detach.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
        (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        (WebKit::CoordinatedGraphicsScene::updateViewport):
        (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
        (WebKit::CoordinatedGraphicsScene::commitSceneState):
        (WebKit::CoordinatedGraphicsScene::renderNextFrame):
        (WebKit::CoordinatedGraphicsScene::purgeGLResources):
        (WebKit::CoordinatedGraphicsScene::commitScrollOffset):
        (WebKit::CoordinatedGraphicsScene::detach):
        (WebKit::CoordinatedGraphicsScene::setActive):
        (WebKit::CoordinatedGraphicsScene::dispatchCommitScrollOffset): Deleted.
        (WebKit::CoordinatedGraphicsScene::purgeBackingStores): Deleted.
        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::purgeBackingStores): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): Deleted.
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
        (WebKit::CompositingCoordinator::invalidate):
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::invalidate):
        (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove network setup from web process
        https://bugs.webkit.org/show_bug.cgi?id=160236

        Reviewed by Michael Catanzaro.

        We are still doing network init and finish in th web process. It's useless since we switched to mandatory
        network process.

        * WebProcess/gtk/WebProcessMainGtk.cpp:

2016-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.13.4.

2016-07-26  Simon Fraser  <simon.fraser@apple.com>

        Sort the project files.

        * WebKit2.xcodeproj/project.pbxproj:

2016-07-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [iPhone] Playing a video on tudou.com plays only sound, no video
        https://bugs.webkit.org/show_bug.cgi?id=160178
        <rdar://problem/27535468>

        Reviewed by Eric Carlson and Dan Bernstein.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
        (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
        (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-07-26  Alex Christensen  <achristensen@webkit.org>

        Remove unused DownloadAuthenticationClient
        https://bugs.webkit.org/show_bug.cgi?id=160220

        Reviewed by Darin Adler.

        * CMakeLists.txt:
        * NetworkProcess/Downloads/Download.cpp:
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadAuthenticationClient.cpp: Removed.
        * NetworkProcess/Downloads/DownloadAuthenticationClient.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-07-26  Simon Fraser  <simon.fraser@apple.com>

        Allow LOG macros to be used outside the namespace, and other logging cleanup
        https://bugs.webkit.org/show_bug.cgi?id=160216

        Reviewed by Anders Carlsson.

        Fix some issues with the LOG macros.
        
        First, they were not usable outside the WebKit namespace in WebKit2 code. Fix by moving
        its log channels outside of the namespace (they are protected by a unique prefix anyway).
        
        Second, allow LOG_WITH_STREAM to be used in WebKit2 by moving that and a helper macro
        into LogMacros.h, which is exported from WebCore as a private header.
        
        Third, split the Logging.h header into two. Logging.h remains for framework-internal
        log channels and log macros. Add LogInitialization.h which is external, and used to
        initialize the channels.
        
        Finally unify "initializeLogChannels" and "initializeLoggingChannels" terminology everywhere.

        * NetworkProcess/NetworkProcess.cpp:
        * Platform/LogInitialization.h: Copied from Source/WebKit2/Platform/foundation/LoggingFoundation.mm.
        * Platform/Logging.cpp:
        (WebKit::initializeLogChannelsIfNecessary):
        * Platform/Logging.h:
        * Platform/foundation/LoggingFoundation.mm:
        * Shared/WebKit2Initialize.cpp:
        (WebKit::InitializeWebKit2):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _updateContentRectsWithState:]):
        (-[WKWebView _navigationGestureDidBegin]):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingTimer):
        * WebKit2.xcodeproj/project.pbxproj:

2016-07-26  David Kilzer <ddkilzer@apple.com>

        Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
        https://bugs.webkit.org/show_bug.cgi?id=156947
        <rdar://problem/23325160>

        Reviewed by Alex Christensen.

        * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
        (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue): 
        * UIProcess/API/C/WKAuthenticationDecisionListener.h:
        Added new SPI for testing corresponding to calling the completion handler of
        WKWebView.didReceiveAuthenticationChallenge with NSURLSessionAuthChallengeRejectProtectionSpace.

2016-07-26  Anders Carlsson  <andersca@apple.com>

        Payment session does not end if user closes all Safari windows
        https://bugs.webkit.org/show_bug.cgi?id=160213
        rdar://problem/27480873

        Reviewed by Tim Horton.

        Listen for the NSWindowWillCloseNotification of the sheet window and hide the payment UI when
        the sheet window is going to be closed.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
        (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
        (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI):

2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] ASSERTION FAILED: canAccessThreadLocalDataForThread(m_thread) after r203718
        https://bugs.webkit.org/show_bug.cgi?id=160201

        Reviewed by Michael Catanzaro.

        I forgot to call purgeGLResources() before invalidating the scene in the compositing thread.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::invalidate):

2016-07-26  Enrica Casucci  <enrica@apple.com>

        Support configurable autocapitalization.
        https://bugs.webkit.org/show_bug.cgi?id=158860
        rdar://problem/27536113

        Reviewed by Tim Horton.

        Autocapitalization should be enabled/disabled regardless of whether
        we are using advance spelling feature.

        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):


2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug
        https://bugs.webkit.org/show_bug.cgi?id=160117

        Reviewed by Michael Catanzaro.

        The problem is that WebPage has its own m_useFixedLayout that is only updated when changed from the UI
        process. However, layout tests doing internals.setUseFixedLayout() change the frame view directly, and the
        WebPage doesn't notice it.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setFixedVisibleContentRect): Deleted.
        (WebKit::WebPage::sendViewportAttributesChanged): Change the assert to check the main FrameView is in fixed
        layout mode.
        * WebProcess/WebPage/WebPage.h:

2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] ASSERTION FAILED: isMainThread() when ThreadedCompositor is destroyed since r203718
        https://bugs.webkit.org/show_bug.cgi?id=160197

        Reviewed by Žan Doberšek.

        ThreadedCompositor can be destroyed from a secondary thread, for example, when a task takes a reference and the
        main threads derefs it, when the task finishes in the secondary thread the lambda ends up deleting the threaded
        compositor. This is ok for the Threaded compositor but not for the CompositingRunLoop class. this was not a
        problem before r203718 because the CompositingRunLoop object was created and destroyed in the same thread
        always, but now it's part of the ThreadedCompositor class. This patch uses std:unique_ptr again to explicitly
        create the CompositingRunLoop in the ThreadedCompositor constructor and delete in the invalidate() method to
        make sure it happens in the main thread in both cases.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::WorkQueuePool::invalidate):
        (WebKit::WorkQueuePool::getOrCreateWorkQueueForContext):
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::ThreadedCompositor):
        (WebKit::ThreadedCompositor::invalidate):
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
        (WebKit::ThreadedCompositor::setDeviceScaleFactor):
        (WebKit::ThreadedCompositor::setDrawsBackground):
        (WebKit::ThreadedCompositor::didChangeViewportSize):
        (WebKit::ThreadedCompositor::didChangeViewportAttribute):
        (WebKit::ThreadedCompositor::didChangeContentsSize):
        (WebKit::ThreadedCompositor::scrollTo):
        (WebKit::ThreadedCompositor::scrollBy):
        (WebKit::ThreadedCompositor::updateViewport):
        (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
        (WebKit::ThreadedCompositor::forceRepaint):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-07-26  Youenn Fablet  <youenn@apple.com>

        Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions
        https://bugs.webkit.org/show_bug.cgi?id=159413

        Reviewed by Alex Christensen.

        Renaming of ClientCredentialPolicy values.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkLoad::didReceiveAuthenticationChallenge):
        * NetworkProcess/NetworkLoadParameters.h:
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):

2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Crashes and deadlocks in single web process mode
        https://bugs.webkit.org/show_bug.cgi?id=160160

        Reviewed by Žan Doberšek.

        Every WebPage has its own threaded compositor that runs its own compositing thread. That means that when there's
        more than one WebPage in the same process, we are running OpenGL stuff in different secondary threads. That's
        causing crashes and deadlocks in X and graphics drivers. We should ensure there's a single compositing thread
        per process when multiple threads is not supported. This is causing unit test
        WebKit2.WKPageGetScaleFactorNotZero to time out since we switched to the threaded compositor. That test is
        creating two pages in the same web process, and most of the times the web process crashes or deadlocks causing
        the test to never finish and time out.
        This patch makes CompositingRunLoop use a thread pool that spawns the compositing threads and schedules the tasks
        there.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::WorkQueuePool::singleton):
        (WebKit::WorkQueuePool::dispatch):
        (WebKit::WorkQueuePool::runLoop):
        (WebKit::WorkQueuePool::invalidate):
        (WebKit::WorkQueuePool::WorkQueuePool):
        (WebKit::WorkQueuePool::getOrCreateWorkQueueForContext):
        (WebKit::CompositingRunLoop::CompositingRunLoop):
        (WebKit::CompositingRunLoop::~CompositingRunLoop):
        (WebKit::CompositingRunLoop::performTask):
        (WebKit::CompositingRunLoop::performTaskSync):
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::ThreadedCompositor):
        (WebKit::ThreadedCompositor::invalidate):
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
        (WebKit::ThreadedCompositor::setDeviceScaleFactor):
        (WebKit::ThreadedCompositor::setDrawsBackground):
        (WebKit::ThreadedCompositor::didChangeViewportSize):
        (WebKit::ThreadedCompositor::didChangeViewportAttribute):
        (WebKit::ThreadedCompositor::didChangeContentsSize):
        (WebKit::ThreadedCompositor::scrollTo):
        (WebKit::ThreadedCompositor::scrollBy):
        (WebKit::ThreadedCompositor::purgeBackingStores):
        (WebKit::ThreadedCompositor::renderNextFrame):
        (WebKit::ThreadedCompositor::commitScrollOffset):
        (WebKit::ThreadedCompositor::updateViewport):
        (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
        (WebKit::ThreadedCompositor::forceRepaint):
        (WebKit::ThreadedCompositor::tryEnsureGLContext): Deleted.
        (WebKit::ThreadedCompositor::glContext): Deleted.
        (WebKit::ThreadedCompositor::updateSceneState): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-07-25  Sam Weinig  <sam@webkit.org>

        Fix assertion.

        * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
        (WebKit::NetworkCache::encodeCertificateChain):

2016-07-25  Sam Weinig  <sam@webkit.org>

        Split platform specific parts of NetworkCacheCoders.cpp into separate files
        https://bugs.webkit.org/show_bug.cgi?id=160151

        Reviewed by Alex Christensen.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
        * NetworkProcess/cache/NetworkCacheCodersCocoa.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.
        (WebKit::NetworkCache::encodeCFData): Moved.
        (WebKit::NetworkCache::decodeCFData): Moved.
        (WebKit::NetworkCache::encodeSecTrustRef): Moved.
        (WebKit::NetworkCache::decodeSecTrustRef): Moved.
        (WebKit::NetworkCache::encodeCertificateChain): Moved.
        (WebKit::NetworkCache::decodeCertificateChain): Moved.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Moved.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Moved.
        * NetworkProcess/cache/NetworkCacheCodersSoup.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Moved.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Moved.

        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2016-07-25  Chris Dumez  <cdumez@apple.com>

        [iOS] Make sure we call the ProcessAssertion invalidation handler on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=160140
        <rdar://problem/27399998>

        Reviewed by Darin Adler.

        Based on crash traces, it appears BKSProcessAssertion is calling our
        invalidation handler on a background thread. This was not anticipated
        and therefore, this would lead to thread safety issues and crashes.

        We now make sure to call our invalidation handler on the main thread.
        We also use a WeakPtr to ensure that the ProcessAssertion is still
        alive once on the main thread and before calling the invalidation
        handler.

        * UIProcess/ProcessAssertion.cpp:
        (WebKit::ProcessAssertion::ProcessAssertion):
        * UIProcess/ProcessAssertion.h:
        (WebKit::ProcessAssertion::ProcessAssertion):
        (WebKit::ProcessAssertion::createWeakPtr):
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (WebKit::ProcessAssertion::ProcessAssertion):
        (WebKit::ProcessAssertion::markAsInvalidated):

2016-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] ASSERTION FAILED: !!handle ^ !!m_nativeSurfaceHandle with several layout tests
        https://bugs.webkit.org/show_bug.cgi?id=160143

        Reviewed by Michael Catanzaro.

        We have a message to set the native surface handle and another one for destroying it, the former is a normal
        message while the latter is sync. This assertion happens if the web view is realized before the web process is
        launched. This is the sequence:

        1.- DrawingAreaProxyImpl sends SetNativeSurfaceHandleForCompositing message to the web process, since the
        process hasn't been launched yet, the message is queued.
        2.- Web process is launched and queued messages are now sent to the web process.
        3.- The page is closed right after the web process is launched, and DrawingAreaProxyImpl sends
        DestroyNativeSurfaceHandleForCompositing to the web process.
        4.- The web process processes incoming messages, and DestroyNativeSurfaceHandleForCompositing is processed before
        SetNativeSurfaceHandleForCompositing because it's sync.
        5.- The web process processes SetNativeSurfaceHandleForCompositing message.

        This is not only producing the assertion, it's also setting a handle for a X window already destroyed in the UI
        process, so this could be producing the X errors we have seen in other tests. So, we need to make sure
        SetNativeSurfaceHandleForCompositing and DestroyNativeSurfaceHandleForCompositing are handled in order by the
        web process. We could make SetNativeSurfaceHandleForCompositing sync as well, but sync messages are just ignored
        when sent before the web process has been launched (only normal messages are queued for obvious reasons). The
        other option is sending the SetNativeSurfaceHandleForCompositing message with the
        IPC::DispatchMessageEvenWhenWaitingForSyncReply flag. In this case the message is queued and dispatched on
        process launch, but it's dispatched before other messages also queued without that flag, like
        CreateWebPage. Since there's no WebPage the web process doesn't find a valid message receiver for it and
        it's discarded. We need to ensure the DrawinArea object has been created before sending the
        SetNativeSurfaceHandleForCompositing with the PC::DispatchMessageEvenWhenWaitingForSyncReply flag.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): If we have received the first update and there's a
        SetNativeSurfaceHandleForCompositing message pending, send it.
        (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing): Do not send the message before the first
        update is received.
        (WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing): If there was a
        SetNativeSurfaceHandleForCompositing message pending, just ignore this destroy since the web process never
        received the handle.
        * UIProcess/DrawingAreaProxyImpl.h:

2016-07-25  Philippe Normand  <pnormand@igalia.com>

        Improve GDB backtrace generation for GTK/EFL
        https://bugs.webkit.org/show_bug.cgi?id=128928

        Reviewed by Carlos Garcia Campos.

        Move the Web, Database and Network ProcessIdentifier functions to
        the cross-platform WKContext and WKPage implementations.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetNetworkProcessIdentifier):
        (WKContextGetDatabaseProcessIdentifier):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetProcessIdentifier):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        * UIProcess/API/C/mac/WKPagePrivateMac.h:
        * UIProcess/API/C/mac/WKPagePrivateMac.mm:

2016-07-24  Sam Weinig  <sam@webkit.org>

        Add specialization for encoding/decoding WebCore::CertificateInfos in the Network Cache
        <rdar://problem/27409315>
        https://bugs.webkit.org/show_bug.cgi?id=160144

        Reviewed by Chris Dumez.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::encodeCFData):
        (WebKit::NetworkCache::decodeCFData):
        (WebKit::NetworkCache::encodeSecTrustRef):
        (WebKit::NetworkCache::decodeSecTrustRef):
        (WebKit::NetworkCache::encodeCertificateChain):
        (WebKit::NetworkCache::decodeCertificateChain):
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode):
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):

        * NetworkProcess/cache/NetworkCacheStorage.h:
        (WebKit::NetworkCache::Storage::version):
        Bump the version and lastStableVersion to account for the format change.

2016-07-22  Joseph Pecoraro  <pecoraro@apple.com>

        Web Automation: All key events should be processed before sending response
        https://bugs.webkit.org/show_bug.cgi?id=160114
        <rdar://problem/27505943>

        Reviewed by Darin Adler.

        When evaluating performKeyboardInteractions, we were sending all
        NSEvents synchronously, but because WebPageProxy was doing its
        own queueing and asynchronous processing of those key events, we
        would receive and respond to the next Automation command before
        having completed all of the key events.

        This change makes performKeyboardInteractions asynchronous. It
        will be notified only after WebPageProxy has exhausted its queue
        of key events.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
        (WebKit::WebAutomationSession::performKeyboardInteractions):
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveEvent):

2016-07-22  Joseph Pecoraro  <pecoraro@apple.com>

        Web Automation: WebAutomationSession::deleteAllCookies never calls callback, hangs automation session
        https://bugs.webkit.org/show_bug.cgi?id=160113
        <rdar://problem/27308124>

        Reviewed by Darin Adler.

        Delete all cookies appears to be a straightforward action
        where we don't need to wait for a callback. So drop the
        async altogether and implicitly complete the action.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::deleteAllCookies):
        * UIProcess/Automation/WebAutomationSession.h:

2016-07-22  Zalan Bujtas  <zalan@apple.com>

        Handle cases when IOSurface initialization fails.
        https://bugs.webkit.org/show_bug.cgi?id=160006
        <rdar://problem/27495102>

        Reviewed by Tim Horton and Simon Fraser.

        This is an additional fix to r203514 to check if IOSurface initialization was successful.

        Unable to test.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::encode):
        (WebKit::RemoteLayerBackingStore::display):
        (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _takeViewSnapshot]):
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

2016-07-22  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Clients should be able to decide if they want secure text entry in a form field
        https://bugs.webkit.org/show_bug.cgi?id=160109
        rdar://problem/27504958

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession forceSecureTextEntry]): Getter.
        (-[WKFormInputSession setForceSecureTextEntry:]): Setter.
        (-[WKContentView textInputTraits]): If the form input session has specified that secure text
        entry is desired, we should use secure text entry.

2016-07-22  Anders Carlsson  <andersca@apple.com>

        Get rid of an unused API typedef
        https://bugs.webkit.org/show_bug.cgi?id=160103

        Reviewed by Sam Weinig.

        * Shared/API/c/WKSharedAPICast.h:

2016-07-22  Dan Bernstein  <mitz@apple.com>

        run-safari doesn't work with Safari 10 on 10.11
        https://bugs.webkit.org/show_bug.cgi?id=159958
        <rdar://problem/27422805>

        Reviewed by Alexey Proskuryakov.

        Safari’s injected bundle may depend on the newer versions of frameworks installed in a
        staging location. Have the engineering builds of the Web Content service look for newer
        versions in that location.

        * Configurations/BaseTarget.xcconfig: Shortened a linker flag.

        * Configurations/BaseXPCService.xcconfig: Increased Mach-O header padding in production
          builds to allow for more dyld environment commands to be added after the fact.

        * Configurations/DebugRelease.xcconfig: Have the new
          WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG set to YES for macOS
          engineering builds.

        * Configurations/WebContentService.xcconfig: Include the versioned frameworks whenever
          WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG is set to YES. Have the
          value of WK_WEBCONTENT_SERVICE_NEEDS_VERSIONED_FRAMEWORK_PATH_LDFLAG default to
          the value of USE_STAGING_INSTALL_PATH, while letting DebugRelease.xcconfig override it.

2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>

        Remove support for deprecated SPI inlineMediaPlaybackRequiresPlaysInlineAttribute
        https://bugs.webkit.org/show_bug.cgi?id=160066

        Reviewed by Dean Jackson.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute): Deleted.
        (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Deleted.
        (-[WKWebViewConfiguration copyWithZone:]): Deleted.
        (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]): Deleted.
        (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Deleted.

2016-07-21  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Apps using WKWebView will crash if they set the scroll view's delegate and don't nil it out later
        https://bugs.webkit.org/show_bug.cgi?id=159980
        rdar://problem/27450825

        Reviewed by Dan Bernstein.

        The root cause of this crash is that we are not abiding the UIScrollView API that the scroll view
        delegate property should be weak. If setters of this delegate do not know that, since the WKWebView
        exposes the scroll view as a UIScrollView, they may forget to nil out the delegate they set and will
        then crash.

        * UIProcess/ios/WKScrollView.mm:
        (-[WKScrollViewDelegateForwarder methodSignatureForSelector:]): Get a RetainPtr holding the
        external delegate and use where needed.
        (-[WKScrollViewDelegateForwarder respondsToSelector:]): Ditto.
        (-[WKScrollViewDelegateForwarder forwardInvocation:]): Ditto.
        (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]): Ditto. When returning a reference
        to the external delegate, get a retained and autoreleased reference so the caller needn't release
        the object when done.
        (-[WKScrollView delegate]): Ditto.
        (-[WKScrollView _updateDelegate]): Get a RetainPtr holding the external delegate that can be
        used throughout this method. Use the RetainPtr to get the external delegate for setting super's
        delegate as well as creating the delegate forwarder.
        (-[WKScrollView setDelegate:]): Get a RetainPtr holding the external delegate and use its value for
        comparison to the object we are setting the external delegate to.

2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>

        [iPhone] Playing a video on tudou.com plays only sound, no video
        https://bugs.webkit.org/show_bug.cgi?id=159967
        <rdar://problem/26964090>

        Reviewed by Jon Lee, Jeremy Jones, and Anders Carlsson.

        Add the two preferences to WKWebViewConfiguration and WKPreferences to cover both
        the Obj-C API and the C SPI.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
        (WKPreferencesGetAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
        (WKPreferencesSetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
        (WKPreferencesGetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithPlaysInlineAttribute]):
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:]):
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]):
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-07-21  Yongjun Zhang  <yongjun_zhang@apple.com>

        WebBackForwardList's currentIndex could get out of bounds when filtering items.
        https://bugs.webkit.org/show_bug.cgi?id=159986

        When generating a new BackForwardListState object, if we filter out multiple items in the list, the currentIndex could get
        out of bounds.

        Reviewed by Dan Bernstein.

        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::backForwardListState): Make currentIndex point to the last item if it is out of bounds.

2016-07-21  Joseph Pecoraro  <pecoraro@apple.com>

        Web Automation: Allow JavaScript evaluation to return an InvalidElementState error
        https://bugs.webkit.org/show_bug.cgi?id=160015
        <rdar://problem/27434529>

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):

2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] WTR generates fully white images for pixel tests most of the time
        https://bugs.webkit.org/show_bug.cgi?id=160016

        Reviewed by Žan Doberšek.

        WTR sends a force repaint message to the web process before taking a snapshot of the web view. With the threaded
        compositor, the UI process is notified about the force repaint callback before the contents have been actually
        painted. We need to ensure that the contents are rendered before the UI process is notified.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::forceRepaint): Synchronously render the layer tree.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewRenderAcceleratedCompositingResults): Always mark the redirected window surface as dirty before
        rendering, since it can be modified by the web process at any time.
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::XDamageNotifier::add):
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Do not mark the surface as dirty on every
        damage since the view will do it before rendering.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::forceRepaint): Call ThreadedCompositor::forceRepaint().
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] White page when loaded tab is visited until it's hovered when AC mode is always on
        https://bugs.webkit.org/show_bug.cgi?id=159512

        Reviewed by Michael Catanzaro.

        The redirected window is always mapped, but offscreen, to ensure that the web process can always render
        there. When the web process renders something into the offscreen window, we receive a damage event in the UI
        process and queue a redraw of the web view. However, when the web view is not mapped, even if we still receive
        the damage events, the web view redraws are ignored until the view is mapped again (gtk_widget_queue_draw()
        returns early when the widget is not visible). The redirected window updates its pixmap on demand when the
        surface is requested, which happens when the web view draws its contents. So when the web view becames visible,
        the redirected window creates a new pixmap and surface (the first time or if the web view was resized), that we
        initialize to avoid artifacts when the web process hasn't render anything yet. That initialization is actually
        overwriting anything rendered into the redirected window while the view was unmapped. That's why see white pages
        the first time, and previous contents after a resize, and we don't see the actual contents until the web process
        renders again and we reuse the existing pixmap. The white page didn't happen for tabs with accelerated content,
        because in those cases the web process was rendering a new frame every 16ms, but instead there was a flickering
        effect due to the current frame being overwritten when the view is mapped until the next frame.
        So, instead of lazily create and initialize the redirected window pixmap and surface, we should always create
        the new pixmap as soon as the window is created or resized (and not empty) This fixes the issues but also makes
        resizing the window a bit smoother when AC mode is enabled.

        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Create the pixmap and surface if the window is
        not empty.
        (WebKit::RedirectedXCompositeWindow::resize): Ditto.
        (WebKit::RedirectedXCompositeWindow::createNewPixampAndPixampSurface): Create the pixmap and surface.
        (WebKit::RedirectedXCompositeWindow::surface): Deleted.
        * UIProcess/gtk/RedirectedXCompositeWindow.h:
        (WebKit::RedirectedXCompositeWindow::surface):

2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] Web view background colors don't work
        https://bugs.webkit.org/show_bug.cgi?id=159465

        Reviewed by Michael Catanzaro.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setDrawsBackground): Set m_drawsBackground in compositing thread and schedule a
        layer flush.
        (WebKit::ThreadedCompositor::renderLayerTree): Clear the area when not rendering backgrounds.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Notify the compositor.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Web view background colors don't work in accelerated compositing mode
        https://bugs.webkit.org/show_bug.cgi?id=159455

        Reviewed by Michael Catanzaro.

        In non AC mode it's the drawing area backing store the one drawing the background, and the web process just
        renders into a transparent bitmap. In AC mode we need to make the redirected window pixmap transparent for the
        web process to render there, and let the web view fill the background color before rendering the redirected
        window pixmap on top. To be able to make the redirected window surface transparent, we need to ensure the parent
        window has an RGBA visual, even when setting a fully opaque background, because we still need the web process
        to render on the transparent xwindow.

        * UIProcess/API/gtk/WebKitWebView.cpp: Update documentation of webkit_web_view_set_background_color() since now
        it's required to set the RGBA visual even for opaque colors in case AC mode is enabled.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewRenderAcceleratedCompositingResults): When a background color has been set, fill it before
        rendering the redirected window surface.
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Mark the surface as dirty after every damage
        event, since the web process has modified it.
        (WebKit::RedirectedXCompositeWindow::surface): Initialize the surface after creating it, to avoid flickering and
        rendering artifacts when waiting for the first damage event from the web process.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::compositeLayersToContext): Use a fully transparent color to clear the context when the page
        is resized or when a view background color has been set.

2016-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Avoid the redirected window resize when the view is realized in AC mode
        https://bugs.webkit.org/show_bug.cgi?id=159463

        Reviewed by Michael Catanzaro.

        We are always creating the redirected window at 1x1 and then resizing it if we are in AC mode. When the view is
        realized and AC mode is already enabled, which happens for example when AC mode is forced, or when the threaded
        compositor is enabled, we could just pass the initial size to the redirected window constructor to create the
        XWindow at the right size.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseResizeRedirectedWindow): We no longer need to pass the device scale factor, since the
        RedirectedXCompositeWindow already knows it.
        (webkitWebViewBaseRealize): Pass the WebPageProxy and an initial size to the RedirectedXCompositeWindow
        constructor instead of the parent GdkWindow. If AC mode is disabled, the initial size will be empty. With the
        WebPageProxy the redirected window has access to the device scale factor and view widget to get the parent
        GdkWindow.
        (deviceScaleFactorChanged): Resize the redirected window when device scale factor changes.
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::create):
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::resize):
        (WebKit::RedirectedXCompositeWindow::surface):
        (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
        * UIProcess/gtk/RedirectedXCompositeWindow.h:

2016-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][Threaded Compositor] Web Process crash when the page is closed before the web view is realized
        https://bugs.webkit.org/show_bug.cgi?id=159918

        Reviewed by Michael Catanzaro.

        When the web view is unrealized, we send a sync message to the web process to destroy the native surface handle
        for compositing, and then we actually destroy the redirected window. But if the page is closed explicitly before
        the web view is unrealized, the drawing area proxy is destroyed so that when the web view is unrealized we can't
        notify the web process that keeps trying to render to a now deleted window handle. That produces a BadDrawable
        X error and the web process crashes.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::pageClosed): Call webkitWebViewBasePageClosed().
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBasePageClosed): If the web view is still realized, destroy the native surface handle and the
        redirected window.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBasePageClosed().

2016-07-20  Commit Queue  <commit-queue@webkit.org>

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

        many iOS-simulator tests are failing (Requested by litherum on
        #webkit).

        Reverted changeset:

        "[iPhone] Playing a video on tudou.com plays only sound, no
        video"
        https://bugs.webkit.org/show_bug.cgi?id=159967
        http://trac.webkit.org/changeset/203471

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

        REGRESSION (r203189): Webpage snapshots are partially or fully blank when edge swiping back
        https://bugs.webkit.org/show_bug.cgi?id=160000
        rdar://problem/27455589
        
        Reviewed by Zalan Bujtas.

        r203189 triggered a call to -_updateContentRectsWithState: in the middle of a swipe,
        during which we'd compute the visible rect of the view as having zero width, causing us
        to not create tiles.

        -_navigationGestureDidBegin already snapshots the visibleContentRect in _frozenVisibleContentRect,
        but -_visibleContentRect then clipped that with ancestor views, causing the issue.

        Fix by having -_visibleContentRect just return _frozenVisibleContentRect if we have one.

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

2016-07-20  Myles C. Maxfield  <mmaxfield@apple.com>

        [iPhone] Playing a video on tudou.com plays only sound, no video
        https://bugs.webkit.org/show_bug.cgi?id=159967
        <rdar://problem/26964090>

        Reviewed by Jon Lee.

        Add the two preferences to WKWebViewConfiguration and WKPreferences to cover both
        the Obj-C API and the C SPI.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
        (WKPreferencesGetAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
        (WKPreferencesSetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
        (WKPreferencesGetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithPlaysInlineAttribute]):
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:]):
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]):
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-07-20  ChangSeok Oh  <changseok@webkit.org>

        Fix a linking failure caused by NetworkCache::Data::~Data()
        https://bugs.webkit.org/show_bug.cgi?id=159931

        Linking is failed with clang 3.6. It says WebKit::NetworkCache::Data::~Data is undefined.
        It is fixed by adding a destructor for NetworkCache::Data.

        Reviewed by Alex Christensen.

        * NetworkProcess/cache/NetworkCacheData.h:
        (WebKit::NetworkCache::Data::~Data):

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

        Explain the default value of WKWebViewConfiguration's ignoresViewportScaleLimits
        https://bugs.webkit.org/show_bug.cgi?id=159978
        <rdar://problem/27453189>

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        This defaults to NO.

2016-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Linux] MemoryPressureMonitor fallback code to get memory available in older linux kernels doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=159970

        Reviewed by Antonio Gomes.

        We are failing to detect zones when parsing /proc/zoneinfo.

        * UIProcess/linux/MemoryPressureMonitor.cpp:
        (WebKit::lowWatermarkPages): Use strncmp since we want to know whether the line starts with "Node".
        (WebKit::MemoryPressureMonitor::MemoryPressureMonitor): Stop the polling if we fail to get the memory available,
        because that means it's not sopported in the system for whatever reason.

2016-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Web Process crash when the layer tree host is destroyed
        https://bugs.webkit.org/show_bug.cgi?id=159922

        Reviewed by Sergio Villar Senin.

        It happens when the layer tree host is destroyed after the didChangeVisibleRect is scheduled to be run in the
        main thread, but before it's actually dispatched. In that case the threaded compositor client points to a
        deleted object and crashes when trying to dereference it.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::~ThreadedCompositor): Add an assert to ensure invalidate is always called before
        the object is deleted.
        (WebKit::ThreadedCompositor::invalidate): Terminate the compositing thread and nullify the client.
        (WebKit::ThreadedCompositor::didChangeVisibleRect): Return early if the client is null when the task is
        dispatched in the main thread.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: Add invalidate().
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::invalidate): Invalidate the ThreadedCompositor and chain up.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-07-19  Brian Burg  <bburg@apple.com>

        Web Automation: WebAutomationSessionProxy's HashMaps should support '0' as valid keys
        https://bugs.webkit.org/show_bug.cgi?id=159957
        <rdar://problem/27376446>

        Reviewed by Joseph Pecoraro.

        * WebProcess/Automation/WebAutomationSessionProxy.h:
        Use UnsignedWithZeroKeyHashTraits to avoid problems with zero as a key.

2016-07-19  Anders Carlsson  <andersca@apple.com>

        Some payment authorization status values should keep the sheet active
        https://bugs.webkit.org/show_bug.cgi?id=159936
        rdar://problem/26756701

        Reviewed by Tim Horton.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
        (WebKit::WebPaymentCoordinatorProxy::completePaymentSession):
        If the status isn't a final state status, bounce the current state back to active.

        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
        Rename the _authorized ivar to _didReachFinalState.

        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewControllerDidFinish:]):
        (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession):
        Set _didReachFinalState based on the return value of isFinalStateStatus.

2016-07-18  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the --minimal build fail in InjectedBundle.cpp
        https://bugs.webkit.org/show_bug.cgi?id=159770

        Reviewed by Benjamin Poulain.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:

2016-07-18  Alex Christensen  <achristensen@webkit.org>

        webbookmarksd needs to use the same AppCache directory as MobileSafari
        https://bugs.webkit.org/show_bug.cgi?id=159912
        <rdar://problem/27056844>

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
        Make webbookmarksd match MobileSafari by adding a matching runtime exception.

2016-07-18  Anders Carlsson  <andersca@apple.com>

        Don't null out the IPC::Connection's XPC connection
        https://bugs.webkit.org/show_bug.cgi?id=159911
        rdar://problem/27018065

        Reviewed by Alex Christensen.

        The function that nulls out the XPC connection, platformInvalidate(), is called from the connection queue,
        whereas the XPC connection is normally accessed from the main thread leading to inconsistencies when the
        connection is being invalidated while the main thread is trying to access it.
        
        Fix this by simply never nulling out the XPC connection. It will be released when the IPC::Connection is destroyed anyway.

        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::platformInvalidate):

2016-07-18  Tim Horton  <timothy_horton@apple.com>

        Tapping on an apple.com tab in tab overview stutters when switching to it
        https://bugs.webkit.org/show_bug.cgi?id=159904
        <rdar://problem/27192350>

        Reviewed by Simon Fraser.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
        In any case where we get to waitForDidUpdateViewState (usually a tab switch),
        if we have an outstanding didUpdate message, the Web process will not commit
        a new layer tree until it receives the didUpdate message. However, since
        waitForDidUpdateViewState synchronously blocks the UI process, we also
        won't *send* the didUpdate message, so we block for the full timeout duration.

        Instead, if we get to waitForDidUpdateViewState, just send the didUpdate without
        waiting for the DisplayLink or anything else, because calling rAF slightly too
        quickly, once, is certainly better than blocking the UI process for a whole second.

2016-07-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] ENABLE_OPENGL=OFF build broken since r201802
        https://bugs.webkit.org/show_bug.cgi?id=159909

        Reviewed by Antonio Gomes.

        * WebProcess/WebPage/LayerTreeHost.h: Add missing include.

2016-07-18  Anders Carlsson  <andersca@apple.com>

        WebKit nightly fails to build on macOS Sierra
        https://bugs.webkit.org/show_bug.cgi?id=159902
        rdar://problem/27365672

        Reviewed by Tim Horton.

        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
        Use new PassKitSPI header.

2016-07-18  Tim Horton  <timothy_horton@apple.com>

        Mail contents are temporarily obscured by black rectangles when returning from suspend and in app switcher
        https://bugs.webkit.org/show_bug.cgi?id=159894
        <rdar://problem/26973202>

        Reviewed by Simon Fraser.

        * UIProcess/ApplicationStateTracker.h:
        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
        (WebKit::ApplicationStateTracker::applicationDidCreateWindowContext):
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didMoveToWindow]):
        (-[WKContentView _applicationDidCreateWindowContext]):
        (-[WKContentView _applicationWillEnterForeground]): Deleted.
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView didMoveToWindow]):
        (-[WKPDFView _applicationDidCreateWindowContext]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
        Hide content at window context creation time, instead of when the application
        becomes foregrounded. Otherwise, background snapshots (which create/destroy
        window contexts, but do not bring the app into the foreground) can have
        parented layers that have volatile surfaces in them. In the normal case,
        we will subsequently get foregrounded and re-build the layer tree; in the
        background snapshot case, we will just have an empty layer tree.

        In the future, we should consider making ApplicationStateTracker use
        window context creation/destruction to drive web process lifetime, so
        that we can actually paint correctly for background snapshots.

2016-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.13.3.

2016-07-18  Csaba Osztrogonác  <ossy@webkit.org>

        [Mac][cmake] Unreviewed buildfix after r203338. Just for fun.

        * PlatformMac.cmake:

2016-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        MemoryPressureHandler doesn't work if cgroups aren't present in Linux
        https://bugs.webkit.org/show_bug.cgi?id=155255

        Reviewed by Sergio Villar Senin.

        There's no way to get notifications about memory pressure in Linux without using cgroups that doesn't require a
        manual polling. We can get that information from /proc/meminfo, but that's not pollable so it requires to
        manually check its contents in a loop sleeping for a while between checks. This means we would be waking up the
        process on every poll iteration, most of the times for nothing. That's specially problematic on devices running
        on battery. And taking into account that there's a memory pressure handler in every secondary process (Web,
        Network and Plugin), we would be waking up all those process all the time. However, not having a memory pressure
        handler is even more problematic than the manual polling.
        This patch adds a class MemoryPressureMonitor to the manual polling of /proc/meminfo, but runs in the UI
        process, to avoid the weakups in all other secondary processes, and uses an eventFD to notify all other
        processes. It's only used in case cgroups is not available. The eventFD descriptor is sent to all other
        processes at startup, and passed to the MemoryPressureHandler before install() is called for the first
        time. To minimize the wakeups even in the UI process, the poll interval is calculated from 1 to 5 seconds
        depending on the current memory used, so in case of low memory level we sleep for a longer time.
        It's also important to make the memory calculations as accurate as possible to avoid cleaning resources in the
        secondary processes unnecessarily.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess): Pass the memory pressure monitor file descriptor to the MemoryPressureHandler.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode): Encode memory pressure monitor handle.
        (WebKit::NetworkProcessCreationParameters::decode): Decode memory pressure monitor handle.
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * PlatformEfl.cmake: Add new file to compilation, and update include dirs.
        * PlatformGTK.cmake: Ditto.
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::initializePluginProcess): Pass the memory pressure monitor file descriptor to the MemoryPressureHandler.
        * Shared/Plugins/PluginProcessCreationParameters.cpp:
        (WebKit::PluginProcessCreationParameters::encode): Encode memory pressure monitor handle.
        (WebKit::PluginProcessCreationParameters::decode): Decode memory pressure monitor handle.
        * Shared/Plugins/PluginProcessCreationParameters.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Encode memory pressure monitor handle.
        (WebKit::WebProcessCreationParameters::decode): Decode memory pressure monitor handle.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::didFinishLaunching): Create the memory pressure monitor handle for the plugin
        process if needed.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess): Create the memory pressure monitor handle for the network
        process if needed.
        (WebKit::WebProcessPool::createNewWebProcess): Create the memory pressure monitor handle for the web process if
        needed.
        * UIProcess/linux/MemoryPressureMonitor.cpp: Added.
        (WebKit::lowWatermarkPages):
        (WebKit::systemPageSize):
        (WebKit::calculateMemoryAvailable):
        (WebKit::systemMemoryUsedAsPercentage):
        (WebKit::pollIntervalForUsedMemoryPercentage):
        (WebKit::isSystemdMemoryPressureMonitorAvailable):
        (WebKit::MemoryPressureMonitor::isEnabled):
        (WebKit::MemoryPressureMonitor::singleton):
        (WebKit::MemoryPressureMonitor::MemoryPressureMonitor):
        (WebKit::MemoryPressureMonitor::createHandle):
        * UIProcess/linux/MemoryPressureMonitor.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess): Pass the memory pressure monitor file descriptor to the MemoryPressureHandler.

2016-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r202855): [GTK] ASSERTION FAILED: m_webPage.bounds().contains(bounds)
        https://bugs.webkit.org/show_bug.cgi?id=159806

        Reviewed by Žan Doberšek.

        The problem is that since r202855, in case of non accelerated mode, the dirty region is updated too late when
        updating backing store state.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::updateBackingStoreState): Update the dirty region to the new size when not in
        accelerated compositing mode.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setSize): Update the WebPage size before resizing the frame and calling setNeedsDisplay() to
        ensure that any call to setNeedsDisplay() uses the new web page bounds. This is actually a regression introduced
        in r143472, where setNeedsDisplay was changed to use the web page bounds as directy rectangle. Before r143472
        the dirty rectangle was passed to setNeedsDisplay and it passed the right one.

2016-07-16  Sam Weinig  <sam@webkit.org>

        [WebKit API] Add SPI to track multiple navigations caused by a single user gesture
        <rdar://problem/26554137>
        https://bugs.webkit.org/show_bug.cgi?id=159856

        Reviewed by Dan Bernstein.

        * Shared/API/APIObject.h:
        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):
        * UIProcess/API/APIUserInitiatedAction.h: Added.
        Add new APIObject type, UserInitiatedAction.

        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
        Expose a _WKUserInitiatedAction on the WKNavigationAction.

        * UIProcess/API/Cocoa/_WKUserInitiatedAction.h: Added.
        * UIProcess/API/Cocoa/_WKUserInitiatedAction.mm: Added.
        (-[_WKUserInitiatedAction consume]):
        (-[_WKUserInitiatedAction isConsumed]):
        (-[_WKUserInitiatedAction _apiObject]):
        * UIProcess/API/Cocoa/_WKUserInitiatedActionInternal.h: Added.
        Add new _WKUserInitiatedAction type wrapping API::UserInitiatedAction.

        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode):
        (WebKit::NavigationActionData::decode):
        * Shared/NavigationActionData.h:
        Store the userGestureTokenIdentifier (as determined from the WebProcess's map) rather
        than just a single bit. This allows us to track if a user gesture is used for multiple navigations.

        * UIProcess/API/APINavigationAction.h:
        Add UserInitiatedAction member and re-implement isProcessingUserGesture in terms of it.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::createNewPage):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
        Get the API::UserInitiatedAction from the WebProcessProxy (if it exists), and pass
        it along to the API::NavigationAction.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::shutDown):
        (WebKit::WebProcessProxy::userInitiatedActivity):
        (WebKit::WebProcessProxy::didDestroyUserGestureToken):
        * UIProcess/WebProcessProxy.h:
        Keep a map of active userInitiatedActivity objects.

        * UIProcess/WebProcessProxy.messages.in:
        Add DidDestroyUserGestureToken message to manager API::UserInitiatedActivity lifetimes.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/Notifications/WebNotificationManager.cpp:
        (WebKit::WebNotificationManager::didClickNotification):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::performFrameLoadURLRequest):
        (WebKit::PluginView::evaluate):
        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::searchWithGoogle):
        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::play):
        (WebKit::WebPlaybackSessionManager::pause):
        (WebKit::WebPlaybackSessionManager::togglePlayState):
        (WebKit::WebPlaybackSessionManager::beginScrubbing):
        (WebKit::WebPlaybackSessionManager::endScrubbing):
        (WebKit::WebPlaybackSessionManager::seekToTime):
        (WebKit::WebPlaybackSessionManager::fastSeek):
        (WebKit::WebPlaybackSessionManager::beginScanningForward):
        (WebKit::WebPlaybackSessionManager::beginScanningBackward):
        (WebKit::WebPlaybackSessionManager::endScanning):
        (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
        (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
        Update for new UserGestureIndicator interface.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createWindow):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        Get an identifier for the UserGestureToken from the WebProcess singleton
        to pass to the WebProcess.

        * WebProcess/WebProcess.cpp:
        (WebKit::nextUserGestureTokenIdentifier):
        (WebKit::WebProcess::userGestureTokenIdentifier):
        (WebKit::WebProcess::userGestureTokenDestroyed):
        * WebProcess/WebProcess.h:
        Track UserGestureToken lifetimes utilizing the destructionObserver mechanism
        off the tokens to indicate destruction. When destroyed, notify the UIProcess
        to avoid leaks.

2016-07-17  Ryosuke Niwa  <rniwa@webkit.org>

        Rename fastHasAttribute to hasAttributeWithoutSynchronization
        https://bugs.webkit.org/show_bug.cgi?id=159864

        Reviewed by Chris Dumez.

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

2016-07-17  Jeremy Jones  <jeremyj@apple.com>

        REGRESSION (r191907): Maxthon Browser -After exit full screen video playback the browser window is blank with audio running
        https://bugs.webkit.org/show_bug.cgi?id=159731
        <rdar://problem/26674003>

        Reviewed by Tim Horton.

        Primarily written by Jer Noble  <jer.noble@apple.com>.

        When a view is removed from it's superview, and that superview's constraints property references
        the removed superview, those constraints are removed as well. Make sure to save off a copy of
        the superview's constraints before swapping in the placeholder view, and reapply those constraints
        when swapping the web view back into its original superview.

        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController setSavedConstraints:]):
        (-[WKFullScreenWindowController savedConstraints]):
        (-[WKFullScreenWindowController enterFullScreen:]):
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

2016-07-16  Ryosuke Niwa  <rniwa@webkit.org>

        Rename fastGetAttribute to attributeWithoutSynchronization
        https://bugs.webkit.org/show_bug.cgi?id=159852

        Reviewed by Darin Adler.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):
        (WebKit::WebPage::performActionOnElement):
        (WebKit::WebPage::getAssistedNodeInformation):

2016-07-15  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Fix element and event coord space issues
        https://bugs.webkit.org/show_bug.cgi?id=159851
        rdar://problem/27375780

        Reviewed by Brian Burg.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::performMouseInteraction): Subtract topContentInset() before
        it goes back out to WebDriver.
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::computeElementLayout): When using useViewportCoordinates,
        subtract topContentInset() so it matches expectations.

2016-07-15  Beth Dakin  <bdakin@apple.com>

        Mac UI process needs to know about element focus and blur, much like iOS
        https://bugs.webkit.org/show_bug.cgi?id=159843
        -and corresponding-
        rdar://problem/27229504

        Reviewed by Tim Horton.

        This patch makes the existing iOS machinery to handle focus and blurring of 
        elements cross-platform. Instead of using the existing iOS messages for 
        startAssistingNode/stopAssistingNode, this patch adds a new message that 
        require only a boolean parameter: setEditableElementIsFocused.

        Now that more of this code is shared, this patch teases 
        m_hasFocusedDueToUserInteraction out into two variables. I realized that it 
        was being used to mean two slightly different things on Mac and iOS, which 
        was very confusing. Now we have m_isAssistingNodeDueToUserInteraction to 
        represent the way iOS was using the variable, and we have 
        m_hasEverFocusedElementDueToUserInteractionSincePageTransition to represent 
        how Mac was using the variable. There should not be any behavior changes with 
        this re-name, just added clarity.

        WebViewImpl has a new member variable m_editableElementIsFocused.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::setEditableElementIsFocused):

        Pipe the new setEditableElementIsFocused message to WebViewImpl.
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setEditableElementIsFocused):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setEditableElementIsFocused):

        elementDidFocus() and elementDidBlur() are now PLATFORM(COCOA) instead of 
        PLATFORM(IOS)
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::elementDidFocus):
        (WebKit::WebChromeClient::elementDidBlur):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
        (WebKit::WebChromeClient::elementDidFocus): Deleted.
        (WebKit::WebChromeClient::elementDidBlur): Deleted.

        m_hasPendingBlurNotification is no longer iOS-only.
        * WebProcess/WebPage/WebPage.cpp:

        Use our two new bools m_isAssistingNodeDueToUserInteraction and 
        m_hasEverFocusedElementDueToUserInteractionSincePageTransition 
        (WebKit::WebPage::didStartPageTransition):
        (WebKit::WebPage::didChangeSelection):

        These functions are all newly cross-platform. The Messages they send are 
        still platform-specific, but otherwise the logic is the same. We 
        dispatch_async the blur messages so that the UI process features won’t be 
        flashy when the user is tapping, tabbing, or clicking through form fields.
        (WebKit::WebPage::resetAssistedNodeForFrame):
        (WebKit::WebPage::elementDidFocus):
        (WebKit::WebPage::elementDidBlur):

        resetAssistedNodeForFrame() is no longer iOS-only. 
        (WebKit::WebPage::didCommitLoad):

        Move variables and functions around so that they are defined for the right 
        platform, and declare the two new bools in place of the old one.
        * WebProcess/WebPage/WebPage.h:

        These functions are now defined in WebPage.cpp
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::resetAssistedNodeForFrame): Deleted.
        (WebKit::WebPage::elementDidFocus): Deleted.
        (WebKit::WebPage::elementDidBlur): Deleted.

2016-07-15  Geoffrey Garen  <ggaren@apple.com>

        Added a makeRef<T> helper
        https://bugs.webkit.org/show_bug.cgi?id=159835

        Reviewed by Andreas Kling.

        Anders told me to!

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::addWorkQueueMessageReceiver):
        (IPC::Connection::removeWorkQueueMessageReceiver):
        (IPC::Connection::invalidate):
        (IPC::Connection::sendMessage):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::enqueueIncomingMessage):
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::receiveSourceEventHandler):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
        (WebKit::ThreadedCompositor::setDeviceScaleFactor):
        (WebKit::ThreadedCompositor::didChangeViewportSize):
        (WebKit::ThreadedCompositor::didChangeViewportAttribute):
        (WebKit::ThreadedCompositor::didChangeContentsSize):
        (WebKit::ThreadedCompositor::scrollTo):
        (WebKit::ThreadedCompositor::scrollBy):
        (WebKit::ThreadedCompositor::didChangeVisibleRect):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::lookupContentExtension):
        (API::UserContentExtensionStore::compileContentExtension):
        (API::UserContentExtensionStore::removeContentExtension):
        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::ProcessLauncher):
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageNamespace):
        (WebKit::StorageManager::destroySessionStorageNamespace):
        (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
        (WebKit::StorageManager::cloneSessionStorageNamespace):
        (WebKit::StorageManager::processDidCloseConnection):
        (WebKit::StorageManager::getSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
        (WebKit::StorageManager::getLocalStorageOrigins):
        (WebKit::StorageManager::getLocalStorageOriginDetails):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
        (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
        * UIProcess/WebResourceLoadStatisticsStore.cpp:
        (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::wheelEvent):
        (WebKit::EventDispatcher::gestureEvent):
        (WebKit::EventDispatcher::touchEvent):
        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):

2016-07-15  Chris Dumez  <cdumez@apple.com>

        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible
        https://bugs.webkit.org/show_bug.cgi?id=159793

        Reviewed by Ryosuke Niwa.

        Use fastGetAttribute() / setAttributeWithoutSynchronization() when possible, for performance.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::PDFPlugin):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::createPasswordEntryForm):
        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
        (WebKit::PDFPluginAnnotation::attach):
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
        (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):

2016-07-15  Ryosuke Niwa  <rniwa@webkit.org>

        Disable custom elements in Safari Tech Preview
        https://bugs.webkit.org/show_bug.cgi?id=159829

        Reviewed by Chris Dumez.
 
        Disable custom elements API in Safari Technology Preview. Our implementation is so out of sync
        with the latest spec that it's actively harmful to have this feature enabled.

        * Shared/WebPreferencesDefinitions.h:

2016-07-15  Jer Noble  <jer.noble@apple.com>

        Full screen ePub embedded video is playing on 1/4 screen, cut off
        https://bugs.webkit.org/show_bug.cgi?id=159737
        <rdar://problem/26259404>

        Reviewed by Tim Horton.

        Set the fixedLayoutSize to CGSizeZero when disabling fixed layout due to the 
        WebView not supporting arbitrary layout modes, and reset to the saved value
        when the view does begin supporting arbitrary layout modes.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::setFixedLayoutSize):
        (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):

2016-07-14  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r203248.

        This change causes LayoutTests to crash and exit early

        Reverted changeset:

        "Use more Refs with WorkQueues"
        https://bugs.webkit.org/show_bug.cgi?id=159792
        http://trac.webkit.org/changeset/203248

2016-07-14  Chris Dumez  <cdumez@apple.com>

        Use emptyString() instead of "" when possible
        https://bugs.webkit.org/show_bug.cgi?id=159789

        Reviewed by Alex Christensen.

        Use emptyString() instead of "" when possible to reduce String allocations.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::pasteboardChangedOwner):
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::parseRFC822HeaderFields):
        (WebKit::NPN_Status):

2016-07-14  Alex Christensen  <achristensen@webkit.org>

        Use more Refs with WorkQueues
        https://bugs.webkit.org/show_bug.cgi?id=159792

        Reviewed by Brady Eidson.

        * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::setShouldExitOnSyncMessageSendFailure):
        (IPC::Connection::addWorkQueueMessageReceiver):
        * Platform/IPC/Connection.h:
        * Shared/mac/SecItemShim.cpp:
        (WebKit::SecItemShim::initializeConnection):
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::create):
        (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
        (WebKit::StorageManager::StorageManager):
        * UIProcess/Storage/StorageManager.h:
        * UIProcess/WebResourceLoadStatisticsStore.cpp:
        (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
        (WebKit::WebResourceLoadStatisticsStore::processDidCloseConnection):
        * UIProcess/mac/SecItemShimProxy.cpp:
        (WebKit::SecItemShimProxy::initializeConnection):
        (WebKit::SecItemShimProxy::secItemRequest):
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::initializeConnection):
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::initializeConnection):
        (WebKit::EventDispatcher::wheelEvent):
        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
        (WebKit::ViewUpdateDispatcher::initializeConnection):
        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):

2016-07-14  Timothy Hatcher  <timothy@apple.com>

        Web Automation: FrameNotFound errors happen a lot for the main frame
        https://bugs.webkit.org/show_bug.cgi?id=159777
        rdar://problem/27224628

        Send both pageID and frameID, and have the WebProcess side resolve the
        mainFrame from 0 based on the known pageID. This avoids a race waiting
        for the DidCreateMainFrame message.

        Reviewed by Brian Burg.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::webFrameIDForHandle):
        (WebKit::WebAutomationSession::switchToBrowsingContext):
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
        (WebKit::WebAutomationSession::resolveChildFrameHandle):
        (WebKit::WebAutomationSession::resolveParentFrameHandle):
        (WebKit::WebAutomationSession::computeElementLayout):
        (WebKit::WebAutomationSession::getAllCookies):
        (WebKit::WebAutomationSession::deleteSingleCookie):
        (WebKit::WebAutomationSession::webFrameProxyForHandle): Deleted.
        (WebKit::WebAutomationSession::webFrameIDForHandle): Added.
        * UIProcess/Automation/WebAutomationSession.h:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
        (WebKit::WebAutomationSessionProxy::resolveParentFrame):
        (WebKit::WebAutomationSessionProxy::focusFrame):
        (WebKit::WebAutomationSessionProxy::computeElementLayout):
        (WebKit::WebAutomationSessionProxy::takeScreenshot):
        (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
        (WebKit::WebAutomationSessionProxy::deleteCookie):
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:

2016-07-14  Alex Christensen  <achristensen@webkit.org>

        Use SocketProvider to create SocketStreamHandles
        https://bugs.webkit.org/show_bug.cgi?id=159774

        Reviewed by Brady Eidson.

        * WebProcess/Network/WebSocketProvider.cpp:
        (WebKit::WebSocketProvider::createSocketStreamHandle):
        (WebKit::WebSocketProvider::createWebSocketChannel): Deleted.
        * WebProcess/Network/WebSocketProvider.h:

2016-07-14  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Potential null dereference under ViewGestureController::beginSwipeGesture()
        https://bugs.webkit.org/show_bug.cgi?id=159776
        <rdar://problem/22467100>

        Reviewed by Tim Horton.

        Potential null dereference under ViewGestureController::beginSwipeGesture() of:
        m_webPageProxy.backForwardList().currentItem()

        The client side is expected to call ViewGestureController::canSwipeInDirection() but
        this only guarantees that the m_alternateBackForwardListSourceView's currentItem is
        non-null when m_alternateBackForwardListSourceView is non-null. It does not guarantee
        that m_webPageProxy's currentItem is non-null.

        * UIProcess/ios/ViewGestureControllerIOS.mm:
        (WebKit::ViewGestureController::beginSwipeGesture):

2016-07-14  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(WEB_SOCKETS) build after r202930
        https://bugs.webkit.org/show_bug.cgi?id=159768

        Reviewed by Alex Christensen.

        * WebProcess/Network/WebSocketProvider.h:

2016-07-14  Chris Dumez  <cdumez@apple.com>

        Possible crash under NavigationState::NavigationClient::processDidCrash()
        https://bugs.webkit.org/show_bug.cgi?id=159773
        <rdar://problem/19814215>

        Reviewed by Anders Carlsson.

        Add a m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash before
        trying to call it to avoid crashing if the client does not implement it.

        At the beginning of the method, we abort early only if both webViewWebContentProcessDidTerminate
        and webViewWebProcessDidCrash are implemented. However, if webViewWebContentProcessDidTerminate
        implemented but not webViewWebProcessDidCrash we can end up crashing as we fail to check later
        on before trying to call it.

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

2016-07-14  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the DatabaseProcess build with disabled IDB
        https://bugs.webkit.org/show_bug.cgi?id=159769

        Reviewed by Alex Christensen.

        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::didClose):

2016-07-14  Hyunjun Ko  <zzoon@igalia.com>

        [ThreadedCompositor] Build fails in debug mode after r202040
        https://bugs.webkit.org/show_bug.cgi?id=159757

        Reviewed by Michael Catanzaro.

        Debug mode build failed due to call getter method, which is
        removed, in ASSERT().

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::glContext): Deleted.
        (WebKit::ThreadedCompositor::didChangeVisibleRect): Deleted.
        (WebKit::ThreadedCompositor::renderLayerTree): Deleted.

2016-07-13  Alex Christensen  <achristensen@webkit.org>

        Modernize WebSocket handle
        https://bugs.webkit.org/show_bug.cgi?id=159750

        Reviewed by Brady Eidson.

        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
        (WebKit::connectionCallback):

2016-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r202273): [GTK] Redirected X window is resized to the previous size on size allocate
        https://bugs.webkit.org/show_bug.cgi?id=159551

        Reviewed by Michael Catanzaro.

        In r202273 I added webkitWebViewBaseResizeRedirectedWindow() helper to remove duplicated code in all places
        where we were resizing the redirected window to the current drawing area size. But on size allocate, we were
        updating the redirected window first, and then the drawing area, to ensure that when the drawing area notifies
        the web process the redirected window is already at the new size. This regression doesn't have any visual
        effect, because we are ensure the right size always before rendering, but there's a small extra resize in this case.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseSizeAllocate): Resize the redirected window before updating the drawing area size.

2016-07-13  Chris Dumez  <cdumez@apple.com>

        [WK2] Use more references for connections
        https://bugs.webkit.org/show_bug.cgi?id=159739

        Reviewed by Alex Christensen.

        Use more references for connections to make it more obvious they cannot
        be null.

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        (WebKit::DatabaseToWebProcessConnection::connection):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::messageSenderConnection):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        (WebKit::NetworkConnectionToWebProcess::connection):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::messageSenderConnection):
        * Shared/mac/CookieStorageShim.mm:
        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::messageSenderConnection):
        (WebKit::preregisterSandboxExtensionsIfNecessary):
        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
        (WebKit::WebToDatabaseProcessConnection::connection):
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerFileBlobURL):
        (WebKit::BlobRegistryProxy::registerBlobURL):
        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
        (WebKit::BlobRegistryProxy::unregisterBlobURL):
        (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
        (WebKit::BlobRegistryProxy::blobSize):
        (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::NetworkProcessConnection):
        (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
        * WebProcess/Network/NetworkProcessConnection.h:
        (WebKit::NetworkProcessConnection::connection):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        (WebKit::WebLoaderStrategy::remove):
        (WebKit::WebLoaderStrategy::setDefersLoading):
        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
        (WebKit::WebLoaderStrategy::createPingHandle):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::messageSenderConnection):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::cookiesForDOM):
        (WebKit::WebPlatformStrategies::setCookiesFromDOM):
        (WebKit::WebPlatformStrategies::cookiesEnabled):
        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
        (WebKit::WebPlatformStrategies::getRawCookies):
        (WebKit::WebPlatformStrategies::deleteCookie):
        (WebKit::WebPlatformStrategies::addCookie):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::startDownload):
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
        (WebKit::WebProcess::networkConnection):
        (WebKit::WebProcess::prefetchDNS):
        * WebProcess/WebProcess.h:

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

        Move WKPreferencesRef functions to the correct file
        https://bugs.webkit.org/show_bug.cgi?id=159741

        Reviewed by Sam Weinig.

        Also, get rid of WKPreferencesGetPaymentsEnabled and WKPreferencesSetPaymentsEnabled.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesGetApplePayEnabled):
        (WKPreferencesSetApplePayEnabled):
        (WKPreferencesGetApplePayCapabilityDisclosureAllowed):
        (WKPreferencesSetApplePayCapabilityDisclosureAllowed):
        * UIProcess/API/C/WKPreferencesRef.h:
        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
        (WKPreferencesGetApplePayEnabled): Deleted.
        (WKPreferencesSetApplePayEnabled): Deleted.
        (WKPreferencesGetApplePayCapabilityDisclosureAllowed): Deleted.
        (WKPreferencesSetApplePayCapabilityDisclosureAllowed): Deleted.
        (WKPreferencesGetPaymentsEnabled): Deleted.
        (WKPreferencesSetPaymentsEnabled): Deleted.

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

        Add _applePayCapabilityDisclosureAllowed SPI declaration
        https://bugs.webkit.org/show_bug.cgi?id=159740

        Reviewed by Dan Bernstein.

        Also, delete an old method that is no longer used.

        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _paymentsEnabled]): Deleted.
        (-[WKWebViewConfiguration _setPaymentsEnabled:]): Deleted.

2016-07-13  Zalan Bujtas  <zalan@apple.com>

        Blank news article on kottke.org
        https://bugs.webkit.org/show_bug.cgi?id=159733
        <rdar://problem/26743065>

        Reviewed by Simon Fraser.

        This patch ensures that we update the visible content rect, when Auto Layout moves the WKWebView around.
        We normally expect setFrameRect to be called to position WKWebView. However Auto Layout relies on layoutSubviews,
        and in order to always have up-to-date visible content rect, we need to override layoutSubviews in WKWebView. 

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

2016-07-13  Chris Dumez  <cdumez@apple.com>

        WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.
        https://bugs.webkit.org/show_bug.cgi?id=159725
        <rdar://problem/27323131>

        Reviewed by Andy Estes.

        WebKit2 shouldn't signal custom protocol clients from the NSURLConnection
        loader thread. Instead, use the RunLoop the WKCustomProtocol was initialized
        on.

        * NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
        (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
        (WebKit::dispatchOnInitializationRunLoop):
        (WebKit::CustomProtocolManager::didFailWithError):
        (WebKit::CustomProtocolManager::didLoadData):
        (WebKit::CustomProtocolManager::didReceiveResponse):
        (WebKit::CustomProtocolManager::didFinishLoading):
        (WebKit::CustomProtocolManager::wasRedirectedToRequest):
        (WebKit::dispatchOnResourceLoaderRunLoop): Deleted.

2016-07-13  Enrica Casucci  <enrica@apple.com>

        Update supported platforms in xcconfig files to match the sdk names.
        https://bugs.webkit.org/show_bug.cgi?id=159728

        Reviewed by Tim Horton.

        * Configurations/Base.xcconfig:

2016-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Coordinated Graphics] Remove toCoordinatedGraphicsLayer and use downcast instead
        https://bugs.webkit.org/show_bug.cgi?id=159469

        Reviewed by Michael Catanzaro.

        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
        (WebKit::CompositingCoordinator::flushPendingLayerChanges):
        (WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
        (WebKit::CompositingCoordinator::mainContentsLayer):

2016-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitGtk+ uses too many file descriptors
        https://bugs.webkit.org/show_bug.cgi?id=152316

        Reviewed by Michael Catanzaro.

        The problem is that we are keeping file descriptors open in SharedMemory objects. Those objects can be kept
        alive for a long time, for example in case of cached resources sent from the network process as shareable
        resources. The thing is that we keep the file descriptor in the SharedMemory object only to be able to create a
        Handle, duplicating the file descriptor. However, we are also assuming that we create handles for SharedMemory
        objects created by another handle which is wrong. SharedMemory objects are created to map a file or data and
        then a handle is created to send it to another process, or to map an existing file or data for a given handle
        received from another process. They can also be created to wrap another map, but in that case we don't own the
        file descritor nor the mapped data. So, after mapping from a handle, we no longer need the file descriptor, and
        it can be closed to release it, while the mapped memory data will still be alive until munmap() is called. This
        drastically reduces the amount of file descriptors used by WebKitGTK+.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::readBytesFromSocket): Use setCloseOnExec().
        (IPC::Connection::createPlatformConnection): Ditto.
        * Platform/SharedMemory.h:
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::map): Close the file descriptor right after mmap.
        (WebKit::SharedMemory::~SharedMemory): Close the file descriptor only if it hasn't been closed yet.
        (WebKit::SharedMemory::createHandle): Add an ASSERT to ensure we only try to create a handle for SharedMemory
        objects having a valid file descriptor. Use dupCloseOnExec() to duplicate the handle and set the close on exec flag.
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::launchProcess): Use setCloseOnExec().

2016-07-12  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] After zooming and when under memory pressure, page tiles sometimes don't redraw while panning
        https://bugs.webkit.org/show_bug.cgi?id=159697
        rdar://problem/26314075

        Reviewed by Benjamin Poulain.

        When under memory pressure, and after pinching back to minimum scale, WebPage::updateVisibleContentRects()
        would sometimes always bail under the "boundedScale != currentScale..." condition.

        This happened because the visibleContentRectUpdateInfo.scale() is a double, but m_page->pageScaleFactor()
        is a float, and the constraining between min and max scale (which are doubles) caused boundedScale
        to be always different from currentScale.

        Fix by using floats throughout.

        No test because there's no way to simulate memory pressure for testing.

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

2016-07-12  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkSession] Fix unsafe RunLoop::dispatch() in NetworkLoad constructor
        https://bugs.webkit.org/show_bug.cgi?id=159691

        Reviewed by Brady Eidson.

        Remove unsafe RunLoop::dispatch() in NetworkLoad constructor. It captured |this| but there
        was no guarantee the NetworkLoad would still be alive by the time the lambda gets executed.

        Instead, the constructor now takes a NetworkSession& parameter so that the call sites
        have to retrieve the NetworkSession for a given SessionID and deal with the fact that
        there may be no such NetworkSession before constructing the NetworkLoad.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::PendingDownload):
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

2016-07-12  Chris Dumez  <cdumez@apple.com>

        [WK2] Protect against bad database data in LocalStorageDatabase::importItems()
        https://bugs.webkit.org/show_bug.cgi?id=159663
        <rdar://problem/18995873>

        Reviewed by Benjamin Poulain.

        Protect against bad database data in LocalStorageDatabase::importItems(). We
        crash if the database contains a null key or a null value so protect against
        it given that we have evidence it can happen.

        With this change, I can no longer reproduce the UIProcess crash on evernote.com
        that is documented at <rdar://problem/18995873>.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::importItems):

2016-07-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Remove ENABLE_CSS3_TEXT_LINE_BREAK flag
        https://bugs.webkit.org/show_bug.cgi?id=159671

        Reviewed by Csaba Osztrogonác.

        ENABLE_CSS3_TEXT_LINE_BREAK feature was implemented without guards.
        https://bugs.webkit.org/show_bug.cgi?id=89235

        So this guard can be removed in build scripts.

        * Configurations/FeatureDefines.xcconfig:

2016-07-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in platform/efl and platform/mac 
        https://bugs.webkit.org/show_bug.cgi?id=159548

        Reviewed by Alex Christensen.

        Remove all use of PassRefPtr and clean up unnecessary tabs and spaces.
        WebKit2 codes are also changed because of setBufferForType()'s modification.

        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
        (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::setBufferForType):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2016-07-11  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Intermittent crash in [UIApplication beginBackgroundTaskWithName] expiration handler
        https://bugs.webkit.org/show_bug.cgi?id=159648
        <rdar://problem/27219361>

        Reviewed by Anders Carlsson.

        We see an intermittent crash in [UIApplication beginBackgroundTaskWithName] expiration handler.
        From the traces, we noticed the expiration handler can get called on a non-main thread under
        certain conditions, which our code is designed to deal with.

        In particular, we get called on a non-main thread when UIKit fails to acquire the assertion.
        Update our expiration handler to always notify the clients on the main thread.

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

2016-07-11  Dan Bernstein  <mitz@apple.com>

        Tried to fix the macOS build.

        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (-[WKNavigationAction description]):

2016-07-11  Dan Bernstein  <mitz@apple.com>

        Cleaned up API availability.

        Requested by Tim Horton.

        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:

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

        Add synthetic click origin to WKNavigationAction.
        https://bugs.webkit.org/show_bug.cgi?id=159584
        rdar://problem/25610422

        Reviewed by Tim Horton.

        Adds a private property to WKNavigationAction to retrieve
        the origin of the synthetic click.

        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode):
        (WebKit::NavigationActionData::decode):
        * Shared/NavigationActionData.h:
        * Shared/WebEvent.h:
        (WebKit::WebMouseEvent::button):
        (WebKit::WebMouseEvent::menuTypeForEvent):
        (WebKit::WebMouseEvent::force):
        (WebKit::WebMouseEvent::syntheticClickType):
        * Shared/WebMouseEvent.cpp:
        (WebKit::WebMouseEvent::WebMouseEvent):
        (WebKit::WebMouseEvent::encode):
        (WebKit::WebMouseEvent::decode):
        * Shared/mac/WebEventFactory.mm:
        (WebKit::WebEventFactory::createWebMouseEvent):
        (WebKit::WebEventFactory::createWebWheelEvent):
        * UIProcess/API/APINavigationAction.h:
        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (toWKNavigationType):
        (toWKSyntheticClickType):
        (-[WKNavigationAction description]):
        (-[WKNavigationAction sourceFrame]):
        (-[WKNavigationAction request]):
        (-[WKNavigationAction _syntheticClickType]):
        (-[WKNavigationAction modifierFlags]):
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
        (-[WKContentView _longPressRecognized:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::getSelectionContext):
        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
        (WebKit::WebPageProxy::selectWithTwoTouches):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::mouseButtonForMouseEvent):
        (WebKit::syntheticClickTypeForMouseEvent):
        (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
        (WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction):
        (WebKit::InjectedBundleNavigationAction::syntheticClickTypeForNavigationAction):
        (WebKit::InjectedBundleNavigationAction::create):
        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
        (WebKit::InjectedBundleNavigationAction::navigationType):
        (WebKit::InjectedBundleNavigationAction::modifiers):
        (WebKit::InjectedBundleNavigationAction::mouseButton):
        (WebKit::InjectedBundleNavigationAction::hitTestResult):
        (WebKit::InjectedBundleNavigationAction::formElement):
        (WebKit::InjectedBundleNavigationAction::syntheticClickType):
        (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
        (WebKit::InjectedBundleNavigationAction::shouldTryAppLinks):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createWindow):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
        (WebKit::WebPage::contextMenuAtPointInWindow):
        (WebKit::WebPage::dragEnded):
        (WebKit::WebPage::simulateMouseDown):
        (WebKit::WebPage::simulateMouseUp):
        (WebKit::WebPage::simulateMouseMotion):
        (WebKit::WebPage::setCompositionForTesting):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::handleSyntheticClick):
        (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
        (WebKit::WebPage::completeSyntheticClick):
        (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
        (WebKit::WebPage::handleTwoFingerTapAtPoint):
        (WebKit::WebPage::potentialTapAtPosition):
        (WebKit::WebPage::inspectorNodeSearchMovedToPosition):

2016-07-11  Anders Carlsson  <andersca@apple.com>

        Able to open multiple payment sheets in Safari at the same time
        https://bugs.webkit.org/show_bug.cgi?id=159637
        rdar://problem/26411339

        Reviewed by Beth Dakin.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
        (WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
        Add result out parameter. Set the result to false if isShowingPaymentUI is true, otherwise set isShowingPaymentUI to true.
    
        (WebKit::WebPaymentCoordinatorProxy::didReachFinalState):
        Set isShowingPaymentUI to false.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
        (WebKit::WebPaymentCoordinator::showPaymentUI):
        * WebProcess/ApplePay/WebPaymentCoordinator.h:
        The showPaymentUI message and client functions now return booleans.

2016-07-11  Commit Queue  <commit-queue@webkit.org>

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

        This change causes LayoutTest crashes on WK1 ASan (Requested
        by ryanhaddad on #webkit).

        Reverted changeset:

        "Use refs for ResourceLoaders"
        https://bugs.webkit.org/show_bug.cgi?id=159592
        http://trac.webkit.org/changeset/203064

2016-07-11  Nan Wang  <n_wang@apple.com>

        AX: WKWebView should have API to prevent pinch-to-zoom always being allowed
        https://bugs.webkit.org/show_bug.cgi?id=158364

        Reviewed by Anders Carlsson.

        Added a property in WKWebViewConfiguration so that developers can toggle the ignoring
        viewport scale limits setting.

        Changes are covered in modified tests.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetResourceCachingDisabled):
        (WKPageSetIgnoresViewportScaleLimits):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (shouldAllowPictureInPictureMediaPlayback):
        (-[WKWebView _initializeWithConfiguration:]):
        (-[WKWebView _navigationGestureDidEnd]):
        (forceAlwaysUserScalableChangedCallback): Deleted.
        (-[WKWebView _updateForceAlwaysUserScalable]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
        (WebKit::WebPageProxy::setForceAlwaysUserScalable):
        (WebKit::WebPageProxy::setMaximumUnobscuredSize):
        (WebKit::WebPageProxy::updateForceAlwaysUserScalable): Deleted.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::disableInspectorNodeSearch):
        (WebKit::WebPage::setForceAlwaysUserScalable):
        (WebKit::innerFrameQuad):
        (WebKit::WebPage::updateForceAlwaysUserScalable): Deleted.

2016-07-08  Alex Christensen  <achristensen@webkit.org>

        Use refs for ResourceLoaders
        https://bugs.webkit.org/show_bug.cgi?id=159592

        Reviewed by Chris Dumez.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad):
        (WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired):
        (WebKit::WebLoaderStrategy::startLocalLoad):
        (WebKit::WebLoaderStrategy::remove):
        (WebKit::WebLoaderStrategy::setDefersLoading):
        (WebKit::WebLoaderStrategy::crossOriginRedirectReceived):
        * WebProcess/Network/WebLoaderStrategy.h:

2016-07-11  Antti Koivisto  <antti@apple.com>

        Update stable cache version in NetworkCache::Storage::deleteOldVersions()
        https://bugs.webkit.org/show_bug.cgi?id=159618
        rdar://problem/26715745

        Reviewed by Chris Dumez.

        NetworkCache::Storage::deleteOldVersions() keeps the previous shipped cache version (4) for Mac around so
        development WebKit doesn’t clobber system Safari cache. Update this to the current version so old caches
        go away in customer systems.

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

            Move lastStableVersion to header next to the current version.

2016-07-10  Beth Dakin  <bdakin@apple.com>

        Update mediaIcon.pdf
        https://bugs.webkit.org/show_bug.cgi?id=159613
        -and corresponding-
        rdar://problem/27268111

        Reviewed by Sam Weinig.

        * Resources/mediaIcon.pdf: Replaced.

2016-07-10  Alex Christensen  <achristensen@webkit.org>

        Add self to WebKit2 Owners
        https://bugs.webkit.org/show_bug.cgi?id=159499

        Reviewed by Sam Weinig.

        * Owners:

2016-07-10  Alex Christensen  <achristensen@webkit.org>

        Fix client certificate authentication after r200463
        https://bugs.webkit.org/show_bug.cgi?id=159574
        <rdar://problem/26931006>

        Reviewed by Sam Weinig.

        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
        (WebKit::leafCertificate):
        (WebKit::chain):
        Handle the different types of CertificateInfos.

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

        When WKWebView prepares the session state blob, we should be able to filter it.
        https://bugs.webkit.org/show_bug.cgi?id=159410

        Add a SPI to WKWebView so that a client can decide how to filter backforward items
        when WKWebView perparing session state.

        Reviewed by Brady Eidson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _sessionStateWithFilter:]): When preparing session state, check each
        backforward item against the filter block.
        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add the SPI _sessionStateWithFilter:


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

        Mail messages don't start loading until scrolling completes
        https://bugs.webkit.org/show_bug.cgi?id=159585
        <rdar://problem/27088405>

        Reviewed by Andy Estes.

        * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
        (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
        When scrolling, NSDefaultRunLoopMode isn't run, but NSRunLoopCommonModes are.
        CFNetwork uses NSDefaultRunLoopMode if we tell NSURLConnection to "start immediately",
        but we can instead schedule our NSURLConnection into NSRunLoopCommonModes
        and start it ourselves, ensuring that it will be able to do work while scrolling is happening.

2016-07-08  Andy Estes  <aestes@apple.com>

        [Content Filtering] Load blocked pages more like other error pages are loaded
        https://bugs.webkit.org/show_bug.cgi?id=159485
        <rdar://problem/26014076>

        Reviewed by Brady Eidson.

        * Shared/API/c/WKErrorRef.h: Defined kWKErrorCodeFrameLoadBlockedByContentFilter.
        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
        (WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess): Added the resource directories
        of WebCore.framework and WebKit.framework as paths with assumed read access.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::hasAssumedReadAccessToURL): Checked platformPathsWithAssumedReadAccess()
        as well as m_localPathsWithAssumedReadAccess.
        (WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess): Added a non-Cocoa implementation.
        * UIProcess/WebProcessProxy.h:
        * WebProcess/WebCoreSupport/WebErrors.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::blockedByContentFilterError): Called WebKit::blockedByContentFilterError().
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        (WebKit::blockedByContentFilterError): Returned a ResourceError for kWKErrorCodeFrameLoadBlockedByContentFilter.

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

        Fix 32-bit build.

        * PluginProcess/mac/PluginProcessShim.mm:

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

        REGRESSION (r196321): Adobe Reader DC + Safari : Zoom level pulldown is not displayed at the correct position
        https://bugs.webkit.org/show_bug.cgi?id=159531
        rdar://problem/26382579

        Reviewed by Tim Horton.

        There's code in the Adobe Acrobat framework that checks if the main bundle identifier is "com.apple.WebKit.PluginProcess"
        and assumes that it's running inside the Adobe Reader app if it's something else. Since we're now using the XPC service
        for all plug-ins, the bundle identifier is "com.apple.WebKit.Plugin.64", so the Acrobat framework assumes it's running in the app
        and doesn't use any special tricks to show the popup menu.
        
        Work around this by shimming CFStringCompare, and looking for the exact conditions when this can happen and return kCFCompareEqualTo
        when all conditions are true.
        
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::isAdobeAcrobatAddress):
        (WebKit::stringCompare):
        (WebKit::initializeShim):
        (WebKit::PluginProcess::platformInitializeProcess):
        * PluginProcess/mac/PluginProcessShim.h:
        * PluginProcess/mac/PluginProcessShim.mm:
        (WebKit::shimCFStringCompare):

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

        Unreviewed: Fix case-sensitive filesystem build.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

2016-07-08  Commit Queue  <commit-queue@webkit.org>

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

        caused some tests to crash under GuardMalloc (Requested by
        estes on #webkit).

        Reverted changeset:

        "[Content Filtering] Load blocked pages more like other error
        pages are loaded"
        https://bugs.webkit.org/show_bug.cgi?id=159485
        http://trac.webkit.org/changeset/202944

2016-07-08  Keith Rollin  <krollin@apple.com>

        Add always-on logging for downloads
        https://bugs.webkit.org/show_bug.cgi?id=159521
        <rdar://problem/26630645>

        Reviewed by Alex Christensen.

        Add logging statements that track when a download starts, when it
        first receives data, and when the download is done (due to completion,
        cancelation, or failure).

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::didReceiveResponse):
        (WebKit::Download::didReceiveData):
        (WebKit::Download::didFinish):
        (WebKit::Download::didFail):
        (WebKit::Download::didCancel):
        (WebKit::Download::isAlwaysOnLoggingAllowed):
        * NetworkProcess/Downloads/Download.h:
        (WebKit::Download::Download):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

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

        Clearing LocalStorage doesn't also delete -wal and -shm files.
        <rdar://problem/27206772> and https://bugs.webkit.org/show_bug.cgi?id=159566

        Reviewed by Brent Fulgham.
        Also helpfully picked over by Andy "Never Forgets" Estes.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):

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

        [Content Filtering] Load blocked pages more like other error pages are loaded
        https://bugs.webkit.org/show_bug.cgi?id=159485
        <rdar://problem/26014076>

        Reviewed by Brady Eidson.

        * Shared/API/c/WKErrorRef.h: Defined kWKErrorCodeFrameLoadBlockedByContentFilter.
        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
        (WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess): Added the resource directories
        of WebCore.framework and WebKit.framework as paths with assumed read access.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::hasAssumedReadAccessToURL): Checked platformPathsWithAssumedReadAccess()
        as well as m_localPathsWithAssumedReadAccess.
        (WebKit::WebProcessProxy::platformPathsWithAssumedReadAccess): Added a non-Cocoa implementation.
        * UIProcess/WebProcessProxy.h:
        * WebProcess/WebCoreSupport/WebErrors.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::blockedByContentFilterError): Called WebKit::blockedByContentFilterError().
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        (WebKit::blockedByContentFilterError): Returned a ResourceError for kWKErrorCodeFrameLoadBlockedByContentFilter.

2016-07-07  Alex Christensen  <achristensen@webkit.org>

        Followup to r202939.
        https://bugs.webkit.org/show_bug.cgi?id=159526

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFailLoading):
        We need the correct destination id when sending a message.

2016-07-07  Alex Christensen  <achristensen@webkit.org>

        Fix crash when sending failure message to closed WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=159526
        <rdar://problem/26767037>

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFailLoading):
        Check to see if there is a connection before using it to send a message.
        Sometimes it was null.
        I think this could be tested if we had real network loading from TestWebKitAPI
        by cancelling slow loads and closing WebProcesses around the same time, but no such infrastructure exists yet.

2016-07-07  Alex Christensen  <achristensen@webkit.org>

        Use SocketProvider to create WebSocketChannels
        https://bugs.webkit.org/show_bug.cgi?id=158776

        Reviewed by Brent Fulgham.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Network/WebSocketProvider.cpp: Copied from Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp.
        (WebKit::WebSocketProvider::createWebSocketChannel):
        (WebCore::ThreadableWebSocketChannel::create): Deleted.
        * WebProcess/Network/WebSocketProvider.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):

2016-07-07  Antoine Quint  <graouts@apple.com>

        <img> with a wide gamut PDF does not display using a wide gamut color space
        https://bugs.webkit.org/show_bug.cgi?id=158983
        <rdar://problem/25720247>

        Reviewed by Dean Jackson.

        ColorSpace parameters have been replaced with CGColorSpaceRef parameters for IOSurface.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::decode):
        (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _takeViewSnapshot]):
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

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

        Memory corruption destroying PaymentCoordinator
        https://bugs.webkit.org/show_bug.cgi?id=159516
        rdar://problem/27222517

        Reviewed by Tim Horton.

        Introduce a new MessageReceiverMap::removeMessageReceiver that takes a MessageReceiver
        and removes all traces of it in the message receiver map. Use it in the WebPaymentCoordinator destructor.

        * Platform/IPC/MessageReceiverMap.cpp:
        (IPC::MessageReceiverMap::removeMessageReceiver):
        * Platform/IPC/MessageReceiverMap.h:
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::removeMessageReceiver):
        * Shared/ChildProcess.h:
        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
        (WebKit::WebPaymentCoordinator::~WebPaymentCoordinator):

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

        [Mac][cmake] Unreviewed buildfix after r202889. Just for fun.

        * PlatformMac.cmake:

2016-07-06  Tim Horton  <timothy_horton@apple.com>

        Some API tests started failing after r202889
        https://bugs.webkit.org/show_bug.cgi?id=159498

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadHTMLString):
        Fix a typo; this is a MIME type, not an encoding :|

2016-07-06  Tim Horton  <timothy_horton@apple.com>

        Email from June 1st containing text 'Today @ 7:10PM' is linkified, but shouldn't be
        https://bugs.webkit.org/show_bug.cgi?id=159498
        <rdar://problem/26719903>

        Reviewed by Sam Weinig.

        * Shared/Cocoa/LoadParametersCocoa.mm: Added.
        (WebKit::LoadParameters::platformEncode):
        (WebKit::LoadParameters::platformDecode):
        * Shared/LoadParameters.cpp: Added.
        (WebKit::LoadParameters::encode):
        (WebKit::LoadParameters::decode):
        * Shared/LoadParameters.h: Added.
        Add a struct that knows how to encode all of the different parameters
        to all of the Load* messages, including the platform-specific DataDetectors parameters.

        * Shared/mac/ArgumentCodersMac.h:
        * Shared/mac/ArgumentCodersMac.mm:
        (IPC::typeFromObject):
        (IPC::encode):
        (IPC::decode):
        Add NSURL coders that defer to the CFURL coders.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::dataDetectionContext):
        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::setDelegate):
        (WebKit::UIDelegate::UIClient::dataDetectionContext):
        Add APIUIClient methods to retrieve the DataDetectors context dictionary.

        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
        (WebKit::WebPageProxy::addPlatformLoadParameters):
        Add the DataDetectors context dictionary to the given LoadParameters.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dataDetectionContext):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::dataDetectionContext):
        Store the dataDetectionContext on WebPage, and make it accessible to WebCore
        via the FrameLoaderClient (it is used in FrameLoader when the load completes).

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadRequest):
        (WebKit::WebPageProxy::loadFile):
        (WebKit::WebPageProxy::loadData):
        (WebKit::WebPageProxy::loadHTMLString):
        (WebKit::WebPageProxy::loadAlternateHTMLString):
        (WebKit::WebPageProxy::loadPlainTextString):
        (WebKit::WebPageProxy::loadWebArchiveData):
        * UIProcess/WebPageProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadRequest):
        (WebKit::WebPage::loadStringImpl):
        (WebKit::WebPage::loadData):
        (WebKit::WebPage::loadString):
        (WebKit::WebPage::loadAlternateHTMLString):
        (WebKit::WebPage::loadHTMLString): Deleted.
        (WebKit::WebPage::loadPlainTextString): Deleted.
        (WebKit::WebPage::loadWebArchiveData): Deleted.
        * WebProcess/WebPage/WebPage.messages.in:
        Adopt LoadParameters, taking this opportunity to reduce the number of very similar messages.
        We can take this further (we should be able to get it down to just LoadRequest
        and LoadData) in the future. When any load occurs, grab the client's DataDetectorse
        context dictionary and send it along with the load request, storing it in WebPage.

2016-07-06  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Disable ResourceResponse lazy initialization
        https://bugs.webkit.org/show_bug.cgi?id=159497
        <rdar://problem/27209066>

        Reviewed by Alex Christensen.

        Disable ResourceResponse lazy initialization for WebKit2 as
        we always end up initializing all the fields anyway when
        sending the response to the WebContent process via IPC.

        Even worse, we always do a partial lazy initialization (common
        fields only) before the IPC so we always do the initialization
        in 2 steps. This normally would not be an issue but the 2 steps
        actually have some overlap because both call
        CFHTTPMessageCopyAllHeaderFields(), which is expensive (See
        <rdar://problem/26796059>) to first get the common HTTP headers,
        then ALL the HTTP headers.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

2016-07-06  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Text suggestions should be cleared when form input session is invalidated        
        https://bugs.webkit.org/show_bug.cgi?id=159477

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession invalidate]): Set input delegate's suggestions to nil when a form input session is
        invalidated. This will set the keyboard QuickType suggestions back to their default values.

2016-07-06  Alex Christensen  <achristensen@webkit.org>

        Call continueCanAuthenticateAgainstProtectionSpace when cancelling loads waiting for the callback
        https://bugs.webkit.org/show_bug.cgi?id=159492
        <rdar://problem/26921670>

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::~NetworkLoad):
        (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkLoad.h:

2016-07-06  Myles C. Maxfield  <mmaxfield@apple.com>

        [RTL Scrollbars] RTL Scrollbars broken with clients creating Web Views via [WKView initWithFrame:contextRef:pageGroupRef:]
        https://bugs.webkit.org/show_bug.cgi?id=159383
        <rdar://problem/26921117>

        Reviewed by Anders Carlsson.

        The code which consults with the userInterfaceLayoutDirection of the view is
        inside [WKWebView _initializeWithConfiguration:]. However, some clients create
        Web Views via [WKView initWithFrame:contextRef:pageGroupRef:] which doesn't
        call this code. Therefore, this codepath should do the same kind of direction
        consulting.

        * UIProcess/API/mac/WKView.mm:
        (toUserInterfaceLayoutDirection):
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):

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

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

        This change caused an existing LayoutTest to crash on ios-
        simulator (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "<img> with a wide gamut PDF does not display using a wide
        gamut color space"
        https://bugs.webkit.org/show_bug.cgi?id=158983
        http://trac.webkit.org/changeset/202867

2016-07-06  Enrica Casucci  <enrica@apple.com>

        Limit touch distance for two finger tap.
        https://bugs.webkit.org/show_bug.cgi?id=159476
        rdar://problem/26439052

        Reviewed by Beth Dakin.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView setupInteraction]):
        * Platform/spi/ios/UIKitSPI.h

2016-07-06  Antoine Quint  <graouts@apple.com>

        <img> with a wide gamut PDF does not display using a wide gamut color space
        https://bugs.webkit.org/show_bug.cgi?id=158983
        <rdar://problem/25720247>

        Reviewed by Tim Horton.

        ColorSpace parameters have been replaced with CGColorSpaceRef parameters for IOSurface.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::decode):
        (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _takeViewSnapshot]):
        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

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

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

        didn't reduce coreui memory usage (Requested by kling on
        #webkit).

        Reverted changeset:

        "[Mac] Get rid of the old timey rubber-banding linen pattern."
        https://bugs.webkit.org/show_bug.cgi?id=159329
        http://trac.webkit.org/changeset/202725

2016-07-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        Duplicated code in DrawingAreaImpl and CoordinatedDrawingArea
        https://bugs.webkit.org/show_bug.cgi?id=159259

        Reviewed by Žan Doberšek.

        It seems that CoordinatedDrawingArea is just a copy paste of DrawingAreaImpl with non-accelerated code path
        removed. There's actually nothing (or very little) specific to coordinated graphics in the
        CoordinatedDrawingArea implementation. This patch renames CoordinatedDrawingArea as AcceleratedDrawingArea and
        makes DrawingAreaImpl inherit from it, so that in case of accelerated compositing the parent class is used, and
        DrawingAreaImpl only adds the non accelerated code path.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * WebProcess/WebPage/AcceleratedDrawingArea.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp.
        (WebKit::AcceleratedDrawingArea::~AcceleratedDrawingArea):
        (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
        (WebKit::AcceleratedDrawingArea::setNeedsDisplay):
        (WebKit::AcceleratedDrawingArea::setNeedsDisplayInRect):
        (WebKit::AcceleratedDrawingArea::scroll):
        (WebKit::AcceleratedDrawingArea::pageBackgroundTransparencyChanged):
        (WebKit::AcceleratedDrawingArea::setLayerTreeStateIsFrozen):
        (WebKit::AcceleratedDrawingArea::forceRepaint):
        (WebKit::AcceleratedDrawingArea::forceRepaintAsync):
        (WebKit::AcceleratedDrawingArea::setPaintingEnabled):
        (WebKit::AcceleratedDrawingArea::updatePreferences):
        (WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):
        (WebKit::AcceleratedDrawingArea::layerHostDidFlushLayers):
        (WebKit::AcceleratedDrawingArea::graphicsLayerFactory):
        (WebKit::AcceleratedDrawingArea::setRootCompositingLayer):
        (WebKit::AcceleratedDrawingArea::scheduleCompositingLayerFlush):
        (WebKit::AcceleratedDrawingArea::scheduleCompositingLayerFlushImmediately):
        (WebKit::AcceleratedDrawingArea::updateBackingStoreState):
        (WebKit::AcceleratedDrawingArea::sendDidUpdateBackingStoreState):
        (WebKit::AcceleratedDrawingArea::suspendPainting):
        (WebKit::AcceleratedDrawingArea::resumePainting):
        (WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
        (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeSoon):
        (WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
        (WebKit::AcceleratedDrawingArea::viewStateDidChange):
        (WebKit::AcceleratedDrawingArea::attachViewOverlayGraphicsLayer):
        * WebProcess/WebPage/AcceleratedDrawingArea.h: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h.
        (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModePending):
        (WebKit::AcceleratedDrawingArea::didUpdateBackingStoreState):
        (WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingMode):
        * WebProcess/WebPage/DrawingArea.cpp:
        (WebKit::DrawingArea::create):
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
        (WebKit::DrawingAreaImpl::setNeedsDisplay):
        (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
        (WebKit::DrawingAreaImpl::scroll):
        (WebKit::DrawingAreaImpl::forceRepaint):
        (WebKit::DrawingAreaImpl::setRootCompositingLayer):
        (WebKit::DrawingAreaImpl::updateBackingStoreState):
        (WebKit::DrawingAreaImpl::didUpdateBackingStoreState):
        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
        (WebKit::DrawingAreaImpl::suspendPainting):
        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
        (WebKit::DrawingAreaImpl::~DrawingAreaImpl): Deleted.
        (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Deleted.
        (WebKit::DrawingAreaImpl::updatePreferences): Deleted.
        (WebKit::DrawingAreaImpl::didUpdate): Deleted.
        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Deleted.
        (WebKit::DrawingAreaImpl::scheduleDisplay): Deleted.
        (WebKit::DrawingAreaImpl::displayTimerFired): Deleted.
        (WebKit::DrawingAreaImpl::display): Deleted.
        (WebKit::shouldPaintBoundsRect): Deleted.
        (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing): Deleted.
        * WebProcess/WebPage/DrawingAreaImpl.h:

2016-07-06  Youenn Fablet  <youenn@apple.com>

        Refactor NetworkResourceLoadParameters
        https://bugs.webkit.org/show_bug.cgi?id=159402

        Reviewed by Alex Christensen.

        Making NetworkResourceLoadParameters derive from NetworkLoadParameters.

        * CMakeLists.txt: Removed NetworkLoadParameters.cpp
        * NetworkProcess/NetworkLoadParameters.cpp: Deleted.
        * NetworkProcess/NetworkLoadParameters.h:
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Deleted.
        * NetworkProcess/NetworkResourceLoadParameters.h: Making it derive from NetworkLoadParameters.
        * WebKit2.xcodeproj/project.pbxproj:

2016-07-05  Alex Christensen  <achristensen@webkit.org>

        Actually persist changes to cookie accept policy.
        https://bugs.webkit.org/show_bug.cgi?id=159377
        <rdar://problem/22774152>

        Reviewed by Alexey Proskuryakov.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::NetworkSession):
        Added logging.
        * UIProcess/mac/WebCookieManagerProxyMac.mm:
        (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
        When we persist the cookie accept policy, we want to call _saveCookies to actually write the
        change to disk so that when we create a new process which reads from disk to determine its
        cookie accept policy, it will read the new cookie accept policy.  Before this patch it was
        reading the old one in some cases where the changes had not yet been persisted to disk.

2016-07-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Coordinated Graphics] Modernize and cleanup CompositingCoordinator
        https://bugs.webkit.org/show_bug.cgi?id=159212

        Reviewed by Žan Doberšek.

        Changes done:

          - Use references instead of pointers when possible.
          - Add missing final/override keywords.
          - Reduce the use of PassRefPtr
          - Move member initializations to the declaration.
          - Use nullptr instead of 0.
          - Use HashMap::ensure() instead of complicated code with iterators.
          - Avoid heap allocation when possible.

        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::paintToSurface):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
        (WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
        * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp:
        (WebKit::GeneralAreaAllocator::expand):
        (WebKit::GeneralAreaAllocator::splitNode):
        (WebKit::GeneralAreaAllocator::release):
        (WebKit::GeneralAreaAllocator::GeneralAreaAllocator): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h:
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
        (WebKit::CompositingCoordinator::CompositingCoordinator):
        (WebKit::CompositingCoordinator::flushPendingLayerChanges):
        (WebKit::CompositingCoordinator::createImageBackingIfNeeded):
        (WebKit::CompositingCoordinator::updateImageBacking):
        (WebKit::CompositingCoordinator::notifyFlushRequired):
        (WebKit::CompositingCoordinator::paintContents):
        (WebKit::CompositingCoordinator::createUpdateAtlas):
        (WebKit::CompositingCoordinator::commitScrollOffset):
        (WebKit::CompositingCoordinator::paintToSurface):
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
        (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
        (WebKit::CoordinatedLayerTreeHost::invalidate):
        (WebKit::CoordinatedLayerTreeHost::forceRepaint):
        (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
        (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
        (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
        (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
        (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
        (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
        (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
        (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
        (WebKit::UpdateAtlas::UpdateAtlas):
        (WebKit::UpdateAtlas::~UpdateAtlas):
        (WebKit::UpdateAtlas::buildLayoutIfNeeded):
        (WebKit::UpdateAtlas::paintOnAvailableBuffer):
        (WebKit::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:

2016-07-04  Brady Eidson  <beidson@apple.com>

        WebProcesses don't handle DatabaseProcess going away uncleanly..
        https://bugs.webkit.org/show_bug.cgi?id=159371

        Reviewed by Alex Christensen.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::connectionToServerLost):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
        (WebKit::WebToDatabaseProcessConnection::didClose): Notify each connection
          that the database server connection dropped.

2016-07-04  Fujii Hironori  <Hironori.Fujii@sony.com>

        [GTK] Null WebCore::Range dereference in WebEditorClient::updateGlobalSelection
        https://bugs.webkit.org/show_bug.cgi?id=159341

        Reviewed by Carlos Garcia Campos.

        FrameSelection::toNormalizedRange() can return null. Null check is
        needed.

        Tests:
            editing/input/set-value-on-input-and-delete.html
            editing/selection/selection-in-iframe-removed-crash.html
            imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html
            imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html
            imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea.html
            imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html

        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::updateGlobalSelection): Do not update
        global selection if FrameSelection::toNormalizedRange() returns
        null.

2016-07-04  Fujii Hironori  <Hironori.Fujii@sony.com>

        [GTK] ASSERTION_FAILED: m_key != PTHREAD_KEYS_MAX when defining WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH
        https://bugs.webkit.org/show_bug.cgi?id=158149

        Reviewed by Carlos Garcia Campos.

        WTF::sleep can not be used at the beginning of web process because
        WTF is not initialized at the moment yet.

        * WebProcess/gtk/WebProcessMainGtk.cpp: Use g_usleep instead of WTF::sleep.

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

        Follow-up to r202789.

        Reviewed by Sam Weinig.

        Ensure that API that isn’t available at all on a platform is declared under an appropriate
        TARGET_OS_* conditional.

        * Shared/API/Cocoa/_WKHitTestResult.h:
        * Shared/API/Cocoa/_WKHitTestResult.mm:
        * Shared/API/Cocoa/_WKHitTestResultInternal.h:
        * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
        * UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
        * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h:
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm:
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

        [Cocoa] Adopt modern API availability macros
        https://bugs.webkit.org/show_bug.cgi?id=159378

        Reviewed by Sam Weinig.

        iOS 10 and macOS Sierra introduce new macros for declaring API availability, defined in
        CFAvailability.h, including API_AVAILABLE, API_DEPRECATED, and
        API_DEPRECATED_WITH_REPLACEMENT. Rather than having positional parameters for macOS and iOS
        versions, the new macros take a variable number of function-like parameters, where the
        function specifies the platform to which it applies.

        To have WebKit2’s postprocessed headers use the new macros, we make the following changes:

        - Replace instances of WK_AVAILABLE(_mac, _ios) with WK_API_AVAILABLE(macosx(_mac), ios(_ios)),
          eliding a platform if its current availability is NA.
        - Change instances of WK_CLASS_AVAILABLE(_mac, _ios) to
          WK_CLASS_AVAILABLE(macosx(_mac), ios(_ios)), eliding a platform if its current
          availability is NA.
        - Replace instances of WK_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) with
          WK_API_DEPRECATED_WITH_REPLACEMENT(_replacement, macosx(_macIntro, _macDep), ios(_iosIntro, _iosDep))
          when there is a one-for-one replacement, and with
          WK_API_DEPRECATED(_message, macosx(_macIntro, _macDep), ios(_iosIntro, _iosDep)) when the
          replacement isn’t one-for-one. Again, if the API doesn’t apply to a platform, then it’s
          elided.
        - Replace instances of WK_CLASS_DEPRECATED with WK_CLASS_DEPRECATED_WITH_REPLACEMENT,
          following the same rules.
        - Replace instances of the WK_ENUM_* macros with corresponding WK_API_* macros, now that
          all supported compilers support availability attributes on enum values.

        * Configurations/WebKit.xcconfig: Disable header postprocessing when building for iOS 9.x,
          which doesn’t have the new macros.

        * mac/postprocess-framework-headers.sh: Handle the new WK_* macros: WK_API_AVAILABLE becomes
          API_AVAILABLE; WK_API_DEPRECATED(_WITH_REPLACEMENT) become API_DEPRECATED(_WITH_REPLACEMENT);
          WK_CLASS_AVAILABLE and WK_CLASS_DEPRECATED(_WITH_REPLACEMENT) change to the corresponding
          API_ macros, prefixed with WK_EXTERN.
        * Shared/API/Cocoa/WKFoundation.h: When header postprocessing is disabled, provide
          definitions of the new WK_* macros we use.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h: In addition to the above, changed one
          instance of (iOS) 10_0 to WK_IOS_TBA.

        Made the above changes in the following headers:

        * Shared/API/Cocoa/WKBrowsingContextHandle.h:
        * Shared/API/Cocoa/_WKFrameHandle.h:
        * Shared/API/Cocoa/_WKHitTestResult.h:
        * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
        * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
        * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
        * Shared/API/Cocoa/_WKSameDocumentNavigationType.h:
        * UIProcess/API/Cocoa/WKBackForwardList.h:
        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
        * UIProcess/API/Cocoa/WKConnection.h:
        * UIProcess/API/Cocoa/WKError.h:
        * UIProcess/API/Cocoa/WKErrorPrivate.h:
        * UIProcess/API/Cocoa/WKFrameInfo.h:
        * UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
        * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
        * UIProcess/API/Cocoa/WKNavigation.h:
        * UIProcess/API/Cocoa/WKNavigationAction.h:
        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
        * UIProcess/API/Cocoa/WKNavigationData.h:
        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
        * UIProcess/API/Cocoa/WKNavigationResponse.h:
        * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
        * UIProcess/API/Cocoa/WKPreferences.h:
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * UIProcess/API/Cocoa/WKPreviewActionItem.h:
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h:
        * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/WKProcessGroup.h:
        * UIProcess/API/Cocoa/WKProcessPool.h:
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
        * UIProcess/API/Cocoa/WKScriptMessage.h:
        * UIProcess/API/Cocoa/WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        * UIProcess/API/Cocoa/WKUserScript.h:
        * UIProcess/API/Cocoa/WKUserScriptPrivate.h:
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
        * UIProcess/API/Cocoa/WKWindowFeatures.h:
        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
        * UIProcess/API/Cocoa/_WKDownload.h:
        * UIProcess/API/Cocoa/_WKElementAction.h:
        * UIProcess/API/Cocoa/_WKExperimentalFeature.h:
        * UIProcess/API/Cocoa/_WKFindOptions.h:
        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/API/Cocoa/_WKInputDelegate.h:
        * UIProcess/API/Cocoa/_WKLayoutMode.h:
        * UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKSessionState.h:
        * UIProcess/API/Cocoa/_WKThumbnailView.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentFilter.h:
        * UIProcess/API/Cocoa/_WKUserContentWorld.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
        * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataSize.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:

2016-07-01  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] Many layout tests are timeout after r202532.
        https://bugs.webkit.org/show_bug.cgi?id=159337

        Reviewed by Gyuyoung Kim.

        WebPageProxy::forceRepaint() wait for the next commit from the web process
        after r202532, but WebPageProxy::callAfterNextPresentationUpdate() is not 
        implemented in CoordinatedDrawingAreaProxy.

        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
        (WebKit::CoordinatedDrawingAreaProxy::contentsRect):
        (WebKit::CoordinatedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
        (WebKit::CoordinatedDrawingAreaProxy::sizeDidChange):
        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
        (WebKit::CoordinatedDrawingAreaProxy::page):

2016-07-01  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r189668): Notification tests are flakey
        https://bugs.webkit.org/show_bug.cgi?id=159375
        <rdar://problem/22760990>

        Reviewed by Alexey Proskuryakov.

        Implement WKNotificationManagerGetLocalID(). For more information, see the entry in Tools/ChangeLog.

        * UIProcess/API/C/WKNotificationManager.cpp:
        (WKNotificationManagerGetLocalID):
        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
        (WebKit::WebNotificationManagerProxy::notificationLocalIDForTesting):
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:

2016-07-01  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r201405): Fullscreen video no longer enters low-power mode
        https://bugs.webkit.org/show_bug.cgi?id=159220
        <rdar://problem/26701056>

        Reviewed by Beth Dakin.

        In r201405, we removed the call to setTopContentInset(0) to avoid a flash
        during repainting where the WebProcess still thought it had an inset and
        the UIProcess did not, but the >0 inset breaks low power video playback 
        in fullscreen. So, instead, fix the repaint issue by setting a CALayer
        fence which makes sure both the UIProcess and WebProcess paint simultaneously
        after resizing and changing the top content inset.

        This requires a new message from WebPageProxy -> WebPage: setTopContentInsetFenced().

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setTopContentInset):
        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController enterFullScreen:]):
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setTopContentInsetFenced):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-07-01  Dan Bernstein  <mitz@apple.com>

        [Mac] Get rid of support for old SDKs
        https://bugs.webkit.org/show_bug.cgi?id=159369

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/WKFoundation.h: Removed the WK_ARRAY, WK_DICTIONARY, and WK_SET macros,
          which were only needed for pre-10.11 SDKs.

        * Shared/mac/WebEventFactory.mm:
        (WebKit::mouseButtonForEvent): Removed checking for pre-10.10.3 SDKs.
        (WebKit::globalPointForEvent): Ditto.
        (WebKit::pointForEvent): Ditto.
        (WebKit::WebEventFactory::createWebMouseEvent): Ditto.

        * UIProcess/API/Cocoa/WKBackForwardList.h: Replaced WK_ARRAY(...) with NSArray<...>.

        * UIProcess/API/Cocoa/WKPreferences.mm: Ditto.
        (-[WKPreferences _setFixedPitchFontFamily:]):
        (+[WKPreferences _experimentalFeatures]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Ditto.

        * UIProcess/API/Cocoa/WKUIDelegate.h: Ditto.
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Ditto.

        * UIProcess/API/Cocoa/WKUserContentController.h: Ditto.
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Ditto.

        * UIProcess/API/Cocoa/WKUserScriptPrivate.h: Ditto.

        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Replaced WK_SET(...) with NSSet<...>.
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Ditto.
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Ditto.
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):

        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Ditto.

        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Replaced WK_ARRAY(...) with NSArray<...>.

        * UIProcess/API/Cocoa/_WKUserStyleSheet.h: Ditto.
        * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Ditto.
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):

        * UIProcess/API/Cocoa/_WKWebsiteDataSize.h: Replaced WK_SET(...) with NSSet<...>.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::pressureChangeWithEvent): Removed checking for pre-10.10.3 SDKs.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Replaced WK_ARRAY(...) with
          NSArray<...>.

        * mac/postprocess-framework-headers.sh: Removed sed rules for WK_ARRAY, WK_DICTIONARY and
          WK_SET.

2016-07-01  Chris Dumez  <cdumez@apple.com>

        [iOS] Possible null Range dereference under computeAutocorrectionContext()
        https://bugs.webkit.org/show_bug.cgi?id=159328
        <rdar://problem/26766720>

        Reviewed by Benjamin Poulain.

        The code in computeAutocorrectionContext() was checking Editor::hasComposition()
        before dereferencing Editor::compositionRange(). However, compositionRange()
        can also return null in other cases (e.g. compositionStart == compositionEnd).

        Drop the check for hasComposition() and do a null check on the value returned
        by compositionRange() instead.

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

2016-07-01  Brent Fulgham  <bfulgham@apple.com>

        Prevent crash when attempting to copy an image
        https://bugs.webkit.org/show_bug.cgi?id=159288
        <rdar://problem/23507828>

        Reviewed by Brady Eidson.
        
        WebKit could crash if the HTMLImageElement had a null cachedImage member.
        A little investigation showed that the URL we retrieve from the cachedImage
        is never used, so rather than adding a null check, let's just pass a
        default argument. The actual URL gets read from elsewhere in the pasteboard
        processing code.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::performActionOnElement): Don't bother passing the
        unused URL argument to the pasteboard method.

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

        Blob content type not preserved when retrieving blobs from IndexedDB.
        <rdar://problem/27057357> and https://bugs.webkit.org/show_bug.cgi?id=159360

        Reviewed by Alex Christensen.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:

        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

2016-07-01  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Get rid of WK_NULLABLE_SPECIFIER now that all supported compilers understand _Nullable
        https://bugs.webkit.org/show_bug.cgi?id=159361

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/WKFoundation.h:
        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * mac/postprocess-framework-headers.sh:

2016-07-01  Youenn Fablet  <youennf@gmail.com>

        Add a runtime flag for DOM iterators
        https://bugs.webkit.org/show_bug.cgi?id=159300

        Reviewed by Alex Christensen.

        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-07-01  Andreas Kling  <akling@apple.com>

        [Mac] Get rid of the old timey rubber-banding linen pattern.
        <https://webkit.org/b/159329>

        Reviewed by Benjamin Poulain.

        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        (WebKit::updateCustomAppearance):

2016-06-30  Tina Liu  <iting_liu@apple.com>

        Add SPI to allow restoring session state without navigation in WKPage
        https://bugs.webkit.org/show_bug.cgi?id=159326

        Reviewed by Brady Eidson.

        * UIProcess/API/C/WKPage.cpp:
        (restoreFromSessionState):
        Added a helper function that takes a bool parameter to specify whether
        to navigate or not when restoring from the session state.
        (WKPageRestoreFromSessionState):
        Calling restoreFromSessionState, passing navigate = true.
        (WKPageRestoreFromSessionStateWithoutNavigation):
        Ditto but passing navigate = false.
        * UIProcess/API/C/WKPagePrivate.h:

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

        [iOS] WebContent processes do not exit promptly
        https://bugs.webkit.org/show_bug.cgi?id=159301
        <rdar://problem/26965488>

        Reviewed by Anders Carlsson.

        WebContent processes do not exit promptly, they hang around for 10 seconds
        until the watchdog forcefully calls exit().

        This patch addresses the issue by asking XPC to exit when clean. It also
        fixes 2 XPC transactions that were leaking so that XPC can become clean.

        * 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):
        Add extra priorityBoostMessage parameter which is then passed along to
        ChildProcess via initialization parameters. ChildProcess is now in
        charge of retaining the message for as long as it needs the priority
        boost. In particular, ChildProcess now takes care of releasing the
        boost message before existing to avoid leaking an XPC transaction.

        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::initialize):
        Retain priorityBoostMessage as a data member.

        (WebKit::ChildProcess::stopRunLoop):
        (WebKit::ChildProcess::platformStopRunLoop):
        * Shared/ios/ChildProcessIOS.mm:
        (WebKit::ChildProcess::platformStopRunLoop):
        On iOS, call XPCServiceExit() to exit instead of RunLoop::main().stop()
        which did not work.

        * Shared/ChildProcess.h:
        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
        (WebKit::XPCServiceInitializer):
        Set priorityBoostMessage on ChildProcessInitializationParameters.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
        (WebKit::XPCServiceExit):
        Add XPCServiceExit() function which destroys the priority boost
        message, calls xpc_transaction_end() to balance the
        xpc_transaction_begin() in XPCServiceInitializer() and then call
        xpc_transaction_exit_clean() to ask XPC to exit when clean.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
        (WebKit::XPCServiceEventHandler):
        Leaking the "pre-bootstrap" event for priority boosting would cause us to
        leak an XPC transaction, which would prevent XPC from becoming clean and
        exiting. Instead, we now pass it along to the initialization function.
        We then pass it to ChildProcess which manages the lifetime of this message
        instead of leaking it.

2016-06-30  Brian Burg  <bburg@apple.com>

        REGRESSION(r202329): WebInspectorProxy's WKPagePolicyClient callbacks are not being called
        https://bugs.webkit.org/show_bug.cgi?id=159308
        <rdar://problem/27111764>

        Reviewed by Tim Horton.

        Adopt WKPageNavigationClient and ditch WKPolicyClient and WKPageLoaderClient.
        After r202329, it's not possible to set a WKPolicyClient for a WKPage/WebPageProxy that backs a WKWebView.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::isMainOrTestInspectorPage): Take a WebCore::ResourceRequest.
        (WebKit::processDidCrash): Deleted.
        (WebKit::webProcessDidCrash): Rename to match new client callback name.
        (WebKit::decidePolicyForNavigationAction): Rework this to take new argument types.
        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
        Install a WKPageNavigationClient. 

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

        [iOS] Process suspension is prevented for 30 seconds after closing a tab
        https://bugs.webkit.org/show_bug.cgi?id=159280
        <rdar://problem/27014867>

        Reviewed by Gavin Barraclough.

        When closing a tab, ConnectionTerminationWatchdog takes a background
        assertion on behalf of the WebContent process and only releases it
        after 30 seconds, allowing for the WebContent process to exit cleanly
        without worrying about getting suspended too early.

        However, the child process normally exits much sooner than this and
        we end up holding a process assertion for no reason for a full 30
        seconds anyway. This patch addresses the issue by registering an
        invalidation handler with the BKSProcessAssertion and releasing our
        our assertion in such case. The invalidation handler gets called
        as soon as the child process exits.

        * Platform/spi/ios/AssertionServicesSPI.h:
        * UIProcess/ProcessAssertion.cpp:
        (WebKit::ProcessAssertion::ProcessAssertion):
        * UIProcess/ProcessAssertion.h:
        (WebKit::ProcessAssertion::ProcessAssertion):
        (WebKit::ProcessAssertion::validity):
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (WebKit::ProcessAssertion::ProcessAssertion):
        (WebKit::ProcessAssertion::~ProcessAssertion):
        (WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
        (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
        (WebKit::ProcessAssertion::setState): Deleted.

2016-06-30  Tim Horton  <timothy_horton@apple.com>

        Keep track of when a WKWebView is blank before the initial non-empty layout
        https://bugs.webkit.org/show_bug.cgi?id=159217
        <rdar://problem/26071766>

        Reviewed by Beth Dakin.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        (-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
        (-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):

2016-06-29  Gavin Barraclough  <barraclough@apple.com>

        Cleanup ProcessAssertion RunInBackground management
        https://bugs.webkit.org/show_bug.cgi?id=159284

        Reviewed by Chris Dumez.

        Factor out code that handles taking a background assertion on the UI app into
        ProcessAndUIAssertion::updateRunInBackgroundCount helper.

        This patch just cleanup to enable a futher fix.

        * UIProcess/ProcessAssertion.h:
        (WebKit::ProcessAssertion::state):
            - Added ProcessAndUIAssertion::updateRunInBackgroundCount
            - Added ProcessAndUIAssertion::m_isHoldingBackgroundAssertionOnApp
        * UIProcess/ios/ProcessAssertionIOS.mm:
        (WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
            - helper to manage calls to incrementNeedsToRunInBackgroundCount/decrementNeedsToRunInBackgroundCount
        (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
            - call updateRunInBackgroundCount
        (WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
            changed to use m_isHoldingBackgroundAssertionOnApp
        (WebKit::ProcessAndUIAssertion::setState):
            - call updateRunInBackgroundCount

2016-06-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
        https://bugs.webkit.org/show_bug.cgi?id=159209

        Reviewed by Žan Doberšek.

        Move CompositingCoordinator and its helper classes to the WebKit2 layer.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.cpp.
        (WebKit::AreaAllocator::AreaAllocator):
        (WebKit::AreaAllocator::~AreaAllocator):
        (WebKit::AreaAllocator::expand):
        (WebKit::AreaAllocator::expandBy):
        (WebKit::AreaAllocator::release):
        (WebKit::AreaAllocator::overhead):
        (WebKit::AreaAllocator::roundAllocation):
        (WebKit::GeneralAreaAllocator::GeneralAreaAllocator):
        (WebKit::GeneralAreaAllocator::~GeneralAreaAllocator):
        (WebKit::GeneralAreaAllocator::freeNode):
        (WebKit::GeneralAreaAllocator::expand):
        (WebKit::fitsWithin):
        (WebKit::GeneralAreaAllocator::allocate):
        (WebKit::GeneralAreaAllocator::allocateFromNode):
        (WebKit::GeneralAreaAllocator::splitNode):
        (WebKit::GeneralAreaAllocator::updateLargestFree):
        (WebKit::GeneralAreaAllocator::release):
        (WebKit::GeneralAreaAllocator::overhead):
        * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.h.
        (WebKit::nextPowerOfTwo):
        (WebKit::AreaAllocator::size):
        (WebKit::AreaAllocator::minimumAllocation):
        (WebKit::AreaAllocator::setMinimumAllocation):
        (WebKit::AreaAllocator::margin):
        (WebKit::AreaAllocator::setMargin):
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp.
        (WebKit::CompositingCoordinator::CompositingCoordinator):
        (WebKit::CompositingCoordinator::~CompositingCoordinator):
        (WebKit::CompositingCoordinator::setRootCompositingLayer):
        (WebKit::CompositingCoordinator::setViewOverlayRootLayer):
        (WebKit::CompositingCoordinator::sizeDidChange):
        (WebKit::CompositingCoordinator::flushPendingLayerChanges):
        (WebKit::CompositingCoordinator::timestamp):
        (WebKit::CompositingCoordinator::syncDisplayState):
        (WebKit::CompositingCoordinator::nextAnimationServiceTime):
        (WebKit::CompositingCoordinator::clearPendingStateChanges):
        (WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
        (WebKit::CompositingCoordinator::createRootLayer):
        (WebKit::CompositingCoordinator::syncLayerState):
        (WebKit::CompositingCoordinator::createImageBackingIfNeeded):
        (WebKit::CompositingCoordinator::createImageBacking):
        (WebKit::CompositingCoordinator::updateImageBacking):
        (WebKit::CompositingCoordinator::clearImageBackingContents):
        (WebKit::CompositingCoordinator::removeImageBacking):
        (WebKit::CompositingCoordinator::flushPendingImageBackingChanges):
        (WebKit::CompositingCoordinator::notifyAnimationStarted):
        (WebKit::CompositingCoordinator::notifyFlushRequired):
        (WebKit::CompositingCoordinator::paintContents):
        (WebKit::CompositingCoordinator::createGraphicsLayer):
        (WebKit::CompositingCoordinator::deviceScaleFactor):
        (WebKit::CompositingCoordinator::pageScaleFactor):
        (WebKit::CompositingCoordinator::createUpdateAtlas):
        (WebKit::CompositingCoordinator::removeUpdateAtlas):
        (WebKit::CompositingCoordinator::visibleContentsRect):
        (WebKit::CompositingCoordinator::mainContentsLayer):
        (WebKit::CompositingCoordinator::setVisibleContentsRect):
        (WebKit::CompositingCoordinator::deviceOrPageScaleFactorChanged):
        (WebKit::CompositingCoordinator::detachLayer):
        (WebKit::CompositingCoordinator::commitScrollOffset):
        (WebKit::CompositingCoordinator::renderNextFrame):
        (WebKit::CompositingCoordinator::purgeBackingStores):
        (WebKit::CompositingCoordinator::paintToSurface):
        (WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases):
        (WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h.
        (WebKit::CompositingCoordinator::clearRootLayer):
        (WebKit::CompositingCoordinator::rootLayer):
        (WebKit::CompositingCoordinator::state):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.cpp.
        (WebKit::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
        (WebKit::UpdateAtlas::UpdateAtlas):
        (WebKit::UpdateAtlas::~UpdateAtlas):
        (WebKit::UpdateAtlas::buildLayoutIfNeeded):
        (WebKit::UpdateAtlas::didSwapBuffers):
        (WebKit::UpdateAtlas::paintOnAvailableBuffer):
        * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.h.
        (WebKit::UpdateAtlas::size):
        (WebKit::UpdateAtlas::supportsAlpha):
        (WebKit::UpdateAtlas::addTimeInactive):
        (WebKit::UpdateAtlas::isInactive):
        (WebKit::UpdateAtlas::isInUse):

2016-06-29  Hunseop Jeong  <hs85.jeong@samsung.com>

        Unreviewed, CMake build fix.

        * PlatformMac.cmake:

2016-06-29  Beth Dakin  <bdakin@apple.com>

        Add media_icon to WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=159273
        -and corresponding-
        rdar://problem/27087714

        Reviewed by Dean Jackson.

        * Resources/mediaIcon.pdf: Added.
        * WebKit2.xcodeproj/project.pbxproj:

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

        Rename addressFields to contactFields
        https://bugs.webkit.org/show_bug.cgi?id=159271
        rdar://problem/27086955

        Reviewed by Beth Dakin.

        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        (IPC::ArgumentCoder<PaymentRequest>::encode):
        (IPC::ArgumentCoder<PaymentRequest>::decode):
        (IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
        (IPC::ArgumentCoder<PaymentRequest::ContactFields>::decode):
        (IPC::ArgumentCoder<PaymentRequest::AddressFields>::encode): Deleted.
        (IPC::ArgumentCoder<PaymentRequest::AddressFields>::decode): Deleted.
        * Shared/WebCoreArgumentCoders.h:
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (WebKit::toPKAddressField):
        (WebKit::toPKPaymentRequest):

2016-06-29  Jer Noble  <jer.noble@apple.com>

        Adopt MediaRemote.
        https://bugs.webkit.org/show_bug.cgi?id=159250

        Reviewed by Eric Carlson.

        Add a sandbox exception allowing access to the mediaremoted XPC service.

        * WebProcess/com.apple.WebProcess.sb.in:

2016-06-29  Alex Christensen  <achristensen@webkit.org>

        WKWebView should ask WKNavigationDelegate about bad ssl certificates
        https://bugs.webkit.org/show_bug.cgi?id=159176
        rdar://problem/26864882

        Reviewed by Sam Weinig.

        This can be tested manually by visiting a site in MiniBrowser that has invalid ssl certificates, but we don't have proper ssl testing yet.
        Before this change, we would just open the site as if nothing were invalid, now we call the WKNavigationDelegate's didReceiveAuthenticationChallenge
        like we did before using NSURLSession, and we do not open the page, also like we did before using NSURLSession.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        When using NSURLConnection and responding to canAuthenticateAgainstProtectionSpace with YES,
        we get an NSURLAuthenticationChallenge when a bad ssl certificate is encountered in the handshake.
        When using NSURLSession, we want to call webView:didReceiveAuthenticationChallenge:completionHandler: in this case.
        The default implementation of NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace returns true
        if there is an implementation of webView:didReceiveAuthenticationChallenge:completionHandler: in its WKNavigationDelegate.
        Internal clients can implement _webView:canAuthenticateAgainstProtectionSpace: 
        and Safari uses canHandleHTTPSServerTrustEvaluation, so it will be unaffected.

2016-06-29  Beth Dakin  <bdakin@apple.com>

        Delete WKElementInfo since it's not used
        https://bugs.webkit.org/show_bug.cgi?id=159265

        Reviewed by Sam Weinig.

        * Shared/API/Cocoa/WebKit.h:
        * UIProcess/API/Cocoa/WKElementInfo.h: Removed.
        * UIProcess/API/Cocoa/WKElementInfo.mm: Removed.
        * UIProcess/API/Cocoa/WKElementInfoInternal.h: Removed.
        * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/WKPreviewElementInfo.mm:
        (-[WKPreviewElementInfo _initWithLinkURL:]):
        (-[WKPreviewElementInfo copyWithZone:]):
        (-[WKPreviewElementInfo linkURL]):
        * UIProcess/API/Cocoa/WKPreviewElementInfoInternal.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm:
        (-[_WKContextMenuElementInfo copyWithZone:]):
        * WebKit2.xcodeproj/project.pbxproj:

2016-06-29  Jeremy Jones  <jeremyj@apple.com>

        Replace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
        https://bugs.webkit.org/show_bug.cgi?id=159161
        <rdar://problem/26017691>

        Reviewed by Sam Weinig.

        MPAudioVideoRoutingActionSheet is being replaced by MPAVRoutingSheet,
        with only minor changes to the interface.

        * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
        (-[WKAirPlayRoutePicker dealloc]):
        (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):

2016-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Too much duplicated code in LayerTreeHosts implementations
        https://bugs.webkit.org/show_bug.cgi?id=159144

        Reviewed by Žan Doberšek.

        There's some code common and duplicated in all current LayerTreeHosts implementations (Gtk, Coordinated, and
        ThreadedCoordinated). The thing is even worse in the case of ThreadedCoordinated and Coordinated, where the
        former is actually a special case of the later, and it seems like code was copy pasted and then modified to add
        ThreadedCoordinated specific code. The problem of that approach, apart from the code duplication, is that common
        parts end up diverging too. This patch moves the common parts to the base class LayerTreeHost and makes
        ThreadedCoordinatedLayerTreeHost inherit from CoordinatedLayerTreeHost, to share the common code and simply add
        the specific one.

        * PlatformGTK.cmake:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        (WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
        (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
        (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
        (WebKit::CoordinatedLayerTreeHost::invalidate):
        (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
        (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
        (WebKit::CoordinatedLayerTreeHost::commitSceneState):
        (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
        (WebKit::CoordinatedLayerTreeHost::cancelPendingLayerFlush): Deleted.
        (WebKit::CoordinatedLayerTreeHost::forceRepaint): Deleted.
        (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): Deleted.
        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): Deleted.
        (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Deleted.
        (WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Deleted.
        (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
        (WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):
        (WebKit::ThreadedCoordinatedLayerTreeHost::commitSceneState):
        (WebKit::ThreadedCoordinatedLayerTreeHost::create): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::layerHostDidFlushLayers):
        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/LayerTreeHost.cpp:
        (WebKit::LayerTreeHost::~LayerTreeHost):
        (WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled):
        (WebKit::LayerTreeHost::pauseRendering):
        (WebKit::LayerTreeHost::resumeRendering):
        (WebKit::LayerTreeHost::invalidate):
        * WebProcess/WebPage/LayerTreeHost.h:
        (WebKit::LayerTreeHost::layerTreeContext):
        (WebKit::LayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush):
        (WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplay):
        (WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::LayerTreeHost::scrollNonCompositedContents):
        (WebKit::LayerTreeHost::graphicsLayerFactory):
        (WebKit::LayerTreeHost::contentsSizeChanged):
        (WebKit::LayerTreeHost::didChangeViewportProperties):
        (WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing):
        (WebKit::LayerTreeHost::setViewOverlayRootLayer):
        (WebKit::LayerTreeHost::forceRepaintAsync): Deleted.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::invalidate):
        (WebKit::LayerTreeHostGtk::setViewOverlayRootLayer):
        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Deleted.
        (WebKit::LayerTreeHostGtk::setRootCompositingLayer): Deleted.
        (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay): Deleted.
        (WebKit::LayerTreeHostGtk::scrollNonCompositedContents): Deleted.
        (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): Deleted.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

2016-06-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r202586 and r202595.
        https://bugs.webkit.org/show_bug.cgi?id=159247

        These changes broke the iOS build (Requested by ryanhaddad on
        #webkit).

        Reverted changesets:

        "Keep track of when a WKWebView is blank before the initial
        non-empty layout"
        https://bugs.webkit.org/show_bug.cgi?id=159217
        http://trac.webkit.org/changeset/202586

        "Try to fix the build."
        http://trac.webkit.org/changeset/202595

2016-06-28  Commit Queue  <commit-queue@webkit.org>

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

        Caused all WKTR tests to fail on GuardMalloc and Production
        only for unknown reasons, investigating offline. (Requested by
        brrian on #webkit).

        Reverted changeset:

        "RunLoop::Timer should use constructor templates instead of
        class templates"
        https://bugs.webkit.org/show_bug.cgi?id=159153
        http://trac.webkit.org/changeset/202580

2016-06-28  Commit Queue  <commit-queue@webkit.org>

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

        broke the build. (Requested by keith_miller on #webkit).

        Reverted changeset:

        "Try to fix the build."
        http://trac.webkit.org/changeset/202598

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

        Try to fix the build.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (convertSystemLayoutDirection):
        (-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:

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

        Try to fix the build.

        * UIProcess/API/Cocoa/WKWebView.mm:
        * UIProcess/API/Cocoa/WKWebViewInternal.h:

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

        Keep track of when a WKWebView is blank before the initial non-empty layout
        https://bugs.webkit.org/show_bug.cgi?id=159217
        <rdar://problem/26071766>

        Reviewed by Beth Dakin.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        (-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
        (-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):

2016-06-28  Anders Carlsson  <andersca@apple.com>

        PaymentMerchantSession should wrap a PKPaymentMerchantSession
        https://bugs.webkit.org/show_bug.cgi?id=159218
        rdar://problem/26872118

        Reviewed by Tim Horton.

        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
        (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
        (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode):
        Use NSCoder.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
        PaymentMerchantSession is now a class.

        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
        PaymentMerchantSession is now a class.

        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (WebKit::WebPaymentCoordinatorProxy::platformCompleteMerchantValidation):
        Just get the underlying PKPaymentMerchantSession from the PaymentMerchantSession object.
        (WebKit::toPKPaymentMerchantSession): Deleted.

2016-06-28  Brian Burg  <bburg@apple.com>

        RunLoop::Timer should use constructor templates instead of class templates
        https://bugs.webkit.org/show_bug.cgi?id=159153

        Reviewed by Alex Christensen.

        Remove the RunLoop::Timer class template argument, and pass its constructor
        a reference to `this` instead of a pointer to `this`.

        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::PluginControllerProxy):
        * PluginProcess/PluginControllerProxy.h:
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::PluginProcess):
        * PluginProcess/PluginProcess.h:
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::ChildProcess):
        * Shared/ChildProcess.h:
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
        (API::SharedJSContext::SharedJSContext):
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
        * UIProcess/DrawingAreaProxy.cpp:
        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
        * UIProcess/DrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
        * UIProcess/DrawingAreaProxyImpl.h:
        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
        (WebKit::PluginInfoCache::PluginInfoCache):
        * UIProcess/Plugins/gtk/PluginInfoCache.h:
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::ProcessThrottler):
        * UIProcess/ProcessThrottler.h:
        * UIProcess/ResponsivenessTimer.cpp:
        (WebKit::ResponsivenessTimer::ResponsivenessTimer):
        * UIProcess/ResponsivenessTimer.h:
        * UIProcess/ViewGestureController.cpp:
        (WebKit::ViewGestureController::ViewGestureController):
        (WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
        * UIProcess/VisitedLinkStore.cpp:
        (WebKit::VisitedLinkStore::VisitedLinkStore):
        * UIProcess/VisitedLinkStore.h:
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::WebInspectorProxy):
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingTimer):
        * UIProcess/WebProcessPool.h:
        * UIProcess/gtk/GestureController.cpp:
        (WebKit::GestureController::DragGesture::DragGesture):
        (WebKit::GestureController::ZoomGesture::ZoomGesture):
        * UIProcess/gtk/GestureController.h:
        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
        (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
        * UIProcess/gtk/WebPopupMenuProxyGtk.h:
        * UIProcess/mac/ViewGestureController.h:
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::WebLoaderStrategy):
        * WebProcess/Network/WebLoaderStrategy.h:
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::NetscapePlugin):
        (WebKit::NetscapePlugin::Timer::Timer):
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
        (WebKit::NetscapePluginStream::NetscapePluginStream):
        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::PluginView):
        * WebProcess/Plugins/PluginView.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
        (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

2016-06-28  Chris Dumez  <cdumez@apple.com>

        [WK2] Add some logging related to NetworkProcess suspension
        https://bugs.webkit.org/show_bug.cgi?id=159178

        Reviewed by Andreas Kling.

        Add some logging related to NetworkProcess suspension to help debug
        suspension issues.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::prepareToSuspend):
        (WebKit::NetworkProcess::cancelPrepareToSuspend):
        (WebKit::NetworkProcess::processDidResume):

2016-06-28  Chris Dumez  <cdumez@apple.com>

        Add some more UIProcess-side logging related to process assertions
        https://bugs.webkit.org/show_bug.cgi?id=159188

        Reviewed by Andreas Kling.

        Add some more UIProcess-side logging related to process assertions
        to help debug process suspension issues.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::updateAssertionNow):
        (WebKit::ProcessThrottler::updateAssertion):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::updateActivityToken):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::fetchWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::WebProcessProxy::didSetAssertionState):

2016-06-28  Chris Dumez  <cdumez@apple.com>

        [WK2] Do not suppress navigation snapshotting on session restore if we are not navigating right away
        https://bugs.webkit.org/show_bug.cgi?id=159216
        <rdar://problem/27058360>

        Reviewed by Andreas Kling.

        Do not suppress navigation snapshotting on session restore if we are not navigating
        right away. The snapshot we already have may be outdated by the time we actually
        navigate (e.g. Because the user scrolled) so we don't want to suppress snapshotting
        in this case.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::restoreFromSessionState):

2016-06-27  Anders Carlsson  <andersca@apple.com>

        WebKit::WebPaymentCoordinator leak
        https://bugs.webkit.org/show_bug.cgi?id=159168
        rdar://problem/26929772

        Reviewed by Beth Dakin.

        Update for WebCore changes.

        * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
        (WebKit::WebPaymentCoordinator::paymentCoordinatorDestroyed):
        (WebKit::WebPaymentCoordinator::mainFrameDestroyed): Deleted.
        * WebProcess/ApplePay/WebPaymentCoordinator.h:

2016-06-27  Simon Fraser  <simon.fraser@apple.com>

        Fix TestWebKitAPI crash introduced in r202532.

        WebPageProxy::forceRepaint() could trigger a call to the didForceRepaintCallback()
        after the WebPageProxy had been invalidated, causing a null de-ref of m_drawingArea.
        Fix by checking for error and isValid().

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::forceRepaint):

2016-06-27  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting
        https://bugs.webkit.org/show_bug.cgi?id=159077

        Reviewed by Tim Horton.

        Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process,
        which is necessary for UI-side compositing.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::forceRepaint):

2016-06-27  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: When modifying sessionStorage, localStorage gets updated
        https://bugs.webkit.org/show_bug.cgi?id=159181
        <rdar://problem/27043447>

        Reviewed by Timothy Hatcher.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
        This should be dispatching storage events.

2016-06-27  Alex Christensen  <achristensen@webkit.org>

        Fix flakiness on Sierra after r202511
        https://bugs.webkit.org/show_bug.cgi?id=159071

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::clearCredentials):
        Replacing the NSURLSessions immediately caused assertions because the tasks are not always all stopped immediately when tearing down a test.
        Stopping an NSURLSession needs to be done asynchronously.  I'll try a different testing technique for r202511.

2016-06-27  Alex Christensen  <achristensen@webkit.org>

        Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=159071

        Reviewed by Brady Eidson.

        When CFNetwork asks the NetworkProcess if we can authenticate against this protection space, we used to ask
        the WebProcess, which would call ResourceLoader::canAuthenticateAgainstProtectionSpace which would ask the FrameLoaderClient,
        which would synchronously ask the UIProcess.  Going directly from the NetworkProcess to the UIProcess gives us many advantages:
        1. It reduces IPC because we ask fewer loads.
        2. It reduces synchronous IPC because we are not using the same code path as WebKit1 any more.
        3. It allows us to check if the NetworkProcess is still valid in sendToNetworkingProcess, possibly fixing rdar://problem/26825408
        4. It allows us to ask the UIProcess when we get authentication challenges for synchronous xhr.

        I added a new test http/tests/xmlhttprequest/sync-delegate-callbacks.html to verify the change in behavior of synchronous xhr.
        In order to make this test not flaky on platforms using NSURLSession, we clear the NSURLSessions used by WebKitTestRunner
        to make sure that the TLS session cache is cleared so we get NSURLAuthenticationChallenges corresponding to the NSURLConnection
        canAuthenticateAgainstProtectionSpace callback when we initiate the first HTTPS connection to 127.0.0.1 with this session. 

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::clearCachedCredentials):
        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
        (WebKit::NetworkProcess::cancelDownload):
        (WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/NetworkResourceLoader.messages.in:
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::networkStorageSession):
        (WebKit::NetworkSession::clearCredentials):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadProxy::willSendRequest):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
        (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.messages.in:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::backForwardClear):
        (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpace):
        (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
        (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResource):
        (WebKit::WebResourceLoader::isAlwaysOnLoggingAllowed):
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Deleted.
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.messages.in:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::clearCachedCredentials):
        (WebKit::WebProcess::focusedWebPage):

2016-06-27  Anders Carlsson  <andersca@apple.com>

        Discounted items are displayed with positive values
        https://bugs.webkit.org/show_bug.cgi?id=159160
        rdar://problem/26980772

        Reviewed by Dean Jackson.

        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
        (WebKit::toDecimalNumber):
        Add new helper function. Correctly compute the mantissa.

        (WebKit::toPKPaymentSummaryItem):
        (WebKit::toPKShippingMethod):
        Use toDecimalNumber.

2016-06-27  Miguel Gomez  <magomez@igalia.com>

        [GTK][EFL] Build with threaded compositor enabled is broken
        https://bugs.webkit.org/show_bug.cgi?id=159138

        Reviewed by Carlos Garcia Campos.

        Replace the usage of NoncopyableFunction with Function, to follow the changes in r202439.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::performTask):
        (WebKit::CompositingRunLoop::performTaskSync):
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:

2016-06-24  Brian Burg  <bburg@apple.com>

        REGRESSION(r201171): CRASH at WebKit::WebInspectorProxy::open() + 31 when running inspector layout tests
        https://bugs.webkit.org/show_bug.cgi?id=159070
        <rdar://problem/26768628>

        Reviewed by Joseph Pecoraro.

        We have been seeing a few crashes underneath WebInspectorProxy::bringToFront() on the bots.
        Previously, this code didn't use m_inspectorPage so there was nothing to null-dereference.

        However, it doesn't make sense that we would hit the null dereference here:

         - The only caller of bringToFront() on the WebProcess side is InspectorController::show().
           It only tries to bring to front if there is already a local frontend connection, which
           shouldn't be the case if m_inspectorPage is null.

         - It's guarded by m_underTest, which should have been set to true in createInspectorPage().

        These clues lead me to believe that we may be improperly tearing down the inspector between tests.
        For example, it seems possible that a local frontend connection is not being torn down, so
        InspectorController never asks to create a inspector page when the next test calls showWebInspector.

        Since this crash is not easy to reproduce, we don't have much to go on. For now, this patch
        adds an early return in the case where m_inspectorPage is null when calling open().

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::open):

2016-06-24  Jer Noble  <jer.noble@apple.com>

        Vimeo.com videos do not get playback controls
        https://bugs.webkit.org/show_bug.cgi?id=159082
        <rdar://problem/26586630>

        Reviewed by Eric Carlson.

        When the HasAudioOrVideo media state changes, let the video controls recalculate
        by calling videoControlsManagerDidChange().

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange):

2016-06-24  Beth Dakin  <bdakin@apple.com>

        Include enclosingListType in EditorState
        https://bugs.webkit.org/show_bug.cgi?id=159102
        -and corresponding-
        rdar://problem/26932490

        Reviewed by Enrica Casucci.

        * Shared/EditorState.cpp:
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):

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

        Inline more of the Apple Pay source code
        https://bugs.webkit.org/show_bug.cgi?id=159099

        Reviewed by Andreas Kling.

        * Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Removed.
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _applePayCapabilityDisclosureAllowed]):
        (-[WKPreferences _setApplePayCapabilityDisclosureAllowed:]):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _applePayEnabled]):
        (-[WKWebViewConfiguration _setApplePayEnabled:]):
        (-[WKWebViewConfiguration _paymentsEnabled]):
        (-[WKWebViewConfiguration _setPaymentsEnabled:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::resetState):
        * UIProcess/WebPageProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_userInterfaceLayoutDirection):
        (WebKit::WebPage::updatePreferences):

2016-06-21  Anders Carlsson  <andersca@apple.com>

        Rename NoncopyableFunction to Function
        https://bugs.webkit.org/show_bug.cgi?id=158354

        Reviewed by Chris Dumez.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::traverse):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-06-22  Anders Carlsson  <andersca@apple.com>

        Move WebKit2 Apple Pay code to the open source repository
        https://bugs.webkit.org/show_bug.cgi?id=159041

        Reviewed by Sam Weinig.

        * DerivedSources.make:
        * Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Added.
        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: Added.
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp: Added.
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added.
        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in: Added.
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: Added.
        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Added.
        * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Added.
        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: Added.
        * UIProcess/WebPageProxy.cpp:
        * UIProcess/WebPageProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/ApplePay/WebPaymentCoordinator.cpp: Added.
        * WebProcess/ApplePay/WebPaymentCoordinator.h: Added.
        * WebProcess/ApplePay/WebPaymentCoordinator.messages.in: Added.

2016-06-24  Chris Dumez  <cdumez@apple.com>

        [WK2] PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed
        https://bugs.webkit.org/show_bug.cgi?id=159080
        <rdar://problem/26982642>

        Reviewed by Anders Carlsson.

        PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed.
        This leads to WebPageProxy object leaks when the client keeps chaining related views.

        In this patch, we null our the PageConfiguration's relatedPage in WebPageProxy::close()
        to break the chain and make sure we only keep alive 1 relatedPage rather than a chain of
        them.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close):

2016-06-24  Jer Noble  <jer.noble@apple.com>

        Playback controls refer to wrong element when playing multiple items in a page.
        https://bugs.webkit.org/show_bug.cgi?id=159076
        <rdar://problem/26953532>

        Reviewed by Beth Dakin.

        clearPlaybackControlsManager() no longer takes a parameter.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::clearPlaybackControlsManager):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager): Make sure to removeClientForContext()
            if the old context refers to a live media element.
        (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):

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

        IDB tests crashing attempting to register sandbox extensions for blob files.
        https://bugs.webkit.org/show_bug.cgi?id=159094.

        Reviewed by Sam Weinig.
        
        Already tested by storage/indexeddb/modern/handle-user-delete.html

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::preregisterSandboxExtensionsIfNecessary): Check whether the IDBResultData actually contains
          a getResult before trying to access it.

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

        Retrieving Blobs from IndexedDB using cursors fails in WK2 (Sandboxing)
        https://bugs.webkit.org/show_bug.cgi?id=158991

        Reviewed by Alex Christensen.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles):
        (WebKit::DatabaseProcess::didGetSandboxExtensionsForBlobFiles):
        * DatabaseProcess/DatabaseProcess.h:
        
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::handleGetResult): Handle creation of sandbox extensions
          for any result that might contain blob values.
        (WebKit::WebIDBConnectionToClient::didGetRecord):
        (WebKit::WebIDBConnectionToClient::didOpenCursor):
        (WebKit::WebIDBConnectionToClient::didIterateCursor):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        
        * Shared/Databases/IndexedDB/WebIDBResult.cpp: Added.
        (WebKit::WebIDBResult::encode):
        (WebKit::WebIDBResult::decode):
        * Shared/Databases/IndexedDB/WebIDBResult.h: Added.
        (WebKit::WebIDBResult::WebIDBResult):
        (WebKit::WebIDBResult::resultData):
        (WebKit::WebIDBResult::handles):
        
        * Shared/SandboxExtension.h: Make SandboxExtension handles moveable.
                
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::preregisterSandboxExtensionsIfNecessary): Register sandbox extensions with the
          Networking process for any result that might contain blob values.
        (WebKit::WebIDBConnectionToServer::didGetRecord):
        (WebKit::WebIDBConnectionToServer::didOpenCursor):
        (WebKit::WebIDBConnectionToServer::didIterateCursor):
        (WebKit::WebIDBConnectionToServer::didGetRecordWithSandboxExtensions): Deleted.
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

2016-06-23  Alex Christensen  <achristensen@webkit.org>

        Remove unused didCancelAuthenticationChallenge
        https://bugs.webkit.org/show_bug.cgi?id=158819

        Reviewed by David Kilzer.

        * NetworkProcess/Downloads/mac/DownloadMac.mm:
        (-[WKDownloadAsDelegate download:didCancelAuthenticationChallenge:]): Deleted.
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didCancelAuthenticationChallenge): Deleted.
        * NetworkProcess/NetworkLoad.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): Deleted.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2016-06-23  Benjamin Poulain  <benjamin@webkit.org>

        Specialize synchronous event tracking per event type
        https://bugs.webkit.org/show_bug.cgi?id=158826

        Reviewed by Simon Fraser.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<EventTrackingRegions>::encode):
        (IPC::ArgumentCoder<EventTrackingRegions>::decode):
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        (WebKit::RemoteScrollingCoordinatorProxy::eventTrackingTypeForPoint):
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::mergeTrackingTypes):
        (WebKit::WebPageProxy::updateTouchEventTracking):
        (WebKit::WebPageProxy::touchEventTrackingType):
        (WebKit::WebPageProxy::handleTouchEventSynchronously):
        (WebKit::WebPageProxy::handleTouchEventAsynchronously):
        (WebKit::WebPageProxy::handleTouchEvent):
        (WebKit::WebPageProxy::resetState):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::TouchEventTracking::isTrackingAnything):
        (WebKit::WebPageProxy::TouchEventTracking::reset):

2016-06-23  Said Abou-Hallawa  <sabouhallawa@apple.com>

        requestFrameAnimation() callback timestamp should be very close to Performance.now() 
        https://bugs.webkit.org/show_bug.cgi?id=159038

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):

2016-06-23  Chris Dumez  <cdumez@apple.com>

        [iOS] A WebPageProxy in closed state should not be allowed to hold a process assertion
        https://bugs.webkit.org/show_bug.cgi?id=159068
        <rdar://problem/17665473>

        Reviewed by Tim Horton.

        A WebPageProxy in closed state should not be allowed to hold a process assertion. It
        currently happens that WebPageProxy::close() gets called but that the WebPageProxy is
        kept alive by Safari (e.g. In case of top-hit preloading). In such cases, we fail to
        release the foreground process assertion that the WebPageProxy holds.

        We should clear the foreground process assertion that the WebPageProxy holds as soon
        as WebPageProxy::close() is called.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close):

2016-06-23  Brent Fulgham  <bfulgham@apple.com>

        [OS X][WK2] Expand sandbox for new mach endpoints
        https://bugs.webkit.org/show_bug.cgi?id=159040
        <rdar://problem/25238336>

        Reviewed by Alexey Proskuryakov.

        Grant the WebContent and Networking processes the mach lookup capability for
        various Security-related mach endpoints..

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
        * WebProcess/com.apple.WebProcess.sb.in:

2016-06-23  Commit Queue  <commit-queue@webkit.org>

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

        Not needed for iOS (Requested by bfulgham on #webkit).

        Reverted changeset:

        "[OS X][WK2] Expand sandbox for new mach endpoints"
        https://bugs.webkit.org/show_bug.cgi?id=157919
        http://trac.webkit.org/changeset/201194

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

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

        * gtk/NEWS: Add release notes for 2.13.2.

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

        REGRESSION(r201880): WebSockets based remote inspector is broken since r201880
        https://bugs.webkit.org/show_bug.cgi?id=158613

        Reviewed by Michael Catanzaro.

        In r201880 SocketStreamHandleClient was modified to receive references instead of
        pointers. WebSocketServerConnection also implements SocketStreamHandleClient but since it's doesn't use
        override, it was unnoticed and not updated, so we ended up using the default empty implementation instead of
        the WebSocketServerConnection one.

        * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
        (WebKit::WebSocketServerConnection::WebSocketServerConnection):
        (WebKit::WebSocketServerConnection::setSocketHandle):
        (WebKit::WebSocketServerConnection::shutdownNow):
        (WebKit::WebSocketServerConnection::didCloseSocketStream):
        (WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
        (WebKit::WebSocketServerConnection::didUpdateBufferedAmount):
        (WebKit::WebSocketServerConnection::didFailSocketStream): Deleted.
        * UIProcess/InspectorServer/WebSocketServerConnection.h:

2016-06-22  Brent Fulgham  <bfulgham@apple.com>

        [iOS][WK2] Expand sandbox to read voice services preferences
        https://bugs.webkit.org/show_bug.cgi?id=159046
        <rdar://problem/26926722>

        Reviewed by Alexey Proskuryakov.

        Expand the sandbox to permit read-only access to voice services preferences.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2016-06-22  Sam Weinig  <sam@webkit.org>

        Add SPI to allow creating a WKCertificateInfoRef from a SecTrustRef
        https://bugs.webkit.org/show_bug.cgi?id=159025

        Reviewed by Tim Horton.

        * Shared/API/c/mac/WKCertificateInfoMac.h:
        * Shared/API/c/mac/WKCertificateInfoMac.mm:
        (WKCertificateInfoCreateWithServerTrust):

2016-06-22  Brady Eidson  <beidson@apple.com>

        DatabaseProcess doesn't handle WebProcesses going away uncleanly.
        https://bugs.webkit.org/show_bug.cgi?id=158894

        Reviewed by Alex Christensen.

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::didClose):
        
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess): Actually unregister this connection
          from the IDBServer so it can clean up.
        (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
        
2016-06-22  Chris Dumez  <cdumez@apple.com>

        Stop using PassRefPtr in ShareableResource
        https://bugs.webkit.org/show_bug.cgi?id=159043

        Reviewed by Alex Christensen.

        Stop using PassRefPtr in ShareableResource.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
        * Shared/ShareableResource.cpp:
        (WebKit::shareableResourceDeallocate):
        (WebKit::ShareableResource::wrapInSharedBuffer):
        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
        (WebKit::ShareableResource::create):
        (WebKit::ShareableResource::map):
        (WebKit::ShareableResource::ShareableResource):
        * Shared/ShareableResource.h:

2016-06-17  Dean Jackson  <dino@apple.com>

        REGRESSION: Double tap to zoom does not work on yahoo finance
        https://bugs.webkit.org/show_bug.cgi?id=158886
        <rdar://problem/24917760>

        Reviewed by Simon Fraser.

        We shouldn't enable fast click on pages that have
        had to shrink to fit. In other words, we should enable
        double-tap-to-zoom if the page has already zoomed.

        Test: fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html

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

2016-06-22  Brian Burg  <bburg@apple.com>

        Web Automation: Automation.inspectBrowsingContext should have an option to enable timeline auto-capturing
        https://bugs.webkit.org/show_bug.cgi?id=159004
        <rdar://problem/26931269>

        Reviewed by Joseph Pecoraro.

        Automation.inspectBrowsingContext was added to make it easier to hit breakpoints inside of
        code evaluated using Automation.evaluateJavaScriptFunction. I recently changed the behavior
        of this command to automatically start profiling the page as soon as the inspector attached
        so that a full timeline recording could be obtained. However, starting a timeline recording
        turns off the debugger, so this command is not so useful for debugging right now.

        Add a new option, enableAutoCapturing, to the inspectBrowsingContext command. Don't toggle
        profiling automatically unless this optional flag is present and set to true.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::inspectBrowsingContext):
        (WebKit::WebAutomationSession::inspectorFrontendLoaded): Deleted.
        * UIProcess/Automation/WebAutomationSession.h:

2016-06-22  Tim Horton  <timothy_horton@apple.com>

        Mail snapshot has black webview in multitasking switcher
        https://bugs.webkit.org/show_bug.cgi?id=159036
        <rdar://problem/25972938>

        Reviewed by Simon Fraser.

        There is a window of time between an application going into the background
        and SpringBoard's snapshotting mechanism completing where it is possible
        (though difficult, timing-wise) for RemoteLayerBackingStoreCollection to
        make still-needed surfaces volatile (and, even worse, for them to get emptied).

        UIKit suggested instead waiting for the window context teardown notification,
        which does indeed seem to fire after the snapshotting is complete.
        This may have the convenient side effect of making the volatility timer
        repeat fewer times in general, because it is now started closer to the
        last time that the surfaces will be in-use.

        * UIProcess/ApplicationStateTracker.h:
        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
        (WebKit::ApplicationStateTracker::~ApplicationStateTracker):
        (WebKit::ApplicationStateTracker::applicationDidFinishSnapshottingAfterEnteringBackground):
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didMoveToWindow]):
        (-[WKContentView _applicationDidFinishSnapshottingAfterEnteringBackground]):
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView didMoveToWindow]):
        (-[WKPDFView _applicationDidFinishSnapshottingAfterEnteringBackground]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::applicationDidEnterBackground):
        (WebKit::WebPage::applicationDidFinishSnapshottingAfterEnteringBackground):

2016-06-22  Chris Dumez  <cdumez@apple.com>

        Add logging related to process assertions to help debug process suspension issues
        https://bugs.webkit.org/show_bug.cgi?id=159001

        Reviewed by Antti Koivisto.

        Add logging related to process assertions to help debug process suspension issues.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::didChangeIsLoading):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
        (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::updateActivityToken):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::setIsHoldingLockedFiles):

2016-06-21  Sam Weinig  <sam@webkit.org>

        WKWebView with no WKNavigationDelegate does not follow universal links
        <rdar://problem/24374110>
        https://bugs.webkit.org/show_bug.cgi?id=158997

        Reviewed by Dan Bernstein.

        API Test:
             WKWebView.DefaultNavigationDelegate

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        When initializing the WKWebView, set a default navigation client.

2016-06-21  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r202296.

        Broke basic browsing in Safari

        Reverted changeset:

        "WKWebView with no WKNavigationDelegate does not follow
        universal links"
        https://bugs.webkit.org/show_bug.cgi?id=158997
        http://trac.webkit.org/changeset/202296

2016-06-21  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * Configurations/FeatureDefines.xcconfig:

2016-06-21  Anders Carlsson  <andersca@apple.com>

        Begin moving the Apple Pay code to the open source repository
        https://bugs.webkit.org/show_bug.cgi?id=158998

        Reviewed by Tim Horton.

        * Configurations/FeatureDefines.xcconfig:
        Add ENABLE_APPLE_PAY.

2016-06-21  Said Abou-Hallawa  <sabouhallawa@apple,com>

        Add system tracing points for requestAnimationFrame() workflow
        https://bugs.webkit.org/show_bug.cgi?id=158723

        Reviewed by Simon Fraser.

        Add trace points for requestAnimationFrame().

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
        (WebKit::RemoteLayerTreeContext::buildTransaction):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):

2016-06-21  Sam Weinig  <sam@webkit.org>

        WKWebView with no WKNavigationDelegate does not follow universal links
        <rdar://problem/24374110>
        https://bugs.webkit.org/show_bug.cgi?id=158997

        Reviewed by Dan Bernstein.

        API Test:
             WKWebView.DefaultNavigationDelegate

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        When initializing the WKWebView, set a default navigation client.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setLoaderClient):
        Be sure to clear out a navigation client, if present, when setting a loader client,
        as they are mutually exclusive.

2016-06-20  Simon Fraser  <simon.fraser@apple.com>

        Focus event dispatched in iframe causes parent document to scroll incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=158629
        rdar://problem/26521616

        Reviewed by Tim Horton.

        Pass SelectionRevealMode::Reveal in existing code.

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

2016-06-21  Said Abou-Hallawa  <sabouhallawa@apple,com>

        [iOS][WK2] When an animation frame is missed, the UI process should immediately notify the Web process once a frame is committed
        https://bugs.webkit.org/show_bug.cgi?id=158933

        Reviewed by Simon Fraser.

        When a frame is committed, the UI process schedules a CADisplayLink and waits until
        the next didRefreshDisplay event is fired. This causes more delay in the scenario
        where there are frames are dropped. didRefreshDisplay() should be called immediately
        when commitLayerTree message is received and the last frame was dropped.

        The fix is to have the CADisplayLink active all the times. It should be paused
        only when we detect at least one frame is dropped. In this case we should not
        send a message to the UI process since it has not sent the last requested LayerTree.
        Also we should not waste the CPU time by scheduling a new CADisplayLink since we
        have not processed the last event. We should resume CADisplayLink timer once a
        commitLayerTree message is received.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (-[WKOneShotDisplayLinkHandler pause]):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
        (-[WKOneShotDisplayLinkHandler displayLinkFired:]):

2016-06-21  Amir Alavi  <aalavi@apple.com>

        Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource
        https://bugs.webkit.org/show_bug.cgi?id=158967

        Reviewed by Brent Fulgham.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Deleted.

2016-06-21  Dan Bernstein  <mitz@apple.com>

        Inlined some picture-in-picture code.
        https://bugs.webkit.org/show_bug.cgi?id=158977

        Reviewed by Eric Carlsson.

        This code was written primarily by Ada Chan, and originally reviewed by Alex Christensen,
        Anders Carlsson, Conrad Shultz, Dan Bernstein, Eric Carlson, Jer Noble, Jeremy Jones,
        Jon Lee, Remy Demarest, and Zach Li.

        * Shared/WebPreferencesStoreDefaultsAdditions.cpp:
          Define and use DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::defaults): Removed include of WebPreferencesStoreDefaultsAdditions.cpp now that the
          default is defined correctly in WebPreferencesStoreDefaultsAdditions.cpp.

        * UIProcess/API/C/WKPreferences.cpp: Inlined WKPreferencesAdditions.cpp.
        * UIProcess/API/C/WKPreferencesRefPrivate.h: Ditto.

        * WebProcess/cocoa/WebVideoFullscreenManager.mm: Inlined WebVideoFullscreenManagerSupportsVideoFullscreenMac.mm.

2016-06-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Web view is not redrawn when reparented in force compositing mode
        https://bugs.webkit.org/show_bug.cgi?id=158689

        Reviewed by Žan Doberšek.

        When the web view is reparented in accelerated compositing mode, the UI process always exits the accelerated
        mode when the view is unrealized, because the native surface handle for compositing is destroyed, but it doesn't
        enter again when the view is realized and a new native surface handle for compositing is used. This happens
        because the UI and Web processes are not in sync regarding whether the page is in accelerated compositing or
        not. The Web process never exits accelerated mode when compositing mode is forced, but the UI process doesn't
        check that setting at all.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseResizeRedirectedWindow): Helper function to ensure the redirected window size is properly updated.
        (webkitWebViewBaseRealize): Resize the redirected window if the view is already in AC mode when realized.
        (webkitWebViewRenderAcceleratedCompositingResults): Use webkitWebViewBaseResizeRedirectedWindow().
        (webkitWebViewBaseSizeAllocate): Ditto.
        (webkitWebViewBaseWillEnterAcceleratedCompositingMode): Ditto.
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::alwaysUseCompositing): Return true in force compositing mode.
        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): Update assert.
        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Do not exit AC mode compositing mode is always enabled.
        * UIProcess/DrawingAreaProxyImpl.h:
        (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): Return true also in force compositing mode.
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::RedirectedXCompositeWindow::surface): Ensure we never return an uninitialized surface to prevent
        rendering artifacts in in force compositing mode when waiting for the first update on the redirected window.

2016-06-20  Commit Queue  <commit-queue@webkit.org>

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

        Broke Windows build and iOS tests (Requested by ap on
        #webkit).

        Reverted changeset:

        "Focus event dispatched in iframe causes parent document to
        scroll incorrectly"
        https://bugs.webkit.org/show_bug.cgi?id=158629
        http://trac.webkit.org/changeset/202243

2016-06-20  Brent Fulgham  <bfulgham@apple.com>

        Allow Spotlight suggestions to be read by any process
        https://bugs.webkit.org/show_bug.cgi?id=158950
        <rdar://problem/26865374>

        Reviewed by Alexey Proskuryakov.

        Extend sandbox to allow all web processes to read Spotlight results.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * WebProcess/com.apple.WebProcess.sb.in:

2016-06-20  Simon Fraser  <simon.fraser@apple.com>

        Focus event dispatched in iframe causes parent document to scroll incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=158629
        rdar://problem/26521616

        Reviewed by Tim Horton.

        Pass SelectionRevealMode::Reveal in existing code.

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

2016-06-20  Keith Rollin  <krollin@apple.com>

        Remove RefPtr::release() and change calls sites to use WTFMove()
        https://bugs.webkit.org/show_bug.cgi?id=158369

        Reviewed by Chris Dumez.

        RefPtr::release() releases its managed pointer awkwardly. It's more
        direct and clearer to use WTFMove to transfer ownership of the managed
        pointer.

        As part of this cleanup, also change a lot of explicit data types to
        'auto'.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::decode):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::allocate):
        (WebKit::SharedMemory::create):
        (WebKit::SharedMemory::map):
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::createWebProcessConnection):
        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (encodeToObjectStream):
        * Shared/API/c/WKImage.cpp:
        (WKImageCreate):
        * Shared/API/c/WKNumber.cpp:
        (WKBooleanCreate):
        (WKDoubleCreate):
        (WKUInt64Create):
        * Shared/API/c/WKSecurityOriginRef.cpp:
        (WKSecurityOriginCreate):
        * Shared/API/c/WKSerializedScriptValue.cpp:
        (WKSerializedScriptValueCreate):
        (WKSerializedScriptValueCreateWithInternalRepresentation):
        * Shared/API/c/cairo/WKImageCairo.cpp:
        (WKImageCreateFromCairoSurface):
        * Shared/API/c/cg/WKImageCG.cpp:
        (WKImageCreateFromCGImage):
        * Shared/API/c/mac/WKCertificateInfoMac.mm:
        (WKCertificateInfoCreateWithCertficateChain):
        * Shared/API/c/mac/WKObjCTypeWrapperRef.mm:
        (WKObjCTypeWrapperCreate):
        * Shared/API/c/mac/WKWebArchive.cpp:
        (WKWebArchiveCreate):
        (WKWebArchiveCreateWithData):
        (WKWebArchiveCreateFromRange):
        (WKWebArchiveCopyMainResource):
        (WKWebArchiveCopySubresources):
        (WKWebArchiveCopySubframeArchives):
        * Shared/API/c/mac/WKWebArchiveResource.cpp:
        (WKWebArchiveResourceCreate):
        * Shared/APIWebArchive.mm:
        (API::WebArchive::WebArchive):
        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
        (WebKit::NetscapePluginModule::getOrCreate):
        * Shared/ShareableBitmap.cpp:
        (WebKit::ShareableBitmap::create):
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::map):
        * Shared/gtk/ArgumentCodersGtk.cpp:
        (IPC::ArgumentCoder<DragData>::decode):
        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewCreate):
        * UIProcess/API/C/WKBatteryStatus.cpp:
        (WKBatteryStatusCreate):
        * UIProcess/API/C/WKGeolocationPosition.cpp:
        (WKGeolocationPositionCreate_b):
        * UIProcess/API/C/WKGrammarDetail.cpp:
        (WKGrammarDetailCreate):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageCopySessionState):
        * UIProcess/API/C/WKPageGroup.cpp:
        (WKPageGroupCreateWithIdentifier):
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesCreate):
        (WKPreferencesCreateWithIdentifier):
        (WKPreferencesCreateCopy):
        * UIProcess/API/C/WKSessionRef.cpp:
        (WKSessionCreate):
        * UIProcess/API/C/WKSessionStateRef.cpp:
        (WKSessionStateCopyData):
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextCopyPlugInInfoForBundleIdentifier):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView loadRequest:]):
        (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
        (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
        (-[WKWebView goToBackForwardListItem:]):
        (-[WKWebView goBack]):
        (-[WKWebView goForward]):
        (-[WKWebView reload]):
        (-[WKWebView reloadFromOrigin]):
        (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
        (-[WKWebView _reloadWithoutContentBlockers]):
        (-[WKWebView _sessionStateData]):
        (-[WKWebView _restoreSessionState:andNavigate:]):
        * UIProcess/API/efl/ewk_database_manager.cpp:
        (EwkDatabaseManager::createOriginList):
        * UIProcess/API/efl/ewk_storage_manager.cpp:
        (EwkStorageManager::createOriginList):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkitWebViewCreateNewPage):
        (webkitWebViewPrintFrame):
        (getContentsAsMHTMLDataCallback):
        * UIProcess/Cocoa/SessionStateCoding.mm:
        (WebKit::encodeSessionState):
        * UIProcess/GenericCallback.h:
        (WebKit::CallbackMap::take):
        * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
        (WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
        * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
        (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::getOrCreatePluginProcess):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::setItem):
        (WebKit::StorageManager::StorageArea::removeItem):
        (WebKit::StorageManager::createLocalStorageMap):
        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::addItem):
        (WebKit::WebBackForwardList::clear):
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::createWithLegacyDefaults):
        (WebKit::WebPreferences::copy):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::~WebProcessPool):
        * UIProcess/mac/ViewSnapshotStore.mm:
        (WebKit::ViewSnapshotStore::recordSnapshot):
        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _webHitTestResult]):
        * UIProcess/mac/WKPrintingView.mm:
        (-[WKPrintingView _askPageToComputePageRects]):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::setDragImage):
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
        (-[WKWebProcessPlugInFrame hitTest:]):
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
        (-[WKWebProcessPlugInHitTestResult nodeHandle]):
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
        (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
        (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
        (+[WKWebProcessPlugInScriptWorld world]):
        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundlePostSynchronousMessage):
        * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
        (WKBundleDOMWindowExtensionCreate):
        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
        (WKBundleHitTestResultCopyNodeHandle):
        (WKBundleHitTestResultCopyURLElementHandle):
        * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
        (WKBundleNavigationActionCopyHitTestResult):
        (WKBundleNavigationActionCopyFormElement):
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleCreate):
        (WKBundleNodeHandleCopyDocument):
        (WKBundleNodeHandleCopySnapshotWithOptions):
        (WKBundleNodeHandleCopyVisibleRange):
        (WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
        (WKBundleNodeHandleCopyDocumentFrame):
        (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
        (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageCreateSnapshotWithOptions):
        (WKBundlePageCreateSnapshotInViewCoordinates):
        (WKBundlePageCreateSnapshotInDocumentCoordinates):
        (WKBundlePageCreateScaledSnapshotInDocumentCoordinates):
        (WKBundlePagePostSynchronousMessageForTesting):
        * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
        (WKBundleRangeHandleCreate):
        (WKBundleRangeHandleCopySnapshotWithOptions):
        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
        (WKBundleScriptWorldCreateWorld):
        * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
        (-[WKDOMNode _copyBundleNodeHandleRef]):
        * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
        (-[WKDOMRange _copyBundleRangeHandleRef]):
        * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
        (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::imageForRect):
        (WebKit::InjectedBundleNodeHandle::renderedImage):
        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        (WebKit::InjectedBundleRangeHandle::getOrCreate):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::create):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::loadURL):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::createScrollbar):
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::applyChange):
        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
        (WebKit::toFormData):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::createPlugin):
        (WebKit::WebFrameLoaderClient::recreatePlugin):
        (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
        (WebKit::WebFrameLoaderClient::createNetworkingContext):
        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::highlight):
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::convertImageToBitmap):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::updateFindUIAfterPageScroll):
        * WebProcess/WebPage/VisitedLinkTableController.cpp:
        (WebKit::VisitedLinkTableController::getOrCreate):
        (WebKit::VisitedLinkTableController::setVisitedLinkTable):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::createWithCoreMainFrame):
        (WebKit::WebFrame::createSubframe):
        (WebKit::WebFrame::create):
        (WebKit::WebFrame::createSelectionSnapshot):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):
        (WebKit::WebPage::snapshotAtSize):
        (WebKit::WebPage::snapshotNode):
        (WebKit::WebPage::willPerformLoadDragDestinationAction):
        (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
        (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
        (WebKit::WebPage::drawRectToImage):
        * WebProcess/WebPage/WebPageGroupProxy.cpp:
        (WebKit::WebPageGroupProxy::create):
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::Properties::decode):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::create):
        (WebKit::PlatformCALayerRemote::clone):
        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
        (WebKit::PlatformCALayerRemoteCustom::create):
        (WebKit::PlatformCALayerRemoteCustom::clone):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):

2016-06-20  Commit Queue  <commit-queue@webkit.org>

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

        The test either fails or times out 100% of the time (Requested
        by ap on #webkit).

        Reverted changeset:

        "REGRESSION: Double tap to zoom does not work on yahoo
        finance"
        https://bugs.webkit.org/show_bug.cgi?id=158886
        http://trac.webkit.org/changeset/202179

2016-06-20  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r191499): Tab content "jumps" down when focusing tabs that load in the background
        https://bugs.webkit.org/show_bug.cgi?id=158904
        <rdar://problem/26025831>

        Reviewed by Sam Weinig.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::viewDidMoveToWindow):
        During the large refactor that was r191499, we somehow ended up with two
        different members for the same thing - one that got written, and one that
        got read. We should only have one.

2016-06-20  Tim Horton  <timothy_horton@apple.com>

        Try to fix the iOS build after r202142 and r202224.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):

2016-06-19  Simon Fraser  <simon.fraser@apple.com>

        Fix erroneously commented line added in r202142.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):

2016-06-16  Enrica Casucci  <enrica@apple.com>

        Support configurable autocapitalization.
        https://bugs.webkit.org/show_bug.cgi?id=158860
        rdar://problem/26231403

        Reviewed by Tim Horton.

        The behavior of spellchecker should be configurable to avoid
        unwanted autocapitalization.

        * UIProcess/API/APIPageConfiguration.cpp:
        (API::PageConfiguration::copy):
        * UIProcess/API/APIPageConfiguration.h:
        (API::PageConfiguration::initialCapitalizationEnabled):
        (API::PageConfiguration::setInitialCapitalizationEnabled):
        * UIProcess/API/C/WKPageConfigurationRef.cpp:
        (WKPageConfigurationSetIntialCapitalizationEnabled):
        * UIProcess/API/C/WKPageConfigurationRef.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _initialCapitalizationEnabled]):
        (-[WKWebViewConfiguration _setInitialCapitalizationEnabled:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/TextChecker.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::checkTextOfParagraph):
        (WebKit::WebPageProxy::getGuessesForWord):
        * UIProcess/WebPageProxy.h:
        * UIProcess/efl/TextCheckerEfl.cpp:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::TextChecker::getGuessesForWord):
        (WebKit::TextChecker::checkTextOfParagraph):
        * UIProcess/ios/TextCheckerIOS.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):

2016-06-17  Chris Dumez  <cdumez@apple.com>

        Use WTF::NoncopyableFunction in NetworkDataTaskClient
        https://bugs.webkit.org/show_bug.cgi?id=158887

        Reviewed by Alex Christensen.

        Use WTF::NoncopyableFunction in NetworkDataTaskClient instead of std::function
        and consistently move it around. This avoids some unnecessary copying.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::willDecidePendingDownloadDestination):
        (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::findPendingDownloadLocation):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/PingLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::didReceiveChallenge):
        (WebKit::NetworkDataTask::didReceiveResponse):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::addChallengeToChallengeMap):
        (WebKit::AuthenticationManager::coalesceChallengesMatching):
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):

2016-06-17  Antoine Quint  <graouts@apple.com>

        Web video playback controls should have RTL volume slider
        https://bugs.webkit.org/show_bug.cgi?id=158856
        <rdar://problem/25971769>

        Reviewed by Tim Horton.

        We now call setUserInterfaceLayoutDirection() on WebCore::Page to propagate
        the user interface layout direction down to the Web content. To facilitate this,
        the UserInterfaceLayoutDirection enum is now defined in WebCore.

        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (convertSystemLayoutDirection):
        (toUserInterfaceLayoutDirection):
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::toUserInterfaceLayoutDirection):
        (WebKit::WebViewImpl::userInterfaceLayoutDirection):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::userInterfaceLayoutDirection):
        (WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
        * UIProcess/WebPageProxy.h:
        * UIProcess/efl/WebView.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
        (WebKit::ViewGestureController::isPhysicallySwipingLeft):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_userInterfaceLayoutDirection):
        (WebKit::WebPage::setUserInterfaceLayoutDirection):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performNonEditingBehaviorForSelector):

2016-06-17  Dean Jackson  <dino@apple.com>

        REGRESSION: Double tap to zoom does not work on yahoo finance
        https://bugs.webkit.org/show_bug.cgi?id=158886
        <rdar://problem/24917760>

        Reviewed by Simon Fraser.

        We shouldn't enable fast click on pages that have
        had to shrink to fit. In other words, we should enable
        double-tap-to-zoom if the page has already zoomed.

        Test: fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html

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

2016-06-16  Chris Dumez  <cdumez@apple.com>

        No need to ref connection in lambda inside NetworkResourceLoader::tryStoreAsCacheEntry()
        https://bugs.webkit.org/show_bug.cgi?id=158862

        Reviewed by Darin Adler.

        No need to ref connection in lambda inside NetworkResourceLoader::tryStoreAsCacheEntry().
        We already ref the NetworkResourceLoader which hold a ref to the connection. Also update
        the lambda capture to use Ref<> for the NetworkResourceLoader instead of RefPtr<>.
        Switch callback type from std::function to WTF::NoncopyableFunction so we can capture a
        Ref<>.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::store):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-06-16  Chris Dumez  <cdumez@apple.com>

        [WK2] Improve serialization of SubresourcesEntry to network disk cache
        https://bugs.webkit.org/show_bug.cgi?id=158851

        Reviewed by Antti Koivisto.

        Improve serialization of SubresourcesEntry to network disk cache:
        - Do not bother serializing SubresourceInfo's first party for cookies
          and HTTP headers data members if the resource is transient. This is
          because those are never used for transient resources. This patch also
          makes it so that we do not even bother initializing those data members
          if the transient flag is set.
        - Update SubresourceInfo::encode() / decode() to encode and decode
          the HTTPHeaderMap data member with the right NetworkCache::Coder
          template specialization instead of using directly HTTPHeaderMap::decode()
          and HTTPHeaderMap::encode(). HTTPHeaderMap::decode() / encode() is
          unsafe in the disk cache case (see r200394).

        Also update entry types as so:
        - "resource" -> "Resource"
        - "subresources" -> "SubResources"

        These entry types are used a folder names in the disk cache and other
        folder names were capitalized. Antti suggested this was a good time
        to harmonize since we're bumping the cache version.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
        * NetworkProcess/cache/NetworkCacheStorage.h:
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourceInfo::encode):
        (WebKit::NetworkCache::SubresourceInfo::decode):
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
        (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
        (WebKit::NetworkCache::SubresourceInfo::isTransient):
        (WebKit::NetworkCache::SubresourceInfo::firstPartyForCookies):
        (WebKit::NetworkCache::SubresourceInfo::requestHeaders):

2016-06-16  Anders Carlsson  <andersca@apple.com>

        Fix macOS Sierra build
        https://bugs.webkit.org/show_bug.cgi?id=158849

        Reviewed by Tim Horton.

        Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class
        and adopt IOSurface::asLayerContents().

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::decode):
        (WebKit::RemoteLayerBackingStore::bytesPerPixel):
        (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
        (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
        (WebKit::RemoteLayerBackingStore::setBufferVolatility):
        (WebKit::RemoteLayerBackingStore::Buffer::discard):
        * UIProcess/mac/ViewSnapshotStore.mm:
        (WebKit::ViewSnapshot::create):
        (WebKit::ViewSnapshot::ViewSnapshot):
        (WebKit::ViewSnapshot::asLayerContents):

2016-06-16  Brady Eidson  <beidson@apple.com>

        When a WebsiteDataStore finds no ProcessPools and creates one from scratch, it should represent the data store's config.
        rdar://problem/26586991 and https://bugs.webkit.org/show_bug.cgi?id=158844

        Reviewed by Anders Carlsson.

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
        * UIProcess/API/APIProcessPoolConfiguration.h:

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        (WebKit::WebsiteDataStore::processPools):
        * UIProcess/WebsiteData/WebsiteDataStore.h:

2016-06-15  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] On iPad, indirect focussing of a text field doesn't always scroll to the correct location
        https://bugs.webkit.org/show_bug.cgi?id=158828

        Reviewed by Enrica Casucci.
        
        WebPage::getAssistedNodeInformation() unconditionally set information.selectionRect()
        to a 1x1 rect at the last interaction location. This caused -[WKWebView _zoomToFocusRect:...]
        to early return under the !forceScroll clause if the last interaction rect was visible, but
        the elementRect was not. This would happen, for example, if a click in a <button> focussed
        an input on some other portion of the page. This behavior is iPad-only, because forceScroll
        is only NO there.
        
        Fix by making getAssistedNodeInformation() only set the selectionRect to the last interaction
        location if that is inside of the elementRect (this caters to the case where a tap is inside
        an input which is larger than the screen). Otherwise, set it to the empty rect.
        
        Make this testable by allowing a test to opt into the iPad-style scrolling/zooming behavior
        in this code path (essentially, making forceScroll NO for testing), via testing SPI on WKWebView,
        plumbed through to WKContentView.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView forceIPadStyleZoomOnInputFocus]):
        (-[WKWebView setForceIPadStyleZoomOnInputFocus:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _displayFormNodeInputView]):
        (-[WKContentView requiresAccessoryView:]):
        (-[WKContentView inputAccessoryView]):
        (-[WKContentView forceIPadStyleZoomOnInputFocus]):
        (-[WKContentView setForceIPadStyleZoomOnInputFocus:]):
        (-[WKContentView requiresAccessoryView]): Remove redundant returns, and allow testing to
        override the "isIPad" condition.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getAssistedNodeInformation):

2016-06-15  Sam Weinig  <sam@webkit.org>

        Forward/Back keyboard shortcuts need to flip for RTL
        https://bugs.webkit.org/show_bug.cgi?id=158823
        <rdar://problem/25975359>

        Reviewed by Darin Adler.

        Pipe the UserInterfaceLayoutDirection down to the WebContentProcess on initialization
        and when it changes, and use it to flip the behavior of command-left and command-right
        when in RTL mode.

        Tests:
            WebKit2_CommandBackForwardTestWKView.LTR
            WebKit2_CommandBackForwardTestWKView.RTL
            WebKit2_CommandBackForwardTestWKWebView.LTR
            WebKit2_CommandBackForwardTestWKWebView.RTL

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _webViewPrintFormatter]):
        (-[WKWebView setSemanticContentAttribute:]):
        (-[WKWebView _printOperationWithPrintInfo:forFrame:]):
        (-[WKWebView setUserInterfaceLayoutDirection:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView setUserInterfaceLayoutDirection:]):
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::windowIsFrontWindowUnderMouse):
        (WebKit::toUserInterfaceLayoutDirection):
        (WebKit::WebViewImpl::userInterfaceLayoutDirection):
        (WebKit::WebViewImpl::setUserInterfaceLayoutDirection):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::userInterfaceLayoutDirection):
        (WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_userInterfaceLayoutDirection):
        (WebKit::WebPage::setResourceCachingDisabled):
        (WebKit::WebPage::setUserInterfaceLayoutDirection):
        (WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performNonEditingBehaviorForSelector):

2016-06-15  Tim Horton  <timothy_horton@apple.com>

        Expose _shouldExpandContentToViewHeightForAutoLayout SPI on WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=158824
        <rdar://problem/23713857>

        Reviewed by Simon Fraser.

        Test: TestWebKitAPI/WebKit2.AutoLayoutIntegration

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _shouldExpandContentToViewHeightForAutoLayout]):
        (-[WKWebView _setShouldExpandContentToViewHeightForAutoLayout:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        This property exists on WKView; expose it on WKWebView.

2016-06-15  Alex Christensen  <achristensen@webkit.org>

        Revert part of r196034
        https://bugs.webkit.org/show_bug.cgi?id=158805
        rdar://problem/26788138

        Reviewed by Dan Bernstein.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::~NetworkLoad):
        If the WebResourceLoader was destroyed and received a canAuthenticateAgainstProtectionSpace
        but did not send a continueCanAuthenticateAgainstProtectionSpace answer because there's no
        core loader, then the NetworkLoad will be destroyed.  When this happens, we still need to call
        the callback for the challenge.
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
        If there's no core loader, we can't send IPC.

2016-06-13  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Make it possible to test the Next/Previous buttons in the keyboard accessory bar
        https://bugs.webkit.org/show_bug.cgi?id=158714

        Reviewed by Enrica Casucci.

        Add UIScriptController.keyboardAccessoryBar{Next,Previous} and hook it up to the WKContentView
        method that gets called from UIKit.

        Add a test that exercises it.

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

2016-06-15  Dean Jackson  <dino@apple.com>

        RTL <select> forms are misplaced
        https://bugs.webkit.org/show_bug.cgi?id=158810
        <rdar://problem/24847541>

        Reviewed by Eric Carlson.

        AppKit made a change in Sierra that causes popup menus
        to snap to a different point when the system language is RTL.
        We need to be more explicit about what directionality
        we want, and override the location of the popup based
        on the text direction.

        I also made a small tweak to the fudge offsets we use
        in order to make button text and menu text to be
        more consistent.

        Unfortunately since this is just about the location
        of the popup menu, it's unable to be tested in our
        current infrastructure.

        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):

2016-06-15  Chris Dumez  <cdumez@apple.com>

        Drop some unnecessary header includes
        https://bugs.webkit.org/show_bug.cgi?id=158788

        Reviewed by Alexey Proskuryakov.

        Drop some unnecessary header includes in headers to speed up build time.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
        * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
        * WebProcess/Plugins/PluginView.cpp:
        * WebProcess/WebPage/WebPage.cpp:

2016-06-15  Romain Bellessort  <romain.bellessort@crf.canon.fr>

        Enabling Shadow DOM for all platforms
        https://bugs.webkit.org/show_bug.cgi?id=158738

        Reviewed by Ryosuke Niwa.

        Removed Shadow DOM from options (enabled by default)
        (comprises removal of corresponding preprocessor directives)

        * Configurations/FeatureDefines.xcconfig:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        * WebProcess/WebPage/WebPage.cpp:

2016-06-15  Antti Koivisto  <antti@apple.com>

        Vary:Cookie validation doesn't work in private browsing
        https://bugs.webkit.org/show_bug.cgi?id=158616
        <rdar://problem/26755067>

        Reviewed by Andreas Kling.

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

            Implement SessionID version of the function.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2016-06-14  Chris Dumez  <cdumez@apple.com>

        Avoid constructing a AuthenticationChallenge unnecessarily in the NetworkLoad constructor
        https://bugs.webkit.org/show_bug.cgi?id=158746

        Reviewed by Darin Adler.

        Avoid constructing a AuthenticationChallenge unnecessarily in the
        NetworkLoad constructor by using WTF::Optional<> for this data
        member.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkLoad.h:

2016-06-14  Chris Dumez  <cdumez@apple.com>

        Add missing WTFMove() in NetworkResourceLoader::didReceiveResponse()
        https://bugs.webkit.org/show_bug.cgi?id=158745

        Reviewed by Darin Adler.

        Add missing WTFMove() in NetworkResourceLoader::didReceiveResponse()
        to avoid copying the ResourceResponse.

        * NetworkProcess/NetworkResourceLoader.cpp:

2016-06-14  Chris Dumez  <cdumez@apple.com>

        Reduce copying of NetworkLoadParameters
        https://bugs.webkit.org/show_bug.cgi?id=158744

        Reviewed by Alex Christensen.

        Reduce copying of NetworkLoadParameters by moving it around instead.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::PendingDownload):
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

2016-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [ThreadedCompositor] Opening the inspector in a window causes a crash.
        https://bugs.webkit.org/show_bug.cgi?id=154444

        Reviewed by Žan Doberšek.

        The threaded compositor doesn't handle the case of changing or removing the native surface handle. When the web
        view is reparented, the current native surface handle is destroyed when the view is removed from the parent, and
        a new one is created when added to the new parent. We need to handle this case in the threaded compositor.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::stopUpdateTimer): Allow users to stop the update timer.
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Use performTaskSync because this is called
        from a synchronous IPC message and right after it returns, the current native surface is destroyed by the UI
        process. So we need to ensure we finish all pending operations for the current native surface in the compositing
        thread before it's destroyed. Then we enable or disable the scene depending on whether the native surface has
        been created or destroyed and destroy the current context in case the new handle is 0.
        (WebKit::ThreadedCompositor::tryEnsureGLContext): Just renamed to make it clear that it can fail.
        (WebKit::ThreadedCompositor::glContext):
        (WebKit::ThreadedCompositor::renderLayerTree): Return early if scene is not active.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::setNativeSurfaceHandleForCompositing): Schedule a new layer flush
        after the native surface handle changed.

2016-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Modernize and simplify threaded compositor code
        https://bugs.webkit.org/show_bug.cgi?id=158615

        Reviewed by Žan Doberšek.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::performTask): Use NoncopyableFunction.
        (WebKit::CompositingRunLoop::performTaskSync): Ditto.
        (WebKit::CompositingRunLoop::startUpdateTimer): Just renamed to start instead of set.
        (WebKit::CompositingRunLoop::run): Expose run/stop methods instead of the internal RunLoop object.
        (WebKit::CompositingRunLoop::stop): Also stop the update timer instead of relying on the caller to do it.
        (WebKit::CompositingRunLoop::setUpdateTimer): Deleted.
        (WebKit::CompositingRunLoop::stopUpdateTimer): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Protects this directly in lambda capture.
        (WebKit::ThreadedCompositor::setDeviceScaleFactor): Ditto.
        (WebKit::ThreadedCompositor::didChangeViewportSize): Ditto.
        (WebKit::ThreadedCompositor::didChangeViewportAttribute): Ditto.
        (WebKit::ThreadedCompositor::didChangeContentsSize): Ditto.
        (WebKit::ThreadedCompositor::scrollTo): Ditto.
        (WebKit::ThreadedCompositor::scrollBy): Ditto.
        (WebKit::ThreadedCompositor::updateViewport): Use startUpdateTimer().
        (WebKit::ThreadedCompositor::scheduleDisplayImmediately): Ditto.
        (WebKit::ThreadedCompositor::didChangeVisibleRect): Improve lambda captures.
        (WebKit::ThreadedCompositor::renderLayerTree): Use m_viewportController directly.
        (WebKit::ThreadedCompositor::createCompositingThread): Use createThread() version that receives a function.
        (WebKit::ThreadedCompositor::runCompositingThread): Use run method and don't stop the update timer when the run
        loop finishes.
        (WebKit::ThreadedCompositor::terminateCompositingThread): Use stop method.
        (WebKit::ThreadedCompositor::ThreadedCompositor): Deleted.
        (WebKit::ThreadedCompositor::compositingThreadEntry): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        (WebKit::ThreadedCompositor::viewportController): Deleted.

2016-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Flickering and rendering artifacts when resizing the web view
        https://bugs.webkit.org/show_bug.cgi?id=154070

        Reviewed by Žan Doberšek.

        Resizing the web view is expected to be a sync operation, the UI process creates a new backing store state ID,
        sends UpdateBackingStoreState message with the flag RespondImmediately to the web process and waits up to 500ms
        for the reply (DidUpdateBackingStoreState message). When using the threaded compositor, we schedule a task in
        the compositing thread to update the viewport size, and return immediately, so that we reply to the UI process
        before the compositing thread has actually updated its size. There's a moment in which sizes are out of sync
        causing the flickering and rendering artifacts, the UI process continues rendering at the new size, while the
        web process is still rendering at the previous size. We can prevent this from happening just by making the
        resize task synchronous in the threaded compositor.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::performTaskSync): Add sync version of performTask().
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::didChangeViewportSize): Use performTaskSync().

2016-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix Soup downloads after r201943.

        This is a follow up of r201943. The DownloadClient used in DownloadSoup was not updated to the new API of the
        ResourceHandleClient because it was not using override on the virtual methods, so it was unnoticed. That broke
        the downloads soup implementation, because didReceiveResponse is no longer used in the DownloadClient. This
        patch updates the DownloadClient to the new ResourceHandleClient API adding also override to all the virtual
        methods to prevent this from happening in the future.

        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::start):
        (WebKit::Download::startWithHandle):
        (WebKit::DownloadClient::DownloadClient):
        (WebKit::DownloadClient::downloadFailed):
        (WebKit::DownloadClient::didReceiveResponse):
        (WebKit::DownloadClient::didReceiveData):
        (WebKit::DownloadClient::didFinishLoading):
        (WebKit::DownloadClient::didFail):
        (WebKit::DownloadClient::wasBlocked): Deleted.
        (WebKit::DownloadClient::cannotShowURL): Deleted.
        (WebKit::DownloadClient::cancel):
        (WebKit::DownloadClient::handleResponse):

2016-06-13  Dan Bernstein  <mitz@apple.com>

        [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
        https://bugs.webkit.org/show_bug.cgi?id=156668
        <rdar://problem/26714558>

        Reviewed by Anders Carlsson.

        * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
          service is given the XPC domain extension entitlement when targeting macOS Sierra or later.

2016-06-13  Alex Christensen  <achristensen@webkit.org>

        Add WebSocketProvider stub
        https://bugs.webkit.org/show_bug.cgi?id=158702

        Reviewed by Brady Eidson.

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Network/WebSocketProvider.h: Added.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):

2016-06-10  Ada Chan  <adachan@apple.com>

        Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
        https://bugs.webkit.org/show_bug.cgi?id=158351
        <rdar://problem/26567938>

        Reviewed by Darin Adler.

        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::inlineVideoFrame):
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
        (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
        (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
        (WebKit::clientRectForElement): Deleted.

2016-06-10  Benjamin Poulain  <bpoulain@apple.com>

        Add support for passive event listeners on touch events
        https://bugs.webkit.org/show_bug.cgi?id=158601

        Reviewed by Simon Fraser.

        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
        (WebKit::dump):
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<EventTrackingRegions>::encode):
        (IPC::ArgumentCoder<EventTrackingRegions>::decode):
        * Shared/WebCoreArgumentCoders.h:
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        (WebKit::RemoteScrollingCoordinatorProxy::eventTrackingTypeForPoint):
        (WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion): Deleted.
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::touchEventTrackingType):
        The type is the most restrictive type of all the touch points.
        If any touch point needs synchronous tracking, everything has to be synchronous.

        (WebKit::WebPageProxy::handleTouchEventSynchronously):
        This is a very unfortunate design.

        The upper layer dealing with UIKit knows about gesture and when something
        can be dispatched asynchrnously because a gesture has started.
        This layer knows about tracking and can use that extra inforamtion
        to dispatch an event asynchrnously anyway.

        In the future, we should refactor this to let WebPageProxy
        always decide of the dispatch type. I am just concerned changing
        the upper layer while we are stabilizing WebKit.

        (WebKit::WebPageProxy::handleTouchEventAsynchronously):
        (WebKit::WebPageProxy::handleTouchEvent):
        (WebKit::WebPageProxy::resetState):
        (WebKit::WebPageProxy::WebPageProxy): Deleted.
        (WebKit::WebPageProxy::shouldStartTrackingTouchEvents): Deleted.
        * UIProcess/WebPageProxy.h:

2016-06-10  Beth Dakin  <bdakin@apple.com>

        Add requestExitFullScreen to WKFullScreenWindowController
        https://bugs.webkit.org/show_bug.cgi?id=158633
        -and corresponding-
        rdar://problem/26564036

        Reviewed by Tim Horton.

        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController requestExitFullScreen]):

2016-06-10  Alex Christensen  <achristensen@webkit.org>

        Reduce ResourceResponse copying
        https://bugs.webkit.org/show_bug.cgi?id=158232

        Reviewed by Darin Adler.

        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueDidReceiveResponse):
        (WebKit::NetworkLoad::sharedDidReceiveResponse):
        (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        (WebKit::NetworkLoad::didReceiveResponseAsync):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::retrieveCacheEntry):
        (WebKit::NetworkResourceLoader::abort):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/PingLoad.h:
        * NetworkProcess/cache/NetworkCacheCoders.h:
        (WebKit::NetworkCache::Coder<Optional<T>>::encode):
        (WebKit::NetworkCache::Coder<Optional<T>>::decode):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::didCompleteWithError):
        (WebKit::NetworkDataTask::didReceiveResponse):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::url):
        (WebKit::WebFrame::certificateInfo):
        (WebKit::WebFrame::innerText):

2016-06-09  Ryosuke Niwa  <rniwa@webkit.org>

        Add SPI to disable spellchecking on auto-fillable text fields
        https://bugs.webkit.org/show_bug.cgi?id=158611

        Reviewed by Anders Carlsson.

        Added WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled to disable spellchecking on a text field.

        This is used by WebKit2 client which desires to disable spellchecking and notably autocorrection on
        login forms, etc... where such feature would interfere with user's actions.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled): Added.
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled): Added.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:

2016-06-10  Alex Christensen  <achristensen@webkit.org>

        Introduce WTF::UniqueRef
        https://bugs.webkit.org/show_bug.cgi?id=158596

        Reviewed by Brady Eidson.

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

2016-06-10  Anders Carlsson  <andersca@apple.com>

        Remove CommandLine class
        https://bugs.webkit.org/show_bug.cgi?id=158628

        Reviewed by Tim Horton.

        * Shared/CommandLine.h: Removed.
        (WebKit::CommandLine::operator[]): Deleted.
        * Shared/posix/CommandLinePOSIX.cpp: Removed.
        (WebKit::CommandLine::parse): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2016-06-10  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
        https://bugs.webkit.org/show_bug.cgi?id=158622
        rdar://problem/26609452

        Reviewed by Tim Horton.
        
        It's possible for a CADisplayLink to fire after being paused sometimes, possibly
        when an app is running another CADisplayLink whose callback takes some time. When
        this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
        didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
        flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
        to proceed when the m_pendingBackingStoreFlusher was still flushing.

        Fix by preventing two didUpdates from being sent from the UI process between
        commits.
        
        Not easily testable.

        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):

2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Content and viewport sizes are mixed
        https://bugs.webkit.org/show_bug.cgi?id=158564

        Reviewed by Žan Doberšek.

        Make ThreadedCoordinatedLayerTreeHost::sizeDidChange() update the viewport size for consistency with all other
        LayerTreeHost implementations and rename viewportSizeChanged() as contentsSizeChanged() and update the contents
        size.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::contentsSizeChanged): Remove ifdefed code here, the drawing area is notified two lines below.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
        (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged): Update the viewport size to the contents size
        only when using a fixed layout here instead of in cross-platform code.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged):
        (WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
        (WebKit::ThreadedCoordinatedLayerTreeHost::viewportSizeChanged): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged): Call LayerTreeHost::contentsSizeChanged().
        (WebKit::DrawingAreaImpl::updateBackingStoreState): Remove ifdefed code for the threadecd compositor since it's
        now consistent with all other LayerTreeHost implementations.
        * WebProcess/WebPage/LayerTreeHost.h:

2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Make it clear that compositing thread operations are always scheduled from the main thread
        https://bugs.webkit.org/show_bug.cgi?id=158562

        Reviewed by Žan Doberšek.

        The code is written as if the compositor thread could also call callOnCompositingRunLoop() which makes the code
        confusing. This patch no longer checks if the task was scheduled in the compositing thread, and instead it adds
        an ASSERT to ensure it's always called from the main thread as expected. It also adds some more ASSERTS to ensure
        and clarify the methods are called from the expected thread.

        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
        (WebKit::CompositingRunLoop::performTask):
        (WebKit::CompositingRunLoop::callOnCompositingRunLoop): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
        (WebKit::ThreadedCompositor::setDeviceScaleFactor):
        (WebKit::ThreadedCompositor::didChangeViewportSize):
        (WebKit::ThreadedCompositor::didChangeViewportAttribute):
        (WebKit::ThreadedCompositor::didChangeContentsSize):
        (WebKit::ThreadedCompositor::scrollTo):
        (WebKit::ThreadedCompositor::scrollBy):
        (WebKit::ThreadedCompositor::glContext):
        (WebKit::ThreadedCompositor::didChangeVisibleRect):
        (WebKit::ThreadedCompositor::renderLayerTree):
        (WebKit::ThreadedCompositor::updateSceneState):
        (WebKit::ThreadedCompositor::callOnCompositingThread): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Browser plugins crash under Wayland
        https://bugs.webkit.org/show_bug.cgi?id=157605

        Reviewed by Michael Catanzaro.

        Fail the initialization of windowed plugins if we don't have a platform implementation.

        * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
        (WebKit::NetscapePlugin::platformPostInitialize):

2016-06-09  Antoine Quint  <graouts@apple.com>

        [iOS] -webkit-overflow-scrolling: touch; ignores pointer-events: none;
        https://bugs.webkit.org/show_bug.cgi?id=119839
        <rdar://problem/9671514>

        Reviewed by Simon Fraser.

        Propagate a "userInteractionEnabled" flag from the Web process which is used to turn off
        user interaction on a UIScrollView created for -webkit-overflow-scrolling: touch.

        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
        * Shared/mac/RemoteLayerTreeTransaction.h:
        * 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::userInteractionEnabled):
        (WebKit::PlatformCALayerRemote::setUserInteractionEnabled):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2016-06-09  Anders Carlsson  <andersca@apple.com>

        Remove OriginAndDatabases.cpp, it's unused
        https://bugs.webkit.org/show_bug.cgi?id=158595

        Reviewed by Sam Weinig.

        * CMakeLists.txt:
        * Shared/OriginAndDatabases.cpp: Removed.
        (WebKit::OriginAndDatabases::encode): Deleted.
        (WebKit::OriginAndDatabases::decode): Deleted.
        * Shared/OriginAndDatabases.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-06-09  Alex Christensen  <achristensen@webkit.org>

        Clean up EditorClient lifetime
        https://bugs.webkit.org/show_bug.cgi?id=158588

        Reviewed by Anders Carlsson.

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::generateTextCheckingRequestID):
        (WebKit::WebEditorClient::shouldDeleteRange):
        (WebKit::WebEditorClient::pageDestroyed): Deleted.
        * WebProcess/WebCoreSupport/WebEditorClient.h:
        (WebKit::WebEditorClient::WebEditorClient):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):

2016-06-09  Andy Estes  <aestes@apple.com>

        WKWebView does not render PDF pages in AirPrint
        https://bugs.webkit.org/show_bug.cgi?id=151386
        rdar://problem/22499157

        Reviewed by Tim Horton.

        _WKWebViewPrintFormatter originally attempted to handle PDFs, but the code path was never
        properly tested since Safari prints PDFs by setting a printingItem on the
        UIPrintInteractionController instead of going through a print formatter. The existing code
        almost worked, if it weren't for CGContextScaleCTM() scaling each page into oblivion due to
        _totalScaleFactor equaling 0.

        This patch properly implements -[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:] to
        handle drawing both PDFs generated by WebKit and PDFs loaded in the main frame. It also
        takes the opportunity to clean up a number of issues in the existing code:

        - Handling of -[_WKWebViewPrintFormatter startPage] is now correct. I had previously assumed
          this property represented the first page of output to print, but it actually represents
          the first page in the overall print job that the print formatter renders. In other words,
          regardless of -startPage, the print formatter should always print all its pages.
        - Code specific to webpage and PDF printing was factored out into WKContentView and
          WKPDFView, respectively. Each conforms to @protocol(_WKWebViewPrintProvider), and
          _WKWebViewPrintFormatter accesses the provider via -[WKWebView _printProvider].
        - Instead of piping the printed PDF data from WebPageProxy to WKWebView via PageClient, use
          the GenericCallback mechanism to have WebPageProxy call a lambda specified by
          WKContentView when the printed PDF is available.
        - Removed _totalScaleFactor and used CGPDFPageGetDrawingTransform() to transform both
          webpages and PDFs. For webpages, _totalScaleFactor will always equal the ratio of the
          paper width to the PDF page width, so CGPDFPageGetDrawingTransform() will apply the same
          scaling as CGContextScaleCTM(_totalScaleFactor, _totalScaleFactor) would.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _printProvider]): Added. Returns _currentContentView if it conforms to
        @protocol(_WKWebViewPrintProvider).
        (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:firstPage:computedTotalScaleFactor:]):
        Moved code to _wk_pageCountForPrintFormatter in WKContentView and WKPDFView.
        (-[WKWebView _endPrinting]): Deleted.
        (-[WKWebView _printedDocument]): Deleted.
        (-[WKWebView _setPrintedDocument:]): Deleted.
        * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared the _printProvider property.
        * UIProcess/PageClient.h: Removed didFinishDrawingPagesToPDF().
        * UIProcess/WebPageProxy.h: Declared computePagesForPrintingAndDrawToPDF() and
        drawToPDFCallback().
        * UIProcess/WebPageProxy.messages.in: Renamed DidFinishDrawingPagesToPDF to
        DrawToPDFCallback.
        * UIProcess/_WKWebViewPrintFormatter.mm: Backed the frameToPrint property with a RetainPtr
        ivar so that it doesn't need to be released manually in -dealloc; removed _totalScaleFactor
        and _printInfo ivars and added a _printedDocument ivar; removed the property declaration for
        webView.
        (-[_WKWebViewPrintFormatter frameToPrint]): Added a custom getter for the frameToPrint
        property.
        (-[_WKWebViewPrintFormatter setFrameToPrint:]): Added a custom setter for the frameToPrint
        property.
        (-[_WKWebViewPrintFormatter _webView]): Renamed from webView; added an underscore since this
        is a private method.
        (-[_WKWebViewPrintFormatter _recalcPageCount]): Retrieved the page count from the print
        provider and clamped its value to NSIntegerMax.
        (-[_WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Retrieved the printed document
        from the print provider if needed; modified the CTM transformations to work for both
        webpages and PDFs.
        (-[_WKWebViewPrintFormatter dealloc]): Deleted.
        (-[_WKWebViewPrintFormatter webView]): Renamed to _webView.
        (-[_WKWebViewPrintFormatter rectForPageAtIndex:]): Deleted.
        * UIProcess/_WKWebViewPrintFormatterInternal.h: Added. Moved a UIPrintFormatter internal
        method declaration to here and defined the _WKWebViewPrintProvider protocol.
        * UIProcess/ios/PageClientImplIOS.h: Removed didFinishDrawingPagesToPDF().
        * UIProcess/ios/PageClientImplIOS.mm: Ditto.
        (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Deleted.
        * UIProcess/ios/WKContentView.mm: Conformed to @protocol(_WKWebViewPrintProvider).
        (-[WKContentView _wk_pageCountForPrintFormatter:]): Moved the code to compute page count
        from WKWebView to here.
        (-[WKContentView _wk_printedDocument]): Moved the code to get the printed document from
        WKWebView to here.
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView _wk_pageCountForPrintFormatter:]): Moved the code to compute the page count
        from WKWebView to here; added a call to CGPDFDocumentAllowsPrinting(), returning 0 if
        printing is not allowed.
        (-[WKPDFView _wk_printedDocument]): Moved the code to get the printed document from
        WKWebView to here.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): Registered the callback with
        m_callbacks and sent Messages::WebPage::ComputePagesForPrintingAndDrawToPDF; returned the
        synchronously-returned page count.
        (WebKit::WebPageProxy::drawToPDFCallback): Added to perform the callback when drawing to PDF
        is complete.
        (WebKit::WebPageProxy::didFinishDrawingPagesToPDF): Deleted.
        * WebKit2.xcodeproj/project.pbxproj: Added _WKWebViewPrintFormatterInternal.h.
        * WebProcess/WebPage/WebPage.h: Renamed computePagesForPrintingAndStartDrawingToPDF() to
        computePagesForPrintingAndDrawToPDF().
        * WebProcess/WebPage/WebPage.messages.in: Renamed
        ComputePagesForPrintingAndStartDrawingToPDF to ComputePagesForPrintingAndDrawToPDF. Removed
        the startPage parameter and added a callbackID.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): Renamed from
        computePagesForPrintingAndStartDrawingToPDF(). Added a call to endPrinting() after sending
        Messages::WebPageProxy::DrawToPDFCallback.
        (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Renamed to
        computePagesForPrintingAndDrawToPDF.

2016-06-09  Alex Christensen  <achristensen@webkit.org>

        Clean up WebSocket code
        https://bugs.webkit.org/show_bug.cgi?id=158551

        Reviewed by Darin Adler.

        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerFileBlobURL):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

2016-06-09  David Kilzer  <ddkilzer@apple.com>

        Update properties for UIWKTextInteractionAssistant
        <https://webkit.org/b/158559>

        Reviewed by Darin Adler.

        * Platform/spi/ios/UIKitSPI.h:
        (UIWKTextInteractionAssistant.loupeGesture):
        (UIWKTextInteractionAssistant.singleTapGesture):
        Change from retain to assign since UIWKTextInteractionAssistant
        is not responsible for their lifetime.  Sort alphabetically.

2016-06-09  Michael Saboff  <msaboff@apple.com>

        WebKitTestRunner and DumpRenderTree do not handle dangling surrogate characters
        https://bugs.webkit.org/show_bug.cgi?id=154863

        Reviewed by Alexey Proskuryakov.

        Added a non-strict verions of WKStringGetUTF8CString() that will handle dangling
        surrogates called WKStringGetUTF8CStringNonStrict().

        * Shared/API/c/WKString.cpp:
        (WKStringGetUTF8CStringImpl):
        (WKStringGetUTF8CString):
        (WKStringGetUTF8CStringNonStrict):
        * Shared/API/c/WKString.h:

2016-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Many layout tests crash when threaded compositor is enabled
        https://bugs.webkit.org/show_bug.cgi?id=158560

        Reviewed by Žan Doberšek.

        This is because CoordinatedGraphicsLayer::notifyFlushRequired() assumes it has a valid compositor when it's
        called. But the compositor is only present when GraphicsLayer::create() is called with a
        GraphicsLayerFactory. When running the layout tests, layers are created without a factory because DrawingAreaImpl
        is not entering AC mode as expected and the layer tree host is not created, making
        DrawingAreaImpl::graphicsLayerFactory() always return nullptr. This happens because DrawingAreaImpl is checking
        acceleratedDrawingEnabled setting to decide whether to always use compositing mode or not, and WTR sets that
        setting to false (changing its default value). The thing is that acceleratedDrawingEnabled setting doesn't have
        any effect in non-Mac ports, what we really want to check there is whether acceleratedCompositingEnabled is true
        or false.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::updatePreferences):

2016-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Threaded Compositor] Remove ThreadedCompositor::setNeedsDisplay()
        https://bugs.webkit.org/show_bug.cgi?id=158523

        Reviewed by Michael Catanzaro.

        ThreadedCompositor::setNeedsDisplay() is always called from the main thread and schedules a task to the
        compositing thread to schedule an immediate update. But RunLoop::Timer is thread-safe so we don't really need to
        schedule a task to the update the timer in the compositing thread, we can do that directly in the main
        thread. And that's exactly what scheduleDisplayImmediately() does, so we can use it instead of setNeedsDisplay().

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setNeedsDisplay(): Deleted.
        (WebKit::ThreadedCompositor::updateSceneState):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-06-08  Antti Koivisto  <antti@apple.com>

        Increase disk cache capacity when there is lots of free space
        https://bugs.webkit.org/show_bug.cgi?id=158526

        Reviewed by Chris Dumez.

        Our maximum disk cache capacity has been 175MB for a very long time. Meanwhile the average resource size has grown
        massively. 175MB is now enough for cacheable resources of a few dozen sites at most. Using bigger caches when there is
        room for it can reduce network traffic, reduce disk writes, save battery and speed up page loading.

        This patch changes cache size for PrimaryWebBrowser cache model

        >=16GB free: 175MB -> 500MB
        8-16GB free: 150MB -> 250MB

        and modestly for DocumentBrowser

        >=16GB free: 50MB -> 75MB

        Note that if system (on Cocoa platforms) really needs disk space it will wipe out caches so this doesn't reduce
        available disk space in scenarios like software installation.

        * Shared/CacheModel.cpp:
        (WebKit::calculateCacheSizes):

2016-06-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Introduce ResourceErrorBase::type
        https://bugs.webkit.org/show_bug.cgi?id=158299

        Reviewed by Alex Christensen.

        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceError>::decodePlatformData):

2016-06-08  Beth Dakin  <bdakin@apple.com>

        _web_didAddMediaControlsManager should take a controlsManager as a parameter 
        https://bugs.webkit.org/show_bug.cgi?id=158545

        Reviewed by Tim Horton.

        * UIProcess/Cocoa/WebViewImpl.h:

2016-06-06  Antti Koivisto  <antti@apple.com>

        WebKit memory cache doesn't respect Vary header
        https://bugs.webkit.org/show_bug.cgi?id=71509
        <rdar://problem/26651033>

        Reviewed by Sam Weinig.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeCacheKey):
        (WebKit::NetworkCache::cachePolicyAllowsExpired):
        (WebKit::NetworkCache::makeUseDecision):
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::storeRedirect):
        (WebKit::NetworkCache::Cache::update):
        (WebKit::NetworkCache::headerValueForVary): Deleted.
        (WebKit::NetworkCache::collectVaryingRequestHeaders): Deleted.
        (WebKit::NetworkCache::verifyVaryingRequestHeaders): Deleted.

            These move to WebCore.

2016-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build with threaded compositor enabled after r201802.

        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::create):

2016-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        LayerTreeHost should be created with a WebPage reference instead of a pointer
        https://bugs.webkit.org/show_bug.cgi?id=158520

        Reviewed by Žan Doberšek.

        We are indeed creating the LayerTreeHost always from a WebPage reference but getting its address to pass it to
        the LayerTreeHost create() function.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
        (WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::create):
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
        (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
        (WebKit::CoordinatedLayerTreeHost::commitSceneState):
        (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::create):
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        (WebKit::ThreadedCoordinatedLayerTreeHost::compositorDidFlushLayers):
        (WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged):
        (WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
        * WebProcess/WebPage/LayerTreeHost.cpp:
        (WebKit::LayerTreeHost::create):
        (WebKit::LayerTreeHost::LayerTreeHost):
        * WebProcess/WebPage/LayerTreeHost.h:
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::create):
        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
        (WebKit::LayerTreeHostGtk::makeContextCurrent):
        (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
        (WebKit::LayerTreeHostGtk::paintContents):
        (WebKit::LayerTreeHostGtk::deviceScaleFactor):
        (WebKit::LayerTreeHostGtk::pageScaleFactor):
        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
        (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
        (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
        (WebKit::LayerTreeHostGtk::initialize): Deleted.
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

2016-06-07  Sam Weinig  <sam@webkit.org>

        Fix 10.10 build.

        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::addAnimationToLayer):

2016-06-06  Alex Christensen  <achristensen@webkit.org>

        Modernize loading code
        https://bugs.webkit.org/show_bug.cgi?id=158332

        Reviewed by Darin Adler.

        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::client):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        (WebKit::NetworkLoad::didReceiveData):
        (WebKit::NetworkLoad::didReceiveBuffer):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveBuffer):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/PingLoad.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::didReceiveResponse):
        (WebKit::NetworkDataTask::didReceiveData):
        * Shared/WebHitTestResultData.cpp:
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResource):

2016-06-05  Sam Weinig  <sam@webkit.org>

        Add experimental support for spring based CSS animations
        https://bugs.webkit.org/show_bug.cgi?id=158403

        Reviewed by Dean Jackson.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<StepsTimingFunction>::decode):
        (IPC::ArgumentCoder<SpringTimingFunction>::encode):
        (IPC::ArgumentCoder<SpringTimingFunction>::decode):
        (IPC::ArgumentCoder<FloatPoint>::encode):
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::Properties::encode):
        (WebKit::PlatformCAAnimationRemote::Properties::decode):
        (WebKit::addAnimationToLayer):
        Pipe through support for the Spring animation.

2016-06-07  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Hide GTK+ 2 plugins if GTK+ 2 plugin process was built but is not installed
        https://bugs.webkit.org/show_bug.cgi?id=158419

        Reviewed by Carlos Garcia Campos.

        Patch by Alberto Garcia <berto@igalia.com>

        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
        (WebKit::PluginInfoStore::getPluginInfo):
        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
        (WebKit::PluginProcessProxy::scanPlugin):

2016-06-06  Antoine Quint  <graouts@apple.com>

        Position of WebGL <canvas> on iOS is incorrect with CSS borders
        https://bugs.webkit.org/show_bug.cgi?id=156790

        Reviewed by Simon Fraser.

        WebGL layers on iOS are hosted by a WKRemoteView, which applies a transform scaling
        its content by the inverse of the device pixel ratio, which affects how positions are
        applied to the WebGL layer. The container layer of the layer hosted by a WKRemoteView
        then has an inverse transform applied to it in the PlatformCALayerRemoteCustom
        constructor. However, the position of a CALayer is not affected by its transform.

        The fix for <rdar://problem/18316542> should be specific to video, so we only apply the
        scaling in the case of a LayerTypeAVPlayerLayer.

        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
        (-[WKRemoteView initWithFrame:contextID:]):
        (WebKit::RemoteLayerTreeHost::createLayer):
        (-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Deleted.
        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
        (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):

2016-06-06  Brady Eidson  <beidson@apple.com>

        Fix build after r201717

        Unreviewed.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs):
        * NetworkProcess/NetworkProcess.h:
        
2016-06-06  Brady Eidson  <beidson@apple.com>

        Modern IDB: Crash seen in IDBConnectionProxy::putOrAdd on GuardMalloc bot
        https://bugs.webkit.org/show_bug.cgi?id=158124

        Reviewed by Darin Adler.
        
        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
        * WebProcess/FileAPI/BlobRegistryProxy.h:
        
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didClose):
        (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
        * WebProcess/Network/NetworkProcessConnection.h:

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

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

        This change broke the Yosemite build and its LayoutTest is
        failing on Mac and iOS testers (Requested by ryanhaddad on
        #webkit).

        Reverted changeset:

        "Add experimental support for spring based CSS animations"
        https://bugs.webkit.org/show_bug.cgi?id=158403
        http://trac.webkit.org/changeset/201706

2016-06-06  Alex Christensen  <achristensen@webkit.org>

        Reduce ResourceRequest copying in loading code
        https://bugs.webkit.org/show_bug.cgi?id=158251

        Reviewed by Darin Adler.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadManager::continueWillSendRequest):
        (WebKit::DownloadManager::willDecidePendingDownloadDestination):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::PendingDownload):
        (WebKit::PendingDownload::willSendRedirectedRequest):
        (WebKit::PendingDownload::continueWillSendRequest):
        (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::firstRequest):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::cancel):
        (WebKit::NetworkLoad::continueWillSendRequest):
        (WebKit::NetworkLoad::sharedDidReceiveResponse):
        (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
        (WebKit::NetworkLoad::setPendingDownload):
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didFail):
        (WebKit::NetworkLoad::willSendRequestAsync):
        * NetworkProcess/NetworkLoad.h:
        (WebKit::NetworkLoad::currentRequest):
        (WebKit::NetworkLoad::clearCurrentRequest):
        (WebKit::NetworkLoad::pendingDownloadID):
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcess::continueWillSendRequest):
        (WebKit::NetworkProcess::pendingDownloadCanceled):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/PingLoad.h:
        (WebKit::PingLoad::PingLoad):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
        (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::didBecomeDownload):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::detachFromCoreLoader):
        (WebKit::WebResourceLoader::willSendRequest):
        * WebProcess/Network/WebResourceLoader.h:

2016-06-05  Sam Weinig  <sam@webkit.org>

        Add experimental support for spring based CSS animations
        https://bugs.webkit.org/show_bug.cgi?id=158403

        Reviewed by Dean Jackson.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<StepsTimingFunction>::decode):
        (IPC::ArgumentCoder<SpringTimingFunction>::encode):
        (IPC::ArgumentCoder<SpringTimingFunction>::decode):
        (IPC::ArgumentCoder<FloatPoint>::encode):
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::Properties::encode):
        (WebKit::PlatformCAAnimationRemote::Properties::decode):
        (WebKit::addAnimationToLayer):
        Pipe through support for the Spring animation.

2016-06-05  Yusuke Suzuki  <utatane.tea@gmail.com>

        Change ProxyObject.[[Get]] not to use custom accessor
        https://bugs.webkit.org/show_bug.cgi?id=157080

        Reviewed by Darin Adler.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::propertyGetter):
        (WebKit::JSNPObject::methodGetter):
        * WebProcess/Plugins/Netscape/JSNPObject.h:

2016-06-05  Brady Eidson  <beidson@apple.com>

        Unreviewed, rolling out r201694.

        201693

        Reverted changeset:

        "Fix the build after r201693."
        https://bugs.webkit.org/show_bug.cgi?id=158394
        http://trac.webkit.org/changeset/201694

2016-06-05  Brady Eidson  <beidson@apple.com>

        Fix the build after r201693.
        https://bugs.webkit.org/show_bug.cgi?id=158394

        Reviewed by NOBODY (Build fix).

        r201693 landed without the Source/WebKit2 changes, and I didn't have EWS/CQ available to check myself. *sigh*
        
        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
        * WebProcess/FileAPI/BlobRegistryProxy.h:
        
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didClose):
        (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
        * WebProcess/Network/NetworkProcessConnection.h:

2016-06-03  Commit Queue  <commit-queue@webkit.org>

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

        Broke the Windows build (Requested by andersca on #webkit).

        Reverted changeset:

        "Rename NoncopyableFunction to Function"
        https://bugs.webkit.org/show_bug.cgi?id=158354
        http://trac.webkit.org/changeset/201663

2016-06-03  Anders Carlsson  <andersca@apple.com>

        Rename NoncopyableFunction to Function
        https://bugs.webkit.org/show_bug.cgi?id=158354

        Reviewed by Chris Dumez.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::traverse):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-06-03  Chris Dumez  <cdumez@apple.com>

        Unreviewed, roll out r196633 as it broke PageCache on iOS for WebKit.org
        <rdar://problem/26521101>

        * WebProcess/WebPage/VisitedLinkTableController.cpp:
        (WebKit::VisitedLinkTableController::setVisitedLinkTable):
        (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
        (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
        (WebKit::VisitedLinkTableController::removeAllVisitedLinks):

2016-06-03  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(INDEXED_DATABASE) build after r201575
        https://bugs.webkit.org/show_bug.cgi?id=158346

        Reviewed by Brady Eidson.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):

2016-06-02  Chris Dumez  <cdumez@apple.com>

        Crash under WebProcess::registerWithStateDumper()
        https://bugs.webkit.org/show_bug.cgi?id=158304
        <rdar://problem/25329276>

        Reviewed by Anders Carlsson.

        The issue is that the block in registerWithStateDumper() was executed in
        a background thread and is iterating over m_pageMap HashMap. The crash
        occurs when a page gets removed from the m_pageMap HashMap while the
        block is iterating over this same HashMap in another thread.

        The solution proposed is to execute the registerWithStateDumper()'s
        block in the main thread.

        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::registerWithStateDumper):

2016-06-02  Brady Eidson  <beidson@apple.com>

        Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
        https://bugs.webkit.org/show_bug.cgi?id=158293

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):

2016-06-02  Chris Dumez  <cdumez@apple.com>

        Modernize various lambda captures
        https://bugs.webkit.org/show_bug.cgi?id=158292

        Reviewed by Brady Eidson.

        Modernize various lambda captures, especially the ones unnecessarily
        allocating objects on the heap and destroying them in the lambda.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::clearDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData): Deleted.
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::traverse):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-06-02  Chris Dumez  <cdumez@apple.com>

        Speculative revalidated request returns 200 instead of 304
        https://bugs.webkit.org/show_bug.cgi?id=158256

        Reviewed by Antti Koivisto and Carlos Garcia Campos.

        Already conditional requests coming from WebCore should bypass the
        SpeculativeLoadManager. This is because the validation is requested
        by WebCore (usually the memory cache) and not our network cache. As
        a result, we need to pipe the revalidation response (e.g. 304 status
        code) back to WebCore instead of resolving it as disk cache level.

        This should fix the /webkit2/WebKitWebResource/response unit test.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::requestsHeadersMatch):

2016-06-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Use more references in ResourceLoader related code
        https://bugs.webkit.org/show_bug.cgi?id=158222

        Reviewed by Darin Adler.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::loadResource):
        (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
        (WebKit::WebLoaderStrategy::scheduleLoad):
        (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad):
        (WebKit::WebLoaderStrategy::startLocalLoad):
        (WebKit::WebLoaderStrategy::networkProcessCrashed):
        * WebProcess/Network/WebLoaderStrategy.h:
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::create):
        (WebKit::WebResourceLoader::WebResourceLoader):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::Stream::start):

2016-06-01  Yongjun Zhang  <yongjun_zhang@apple.com>

        Notify client immediately if network session doesn't exist for a synchronous XHR load.
        https://bugs.webkit.org/show_bug.cgi?id=158239
        <rdar://problem/26344251>

        Reviewed by Brady Eidson.

        For a synchronous XHR load, if the network session doesn't exist, we should notify NetworkLoadClient.
        Otherwise the Web process could hang when waiting for the synchronous load to finish.

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

2016-05-31  Brian Burg  <bburg@apple.com>
  
        REGRESSION(r191907): Can't enter combining diacritic marks in Web Inspector fields
        https://bugs.webkit.org/show_bug.cgi?id=158227
        <rdar://problem/26232464>

        Reviewed by Darin Adler and Alexey Proskuryakov.

        Web Inspector uses a WKWebView subclass for the inspector frontend interface.
        Since r191907, WKWebView does not have an inner WKView, and instead shares
        a WebViewImpl to implement the same methods as WKView. So, WKView is no longer
        involved at all when delivering keystrokes to the Web Inspector interface.

        This caused a subtle regression where some keystrokes were not being interpreted
        in the same way by AppKit because WKWebView does not conform to NSTextInputClient
        but WKView does. AppKit won't automatically create a NSTextInputContext for a NSView
        unless the subclass is declared as conforming to NSTextInputClient. Thus, the keystroke
        never goes through NSTextInputContext machinery which converts the keystroke into
        a combining diacritic character.

        This regression is covered by a new API test.

        * UIProcess/API/Cocoa/WKWebView.mm: mark WKWebView as conforming to NSTextInputClient.

2016-06-01  Dan Bernstein  <mitz@apple.com>

        Try to fix ENABLE(IOS_TOUCH_EVENTS) builds.

        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::touchEvent):

2016-05-31  Darin Adler  <darin@apple.com>

        Audit RenderObject casts and fix problems and style issues found
        https://bugs.webkit.org/show_bug.cgi?id=158221

        Reviewed by Chris Dumez.

        * Shared/WebRenderObject.cpp:
        (WebKit::WebRenderObject::WebRenderObject): Tightened up the code that
        builds the tree of objects; fewer local variables.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::invalidateRect): Cast to RenderEmbeddedObject since
        that is the class used for plug-ins.
        (WebKit::PluginView::pluginProcessCrashed): Ditto.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin): Ditto.
        (WebKit::WebPage::plugInIsPrimarySize): Check the renderer for null here.
        Did not change this to RenderEmbeddedObject, though, because I wasn't
        absolute certain this is only called with that type of renderer.

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

2016-06-01  Brady Eidson  <beidson@apple.com>

        Modernize lambda usage for all callers of RunLoop::dispatch() (take 2).
        https://bugs.webkit.org/show_bug.cgi?id=158277

        Reviewed by Chris Dumez.

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

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::addWorkQueueMessageReceiver):
        (IPC::Connection::removeWorkQueueMessageReceiver):
        (IPC::Connection::invalidate):
        (IPC::Connection::sendMessage):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageNamespace):
        (WebKit::StorageManager::destroySessionStorageNamespace):
        (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
        (WebKit::StorageManager::cloneSessionStorageNamespace):
        (WebKit::StorageManager::processDidCloseConnection):

        * UIProcess/WebResourceLoadStatisticsStore.cpp:
        (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2016-06-01  Chris Dumez  <cdumez@apple.com>

        [iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
        https://bugs.webkit.org/show_bug.cgi?id=158284
        <rdar://problem/26573954>

        Reviewed by Ryosuke Niwa.

        range can be null but r200972 started dereferencing it without null
        check. This patch adds a null check for range and uses the pre-r200972
        code path if range is null.

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

2016-06-01  Brady Eidson  <beidson@apple.com>

        Modernize lambda usage for all callers of RunLoop::dispatch().
        https://bugs.webkit.org/show_bug.cgi?id=158265

        Reviewed by Chris Dumez.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::remove):
        (WebKit::NetworkCache::retrieveFromMemory):
        
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::SyncMessageState::processIncomingMessage):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::connectionDidClose):
        (IPC::Connection::enqueueIncomingMessage):
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::receiveSourceEventHandler):
        
        * Shared/mac/CookieStorageShim.mm:
        (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::lookupContentExtension):
        (API::UserContentExtensionStore::compileContentExtension):
        (API::UserContentExtensionStore::removeContentExtension):
        
        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::ProcessLauncher):
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService):
        
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
        (WebKit::StorageManager::getLocalStorageOrigins):
        (WebKit::StorageManager::getLocalStorageOriginDetails):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
        (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
        
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isWebProcessResponsive):
        
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::isResponsive):
        
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
        
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::unprotectPluginFromDestruction):
        
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::wheelEvent):
        (WebKit::EventDispatcher::gestureEvent):
        (WebKit::EventDispatcher::touchEvent):
        
        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):

2016-05-31  Yusuke Suzuki  <utatane.tea@gmail.com>

        Unreviewed, roll out r201481, r201523: 0.3% regression in Octane code-load
        https://bugs.webkit.org/show_bug.cgi?id=158249

        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:

2016-05-31  Beth Dakin  <bdakin@apple.com>

        Add two optional items to WebViewImplDelegate
        https://bugs.webkit.org/show_bug.cgi?id=158242
        -and corresponding-
        rdar://problem/26473095

        Reviewed by Tim Horton.

        * UIProcess/Cocoa/WebViewImpl.h:

2016-05-31  Jer Noble  <jer.noble@apple.com>

        REGRESSION (r201405): trailers.apple.com HUD is missing in fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=158156
        <rdar://problem/26519589>

        Reviewed by Darin Adler.

        Only increase the frame of the webView (to account for top content inset) in one dimension.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController enterFullScreen:]):

2016-05-31  Chris Dumez  <cdumez@apple.com>

        [iOS] Better deal with WebProcess suspension due to screen locking
        https://bugs.webkit.org/show_bug.cgi?id=158229
        <rdar://problem/17665473>
        <rdar://problem/26554699>

        Reviewed by Tim Horton.

        When locking the screen while MobileSafari is front-most, we would try keep
        trying to mark IOSurfaces as volatile until the 30 seconds timeout was
        reached. This patch deals more cleanly with this situation by only trying
        to mark IOSurfaces as volatile once if the suspension is due to screen
        locking. In such case, it is apparently expected that some IOSurfaces cannot
        be marked as volatile so it is enough to try once and let ourselves get
        suspended.

        This patch also reduces the timeout from 30 seconds to ~3 seconds in the
        other suspension cases (e.g. homing out of MobileSafari). If we fail to mark
        them as purgeable for 3 seconds for a reason or another, it is no use in
        retrying, it is simply not going to happen and there is no reason to delay
        process suspension any further.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::callVolatilityCompletionHandlers):
        (WebKit::WebPage::layerVolatilityTimerFired):
        (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
        (WebKit::WebPage::markLayersVolatile):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::markLayersVolatile):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::applicationDidEnterBackground):
        (WebKit::WebPage::applicationWillEnterForeground):

2016-05-31  Brady Eidson  <beidson@apple.com>

        Make createCrossThreadTask() functions return on the stack instead of the heap.
        https://bugs.webkit.org/show_bug.cgi?id=158215

        Reviewed by Darin Adler.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::postDatabaseTask):
        (WebKit::DatabaseProcess::performNextDatabaseTask):
        (WebKit::DatabaseProcess::fetchWebsiteData):
        * DatabaseProcess/DatabaseProcess.h:

2016-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.13.1.

2016-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ clean build after r201504.

        * DatabaseProcess/DatabaseProcess.cpp: Add missing include.

2016-05-30  Brady Eidson  <beidson@apple.com>

        Move CrossThreadCopier/CrossThreadTask to WTF.
        https://bugs.webkit.org/show_bug.cgi?id=158207

        Reviewed by Alex Christensen.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:

        * DatabaseProcess/DatabaseProcess.cpp:
        * DatabaseProcess/DatabaseProcess.h:

        * Shared/WebCrossThreadCopier.cpp: Removed.
        * Shared/WebCrossThreadCopier.h: Removed.

2016-05-28  Chris Dumez  <cdumez@apple.com>

        Templatize NoncopyableFunction class similarly to std::function
        https://bugs.webkit.org/show_bug.cgi?id=158185

        Reviewed by Darin Adler.

        Templatize NoncopyableFunction class similarly to std::function, so
        that it can be used as a std::function replacement in more places.

        Previously, NoncopyableFunction could only support "void()" lambdas.

        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):

2016-05-28  Alexey Proskuryakov  <ap@apple.com>

        Fix the build with newer clang and other custom configuration options
        https://bugs.webkit.org/show_bug.cgi?id=158161

        Reviewed by Dan Bernstein.

        * NetworkProcess/ios/NetworkProcessIOS.mm: -setAllowsSpecificHTTPSCertificate:forHost:
        is now in CFNetworkSPI.h
        * NetworkProcess/mac/NetworkProcessMac.mm: Ditto.
        * Shared/mac/CookieStorageShimLibrary.cpp:
        (WebKit::WebKitCookieStorageShimInitialize): Use more portable std::call_once.

2016-05-28  Chris Dumez  <cdumez@apple.com>

        Modernize lambda captures in the network disk cache implementation
        https://bugs.webkit.org/show_bug.cgi?id=158179

        Reviewed by Darin Adler.

        Modernize lambda captures in the network disk cache implementation.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::traverse):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::inputStreamReadReadyCallback):
        (WebKit::NetworkCache::outputStreamWriteReadyCallback):
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
        (WebKit::NetworkCache::Statistics::queryWasEverRequested):
        * NetworkProcess/cache/NetworkCacheStatistics.h:
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::updateFileModificationTime):
        (WebKit::NetworkCache::Storage::clear):

2016-05-27  Caitlin Potter  <caitp@igalia.com>

        [JSC] implement async functions proposal
        https://bugs.webkit.org/show_bug.cgi?id=156147

        Reviewed by Yusuke Suzuki.

        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:

2016-05-27  Chris Dumez  <cdumez@apple.com>

        Improve lambda capture in NetworkCache::Storage::synchronize()
        https://bugs.webkit.org/show_bug.cgi?id=158176

        Reviewed by Brady Eidson.

        Improve lambda capture in NetworkCache::Storage::synchronize(). We can
        now capture the std::unique_ptr<> variables directly thanks to:
        1. C++14's support for initializer's in lambda captures
        2. RunLoop::dispatch() now takes a NoncopyableFunction in instead of
           a std::function, allowing us to capture non-copyable variables.

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

2016-05-27  Jeremy Jones  <jeremyj@apple.com>

        Decrease flicker when changing video presentation mode.
        https://bugs.webkit.org/show_bug.cgi?id=158148
        rdar://problem/24476949

        Reviewed by Tim Horton.

        Prevent flicker by using setVideoFullscreenLayer with a completion handler to delay 
        enter fullscreen and cleanup fullscreen until the video layer has completely been
        installed or removed.

        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
        (WebKit::WebVideoFullscreenManager::didExitFullscreen):

2016-05-27  Chris Dumez  <cdumez@apple.com>

        WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables
        https://bugs.webkit.org/show_bug.cgi?id=158111

        Reviewed by Darin Adler.

        WorkQueue::dispatch() / RunLoop::dispatch() should not copy captured lambda variables.
        These are often used cross-thread and copying the captured lambda variables can be
        dangerous (e.g. we do not want to copy a String after calling isolatedCopy() upon
        capture).

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::clear):
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::processIncomingMessage):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageOrigins):
        (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
        (WebKit::StorageManager::getLocalStorageOrigins):
        (WebKit::StorageManager::getLocalStorageOriginDetails):
        (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
        (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
        * UIProcess/Storage/StorageManager.h:

2016-05-27  Alex Christensen  <achristensen@webkit.org>

        Expose content extension failure error codes in SPI
        https://bugs.webkit.org/show_bug.cgi?id=158095
        rdar://problem/26475651

        Reviewed by Anders Carlsson.

        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
        (API::UserContentExtensionStore::invalidateContentExtensionVersion):
        Added for testing.
        (API::userContentExtensionStoreErrorCategory):
        * UIProcess/API/APIUserContentExtensionStore.h:
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
        Added the new enum, _WKUserContentExtensionStoreErrorCode.
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
        Sometimes the error code returned by UserContentExtensionStore::compileContentExtension has the error code from compileRuleList.
        When this happens, we want to get the message from the internal compiler error, but we want the NSError's code to always be CompileFailed.
        (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
        (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
        (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
        (-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]):
        * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h:
        Added new invalidator for testing.

2016-05-27  Zalan Bujtas  <zalan@apple.com>

        Regression(r200972): Webcore::Range::collectSelectionsRects() asserts in startContainer() while selecting text.
        https://bugs.webkit.org/show_bug.cgi?id=158155
        <rdar://problem/26502712>

        Reviewed by Chris Dumez.

        This patch ensures that we still have a valid paragraphRange after returning from enclosingTextUnitOfGranularity().

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

2016-05-26  Brady Eidson  <beidson@apple.com>

        Certain NetworkResourceLoader callbacks can deref a null m_networkLoad.
        https://bugs.webkit.org/show_bug.cgi?id=158134

        Reviewed by Alex Christensen.

        It's legit for m_networkLoad to be null in these callbacks.
        
        We need null checks, just like we have in many other callbacks in this class.
        
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):

2016-05-26  Darin Adler  <darin@apple.com>

        Media queries and platform screen modernization and streamlining
        https://bugs.webkit.org/show_bug.cgi?id=158067

        Reviewed by Alex Christensen.

        * Shared/mac/WebEventFactory.mm:
        (WebKit::screenForWindow): Deleted.
        (WebKit::flipScreenPoint): Deleted.
        (WebKit::globalPoint): Deleted.
        (WebKit::globalPointForEvent): Use globalPoint function from WebCore so we don't need
        copies of everything in here.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::windowDidChangeScreen): Removed unneeded type cast.
        (WebKit::WebViewImpl::draggedImage): Added type cast since globalPoint now returns an
        NSPoint rather than an IntPoint.

        * UIProcess/WebPageProxy.h: Use pragma once. Add a WebCore prefix to a use of
        PlatformDisplayID, since that is now inside the WebCore namespace.
        * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
        * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Ditto.
        * WebProcess/WebPage/DrawingArea.h: Ditto.
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.

2016-05-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Purge PassRefPtr in Modules/battery
        https://bugs.webkit.org/show_bug.cgi?id=157062

        Reviewed by Darin Adler.

        Use RefPtr<>& to reduce uses of PassRefPtr in WebKit.

        * WebProcess/Battery/WebBatteryManager.cpp:
        (WebKit::WebBatteryManager::didChangeBatteryStatus):
        (WebKit::WebBatteryManager::updateBatteryStatus):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):

2016-05-26  Myles C. Maxfield  <mmaxfield@apple.com>

        Build fix

        Rubber stamped by Lucas Forschler.

        * Configurations/DebugRelease.xcconfig:

2016-05-25  Jer Noble  <jer.noble@apple.com>

        Flashiness and jumpiness when entering fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=158087

        Reviewed by Beth Dakin.

        Multiple independant sources of jumpiness and flashiness are addressed here:

        - Setting the top content inset on the WKView cause a vertical jump during fullscreen
        transition. Instead of setting the content inset to 0, take the existing inset into account
        when placing the WKView in the NSWindow.

        - The enter fullscreen transition causes a white flash due to the NSWindow needing
        display before ordering onscreen. Ensure the window has a backing by calling -displayIfNeeded
        before entering fullscreen mode.

        - The exit fullscreen transition causes a white background color flash for an unknown
        reason, but is solved by not making the window's content view layer-backed. Rather than
        directly animating the contentView's background color, create a specific background view
        and animate it's background color instead.

        * UIProcess/mac/WKFullScreenWindowController.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController initWithWindow:webView:page:]):
        (-[WKFullScreenWindowController enterFullScreen:]):
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
        * WebProcess/FullScreen/WebFullScreenManager.cpp:
        (WebKit::WebFullScreenManager::saveScrollPosition): Deleted.
        (WebKit::WebFullScreenManager::restoreScrollPosition): Deleted.

2016-05-25  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build.

        * PlatformMac.cmake:

2016-05-25  Chris Dumez  <cdumez@apple.com>

        Simplify a few lambda captures in the network cache code
        https://bugs.webkit.org/show_bug.cgi?id=158076

        Reviewed by Antti Koivisto.

        Simplify a few lambda captures in the network cache code by WTFMoving
        upon capture.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
        (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
        (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
        (WebKit::NetworkCache::Statistics::writeTimerFired):
        (WebKit::NetworkCache::Statistics::addHashesToDatabase):
        (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
        * NetworkProcess/cache/NetworkCacheStatistics.h:

2016-05-25  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Unix] Potential buffer overrun of m_fileDescriptors in readBytesFromSocket of ConnectionUnix.cpp
        https://bugs.webkit.org/show_bug.cgi?id=158058

        Reviewed by Carlos Garcia Campos.

        Memcpy does not check the boundary of m_fileDescriptors in
        readBytesFromSocket of ConnectionUnix.cpp.  This is not a problem
        in normal cases, but in the case when Web process is hijacked and
        malicious IPC packets were sent.  WTF::Vector already has two
        members m_capacity and m_size.  There is no need to have a
        separate member m_fileDescriptorsSize to remember the number of
        remaining data.

        * Platform/IPC/Connection.h: Remove members m_readBufferSize and
        m_fileDescriptorsSize.
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::platformInitialize): Removed initialization of
        m_readBufferSize and m_fileDescriptorsSize.  Reserve initial
        capacity for m_readBuffer and m_fileDescriptors.
        (IPC::Connection::processMessage): Replace m_readBufferSize and
        m_fileDescriptorsSize with m_readBuffer.size() and
        m_fileDescriptors.size().  Use Vector::shrink() to reset the
        number of remaining data in the buffers.
        (IPC::readBytesFromSocket) : Change argument types to WTF::Vector
        instead of pointers and sizes.
        (IPC::Connection::readyReadHandler): Call new readBytesFromSocket

2016-05-25  Chris Dumez  <cdumez@apple.com>

        Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
        https://bugs.webkit.org/show_bug.cgi?id=158046

        Reviewed by Darin Adler.

        Update constructRevalidationRequest() to stop returning a unique_ptr<ResourceRequest>
        and to return a ResourceRequest instead. There is no reason for it to return a
        pointer.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:

2016-05-25  Antoine Quint  <graouts@apple.com>

        Elements with backdrop-filter cannot be clipped with clip-path or mask
        https://bugs.webkit.org/show_bug.cgi?id=142662
        <rdar://problem/20150192>

        Reviewed by Dean Jackson.

        Ensure layer clones are set up with the same shape path as their original layer.

        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):

2016-05-24  Chris Dumez  <cdumez@apple.com>

        Simplify a couple of lambda captures in the network cache code
        https://bugs.webkit.org/show_bug.cgi?id=158053

        Reviewed by Brady Eidson.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        Just capture subResourceInfo instead of allocating a new copy
        on the heap. There is no reason we cannot simply capture
        subResourceInfo here.

        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::clear):
        Use new C++14 capture with initialization to make the code a
        bit nicer.

2016-05-24  Conrad Shultz  <conrad_shultz@apple.com>

        _WKThumbnailView should expose its snapshot size
        https://bugs.webkit.org/show_bug.cgi?id=158049

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/_WKThumbnailView.h:
        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
        (-[_WKThumbnailView _didTakeSnapshot:]):
        Update the new snapshotSize property in a KVO-compliant manner.

2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r201349.

        This change caused compositing tests to assert on iOS
        simulator

        Reverted changeset:

        "Elements with backdrop-filter cannot be clipped with clip-
        path or mask"
        https://bugs.webkit.org/show_bug.cgi?id=142662
        http://trac.webkit.org/changeset/201349

2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r201341.

        This change may have caused LayoutTests to crash on Mac and
        iOS

        Reverted changeset:

        "Use lambda capture with initializer instead of StringCapture"
        https://bugs.webkit.org/show_bug.cgi?id=158010
        http://trac.webkit.org/changeset/201341

2016-05-24  Alex Christensen  <achristensen@webkit.org>

        Fix null pointer dereferencing in WebViewImpl::inputContext
        https://bugs.webkit.org/show_bug.cgi?id=158026
        rdar://problem/25994093

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView inputContext]):
        this was null sometimes in WebViewImpl::inputContext.

2016-05-24  Antoine Quint  <graouts@apple.com>

        Elements with backdrop-filter cannot be clipped with clip-path or mask
        https://bugs.webkit.org/show_bug.cgi?id=142662
        <rdar://problem/20150192>

        Reviewed by Dean Jackson.

        Ensure layer clones are set up with the same shape path as their original layer.

        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):

2016-05-24  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Allow clients to override the type of an input field
        https://bugs.webkit.org/show_bug.cgi?id=157995

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession textContentType]): Getter for textContentType.
        (-[WKFormInputSession setTextContentType:]): Set the textContentType and reload
        input views.
        (contentTypeFromFieldName): Factor out switch statement to get text content type
        from autofill field name into its own function.
        (-[WKContentView textInputTraits]): If the client has set a text content type,
        set the traits' content type to that. Otherwise, set the text content type if
        there is one based on the assisted node information's autofill field name. If
        neither the form input session nor the assisted node info yields a text content
        type, set the text content type to nil, its default value.

2016-05-24  Chris Dumez  <cdumez@apple.com>

        Use lambda capture with initializer instead of StringCapture
        https://bugs.webkit.org/show_bug.cgi?id=158010

        Reviewed by Antti Koivisto.

        Use lambda capture with initializer instead of StringCapture now that 
        we support C++14.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::deleteDumpFile):
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::initialize):
        (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::updateFileModificationTime):
        (WebKit::NetworkCache::Storage::clear):
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::UserContentExtensionStore::lookupContentExtension):
        (API::UserContentExtensionStore::compileContentExtension):
        (API::UserContentExtensionStore::removeContentExtension):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2016-05-24  Chris Dumez  <cdumez@apple.com>

        Use auto for some of our lambda function parameters
        https://bugs.webkit.org/show_bug.cgi?id=158001

        Reviewed by Darin Adler.

        Use auto for some of our lambda function parameters now that we build with c++14.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didGetRecord):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::retrieveCacheEntry):
        (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
        (-[_WKRemoteObjectInterface debugDescription]):
        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (WKResourceCacheManagerGetCacheOrigins):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
        (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
        (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::removeAnimationForKey):

2016-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>

        Assertion failure for Reflect.get with Proxy and primitive value as explicit receiver
        https://bugs.webkit.org/show_bug.cgi?id=157080

        Reviewed by Saam Barati.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::propertyGetter):
        (WebKit::JSNPObject::methodGetter):
        * WebProcess/Plugins/Netscape/JSNPObject.h:

2016-05-23  Chris Dumez  <cdumez@apple.com>

        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
        https://bugs.webkit.org/show_bug.cgi?id=157882

        Reviewed by Darin Adler.

        Generate bindings code for EventTarget.addEventListener() / removeEventListener()
        instead of hardcoding them in the bindings generator.

        * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
        (WebKit::PDFPluginAnnotation::attach):
        (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
        * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
        (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
        (WebKit::PDFPluginPasswordField::createAnnotationElement):
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
        (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
        (WebKit::PDFPluginTextAnnotation::createAnnotationElement):

2016-05-23  Beth Dakin  <bdakin@apple.com>

        Need SPI for clients to require a user action to get an editing controls 
        manager
        https://bugs.webkit.org/show_bug.cgi?id=157992
        -and corresponding-
        rdar://problem/26379927

        Reviewed by Tim Horton.

        New SPI _setRequiresUserActionForEditingControlsManager. The SPI defaults to 
        False, which means that by default there is no user action requirement to 
        have an editing controls manager. The SPI is on WKViewPrivate and 
        WKWebViewConfigurationPrivate, and it’s implemented in WebViewImpl.
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _requiresUserActionForEditingControlsManager]):
        (-[WKWebViewConfiguration _setRequiresUserActionForEditingControlsManager:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _requiresUserActionForEditingControlsManager]):
        (-[WKView _setRequiresUserActionForEditingControlsManager:]):
        * UIProcess/Cocoa/WebViewImpl.h:
        (WebKit::WebViewImpl::setRequiresUserActionForEditingControlsManager):
        (WebKit::WebViewImpl::requiresUserActionForEditingControlsManager):

        New message allows the WebProcess to tell the UI process whether the current 
        web page has had any selection changes based on user interaction.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setHasHadSelectionChangesFromUserInteraction):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):
        * UIProcess/WebPageProxy.messages.in:

        m_userIsInteracting m_hasFocusedDueToUserInteraction used to be iOS only, but 
        now we want to track them for Mac as well.
        * WebProcess/WebPage/WebPage.cpp:

        Handling mouse events and key events will toggle m_userIsInteracting.
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::keyEvent):

        m_userIsInteracting is no longer iOS-only.
        (WebKit::WebPage::setInitialFocus):

        Send a message to the UI process on page transition to re-set 
        hasHadSelectionChangesFromUserInteraction to false.
        (WebKit::WebPage::didStartPageTransition):

        Send a message to the UI process if this is the first selection change to 
        happen as a result of a user action.
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:

2016-05-23  Alex Christensen  <achristensen@webkit.org>

        Add logging for NSURLSession calls
        https://bugs.webkit.org/show_bug.cgi?id=157996

        Reviewed by Brady Eidson.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (toNSURLSessionResponseDisposition):
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        * Platform/Logging.h:

2016-05-23  Chris Fleizach  <cfleizach@apple.com>

        AX: iOS: when bringing focus to a text field we may zoom the page even if author wanted max scale = 1
        https://bugs.webkit.org/show_bug.cgi?id=157771

        Reviewed by Tim Horton.

        * Shared/AssistedNodeInformation.cpp:
        (WebKit::AssistedNodeInformation::encode):
        (WebKit::AssistedNodeInformation::decode):
        * Shared/AssistedNodeInformation.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _displayFormNodeInputView]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getAssistedNodeInformation):

2016-05-23  Miguel Gomez  <magomez@igalia.com>

        [ThreadedCompositor] Ensure that the BitmapTexture used by CoordinatedBackingStoreTile matches the opacity of the painted surface
        https://bugs.webkit.org/show_bug.cgi?id=157942

        Reviewed by Žan Doberšek.

        * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
        (WebKit::CoordinatedBackingStoreTile::swapBuffers):
        Reset the BitmapTexture if it doesn't match the opacity required by the surface
        that's being painted.

2016-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Disk cache: enable speculative revalidation
        https://bugs.webkit.org/show_bug.cgi?id=157125

        Reviewed by Sergio Villar Senin.

        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextConstructed):
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess):
        * config.h:

2016-05-22  Brady Eidson  <beidson@apple.com>

        Move to C++14.
        https://bugs.webkit.org/show_bug.cgi?id=157948

        Reviewed by Michael Catanzaro.

        * Configurations/Base.xcconfig:

        Replace time literal suffixes that have underscores to the forms without
        (e.g. 0_ms becomes 0ms):
        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):

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

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::responseHasExpired):
        (WebKit::NetworkCache::responseNeedsRevalidation):
        (WebKit::NetworkCache::makeStoreDecision):

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::responseNeedsRevalidation):

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

        * Shared/mac/RemoteLayerBackingStoreCollection.mm:

        * UIProcess/ViewGestureController.cpp:

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::maximumBufferingTime):

        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):

2016-05-21  Andy Estes  <aestes@apple.com>

        REGRESSION (r188642): All pages are blank when printing a webpage in iOS Safari
        https://bugs.webkit.org/show_bug.cgi?id=157924
        rdar://problem/22524550

        Reviewed by Sam Weinig.

        When UIPrintInteractionController asks WKWebView to print a webpage, it does so in several phases. First we're
        asked to compute the page count, followed later by a series of messages asking us to draw each page into a
        provided CGContext.

        When asked for the page count, we send a message to the Web process instructing it to compute and
        return the page count synchronously and then immediately start drawing the page for printing. If the drawing has
        finished by the time we're asked to print the first page, then we can do so without waiting. But if it hasn't
        then we block by calling Connection::waitForMessage(), passing std::chromo::milliseconds::max() as the relative
        timeout.
        
        Prior to r188642, Connection::waitForMessage() called std::condition_variable::wait_for(), which takes a
        relative timeout value. r188642 replaced this with WTF::Condition::waitUntil(), which takes an absolute timeout
        instead. To convert from relative to absolute, this line was added to Connection::waitForMessage():

            Condition::Clock::time_point absoluteTimeout = Condition::Clock::now() + timeout;

        std::chrono will convert both operands to a common duration type before performing the addition. When timeout
        equals something very large, like milliseconds::max(), this conversion results in signed integer overflow,
        giving absoluteTimeout a value less than Clock::now() and making waitForMessage time out immediately.
        
        To fix this, compute how many milliseconds remain on our clock, and add the smaller of that and the timeout
        value to Clock::now() to arrive at an absolute timeout.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForMessage):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _printedDocument]): Removed an unnecessary nanoseconds-to-milliseconds conversion.

2016-05-20  Enrica Casucci  <enrica@apple.com>

        Drag cannot start if no drag data or custom data is available in the Pasteboard.
        https://bugs.webkit.org/show_bug.cgi?id=157911
        rdar://problem/24577706

        Reviewed by Tim Horton.

        We need to make sure there is always one item in common between source and target
        of the drag and drop operation.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::dragImageForView):

2016-05-20  John Wilander  <wilander@apple.com>

        Remove unnecessary PageOverlay client function pageOverlayDestroyed
        https://bugs.webkit.org/show_bug.cgi?id=157388
        <rdar://problem/25471523>

        Reviewed by Tim Horton.

        Remove dead PageOverlay code. Almost all of these overrides were empty and
        never called. In the case of WebPageOverlay it was never called but had a
        function body, causing confusion. There was a fear of dangling pointers in
        WebPageOverlay's static hash map between PageOverlays and WebPageOverlays.
        Only WebPageOverlay's constructor creates its PageOverlay object and adds it
        to the hash map. Its client object is kept in a unique pointer member which
        is automatically deleted when the WebPageOverlay object itself is deleted.
        This explains why PageOverlayClientImpl::pageOverlayDestroyed in
        WKBundlePageOverlay can safely be removed. Finally, WebPageOverlay's
        destructor clears the hash map entry for its PageOverlay object. Thus, there
        is no need to call WebPageOverlay::pageOverlayDestroyed nor a need for
        WebPageOverlay's destructor to call pageOverlayDestroyed on its client.

        No new tests. I tried to come up with a WebKit API test for this but I
        wasn't able to test presence/absence of WebPageOverlay's map entries since
        the map is not exposed.

        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
        (WebKit::PageOverlayClientImpl::pageOverlayDestroyed): Deleted.
        * WebProcess/Plugins/PDF/PDFPlugin.h:
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::HUD::pageOverlayDestroyed): Deleted.
        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        * WebProcess/WebCoreSupport/WebInspectorClient.h:
        (WebKit::WebInspectorClient::pageOverlayDestroyed): Deleted.
        * WebProcess/WebPage/FindController.cpp:
        * WebProcess/WebPage/FindController.h:
        (WebKit::FindController::pageOverlayDestroyed): Deleted.
        * WebProcess/WebPage/WebPageOverlay.cpp:
        * WebProcess/WebPage/WebPageOverlay.h:
        (WebKit::WebPageOverlay::pageOverlayDestroyed): Deleted.
        * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
        (WebKit::FindIndicatorOverlayClientIOS::pageOverlayDestroyed): Deleted.

2016-05-19  Chris Dumez  <cdumez@apple.com>

        Improve compile-time assertions in is<>() / downcast<>()
        https://bugs.webkit.org/show_bug.cgi?id=157817

        Reviewed by Darin Adler.

        Add missing includes.

        * WebProcess/WebPage/WebFrame.cpp:
        * WebProcess/WebPage/WebPage.cpp:

2016-05-19  Tim Horton  <timothy_horton@apple.com>

        Mail crashes under TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate() when the Web process crashes
        https://bugs.webkit.org/show_bug.cgi?id=157927
        <rdar://problem/24793374>

        Reviewed by Dean Jackson.

        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
        With just the right combination of layout mechanisms and Web Content process
        crash timing, it is possible to get a frame change underneath WebPageProxy::processDidCrash,
        before the DrawingArea has been nulled out but after the Connection has.
        This can lead to a null dereference. I had a lot of trouble writing a API
        test for this, though I'm certain it's possible.

2016-05-16  Enrica Casucci  <enrica@apple.com>

        No candidate punctuation when typing punctuation in WK2 text field.
        https://bugs.webkit.org/show_bug.cgi?id=157773
        rdar://problem/23084603

        Reviewed by Sam Weinig.

        We need to adopt the new addInputString:withFlags:withInputManagerHint function
        for this to work propertly.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _interpretKeyEvent:isCharEvent:]):

2016-05-19  Brady Eidson  <beidson@apple.com>

        Finishing off: Modern IDB: Website data store management.
        https://bugs.webkit.org/show_bug.cgi?id=157626

        Reviewed by Alex Christensen.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        (WebKit::removeAllDatabasesForOriginPath): Deleted.
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins): Deleted.
        (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince): Deleted.
        * DatabaseProcess/DatabaseProcess.h:

2016-05-19  Brent Fulgham  <bfulgham@apple.com>

        [OS X][WK2] Expand sandbox for new mach endpoints
        https://bugs.webkit.org/show_bug.cgi?id=157919
        <rdar://problem/25238336>

        Reviewed by Alexey Proskuryakov.

        Grant the WebContent and Networking processes the mach lookup capability for
        various Security-related mach endpoints..

        * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2016-05-19  Brian Burg  <bburg@apple.com>

        Web Inspector: CRASH when closing a page while element selection mode is enabled via Develop menu
        https://bugs.webkit.org/show_bug.cgi?id=157925
        <rdar://problem/26259618>

        Reviewed by Joseph Pecoraro.

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::elementSelectionChanged):
        Null-check m_page->inspector() since it will return nullptr if the page
        is closed but not yet destructed. This is triggered by teardown code
        in InspectorDOMAgent::willDestroyFrontendAndBackend.

2016-05-19  Enrica Casucci  <enrica@apple.com>

        Drag cannot start if no drag data is available in the Pasteboard.
        https://bugs.webkit.org/show_bug.cgi?id=157911
        rdar://problem/24577706

        Reviewed by Tim Horton.

        Setting dummy data to allow drag to start.

        * Shared/mac/PasteboardTypes.h:
        * Shared/mac/PasteboardTypes.mm:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::registerDraggedTypes):
        (WebKit::WebViewImpl::dragImageForView):

2016-05-19  Jer Noble  <jer.noble@apple.com>

        [IOS] Add setting to allow playback to continue inline after exiting fullscreen.
        https://bugs.webkit.org/show_bug.cgi?id=157912

        Reviewed by Eric Carlson.

        Add a preference and configuration property to control whether media should be allowed to continue
        playing inline when exiting fullscreen.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _allowsInlineMediaPlaybackAfterFullscreen]):
        (-[WKWebViewConfiguration _setAllowsInlineMediaPlaybackAfterFullscreen:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (disableScreenUpdates):
        (enableScreenUpdates):
        (-[WKFullScreenWindowController enterFullScreen:]):
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        (-[WKFullScreenWindowController exitFullScreen]):
        (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
        (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-19  Brian Burg  <bburg@apple.com>

        Web Inspector: timelines should not update via requestAnimationFrame unless Web Inspector is visible
        https://bugs.webkit.org/show_bug.cgi?id=157897
        <rdar://problem/26330802>

        Reviewed by Timothy Hatcher.

        The UIProcess needs to notify the Inspector frontend when it is truly visible.
        The frontend can't use document.visibilityState because it doesn't seem to work
        if the inspector frontend's WKWebView is created but not attached to a window.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::open):
        (WebKit::WebInspectorProxy::didClose):
        Send visibility updates to the inspector process when the inspector becomes
        "visible" or "not visible". It becomes visible if it is attached to the
        inspected page's window, or gets its own native window.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::frontendLoaded):
        (WebKit::WebInspectorUI::setDockingUnavailable):
        (WebKit::WebInspectorUI::setIsVisible):
        Call InspectorFrontendAPI.updateVisibilityState to let the frontend know.

        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.messages.in:
        Add new message.

2016-05-19  Brian Burg  <bburg@apple.com>

        Web Inspector: use a consistent prefix for injected scripts
        https://bugs.webkit.org/show_bug.cgi?id=157715
        <rdar://problem/26287188>

        Reviewed by Timothy Hatcher.

        * CMakeLists.txt:
        * DerivedSources.make:
        * WebProcess/Automation/WebAutomationSessionProxy.js:

2016-05-18  Anders Carlsson  <andersca@apple.com>

        Add WKPreferencesRef getter/setter pair to set RTL mode
        https://bugs.webkit.org/show_bug.cgi?id=157873
        rdar://problem/26329970

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetUserInterfaceDirectionPolicy):
        (WKPreferencesGetUserInterfaceDirectionPolicy):
        * UIProcess/API/C/WKPreferencesRef.h:

2016-05-18  Alex Christensen  <achristensen@webkit.org>

        Clean up CSS code
        https://bugs.webkit.org/show_bug.cgi?id=157808

        Reviewed by Chris Dumez.

        * UIProcess/Cocoa/WebViewImpl.mm:

2016-05-18  Jer Noble  <jer.noble@apple.com>

        Disable default user gesture requirement for audio playback on Mac
        https://bugs.webkit.org/show_bug.cgi?id=157820

        Reviewed by Sam Weinig.

        Disable the WebPreferences and matching WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback
        settings on Mac (and other non-iOS ports).

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):

2016-05-18  Alex Christensen  <achristensen@webkit.org>

        Build fix when not using CredentialStorage with NetworkSession.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::clearCredentials):

2016-05-18  Brady Eidson  <beidson@apple.com>

        Fix null-deref crash sporadically seen after http://trac.webkit.org/changeset/201098

        No review.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::deleteWebsiteData): Don't access m_idbServer directly, as calling
          the idbServer() accessor is how you actually get your IDBServer created for you.

2016-05-18  Brian Burg  <bburg@apple.com>

        Web Inspector: InspectorFrontendAPI.setTimelineProfilingEnabled should not implicitly show Timelines tab
        https://bugs.webkit.org/show_bug.cgi?id=157846

        Reviewed by Timothy Hatcher.

        Add a separate ShowTimelines message to WebInspector and WebInspectorUI. Have the
        start/stop profiling methods in public APIs explicitly call showTimelines() rather than
        relying on InspectorFrontendAPI to do it.

        * UIProcess/API/C/WKInspector.cpp:
        (WKInspectorTogglePageProfiling):
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::showTimelines):
        * UIProcess/WebInspectorProxy.h:
        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
        (WKBundleInspectorSetPageProfilingEnabled):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::showTimelines):
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspector.messages.in:
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::showTimelines):
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.messages.in:

2016-05-18  Brady Eidson  <beidson@apple.com>

        Modern IDB: Add support for server side closing of open database connections.
        https://bugs.webkit.org/show_bug.cgi?id=157843

        Reviewed by Alex Christensen.

        - Implement the required IDB delegate code.
        - Make DatabaseProcess::deleteWebsiteData call the right method in IDB server.

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

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didGetRecord):
        (WebKit::WebIDBConnectionToClient::didCloseFromServer):
        (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::confirmDidCloseFromServer):
        (WebKit::WebIDBConnectionToServer::didStartTransaction):
        (WebKit::WebIDBConnectionToServer::didCloseFromServer):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

2016-05-18  Brady Eidson  <beidson@apple.com>

        Modern IDB: Make TestRunner.clearAllDatabases also delete IndexedDB databases (once doing so is supported).
        https://bugs.webkit.org/show_bug.cgi?id=157823

        Reviewed by Alex Christensen.

        * CMakeLists.txt:
        * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
        (WKWebsiteDataStoreRemoveAllIndexedDatabases):
        * UIProcess/API/C/WKWebsiteDataStoreRef.h:

2016-05-18  Brian Burg  <bburg@apple.com>

        REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
        https://bugs.webkit.org/show_bug.cgi?id=157821
        <rdar://problem/26335429>

        Reviewed by Timothy Hatcher.

        In r200959, WebInspectorProxy started sending start/stop profiling
        messages directly to the frontend process to avoid the inspected page
        process from implicitly showing the frontend. To compensate, the WebKit
        API layer was changed to call show() in togglePageProfiling().

        Unfortunately, this fix was not quite right, because the ordering of
        the Show and StartPageProfiling messages is undefined. The latter has to bounce
        from UI to inspected to inspector processes, so the frontend may try
        to start profiling before the frontend is shown, causing it to be ignored.

        This patch takes a different approach: just remove all implicit show()
        calls in the inspected page processes, and bounce both the Show and
        StartPageProfiling messages through the inspected page process to ensure
        they are handled in order by the frontend process.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::togglePageProfiling):
        Revert to sending to the inspected page process.

        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
        (WKBundleInspectorSetPageProfilingEnabled):
        Add a call to show() now that the implementation doesn't do it implicitly.

        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::startPageProfiling):
        (WebKit::WebInspector::stopPageProfiling):
        Don't implicitly show the inspector. These methods are only called
        through the WKBundleInspector API and via IPC from WebInspectorProxy.

2016-05-17  Beth Dakin  <bdakin@apple.com>

        Make handleAcceptedCandidate a public function
        https://bugs.webkit.org/show_bug.cgi?id=157763
        -and corresponding-
        rdar://problem/26206397

        Reviewed by Tim Horton.

        This patch makes handleAcceptedCandidate a public member of WebViewImpl 
        instead of a private member. 
        * UIProcess/Cocoa/WebViewImpl.h:
        (WebKit::WebViewImpl::createWeakPtr):

2016-05-17  Dean Jackson  <dino@apple.com>

        Remove ES6_GENERATORS flag
        https://bugs.webkit.org/show_bug.cgi?id=157815
        <rdar://problem/26332894>

        Reviewed by Geoffrey Garen.

        This flag isn't needed. Generators are enabled everywhere and
        part of a stable specification.

        * Configurations/FeatureDefines.xcconfig:

2016-05-17  Dean Jackson  <dino@apple.com>

        Temporarily enable Experimental Features
        https://bugs.webkit.org/show_bug.cgi?id=157810
        <rdar://problem/26330804>

        Reviewed by Anders Carlsson.

        We currently don't have good UI for enabling these features,
        which would mean Safari Technology Preview users would
        never be able to turn them on… unless we enable them by
        default temporarily.

        * Shared/WebPreferencesDefinitions.h:

2016-05-17  Filip Pizlo  <fpizlo@apple.com>

        WTF should know about Language
        https://bugs.webkit.org/show_bug.cgi?id=157756

        Reviewed by Geoffrey Garen and Alexey Proskuryakov.

        Rewires a bunch of includes/imports.

        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:

2016-05-17  Jer Noble  <jer.noble@apple.com>

        Unreviewed GTK+ and EFL bulid fix; make the audio playback user gesture requirement
        Cocoa-only.

        * Shared/WebPreferencesDefinitions.h:

2016-05-16  Anders Carlsson  <andersca@apple.com>

        Add a WKA extension point for WKPreferences SPI
        https://bugs.webkit.org/show_bug.cgi?id=157762
        rdar://problem/24529203

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKPreferences.mm:

2016-05-16  David Kilzer  <ddkilzer@apple.com>

        Action sheets don’t work in presented view controllers
        <https://webkit.org/b/157754>
        <rdar://problem/26304845>

        Reviewed by Anders Carlsson.

        * UIProcess/ios/WKActionSheet.mm:
        (-[WKActionSheet presentSheetFromRect:]):
        (-[WKActionSheet willRotate]):
        - Call SPI to get the presenting view controller, since it may
          not always be the root view controller.

2016-05-13  Enrica Casucci  <enrica@apple.com>

        Text selection is basically impossible on plain text pages.
        https://bugs.webkit.org/show_bug.cgi?id=157681
        rdar://problem/26065660

        Reviewed by Darin Adler.

        When dealing with a plain text file, the rules for deciding whether
        a position is selectable should be different and we should never
        switch to block selection.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
        (WebKit::rectIsTooBigForSelection): Added helper function.
        (WebKit::WebPage::selectTextWithGranularityAtPoint):
        (WebKit::WebPage::getPositionInformation):

2016-05-16  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Remove dispatch_after in -[WKFormInputSession setSuggestions:]
        https://bugs.webkit.org/show_bug.cgi?id=157745

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession setSuggestions:]): Remove the dispatch_after since
        there is no longer a chance of keyboard suggestions replacing the
        suggestions set here.

2016-05-16  Brian Burg  <bburg@apple.com>

        Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
        https://bugs.webkit.org/show_bug.cgi?id=157737
        <rdar://problem/26292946>

        Reviewed by Timothy Hatcher.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformSimulateKeyStroke):
        AppKit expects characters passed to [NSEvent keyEventWithType:...]
        to be non-nil even if there are no characters. Initialize characters
        to the empty string @"". It will be overwritten if the keystroke should
        produce any unicode characters.

2016-05-16  Brian Burg  <bburg@apple.com>

        Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
        https://bugs.webkit.org/show_bug.cgi?id=157739

        Reviewed by Timothy Hatcher.

        * UIProcess/API/C/WKInspector.cpp:
        (WKInspectorTogglePageProfiling):
        Implicitly show the Web Inspector in the C API command to preserve existing behavior.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::inspectorFrontendLoaded):
        If the frontend loaded, it was either because the user opened Web Inspector (and
        turning on page profiling is harmless), or it was loaded but not shown by the
        inspectBrowsingContext command. For the latter, we want to start page profiling
        before processing any additional commands so subsequent execution is captured.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::togglePageProfiling):
        Send the start/stop profiling messages directly to the WebInspectorUI process instead of
        bouncing through the inspected page's process, which does an implicit show() we don't want.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::inspector): Make it const.
        * UIProcess/WebPageProxy.h:

2016-05-16  Conrad Shultz  <conrad_shultz@apple.com>

        Fix some deprecation warnings.

        * UIProcess/mac/WKPrintingView.mm:
        (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::setActiveAnnotation):
        (WebKit::PDFPlugin::lookupTextAtLocation):
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
        (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
        (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::drawPDFPage):

2016-04-06  Jer Noble  <jer.noble@apple.com>

        [WK2] Add API to WKWebViewConfiguration to control autoplay policy.
        https://bugs.webkit.org/show_bug.cgi?id=156312

        Reviewed by Dan Bernstein.

        Add a new API to WKWebViewConfiguration to allow fine-grained control over when media is allowed
        to play without a user gesture, and simultaneously deprecate the existing, all-or-nothing API,
        and deprecated the equivalent SPIs.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _requiresUserActionForVideoPlayback]):
        (-[WKWebViewConfiguration _setRequiresUserActionForVideoPlayback:]):
        (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]):
        (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]):
        (-[WKWebViewConfiguration requiresUserActionForMediaPlayback]):
        (-[WKWebViewConfiguration setRequiresUserActionForMediaPlayback:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

2016-05-16  Brian Burg  <bburg@apple.com>

        Web Automation: WebAutomationSessionProxy.js gets injected more than once sometimes
        https://bugs.webkit.org/show_bug.cgi?id=157716
        <rdar://problem/26287306>

        Reviewed by Timothy Hatcher.

        Whenever a script was injected into a non-normal world by a WebKit client,
        the WebProcess's WebAutomationSessionProxy singleton would get a
        notification that the window was cleared from the relevant frame.
        This notification happens when creating the world's window shell for
        the first time.

        This code should ignore such notifications that originate from non-main world
        contexts. Web Inspector's instrumentation already ignored this, but
        the automation session notification comes in via a different WebKit2 layer.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):

2016-05-13  Dean Jackson  <dino@apple.com>

        Fix iOS Build.

        * Shared/AssistedNodeInformation.h:
        (WebKit::OptionItem::OptionItem):

2016-05-13  Sam Weinig  <sam@webkit.org>

        REGRESSION (r200463): Autofill Credit Card expected but got Autofill Contact
        <rdar://problem/26251538>
        https://bugs.webkit.org/show_bug.cgi?id=157701

        Reviewed by Dan Bernstein.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
        (-[WKWebProcessPlugInFrame _certificateChain]):
        We need to do a retain-autorelease here now because the CertificateInfo's that contain the
        cached certificate chain, are being destroyed, and therefore destroying the chain, before this
        function returns. This used to work when the chain wasn't just a cache, because there was still
        a strong reference to it being held by the ResourceResponse's CertificateInfo copy, but now
        there is none.

2016-05-13  Dean Jackson  <dino@apple.com>

        [iOS] <select> elements popover should render right-aligned when in RTL mode
        https://bugs.webkit.org/show_bug.cgi?id=157699
        <rdar://problem/26282319>

        Reviewed by Simon Fraser.

        Some follow-up changes as suggested by Darin in review.

        * Shared/AssistedNodeInformation.h: Use initializers so we can
        remove the constructors.
        (WebKit::OptionItem::OptionItem): Deleted.
        (WebKit::AssistedNodeInformation::AssistedNodeInformation): Deleted.
        * UIProcess/ios/forms/WKFormSelectPopover.mm: Add a comment to explain
        why we are explicitly setting the language.
        (-[WKSelectTableViewController initWithView:hasGroups:]):

2016-05-13  Chris Dumez  <cdumez@apple.com>

        [NetworkCache] Avoid having to re-parse URLs after deserializing them
        https://bugs.webkit.org/show_bug.cgi?id=157660

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
        (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
        * NetworkProcess/cache/NetworkCacheCoders.h:
        Drop template specializations used by our network cache for encoding
        / decoding URLs as Strings. This causes us to now rely on
        URL::encode() / URL::decode() instead.

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<BlobPart>::decode):
        Fix bug in BlobPart encoding / decoding. It was encoding the url member
        as a URL but decoding it as a String.

2016-05-13  Dan Bernstein  <mitz@apple.com>

        Try to fix some non-iOS builds.

        * mac/postprocess-framework-headers.sh:

2016-05-13  Ryan Haddad  <ryanhaddad@apple.com>

        Attempt to fix the iOS build after r200874

        Unreviewed build fix.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:

2016-05-13  Sam Weinig  <sam@webkit.org>

        Rename WKDataDetectorTypeSpotlightSuggestion to WKDataDetectorTypeLookupSuggestion
        <rdar://problem/26269611>

        Reviewed by Dan Bernstein and Enrica Casucci. 

        * Shared/API/Cocoa/WKFoundation.h:
        * Shared/API/c/WKDeclarationSpecifiers.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (fromWKDataDetectorTypes):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * mac/postprocess-framework-headers.sh:

2016-05-13  Beth Dakin  <bdakin@apple.com>

        Add dyldSPI.h for linked on or after checks, and add one for link preview
        https://bugs.webkit.org/show_bug.cgi?id=157401

        Reviewed by Darin Adler.

        Set _allowsLinkPreview to YES for programs linked on or after 
        firstSDKVersionWithLinkPreviewEnabledByDefault.
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):

2016-05-13  Jer Noble  <jer.noble@apple.com>

        Fullscreen view attempts to resize when in 2-up mode
        https://bugs.webkit.org/show_bug.cgi?id=157558

        Reviewed by Darin Adler.

        No need to react to NSApplicationDidChangeScreenParametersNotification to resize the
        fullscreen window when the screen parameters change; the NSWindow fullscreen machinery
        will do that on our behalf.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController windowDidLoad]): Deleted.
        (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Deleted.

2016-05-13  Antoine Quint  <graouts@apple.com>

        [iOS] <select> elements popover should render right-aligned when in RTL mode
        https://bugs.webkit.org/show_bug.cgi?id=157672
        <rdar://problem/26193442>

        Reviewed by Darin Adler.

        Add a new isRTL field to the AssistedNodeInformation as specified by the assisted
        node's render style and account for it when displaying the table view shown in the
        popover attached to the assisted node using the UIView semanticContentAttribute
        property.

        * Shared/AssistedNodeInformation.cpp:
        (WebKit::AssistedNodeInformation::encode):
        (WebKit::AssistedNodeInformation::decode):
        * Shared/AssistedNodeInformation.h:
        (WebKit::AssistedNodeInformation::AssistedNodeInformation):
        * UIProcess/ios/forms/WKFormSelectPopover.mm:
        (-[WKSelectTableViewController initWithView:hasGroups:]):
        (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getAssistedNodeInformation):

2016-05-13  Tina Liu  <iting_liu@apple.com>

        Revert r199691.
        https://bugs.webkit.org/show_bug.cgi?id=157645
        <rdar://problem/26235373>

        Reviewed by Darin Adler.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Deleted.
        (WebKit::WebProcessCreationParameters::decode): Deleted.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextSetPrivateBrowsingPluginLoadClientPolicy): Deleted.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setPluginLoadClientPolicy):
        (WebKit::WebProcessPool::createNewWebProcess): Deleted.
        (WebKit::WebProcessPool::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
        (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
        (WebKit::WebProcessPool::clearPluginClientPolicies): Deleted.
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
        (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
        (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
        (WebKit::WebPlatformStrategies::populatePluginCache):
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForPrivateBrowsing): Deleted.
        (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
        (WebKit::WebPlatformStrategies::clearPluginClientPolicies): Deleted.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForPrivateBrowsing): Deleted.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::setPluginLoadClientPolicies): Deleted.
        (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy): Deleted.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-05-12  Daniel Bates  <dabates@apple.com>

        Use SecTask SPI to retrieve code signing identifier for user directory suffix
        https://bugs.webkit.org/show_bug.cgi?id=157570
        <rdar://problem/25706517>

        Reviewed by Darin Adler.

        It is sufficient to make use of the SecTask SPI to retrieve the code signing
        identifier of the embedding client for use in the user directory suffix. This
        avoids the need to allow Code Signing Services to have access to the bundle
        of the embedding client.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox): Use the code signing identifier of the
        embedding client as part of the user directory suffix if available.
        * Shared/mac/CodeSigning.h: Update comment and include header wtf/spi/darwin/XPCSPI.h
        for the definition of xpc_connection_t. Renamed codeSigningIdentifier() to codeSigningIdentifierForCurrentProcess()
        to convey that it returns the code signing identifier for the current process. Repurposed
        the name codeSigningIdentifier for the variant of this function that takes a xpc_connection_t.
        * Shared/mac/CodeSigning.mm:
        (WebKit::codeSigningIdentifier): Added. Uses the audit token associated with the specified
        XPC connection to get the code signing identifier for the embedding client.
        (WebKit::codeSigningIdentifierForCurrentProcess): Renamed; formerly named codeSigningIdentifier.
        Implemented in terms of the SecTask API.
        (WebKit::secCodeForCurrentProcess): Deleted.
        (WebKit::secCodeForProcess): Deleted.
        (WebKit::secCodeSigningInformation): Deleted.
        (WebKit::appleSignedOrMacAppStoreSignedOrAppleDeveloperSignedRequirement): Deleted.
        (WebKit::secCodeSigningIdentifier): Deleted.
        (WebKit::codeSigningIdentifierForProcess): Deleted.
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService): Update code due to renaming.

2016-05-12  Konstantin Tokarev  <annulen@yandex.ru>

        Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem.
        https://bugs.webkit.org/show_bug.cgi?id=157624

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::saveViewStateToItem):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2016-05-12  Csaba Osztrogonác  <ossy@webkit.org>

        Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards
        https://bugs.webkit.org/show_bug.cgi?id=157564

        Reviewed by Darin Adler.

        * Configurations/FeatureDefines.xcconfig:

2016-05-11  Anders Carlsson  <andersca@apple.com>

        We have two different types of contextual menus in iBooks
        https://bugs.webkit.org/show_bug.cgi?id=157587
        rdar://problem/25904169

        Reviewed by Darin Adler.

        Give clients the option to bypass the WebKit context menu machinery.

        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::showContextMenu):

2016-05-10  Brian Burg  <bburg@apple.com>

        Web Automation: add command to asynchronously load the Web Inspector frontend in the background
        https://bugs.webkit.org/show_bug.cgi?id=157509

        Reviewed by Timothy Hatcher and Joseph Pecoraro.

        In order to make it easier to debug code that executes as a result of an automation
        command, this patch adds a new Automation command to asynchronously load the debugger
        and Inspector frontend. It is designed for use by automation clients to implement an
        auto-inspection feature to aid in debugging automation scripts.

        * UIProcess/Automation/Automation.json: Add new command.
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::inspectBrowsingContext): Added.
        (WebKit::WebAutomationSession::inspectorFrontendLoaded): Added.
        This message is forwarded by WebInspectorProxy to the inspected page's session.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
        Force the active automation window to become key and bring to front prior to
        sending each NSEvent. This way, if the Inspector pauses while a command executes,
        the automation window will get back focus when the Inspector unpauses just before
        the next synthesized mouse or keyboard NSEvent is sent to its NSWindow.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::frontendLoaded):
        Forward to the inspected page's session.

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/WebInspectorProxy.messages.in: Add notification of the frontend's load.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::frontendLoaded):
        Kick off notifying the automation session in UIProcess that the inspector loaded.

        (WebKit::WebInspectorUI::closeWindow):
        In some circumstances, the Web Inspector can be loaded without showing
        the window. If this hidden page closes, make sure the frontend host gets
        a chance to disconnect its InspectorFrontendClient. Normally this happens
        when the window closes, but unshown Inspectors do not get window instances.

2016-05-11  Chris Dumez  <cdumez@apple.com>

        Update Node::appendChild() / replaceChild() / removeChild() / insertBefore() to take references instead of pointers
        https://bugs.webkit.org/show_bug.cgi?id=157556

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
        (-[WKDOMNode insertNode:before:]):
        (-[WKDOMNode appendChild:]):
        (-[WKDOMNode removeChild:]):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::PDFPlugin):
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
        (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):

2016-05-11  Brady Eidson  <beidson@apple.com>

        Modern IDB: IDBOpenDBRequests that are stop()'ed don't notify the IDBServer of that fact.
        https://bugs.webkit.org/show_bug.cgi?id=157448

        Reviewed by Alex Christensen.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToServer::openDBRequestCancelled):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

2016-05-11  Myles C. Maxfield  <mmaxfield@apple.com>

        Fix a typo in r200330

        Unreviewed.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:

2016-05-10  Sam Weinig  <sam@webkit.org>

        Only expose WKDataDetectorTypes and -[WKWebViewConfiguration dataDetectorTypes] on iOS
        for now, since we don't have it fully implemented on Mac.

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (fromWKDataDetectorTypes):
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):

2016-05-10  Sam Weinig  <sam@webkit.org>

        Add SPI for Data Detectors to get ranges of text around an existing range.
        <rdar://problem/26009749>

        Reviewed by Enrica Casucci.

        * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
        * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
        (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):

2016-05-10  Enrica Casucci  <enrica@apple.com>

        Numerous block selection issues on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=157490
        rdar://problem/25717977
        rdar://problem/23042215

        Reviewed by Tim Horton.

        This patch fixes a number of issues with block selection on iOS.
        We no longer eagerly choose block selection vs text selection and we
        make sure we are capable of switching back to text selection from block
        under every circumstance. The patch also fixes the logic used to decide
        when to switch to block selection. It now computes the rectangle for the
        paragraph containing the initial text selection to decide when we are
        actually dragging outside the boundaries of the paragraph block.

        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (selectionChangedWithGesture):
        (selectionChangedWithTouch):
        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::gestureCallback):
        (WebKit::WebPageProxy::touchesCallback):
        (WebKit::WebPageProxy::autocorrectionDataCallback):
        (WebKit::WebPageProxy::selectWithGesture):
        (WebKit::WebPageProxy::updateSelectionWithTouches):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::selectionBoxForRange):
        (WebKit::canShrinkToTextSelection):
        (WebKit::hasCustomLineHeight):
        (WebKit::WebPage::rangeForWebSelectionAtPosition):
        (WebKit::WebPage::contractedRangeFromHandle):
        (WebKit::WebPage::updateBlockSelectionWithTouch):
        (WebKit::WebPage::clearSelection):
        (WebKit::WebPage::switchToBlockSelectionAtPoint):
        (WebKit::WebPage::shouldSwitchToBlockModeForHandle):
        (WebKit::WebPage::updateSelectionWithTouches):
        (WebKit::WebPage::selectWithTwoTouches):

2016-05-10  Alex Christensen  <achristensen@webkit.org>

        Handle _schemeUpgraded delegate callbacks in NSURLSessionDataDelegate
        https://bugs.webkit.org/show_bug.cgi?id=157354
        rdar://problem/25842107

        Reviewed by Darin Adler.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
        When we make a request to a http url and CFNetwork determines that that url would have redirected to an HSTS site
        and it is going to change the request to an https request, this delegate callback is called.  We need to call the
        redirection code to have the same behavior as the NSURLConnection-based loader.

2016-05-10  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(VIDEO) build
        https://bugs.webkit.org/show_bug.cgi?id=157518

        Reviewed by Alex Christensen.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-05-10  Anders Carlsson  <andersca@apple.com>

        Fix more deprecation warnings.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
        (NetworkServiceInitializer):
        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
        (PluginServiceInitializer):
        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer):

2016-05-10  Chris Dumez  <cdumez@apple.com>

        [SpeculativeValidation] Do not start a preload if there is already one pending
        https://bugs.webkit.org/show_bug.cgi?id=157522
        <rdar://problem/26156083>

        Reviewed by Alex Christensen.

        Do not start a preload if there is already one pending. We failed to check in
        SpeculativeLoadManager::preloadEntry() if there was already a pending preload.
        As a result, we would sometimes cancel an already pending preload and start
        one from scratch which is inefficient. It would also sometimes lead to hitting
        an assertion in the SpeculativeLoad destructor because we could destroy the
        SpeculativeLoad without finishing or cancelling the load.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):

2016-05-10  Anders Carlsson  <andersca@apple.com>

        Fix a deprecation warning.

        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
        (DatabaseServiceInitializer):

2016-05-10  Tim Horton  <timothy_horton@apple.com>

        Clicks do not work in Safari after pressing the Track package button in Gmail
        https://bugs.webkit.org/show_bug.cgi?id=157508
        <rdar://problem/22646404>

        Reviewed by Anders Carlsson.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::viewDidMoveToWindow):
        Explicitly cancel the force-click animation when we're removing the gesture
        recognizer due to the WK*View being unparented. This works around a bug
        where we don't get the cancellation callback in this situation, causing
        Safari to be left in an inconsistent and unexpected state.

2016-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>

        [Linux] Remove seccomp filters support
        https://bugs.webkit.org/show_bug.cgi?id=157380

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode): Deleted.
        (WebKit::NetworkProcessCreationParameters::decode): Deleted.
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Deleted.
        (WebKit::WebProcessCreationParameters::decode): Deleted.
        * Shared/WebProcessCreationParameters.h:
        * Shared/linux/SeccompFilters/OpenSyscall.cpp: Removed.
        * Shared/linux/SeccompFilters/OpenSyscall.h: Removed.
        * Shared/linux/SeccompFilters/SeccompBroker.cpp: Removed.
        * Shared/linux/SeccompFilters/SeccompBroker.h: Removed.
        * Shared/linux/SeccompFilters/SeccompFilters.cpp: Removed.
        * Shared/linux/SeccompFilters/SeccompFilters.h: Removed.
        * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Removed.
        * Shared/linux/SeccompFilters/SigactionSyscall.h: Removed.
        * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Removed.
        * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Removed.
        * Shared/linux/SeccompFilters/Syscall.cpp: Removed.
        * Shared/linux/SeccompFilters/Syscall.h: Removed.
        * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Removed.
        * Shared/linux/SeccompFilters/SyscallPolicy.h: Removed.
        * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Removed.
        * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Removed.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::ensureNetworkProcess): Deleted.
        (WebKit::WebProcessPool::createNewWebProcess): Deleted.
        (WebKit::WebProcessPool::cookieStorageDirectory): Deleted.
        * UIProcess/WebProcessPool.h:
        * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Removed.
        * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Removed.
        * WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Removed.
        * WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Removed.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformInitializeWebProcess): Deleted.

2016-05-09  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
        https://bugs.webkit.org/show_bug.cgi?id=157503
        <rdar://problem/23736297>

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        Restore a requiresUnifiedScaleFactor that was lost in r191922.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame):
        (WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:        
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::didInitializePlugin):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
        Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
        because the PluginView doesn't exist at this point, so it can't answer
        the handlesPageScaleGesture question correctly (or at all).
        Instead, we'll send the message when the main-frame PluginView is initialized.

2016-05-09  Simon Fraser  <simon.fraser@apple.com>

        [iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
        https://bugs.webkit.org/show_bug.cgi?id=157496
        rdar://problem/22963278

        Reviewed by Tim Horton.

        UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
        with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.

        Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
        user interaction on these views.

        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
        * Shared/mac/RemoteLayerTreeTransaction.h:
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
        (WebKit::dumpChangedLayers):
        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
        (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]): Our custom hit
        test needs to take view.isUserInteractionEnabled into account.
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::setHidden):
        (WebKit::PlatformCALayerRemote::contentsHidden):
        (WebKit::PlatformCALayerRemote::setContentsHidden):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2016-05-09  Ada Chan  <adachan@apple.com>

        Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
        https://bugs.webkit.org/show_bug.cgi?id=157493

        Reviewed by Dan Bernstein.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):

2016-05-06  Ada Chan  <adachan@apple.com>

        Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=157434

        Reviewed by Darin Adler.

        * UIProcess/API/C/mac/WKPagePrivateMac.h:
        * UIProcess/API/C/mac/WKPagePrivateMac.mm:
        (WKPageIsPlayingVideoInEnhancedFullscreen):
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
        * UIProcess/WebPageProxy.h:

2016-05-09  Anders Carlsson  <andersca@apple.com>

        Add injected bundle SPI for getting favicon and touch icon URLs
        https://bugs.webkit.org/show_bug.cgi?id=157435

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
        (collectIcons):
        New helper function that calls into the WebCore LinkCollector.

        (-[WKWebProcessPlugInFrame appleTouchIconURLs]):
        Call collectIcons.

        (-[WKWebProcessPlugInFrame faviconURLs]):
        Ditto.

2016-05-06  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Font size increases on some pages after navigating then going back
        https://bugs.webkit.org/show_bug.cgi?id=157441
        rdar://problem/22873240

        Reviewed by Darin Adler.

        There's an ordering dependency between setting the viewport configuration and doing
        layouts when going back to a page from the page cache that is incorrectly handled.

        In FrameLoader::commitProvisionalLoad(), CachedPage::restore() triggers a layout under
        updateContentsSize(), but this happens before dispatchDidCommitLoad() which updates
        the viewport arguments via ViewportConfiguration::setViewportArguments().

        This issue is not addressed by the current commit. But a second problem is:
        if the inputs to text autosizing change, we need to invalidate the autosizing state.
        The relevant input here is the fixed layout width (which is determined from the viewport
        configuration).

        The current code invalidated text autosizing when m_viewportConfiguration.minimumLayoutSize()
        changed, but the correct behavior is to invalidate based on fixed layout size changing.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::sendViewportAttributesChanged):
        (WebKit::WebPage::setFixedLayoutSize):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::resetTextAutosizing):
        (WebKit::WebPage::dynamicViewportSizeUpdate):
        (WebKit::WebPage::viewportConfigurationChanged):
        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): Deleted.
        (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded): Deleted.

2016-05-09  Alex Christensen  <achristensen@webkit.org>

        Don't use DiskCache for media resource loads
        https://bugs.webkit.org/show_bug.cgi?id=157405

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeRetrieveDecision):
        (WebKit::NetworkCache::makeStoreDecision):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):

2016-05-08  Myles C. Maxfield  <mmaxfield@apple.com>

        [OS X] Migrate our Font classes entirely off of NSFont
        https://bugs.webkit.org/show_bug.cgi?id=157464

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
        (WebKit::WebPopupMenu::setUpPlatformData):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::fontAtSelection):

2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>

        Rename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
        https://bugs.webkit.org/show_bug.cgi?id=157447

        Reviewed by Ryosuke Niwa.

        * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
        (WebKit::WebPage::findZoomableAreaForPoint):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::hitTest):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::rangeForWebSelectionAtPosition):
        (WebKit::WebPage::rangeForBlockAtPoint):
        (WebKit::WebPage::getPositionInformation):

2016-05-06  Simon Fraser  <simon.fraser@apple.com>

        Enable IOS_TEXT_AUTOSIZING on Mac and make it testable
        https://bugs.webkit.org/show_bug.cgi?id=157432
        rdar://problem/16406720

        Reviewed by Dean Jackson.

        Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested.
        
        Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2
        preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests.
        These two settings are shared with TEXT_AUTOSIZING.

        Add a TextAutosizing log channel, which is useful for generated -expected.html results.

        Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement
        without changes.

        An implication of this set of changes is that the way clients enable text autosizing
        has changed. Previously, they set the "MinimumZoomFontSize" preference to 0.
        Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing
        on iPhone only, not iPad.

        Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled()
        instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone.

        UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size,
        which will now always return 15, but had no other code that toggled this. So it's safe to just rely
        on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad.

        * Configurations/FeatureDefines.xcconfig:
        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _textAutosizingEnabled]):
        (-[WKPreferences _setTextAutosizingEnabled:]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-06  Dean Jackson  <dino@apple.com>

        Regions, Shapes and Tracks don't need runtime features
        https://bugs.webkit.org/show_bug.cgi?id=157426
        <rdar://problem/26146262>

        Reviewed by Simon Fraser.

        The following RuntimeEnabledFeatures can be removed since
        we have no need to disable them (they are stable and have
        shipped for a while):
        - CSS Regions
        - CSS Shapes
        - Media tracks

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetCSSRegionsEnabled): Deleted.
        (WKPreferencesGetCSSRegionsEnabled): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Deleted.
        (WebKit::InjectedBundle::setCSSRegionsEnabled): Deleted.
        (WebKit::InjectedBundle::setCSSCompositingEnabled): Deleted.
        * WebProcess/InjectedBundle/InjectedBundle.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Deleted.

2016-05-05  Ada Chan  <adachan@apple.com>

        Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
        https://bugs.webkit.org/show_bug.cgi?id=157409

        Reviewed by Tim Horton.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
        Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
        WebVideoFullscreenManager::SetVideoLayerFrameFenced message.

        * UIProcess/DrawingAreaProxy.cpp:
        (WebKit::DrawingAreaProxy::createFence):
        Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
        * UIProcess/DrawingAreaProxy.h:

        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
        Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
        (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
        Update due to method rename.

2016-05-05  Brady Eidson  <beidson@apple.com>

        Modern IDB (Workers): Get everything to the right threads.
        https://bugs.webkit.org/show_bug.cgi?id=157398

        Reviewed by Alex Christensen.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::putOrAdd):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK] Remove "region based columns" runtime feature remainings
        https://bugs.webkit.org/show_bug.cgi?id=157393

        The runtime feature was removed in r168978,
        and the usage in WebKitSettings.cpp in r168988.
        However it was still around in ExperimentalFeatures class.

        Reviewed by Michael Catanzaro.

        * UIProcess/gtk/ExperimentalFeatures.cpp: Remove runtime feature.
        * UIProcess/gtk/ExperimentalFeatures.h: Ditto.

2016-05-05  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK] Add CSS Grid Layout as experimental feature
        https://bugs.webkit.org/show_bug.cgi?id=157391

        Reviewed by Michael Catanzaro.

        Now that we've a runtime feature again for CSS Grid Layout (r200215),
        we can recover the old patch (r162215) that allows to enable/disable
        CSS Grid Layout through the environment variable
        WEBKITGTK_EXPERIMENTAL_FEATURES.

        Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webKitSettingsConstructed): Use new experimental feature to enable
        or disable CSS Grid Layout.
        * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
        * UIProcess/gtk/ExperimentalFeatures.h: Ditto.

2016-05-05  Jer Noble  <jer.noble@apple.com>

        [WK2] Media controls don't update if controller is created after the interface is created
        https://bugs.webkit.org/show_bug.cgi?id=157376

        Reviewed by Beth Dakin.

        Implement the new getter methods on WebPlaybackSessionModelContext by caching the values
        passed through WebPlaybackSessionManagerProxy.

        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
        (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime):
        (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime):
        (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):
        (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties):
        (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManagerProxy::setDuration):
        (WebKit::WebPlaybackSessionManagerProxy::setRate):
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Deleted.
        (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
        (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
        (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Deleted.
        (WebKit::WebVideoFullscreenModelContext::isVisible): Deleted.
        (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen): Deleted.
        (WebKit::WebVideoFullscreenModelContext::didExitFullscreen): Deleted.
        (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Deleted.

2016-05-05  Dean Jackson  <dino@apple.com>

        Shadow DOM should not be experimental
        https://bugs.webkit.org/show_bug.cgi?id=157384
        <rdar://problem/26123254>

        Reviewed by Anders Carlsson.

        Shadow DOM is not an experimental feature. We want
        it enabled by default.

        This fixes the timeout in:
        WebKit2.InjectedBundleMakeAllShadowRootOpenTest

        * Shared/WebPreferencesDefinitions.h: Move the Shadow
        DOM preference out of Experimental.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-05  Simon Fraser  <simon.fraser@apple.com>

        Revert r200390, thus putting r199259 and r200161 and back.

        * Shared/VisibleContentRectUpdateInfo.cpp:
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
        (WebKit::operator==):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
        (-[WKWebView _didFinishScrolling]):
        (-[WKWebView scrollViewDidScroll:]):
        (-[WKWebView scrollViewDidZoom:]):
        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
        (-[WKWebView _scrollViewDidInterruptDecelerating:]):
        (-[WKWebView _visibleRectInEnclosingScrollView:]):
        (-[WKWebView _visibleContentRect]):
        (-[WKWebView _didScroll]):
        (-[WKWebView _enclosingScrollerScrollingEnded:]):
        (-[WKWebView _frameOrBoundsChanged]):
        (-[WKWebView _updateVisibleContentRects]):
        (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
        (scrollViewCanScroll):
        (-[WKWebView _updateContentRectsWithState:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::updateVisibleContentRects):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):

2016-05-02  Sam Weinig  <sam@webkit.org>

        On platforms that support it, use a SecTrustRef as the basis of CertificateInfo instead of a chain of SecCertificateRefs.
        https://bugs.webkit.org/show_bug.cgi?id=157220

        Reviewed by Darin Adler.

        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
        (WebKit::leafCertificate):
        (WebKit::chain):
        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
        When supported, get the SecCertificateRef from the SecTrustRef rather than the
        stored certificate chain.

        * Shared/cf/ArgumentCodersCF.cpp:
        (IPC::typeFromCFTypeRef):
        (IPC::encode):
        (IPC::decode):
        * Shared/cf/ArgumentCodersCF.h:
        Add support for encoding/decoding SecTrustRef objects.

        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (IPC::ArgumentCoder<CertificateInfo>::encode):
        (IPC::ArgumentCoder<CertificateInfo>::decode):
        Add support for encoding/decoding CertificateInfo's that contain SecTrustRef objects.

        (IPC::encodeNSError):
        (IPC::decodeNSError):
        Simplify error encoding/decoding by not using an addition CertificateInfo object for encoding
        the peerCertificateChain. Also, add the peerTrust to the userInfo that get's encoded/decoded.

        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView serverTrust]):
        (-[WKWebView certificateChain]):
        Add new serverTrust API and deprecate certificateChain.

        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::NavigationState::willChangeCertificateInfo):
        (WebKit::NavigationState::didChangeCertificateInfo):
        Add support for KVO of -[WKWebView serverTrust].

2016-05-05  Daniel Bates  <dabates@apple.com>

        Remove workaround added in r200391 (rdar://problem/25992976)
        https://bugs.webkit.org/show_bug.cgi?id=157378
        <rdar://problem/26118503>

        Reviewed by Anders Carlsson.

        Following the fix for <rdar://problem/26075714> we can remove the workaround added in r200391 (rdar://problem/25992976).

        * Shared/mac/CodeSigning.mm:
        (WebKit::secCodeSigningIdentifier):

2016-05-04  Dean Jackson  <dino@apple.com>

        Experimental Features don't need an "Experimental" prefix
        https://bugs.webkit.org/show_bug.cgi?id=157363
        <rdar://problem/26100630>

        Reviewed by Anders Carlsson.

        Since we're not persisting the value of the experimental
        features, it's unlikely there will ever be the case
        where we move a Preference from experimental to normal
        and use a stored value.

        * Shared/WebPreferencesDefinitions.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-04  Dean Jackson  <dino@apple.com>

        Experimental features should toggle runtime flags
        https://bugs.webkit.org/show_bug.cgi?id=157353
        <rdar://problem/23621603>

        Reviewed by Anders Carlsson.

        Hook up the experimental WebPreferences to RuntimeEnabledFeatures.
        In the process I removed the general preference for WebGL 2 (we
        already had an experimental feature for it) and moved Custom
        Elements and Shadow DOM to experimental.

        I also removed the C versions of the preferences, since experimental
        features only need the ObjC API (which is generated automatically).

        * Shared/WebPreferencesDefinitions.h: Move/remove some features and
        make the experimental section more clear.
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetWebGL2Enabled): Deleted.
        (WKPreferencesGetWebGL2Enabled): Deleted.
        (WKPreferencesSetShadowDOMEnabled): Deleted.
        (WKPreferencesGetShadowDOMEnabled): Deleted.
        (WKPreferencesSetCustomElementsEnabled): Deleted.
        (WKPreferencesGetCustomElementsEnabled): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey): A
        version of updateBoolValueForKey that doesn't call the platform
        function (e.g. doesn't save to NSUserDefaults).
        * UIProcess/WebPreferences.h:
        * UIProcess/mac/WebPreferencesMac.mm:
        (WebKit::WebPreferences::platformInitializeStore): Deleted.
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-04  Dean Jackson  <dino@apple.com>

        TestRunner should always enable all the experimental features
        https://bugs.webkit.org/show_bug.cgi?id=157360
        <rdar://problem/26099748>

        Reviewed by Anders Carlsson.

        Experimental features are disabled by default, but it is
        a pain to enable them in every test. Instead, have the
        test runner turn them all on.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesEnableAllExperimentalFeatures):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::enableAllExperimentalFeatures):
        * UIProcess/WebPreferences.h:

2016-05-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Add WKPreference for SelectionPaintingWithoutSelectionGaps
        https://bugs.webkit.org/show_bug.cgi?id=156900

        Reviewed by Michael Catanzaro.

        Unlike other browsers WebKit has been drawing selection gaps
        between render blocks during the text selection. This often
        cause text selection screen looks messy.

        This patch adds a setting method to disable the functionality,
        and EFL port disables it by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled):
        (WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-04  Zan Dobersek  <zdobersek@igalia.com>

        [CoordGraphics] CompositingCoordinator should hande root compositing and view overlay layers separately
        https://bugs.webkit.org/show_bug.cgi?id=157305

        Reviewed by Carlos Garcia Campos.

        Update CoordinatedLayerTreeHost and ThreadCoordinatedLayerTreeHost to
        correctly use setRootCompositingLayer() and setViewOverlayRootLayer()
        methods on the CompositingCoordinator object.

        CoordinatedLayerTreeHost doesn't have to keep a pointer to the root
        compositing layer anymore. updateRootLayers() can be removed.

        ThreadCoordinatedLayerTreeHost doen't have to keep a pointer to both
        the root compositing and the view overlay layers anymore. Similarly,
        updateRootLayers() can be removed.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
        (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): Deleted.
        (WebKit::CoordinatedLayerTreeHost::updateRootLayers): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::setRootCompositingLayer):
        (WebKit::ThreadedCoordinatedLayerTreeHost::setViewOverlayRootLayer):
        (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Deleted.
        (WebKit::ThreadedCoordinatedLayerTreeHost::updateRootLayers): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-05-03  Beth Dakin  <bdakin@apple.com>

        Add VideoControlsManager tests
        https://bugs.webkit.org/show_bug.cgi?id=157332
        -and corresponding-
        rdar://problem/24358431

        Reviewed by Sam Weinig.

        Expose _hasActiveVideoForControlsManager on WKWebViewPrivate for the sake of 
        testing. 
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _hasActiveVideoForControlsManager]):
        (-[WKWebView _doAfterNextPresentationUpdate:]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:

2016-05-03  Jer Noble  <jer.noble@apple.com>

        [iOS][WK2] Allow WKWebView to play local filesystem media when created with -loadFileURL:allowingReadAccessToURL:
        https://bugs.webkit.org/show_bug.cgi?id=156875
        <rdar://problem/24281444>

        Reviewed by Alexey Proskuryakov.

        Grant AVFoundation the right to issue file read sandbox extensions from the WebContent process to the mediaserverd
        process, so that it can play back local media files.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2016-05-03  Jiewen Tan  <jiewen_tan@apple.com>

        File Upload: Photo upload name is always generic (image.jpg)
        https://bugs.webkit.org/show_bug.cgi?id=157291
        <rdar://problem/12353008>

        Reviewed by Darin Adler.

        Use the original filename as the name of an uploaded image instead of
        a generic name, i.e. image.jpg.

        * Platform/spi/ios/PhotosSPI.h: Added.
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
        * WebKit2.xcodeproj/project.pbxproj:

2016-05-03  Chris Dumez  <cdumez@apple.com>

        [WK2][DiskCache] Store common HTTP header names as strings
        https://bugs.webkit.org/show_bug.cgi?id=157326
        <rdar://problem/26073498>

        Reviewed by Antti Koivisto.

        Store common HTTP header names as strings in the disk cache instead of
        using their value in the HTTPHeaderName enumeration. Having the disk
        cache rely in the HTTPHeaderName enumeration is risky becomes it means
        the cached data would become invalid every time someone updates
        HTTPHeaderNames.in in WebCore. If someone were to update
        HTTPHeaderNames.in without bumping the disk cache version, we would end
        up with wrongly recognized HTTP header names after loading responses
        from the cache.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode):
        (WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode):
        * NetworkProcess/cache/NetworkCacheCoders.h:
        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-05-03  Daniel Bates  <dabates@apple.com>

        Temporary workaround for Apple Internal builds
        <rdar://problem/25992976>

        For Apple Internal builds treat error code errSecCSGuestInvalid as if it were error code errSecCSUnsigned.
        We will look to remove this workaround in the fix for <rdar://problem/26075714>.

        * Shared/mac/CodeSigning.mm:
        (WebKit::secCodeSigningIdentifier):

2016-05-03  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r199259 and r200161.

        Seems to have caused a ~1.2% PLT regression on iOS

        Reverted changesets:

        "[iOS WK2] WKWebViews should consult ancestor UIScrollViews to
        determine tiling area"
        https://bugs.webkit.org/show_bug.cgi?id=156429
        http://trac.webkit.org/changeset/199259

        "[iOS WK2] When determining tile size, check whether ancestor
        UIScrollViews are actually scrollable"
        https://bugs.webkit.org/show_bug.cgi?id=157107
        http://trac.webkit.org/changeset/200161

2016-05-03  Dean Jackson  <dino@apple.com>

        CSS Grid should be an experimental feature flag
        https://bugs.webkit.org/show_bug.cgi?id=157327
        <rdar://problem/26075147>

        Reviewed by Anders Carlsson.

        The CSS Grid Layout runtime flag was exposed by
        a WebKit preference. It was in the experimental
        section but was missing the "Experimental" prefix.

        It was also missing the human readable description.

        Lastly, there is no need for the C API for experimental
        features.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
        (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-03  Alex Christensen  <achristensen@webkit.org>

        Remove firing assertion when redirecting
        https://bugs.webkit.org/show_bug.cgi?id=155800
        rdar://25299194

        Reviewed by Sam Weinig.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        With NSURLConnection, we stopped getting delegate callbacks once the delegate is destroyed, and everything was cancelled.
        With NSURLSession we continue getting delegate callbacks because the session's delegate is not destroyed after each load.
        As documented in NSURLSession.h: "In some cases, the task may signal other work before it acknowledges the cancelation."
        In the cases where we cancel a load, delete the NetworkLoad and corresponding NetworkDataTask, we want to call all
        completion handlers indicating that we really want to cancel instead of asserting.

2016-05-02  Darin Adler  <darin@apple.com>

        Change IDL enumerations to be nested in their C++ class instead of at WebCore namespace level
        https://bugs.webkit.org/show_bug.cgi?id=157257

        Reviewed by Chris Dumez.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::loadResource): Updated since we changed
        ReferrerHeaderPolicy back to ReferrerPolicy.
        (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.

2016-05-02  Brady Eidson  <beidson@apple.com>

        Const-ify some IDB code.
        https://bugs.webkit.org/show_bug.cgi?id=157287

        Reviewed by Alex Christensen.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::deleteDatabase):
        (WebKit::WebIDBConnectionToServer::openDatabase):
        (WebKit::WebIDBConnectionToServer::abortTransaction):
        (WebKit::WebIDBConnectionToServer::commitTransaction):
        (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

2016-05-02  Simon Fraser  <simon.fraser@apple.com>

        Sort the project file.

        * WebKit2.xcodeproj/project.pbxproj:

2016-05-02  Simon Fraser  <simon.fraser@apple.com>

        Fix shouldUpdateScrollLayerPositionSynchronously() for non-main frames. Remove updatesScrollLayerPositionOnMainThread()
        https://bugs.webkit.org/show_bug.cgi?id=157277

        Reviewed by Dean Jackson, Tim Horton.

        Remove updatesScrollLayerPositionOnMainThread() which is unused by all ports.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:

2016-05-02  Alex Christensen  <achristensen@webkit.org>

        Crash if a certificate chain has null certificates
        https://bugs.webkit.org/show_bug.cgi?id=157206

        Reviewed by Alexey Proskuryakov.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::certificatesMatch):
        SecTrustGetCertificateAtIndex can return null.
        If this ever happens, something has gone horribly wrong in the security code and we should crash.
        See rdar://problem/21723172

2016-05-02  Myles C. Maxfield  <mmaxfield@apple.com>

        Addressing post-review comments after r200116
        https://bugs.webkit.org/show_bug.cgi?id=157228

        Reviewed by Anders Carlsson.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        * UIProcess/WebPageProxy.cpp:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-05-02  Daniel Bates  <dabates@apple.com>

        DatabaseTracker::closeAllDatabases calls Database::close from the wrong thread
        https://bugs.webkit.org/show_bug.cgi?id=147672
        <rdar://problem/22357464>

        Reviewed by Brady Eidson.

        Call DatabaseTracker::closeAllDatabases() with CurrentQueryBehavior::Interrupt so that we abort
        a long running query and close the database immediately to avoid holding a locked file when the
        process is suspended.

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

2016-05-01  Darin Adler  <darin@apple.com>

        Update Fetch to use enum class instead of string for enumerations
        https://bugs.webkit.org/show_bug.cgi?id=157241

        Reviewed by Chris Dumez.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::loadResource): Updated for the change where I
        renamed ReferrerPolicy to ReferrerHeaderPolicy, at least for now.
        (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): Ditto.

2016-05-01  Konstantin Tokarev  <annulen@yandex.ru>

        Fixed build with !ENABLED(DATABASE_PROCESS).

        Unreviewed build fix.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):

2016-04-29  Chris Dumez  <cdumez@apple.com>

        Drop useless check in SpeculativeLoadManager::registerLoad()
        https://bugs.webkit.org/show_bug.cgi?id=157204

        Reviewed by Antti Koivisto.

        Drop useless check in SpeculativeLoadManager::registerLoad(). There is
        no way to end up this code path with a non-HTTP family request.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):

2016-04-29  Brian Burg  <bburg@apple.com>

        Web Automation: add SPI to mark an existing NSEvent as synthesized for automation
        https://bugs.webkit.org/show_bug.cgi?id=157221
        <rdar://problem/26019356>

        Reviewed by Timothy Hatcher.

        In cases where an NSEvent is duplicated, clients need to re-mark an NSEvent
        as synthesized for automation if the original NSEvent was marked as such.

        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.mm:
        (-[_WKAutomationSession markEventAsSynthesizedForAutomation:]):
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
        (WebKit::WebAutomationSession::markEventAsSynthesizedForAutomation):

2016-04-29  Brian Burg  <bburg@apple.com>

        Web Automation: use a magic eventNumber as a fallback for detecting NSEvents synthesized for automation
        https://bugs.webkit.org/show_bug.cgi?id=157222

        Reviewed by Timothy Hatcher.

        Sometimes events are copied and redelivered in a way that can't be reliably intercepted,
        so use eventNumber as an alternate means of detecting synthesized mouse NSEvents.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::wasEventSynthesizedForAutomation):
        If it's a mouse-related event, check the eventNumber if the associated object was missing.

        (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
        Most real events from input devices fill in eventNumber with a non-zero value.
        In my testing, using zero did not seem to adversely affect event delivery.

2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
        https://bugs.webkit.org/show_bug.cgi?id=157198
        <rdar://problem/26011049>

        Reviewed by Timothy Hatcher.

        * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h:
        * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
        (WebKit::WebInspectorFrontendAPIDispatcher::reset):
        (WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
        (WebKit::WebInspectorFrontendAPIDispatcher::suspend):
        (WebKit::WebInspectorFrontendAPIDispatcher::unsuspend):
        (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
        (WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
        (WebKit::WebInspectorFrontendAPIDispatcher::evaluateOrQueueExpression):
        (WebKit::WebInspectorFrontendAPIDispatcher::evaluateQueuedExpressions):
        Avoid evaluating expressions when the page is paused. Generalize the
        message queueing and dispatching for pause/suspend that we already
        had for waiting for the frontend page to be loaded.

        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::pagePaused):
        (WebKit::WebInspectorUI::pageUnpaused):
        When the frontend page pauses/unpauses, suspend/resume the dispatcher.

2016-04-29  Chris Dumez  <cdumez@apple.com>

        Remove unnecessary isolated String copying from one of NetworkCache::Key's constructor
        https://bugs.webkit.org/show_bug.cgi?id=157207

        Reviewed by Antti Koivisto.

        Remove unnecessary isolated String copying from one of NetworkCache::Key's
        constructor. We are anyway going to create isolated copies if the Key ends
        up getting copied.

        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::Key::Key):

2016-04-29  Brian Burg  <bburg@apple.com>

        Web Automation: performMouseInteraction command computes mouse event coordinates incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=157218
        <rdar://problem/26018230>

        Reviewed by Timothy Hatcher.

        This patch fixes two issues: the min/max clamp was in the wrong order,
        and the y-value did not account for the window's top content inset.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::performMouseInteraction):

2016-04-29  Dean Jackson  <dino@apple.com>

        RTL <select> popup menu is in the wrong location
        https://bugs.webkit.org/show_bug.cgi?id=157159
        <rdar://problem/25894451>

        Reapply http://trac.webkit.org/changeset/200217
        but with changes that will allow it to build on Yosemite.

        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):

2016-04-28  Ada Chan  <adachan@apple.com>

        Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
        https://bugs.webkit.org/show_bug.cgi?id=157151

        Reviewed by Jer Noble.

        Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
        user actions, so add a UserGestureIndicator in the methods that handle those messages.

        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::play):
        (WebKit::WebPlaybackSessionManager::pause):
        (WebKit::WebPlaybackSessionManager::togglePlayState):
        (WebKit::WebPlaybackSessionManager::beginScrubbing):
        (WebKit::WebPlaybackSessionManager::endScrubbing):
        (WebKit::WebPlaybackSessionManager::seekToTime):
        (WebKit::WebPlaybackSessionManager::fastSeek):
        (WebKit::WebPlaybackSessionManager::beginScanningForward):
        (WebKit::WebPlaybackSessionManager::beginScanningBackward):
        (WebKit::WebPlaybackSessionManager::endScanning):
        (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
        (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):

2016-04-29  Brady Eidson  <beidson@apple.com>

        Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup.
        https://bugs.webkit.org/show_bug.cgi?id=157185

        Reviewed by Anders Carlsson.

        * Shared/WebCrossThreadCopier.cpp:
        (WebCore::Vector<char>>::copy): reserveInitialCapacity() before creating the copy.
        (WebCore::Vector<int64_t>>::copy): Ditto.
        (WebCore::Vector<uint8_t>>::copy): Ditto.
        (WebCore::Vector<Vector<IDBKeyData>>>::copy): Deleted dead code.
        * Shared/WebCrossThreadCopier.h:

2016-04-29  Commit Queue  <commit-queue@webkit.org>

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

        This change broke the Yosemite build. (Requested by ryanhaddad
        on #webkit).

        Reverted changeset:

        "RTL <select> popup menu is in the wrong location"
        https://bugs.webkit.org/show_bug.cgi?id=157159
        http://trac.webkit.org/changeset/200217

2016-04-29  Claudio Saavedra  <csaavedra@igalia.com>

        [GTK] Move WK2 shareable code out from gtk directories
        https://bugs.webkit.org/show_bug.cgi?id=157135

        Reviewed by Darin Adler.

        Both NetworkProcessMain and InjectedBundle can go out from their respective gtk directories.

        * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
        (WebKit::NetworkProcessMainUnix): Deleted.
        * NetworkProcess/soup/NetworkProcessMainSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/gtk/NetworkProcessMainGtk.cpp.
        (WebKit::NetworkProcessMainUnix):
        * PlatformGTK.cmake: Update.
        * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
        (WebKit::InjectedBundle::initialize):
        (WebKit::InjectedBundle::setBundleParameter):
        (WebKit::InjectedBundle::setBundleParameters):
        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
        (WebKit::InjectedBundle::initialize): Deleted.
        (WebKit::InjectedBundle::setBundleParameter): Deleted.
        (WebKit::InjectedBundle::setBundleParameters): Deleted.

2016-04-28  Dean Jackson  <dino@apple.com>

        RTL <select> popup menu is in the wrong location
        https://bugs.webkit.org/show_bug.cgi?id=157159
        <rdar://problem/25894451>

        Reviewed by Simon Fraser.

        Make sure the NSPopupMenu takes the text direction
        into account, and offset the position
        of the menu slightly if we're in RTL mode.

        Unfortunately our test infrastructure is unable to exercise
        this because it runs without a window, and the popup menu
        is not captured in the screenshot.

        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):

2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>

        [css-grid] Add CSS Grid Layout runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=157134

        Reviewed by Simon Fraser.

        Add CSS Grid Layout runtime flag based on preferences,
        enabled by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetCSSGridLayoutEnabled):
        (WKPreferencesGetCSSGridLayoutEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-04-28  Daniel Bates  <dabates@apple.com>

        Fix the Apple Internal OS X build

        * UIProcess/mac/WKPrintingView.mm:
        (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Ignore deprecation warning for -[PDFPage drawWithBox:].
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::drawPDFPage): Ditto.

2016-04-28  Manuel Rego Casasnovas  <rego@igalia.com>

        Fix mistake in custom elements runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=157130

        Reviewed by Chris Dumez.

        The methods for the custom elements runtime flag were using
        the Shadow DOM flag instead.
        These methods were introduced in r197921,
        it seems it was just a copy&paste mistake.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetCustomElementsEnabled):
        (WKPreferencesGetCustomElementsEnabled):

2016-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Add missing files to the compilation of GTK+ inspector.

        * PlatformGTK.cmake:

2016-04-27  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/25915253> REGRESSION (r199628): Netflix playback fails in Safari Technology Preview with error code S7363-1260-FFFF58D8

        Rubber-stamped by Tim Horton.

        Reverted r199628.

        * Configurations/WebContentService.xcconfig:

2016-04-27  Brady Eidson  <beidson@apple.com>

        Modern IDB: Implement native IDBFactory.getAllDatabaseNames for WebInspector.
        https://bugs.webkit.org/show_bug.cgi?id=157072

        Reviewed by Alex Christensen.

        Handle the process hop for the new getAllDatabaseNames call.
        
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
        (WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

        * Shared/WebCrossThreadCopier.cpp:
        (WebCore::SecurityOriginData>::copy): Deleted, as its in WebCore now.
        * Shared/WebCrossThreadCopier.h:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::getAllDatabaseNames):
        (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

2016-04-27  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] When determining tile size, check whether ancestor UIScrollViews are actually scrollable
        https://bugs.webkit.org/show_bug.cgi?id=157107
        rdar://problem/25943577

        Reviewed by Tim Horton.
        
        We should only fall back to 512x512 tiles if the WKWebView has a UIScrollView ancestor,
        and that UIScrollView actually scrolls. This avoids falling back to small tiles in
        MobileSafari.

        Rename "enclosedInScrollView" to "enclosedInScrollableAncestorView" everywhere.

        * Shared/VisibleContentRectUpdateInfo.cpp:
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
        (WebKit::operator==):
        (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView): Deleted.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (scrollViewCanScroll):
        (-[WKWebView _updateContentRectsWithState:]):
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]): Deleted.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):

2016-04-26  Ada Chan  <adachan@apple.com>

        Set WebVideoFullscreenInterfaceMac up as a client of WebPlaybackSessionInterfaceMac to listen for playback state changes
        https://bugs.webkit.org/show_bug.cgi?id=157008

        Reviewed by Jer Noble.

        Since WebVideoFullscreenInterfaceMac holds onto WebPlaybackSessionInterfaceMac, we can't let
        WebPlaybackSessionManagerProxy unregister the context for that media element while
        WebVideoFullscreenInterfaceMac is still using it. WebVideoFullscreenInterfaceMac should add
        to the client count for that WebPlaybackSession context.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
        When the context for the media element is created with the WebVideoFullscreenManagerProxy, it should
        add one to the client count for the media element context in WebPlaybackSessionManagerProxy.
        (WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
        When WebVideoFullscreenManagerProxy unregisters the context for this media element, it should
        subtract one from the client count for the media element context in WebPlaybackSessionManagerProxy.

        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
        Bail early if m_controlsManagerContextId is zero. Otherwise, we'd end up sending a
        ClearPlaybackControlsManager message to the UI process inadvertently.
        (WebKit::WebPlaybackSessionManager::contextIdForMediaElement):
        Make sure the model element for the context ID is set to the media element.

        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::createModelAndInterface):
        When the context for the media element is created with the WebVideoFullscreenManager, it should
        add one to the client count for the media element context in WebPlaybackSessionManager.
        (WebKit::WebVideoFullscreenManager::removeContext):
        When WebVideoFullscreenManager unregisters the context for this media element, it should
        subtract one from the client count for the media element context in WebPlaybackSessionManager.

2016-04-27  Alex Christensen  <achristensen@webkit.org>

        Remove download message receiver when NetworkProcess crashes
        https://bugs.webkit.org/show_bug.cgi?id=157102
        <rdar://problem/25550106>

        Reviewed by Anders Carlsson.

        * UIProcess/Downloads/DownloadProxyMap.cpp:
        (WebKit::DownloadProxyMap::processDidClose):
        When the NetworkProcess crashes during a download, we want to remove the message receiver from the map
        so we don't get an assertion in ~MessageReceiver in the UIProcess so we do not have a freed
        message receiver in the map.

2016-04-27  Alex Christensen  <achristensen@webkit.org>

        Fix client certificate authentication with NSURLSession on iOS
        https://bugs.webkit.org/show_bug.cgi?id=157094
        <rdar://problem/25946859>

        Reviewed by Darin Adler.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        We only want to create a non-persistent credential with the given user and password 
        and store the user and password in the CredentialStorage if there is a user and password.
        We previously only skipped this if we were doing server trust evaluation, in which case 
        we will have a credential from serverTrustCredential which has no user or password.
        When doing client certificate authentication on iOS, this completion handler is called with
        a credential with session persistence and also no user or password, so we need to do the same thing.
        The reason this was never hit on Mac was because the credential came from tryUseCertificateInfoForChallenge,
        which always had persistence none.

2016-04-27  Claudio Saavedra  <csaavedra@igalia.com>

        [GTK][EFL] Move WK2 platform code to a common place
        https://bugs.webkit.org/show_bug.cgi?id=157069

        Reviewed by Carlos Garcia Campos.

        Logging implementation can be shared between EFL and GTK, so move it to unix.
        The GTK Module implementation doesn't depend on GTK anyhow so move it to glib.

        * Platform/efl/LoggingEfl.cpp: Removed.
        (WebKit::logLevelString): Deleted.
        * Platform/glib/ModuleGlib.cpp: Renamed from Source/WebKit2/Platform/gtk/ModuleGtk.cpp.
        (WebKit::Module::load):
        (WebKit::Module::unload):
        (WebKit::Module::platformFunctionPointer):
        * Platform/gtk/LoggingGtk.cpp:
        (WebKit::logLevelString): Deleted.
        * Platform/gtk/ModuleGtk.cpp:
        (WebKit::Module::load): Deleted.
        (WebKit::Module::unload): Deleted.
        (WebKit::Module::platformFunctionPointer): Deleted.
        * Platform/unix/LoggingUnix.cpp: Renamed from Source/WebKit2/Platform/gtk/LoggingGtk.cpp.
        (WebKit::logLevelString):
        * PlatformEfl.cmake: Update.
        * PlatformGTK.cmake: Update

2016-04-27  Alex Christensen  <achristensen@webkit.org>

        Fix assertion when downloading with NSURLSession after r198955
        https://bugs.webkit.org/show_bug.cgi?id=157051

        Reviewed by Brady Eidson.

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

2016-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r200094): [FreeType] Vertical text is broken after r200094
        https://bugs.webkit.org/show_bug.cgi?id=157066

        Reviewed by Martin Robinson.

        Add Source/WebCore/platform/graphics/freetype to the list of include dirs, because now FontPlatformData.h
        includes FcUniquePtr.h.

        * PlatformEfl.cmake:
        * PlatformGTK.cmake:

2016-04-26  Joseph Pecoraro  <pecoraro@apple.com>

        Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
        https://bugs.webkit.org/show_bug.cgi?id=156991
        <rdar://problem/25913475>

        Reviewed by Timothy Hatcher.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Explicitly always allow access to storage for Web Inspector content just
        in case, as we already allow universal file access.

2016-04-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [WK2] [OS X] Create API for switching RTL scrollbar policy
        https://bugs.webkit.org/show_bug.cgi?id=156948
        <rdar://problem/25707757>

        Reviewed by Darin Adler.

        Add the new API.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        * UIProcess/WebPageProxy.cpp:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-04-26  Beth Dakin  <bdakin@apple.com>

        Check to make sure shouldRequestCandidates() before requesting candidates
        https://bugs.webkit.org/show_bug.cgi?id=157038
        -and corresponding-
        rdar://problem/25910418

        Reviewed by Tim Horton.

        This patch limits requesting and showing candidates to cases where 
        shouldRequestCandidates() is true. This patch also caches the sequence number 
        returned by [NSSpellChecker requestCandidatesForSelectedRange:] to make sure 
        it is equal to the sequence number sent to the callback handler so that we do 
        not show candidates for old requests.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::updateWebViewImplAdditions):
        (WebKit::WebViewImpl::shouldRequestCandidates):
        (WebKit::WebViewImpl::showCandidates):
        (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
        (WebKit::WebViewImpl::handleRequestedCandidates):

2016-04-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Update expectation result in ewk_context_preferred_languages API test
        https://bugs.webkit.org/show_bug.cgi?id=157027

        Reviewed by Carlos Garcia Campos.

        platformLanguage() has been returning lower case value since r199815. Thus existing expected result
        needs to be updated together.

        * UIProcess/API/efl/tests/test_ewk2_context.cpp: Change en-US with en-us.
        (TEST_F):

2016-04-26  Zan Dobersek  <zdobersek@igalia.com>

        Mark two methods in the CoordinatedGraphicsScene and the
        ThreadedCoordinatedLayerTreeHost classes as overrides, fixing
        the compiler warnings.

        Rubber-stamped by Carlos Garcia Campos.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

2016-04-25  Ryosuke Niwa  <rniwa@webkit.org>

        Remove the build flag for template elements
        https://bugs.webkit.org/show_bug.cgi?id=157022

        Reviewed by Daniel Bates.

        * Configurations/FeatureDefines.xcconfig:

2016-04-25  Chris Dumez  <cdumez@apple.com>

        Crash under -[WKWebView _mayAutomaticallyShowVideoPictureInPicture] + 32 (WKWebView.mm:309)
        https://bugs.webkit.org/show_bug.cgi?id=156990
        <rdar://problem/25904376>

        Reviewed by Jer Noble.

        In case of WebProcess crash, WebPageProxy::processDidCrash() will call resetState() which
        will nullify WebPageProxy::m_videoFullscreenManager. In WebPageProxy::reattachToWebProcess(),
        we then call updateViewState() before re-initializing m_videoFullscreenManager, and
        updateViewState() ends up calling [WKWebView _mayAutomaticallyShowVideoPictureInPicture]
        which dereferences WebPageProxy::m_videoFullscreenManager without null check. This patch
        adds a null check for m_videoFullscreenManager in _mayAutomaticallyShowVideoPictureInPicture.

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

2016-04-25  Dan Bernstein  <mitz@apple.com>

        Fix a couple of mistakes from r199700.

        Rubber-stamped by Anders Carlsson.

        * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added availability attributes to new properties.
        * WebKit2.xcodeproj/project.pbxproj: Demoted _WKExperimentalFeatureInternal.h from Private to Project.

2016-04-24  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] Update the ewk_settings_offline_web_application_cache_enabled_get() expected value after r199854.
        https://bugs.webkit.org/show_bug.cgi?id=156968

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/C/WKPreferencesRef.h: Update the comment.
        * UIProcess/API/efl/tests/test_ewk2_settings.cpp: 
        (TEST_F):

2016-04-23  Andy Estes  <aestes@apple.com>

        Fix issues found by the clang static analyzer
        https://bugs.webkit.org/show_bug.cgi?id=156956

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/Cocoa/WKPreviewActionItem.mm:
        (-[WKPreviewAction dealloc]): Added to release _identifier.
        * UIProcess/_WKWebViewPrintFormatter.mm:
        (-[_WKWebViewPrintFormatter dealloc]): Released _frameToPrint.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView inputView]): -createPeripheralWithView: returned a retained object, but the method name did not
        match Cocoa conventions. Called -initWithView: instead.
        (-[WKContentView _showAttachmentSheet]): Stored the _WKActivatedElementInfo in a RetainPtr.
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
        (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
        The properties contextBeforeSelection, selectedText, markedText, and contextAfterSelection have the 'copy'
        annotation in UIWKAutocorrectionContext, so the additional copy made here would be leaked. Removed the extra copy.
        (-[WKAutocorrectionContext dealloc]): Deleted.
        * UIProcess/ios/forms/WKFormInputControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
        * UIProcess/ios/forms/WKFormInputControl.mm:
        (-[WKFormInputControl initWithView:]): Changed to return instancetype.
        (+[WKFormInputControl createPeripheralWithView:]): Deleted.
        * UIProcess/ios/forms/WKFormSelectControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
        * UIProcess/ios/forms/WKFormSelectControl.mm:
        (+[WKFormSelectControl createPeripheralWithView:]): Deleted.
        * UIProcess/mac/LegacySessionStateCoding.cpp:
        (WebKit::decodeLegacySessionState): If dynamic_cf_cast returned nullptr, the result of
        CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr before calling dynamic_cf_cast.
        * UIProcess/mac/ServicesController.mm:
        (WebKit::ServicesController::refreshExistingServices): Used a RetainPtr for attachment and cell.
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::setupServicesMenu): Used a RetainPtr for groupEntry.

2016-04-23  Chris Dumez  <cdumez@apple.com>

        Tie the DiagnosticLoggingClient's lifetime to the Page
        https://bugs.webkit.org/show_bug.cgi?id=156938
        <rdar://problem/25851499>

        Reviewed by Antti Koivisto.

        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
        (WebKit::WebDiagnosticLoggingClient::pageDestroyed):
        (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed): Deleted.
        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::willStartUserTriggeredZooming):

2016-04-23  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/25893246> WebKit2 has failed to build: error: use of undeclared identifier 'm_playbackSessionManager'

        Fixed the non-AVKit build.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _isShowingVideoPictureInPicture]):
        (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::fullScreenManager):
        (WebKit::WebPageProxy::playbackSessionManager):
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidBecomeActive):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createScrollingCoordinator):
        (WebKit::WebChromeClient::supportsVideoFullscreen):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::inspectorUI):
        (WebKit::WebPage::playbackSessionManager):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:

2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>

        Fixing a typo in my last commit.

        Unreviewed build fix.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:

2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>

        Missed some macros to fix builds that do not support AVKit.

        Unreviewed build fix.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:

2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>

        Fix builds that do not support AVKit

        Unreviewed build fix.

        * UIProcess/WebPageProxy.h:

2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>

        Take 2 for fixing builds that do not support AVKit

        Unreviewed build fix.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::resetState):

2016-04-22  Anders Carlsson  <andersca@apple.com>

        WKWebView WebSQL is not enabled
        https://bugs.webkit.org/show_bug.cgi?id=156928
        rdar://problem/19029603

        Reviewed by Beth Dakin.

        Give databases a default quota of 50 MB, matching what we have in UIWebView.

        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::exceededDatabaseQuota):

2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>

        Fix builds that do not support AVKit

        Unreviewed build fix.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::viewDidLeaveWindow):
        * UIProcess/ios/WebPageProxyIOS.mm:

2016-04-22  Brady Eidson  <beidson@apple.com>

        Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
        https://bugs.webkit.org/show_bug.cgi?id=156916

        Reviewed by Tim Horton.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):

2016-04-22  Zan Dobersek  <zdobersek@igalia.com>

        NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
        https://bugs.webkit.org/show_bug.cgi?id=156907

        Reviewed by Carlos Garcia Campos.

        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::IOChannel::readSyncInThread): Detach the new thread,
        ensuring the resources are released after the thread exits. Next step is
        to set up a thread pool and use that, avoiding thread re-creation.

2016-04-21  Dean Jackson  <dino@apple.com>

        Backdrop Filter should not be visible if element has visibility:hidden
        https://bugs.webkit.org/show_bug.cgi?id=149318
        <rdar://problem/22749780>

        Reviewed by Simon Fraser.

        Add the isHidden method to PlatformCALayerRemote.

        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::isHidden):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2016-04-21  Anders Carlsson  <andersca@apple.com>

        WKWebView HTML5 AppCache not working
        https://bugs.webkit.org/show_bug.cgi?id=156887
        rdar://problem/17944162

        Reviewed by Tim Horton.

        * Shared/WebPreferencesDefinitions.h:
        Set the offlineWebApplicationCacheEnabled property to true by default.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultDataStoreConfiguration):
        Set the default applicationCacheFlatFileSubdirectoryName to "Files".

2016-04-21  Anders Carlsson  <andersca@apple.com>

        Get rid of the last uses of ApplicationCacheStorage::singleton() from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=156876

        Reviewed by Tim Horton.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        Add and encode and decode a applicationCacheFlatFileSubdirectoryName.

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        Set m_applicationCacheFlatFileSubdirectoryName to "ApplicationCache".

        (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
        Set m_applicationCacheFlatFileSubdirectoryName to "Files".

        (API::ProcessPoolConfiguration::copy):
        Copy m_applicationCacheFlatFileSubdirectoryName.

        * UIProcess/API/APIProcessPoolConfiguration.h:
        Add getter for applicationCacheFlatFileSubdirectoryName.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration):
        Initialize applicationCacheFlatFileSubdirectoryName from the process pool configuration.

        (WebKit::WebProcessPool::createNewWebProcess):
        Initialize parameters.applicationCacheFlatFileSubdirectoryName. Remove a call to 
        ApplicationCacheStorage::singleton().setDefaultOriginQuota since it had no effect (it was called in the UI process).

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        Initialize m_applicationCacheFlatFileSubdirectoryName.

        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        Pass m_applicationCacheFlatFileSubdirectoryName when creating the application cache storage.

        * UIProcess/WebsiteData/WebsiteDataStore.h:
        Add new members.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        Set the application cache storage.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        Initialize the application cache storage.

        * WebProcess/WebProcess.h:
        (WebKit::WebProcess::applicationCacheStorage):
        Add new getter.

2016-04-21  Anders Carlsson  <andersca@apple.com>

        Remove two uses of ApplicationCacheStorage::singleton() from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=156873

        Reviewed by Beth Dakin.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::clearApplicationCache): Deleted.
        * WebProcess/WebProcess.h:

2016-04-21  Beth Dakin  <bdakin@apple.com>

        showCandidates() should take a range and the string should be the whole 
        paragraph
        https://bugs.webkit.org/show_bug.cgi?id=156813
        -and corresponding-
        rdar://problem/25760533

        Reviewed by Tim Horton.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::updateWebViewImplAdditions):
        (WebKit::WebViewImpl::showCandidates):
        (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
        (WebKit::WebViewImpl::handleRequestedCandidates):

2016-04-21  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Allow clients to hide the accessory view on a form input session
        https://bugs.webkit.org/show_bug.cgi?id=155574

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession accessoryViewShouldNotShow]): Getter for accessoryViewShouldNotShow.
        (-[WKFormInputSession setAccessoryViewShouldNotShow:]): Set accessoryViewShouldNotShow and reload input views.
        (-[WKContentView requiresAccessoryView]): If the accessory view should be not be shown, do not require
        the accessory view.

2016-04-21  Chris Dumez  <cdumez@apple.com>

        Drop [UsePointersEvenForNonNullableObjectArguments] from Range
        https://bugs.webkit.org/show_bug.cgi?id=156805

        Reviewed by Youenn Fablet.

        * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
        (-[WKDOMRange setStart:offset:]):
        (-[WKDOMRange setEnd:offset:]):
        (-[WKDOMRange selectNode:]):
        (-[WKDOMRange selectNodeContents:]):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::contentsAsString):

2016-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitWebView should claim the contents size as its natural size
        https://bugs.webkit.org/show_bug.cgi?id=156835

        Reviewed by Žan Doberšek.

        And keep claiming 0 as its minimum size since it's scrollable.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::didChangeContentSize): Call webkitWebViewBaseSetContentsSize().
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseGetPreferredWidth): Return the contents width as natural width.
        (webkitWebViewBaseGetPreferredHeight): Return the contents height as natural height.
        (webkit_web_view_base_class_init): Add implementations of get_preferred_width/height.
        (webkitWebViewBaseSetContentsSize): Save the contents size.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

2016-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitWebView should propagate wheel events not handled by the web process
        https://bugs.webkit.org/show_bug.cgi?id=156834

        Reviewed by Žan Doberšek.

        We are currently swallowing all wheel events unconditionally, not allowing applications to handle wheel events
        when not handled by us. Since the GTK+ event propagation system is synchronous, and our events are handled
        asynchronously, we need to do something similar to what we do for key events, not propagate the event the first
        time and if not handled by the web process, re-inject it in the event loop and then just propagate it.

        * Shared/NativeWebWheelEvent.h:
        (WebKit::NativeWebWheelEvent::nativeEvent): Remove useless const.
        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Tell the web view to propagate the next wheel event,
        and re-inject the event not handled by the web process in the event loop.
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseScrollEvent): Propagate the event if shouldForwardNextWheelEvent is true.
        (webkitWebViewBaseForwardNextWheelEvent): Set shouldForwardNextWheelEvent to true.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveEvent): Remove ifdef.
        * UIProcess/efl/WebView.h:

2016-04-20  Dustin Falgout  <dustin@falgout.us>

        [GTK] Expose AllowUniversalAccessFromFileURLs preference now that calling localStorage.getItem() results in SecurityError: DOM Exception 18
        
        Reviewed by Michael Catanzaro.
                
        As of r197858 JavaScript loaded in the context of a file scheme url cannot access local storage. That is a major 
        breaking change as many applications that serve files locally rely on having access to local storage. The point  
        of that security fix is to avoid cases of downloaded HTML content (such as e-mail attachments or JS injected
        into local contexts) from having access to your local file system and arbitrary local storage. If you are serving 
        local files in your applications, you can use the WebKitAllowUniversalAccessFromFileURLs preference key to tell 
        Webkit that you are approve of these kinds of interactions.
                                              
        https://bugs.webkit.org/show_bug.cgi?id=156651

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webKitSettingsSetProperty):
        (webKitSettingsGetProperty):
        (webkit_settings_class_init):
        (webkit_settings_get_allow_universal_access_from_file_urls):
        (webkit_settings_set_allow_universal_access_from_file_urls):
        * UIProcess/API/gtk/WebKitSettings.h:
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

2016-04-20  Brady Eidson  <beidson@apple.com>

        Modern IDB (Workers): Enable INDEXED_DATABASE_IN_WORKERS compile time flag, but disabled in RuntimeEnabledFeatures.
        https://bugs.webkit.org/show_bug.cgi?id=156782

        Reviewed by Alex Christensen.

        * Configurations/FeatureDefines.xcconfig:

2016-04-20  Brent Fulgham  <bfulgham@apple.com>

        [WK2][Mac][iOS] WebContent crash when using special file:// URI scheme @ WebKit::resolveSymlinksInPath(WTF::CString const&) + 159
        https://bugs.webkit.org/show_bug.cgi?id=156747
        <rdar://problem/24648176>

        Reviewed by Alexey Proskuryakov.

        FileSystemCF::fileSystemRepresentation return a null string when presented with a file URL that contains embedded nulls. When
        this happens, SandboxExtension::createHandle attempts to pass a null string to 'resolveSymlinksInPath', which attemps to call
        'strrchr' on the null pointer, causing a crash.

        Test: fast/url/file-uri-with-embedded-null-no-crash.html

        * Shared/mac/SandboxExtensionMac.mm:
        (WebKit::SandboxExtension::createHandle): If 'fileSystemRepresentation' is null, return early with an error.

2016-04-19  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build.

        * CMakeLists.txt:
        Don't compile a file that doesn't exist.
        * PlatformMac.cmake:
        Put the XPCServices in the right place.

2016-04-19  Chris Dumez  <cdumez@apple.com>

        Crash under WebKit::PluginView::pluginSnapshotTimerFired
        https://bugs.webkit.org/show_bug.cgi?id=156754
        <rdar://problem/22566764>

        Reviewed by Beth Dakin.

        Add null check for frame() before trying to access the frame settings,
        similarly to what is done earlier in this function. This fixes a top
        crasher.

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

2016-04-19  Dean Jackson  <dino@apple.com>

        New SPI to export a dictionary of runtime features
        https://bugs.webkit.org/show_bug.cgi?id=156645
        <rdar://problem/23621666>

        Reviewed by Anders Carlsson.

        Mark the new SPI as WK_MAC_TBA, WK_IOS_TBA.

        * UIProcess/API/Cocoa/_WKExperimentalFeature.h:

2016-04-19  Dean Jackson  <dino@apple.com>

        New SPI to export a dictionary of runtime features
        https://bugs.webkit.org/show_bug.cgi?id=156645
        <rdar://problem/23621666>

        Post commit follow-up. Darin gave review comments that
        I didn't address in my original commit - I was waiting
        on some advice.

        * UIProcess/WebPreferences.cpp:
        (WebKit::WebPreferences::isEnabledForFeature): Change the macro
        to generate a static list of function pointers, rather than
        a lot of conditional statements.
        (WebKit::WebPreferences::setEnabledForFeature): Ditto.

2016-04-19  Chris Dumez  <cdumez@apple.com>

        Mark more classes as WTF_MAKE_FAST_ALLOCATED
        https://bugs.webkit.org/show_bug.cgi?id=156732

        Reviewed by Darin Adler.

        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
        * Shared/API/Cocoa/RemoteObjectInvocation.h:

2016-04-19  Alex Christensen  <achristensen@webkit.org>

        Build fix.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob):
        result is unused.

2016-04-19  Brady Eidson  <beidson@apple.com>

        Modern IDB: ObjectStore Blob Support.
        https://bugs.webkit.org/show_bug.cgi?id=143193

        Reviewed by Alex Christensen.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Don't ASSERT that
          this is the first we've heard of this path - The Connection now remembers all extensions.
        (WebKit::NetworkConnectionToWebProcess::getBlobDataFileReferenceForPath): Don't take - Just get.

2016-04-19  Antti Koivisto  <antti@apple.com>

        Try to fix iOS build.

        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:

2016-04-19  Commit Queue  <commit-queue@webkit.org>

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

        It broke all EFL layout tests (Requested by KaL on #webkit).

        Reverted changeset:

        "[UNIX] Initialize WebKit before the platform initializations"
        https://bugs.webkit.org/show_bug.cgi?id=156622
        http://trac.webkit.org/changeset/199658

2016-04-18  Alex Christensen  <achristensen@webkit.org>

        Build fix after r199700

        * PlatformMac.cmake:

2016-04-18  Brady Eidson  <beidson@apple.com>

        Modern IDB (Blob support): When reading Blobs from the database, grant the Networking process sandbox access to the files.
        https://bugs.webkit.org/show_bug.cgi?id=156640

        Reviewed by Alex Christensen.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles): Utility function to ask the UI process for
          SandboxExtensions for a list of files.
        (WebKit::DatabaseProcess::didGetSandboxExtensionsForBlobFiles): Take the SandboxExtensions from the UI process
          and pass them along to the completion handler.
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didGetRecord): If the value returned from the database doesn't have Blob files,
          pass the result directly on to WebCore. If it does, ask the UI process for SandboxExtensions first.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked): Grab the BlobDataFileReference from the 
          NetworkConnectionToWebProcess to pass along to the BlobRegistry.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::preregisterSandboxExtensionsForOptionallyFileBackedBlob): Add this message
          so the WebProcess can preflight the creation of some blob URLs by passing along the SandboxExtensions for their files.
        (WebKit::NetworkConnectionToWebProcess::takeBlobDataFileReferenceForPath):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:

        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::getSandboxExtensionsForBlobFiles): Create SandboxExtensions for the passed in files and
          return them to the DatabaseProcess.
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Databases/DatabaseProcessProxy.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::didGetRecordWithSandboxExtensions): New form of "didGetRecord" that handles passing
          the SandboxExtensions to the Networking process before they are needed.
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

2016-04-18  Dean Jackson  <dino@apple.com>

        New SPI to export a dictionary of runtime features
        https://bugs.webkit.org/show_bug.cgi?id=156645
        <rdar://problem/23621666>

        Trying to fix GTK and EFL builds. I forgot to add files
        to CMake.

        * CMakeLists.txt:
        * PlatformMac.cmake:

2016-04-18  Dean Jackson  <dino@apple.com>

        New SPI to export a dictionary of runtime features
        https://bugs.webkit.org/show_bug.cgi?id=156645
        <rdar://problem/23621666>

        Reviewed by Darin Adler.

        Add a new type of Preference for experimental features so that we
        can dynamically toggle them from a WebKit2 host. These are special
        keys that are tied to runtime flags. The host process can ask WebKit
        for the list of keys, each with a small description, in order to
        display UI.

        - Add HumanReadableName and HumanReadableDescription parameters to our
          macros, which are used when building a ExperimentalFeature.
          These are both empty strings for the existing preferences. At some
          point we should probably move all this to code generation rather
          than macros, so that we don't have to carry around unused parameters.

        - I've included two sample experimental features: WebGL2 and ShadowDOM.
          They are not actually hooked up to the runtime settings yet, but its
          pretty clear how that will happen. Note that these are new preferences
          that have an "Experimental" prefix. This is so toggling an experimental
          feature to off won't cause the feature to not work once it becomes
          stable enough to enable by default. In other words, when it moves
          out of the experimental stage, the experimental feature flag will be
          removed, and you'll no longer check for values with that key.

        - The ExperimentalFeature object is what the host process
          will read in order to show some UI. It contains the human readable info,
          as well as the actual key that can be used to query and toggle the
          experimental feature.

        * Shared/API/APIObject.h: Add the ExperimentalFeature.

        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject): Exposes a wrapper around a _WKExperimentalFeature ObjC type.

        * Shared/WebPreferencesDefinitions.h: Change all the existing macros to take the new
        parameters, and add the initial experimental keys.

        * Shared/WebPreferencesKeys.cpp: Add new parameters to existing macros.
        * Shared/WebPreferencesKeys.h: Ditto.
        * Shared/WebPreferencesStore.cpp: Ditto.
        (WebKit::defaults):

        * UIProcess/API/APIExperimentalFeature.cpp: The API side of the ExperimentalFeature.
        (API::ExperimentalFeature::create):
        (API::ExperimentalFeature::ExperimentalFeature):
        (API::ExperimentalFeature::~ExperimentalFeature):
        * UIProcess/API/APIExperimentalFeature.h:

        * UIProcess/API/Cocoa/WKPreferences.mm: The actual implementation of the SPI.
        (+[WKPreferences _experimentalFeatures]): Create and return a list of feature descriptors.
        (-[WKPreferences _isEnabledForFeature:]): Get the value.
        (-[WKPreferences _setEnabled:forFeature:]): Set the value.
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:

        * UIProcess/API/Cocoa/_WKExperimentalFeature.h: The ObjC version.
        * UIProcess/API/Cocoa/_WKExperimentalFeature.mm:
        (-[_WKExperimentalFeature dealloc]):
        (-[_WKExperimentalFeature description]):
        (-[_WKExperimentalFeature name]):
        (-[_WKExperimentalFeature key]):
        (-[_WKExperimentalFeature details]):
        (-[_WKExperimentalFeature _apiObject]):
        * UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h: Implementation of the wrapper.
        (WebKit::wrapper):

        * UIProcess/WebPreferences.cpp: The C++ implementation that provides the data for the ObjC API.
        (WebKit::globalExperimentalFeatures):
        (WebKit::WebPreferences::ExperimentalFeatures):
        (WebKit::WebPreferences::isEnabledForFeature):
        (WebKit::WebPreferences::setEnabledForFeature):
        * UIProcess/WebPreferences.h:

        * UIProcess/mac/WebPreferencesMac.mm: Update some macros.
        (WebKit::WebPreferences::platformInitializeStore):
        * WebProcess/WebPage/WebPage.cpp: Ditto
        (WebKit::WebPage::updatePreferences):

        * WebKit2.xcodeproj/project.pbxproj: Add the new files.

2016-04-18  Tim Horton  <timothy_horton@apple.com>

        Swipe view gesture should be reversed in right-to-left contexts
        https://bugs.webkit.org/show_bug.cgi?id=156714

        Reviewed by Anders Carlsson.

        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/PageClient.h:
        * UIProcess/UserInterfaceLayoutDirection.h: Added.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::userInterfaceLayoutDirection):
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
        Plumb RTL-ness through to WebPageProxy.
        We look at the WK(Web)View's UI layout direction.
        For other platforms, we just assume LTR.

        * UIProcess/mac/ViewGestureController.h:
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
        Decide which way to swipe (and which way to look for back-forward items)
        based on the WebPageProxy's reported RTLness.

        (WebKit::ViewGestureController::isPhysicallySwipingLeft):
        "Back" means "swiping left" in LTR and "swiping right" in RTL.

        (WebKit::ViewGestureController::trackSwipeGesture):
        (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
        (WebKit::ViewGestureController::beginSwipeGesture):
        (WebKit::ViewGestureController::handleSwipeGesture):
        Make things that were equating "back" with "left" instead check isPhysicallySwipingLeft.

2016-04-18  Anders Carlsson  <andersca@apple.com>

        Fix build with newer versions of clang.
        rdar://problem/25749769

        * UIProcess/Cocoa/WebViewImpl.mm:
        * UIProcess/mac/WebPageProxyMac.mm:
        Forward declare some AppKit IPI.

2016-04-18  Tina Liu  <iting_liu@apple.com>

        Implement functions to set plug-in load policies for private browsing mode
        https://bugs.webkit.org/show_bug.cgi?id=156540

        Reviewed by Anders Carlsson.

        This patch implements API and wrappers for clients to set policies to use when using
        private browsing. WebPlatformStrategies would return which policies to use depending
        on whether the page is in private browsing mode.

        * Shared/WebProcessCreationParameters.h:
        Add a hash map for plug-in load policies for private browsing.
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextSetPrivateBrowsingPluginLoadClientPolicy):
        Add a wrapper.

        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        Set the WebProcessCreationParameters's pluginLoadClientPoliciesForPrivateBrowsing.
        (WebKit::WebProcessPool::setPluginLoadClientPolicyForBrowsingMode):
        A helper function that sets plug-in policies to the corresponding instance variable:
        m_pluginLoadClientPolicies for general browsing and m_pluginLoadClientPoliciesForPrivateBrowsing
        for private browsing. The logic is extracted from the original setPluginLoadClientPolicy.
        While we are here, get rid of the .contains() lookup as .get() will just return a
        constructed object if the key is not found.
        (WebKit::WebProcessPool::setPluginLoadClientPolicy):
        Switch to use the helper function to set policies.
        (WebKit::WebProcessPool::setPrivateBrowsingPluginLoadClientPolicy):
        Ditto. Also send a message to the WebProcess for setting policies for private browsing.
        (WebKit::WebProcessPool::clearPluginClientPolicies):
        Clear plug-ins' private browsing policies.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicyForBrowsingMode):
        Ditto as WebProcessPool::setPluginLoadClientPolicyForBrowsingMode.
        (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
        Switch to use setPluginLoadClientPolicyForBrowsingMode to set policies.
        (WebKit::WebPlatformStrategies::setPrivateBrowsingPluginLoadClientPolicy):
        Use setPluginLoadClientPolicyForBrowsingMode to set policies for private browsing.
        (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
        Clear plug-ins' private browsing policies.
        (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
        Add an argument for private browsing. Read from the corresponding ivar.
        (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
        Ditto.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost): Deleted.
        Renamed this function as pluginLoadClientPolicyForHostForBrowsingMode.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHostForBrowsingMode):
        Ditto.
        (WebKit::WebPlatformStrategies::populatePluginCache):
        Get the plug-in load policies for a specific host based on the page's session status. If the page
        is using ephemeral session, use the private browsing policies.

        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        Switch to call the helper function setPluginLoadClientPolicyFromCreationParameters.
        (WebKit::WebProcess::setPluginLoadClientPolicies):
        Logic moved from initializeWebProcess. Call PluginStrategy::setPluginLoadClientPolicy or
        PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy depending on the input argument.
        (WebKit::WebProcess::setPrivateBrowsingPluginLoadClientPolicy):
        Add a wrapper to call PluginStrategy::setPrivateBrowsingPluginLoadClientPolicy.

        * WebProcess/WebProcess.messages.in:
        Declare an entry for setPrivateBrowsingPluginLoadClientPolicy.

2016-04-18  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Only adjust network responses' MIME type for QuickLook in the context of a main resource load
        https://bugs.webkit.org/show_bug.cgi?id=156639
        <rdar://problem/25765848>

        Reviewed by Alex Christensen.

        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::firstRequest):
        Add getter to return the first request.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        Pass flag to adjustMIMETypeIfNecessary() indicated if this is a main resource load.

2016-04-18  Brian Burg  <bburg@apple.com>

        Web Automation: provide detailed error messages when an automation command fails
        https://bugs.webkit.org/show_bug.cgi?id=156635
        <rdar://problem/25754051>

        Reviewed by Darin Adler and Timothy Hatcher.

        Fill in lots of missing error message details now that the remote end knows
        how to parse error strings with predefined error names and details.

        * UIProcess/Automation/WebAutomationSession.cpp:
        Rearrange the error message macros. Make it possible to pass a ErrorMessage
        variable or just the enum value name and get out an encoded error message
        that optionally includes a free-form details string. The predefined error
        name and the details string are joined together with a semicolon.

        (WebKit::WebAutomationSession::getBrowsingContext):
        (WebKit::WebAutomationSession::createBrowsingContext):
        (WebKit::WebAutomationSession::closeBrowsingContext):
        (WebKit::WebAutomationSession::switchToBrowsingContext):
        (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
        (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
        (WebKit::WebAutomationSession::navigateBrowsingContext):
        (WebKit::WebAutomationSession::goBackInBrowsingContext):
        (WebKit::WebAutomationSession::goForwardInBrowsingContext):
        (WebKit::WebAutomationSession::reloadBrowsingContext):
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
        (WebKit::WebAutomationSession::didEvaluateJavaScriptFunction):
        (WebKit::WebAutomationSession::resolveChildFrameHandle):
        (WebKit::WebAutomationSession::didResolveChildFrame):
        (WebKit::WebAutomationSession::resolveParentFrameHandle):
        (WebKit::WebAutomationSession::didResolveParentFrame):
        (WebKit::WebAutomationSession::computeElementLayout):
        (WebKit::WebAutomationSession::didComputeElementLayout):
        (WebKit::WebAutomationSession::isShowingJavaScriptDialog):
        (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
        (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
        (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
        (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
        (WebKit::WebAutomationSession::getAllCookies):
        (WebKit::WebAutomationSession::didGetCookiesForFrame):
        (WebKit::WebAutomationSession::deleteSingleCookie):
        (WebKit::WebAutomationSession::didDeleteCookie):
        (WebKit::WebAutomationSession::addSingleCookie):
        (WebKit::WebAutomationSession::deleteAllCookies):
        (WebKit::WebAutomationSession::performMouseInteraction):
        (WebKit::WebAutomationSession::performKeyboardInteractions):
        (WebKit::WebAutomationSession::takeScreenshot):
        (WebKit::WebAutomationSession::didTakeScreenshot):
        Audit almost all early exits and provide a relevant error details message
        if the error itself is ambiguous. Make sure to format asynchronous errors.

2016-04-18  Brent Fulgham  <bfulgham@apple.com>

        CSP: Remove stubs for dynamically-added favicons (via link rel="icon")
        https://bugs.webkit.org/show_bug.cgi?id=153151
        <rdar://problem/24383176>

        Reviewed by Darin Adler.

        Remove the unused dynamic favicon code and tests.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons): Deleted.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2016-04-18  Jer Noble  <jer.noble@apple.com>

        REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
        https://bugs.webkit.org/show_bug.cgi?id=156648

        Reviewed by Darin Adler.

        Follow up patch to r199615; avoid a double hash lookup by using a .find() pattern instead of
        .contains() & .get().

        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager):
        (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):

2016-04-18  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r199644.

        Seems to have caused a 1-2% regression on warm PLT

        Reverted changeset:

        "[WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess"
        https://bugs.webkit.org/show_bug.cgi?id=156639
        http://trac.webkit.org/changeset/199644

2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Pending API Request URL is wrong after reloading
        https://bugs.webkit.org/show_bug.cgi?id=139342

        Reviewed by Darin Adler.

        It happens when reloading a web view loaded with anything but a
        URL, because the bf list is not updated for those cases and
        WebPageProxy::reload() is setting the current bf list item URL as
        pending API request URL. This also causes that progress is
        reported wrongly, because
        WebPageProxy::decidePolicyForNavigationAction() resets the pending
        API request URL when it's different than the requested URL. The
        page load transaction causes the progress to be changed, reporting
        1.0 (the previous one), but later something < 1.0 is reported
        again by the progress tracker.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reload): Use the current active URL as
        pending API request URL, falling back to the current bf list item
        URL when empty.

2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Pending API request URL no set when loading Data, Alternate HTML or plain text
        https://bugs.webkit.org/show_bug.cgi?id=136916

        Reviewed by Darin Adler.

        Set pending API request URL for all load methods in
        WebPageProxy. This ensures that right after calling those methods,
        the active URL is the requested one and that
        PageLoadState::isLoading() returns true.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadAlternateHTMLString):
        (WebKit::WebPageProxy::loadPlainTextString):
        (WebKit::WebPageProxy::loadWebArchiveData):

2016-04-18  Commit Queue  <commit-queue@webkit.org>

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

        It broke the iOS build (Requested by KaL on #webkit).

        Reverted changeset:

        "Pending API request URL no set when loading Data, Alternate
        HTML or plain text"
        https://bugs.webkit.org/show_bug.cgi?id=136916
        http://trac.webkit.org/changeset/199660

2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Pending API request URL no set when loading Data, Alternate HTML or plain text
        https://bugs.webkit.org/show_bug.cgi?id=136916

        Reviewed by Darin Adler.

        Set pending API request URL for all load methods in
        WebPageProxy. This ensures that right after calling those methods,
        the active URL is the requested one and that
        PageLoadState::isLoading() returns true.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadAlternateHTMLString):
        (WebKit::WebPageProxy::loadPlainTextString):
        (WebKit::WebPageProxy::loadWebArchiveData):

2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [UNIX] Initialize WebKit before the platform initializations
        https://bugs.webkit.org/show_bug.cgi?id=156622

        Reviewed by Michael Catanzaro.

        The platform specific initialization might use something that would require WebKit2 to be initialized. For
        example, in debug mode, the GTK+ port uses WTF::sleep that requires the threading to be initialized.

        * Shared/unix/ChildProcessMain.h:
        (WebKit::ChildProcessMain): Move InitializeWebKit2() before platformInitialize().

2016-04-18  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        Fix incorrect assumption that APPLE implies Mac.
        https://bugs.webkit.org/show_bug.cgi?id=156679

        Addresses build failure introduced in r198947

        Reviewed by Alex Christensen.

        * CMakeLists.txt:

2016-04-17  Yoav Weiss  <yoav@yoav.ws>

        Initial Link preload support
        https://bugs.webkit.org/show_bug.cgi?id=156334

        Reviewed by Darin Adler.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type.

2016-04-17  Chris Dumez  <cdumez@apple.com>

        [WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=156639

        Reviewed by Darin Adler.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResponse):
        Move checks for main resource load and for MIME type inside of
        QuickLookHandle::createIfNecessary(), for consistency with the
        other QuickLookHandle factory functions.

2016-04-16  Dan Bernstein  <mitz@apple.com>

        [Mac] Web Content service with a restricted entitlement may load arbitrary dylibs
        https://bugs.webkit.org/show_bug.cgi?id=156668
        <rdar://problem/25429784>

        Reviewed by Anders Carlsson.

        * Configurations/WebContentService.xcconfig: Enable library validation when the Web Content
          service is given the XPC domain extension entitlement.

2016-04-15  Dan Bernstein  <mitz@apple.com>

        [Mac] WebContent, Networking and Databases services have i386 slices that are never used
        https://bugs.webkit.org/show_bug.cgi?id=156654

        Reviewed by Alexey Proskuryakov.

        * Configurations/BaseXPCService.xcconfig: Set VALID_ARCHS to ARCHS_STANDARD when not building only
          for the active architecture.
        * Configurations/PluginService.32.xcconfig: Removed now-redundant definitions.
        * Configurations/PluginService.64.xcconfig: Ditto.

2016-04-15  Sam Weinig  <sam@webkit.org>

        Need a way to specify a script name to show in the inspector for scripts injected via WKUserScript
        <rdar://problem/25626662>
        https://bugs.webkit.org/show_bug.cgi?id=156653

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKUserScript.mm:
        (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
        * UIProcess/API/Cocoa/WKUserScriptPrivate.h:
        Add a new initializer that takes an associate URL that is used to represent the user script.

2016-04-15  Darin Adler  <darin@apple.com>

        Reduce use of Deprecated::ScriptXXX classes
        https://bugs.webkit.org/show_bug.cgi?id=156632

        Reviewed by Alex Christensen.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::performJavaScriptURLRequest): Use JSValue.
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::windowObjectCleared): Use references.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame): Use JSValue.

2016-04-15  Jer Noble  <jer.noble@apple.com>

        REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
        https://bugs.webkit.org/show_bug.cgi?id=156648
        <rdar://problem/25758117>

        Reviewed by Beth Dakin.

        Mistakenly checked in a reversed condition check, which causes a subsequent assert and crash.

        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
        (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):

2016-04-15  Chris Dumez  <cdumez@apple.com>

        Mark NetworkLoad as FastAllocated
        https://bugs.webkit.org/show_bug.cgi?id=156628

        Reviewed by Alex Christensen.

        Mark NetworkLoad as FastAllocated for performance.

        * NetworkProcess/NetworkLoad.h:

2016-04-14  Jer Noble  <jer.noble@apple.com>

        Allow WebVideoFullscreenManager and Proxy to be used by audio elements.
        https://bugs.webkit.org/show_bug.cgi?id=156564

        Reviewed by Beth Dakin.

        Tease apart WebVideoFullscreenManager and …Proxy into WebPlaybackSessionManager and …Proxy
        classes dealing exclusively with playback state and commands, leaving fullscreen state and
        commands in the WebVideoFullscreenManager… classes.

        WebVideoFullscreenManager and …Proxy will now require an associated
        WebPlaybackSessionManager and …Proxy class. The WebPlaybackSessionManager classes can be
        used separately and without the WebVideoFullscreenManager classes.

        * DerivedSources.make:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h: Copied from Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h.
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in: Copied from Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in.
        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: Added.
        (WebKit::WebPlaybackSessionModelContext::play):
        (WebKit::WebPlaybackSessionModelContext::pause):
        (WebKit::WebPlaybackSessionModelContext::togglePlayState):
        (WebKit::WebPlaybackSessionModelContext::beginScrubbing):
        (WebKit::WebPlaybackSessionModelContext::endScrubbing):
        (WebKit::WebPlaybackSessionModelContext::seekToTime):
        (WebKit::WebPlaybackSessionModelContext::fastSeek):
        (WebKit::WebPlaybackSessionModelContext::beginScanningForward):
        (WebKit::WebPlaybackSessionModelContext::beginScanningBackward):
        (WebKit::WebPlaybackSessionModelContext::endScanning):
        (WebKit::WebPlaybackSessionModelContext::selectAudioMediaOption):
        (WebKit::WebPlaybackSessionModelContext::selectLegibleMediaOption):
        (WebKit::WebPlaybackSessionManagerProxy::create):
        (WebKit::WebPlaybackSessionManagerProxy::WebPlaybackSessionManagerProxy):
        (WebKit::WebPlaybackSessionManagerProxy::~WebPlaybackSessionManagerProxy):
        (WebKit::WebPlaybackSessionManagerProxy::invalidate):
        (WebKit::WebPlaybackSessionManagerProxy::createModelAndInterface):
        (WebKit::WebPlaybackSessionManagerProxy::ensureModelAndInterface):
        (WebKit::WebPlaybackSessionManagerProxy::ensureModel):
        (WebKit::WebPlaybackSessionManagerProxy::ensureInterface):
        (WebKit::WebPlaybackSessionManagerProxy::addClientForContext):
        (WebKit::WebPlaybackSessionManagerProxy::removeClientForContext):
        (WebKit::WebPlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID):
        (WebKit::WebPlaybackSessionManagerProxy::clearPlaybackControlsManager):
        (WebKit::WebPlaybackSessionManagerProxy::resetMediaState):
        (WebKit::WebPlaybackSessionManagerProxy::setCurrentTime):
        (WebKit::WebPlaybackSessionManagerProxy::setBufferedTime):
        (WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):
        (WebKit::WebPlaybackSessionManagerProxy::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManagerProxy::setExternalPlaybackProperties):
        (WebKit::WebPlaybackSessionManagerProxy::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManagerProxy::setDuration):
        (WebKit::WebPlaybackSessionManagerProxy::setRate):
        (WebKit::WebPlaybackSessionManagerProxy::play):
        (WebKit::WebPlaybackSessionManagerProxy::pause):
        (WebKit::WebPlaybackSessionManagerProxy::togglePlayState):
        (WebKit::WebPlaybackSessionManagerProxy::beginScrubbing):
        (WebKit::WebPlaybackSessionManagerProxy::endScrubbing):
        (WebKit::WebPlaybackSessionManagerProxy::seekToTime):
        (WebKit::WebPlaybackSessionManagerProxy::fastSeek):
        (WebKit::WebPlaybackSessionManagerProxy::beginScanningForward):
        (WebKit::WebPlaybackSessionManagerProxy::beginScanningBackward):
        (WebKit::WebPlaybackSessionManagerProxy::endScanning):
        (WebKit::WebPlaybackSessionManagerProxy::selectAudioMediaOption):
        (WebKit::WebPlaybackSessionManagerProxy::selectLegibleMediaOption):
        (WebKit::WebPlaybackSessionManagerProxy::controlsManagerInterface):
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
        (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
        (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::selectAudioMediaOption):
        (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
        (WebKit::WebVideoFullscreenManagerProxy::create):
        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
        (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): Deleted.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::playbackSessionManager):
        (WebKit::WebPageProxy::videoFullscreenManager):
        (WebKit::WebPageProxy::resetState):
        (WebKit::WebPageProxy::hasActiveVideoForControlsManager):
        (WebKit::WebPageProxy::isPlayingMediaDidChange): Deleted.
        * UIProcess/WebPageProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::supportsVideoFullscreen):
        (WebKit::WebChromeClient::setUpPlaybackControlsManager):
        (WebKit::WebChromeClient::clearPlaybackControlsManager):
        (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement):
        (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement):
        (WebKit::WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::playbackSessionManager):
        (WebKit::WebPage::videoFullscreenManager):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/cocoa/WebPlaybackSessionManager.h: Copied from Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h.
        (WebKit::WebPlaybackSessionInterfaceContext::create):
        (WebKit::WebPlaybackSessionInterfaceContext::invalidate):
        * WebProcess/cocoa/WebPlaybackSessionManager.messages.in: Added.
        * WebProcess/cocoa/WebPlaybackSessionManager.mm: Added.
        (WebKit::nextContextId):
        (WebKit::WebPlaybackSessionInterfaceContext::WebPlaybackSessionInterfaceContext):
        (WebKit::WebPlaybackSessionInterfaceContext::~WebPlaybackSessionInterfaceContext):
        (WebKit::WebPlaybackSessionInterfaceContext::resetMediaState):
        (WebKit::WebPlaybackSessionInterfaceContext::setDuration):
        (WebKit::WebPlaybackSessionInterfaceContext::setCurrentTime):
        (WebKit::WebPlaybackSessionInterfaceContext::setBufferedTime):
        (WebKit::WebPlaybackSessionInterfaceContext::setRate):
        (WebKit::WebPlaybackSessionInterfaceContext::setSeekableRanges):
        (WebKit::WebPlaybackSessionInterfaceContext::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionInterfaceContext::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionInterfaceContext::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionInterfaceContext::setExternalPlayback):
        (WebKit::WebPlaybackSessionInterfaceContext::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManager::create):
        (WebKit::WebPlaybackSessionManager::WebPlaybackSessionManager):
        (WebKit::WebPlaybackSessionManager::~WebPlaybackSessionManager):
        (WebKit::WebPlaybackSessionManager::createModelAndInterface):
        (WebKit::WebPlaybackSessionManager::ensureModelAndInterface):
        (WebKit::WebPlaybackSessionManager::ensureModel):
        (WebKit::WebPlaybackSessionManager::ensureInterface):
        (WebKit::WebPlaybackSessionManager::removeContext):
        (WebKit::WebPlaybackSessionManager::addClientForContext):
        (WebKit::WebPlaybackSessionManager::removeClientForContext):
        (WebKit::WebPlaybackSessionManager::setUpPlaybackControlsManager):
        (WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
        (WebKit::WebPlaybackSessionManager::contextIdForMediaElement):
        (WebKit::WebPlaybackSessionManager::resetMediaState):
        (WebKit::WebPlaybackSessionManager::setDuration):
        (WebKit::WebPlaybackSessionManager::setCurrentTime):
        (WebKit::WebPlaybackSessionManager::setBufferedTime):
        (WebKit::WebPlaybackSessionManager::setRate):
        (WebKit::WebPlaybackSessionManager::setSeekableRanges):
        (WebKit::WebPlaybackSessionManager::setCanPlayFastReverse):
        (WebKit::WebPlaybackSessionManager::setAudioMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManager::setLegibleMediaSelectionOptions):
        (WebKit::WebPlaybackSessionManager::setExternalPlayback):
        (WebKit::WebPlaybackSessionManager::setWirelessVideoPlaybackDisabled):
        (WebKit::WebPlaybackSessionManager::play):
        (WebKit::WebPlaybackSessionManager::pause):
        (WebKit::WebPlaybackSessionManager::togglePlayState):
        (WebKit::WebPlaybackSessionManager::beginScrubbing):
        (WebKit::WebPlaybackSessionManager::endScrubbing):
        (WebKit::WebPlaybackSessionManager::seekToTime):
        (WebKit::WebPlaybackSessionManager::fastSeek):
        (WebKit::WebPlaybackSessionManager::beginScanningForward):
        (WebKit::WebPlaybackSessionManager::beginScanningBackward):
        (WebKit::WebPlaybackSessionManager::endScanning):
        (WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
        (WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        (WebKit::WebVideoFullscreenInterfaceContext::create):
        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
        (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
        (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
        (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
        (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
        (WebKit::WebVideoFullscreenInterfaceContext::setRate):
        (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
        (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
        (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
        (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
        (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
        (WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled):
        (WebKit::WebVideoFullscreenManager::create):
        (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
        (WebKit::WebVideoFullscreenManager::createModelAndInterface):
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
        (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions): Deleted.
        (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Deleted.
        (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Deleted.
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation): Deleted.
        (WebKit::WebVideoFullscreenManager::setVideoDimensions): Deleted.
        (WebKit::WebVideoFullscreenManager::requestFullscreenMode): Deleted.
        (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Deleted.
        (WebKit::WebVideoFullscreenManager::didSetupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManager::didExitFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum): Deleted.
        (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline): Deleted.
        (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): Deleted.

2016-04-15  John Wilander  <wilander@apple.com>

        Refactor WebSockets handshake to use StringView instead of String for header validation.
        https://bugs.webkit.org/show_bug.cgi?id=155602

        Reviewed by Darin Adler.

        * UIProcess/InspectorServer/HTTPRequest.cpp:
        (WebKit::HTTPRequest::parseHeaders):
            Now declares the HTTP header name as a StringView to match the change in WebCore::parseHTTPHeader.

2016-04-15  Alex Christensen  <achristensen@webkit.org>

        Don't copy entire NSURLSessionConfiguration just to test for credentials
        https://bugs.webkit.org/show_bug.cgi?id=156598

        Reviewed by Brady Eidson.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate initWithNetworkSession:withCredentials:]):
        (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        (WebKit::NetworkSession::NetworkSession):
        (-[WKNetworkSessionDelegate initWithNetworkSession:]): Deleted.

2016-04-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ build after r199558.

        * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
        (webkitFileChooserRequestCreate):
        (webkit_file_chooser_request_select_files):
        * UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h:
        * UIProcess/API/gtk/WebKitUIClient.cpp:

2016-04-14  Brent Fulgham  <bfulgham@apple.com>

        Make <a download> a runtime enabled option
        https://bugs.webkit.org/show_bug.cgi?id=156583
        <rdar://problem/25733449>

        Reviewed by Alex Christensen.

        Add a download attribute runtime flag based on preferences.
        Disable the download attribute by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesGetFetchAPIEnabled):
        (WKPreferencesSetDownloadAttributeEnabled):
        (WKPreferencesGetDownloadAttributeEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-04-14  Alex Christensen  <achristensen@webkit.org>

        Build fix after r199554.

        * CMakeLists.txt:
        * PlatformMac.cmake:

2016-04-14  Brian Burg  <bburg@apple.com>

        Web Automation: suppress automatic text correction in pages controlled by automation
        https://bugs.webkit.org/show_bug.cgi?id=156599
        <rdar://problem/25712646>

        Reviewed by Timothy Hatcher.

        If the page is controlled by automation, then automatic text corrections will
        cause unexpected behaviors by nondeterministically modifying text inserted by
        a test. Just pretend these behaviors are disabled if controlled by automation.

        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
        (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
        (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
        (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):

2016-04-14  Anders Carlsson  <andersca@apple.com>

        Try to fix the Yosemite build.

        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::runOpenPanel):

2016-04-14  Anders Carlsson  <andersca@apple.com>

        [Mac] Add API for open panel handling to WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=137759
        rdar://problem/23278623

        Reviewed by Tim Horton.

        Based on a patch by Brian Michel.

        * Shared/API/Cocoa/WebKit.h:
        Import WKOpenPanelParameters.h.

        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):
        Create a WKOpenPanelParameters for Type::OpenPanelParameters.

        * UIProcess/API/APIOpenPanelParameters.cpp: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.cpp.
        * UIProcess/API/APIOpenPanelParameters.h: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.h.
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::runOpenPanel):
        Change this to take a SecurityOriginData.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
        (WKOpenPanelParametersGetTypeID):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/API/C/WKOpenPanelResultListener.cpp:
        (filePathsFromFileURLs):
        (WKOpenPanelResultListenerChooseFiles):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/API/Cocoa/WKOpenPanelParameters.h: Added.
        * UIProcess/API/Cocoa/WKOpenPanelParameters.mm: Added.
        (-[WKOpenPanelParameters allowsMultipleSelection]):
        (-[WKOpenPanelParameters _apiObject]):
        * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
        Add a WKOpenPanelParameters class which contains information about a file upload control.

        * UIProcess/API/Cocoa/WKUIDelegate.h:
        Add new delegate method.

        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::setDelegate):
        Record whether the UI delegate implements the new delegate method.

        (WebKit::UIDelegate::UIClient::runOpenPanel):
        Invoke the new delegate method.

        * UIProcess/PageClient.h:
        (WebKit::PageClient::handleRunOpenPanel):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/WebOpenPanelResultListenerProxy.cpp:
        (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
        * UIProcess/WebOpenPanelResultListenerProxy.h:
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::runOpenPanel):
        * UIProcess/WebPageProxy.h:
        Change this to take a SecurityOriginData.

        * UIProcess/WebPageProxy.messages.in:
        Change RunOpenPanel to take a SecurityOriginData.

        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::handleRunOpenPanel):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _showRunOpenPanel:resultListener:]):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/ios/forms/WKFileUploadPanel.h:
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new file.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::runOpenPanel):
        Pass the security origin of the frame along.

2016-04-14  Jiewen Tan  <jiewen_tan@apple.com>

        Unreviewed, rolling out r199554.

        The change breaks Yosemite Release/Debug build

        Reverted changeset:

        "[Mac] Add API for open panel handling to WKWebView"
        https://bugs.webkit.org/show_bug.cgi?id=137759
        http://trac.webkit.org/changeset/199554

2016-04-14  Anders Carlsson  <andersca@apple.com>

        [Mac] Add API for open panel handling to WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=137759
        rdar://problem/23278623

        Reviewed by Tim Horton.

        Based on a patch by Brian Michel.

        * Shared/API/Cocoa/WebKit.h:
        Import WKOpenPanelParameters.h.

        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject):
        Create a WKOpenPanelParameters for Type::OpenPanelParameters.

        * UIProcess/API/APIOpenPanelParameters.cpp: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.cpp.
        * UIProcess/API/APIOpenPanelParameters.h: Renamed from Source/WebKit2/Shared/WebOpenPanelParameters.h.
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::runOpenPanel):
        Change this to take a SecurityOriginData.

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
        (WKOpenPanelParametersGetTypeID):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/API/C/WKOpenPanelResultListener.cpp:
        (filePathsFromFileURLs):
        (WKOpenPanelResultListenerChooseFiles):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/API/Cocoa/WKOpenPanelParameters.h: Added.
        * UIProcess/API/Cocoa/WKOpenPanelParameters.mm: Added.
        (-[WKOpenPanelParameters allowsMultipleSelection]):
        (-[WKOpenPanelParameters _apiObject]):
        * UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
        Add a WKOpenPanelParameters class which contains information about a file upload control.

        * UIProcess/API/Cocoa/WKUIDelegate.h:
        Add new delegate method.

        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::setDelegate):
        Record whether the UI delegate implements the new delegate method.

        (WebKit::UIDelegate::UIClient::runOpenPanel):
        Invoke the new delegate method.

        * UIProcess/PageClient.h:
        (WebKit::PageClient::handleRunOpenPanel):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/WebOpenPanelResultListenerProxy.cpp:
        (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
        * UIProcess/WebOpenPanelResultListenerProxy.h:
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::runOpenPanel):
        * UIProcess/WebPageProxy.h:
        Change this to take a SecurityOriginData.

        * UIProcess/WebPageProxy.messages.in:
        Change RunOpenPanel to take a SecurityOriginData.

        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::handleRunOpenPanel):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _showRunOpenPanel:resultListener:]):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        * UIProcess/ios/forms/WKFileUploadPanel.h:
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
        Change chooseFiles to take a Vector<String> instead of an API::Array of URLs.

        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
        Rename WebKit::WebOpenPanelParameters to API::OpenPanelParameters.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new file.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::runOpenPanel):
        Pass the security origin of the frame along.

2016-04-14  Alex Christensen  <achristensen@webkit.org>

        Fix build without IndexedDB.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        (WebKit::DatabaseProcess::grantSandboxExtensionsForBlobs):
        (WebKit::DatabaseProcess::prepareForAccessToTemporaryFile):
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:

2016-04-13  Daniel Bates  <dabates@apple.com>

        REGRESSION (r199401): Internal builds of Safari hang on launch
        https://bugs.webkit.org/show_bug.cgi?id=156545
        <rdar://problem/25697779>

        As pointed out by Darin Adler, remove RELEASE_ASSERT() that I inadvertently left in
        WebCore::secCodeForProcess() as part of r199504. For now, we handle
        SecCodeCopyGuestWithAttributes() returning an error. In a subsequent commit we will
        look to re-introduce the use of a RELEASE_ASSERT() to enforce the invariant that
        SecCodeCopyGuestWithAttributes() returns a success status.

        * Shared/mac/CodeSigning.mm:
        (WebKit::secCodeForProcess):

2016-04-13  Brady Eidson  <beidson@apple.com>

        Modern IDB (Blob support): Support retrieving Blobs from IDB.
        https://bugs.webkit.org/show_bug.cgi?id=156367

        Reviewed by Alex Christensen.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

2016-04-13  Chris Dumez  <cdumez@apple.com>

        We should not speculatively revalidate cached redirects
        https://bugs.webkit.org/show_bug.cgi?id=156548
        <rdar://problem/25583886>

        Reviewed by Darin Adler.

        Stop speculatively revalidating cached redirects. This matches matches
        the behavior in NetworkCache's makeUseDecision() which reuses cached
        redirects only if they do not need revalidation.

        This was breaking fonts.css loading on stripe.com because the
        SpeculativeLoadManager would wrongly speculatively revalidate the
        redirect and then serve a 302 response the NetworkResourceLoader
        when the actual request came in. This would cause us to not follow
        the redirect.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
        Abort the speculative load if it hits a redirect. This is the safe thing
        to do in this case, as we are supposed to do a hand-shake with WebCore
        in such case.

        (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
        Let successful validations fall through instead of calling didComplete()
        early. This matches what is not in NetworkResourceLoader. This way,
        didFinishLoading() ends up getting called for both successful and
        unsuccessful (i.e. did not return a 302 status code) network validation.

        (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
        - Stop dealing with redirects as we abort the load as soon as we hit a
          redirect now.
        - Stop asserting that m_cacheEntryForValidation is null now that this
          is called for successful validations as well.

        (WebKit::NetworkCache::SpeculativeLoad::abort):
        New method that aborts the network loads, calls the completion handler
        and clean up. It is called in the case we hit a redirect while
        revalidating.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        Drop m_redirectChainCacheStatus member as we no longer deal with
        redirects.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
        If the resource needs revalidation AND is a cached redirect, then do not
        use it. This matches what is done in NetworkCache's makeUseDecision().

2016-04-13  Brady Eidson  <beidson@apple.com>

        Modern IDB: NetworkProcessConnection::didClose needs to have a self ref.
        <rdar://problem/25700864> and https://bugs.webkit.org/show_bug.cgi?id=156559

        Reviewed by Alex Christensen.

        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didClose): Self ref to protect this.

2016-04-13  Daniel Bates  <dabates@apple.com>

        REGRESSION (r199401): Internal builds of Safari hang on launch
        https://bugs.webkit.org/show_bug.cgi?id=156545
        <rdar://problem/25697779>

        Reviewed by Anders Carlsson.

        For some reason SecCodeCopyGuestWithAttributes() is failing with an error in Apple Internal
        Safari builds. For now, temporarily allow the failure while I investigate the cause in
        <rdar://problem/25706517>.

        * Shared/mac/CodeSigning.mm:
        (WebKit::secCodeForProcess): Log the failure with OSStatus code and return nullptr;
        (WebKit::codeSigningIdentifierForProcess): Return a null string if secCodeForProcess() returns a nullptr.
        This will cause us to treat affected Apple Internal Safari builds the same as we would treat
        an unsigned or third-party signed app.

2016-04-13  Alex Christensen  <achristensen@webkit.org>

        Fix client certificate authentication with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=156527
        <rdar://problem/25489156>

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        We only want to use serverTrustCredential for ServerTrustEvaluation authentication challenges, not 
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
        (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
        Don't use challenge.sender with NSURLSession, which requires callbacks instead.

2016-04-12  Daniel Bates  <dabates@apple.com>

        REGRESSION (r198933): Unable to login to Google account from Internet Accounts preference pane
        https://bugs.webkit.org/show_bug.cgi?id=156447
        <rdar://problem/25628133>

        Reviewed by Darin Adler.

        Reverts the workaround landed in r199301 and teaches ProcessLauncherMac to use the code
        signing identifier of the UI process as the client-identifier if it is signed. Otherwise,
        we fall back to using the main bundle identifier or _NSGetProgname() depending on whether
        the UI process has an associated app bundle.

        * PlatformMac.cmake: Add file Shared/mac/CodeSigning.mm.
        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):
        (WebKit::codeSigningIdentifierForProcess): Deleted; moved from here to file Shared/mac/CodeSigning.mm.
        * Shared/mac/CodeSigning.h: Added.
        * Shared/mac/CodeSigning.mm: Added.
        (WebKit::secCodeForCurrentProcess): Added.
        (WebKit::secCodeForProcess): Added.
        (WebKit::secCodeSigningInformation): Added.
        (WebKit::appleSignedOrMacAppStoreSignedOrAppleDeveloperSignedRequirement): Added.
        (WebKit::secCodeSigningIdentifier): Added.
        (WebKit::codeSigningIdentifier): Returns the code signing identifier for the current process.
        (WebKit::codeSigningIdentifierForProcess): Moved from file Shared/mac/ChildProcessMac.mm. Extracted logic
        into various helper functions (above) so that it can be shared with WebKit::codeSigningIdentifier() as
        well as to improve the readability of the code. Removed the OSStatus out argument that was used by callers
        for logging purposes and moved such logging responsibility into WebKit::secCodeSigningIdentifier() as
        a release assertion message since we always want to log this error when code signing validation fails. We
        use a release assertion to cause a noticeable crash because we such failures should not occur and if they
        do then we want to see crash reports so that we can handle such failures. Using a release assertion for
        validation failures also simplifies the possible return values of this function as such failures represented
        the only case where this function would return an empty string. We now return either a null string or a non-
        empty string. We return a null string when the specified process is either unsigned or signed by a third-party;
        otherwise, we return a non-empty string that represents the code signing identifier.
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService): Use the code signing identifier for the client-identifier if we have one (e.g.
        we are signed app). If we do not have a code signing identifier then take client-identifier to be the
        bundle identifier of our main bundle. Failing that we take client-identifier to be _NSGetProgname().
        * WebKit2.xcodeproj/project.pbxproj: Add files Shared/mac/CodeSigning.{h, mm}.

2016-04-12  Enrica Casucci  <enrica@apple.com>

        Should retrieve text surrounding the selection when performing lookup.
        https://bugs.webkit.org/show_bug.cgi?id=156525
        rdar://problem/25043678

        Reviewed by Tim Horton.

        The lookup functionality requires the surrounding text to improve
        the quality of the results. This patch changes the implementation of
        _lookup to retrieve the text before and the text after the selection.
        It also renames DictationContextCallback to SelectionContextCallback so
        that it can be used for both dictation and lookup, since they both need
        the surrounding text.

        * UIProcess/AutoCorrectionCallback.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _lookup:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::autocorrectionDataCallback):
        (WebKit::WebPageProxy::selectionContextCallback):
        (WebKit::WebPageProxy::getAutocorrectionContext):
        (WebKit::WebPageProxy::getSelectionContext):
        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
        (WebKit::WebPageProxy::dictationContextCallback): Deleted.
        (WebKit::WebPageProxy::getLookupContextAtPoint): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
        (WebKit::WebPage::getSelectionContext):
        (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
        (WebKit::WebPage::requestDictationContext):
        (WebKit::WebPage::replaceSelectedText):
        (WebKit::WebPage::getLookupContextAtPoint): Deleted.

2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Dock controls are not available in toolbar if Web Inspector window leaves fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=156520
        <rdar://problem/22101106>

        Reviewed by Timothy Hatcher.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCanAttach):
        Be more explicit about the attachment view check. Its intent
        was to prevent allowing a 2nd level inspector from attaching
        to a 1st level inspector. We can use a stronger check. Also,
        remove deprecated pragmas by switching to new value.

2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open.
        https://bugs.webkit.org/show_bug.cgi?id=111193
        <rdar://problem/13325889>

        Reviewed by Timothy Hatcher.

        * UIProcess/API/C/WKInspector.cpp:
        (WKInspectorIsElementSelectionActive):
        (WKInspectorToggleElementSelection):
        * UIProcess/API/C/WKInspector.h:
        API for WebKit clients to toggle element selection.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::toggleElementSelection):
        (WebKit::WebInspectorProxy::elementSelectionChanged):
        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::isElementSelectionActive):
        * UIProcess/WebInspectorProxy.messages.in:
        UIProcess update according to the state of the page
        and action to tell the page to toggle.
        When starting, pre-connect the inspector. When the
        state changes, if we were stopping and nothing was
        selected, then disconnect. Otherwise, we will bring
        the inspector to the front.

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::elementSelectionChanged):
        * WebProcess/WebCoreSupport/WebInspectorClient.h:
        Let the UIProcess update its cached state of whether or
        not element selection is enabled or disabled.

        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::startElementSelection):
        (WebKit::WebInspector::stopElementSelection):
        (WebKit::WebInspector::elementSelectionChanged):
        * WebProcess/WebPage/WebInspector.h:
        * WebProcess/WebPage/WebInspector.messages.in:
        Messages in both directions.
        UIProcess -> InspectorProcess enable/disable.
        WebProcess -> UIProcess updated element selection state.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::startElementSelection):
        (WebKit::WebInspectorUI::stopElementSelection):
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.messages.in:
        Open the inspector and enable element selection.

2016-04-11  Alex Christensen  <achristensen@webkit.org>

        Build MiniBrowser with CMake on Mac
        https://bugs.webkit.org/show_bug.cgi?id=156471

        Reviewed by Daniel Bates.

        * DatabaseProcess/DatabaseProcess.messages.in:

2016-04-11  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Do not pass context to EwkViewCreate
        https://bugs.webkit.org/show_bug.cgi?id=156461

        Reviewed by Darin Adler.

        EWKViewCreate already has pageConfiguration which contains context.
        So, this patch removes context argument from EWKViewCreate.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewCreate):
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/API/efl/ewk_view.cpp:
        (EWKViewCreate): Call WebView::Create instead of WKViewCreate not to use WK API.
        (ewk_view_smart_add):
        (ewk_view_add_with_configuration):
        (ewk_view_add_with_context):
        * UIProcess/API/efl/ewk_view_private.h:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::create):
        (WebKit::WebView::WebView):
        * UIProcess/efl/WebView.h:

2016-04-11  Darin Adler  <darin@apple.com>

        Remove UsePointersEvenForNonNullableObjectArguments from HTMLSelectElement
        https://bugs.webkit.org/show_bug.cgi?id=156458

        Reviewed by Chris Dumez.

        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Updated includes.

2016-04-11  Jeremy Jones  <jeremyj@apple.com>

        When clearing cache, also clear AVFoundation cache.
        https://bugs.webkit.org/show_bug.cgi?id=155783
        rdar://problem/25252541

        Reviewed by Darin Adler.

        Include the HTMLMediaElement media cache when doing disk cache operations.
        Add a sandbox extension for media cache directory. This allows the UI process and the web process
        to access the same cache.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Add media cache directory.
        (WebKit::WebProcessCreationParameters::decode): Add media cache directory.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
        (API::ProcessPoolConfiguration::copy): Add media cache directory.
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
        (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
        (API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
        (WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        (WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
        (WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

2016-04-11  Commit Queue  <commit-queue@webkit.org>

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

        This change broke the OS X Yosemite build. (Requested by jwtan
        on #webkit).

        Reverted changeset:

        "When clearing cache, also clear AVFoundation cache."
        https://bugs.webkit.org/show_bug.cgi?id=155783
        http://trac.webkit.org/changeset/199315

2016-04-11  Jeremy Jones  <jeremyj@apple.com>

        When clearing cache, also clear AVFoundation cache.
        https://bugs.webkit.org/show_bug.cgi?id=155783
        rdar://problem/25252541

        Reviewed by Darin Adler.

        Include the HTMLMediaElement media cache when doing disk cache operations.
        Add a sandbox extension for media cache directory. This allows the UI process and the web process
        to access the same cache.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Add media cache directory.
        (WebKit::WebProcessCreationParameters::decode): Add media cache directory.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
        (API::ProcessPoolConfiguration::copy): Add media cache directory.
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
        (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
        (API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
        (WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        (WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
        (WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

2016-04-11  Said Abou-Hallawa  <sabouhallawa@apple,com>

        Merge CG ImageSource and non CG ImageSource implementation in one file
        https://bugs.webkit.org/show_bug.cgi?id=155456

        Reviewed by Darin Adler.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::setCursor):
        Replace the call to Image::getHotSpot() by Image::hotSpot().

2016-04-11  Anders Carlsson  <andersca@apple.com>

        Rename WKOpenPanelParameters files to WKOpenPanelParametersRef
        https://bugs.webkit.org/show_bug.cgi?id=156473

        Reviewed by Alex Christensen.

        * UIProcess/API/C/WKOpenPanelParameters.cpp:
        (WKOpenPanelParametersGetTypeID): Deleted.
        (WKOpenPanelParametersGetAllowsMultipleFiles): Deleted.
        (WKOpenPanelParametersCopyAcceptedMIMETypes): Deleted.
        (WKOpenPanelParametersCopyCapture): Deleted.
        (WKOpenPanelParametersGetCaptureEnabled): Deleted.
        (WKOpenPanelParametersCopySelectedFileNames): Deleted.
        * UIProcess/API/C/WKOpenPanelParametersRef.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp.
        (WKOpenPanelParametersGetTypeID):
        (WKOpenPanelParametersGetAllowsMultipleFiles):
        (WKOpenPanelParametersCopyAcceptedMIMETypes):
        (WKOpenPanelParametersCopyCapture):
        (WKOpenPanelParametersGetCaptureEnabled):
        (WKOpenPanelParametersCopySelectedFileNames):
        * UIProcess/API/C/WKOpenPanelParametersRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h.
        * UIProcess/API/C/WebKit2_C.h:
        * UIProcess/API/efl/ewk_file_chooser_request.cpp:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        * WebKit2.xcodeproj/project.pbxproj:

2016-04-09  Gavin Barraclough  <barraclough@apple.com>

        WebKit should adopt journal_mode=wal for all SQLite databases.
        https://bugs.webkit.org/show_bug.cgi?id=133496

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleClearAllDatabases):
            - renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

2016-04-11  Daniel Bates  <dabates@apple.com>

        REGRESSION (r198933): Unable to login to Google account from Internet Accounts preference pane
        https://bugs.webkit.org/show_bug.cgi?id=156447
        <rdar://problem/25628133>

        Reviewed by Anders Carlsson.

        Temporarily perform code signing verification only for Mac App Store- and Apple Developer- signed apps.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::codeSigningIdentifierForProcess):

2016-04-05  Oliver Hunt  <oliver@apple.com>

        Remove compile time define for SEPARATED_HEAP
        https://bugs.webkit.org/show_bug.cgi?id=155508

        Reviewed by Mark Lam.

        * Configurations/FeatureDefines.xcconfig:

2016-04-11  Commit Queue  <commit-queue@webkit.org>

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

        broke 300 tests (Requested by mcatanzaro on #webkit).

        Reverted changeset:

        "Merge CG ImageSource and non CG ImageSource implementation in
        one file"
        https://bugs.webkit.org/show_bug.cgi?id=155456
        http://trac.webkit.org/changeset/199290

2016-04-11  Said Abou-Hallawa  <sabouhallawa@apple,com>

        Merge CG ImageSource and non CG ImageSource implementation in one file
        https://bugs.webkit.org/show_bug.cgi?id=155456

        Reviewed by Darin Adler.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::setCursor):
        Replace the call to Image::getHotSpot() by Image::hotSpot().

2016-04-11  Fujii Hironori  <Hironori.Fujii@jp.sony.com>

        [CMake] Make FOLDER property INHERITED
        https://bugs.webkit.org/show_bug.cgi?id=156460

        Reviewed by Brent Fulgham.

        * CMakeLists.txt:
        Set FOLDER property as a directory property not a target property

2016-04-08  Sam Weinig  <sam@webkit.org>

        Remove support for custom target picker actions
        <rdar://problem/24987783>
        https://bugs.webkit.org/show_bug.cgi?id=156434

        Reviewed by Eric Carlson.

        This mostly entailed rolling out r197429 and r197569.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
        (WebKit::WebPageProxy::showPlaybackTargetPicker):
        (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
        (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
        (WebKit::WebPageProxy::didChangeBackgroundColor):
        (WebKit::WebPageProxy::customPlaybackActionSelected): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
        (WebKit::WebChromeClient::showPlaybackTargetPicker):
        (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::setShouldPlayToPlaybackTarget):
        (WebKit::WebPage::customPlaybackActionSelected): Deleted.

2016-04-08  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
        https://bugs.webkit.org/show_bug.cgi?id=156429
        rdar://problem/25455111

        Reviewed by Tim Horton.

        When a WKWebView is expanded to full size, then embedded in UIScrollView, it would
        create huge tiles that cover the entire view area (since it considered itself non-scrollable).

        Fix to always use 512x512 tiles in this configuration, and to adjust the tile coverage
        for the area exposed through the enclosing UIScrollView.

        * Shared/VisibleContentRectUpdateInfo.cpp: Add enclosedInScrollView(), which is used to
        trigger normal-sized tiles.
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView):
        (WebKit::operator==):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didInvokeUIScrollViewDelegateCallback]): Pass our scrollView.
        (-[WKWebView _didFinishScrolling]):
        (-[WKWebView scrollViewDidScroll:]):
        (-[WKWebView scrollViewDidZoom:]):
        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
        (-[WKWebView _scrollViewDidInterruptDecelerating:]):
        (-[WKWebView _visibleRectInEnclosingScrollView:]):
        (-[WKWebView _visibleContentRect]): Compute the exposed part of the content relative
        to the WKWebView, then intersect with the exposed part via any ancestor UIScrollView.
        (-[WKWebView _didScroll]): This is called by UIKit when some ancestor UIScrollView scrolls.
        However, we don't get all the UIScrollView delegate callbacks, so have to use a timer to
        trigger a call to -_updateVisibleContentRects when we're in a stable state.
        (-[WKWebView _enclosingScrollerScrollingEnded:]):
        (-[WKWebView _frameOrBoundsChanged]):
        (-[WKWebView _updateVisibleContentRects]):
        (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Get the stable state from the
        scroll view that the user is interacting with.
        (-[WKWebView _updateContentRectsWithState:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/WebPageProxy.h: Rather than pass a bazillion arguments through updateVisibleContentRects(), just
        pass the VisibleContentRectUpdateInfo struct.
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]):
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::updateVisibleContentRects):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):

2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>

        [iOS Simulator] Build failure (property 'contentsFormat' not found on object of type 'LegacyTileLayer *')
        https://bugs.webkit.org/show_bug.cgi?id=156415

        Reviewed by Simon Fraser.

        * UIProcess/API/Cocoa/_WKElementAction.mm:
        (-[_WKElementAction runActionWithElementInfo:]):
        Use WeakObjCPtr instead of __weak to avoid build errors when not under ARC.

2016-04-08  Alex Christensen  <achristensen@webkit.org>

        Progress towards running CMake WebKit2 on Mac
        https://bugs.webkit.org/show_bug.cgi?id=156426

        Reviewed by Tim Horton.

        * CMakeLists.txt:
        * PlatformMac.cmake:
        Put the xpc service binaries in the right place.

2016-04-08  Alex Christensen  <achristensen@webkit.org>

        Build fix with IndexedDB disabled but DatabaseProcess enabled after r199230
        https://bugs.webkit.org/show_bug.cgi?id=156321

        Rubber-stamped by Brady Eidson.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        (WebKit::DatabaseProcess::grantSandboxExtensionsForBlobs):
        (WebKit::DatabaseProcess::accessToTemporaryFileComplete):
        (WebKit::DatabaseProcess::indexedDatabaseOrigins):
        * DatabaseProcess/DatabaseProcess.h:
        Add some more guards.

2016-04-07  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Stop using exposedContentRect for history scroll state restoration
        https://bugs.webkit.org/show_bug.cgi?id=156392

        Reviewed by Tim Horton.

        A future commit will alter the meaning of exposedContentRect on iOS to take into
        account clipped out parts of the WKWebView. To achieve this, wean history restoration
        off of using exposedContentRect for scroll state restoration. It did this to restore
        the page to the same position relative to the view's top-left (to avoid jiggles caused
        by changing obscured insets).

        Do this by pushing the left/top obscured insets down with visible content rects updates,
        storing them on ScrollView, and adding them to HistoryItem. Those insets are then used
        for scroll state restoration in WKWebView.

        * Shared/VisibleContentRectUpdateInfo.cpp: Add FloatSize for obscuredInset.
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::obscuredInset):
        (WebKit::operator==):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _processDidExit]): Rename _needsToRestoreExposedRect to _needsToRestoreScrollPosition
        (-[WKWebView _didCommitLayerTree:]): Restore the scroll position using the scaled scrollOffset minus
        the old obscuredInset.
        (-[WKWebView _layerTreeCommitComplete]):
        (-[WKWebView _restorePageScrollPosition:scrollOrigin:previousObscuredInset:scale:]):
        (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
        (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
        (-[WKWebView _updateVisibleContentRects]):
        (-[WKWebView _restorePageStateToExposedRect:scrollOrigin:scale:]): Deleted.
        * 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::restorePageState):
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
        Make the VisibleContentRectUpdateInfo here and pass it down.
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::updateVisibleContentRects):
        (WebKit::WebPageProxy::restorePageState):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::restorePageState):
        (WebKit::WebPage::updateVisibleContentRects): setObscuredInset() moved from FrameView to Page.
        Also call setEnclosedInScrollView() on Page.

2016-04-08  Brady Eidson  <beidson@apple.com>

        Modern IDB (Blob support): Write blobs to temporary files and move them to the correct location when storing them.
        https://bugs.webkit.org/show_bug.cgi?id=156321

        Reviewed by Alex Christensen, Andy Estes, and Darin Adler.

        The NetworkProcess writes a blob to a temporary file, then tells the UIProcess to grant the DatabaseProcess
        a Sandbox Extension to that path.
        
        It then tells the WebProcess the paths for the temporary files, which then tells the DatabaseProcess to store
        the contents of those files as blob references in the database.
        
        Since the UIProcess had already granted it a Sandbox Extension, it is able to do so.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::idbServer):
        (WebKit::DatabaseProcess::grantSandboxExtensionsForBlobs):
        (WebKit::DatabaseProcess::prepareForAccessToTemporaryFile):
        (WebKit::DatabaseProcess::accessToTemporaryFileComplete):
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs):
        (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.messages.in:

2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>

        Remove ENABLE(ENABLE_ES6_CLASS_SYNTAX) guards
        https://bugs.webkit.org/show_bug.cgi?id=156384

        Reviewed by Ryosuke Niwa.

        * Configurations/FeatureDefines.xcconfig:

2016-04-07  Dean Jackson  <dino@apple.com>

        [iOS] Play button on video is too dark
        https://bugs.webkit.org/show_bug.cgi?id=156383
        <rdar://problem/23540816>

        Reviewed by Simon Fraser.

        Elements that are backed by a layer with either LightBackdropAppearance
        or DarkBackdropAppearance are actually a combination of a
        few layers (inside a special view). If we apply a mask to one
        of those layers, it needs to be attached to the correct
        child layer.

        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
        (WebKit::RemoteLayerTreePropertyApplier::applyProperties): If we have
        one of the special appearance flags, apply the mask layer to
        a particular child, rather than the layer itself.

2016-04-07  Jeremy Jones  <jeremyj@apple.com>

        Clearing the application cache doesn't work.
        https://bugs.webkit.org/show_bug.cgi?id=156354
        rdar://problem/22369239

        Reviewed by Brady Eidson.

        Use the correct "ApplicationCache" directory.
        Delete the caches, not just the entries.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):

2016-04-07  Brian Burg  <bburg@apple.com>

        Web Automation: implement Automation.addSingleCookie
        https://bugs.webkit.org/show_bug.cgi?id=156319
        <rdar://problem/25589605>

        Reviewed by Timothy Hatcher.

        Implement this command by converting the protocol cookie to
        WebCore::Cookie, then sending the cookie to NetworkProcess to
        be added to the storage session using CookieJar::addCookie.

        * UIProcess/Automation/Automation.json:
        Clarify the units used in the 'expires' field and how the default value
        for the domain field should be computed.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::addSingleCookie):
        Parse the cookie and send it out via WebCookieManagerProxy.

        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::addCookie): Added.
        * UIProcess/WebCookieManagerProxy.h:
        * WebProcess/Cookies/WebCookieManager.cpp:
        (WebKit::WebCookieManager::addCookie):
        * WebProcess/Cookies/WebCookieManager.h:
        * WebProcess/Cookies/WebCookieManager.messages.in:
        Forward the message to WebCore::addCookie.

2016-04-06  Ada Chan  <adachan@apple.com>

        Add WebKitAdditions extension points around preferences
        https://bugs.webkit.org/show_bug.cgi?id=156303

        Reviewed by Beth Dakin.

        * Shared/WebPreferencesStore.cpp:
        (WebKit::defaults):
        * UIProcess/API/C/WKPreferences.cpp:

2016-04-07  Brian Burg  <bburg@apple.com>

        CookieJar should support adding synthetic cookies for developer tools
        https://bugs.webkit.org/show_bug.cgi?id=156091
        <rdar://problem/25581340>

        Reviewed by Timothy Hatcher.

        Plumb the new method through the strategy and out to the network process.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::addCookie):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::addCookie):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2016-04-06  Alex Christensen  <achristensen@webkit.org>

        Compile WebKitTestRunner with CMake on Mac
        https://bugs.webkit.org/show_bug.cgi?id=156310

        Reviewed by Daniel Bates.

        * PlatformMac.cmake:

2016-04-05  Simon Fraser  <simon.fraser@apple.com>

        Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
        https://bugs.webkit.org/show_bug.cgi?id=156274

        Reviewed by Tim Horton.

        DrawingArea and FrameView have an "exposedRect" property that is used by applications
        on Mac, like Mail, that embed web views inside scroll views. However, this name is very
        similar to the "exposedContentRect" that is used on iOS to denote the part of the view
        whose pixels are visible, including through blurring overlaid UI.
        
        To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
        emphasize that it's a rect that takes into account clipping in the native view
        hierarchy.
        
        Also make this rect Optional<> through the DrawingArea, removing comparisons against
        FloatRect::infiniteRect().
        
        Do some other minor renaming in VisibleContentRectUpdateInfo.

        * Shared/VisibleContentRectUpdateInfo.cpp: Rename "exposedRect" and "unobscuredRect" to
        have "Content" in the names.
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::exposedContentRect):
        (WebKit::VisibleContentRectUpdateInfo::unobscuredContentRect):
        (WebKit::operator==):
        (WebKit::VisibleContentRectUpdateInfo::exposedRect): Deleted.
        (WebKit::VisibleContentRectUpdateInfo::unobscuredRect): Deleted.
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::updateViewExposedRect):
        * UIProcess/DrawingAreaProxy.cpp:
        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
        (WebKit::DrawingAreaProxy::setViewExposedRect):
        (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
        (WebKit::DrawingAreaProxy::setExposedRect): Deleted.
        (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired): Deleted.
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::viewExposedRect):
        (WebKit::DrawingAreaProxy::exposedRect): Deleted.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::exposedContentRect):
        (WebKit::WebPageProxy::unobscuredContentRect):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
        (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect): Deleted.
        (WebKit::RemoteLayerTreeDrawingAreaProxy::setExposedRect): Deleted. This was only used
        to position the indicator, and confusingly used either exposedContentRect() or viewExposedRect()
        depending on platform.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/DrawingArea.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
        (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): Deleted.
        (WebKit::RemoteLayerTreeDrawingArea::setExposedRect): Deleted.
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
        (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Deleted.
        (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Deleted.

2016-04-05  Alex Christensen  <achristensen@webkit.org>

        Make CMake-generated binaries on Mac able to run
        https://bugs.webkit.org/show_bug.cgi?id=156268

        Reviewed by Daniel Bates.

        * CMakeLists.txt:
        * PlatformMac.cmake:

2016-04-05  Brian Burg  <bburg@apple.com>

        Web Automation: add support for getting, deleting, and adding cookies
        https://bugs.webkit.org/show_bug.cgi?id=156090
        <rdar://problem/25477678>

        Reviewed by Timothy Hatcher.

        Add protocol commands for manipulating cookies with respect to a given page.
        Implement all but the addSingleCookie command, which needs a new WebCore API.

        * UIProcess/Automation/Automation.json:
        Copy the Page domain Cookie object. Add new commands.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::getAllCookies):
        (WebKit::buildObjectForCookie): Copied from InspectorPageAgent.
        (WebKit::buildArrayForCookies): Copied from InspectorPageAgent.
        (WebKit::WebAutomationSession::didGetCookiesForFrame):
        (WebKit::WebAutomationSession::deleteSingleCookie):
        (WebKit::WebAutomationSession::didDeleteCookie):
        (WebKit::WebAutomationSession::addSingleCookie): Added a stub for now.
        (WebKit::WebAutomationSession::deleteAllCookies):
        This command can use the WebCookieManager supplement directly instead of
        proxying through AutomationSession. It doesn't block until the delete is
        performed like the other methods do, but this shouldn't be a problem.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Automation/WebAutomationSession.messages.in:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::getCookiesForFrame):
        (WebKit::WebAutomationSessionProxy::deleteCookie):
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:

2016-04-05  Alex Christensen  <achristensen@webkit.org>

        Fix Range requests when not using the NetworkCache with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=156036
        rdar://problem/25334939
 
        Reviewed by Sam Weinig.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
        Don't cache any responses with Content-Range headers to work around rdar://problem/20001985.
        This is similar to the workaround in shouldCacheResponse in WebCoreNSURLSession.mm
        (WebKit::NetworkSession::NetworkSession):
        If we are using the NetworkCache, then don't use CFNetwork's cache.

2016-04-05  Brent Fulgham  <bfulgham@apple.com>

        Correct applicationWillTerminate logic for ResourceLoadStatistics
        https://bugs.webkit.org/show_bug.cgi?id=156249
        <rdar://problem/25179611>

        Reviewed by Andy Estes.

        The applicationWillTerminate handling for ResourceLoadStatistics incorrectly
        assumes that a ResourceLoadStatistics object will always be present.
        1. The termination handling for 'dataStoresWithStorageManagers' should be
           calling 'applicationWillTerminate' on any ResourceLoadStatistics
           objects attached to the dataStore.
        2. platformInitialize should null-check before attempting to dispatch.
        3. platformDestroy should null check before attempting to dispatch.

        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
        (WebKit::WebsiteDataStore::platformInitialize): 
        (WebKit::WebsiteDataStore::platformDestroy): Invoke 'applicationWillTerminate' on
        m_resourceLoadStatistics if present.

2016-04-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Fetch API] Add a runtime flag to fetch API and related constructs
        https://bugs.webkit.org/show_bug.cgi?id=156113
 
        Reviewed by Alex Christensen.

        Add a fetch API runtime flag based on preferences.
        Disable fetch API by default.
 
        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesGetCustomElementsEnabled):
        (WKPreferencesSetFetchAPIEnabled):
        (WKPreferencesGetFetchAPIEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-04-05  Brady Eidson  <beidson@apple.com>

        Modern IDB: Replace use of SerializedScriptValue with IDBValue.
        https://bugs.webkit.org/show_bug.cgi?id=156242

        Reviewed by Alex Christensen.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::putOrAdd):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::putOrAdd):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

2016-04-05  Antoine Quint  <graouts@apple.com>

        [WebGL2] Turn the ENABLE_WEBGL2 flag on
        https://bugs.webkit.org/show_bug.cgi?id=156061
        <rdar://problem/25463193>

        Reviewed by Alex Christensen.

        * Configurations/FeatureDefines.xcconfig:

2016-04-05  Chris Dumez  <cdumez@apple.com>

        We sometimes fail to remove outdated entry from the disk cache after revalidation and when the resource is no longer cacheable
        https://bugs.webkit.org/show_bug.cgi?id=156048
        <rdar://problem/25514480>

        Reviewed by Antti Koivisto.

        We would sometimes fail to remove outdated entry from the disk cache
        after revalidation and when the resource is no longer cacheable. This
        was due to Storage::removeFromPendingWriteOperations() only removing
        the first pending write operation with a given key instead of actually
        removing all of the operations with this key.

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

2016-04-05  Antoine Quint  <graouts@apple.com>

        [WebGL2] Allow enabling WebGL2 with a runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=156166
        <rdar://problem/25526929>

        Set the WebGL2 runtime flag based on preferences, disabled by default.

        Reviewed by Dean Jackson.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetWebGL2Enabled):
        (WKPreferencesGetWebGL2Enabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-04-04  Zan Dobersek  <zdobersek@igalia.com>

        [ThreadedCompositor] Move CompositingRunLoop class into a separate file
        https://bugs.webkit.org/show_bug.cgi?id=156170

        Reviewed by Michael Catanzaro.

        Move the CompositingRunLoop class from the ThreadedCompositor.cpp file
        into its own implementation file, with the class declaration placed
        into the accompanying header file. This follows the general rule of
        keeping different class implementations in separate files.

        No change in behavior, just refactoring.

        * PlatformGTK.cmake:
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp: Added.
        (WebKit::CompositingRunLoop::CompositingRunLoop):
        (WebKit::CompositingRunLoop::callOnCompositingRunLoop):
        (WebKit::CompositingRunLoop::setUpdateTimer):
        (WebKit::CompositingRunLoop::stopUpdateTimer):
        (WebKit::CompositingRunLoop::updateTimerFired):
        * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: Added.
        (WebKit::CompositingRunLoop::runLoop):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::CompositingRunLoop::CompositingRunLoop): Deleted.
        (WebKit::CompositingRunLoop::callOnCompositingRunLoop): Deleted.
        (WebKit::CompositingRunLoop::setUpdateTimer): Deleted.
        (WebKit::CompositingRunLoop::stopUpdateTimer): Deleted.
        (WebKit::CompositingRunLoop::runLoop): Deleted.
        (WebKit::CompositingRunLoop::updateTimerFired): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-04-04  Brady Eidson  <beidson@apple.com>

        Modern IDB: Dump blobs to disk before storing them in an object store.
        https://bugs.webkit.org/show_bug.cgi?id=156068

        Reviewed by Alex Christensen.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::writeBlobsToTemporaryFiles):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:

        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didClose):
        (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
        (WebKit::NetworkProcessConnection::didWriteBlobsToTemporaryFiles):
        * WebProcess/Network/NetworkProcessConnection.h:
        * WebProcess/Network/NetworkProcessConnection.messages.in:

2016-04-04  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Allow clients in the bundle to know whether a field was focused by user interaction        
        https://bugs.webkit.org/show_bug.cgi?id=156118

        Reviewed by Dan Bernstein.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Add delegate method that takes userIsInteracting bool so that bundle clients get this information.
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: Call API with userIsInteracting property if delegate implements it, otherwise call existing API if
        userIsInteracting is true, as we previously did in WebKit::WebPage::elementDidFocus. Move FIXME from WebKit::WebPage::elementDidFocus to here, since we are checking userIsInteracting.
        * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
        (API::InjectedBundle::FormClient::willBeginInputSession): Add userIsInteracting bool to arguments so we can use it for call to the new API as well as preserving behavior of the old API.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::elementDidFocus): Remove check if user is interacting and call willBeginInputSession unconditionally. Move FIXME to where we check
        userIsInteracting. Pass m_userIsInteracting to willBeginInputSession so we can use it there.

2016-04-04  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed GTK build fix after r199020

        * UIProcess/API/gtk/WebKitUserContentManager.cpp:
        (webkit_user_content_manager_register_script_message_handler):
        (webkit_user_content_manager_unregister_script_message_handler):

2016-04-04  Alex Christensen  <achristensen@webkit.org>

        CMake build fix.

        * PlatformMac.cmake:

2016-04-04  Jiewen Tan  <jiewen_tan@apple.com>

        Tapping on tabs in webpages caused WK crash at WebKit: WebKit::WebFrame::didReceivePolicyDecision
        https://bugs.webkit.org/show_bug.cgi?id=156119
        <rdar://problem/20732167>

        Reviewed by Andy Estes.

        Protect the m_frame so that it is present for completion handlers.

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

2016-04-04  Beth Dakin  <bdakin@apple.com>

        Add some logic to decide when a video can control the videoControlsManager
        https://bugs.webkit.org/show_bug.cgi?id=156089
        -and corresponding-
        rdar://problem/23833752

        Reviewed by Eric Carlson and Tim Horton.

        The biggest change in WebKit2 is to push all of the logic for the 
        videoControlsManager into WebCore. With this change, WebCore will invoke 
        setUpVideoControlsManager() when there is a video to control the manager, and 
        it will call clearVideoControlsManager() when there is not.

        Add clearVideoControlsManager().
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::clearVideoControlsManager):

        Re-name isPlayingMediaDidChange() to videoControlsManagerDidChange(). This 
        ties the logic to the lifetime of the videoControlsManager instead of 
        figuring it out in the UIProcess based on the media state.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::videoControlsManagerDidChange):
        (WebKit::WebViewImpl::isPlayingMediaDidChange): Deleted.
        * UIProcess/PageClient.h:

        Also change isPlayingVideoWithAudio() into hasActiveVideoForControlsManager() 
        Again, this ties the logic to the lifetime of the videoControlsManager 
        instead of figuring it out in the UIProcess based on the media state.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange):
        (WebKit::WebPageProxy::videoControlsManagerDidChange):
        (WebKit::WebPageProxy::hasActiveVideoForControlsManager):
        (WebKit::WebPageProxy::isPlayingVideoWithAudio): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::videoControlsManagerDidChange):
        (WebKit::PageClientImpl::isPlayingMediaDidChange): Deleted.

        New WebChromeClient function clearVideoControlsManager().
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::clearVideoControlsManager):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

        Do the work to clear the videoControlsManager.
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::clearVideoControlsManager):
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

2016-04-04  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION(r198955): com.apple.WebKit.Networking.Development crashed in WebKit::NetworkLoad::setPendingDownloadID + 11
        https://bugs.webkit.org/show_bug.cgi?id=156177
        <rdar://problem/25508037>

        Reviewed by Alex Christensen.

        We do not currently create a NetworkDataTask when we encounter a BLOB URL when building with
        NETWORK_SESSION enabled. This causes us to crash when the download system attempts to work
        with a BLOB URL.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::setPendingDownloadID): Add null check for m_task.
        (WebKit::NetworkLoad::setPendingDownload): Ditto.

2016-04-03  Sam Weinig  <sam@webkit.org>

        Add SPI to allow install script message handlers in isolated worlds
        https://bugs.webkit.org/show_bug.cgi?id=156153

        Reviewed by Anders Carlsson.

        * Scripts/webkit/messages.py:
        (headers_for_type):
        * Shared/WebUserContentControllerDataTypes.cpp:
        (WebKit::WebScriptMessageHandlerData::encode):
        (WebKit::WebScriptMessageHandlerData::decode):
        * Shared/WebUserContentControllerDataTypes.h:
        Add WebKit::WebScriptMessageHandlerData, matching WebKit::WebUserScriptData and
        WebKit::WebUserStyleSheetData.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController addScriptMessageHandler:name:]):
        (-[WKUserContentController removeScriptMessageHandlerForName:]):
        (-[WKUserContentController _removeAllUserStyleSheetsAssociatedWithUserContentWorld:]):
        (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]):
        (-[WKUserContentController _removeScriptMessageHandlerForName:userContentWorld:]):
        (-[WKUserContentController _removeAllScriptMessageHandlersAssociatedWithUserContentWorld:]):
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        Add SPI for adding and removing ScriptMessageHandlers associated with a world.

        * UIProcess/UserContent/WebScriptMessageHandler.cpp:
        (WebKit::WebScriptMessageHandler::create):
        (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
        (WebKit::WebScriptMessageHandlerHandle::encode): Deleted.
        (WebKit::WebScriptMessageHandlerHandle::decode): Deleted.
        * UIProcess/UserContent/WebScriptMessageHandler.h:
        (WebKit::WebScriptMessageHandler::identifier):
        (WebKit::WebScriptMessageHandler::name):
        (WebKit::WebScriptMessageHandler::userContentWorld):
        (WebKit::WebScriptMessageHandler::client):
        (WebKit::WebScriptMessageHandler::handle): Deleted.
        Add the world and move the data object to WebUserContentControllerDataTypes.h

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
        (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
        (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        Update for worlds, matching UserScript/UserStyleSheet model.

        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
        Change to inherit directly from WebCore::UserMessageHandlerDescriptor.

        (WebKit::WebUserContentController::addUserScriptMessageHandlers):
        (WebKit::WebUserContentController::removeUserScriptMessageHandler):
        (WebKit::WebUserContentController::removeAllUserScriptMessageHandlers):
        (WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
        (WebKit::WebUserContentController::removeUserScriptMessageHandlerInternal):
        Add support for worlds, matching UserScript/UserStyleSheet model.

        (WebKit::WebUserContentController::addUserStyleSheets):
        Add missing call to invalidateInjectedStyleSheetCacheInAllFramesInAllPages()

        (WebKit::WebUserContentController::removeAllUserStyleSheets):
        Switch to only calling invalidateInjectedStyleSheetCacheInAllFramesInAllPages() once
        after the loop and only if any stylesheets were removed.
        
        (WebKit::WebUserContentController::addUserStyleSheetInternal):
        Remove call to invalidateInjectedStyleSheetCacheInAllFramesInAllPages(), make
        callers call it. This allows us to avoid calling it repeatedly in removeAllUserStyleSheets().

        (WebKit::WebUserContentController::addUserStyleSheet):
        Call invalidateInjectedStyleSheetCacheInAllFramesInAllPages() explicitly since it
        is no longer called in addUserStyleSheetInternal().

        (WebKit::WebUserContentController::forEachUserMessageHandler):
        Implement by iterating the m_userMessageHandlers map.

        * WebProcess/UserContent/WebUserContentController.messages.in:
        Update for worlds, matching UserScript/UserStyleSheet model.

2016-04-04  Joonghun Park  <jh718.park@samsung.com>

        [EFL] Fix build break since r198800
        https://bugs.webkit.org/show_bug.cgi?id=156011

        Reviewed by Alex Christensen.

        * CMakeLists.txt: Currently circular dependency state exists between WebCoreDerivedSources and WebCore targets.
        By adding -Wl,--start-group -Wl,--end-group linker option, we can resolve this problem.
        In case there is no such circular dependency, this linker option does nothing.

2016-04-04  Konstantin Tokarev  <annulen@yandex.ru>

        [GTK] Added missing inspector files under UserInterface/Proxies.
        https://bugs.webkit.org/show_bug.cgi?id=156165

        Reviewed by Michael Catanzaro.

        * PlatformGTK.cmake:

2016-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r198792): [GTK] Inspector crashes in Inspector::Protocol::getEnumConstantValue since r198792
        https://bugs.webkit.org/show_bug.cgi?id=155745
        <rdar://problem/25289456>

        Reviewed by Brian Burg.

        Use Inspector::Protocol::AutomationEnums namespace for getEnumConstantValue().

        * UIProcess/Automation/WebAutomationSession.cpp:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
        (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
        (WebKit::WebAutomationSessionProxy::resolveParentFrame):
        (WebKit::WebAutomationSessionProxy::computeElementLayout):

2016-04-04  Emanuele Aina  <emanuele.aina@collabora.com>

        Fix WEB_PROCESS_CMD_PREFIX and NETWORK_PROCESS_CMD_PREFIX after r196500
        https://bugs.webkit.org/show_bug.cgi?id=156060

        Reviewed by Darin Adler.

        Commit r196500 was a bit too eager in removing the
        platformGetLaunchOptions() callsites as non-mac platform still use
        that in debug builds to attach debugging tools to spawned
        subprocesses (eg. gdbserver).

        Instead of reinstating them and relying on each subprocess type to
        implement its own platformGetLaunchOptions() version (all alike),
        avoid duplication and check the *_PROCESS_CMD_PREFIX environment
        variables in a single place, ChildProcessProxy::getLaunchOptions().

        Doing so also improves consistency in *_PROCESS_CMD_PREFIX support:
        only WEB_PROCESS_CMD_PREFIX and NETWORK_PROCESS_CMD_PREFIX worked with
        both the GTK and EFL ports while PLUGIN_PROCESS_CMD_PREFIX only
        worked for EFL and there was no corresponding
        DATABASE_PROCESS_CMD_PREFIX implementation.

        * UIProcess/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::getLaunchOptions): Check the
        appropriate *_PROCESS_CMD_PREFIX environment variable.
        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Drop
        check for PLUGIN_PROCESS_COMMAND_PREFIX, now handled by
        ChildProcessProxy::getLaunchOptions().
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/WebProcessProxy.h: Drop platformGetLaunchOptions()
        prototypes.
        * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
        * UIProcess/Databases/efl/DatabaseProcessProxyEfl.cpp:
        * UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp:
        * UIProcess/efl/WebProcessProxyEfl.cpp:
        * UIProcess/gtk/WebProcessProxyGtk.cpp: Removed, they only contained
        platformGetLaunchOptions() implementations.
        * PlatformEfl.cmake:
        * PlatformGTK.cmake: Drop removed files.

2016-04-02  Daniel Bates  <dabates@apple.com>

        REGRESSION (r198933): Web Inspector and inspected page hang in local builds
        https://bugs.webkit.org/show_bug.cgi?id=156138
        <rdar://problem/25507724>

        Reviewed by Alexey Proskuryakov.

        Similar to the sandbox policy for WebProcess and NetworkProcess, grant a Database process
        read-only filesystem access and mach lookup capability to various Security framework files
        and SecurityServer, respectively.

        * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:

2016-04-02  Daniel Bates  <dabates@apple.com>

        Another attempt to fix the Apple Internal Yosemite and El Capitan builds following
        <http://trac.webkit.org/changeset/198933> (https://bugs.webkit.org/show_bug.cgi?id=155455)

        Similar to the sandbox policy for WebProcess and NetworkProcess, grant a Database process
        access to the passed user's cache directory and passed user's temporary directory so that
        the Security framework can verify the code signature of the app that launched it when the
        Database process is itself code signed.

        * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:

2016-04-01  Daniel Bates  <dabates@apple.com>

        Attempt to fix the Apple Internal Yosemite and El Capitan builds following
        <http://trac.webkit.org/changeset/198933> (https://bugs.webkit.org/show_bug.cgi?id=155455)
        <rdar://problem/25502181>

        Only check the code signature of the client app if the "user-directory-suffix" sandbox
        initialization parameter will not be used. This parameter is only used/passed as an
        initialization parameter if the client app is not sandboxed, which seems sufficient
        criterion to determine whether it is safe to honor it.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

2016-04-01  Jiewen Tan  <jiewen_tan@apple.com>

        WebKit should dispatchDidFailProvisionalLoad while loading invalid URLs
        https://bugs.webkit.org/show_bug.cgi?id=155995
        <rdar://problem/14967004>

        Reviewed by Andy Estes.

        Ensure that alternative HTML string will not be loaded back to back for
        failing provisional loads.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadAlternateHTMLString):
        (WebKit::WebPageProxy::didFinishLoadForFrame):
        * UIProcess/WebPageProxy.h:

2016-04-01  Brent Fulgham  <bfulgham@apple.com>

        Confirm <a download> satisfies specification criteria
        https://bugs.webkit.org/show_bug.cgi?id=156057

        Reviewed by Andy Estes.

        * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
        (WKBundleNavigationActionGetHasDownloadAttribute): Added.
        * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
        (WebKit::InjectedBundleNavigationAction::hasDownloadAttribute): Added.

2016-04-01  Alex Christensen  <achristensen@webkit.org>

        CMake build fix.

        * PlatformMac.cmake:

2016-04-01  Alex Christensen  <achristensen@webkit.org>

        Compile DumpRenderTree with CMake on Mac
        https://bugs.webkit.org/show_bug.cgi?id=156088

        Reviewed by Brent Fulgham.

        * CMakeLists.txt:
        * PlatformMac.cmake:
        * UIProcess/API/Cocoa/WebKitLegacy.h: Added.

2016-03-31  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Unreviewed EFL build fix caused by r198929.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::layerVolatilityTimerFired): Need to use type casting in WEBPAGE_LOG_ALWAYS_ERROR() log.

2016-03-31  Daniel Bates  <dabates@apple.com>

        REGRESSION (r194660): Navigating to HTTPS sites may fail with error
        https://bugs.webkit.org/show_bug.cgi?id=155455
        <rdar://problem/24308793>

        Reviewed by Alexey Proskuryakov.

        Fixes an issue where navigating to an HTTPS site may fail because the Security Framework uses
        a cache directory that it does not have permission to use.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::codeSigningIdentifierForProcess): Queries the Security Framework for the code signed
        bundle identifier/code signing identifier.
        (WebKit::ChildProcess::initializeSandbox): Use the client identifier as part of the user directory
        suffix. Verify that the client identifier matches the code signed bundled identifier/code
        signing identifier for the code signed app/tool. Fix minor code style issue; use a C++-style cast
        instead of a C-style cast when casting an OSStatus to a long.
        (WebKit::findSecCodeForProcess): Deleted; incorporated logic into WebKit::codeSigningIdentifierForProcess().

2016-03-31  Saam barati  <sbarati@apple.com>

        Revert rewrite const as var workaround
        https://bugs.webkit.org/show_bug.cgi?id=155393

        Reviewed by Mark Lam.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-03-31  Chris Dumez  <cdumez@apple.com>

        [iOS] Both WebPage's volatility timer and WebProcess's processSuspensionCleanupTimer are trying to make surfaces volatile with very short interval
        https://bugs.webkit.org/show_bug.cgi?id=156065
        <rdar://problem/25452004>

        Reviewed by Simon Fraser.

        Upon process suspension, both the WebPage's volatility timer and
        WebProcess' processSuspensionCleanupTimer are trying to make surfaces
        volatile with a very short interval. This is overly aggressive given
        that this operation normally succeeds very quickly or does not (due
        to underlying bugs).

        This patch does the following:
        - Drop the WebProcess' processSuspensionCleanupTimer and have the
          WebProcess drive the WebPages' volatility timer instead.
        - Update the WebPages' volatility timer to do exponential back off.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::layerVolatilityTimerFired):
        (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
        (WebKit::WebPage::markLayersVolatile):
        (WebKit::WebPage::cancelMarkLayersVolatile):
        (WebKit::WebPage::isAlwaysOnLoggingAllowed):
        (WebKit::WebPage::setLayerTreeStateIsFrozen): Deleted.
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::markLayersVolatile):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::applicationDidEnterBackground):
        (WebKit::WebPage::applicationWillEnterForeground):
        (WebKit::WebPage::applicationDidBecomeActive): Deleted.
        (WebKit::adjustVelocityDataForBoundedScale): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::actualPrepareToSuspend):
        (WebKit::WebProcess::processWillSuspendImminently):
        (WebKit::WebProcess::prepareToSuspend):
        (WebKit::WebProcess::cancelPrepareToSuspend):
        (WebKit::WebProcess::markAllLayersVolatile):
        (WebKit::WebProcess::cancelMarkAllLayersVolatile):
        (WebKit::WebProcess::setAllLayerTreeStatesFrozen):
        (WebKit::WebProcess::processDidResume):
        (WebKit::WebProcess::WebProcess): Deleted.
        * WebProcess/WebProcess.h:

2016-03-31  Brian Burg  <bburg@apple.com>

        Web Automation: the interaction queue in WebAutomationSession::performKeyInteractions doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=156083

        Reviewed by Timothy Hatcher.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::performKeyboardInteractions):
        Use Vector::reserveCapacity instead of the size constructor since we use append.
        Empty the interaction queue outside of loops so all interactions are performed once.

2016-03-31  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add support for script timeouts to the evaluateJavaScriptFunction command

        https://bugs.webkit.org/show_bug.cgi?id=156052
        rdar://problem/25457151

        Address additional review comments.

        * WebProcess/Automation/WebAutomationSessionProxy.js:
        (AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Add semicolons and remove
        and clearTimeout that wasn't needed.

2016-03-31  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Navigation commands should not return until page loads or fails

        https://bugs.webkit.org/show_bug.cgi?id=156063
        rdar://problem/25464373

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json: Make navigation commands async.
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::navigateBrowsingContext): Save callback and timeout previous.
        (WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
        (WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
        (WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
        (WebKit::WebAutomationSession::navigationOccuredForPage): Added. Fire callback for page.
        * UIProcess/Automation/WebAutomationSession.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFinishLoadForFrame): Call WebAutomationSession::navigationOccuredForPage.
        (WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.

        * UIProcess/WebProcessPool.h: Added automationSession() getter.

2016-03-30  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add support for script timeouts to the evaluateJavaScriptFunction command

        https://bugs.webkit.org/show_bug.cgi?id=156052
        rdar://problem/25457151

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json: Added callbackTimeout to evaluateJavaScriptFunction.
        Also made expectsImplicitCallbackArgument optional, since it is not required. Added JavaScriptTimeout error.
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction): Added callbackTimeout.
        * UIProcess/Automation/WebAutomationSession.h:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::evaluateJavaScriptCallback): Send JavaScriptTimeout error if the timeout fired.
        (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Added callbackTimeout.
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.js:
        (AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Set a timeout to fire if the
        callback is not called, then return an error.
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
        (EvaluateJavaScriptFunction): Added callbackTimeout parameter.

2016-03-31  Jiewen Tan  <jiewen_tan@apple.com>

        WebKit should set Original URL of a download request correctly
        https://bugs.webkit.org/show_bug.cgi?id=155914
        <rdar://problem/10473811>

        Reviewed by Anders Carlsson.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::findPendingDownloadLocation):
        * NetworkProcess/NetworkProcess.h:
        Add logic to set the original URL of a download request when a main resource load
        is converted to a download.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::download):
        * UIProcess/WebProcessPool.h:
        Add logic to set the original URL of a download request during a context menu:
        Download Linked File action.

2016-03-31  Joseph Pecoraro  <pecoraro@apple.com>

        Web Automation: Add Automation.screenshot
        https://bugs.webkit.org/show_bug.cgi?id=156073
        <rdar://problem/25468646>

        Reviewed by Timothy Hatcher and Brian Burg.

        * UIProcess/Automation/Automation.json:
        Add Automation.screenshot which returns base64 encoded PNG data.

        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::screenshot):
        (WebKit::WebAutomationSession::didTakeScreenshot):
        (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
        Send a message to the WebPage to get an Image of the page
        and handle the response.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
        Convert the bitmap data to a base64 encoded PNG.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Automation/WebAutomationSession.messages.in:
        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::evaluateJavaScriptCallback):
        (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
        (WebKit::WebAutomationSessionProxy::resolveParentFrame):
        (WebKit::WebAutomationSessionProxy::computeElementLayout):
        Use null string where possible for efficiency.

        (WebKit::WebAutomationSessionProxy::takeScreenshot):
        Take an image of the entire page and pass back to the UIProcess.

2016-03-31  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Handle undefined when calling a function that has no result

        https://bugs.webkit.org/show_bug.cgi?id=156075
        rdar://problem/25468907

        Reviewed by Brian Burg.

        * WebProcess/Automation/WebAutomationSessionProxy.js:
        (let.AutomationSessionProxy.prototype._jsonParse): Return undefined for empty string.
        (let.AutomationSessionProxy.prototype._jsonStringify): Always return a string.

2016-03-31  Jeremy Jones  <jeremyj@apple.com>

        mediaShouldUsePersistentCache() is redundant. Use Page::usesEphemeralSession() instead.
        https://bugs.webkit.org/show_bug.cgi?id=155924

        Reviewed by Simon Fraser.

        Remove machinery for mediaShouldUsePersistentCache as it is redundant.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode): Deleted.
        (WebKit::WebPageCreationParameters::decode): Deleted.
        * Shared/WebPageCreationParameters.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::mediaShouldUsePersistentCache): Deleted.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_mediaShouldUsePersistentCache): Deleted.
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::mediaShouldUsePersistentCache): Deleted.

2016-03-30  Ada Chan  <adachan@apple.com>

        Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.
        https://bugs.webkit.org/show_bug.cgi?id=156031

        Reviewed by Eric Carlson.

        * Shared/API/c/WKContextMenuItemTypes.h:
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        (WebKit::toImpl):

2016-03-31  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed build fix after r198893.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::findPendingDownloadLocation): Pass
        new argument to download method.

2016-03-31  Brent Fulgham  <bfulgham@apple.com>

        [WK2] Support download attribute feature
        https://bugs.webkit.org/show_bug.cgi?id=102914
        <rdar://problem/13177492>

        Reviewed by Darin Adler.

        A first draft implementation of this feature.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download): Update to accept default filename.
        (WebKit::Download::didStart): Send default filename in message.
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload): Expect a default filename argument.
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::startDownload): Expect a default
        filename argument.
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Update messages to
        expect a default filename argument.
        * Shared/NavigationActionData.cpp:
        (WebKit::NavigationActionData::encode): Handle the download attribute flag and
        the default filename.
        (WebKit::NavigationActionData::decode): Ditto.
        * Shared/NavigationActionData.h:
        * UIProcess/API/APINavigationAction.h:
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::didStart): Expect a default filename argument.
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Use the suggested
        filename if the client delegate does not override it.
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Downloads/DownloadProxy.messages.in: Include a default filename value.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::receivedPolicyDecision): If the feature is enabled, and
        the load was started with a download attribute, convert a "PolicyUse" decision
        to "PolicyDownload".
        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Remember if the load
        is happening due to a 'download' attribute link.
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createWindow): Populate the navigationActionData object
        with any download attribute and suggested filename.
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Populate the
        navigationActionData object with any download attribute and suggested filename.
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
        (WebKit::WebFrameLoaderClient::startDownload): Expect a suggested filename argument.
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::startDownload): Expect a suggested filename argument.
        * WebProcess/WebPage/WebFrame.h:

2016-03-30  Alex Christensen  <achristensen@webkit.org>

        CMake build fix.

        * PlatformMac.cmake:

2016-03-30  Alex Christensen  <achristensen@webkit.org>

        Speculative Yosemite fix after r198872.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformSimulateKeySequence):
        Yosemite didn't like _Nullable.

2016-03-30  Yongjun Zhang  <yongjun_zhang@apple.com>

        Need to expose makeAllShadowRootsOpen in WKWebProcessPlugInScriptWorld.
        https://bugs.webkit.org/show_bug.cgi?id=156046

        Add an SPI makeAllShadowRootsOpen method in WKWebProcessPlugInScriptWorld.

        Reviewed by Dan Bernstein.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
        (-[WKWebProcessPlugInScriptWorld makeAllShadowRootsOpen]):

2016-03-30  Brian Burg  <bburg@apple.com>

        Web Automation: Add Automation.performKeyboardInteractions
        https://bugs.webkit.org/show_bug.cgi?id=155990
        <rdar://problem/25426408>

        Reviewed by Timothy Hatcher.

        Add a command that allows automation to simulate single
        key strokes or insertion of an entire string, character
        by character.

        * UIProcess/Automation/Automation.json: Add new command.
        Add a large enumeration of all virtual keys that exist
        on a US 109-key keyboard layout. Add an interaction object.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::performKeyboardInteractions):
        Added. This method validates the incoming key interactions
        from the protocol and makes a list of simulated interactions
        to perform. If everything validates, then delegate the key
        interaction simulations to platform-specific methods.

        (WebKit::WebAutomationSession::platformSimulateKeyStroke):
        (WebKit::WebAutomationSession::platformSimulateKeySequence):
        Add stubs for other platforms.

        * UIProcess/Automation/WebAutomationSession.h: Add new
        protocol command handler and platform simulation methods.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformSimulateKeyStroke):
        (WebKit::WebAutomationSession::platformSimulateKeySequence):
        These methods implement keyboard simulation for AppKit, used
        by the Mac port. In the keystroke case, figure out the AppKit
        keyCode for the key as well as any key modifiers that should
        be included with the key event. Keep track of sticky modifiers
        and update the session state appropriately. In the key sequence
        case, split the string into combining character sequences and
        send a 'key up/down'. This is a weird way to send non-ASCII
        text, so a better alternative should be explored in the future.

2016-03-30  Brady Eidson  <beidson@apple.com>

        Make BlobData use ThreadSafeSharedBuffer instead of RawData.
        https://bugs.webkit.org/show_bug.cgi?id=156041

        Reviewed by Alex Christensen.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::filesInBlob):
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<BlobPart>::decode):

2016-03-30  Daniel Bates  <dabates@apple.com>

        Unreviewed, rolling out r198856.

        Broke the tests on the Apple El Capitan Release WK2 (Tests)
        bot. Further investigation needed.

        Reverted changeset:

        "REGRESSION (r194660): Navigating to HTTPS sites may fail with
        error"
        https://bugs.webkit.org/show_bug.cgi?id=155455
        http://trac.webkit.org/changeset/198856

2016-03-30  Daniel Bates  <dabates@apple.com>

        REGRESSION (r194660): Navigating to HTTPS sites may fail with error
        https://bugs.webkit.org/show_bug.cgi?id=155455
        <rdar://problem/24308793>

        Reviewed by Alexey Proskuryakov.

        Fixes an issue where navigating to an HTTPS site may fail because the Security Framework uses
        a cache directory that it does not have permission to use.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::codeSigningIdentifierForProcess): Queries the Security Framework for the code signed
        bundle identifier/code signing identifier.
        (WebKit::ChildProcess::initializeSandbox): Use the client identifier as part of the user directory
        suffix. Verify that the client identifier matches the code signed bundled identifier/code
        signing identifier for the code signed app/tool. Fix minor code style issue; use a C++-style cast
        instead of a C-style cast when casting an OSStatus to a long.
        (WebKit::findSecCodeForProcess): Deleted; incorporated logic into WebKit::codeSigningIdentifierForProcess().

2016-03-30  Myles C. Maxfield  <mmaxfield@apple.com>

        Use references instead of pointers in scrollbar-related code
        https://bugs.webkit.org/show_bug.cgi?id=155998

        Reviewed by Dean Jackson.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
        (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
        (WebKit::PDFPlugin::invalidateScrollbarRect):

2016-03-29  David Kilzer  <ddkilzer@apple.com>

        REGRESSION: Yosemite-only: com.apple.WebKit.Plugin.32.Development crashed in PluginProcessShim.dylib: WebKit::shimMachVMMap + 26
        <http://webkit.org/b/156000>
        <rdar://problem/25272133>

        Reviewed by Joseph Pecoraro.

        * PluginProcess/mac/PluginProcessShim.mm:
        (WebKit::shimMachVMMap): Add SUPPRESS_ASAN attribute on
        Yosemite.

2016-03-28  Enrica Casucci  <enrica@apple.com>

        When moving focus from one select element to another (iPhone) the value is committed to the newly focused element.
        https://bugs.webkit.org/show_bug.cgi?id=155958
        rdar://problem/22738524

        Reviewed by Tim Horton.

        We should not delay the call to endEditing until we receive
        stopAssistingNode, because by then the assisted node might have already
        changed. We need to call endEditing to commit potential changes every
        time we tap. This way we can make sure the editing session on the select
        element has been completed. This affects only single select elements on
        iPhone, where the change to the actual DOM element is delayed until we
        stop interacting with the element. On iPad or for multi-select elements,
        the change to the DOM happens immediately.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _singleTapCommited:]):
        (-[WKContentView _attemptClickAtLocation:]):
        (-[WKContentView _stopAssistingNode]):

2016-03-29  Brian Burg  <bburg@apple.com>

        Unreviewed build fix after r198793.

        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.mm:
        The wasEventSynthesizedForAutomation method should only be available on Mac.

2016-03-29  Brian Burg  <bburg@apple.com>

        Unreviewed build fix after r198792.

        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformSimulateMouseInteraction):
        We (still) can't use lightweight generics in Objective-C code.
        Also, use RetainPtr instead of new, since this is not ARC code.

2016-03-29  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build after r198792.

        * PlatformMac.cmake:

2016-03-29  Brian Burg  <bburg@apple.com>

        Web Automation: Add SPI to tell whether an NSEvent was synthesized for automation
        https://bugs.webkit.org/show_bug.cgi?id=155963
        <rdar://problem/25405747>

        Reviewed by Timothy Hatcher.

        Tag all NSEvents that were synthesized with an associated object before sending.
        Do all associated object work below the API layer so we don't get into trouble
        using things that may be guarded by WK_API_ENABLED.

        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.mm:
        (-[_WKAutomationSession wasEventSynthesizedForAutomation:]):
        Forward to the wrapped session object.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::sendSynthesizedEventsToPage):
        Tag outgoing NSEvents with the session identifier as an associated object.

        (WebKit::WebAutomationSession::wasEventSynthesizedForAutomation):
        Check an incoming NSEvent to see if its associated object is the session identifier.

2016-03-28  Brian Burg  <bburg@apple.com>

        Web Automation: implement Automation.performMouseInteraction
        https://bugs.webkit.org/show_bug.cgi?id=155606
        <rdar://problem/25227576>

        Reviewed by Timothy Hatcher.

        This method implements common mouse interactions by synthesizing native events.
        The creation and dispatching of simulated events is implemented separately per
        application/window/event framework. This patch adds an implementation for ports
        that use AppKit.

        The event is created synthetically in a platform-specific way and delivered to
        the platform's window in the UIProcess. The event goes through all the
        layers of processing that a real mouse event could go through once it reaches
        WebKit itself.

        * UIProcess/Automation/Automation.json: Add new enums and command.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::protocolModifierToWebEventModifier):
        (WebKit::WebAutomationSession::performMouseInteraction): Added.
        Clip the requested cursor position so that it stays within the selected window's
        frame and doesn't wander off into other windows or applications. Fire it using
        the platform-specific simulation method.

        (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Added.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
        (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Added.
        Convert Automation protocol values to AppKit values. Simulate and dispatch
        one or more events depending on the desired interaction.
        * WebKit2Prefix.h: Include AppKitCompatibilityDeclarations.h so newer
        NSEventTypes can be used.

2016-03-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Follow up to r198580.

        Simplify the code even more as suggested by Darin.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::setViewNeedsDisplay):

2016-03-28  Alex Christensen  <achristensen@webkit.org>

        Fix Mac Ninja build after r198766.

        * CMakeLists.txt:

2016-03-28  Brady Eidson  <beidson@apple.com>

        Modern IDB: Remove abstract base classes for all IDB DOM classes.
        https://bugs.webkit.org/show_bug.cgi?id=155951

        Reviewed by Alex Christensen.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

2016-03-28  Brian Burg  <bburg@apple.com>

        Web Automation: add commands to move and resize a browsing context's window
        https://bugs.webkit.org/show_bug.cgi?id=155349
        <rdar://problem/25104911>

        Reviewed by Timothy Hatcher.

        Parse the new origin or size and request the window to change to the
        new frame. This calls through to PageUIClient::setWindowFrame().

        * UIProcess/Automation/Automation.json:
        Add new enum values for protocol parsing error cases.
        Add new commands.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
        (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
        Added. Parse the incoming payload and bail if nothing would happen
        or the values are not usable or out of range. Complain if a change
        did not happen when the requested and actual size are different.

        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/WebPageProxy.h: Move setWindowFrame to be public.

2016-03-28  Brian Burg  <bburg@apple.com>

        Web Automation: split protocol object BrowsingContext.windowFrame into two separate members
        https://bugs.webkit.org/show_bug.cgi?id=155952
        <rdar://problem/25393597>

        Reviewed by Timothy Hatcher.

        Using the name 'windowFrame' causes conflicts with some Objective-C code.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::buildBrowsingContextForPage):

2016-03-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [CMake] Unreviewed build fix after r198736.
        https://bugs.webkit.org/show_bug.cgi?id=155221

        Unreviewed.

        * CMakeLists.txt: Fix typo, add WebAutomationSession.cpp and declare JavaScriptCore_SCRIPTS_DIR.
        * WebProcess/Automation/WebAutomationSessionProxy.h: Add missing include.

2016-03-28  Alex Christensen  <achristensen@webkit.org>

        Use std::exchange for std::functions instead of WTFMove
        https://bugs.webkit.org/show_bug.cgi?id=155950
        rdar://problem/25348817

        Reviewed by Anders Carlsson.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        This makes the member variable nullptr when the value is moved so we don't use it again.

2016-03-28  Brian Burg  <bburg@apple.com>

        Web Automation: report the browsing context's window frame (size and origin)
        https://bugs.webkit.org/show_bug.cgi?id=155323
        <rdar://problem/25094089>

        Reviewed by Timothy Hatcher.

        To prepare for implementing resize and move commands, add a
        windowFrame member to the browsing context protocol type.

        * UIProcess/Automation/Automation.json:
        Add a frame Rect to BrowsingContext.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::handleForWebPageProxy):
        (WebKit::WebAutomationSession::buildBrowsingContextForPage):
        Extract the code to build a BrowsingContext object. Add
        code to calculate and insert the page's window frame size.

        (WebKit::WebAutomationSession::getBrowsingContexts):
        (WebKit::WebAutomationSession::getBrowsingContext):
        (WebKit::WebAutomationSession::createBrowsingContext):
        (WebKit::WebAutomationSession::switchToBrowsingContext):
        Refactoring as above.

        * UIProcess/Automation/WebAutomationSession.h:
        Adjust signatures.

        * UIProcess/WebPageProxy.h: Make getWindowFrame public.

2016-03-28  Brian Burg  <bburg@apple.com>

        Unreviewed, fix the build.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        InspectorProtocolObjects.h was renamed to AutomationProtocolObjects.h.

2016-03-28  Chris Dumez  <cdumez@apple.com>

        Disk cache speculative validation requests do not have the 'Referer' HTTP header set
        https://bugs.webkit.org/show_bug.cgi?id=155890
        <rdar://problem/25279962>

        Reviewed by Antti Koivisto.

        Disk cache speculative validation requests did not have the 'Referer'
        HTTP header set. This was breaking some streaming sites (such as
        twitch.tv).

        We now store all the original request's HTTP headers in the disk cache
        so we can re-use them for the speculative validation requests. When the
        actual request comes later on, we also make sure that the HTTP headers
        used in the speculative validation request match the ones from the
        effective request. If they don't we don't use the speculatively
        validated resource as the server may return a different resource in
        such case.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        Pass the effective ResourceRequest to the NetworkCacheSpeculativeLoadManager
        so it can check that the speculative validation request's HTTP headers
        match the effective request's headers.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::wasRevalidated):
        We now have a member in PreloadedEntry to keep the request used for validation, if
        speculative validation was done. This is so that we can compare its HTTP headers
        with the ones of the effective request later on.

        (WebKit::NetworkCache::dumpHTTPHeadersDiff):
        Debug function that prints which HTTP headers did not match in the speculative
        validation request and in the effective request.

        (WebKit::NetworkCache::requestsHeadersMatch):
        New utility function to check that the speculative validation request's HTTP
        headers match the ones of the effective requests. Note that we allow for
        headers related to validation to differ.

        (WebKit::NetworkCache::SpeculativeLoadManager::canUsePreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::canUsePendingPreload):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
        Check that the speculative validation request's HTTP headers match the
        ones of the effective request. If they don't then do not use the
        speculatively validated resource.

        (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:

        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourceInfo::encode):
        (WebKit::NetworkCache::SubresourceInfo::decode):
        (WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
        (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
        (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
        - Keep all the request's headers in SubresourceInfo instead of just the
          'User-Agent' one.
        - Drop the custom copy constructor / assignment operator for
          SubresourceInfo that were making isolated copies on the members.
          We technically don't need to use SubresourceInfo objects in other
          threads than the main one. In SpeculativeLoadManager::preloadEntry(),
          we now make capture a SubresourceInfo* in the lambda to avoid calling
          the copy constructor. We also make sure that the object gets destroyed
          in the lambda function, which is executed in the main thread.

2016-03-25  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add Automation protocol commands to handle JavaScript dialogs

        https://bugs.webkit.org/show_bug.cgi?id=155888
        rdar://problem/25360218

        Reviewed by Brian Burg.

        * UIProcess/API/APIAutomationSessionClient.h:
        (API::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
        (API::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
        (API::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
        (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
        (API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

        * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:

        * UIProcess/Automation/Automation.json: Added new commands.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::isShowingJavaScriptDialog): Added.
        (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog): Added.
        (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog): Added.
        (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog): Added.
        (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt): Added.
        * UIProcess/Automation/WebAutomationSession.h:

        * UIProcess/Cocoa/AutomationSessionClient.h:
        * UIProcess/Cocoa/AutomationSessionClient.mm:
        (WebKit::AutomationSessionClient::AutomationSessionClient): Added.
        (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
        (WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
        (WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
        (WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
        (WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

2016-03-24  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add commands to compute layout of an element

        https://bugs.webkit.org/show_bug.cgi?id=155841
        rdar://problem/25340075

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json: Added computeElementLayout.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::computeElementLayout): Added.
        (WebKit::WebAutomationSession::didComputeElementLayout): Added.
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Automation/WebAutomationSession.messages.in:
        (DidComputeElementLayout): Added.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::computeElementLayout): Added.
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
        (ComputeElementLayout): Added.

2016-03-18  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add Automation protocol commands to resolve frames as handles

        https://bugs.webkit.org/show_bug.cgi?id=155650
        rdar://problem/25242422

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json:
        Added resolveFrameHandle and resolveParentFrameHandle.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::webFrameProxyForHandle): Added.
        (WebKit::WebAutomationSession::handleForWebFrameID): Added.
        (WebKit::WebAutomationSession::handleForWebFrameProxy): Added.
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction): Use frame handles now.
        (WebKit::WebAutomationSession::resolveChildFrameHandle): Added.
        (WebKit::WebAutomationSession::didChildResolveFrame): Added.
        (WebKit::WebAutomationSession::resolveParentFrameHandle): Added.
        (WebKit::WebAutomationSession::didResolveParentFrame): Added.
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Automation/WebAutomationSession.messages.in:
        (DidResolveChildFrame): Added.
        (DidResolveParentFrame): Added.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::WebAutomationSessionProxy::elementForNodeHandle): Added.
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal): Added.
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle): Added.
        (WebKit::WebAutomationSessionProxy::resolveChildFrameWithName): Added.
        (WebKit::WebAutomationSessionProxy::resolveParentFrame): Added.
        (WebKit::WebAutomationSessionProxy::focusFrame): Added.
        * WebProcess/Automation/WebAutomationSessionProxy.h:
        * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
        (ResolveChildFrameWithOrdinal): Added.
        (ResolveChildFrameWithNodeHandle): Added.
        (ResolveChildFrameWithName): Added.
        (ResolveParentFrame): Added.
        (FocusFrame): Added.

        * WebProcess/Automation/WebAutomationSessionProxy.js:
        (AutomationSessionProxy.prototype.nodeForIdentifier): Added.
        Public method that eats the exception thrown by the private method.

2016-03-17  Timothy Hatcher  <timothy@apple.com>

        Web Automation: Add Automation.evaluateJavaScriptFunction

        https://bugs.webkit.org/show_bug.cgi?id=155524
        rdar://problem/25181888

        Reviewed by Joseph Pecoraro.

        * UIProcess/Automation/Automation.json: Added evaluateJavaScriptFunction command.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::evaluateJavaScriptFunction): Added.
        (WebKit::WebAutomationSession::didEvaluateJavaScriptFunction): Added.
        * UIProcess/Automation/WebAutomationSession.h:
        * UIProcess/Automation/WebAutomationSession.messages.in: Added didEvaluateJavaScriptFunction.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
        (WebKit::toJSArray): Added.
        (WebKit::callPropertyFunction): Added.
        (WebKit::evaluateJavaScriptCallback): Added.
        (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): Dispatch pending callbacks as errors.
        (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Added.
        (WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction): Added.
        * WebProcess/Automation/WebAutomationSessionProxy.h:

        * WebProcess/Automation/WebAutomationSessionProxy.js:
        (AutomationSessionProxy): Added maps for node handles.
        (AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Added.
        (AutomationSessionProxy.prototype._jsonParse): Added.
        (AutomationSessionProxy.prototype._jsonStringify): Added.
        (AutomationSessionProxy.prototype._reviveJSONValue): Added.
        (AutomationSessionProxy.prototype._replaceJSONValue): Added.
        (AutomationSessionProxy.prototype._createNodeHandle): Added.
        (AutomationSessionProxy.prototype._nodeForIdentifier): Added.
        (AutomationSessionProxy.prototype._identifierForNode): Added.

        * WebProcess/Automation/WebAutomationSessionProxy.messages.in: Added evaluateJavaScriptFunction.

2016-03-14  Timothy Hatcher  <timothy@apple.com>

        Add WebAutomationSessionProxy for WebProcess side automation tasks

        https://bugs.webkit.org/show_bug.cgi?id=155221
        rdar://problem/25054868

        Reviewed by Joseph Pecoraro.

        * CMakeLists.txt: Add build step to build-in WebAutomationSessionProxy.js.
        * DerivedSources.make: Ditto.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::~WebAutomationSession):
        (WebKit::WebAutomationSession::setProcessPool): Add / remove message receiver.
        * UIProcess/Automation/WebAutomationSession.h:

        * UIProcess/Automation/WebAutomationSession.messages.in: Added.
        Test message to get things to build.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::removeMessageReceiver):
        (WebKit::WebProcessPool::setAutomationSession):
        * UIProcess/WebProcessPool.h:

        * WebKit2.xcodeproj/project.pbxproj: Added new files.

        * WebProcess/Automation/WebAutomationSessionProxy.cpp: Added.
        (WebKit::toJSString):
        (WebKit::toJSValue):
        (WebKit::WebAutomationSessionProxy::WebAutomationSessionProxy):
        (WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy):
        (WebKit::evaluate):
        (WebKit::createUUID):
        (WebKit::WebAutomationSessionProxy::scriptObjectForFrame):
        (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
        Create a script object per frame that is evaluated from WebAutomationSessionProxy.js.
        Clear the script object when the window object is cleared.

        * WebProcess/Automation/WebAutomationSessionProxy.h: Added.
        (WebKit::WebAutomationSessionProxy::test):
        Added test message to let the messages files build.

        * WebProcess/Automation/WebAutomationSessionProxy.js: Added.

        * WebProcess/Automation/WebAutomationSessionProxy.messages.in: Added.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
        Call WebAutomationSessionProxy::didClearWindowObjectForFrame to clear the script object.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::ensureAutomationSessionProxy):
        (WebKit::WebProcess::destroyAutomationSessionProxy):
        Creates and destroys the WebAutomationSessionProxy when the UIProcess WebAutomationSession
        is set or removed on the WebProcessPool.

        * WebProcess/WebProcess.h:
        (WebKit::WebProcess::automationSessionProxy): Added.

        * WebProcess/WebProcess.messages.in: Added. Test message to get things to build.

2016-03-28  Dan Bernstein  <mitz@apple.com>

        Tried to fix the build after r198728.

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

2016-03-28  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed GTK build fix for the threaded compositor feature after r198655.
        Adjust the first parameter of ThreadSafeCoordinatedSurface::copyToTexture().

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
        (WebKit::ThreadSafeCoordinatedSurface::copyToTexture):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:

2016-03-27  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
        https://bugs.webkit.org/show_bug.cgi?id=148470

        Reviewed by Darin Adler.

        UI events are suppressed in webPage after r188793.
        I revert the r136133 for passing the events to WebPage

        * WebProcess/WebPage/WebPage.cpp: Removed the codes which was uploaded at r136133.
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::wheelEvent):
        (WebKit::WebPage::keyEvent):
        (WebKit::WebPage::touchEvent):
        (WebKit::WebPage::canHandleUserEvents): Deleted.
        * WebProcess/WebPage/WebPage.h:

2016-03-26  Dan Bernstein  <mitz@apple.com>

        Tried to fix the build.

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

2016-03-26  Dan Bernstein  <mitz@apple.com>

        Tried to fix the build.

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

2016-03-26  Dean Jackson  <dino@apple.com>

        Fix build after my most recent commit.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (WebKit::bufferFormat): Delete the WebKitAdditions include.

2016-03-25  Dean Jackson  <dino@apple.com>

        Move extended color detection into Open Source
        https://bugs.webkit.org/show_bug.cgi?id=155909
        <rdar://problem/25369754>

        Reviewed by Anders Carlsson.

        The code for detecting extended color displays
        was hidden while the iPad Pro 9.7" was in development.
        Now it is public, move the detection to Open Source.

        While doing this, add a new method to PlatformScreen
        so that we have a more obvious way to detect such
        displays.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::bufferFormat): No need to use WebKitAdditions any
        more.

2016-03-26  Dan Bernstein  <mitz@apple.com>

        Treat SHA-1-signed certificates as insecure by default.

        Reviewed by Sam Weinig.

        * UIProcess/API/APIPageConfiguration.h: Initialize m_treatsSHA1SignedCertificatesAsInsecure
          to true.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Initialize _treatsSHA1SignedCertificatesAsInsecure to YES.

2016-03-25  Dean Jackson  <dino@apple.com>

        Remove use of extern "C" to include QuartzCore files
        https://bugs.webkit.org/show_bug.cgi?id=155905

        Reviewed by Anders Carlson.

        We can avoid having to wrap constants in extern "C", since they
        are mangled the same in both C and C++.

        * UIProcess/mac/RemoteLayerTreeHost.mm: Remove the
        mention of CABackdropLayer.

2016-03-25  Brian Burg  <bburg@apple.com>

        Web Inspector: protocol generator should prefix C++ filenames with the protocol group
        https://bugs.webkit.org/show_bug.cgi?id=155859
        <rdar://problem/25349859>

        Reviewed by Alex Christensen and Joseph Pecoraro.

        Adjust header include and build system paths.

        * CMakeLists.txt:
        Revert the workaround introduced in r198659 since this change fixes the
        underlying issue.

        * DerivedSources.make:
        * UIProcess/Automation/WebAutomationSession.cpp:
        * UIProcess/Automation/WebAutomationSession.h:
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-25  Alex Christensen  <achristensen@webkit.org>

        Remove unused lambda capture after r196984.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        resourceResponse is not used in the lambda.

2016-03-25  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build.

        * PlatformMac.cmake:

2016-03-24  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build.

        * CMakeLists.txt:
        Temporarily add DERIVED_SOURCES_JAVASCRIPTCORE_DIR after DERIVED_SOURCES_WEBCORE_DIR,
        because both contain a unique header named InspectorBackendDispatchers.h and this include
        order includes the correct one for WebKit2 first.
        * PlatformMac.cmake:
        Add new files.  Optionally link to AVFAudio.

2016-03-24  Said Abou-Hallawa  <sabouhallawa@apple,com>

        Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
        https://bugs.webkit.org/show_bug.cgi?id=155412

        Reviewed by Darin Adler.

        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::createWithSurface):
        (WebKit::WebCoordinatedSurface::create):
        (WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
        (WebKit::WebCoordinatedSurface::copyToTexture):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
        * Shared/ShareableBitmap.cpp:
        (WebKit::ShareableBitmap::create):
        (WebKit::ShareableBitmap::createShareable):
        (WebKit::ShareableBitmap::ShareableBitmap):
        * Shared/ShareableBitmap.h:
        Replace PassRefPtr with RefPtr and use WTFMove() instead of RefPtr::release()
        when passing the RefPtr.
        
        * Shared/cairo/ShareableBitmapCairo.cpp:
        (WebKit::createSurfaceFromData):
        (WebKit::ShareableBitmap::createCairoSurface):
        Replace PassRefPtr with RefPtr.
        
        (WebKit::ShareableBitmap::createImage):
        * Shared/cg/ShareableBitmapCG.cpp:
        (WebKit::ShareableBitmap::createImage):
        Replace PassRefPtr with RefPtr and use the move semantics when calling
        BitmapImage::create().

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface):
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
        Replace PassRefPtr with RefPtr

2016-03-24  Enrica Casucci  <enrica@apple.com>

        Adopt new SPI from DataDetectorsCore to decide link behavior.
        https://bugs.webkit.org/show_bug.cgi?id=155780
        rdar://problem/25303631

        Reviewed by Sam Weinig.

        Changed use of data detection functions to take
        a reference to Element instead of a pointer.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::handleTap):
        (WebKit::WebPage::commitPotentialTap):
        (WebKit::WebPage::getPositionInformation):

2016-03-24  Chris Dumez  <cdumez@apple.com>

        [WK2] Disable network cache speculative validation by default
        https://bugs.webkit.org/show_bug.cgi?id=155857
        <rdar://problem/25233210>

        Reviewed by Alex Christensen.

        Disable network cache speculative validation by default. Clients such
        as Safari now use the API added in r198544 to enable if they want.

        * UIProcess/API/APIProcessPoolConfiguration.h:

2016-03-24  Alex Christensen  <achristensen@webkit.org>

        Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtectionSpace
        https://bugs.webkit.org/show_bug.cgi?id=155799
        rdar://25289012

        Reviewed by Tim Horton.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        Null-check all the things!

2016-03-23  Tim Horton  <timothy_horton@apple.com>

        MiniBrowser doesn't use accelerated drawing in WebKit2 windows if a WebKit1 window was opened first
        https://bugs.webkit.org/show_bug.cgi?id=141576
        <rdar://problem/25304548>

        Reviewed by Simon Fraser.

        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences init]):
        Make the NSUserDefaults key prefix for debug preferences (the only ones read
        from NSUserDefaults) "WebKitDebug" instead of just "WebKit" so that they
        don't conflict with the names that WebKit1 registers default values for.

2016-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method
        https://bugs.webkit.org/show_bug.cgi?id=155747

        Reviewed by Darin Adler.

        This way instead of calling setViewNeedsDisplay() for every
        rectangle in the damage area, we can build a region and call
        setViewNeedsDisplay() once. GTK+ has API to queue a redraw for a
        given region, so we also avoid scheduling multiple redraws in GTK+
        port.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::setViewNeedsDisplay): Convert the Region
        into a cairo_region_t and use gtk_widget_queue_draw_region()
        instyead of gtk_widget_queue_draw_area().
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Build a Region
        with the damage rectangles and call
        WebPageProxy::setViewNeedsDisplay() once.
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setViewNeedsDisplay):
        * UIProcess/WebPageProxy.h:
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::setViewNeedsDisplay):
        * UIProcess/efl/WebView.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::setViewNeedsDisplay):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setViewNeedsDisplay):

2016-03-22  Tim Horton  <timothy_horton@apple.com>

        Invoking a link preview on a complex link (e.g. an image) results in an empty TextIndicator
        https://bugs.webkit.org/show_bug.cgi?id=155779
        <rdar://problem/22408793>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::dictionaryPopupInfoForRange):
        (WebKit::WebPage::performImmediateActionHitTestAtLocation):
        Use the TextIndicator mode where we give up on selection-only snapshotting
        and just paint all content on Mac, similar to what we do for 3D Touch indicators.

2016-03-22  Alex Christensen  <achristensen@webkit.org>

        Fix HTTPS on Mac using NSURLSession after r198457
        https://bugs.webkit.org/show_bug.cgi?id=155774
        <rdar://problem/25301027>

        Reviewed by Anders Carlsson.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::NetworkSession):
        r198457 was intended to fix an issue on iOS and have no change in behavior on Mac.
        It did have a subtle change in behavior, setting the source application bundle identifier
        on iOS and was causing problems with HTTPS connections using NSURLSession, so this patch
        reverts that change.

2016-03-22  Beth Dakin  <bdakin@apple.com>

        Advanced spell checking should be guarded behind 
        HAVE(ADVANCED_SPELL_CHECKING)
        https://bugs.webkit.org/show_bug.cgi?id=155738

        Reviewed by Geoff Garen.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
        (WebKit::WebViewImpl::handleRequestedCandidates):
        (WebKit::WebViewImpl::insertText):
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        * config.h:

2016-03-22  Chris Dumez  <cdumez@apple.com>

        Add a setting to let the client toggle support for network cache speculative validation
        https://bugs.webkit.org/show_bug.cgi?id=155622
        <rdar://problem/25233209>

        Reviewed by Antti Koivisto.

        Copy new m_diskCacheSpeculativeValidationEnabled member introduced
        in r198470 in ProcessPoolConfiguration::copy().

        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::copy):

2016-03-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebInspector broken after r197620
        https://bugs.webkit.org/show_bug.cgi?id=155497
        <rdar://problem/25171910>

        Reviewed by Philippe Normand.

        Stop registering resource:// URLs as local, because they are not
        like a local file at all. Compare also the URL protocols when
        checking whether requested URL is main or test inspector page
        instead of checking that the protocol is registered as local.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::isMainOrTestInspectorPage): Compare also the URL protocols.
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Do not
        set setAllowFileAccessFromFileURLs setting to true.
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess): Do not
        register resource:// URLS as local.

2016-03-22  Alberto Garcia  <berto@igalia.com>

        Unreviewed typo fixes.

        * Shared/linux/WebMemorySamplerLinux.cpp:
        (WebKit::WebMemorySampler::sampleWebKit): "Commited" => "Committed"
        * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
        (webkit_file_chooser_request_select_files): "choosen" => "chosen"
        * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
        (webkit_user_media_permission_request_class_init): "Wether" => "Whether"

2016-03-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        Remove unused display and scroll view methods from PageClient and WebPageProxy
        https://bugs.webkit.org/show_bug.cgi?id=155744

        Reviewed by Andreas Kling.

        We have displayView(), canScrollView() and scrollView() that are
        used by DrawingAreaProxyImpl which is only used by GTK+ port that
        doesn't implement those methods.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::displayView): Deleted.
        (WebKit::PageClientImpl::scrollView): Deleted.
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Update the
        whole view when scrolling, or the damage area otherwise.
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::displayView): Deleted.
        (WebKit::WebPageProxy::canScrollView): Deleted.
        (WebKit::WebPageProxy::scrollView): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::displayView): Deleted.
        (WebKit::WebView::scrollView): Deleted.
        * UIProcess/efl/WebView.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::displayView): Deleted.
        (WebKit::PageClientImpl::canScrollView): Deleted.
        (WebKit::PageClientImpl::scrollView): Deleted.
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::displayView): Deleted.
        (WebKit::PageClientImpl::canScrollView): Deleted.
        (WebKit::PageClientImpl::scrollView): Deleted.

2016-03-22  Zan Dobersek  <zdobersek@igalia.com>

        [CoordinatedGraphics] Polish std::function<> usage in ThreadedCompositor, CoordinatedGraphicsScene
        https://bugs.webkit.org/show_bug.cgi?id=155726

        Reviewed by Darin Adler.

        Adjust the methods in ThreadedCompositor and CoordinatedGraphicsScene
        classes to accept std::function<> arguments via rvalue references. This
        should prevent both unnecessary copies and moves.

        Fix lambda expressions that are most commonly used to construct the
        std::function<> objects so that they don't capture-by-value by default,
        but instead list the captured values verbosely. This part alone exposed
        an issue in ThreadedCompositor::didChangeVisibleRect() where we were
        capturing the `this' value by default, instead of a protector RefPtr.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
        (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
        (WebKit::CoordinatedGraphicsScene::commitSceneState):
        (WebKit::CoordinatedGraphicsScene::purgeGLResources):
        (WebKit::CoordinatedGraphicsScene::commitScrollOffset):
        (WebKit::CoordinatedGraphicsScene::appendUpdate):
        (WebKit::CoordinatedGraphicsScene::setActive):
        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::CompositingRunLoop::CompositingRunLoop):
        (WebKit::CompositingRunLoop::callOnCompositingRunLoop):
        (WebKit::ThreadedCompositor::setNeedsDisplay):
        (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
        (WebKit::ThreadedCompositor::setDeviceScaleFactor):
        (WebKit::ThreadedCompositor::didChangeViewportSize):
        (WebKit::ThreadedCompositor::didChangeViewportAttribute):
        (WebKit::ThreadedCompositor::didChangeContentsSize):
        (WebKit::ThreadedCompositor::scrollTo):
        (WebKit::ThreadedCompositor::scrollBy):
        (WebKit::ThreadedCompositor::didChangeVisibleRect):
        (WebKit::ThreadedCompositor::callOnCompositingThread):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

2016-03-22  Zan Dobersek  <zdobersek@igalia.com>

        [CoordinatedGraphics] Prefer RunLoop::main().dispatch() over callOnMainThread()
        https://bugs.webkit.org/show_bug.cgi?id=155725

        Reviewed by Darin Adler.

        Unify the CoordinatedGraphics code in the WebKit2 layer to use RunLoop
        for dispatching tasks on either the main thread or the composition thread
        in case of using the threaded compositor. The latter is already the default,
        so this patch just replaces calls to callOnMainThread() with calls to
        RunLoop::main().dispatch().

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::didChangeVisibleRect):

2016-03-18  Enrica Casucci  <enrica@apple.com>

        Enable preview of images as attachments.
        https://bugs.webkit.org/show_bug.cgi?id=155674
        rdar://problem/25242656

        Reviewed by Darin Adler.

        If the client cannot handle image preview, but can handle attachments,
        let them handle images as attachments.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):

2016-03-20  Dan Bernstein  <mitz@apple.com>

        [Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
        https://bugs.webkit.org/show_bug.cgi?id=155707
        <rdar://problem/24980691>

        Reviewed by Darin Adler.

        * Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
          component of MACOSX_DEPLOYMENT_TARGET.
        * Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
          TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

2016-03-20  Darin Adler  <darin@apple.com>

        Disable Caches in Safari's Develop menu does not disable caches.
        https://bugs.webkit.org/show_bug.cgi?id=64483

        Reviewed by Antti Koivisto.

        Moved functions from WKPreferences to WKPage.

        * Shared/WebPreferencesDefinitions.h: Removed ResourceCachingDisabled.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetResourceCachingDisabled): Added.
        (WKPageSetResourceCachingDisabled): Added.
        * UIProcess/API/C/WKPagePrivate.h: Added above functions.
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetResourceCachingDisabled): Deleted.
        (WKPreferencesGetResourceCachingDisabled): Deleted.
        * UIProcess/API/C/WKPreferencesRefPrivate.h: Deleted above functions.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setResourceCachingDisabled): Added.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isResourceCachingDisabled): Added.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Removed code to set the setting
        for resourceCachingDisabled..
        (WebKit::WebPage::setResourceCachingDisabled): Added.
        * WebProcess/WebPage/WebPage.h: Declared setResourceCachingDisabled.
        * WebProcess/WebPage/WebPage.messages.in: Added SetResourceCachingDisabled.

2016-03-20  Dan Bernstein  <mitz@apple.com>

        Update build settings

        Rubber-stamped by Andy Estes.

        * Configurations/DebugRelease.xcconfig:
        * Configurations/FeatureDefines.xcconfig:
        * Configurations/Version.xcconfig:

2016-03-19  Chris Dumez  <cdumez@apple.com>

        Add a setting to let the client toggle support for network cache speculative validation
        https://bugs.webkit.org/show_bug.cgi?id=155622
        <rdar://problem/25233209>

        Reviewed by Darin Adler.

        Add SPI to toggle support for network cache speculative validation.
        Enable network cache speculative validation by default for now, until
        I have a chance to update the clients to use the new SPI.

        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetDiskCacheSpeculativeValidationEnabled):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration diskCacheSpeculativeValidationEnabled]):
        (-[_WKProcessPoolConfiguration setDiskCacheSpeculativeValidationEnabled:]):
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):

2016-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=155664
        Consider to cap the size of session history data.

        In iOS, if the total history entries data exceeds a threshold (2MB at the moment), don't
        accumulate more data into the session state blob.

        Reviewed by Darin Adler.

        * UIProcess/mac/LegacySessionStateCoding.cpp:
        (WebKit::encodeSessionHistory): Stop encoding further history entries data into session state
            if the total size exceed 2MB in iOS.

2016-03-18  Alex Christensen  <achristensen@webkit.org>

        Give NSURLSessionConfiguration information about parent process
        https://bugs.webkit.org/show_bug.cgi?id=155661
        rdar://problem/25225850

        Reviewed by Anders Carlsson.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSession::sessionID):
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::partitionName):
        (WebKit::NetworkProcess::sourceApplicationAuditData):
        (WebKit::NetworkProcess::cfURLCacheOrigins):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::globalCustomProtocolManager):
        (WebKit::globalSourceApplicationAuditTokenData):
        (WebKit::NetworkSession::setCustomProtocolManager):
        (WebKit::NetworkSession::setSourceApplicationAuditTokenData):
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        Tell the NSURLSessionConfiguration what the source application bundle identifier
        and audit token data are so we can correctly keep track of which application is using data.
        This also gives CFNetwork enough information to determine if the application is allowed to
        use cell data in Settings, so it seems like we do not need to explicitly set allowsCellularAccess.
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
        (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
        (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformTerminate):
        (WebKit::WebProcess::sourceApplicationAuditData):
        (WebKit::WebProcess::initializeSandbox):
        I moved the calls to getAuditToken from RemoteNetworkingContext.mm and WebFrameNetworkingContext.mm 
        to NetworkProcessCocoa.mm and WebProcessCocoa.mm, respectively, to share with NetworkSession code, 
        which does not use NetworkingContexts.

2016-03-18  Simon Fraser  <simon.fraser@apple.com>

        Build fix after r198455.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::layerTreeCommitComplete):

2016-03-18  Simon Fraser  <simon.fraser@apple.com>

        Sideways-scrollable RTL document has wrong initial and reload offset in WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=155660

        Reviewed by Tim Horton.

        There were two problems with the scroll position of RTL documents on initial and reload
        in WKWebView.

        First, in the delegatesScrolling() code path, ScrollView::updateScrollbars() needs to
        tell someone that the scroll origin changed, to trigger a scroll to the page origin.

        Secondly, WKWebView had scrollPosition/scrollOffset confusion in various places. In
        the restorePageState() code path, WebCore passes an exposedRect; this patch makes
        it explicit that it's an exposedContentRect, and passes scrollOrigin so that it can
        be mapped into scrollOffset-relative coordinates that the UIScrollView wants.

        When reloading an RTL page, there was an additional issue; restorePageState()
        restored the exposedRect, but then we'd see the origin change as a programmatic scroll
        to 0,0, clobbering the exposedRect. Fix by using a "_commitDidRestoreExposedRect" flag
        on the WKWebView that is used to ignore the programmatic scroll in that case.

        Ideally these changes would fix fast/scrolling/scroll-position-on-reload-rtl.html, but the
        test still fails because of timing differences between OS X and iOS.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]):
        (-[WKWebView _layerTreeCommitComplete]):
        (-[WKWebView _restorePageStateToExposedRect:scrollOrigin:scale:]):
        (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
        (-[WKWebView _restorePageStateToExposedRect:scale:]): Deleted.
        (-[WKWebView _scrollToContentOffset:scrollOrigin:]): Deleted.
        * 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::requestScroll):
        (WebKit::PageClientImpl::layerTreeCommitComplete):
        (WebKit::PageClientImpl::restorePageState):
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _layerTreeCommitComplete]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::layerTreeCommitComplete):
        (WebKit::WebPageProxy::restorePageState):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::restorePageState):

2016-03-18  Brady Eidson  <beidson@apple.com>

        NSURLSession: Set download resume data when a download fails due to an error.
        https://bugs.webkit.org/show_bug.cgi?id=155665

        Reviewed by Alex Christensen.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): Save the resume data from the
          NSError userInfo if it exists.

2016-03-18  Chris Dumez  <cdumez@apple.com>

        Speculative revalidation requests do not have their HTTP user-agent set
        https://bugs.webkit.org/show_bug.cgi?id=155620
        <rdar://problem/24657567>

        Reviewed by Brady Eidson.

        Speculative revalidation requests do not have their HTTP user-agent set
        which could lead to different content getting returned by the server.

        To address the problem, we save the original request's 'user-agent' in
        the disk cache and re-use it later on for speculative validation
        requests.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourceInfo::encode):
        (WebKit::NetworkCache::SubresourceInfo::decode):
        (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
        (WebKit::NetworkCache::SubresourceInfo::operator=):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
        (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceLoads):
        (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): Deleted.
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
        (WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):

2016-03-18  Enrica Casucci  <enrica@apple.com>

        Add id attribute to _WKActivatedElementInfo.
        https://bugs.webkit.org/show_bug.cgi?id=155666
        rdar://problem/25181956

        Reviewed by Beth Dakin.

        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
        (-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]):
        (-[_WKActivatedElementInfo ID]):
        (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Deleted.
        * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showImageSheet]):
        (-[WKActionSheetAssistant showLinkSheet]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _showAttachmentSheet]):
        (-[WKContentView _showLinkSheet]):
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
        (-[WKContentView _presentedViewControllerForPreviewItemController:]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2016-03-18  Antti Koivisto  <antti@apple.com>

        Protect against excessive cache traversal
        https://bugs.webkit.org/show_bug.cgi?id=155635
        rdar://problem/24241008

        Reviewed by Darin Adler.

        We can't handle unlimited number of parallel cache traversal requests from the client.
        We'll run out of dispatch queues and other system resources. CPU will spin.

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

            Add limit of maximum 3 traversals. When exceeded return nothing and log an error.

        * NetworkProcess/cache/NetworkCache.h:

2016-03-18  Darin Adler  <darin@apple.com>

        Disable Caches in Safari's Develop menu does not disable caches.
        https://bugs.webkit.org/show_bug.cgi?id=64483

        Reviewed by Antti Koivisto.

        * Shared/WebPreferencesDefinitions.h: Added ResourceCachingDisabled.
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetResourceCachingDisabled): Added.
        (WKPreferencesGetResourceCachingDisabled): Added.
        * UIProcess/API/C/WKPreferencesRefPrivate.h: Ditto.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Push ResourceCachingDisabled setting
        into WebCore.

2016-03-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Try to fix GTK+ debug build after r198364.

        * WebProcess/gtk/WebProcessMainGtk.cpp: Use WTF::sleep().

2016-03-17  Alex Christensen  <achristensen@webkit.org>

        SpeculativeLoad needs to continue NetworkLoad when it receives a redirect response
        https://bugs.webkit.org/show_bug.cgi?id=155612

        Reviewed by Andy Estes.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
        Call continueWillSendRequest.  Otherwise, we will hang a thread in the NetworkProcess
        if we are using ResourceHandle or we will not call the willPerformHTTPRedirection 
        completion handler if we are using NetworkSession.  This will cause us to stop loading
        from the server after the maximum number of connections is reached.

2016-03-17  Tim Horton  <timothy_horton@apple.com>

        Find-in-page indicator in Mail viewer is the wrong scale and cut off
        https://bugs.webkit.org/show_bug.cgi?id=155605
        <rdar://problem/23948165>

        Reviewed by Simon Fraser.

        * UIProcess/mac/WKTextFinderClient.mm:
        (-[WKTextFinderClient didGetImageForMatchResult:]):
        Initialize the NSImage with the correct size, instead of inferring the
        size from the bitmap, so that we don't lose information about device pixel ratio.

2016-03-17  Anders Carlsson  <andersca@apple.com>

        Remove use of dyld_register_image_state_change_handler() in PluginProcessMac.mm
        https://bugs.webkit.org/show_bug.cgi?id=155596

        Reviewed by Dan Bernstein.

        Use _dyld_register_func_for_add_image instead which is API. Use dladdr to find the image path given its header.

        * Platform/spi/Cocoa/DyldSPI.h: Removed.
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::platformInitializeProcess):
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-17  Chris Dumez  <cdumez@apple.com>

        Set the WebContent process's main thread QoS to USER-INTERACTIVE
        https://bugs.webkit.org/show_bug.cgi?id=155595
        <rdar://problem/22534965>

        Reviewed by Antti Koivisto.

        Increase the WebContent process main thread's QoS to USER-INTERACTIVE
        instead of USER-INITIATED as it is drawing UI. However, use a relative
        priority of -1 so that its priority is lower than the one of the
        scrolling thread.

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

2016-03-17  Alex Christensen  <achristensen@webkit.org>

        Support manually accepting invalid SSL certificates with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=155442
        <rdar://problem/24847398>

        Reviewed by Darin Adler.

        When we click continue after getting a warning about an invalid SSL certificate, we call
        NSURLRequest setAllowsSpecificHTTPSCertificate in NetworkProcess::allowSpecificHTTPSCertificateForHost,
        which stores information in CFNetwork about the specific invalid SSL certificate we want to accept.
        If we see such a certificate during a server trust evaluation, we want to tell CFNetwork to accept it.
        This fixes a loop when going to https://badssl.com, clicking on expired, and clicking continue.

        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::transferSandboxExtensionToDownload):
        (WebKit::certificatesMatch):
        (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost):
        (WebKit::NetworkDataTask::suggestedFilename):

2016-03-17  Csaba Osztrogonác  <ossy@webkit.org>

        [Mac][cmake] Unreviewed buildfix after r198070. Just for fun.

        * PlatformMac.cmake:

2016-03-17  Andy Estes  <aestes@apple.com>

        [Mac] Enable Content-Disposition: attachment sandbox
        https://bugs.webkit.org/show_bug.cgi?id=155578
        <rdar://problem/21886326>

        Reviewed by Dan Bernstein.

        Covered by the existing set of attachment sandbox tests, which have always been run on Mac.

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

2016-03-16  Beth Dakin  <bdakin@apple.com>

        Provide NSSpellChecker spellChecking methods with the current insertion point
        https://bugs.webkit.org/show_bug.cgi?id=155532
        -and corresponding-
        rdar://problem/24066952

        Reviewed by Simon Fraser.

        Pass the insertionPoint to the UIProcess
        * UIProcess/TextChecker.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::checkTextOfParagraph):
        (WebKit::WebPageProxy::getGuessesForWord):
        (WebKit::WebPageProxy::requestCheckingOfString):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/efl/TextCheckerEfl.cpp:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        (WebKit::TextChecker::requestCheckingOfString):
        * UIProcess/gtk/TextCheckerGtk.cpp:
        (WebKit::TextChecker::getGuessesForWord):
        (WebKit::TextChecker::requestCheckingOfString):
        (WebKit::TextChecker::checkTextOfParagraph):
        * UIProcess/ios/TextCheckerIOS.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        (WebKit::TextChecker::requestCheckingOfString):
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::getGuessesForWord):
        (WebKit::TextChecker::ignoreWord):
        (WebKit::TextChecker::requestCheckingOfString):

        Extract the insertion point from the VisibleSelection that WebCore has 
        passed. 
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::insertionPointFromCurrentSelection):
        (WebKit::WebEditorClient::checkTextOfParagraph):
        (WebKit::WebEditorClient::getGuessesForWord):
        (WebKit::WebEditorClient::requestCheckingOfString):
        * WebProcess/WebCoreSupport/WebEditorClient.h:

2016-03-16  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r192184): CleanMyDrive 2's tutorial window is blank
        https://bugs.webkit.org/show_bug.cgi?id=155550
        <rdar://problem/24250689>

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _setDrawsTransparentBackground:]):
        The app is using this SPI via key-value coding, so just keeping the implementation
        is sufficient to make AppKit stop throwing an undefined key exception.
        Log once that this is deprecated (... it's also SPI) and then forward to setDrawsBackground.

2016-03-16  Daniel Bates  <dabates@apple.com>

        <video> and <audio> elements do not obey Content Security Policy on redirect
        https://bugs.webkit.org/show_bug.cgi?id=155509
        <rdar://problem/10234844>

        Reviewed by Alex Christensen.

        Use 0ms as the maximum buffering time for media resource just as we do currently.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::maximumBufferingTime):

2016-03-16  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r198235, r198240, r198241, and
        r198252.

        Causing crashes on ARM

        Reverted changesets:

        "Remove compile time define for SEPARATED_HEAP"
        https://bugs.webkit.org/show_bug.cgi?id=155508
        http://trac.webkit.org/changeset/198235

        "Gardening: build fix after r198235."
        http://trac.webkit.org/changeset/198240

        "Build fix."
        http://trac.webkit.org/changeset/198241

        "Rename performJITMemcpy to something more inline with our
        normal webkit function names"
        https://bugs.webkit.org/show_bug.cgi?id=155525
        http://trac.webkit.org/changeset/198252

2016-03-16  Commit Queue  <commit-queue@webkit.org>

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

        Introduced several rendering issues in popular websites
        (Requested by KaL on #webkit).

        Reverted changeset:

        "[GTK] Limit the number of tiles according to the visible
        area"
        https://bugs.webkit.org/show_bug.cgi?id=126122
        http://trac.webkit.org/changeset/196803

2016-03-15  Enrica Casucci  <enrica@apple.com>

        Follow up to r195769.
        https://bugs.webkit.org/show_bug.cgi?id=155519
        rdar://problem/25146483

        Reviewed by Tim Horton.

        There are two code paths that lead to calling handleSyntheticClick()
        where we need to check if the default action can be performed on the
        data detector link.
        Only one was covered in r195769 and this patch addresses the missing one.
        I've also discovered that the point reported in DidNotHandleTapAsClick was
        incorrectly always (0, 0) and I've fixed it.

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

2016-03-15  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r198230.

        This change caused LayoutTests to fail on Mac

        Reverted changeset:

        "REGRESSION (r194660): Navigating to HTTPS sites may fail with
        error"
        https://bugs.webkit.org/show_bug.cgi?id=155455
        http://trac.webkit.org/changeset/198230

2016-03-15  Oliver Hunt  <oliver@apple.com>

        Remove compile time define for SEPARATED_HEAP
        https://bugs.webkit.org/show_bug.cgi?id=155508

        Reviewed by Mark Lam.

        Remove the feature define.

        * Configurations/FeatureDefines.xcconfig:

2016-03-15  Daniel Bates  <dabates@apple.com>

        REGRESSION (r194660): Navigating to HTTPS sites may fail with error
        https://bugs.webkit.org/show_bug.cgi?id=155455
        <rdar://problem/24308793>

        Reviewed by Alexey Proskuryakov.

        Fixes an issue where navigating to an HTTPS site may fail because the Security Framework uses
        a cache directory that it does not have permission to use.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::codeSigningIdentifierForProcess): Queries the Security Framework for the code signed
        bundle identifier/code signing identifier.
        (WebKit::ChildProcess::initializeSandbox): Use the client identifier as part of the user directory
        suffix. Verify that the client identifier matches the code signed bundled identifier/code
        signing identifier for the code signed app/tool. Fix minor code style issue; use a C++-style cast
        instead of a C-style cast when casting an OSStatus to a long.
        (WebKit::findSecCodeForProcess): Deleted; incorporated logic into WebKit::codeSigningIdentifierForProcess().

2016-03-15  Antti Koivisto  <antti@apple.com>

        Add Antti to WebKit2 Owners file
        https://bugs.webkit.org/show_bug.cgi?id=155504

        Reviewed by Anders Carlsson and Sam Weinig.

        * Owners:

2016-03-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        EFL build has been broken since r198180
        https://bugs.webkit.org/show_bug.cgi?id=155488

        Unreviewed build fix.

        * WebProcess/UserContent/WebUserContentController.h: Use ENABLE(USER_MESSAGE_HANDLERS) guard. 

2016-03-15  Chris Dumez  <cdumez@apple.com>

        Regression(r197939): ASSERTION FAILED: url.containsOnlyASCII() in URL.cpp
        https://bugs.webkit.org/show_bug.cgi?id=155449
        <rdar://problem/25134826>

        Reviewed by Carlos Garcia Campos.

        Bump WK2 Network Disk Cache version after r197939 as the new cache format
        is not compatible with the old one and leads to assertions being hit when
        browsing in Debug builds.

        SubresourceInfo used to only contain a boolean and would therefore be
        serialized as "0" / "1". However, after r197939, a URL field was added
        and when trying to decode old cache entries with the new format, we
        would try to construct a URL from the String "0" or "1". This would
        assert because these are not valid URLs.

        * NetworkProcess/cache/NetworkCacheStorage.h:

2016-03-14  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r197981.

        Caused a massive PLT regression on Mac.

        Reverted changeset:

        "Font antialiasing (smoothing) changes when elements are
        rendered into compositing layers"
        https://bugs.webkit.org/show_bug.cgi?id=23364
        http://trac.webkit.org/changeset/197981

2016-03-14  Sam Weinig  <sam@webkit.org>

        Add a baseURL parameter to _WKUserStyleSheet
        https://bugs.webkit.org/show_bug.cgi?id=155219

        Reviewed by Tim Horton.

        - Moves to a model for user content where instead of using a WebCore::UserContentController
          object, we implement the new WebCore::UserContentProvider interface (on the existing 
          WebUserContentController object).
        - Uses this to maintain maps of UserStylesSheets and UserScripts along with their identifiers,
          freeing up the URL, which had been acting as the identifier, to be used as the baseURL which
          was what it was intended for.
        - Adds a baseURL property to _WKUserStyleSheet.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * Scripts/webkit/messages.py:
        (headers_for_type):
        Add support for sending WebUserContentControllerDataTypes.

        * Shared/WebUserContentControllerDataTypes.cpp: Added.
        (WebKit::WebUserScriptData::encode):
        (WebKit::WebUserScriptData::decode):
        (WebKit::WebUserStyleSheetData::encode):
        (WebKit::WebUserStyleSheetData::decode):
        * Shared/WebUserContentControllerDataTypes.h: Added.
        Add helper types for sending user content over IPC.

        * UIProcess/API/APIUserScript.cpp:
        (API::UserScript::generateUniqueURL):
        (API::UserScript::UserScript):
        * UIProcess/API/APIUserScript.h:
        * UIProcess/API/APIUserStyleSheet.cpp:
        (API::UserStyleSheet::generateUniqueURL):
        (API::UserStyleSheet::UserStyleSheet):
        * UIProcess/API/APIUserStyleSheet.h:
        Add identifiers for tracking across processes.

        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
        (-[_WKUserStyleSheet baseURL]):
        Add new initializer which takes a baseURL as well as an accessor for the baseURL.

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::addUserScript):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
        Pass identifiers as well as user content.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::addUserScript):
        (WebKit::InjectedBundle::addUserStyleSheet):
        Move user content in via move semantics rather than using a unique_ptr.

        (WebKit::InjectedBundle::removeUserScript):
        (WebKit::InjectedBundle::removeUserStyleSheet):
        (WebKit::InjectedBundle::removeUserScripts):
        (WebKit::InjectedBundle::removeUserStyleSheets):
        (WebKit::InjectedBundle::removeAllUserContent):
        Update for new function signatures.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::WebUserContentController):
        (WebKit::WebUserContentController::~WebUserContentController):
        (WebKit::WebUserContentController::addUserContentWorlds):
        (WebKit::WebUserContentController::removeUserContentWorlds):
        (WebKit::WebUserContentController::addUserScripts):
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeAllUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheets):
        (WebKit::WebUserContentController::removeUserStyleSheet):
        (WebKit::WebUserContentController::removeAllUserStyleSheets):
        (WebKit::WebUserContentController::addUserScriptMessageHandlers):
        (WebKit::WebUserContentController::removeUserScriptMessageHandler):
        (WebKit::WebUserContentController::addUserContentExtensions):
        (WebKit::WebUserContentController::removeUserContentExtension):
        (WebKit::WebUserContentController::removeAllUserContentExtensions):
        (WebKit::WebUserContentController::addUserScriptInternal):
        (WebKit::WebUserContentController::addUserScript):
        (WebKit::WebUserContentController::removeUserScriptWithURL):
        (WebKit::WebUserContentController::removeUserScriptInternal):
        (WebKit::WebUserContentController::removeUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheetInternal):
        (WebKit::WebUserContentController::addUserStyleSheet):
        (WebKit::WebUserContentController::removeUserStyleSheetWithURL):
        (WebKit::WebUserContentController::removeUserStyleSheetInternal):
        (WebKit::WebUserContentController::removeUserStyleSheets):
        (WebKit::WebUserContentController::removeAllUserContent):
        (WebKit::WebUserContentController::forEachUserScript):
        (WebKit::WebUserContentController::forEachUserStyleSheet):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:
        Convert to inheriting from UserContentProvider, rather than containing a UserContentController.
        This means adding the storage for the user content, which has been simplified to avoid using
        unique_ptrs.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::addUserScript):
        (WebKit::WebPage::addUserStyleSheet):
        (WebKit::WebPage::removeAllUserContent):
        Update to call the WebUserContentController, rather than going to the UserContentController, which
        no longer exists.

        * WebProcess/WebPage/WebPageGroupProxy.cpp:
        (WebKit::WebPageGroupProxy::userContentController):
        * WebProcess/WebPage/WebPageGroupProxy.h:
        Return the WebUserContentController rather than old UserContentController.

2016-03-14  Joonghun Park  <jh718.park@samsung.com>

        Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
        https://bugs.webkit.org/show_bug.cgi?id=150497

        Reviewed by Darin Adler.

        * Shared/APIWebArchive.mm:
        (API::WebArchive::WebArchive):
        * Shared/APIWebArchiveResource.mm:
        (API::WebArchiveResource::data):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::addArchiveResource):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::bufferForType):
        (WebKit::WebPlatformStrategies::readBufferFromPasteboard):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
        (WebKit::WebEditorClient::documentFragmentFromAttributedString):
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::WebDragClient::declareAndWriteDragImage):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::webArchiveData):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::resourceDataForFrame):

2016-03-14  Oliver Hunt  <oliver@apple.com>

        Temporarily disable the separated heap.
        https://bugs.webkit.org/show_bug.cgi?id=155472

        Reviewed by Geoffrey Garen.

        Temporarily disable this.

        * Configurations/FeatureDefines.xcconfig:

2016-03-14  Beth Dakin  <bdakin@apple.com>

        [iOS] WKPreviewAction conforms to NSCopying but doesn’t override -
        copyWithZone:
        https://bugs.webkit.org/show_bug.cgi?id=155395

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKPreviewActionItem.mm:
        (-[WKPreviewAction copyWithZone:]):

2016-03-14  Anders Carlsson  <andersca@apple.com>

        Remove usage of -[UIGestureRecognizer requireOtherGestureToFail:]
        https://bugs.webkit.org/show_bug.cgi?id=155461
        rdar://problem/25143282

        Reviewed by Beth Dakin.

        Use -[UIGestureRecognizer requireGestureRecognizerToFail:] instead, which has been API ever since UIGestureRecognizer was added.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):

2016-03-14  Anders Carlsson  <andersca@apple.com>

        REGRESSION (r191691): Can't Share Selected Text
        https://bugs.webkit.org/show_bug.cgi?id=155459
        rdar://problem/24893625

        Reviewed by Tim Horton.

        Add the selected text as well. Somehow this got lost in the refactoring.

        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::createShareMenuItem):

2016-03-14  Tim Horton  <timothy_horton@apple.com>

        Revert r194125 and r194186: We're going to fix this a different way.

        * Shared/NativeWebGestureEvent.h:
        * Shared/mac/NativeWebGestureEventMac.mm:
        (WebKit::pointForEvent):
        (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
        (WebKit::distanceForTouches): Deleted.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView selectFindMatch:completionHandler:]):
        (-[WKWebView _web_superInputContext]):
        (-[WKWebView touchesBeganWithEvent:]): Deleted.
        (-[WKWebView touchesMovedWithEvent:]): Deleted.
        (-[WKWebView touchesEndedWithEvent:]): Deleted.
        (-[WKWebView touchesCancelledWithEvent:]): Deleted.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        (-[WKView touchesBeganWithEvent:]): Deleted.
        (-[WKView touchesMovedWithEvent:]): Deleted.
        (-[WKView touchesEndedWithEvent:]): Deleted.
        (-[WKView touchesCancelledWithEvent:]): Deleted.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::WebViewImpl):
        (WebKit::WebViewImpl::magnifyWithEvent):
        (WebKit::WebViewImpl::smartMagnifyWithEvent):
        (WebKit::WebViewImpl::rotateWithEvent):
        (WebKit::WebViewImpl::touchesOrderedByAge): Deleted.
        (WebKit::WebViewImpl::touchesBeganWithEvent): Deleted.
        (WebKit::WebViewImpl::touchesMovedWithEvent): Deleted.
        (WebKit::WebViewImpl::touchesEndedWithEvent): Deleted.
        (WebKit::WebViewImpl::touchesCancelledWithEvent): Deleted.

2016-03-14  Anders Carlsson  <andersca@apple.com>

        Fix build.

        Create an empty PDF selection.

        * Shared/mac/PDFKitImports.h:
        * Shared/mac/PDFKitImports.mm:
        (WebKit::pdfSelectionClass):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::nextMatchForString):

2016-03-14  Beth Dakin  <bdakin@apple.com>

        Unable to commit previews in Mobile Safari
        https://bugs.webkit.org/show_bug.cgi?id=155450
        -and corresponding-
        rdar://problem/25135529

        Reviewed by Tim Horton.

        _uiDelegateProvidedPreviewingViewController was being consulted before 
        invoking the old SPI, which was always wrong. It should have been consulted 
        before calling the new API! But also, it doesn’t seem to be necessary at all 
        since [WKContentView _previewItemController:commitPreview:] is only invoked 
        when a custom view controller has been provided.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _registerPreview]):
        (-[WKContentView _unregisterPreview]):
        (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
        (-[WKContentView _presentedViewControllerForPreviewItemController:]):
        (-[WKContentView _previewItemController:commitPreview:]):

2016-03-14  Brent Fulgham  <bfulgham@apple.com>

        PingHandle delete's itself but pointer is still used by handleDataURL
        https://bugs.webkit.org/show_bug.cgi?id=154752
        <rdar://problem/24872347>

        Reviewed by Alex Christensen.

        When a PingLoad is destroyed, we should tell its client so that the client can clear the pointer it
        holds to the element to avoid accidentally attempting to use deallocated memory.

        * NetworkProcess/PingLoad.h:
        (WebKit::PingLoad::~PingLoad): Notify the client we are being destroyed.

2016-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix the GTK+ build after r198124.

        WebsiteDataTypes is now an OptionSet.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_clear_cache):

2016-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Reimplement webkit_web_context_clear_cache functionality.
        https://bugs.webkit.org/show_bug.cgi?id=146041

        Reviewed by Michael Catanzaro.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_clear_cache):

2016-03-14  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        Install WebKit2 WebProcess NetworkProcess on OSX when not building the Mac PORT
        https://bugs.webkit.org/show_bug.cgi?id=152651

        Reviewed by Philippe Normand.

        * CMakeLists.txt:

2016-03-13  Joseph Pecoraro  <pecoraro@apple.com>

        Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
        https://bugs.webkit.org/show_bug.cgi?id=155417

        Reviewed by Yusuke Suzuki.

        * Configurations/FeatureDefines.xcconfig:

2016-03-13  Dan Bernstein  <mitz@apple.com>

        [Mac] Injected bundle in relocatable WebContent service can’t use XPC services from other relocatable frameworks
        https://bugs.webkit.org/show_bug.cgi?id=155414
        <rdar://problem/24428418>

        Reviewed by Sam Weinig.

        * Configurations/DebugRelease.xcconfig:
          Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to NO, because
          engineering builds are ad-hoc signed and therefore can’t have a private entitlement.

        * Configurations/WebContent-OSX.entitlements: Added. Includes the XPC domain extension
          entitlement.

        * Configurations/WebContentService.xcconfig:
          Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to YES if not already set
          and the framework is relocatable. Set CODE_SIGN_ENTITLEMENTS to the new entitlements file
          if the domain extension entitlement is needed.

        * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.

2016-03-13  Dean Jackson  <dino@apple.com>

        <attachment> should be a runtime-enabled feature
        https://bugs.webkit.org/show_bug.cgi?id=155413
        <rdar://problem/25120753>

        Reviewed by Sam Weinig and Anders Carlsson.

        Add an internal setting on WKWebViewConfiguration
        to enable the <attachment> element support.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _attachmentElementEnabled]):
        (-[WKWebViewConfiguration _setAttachmentElementEnabled:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-03-12  Sam Weinig  <sam@webkit.org>

        WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
        <rdar://problem/25129946>
        https://bugs.webkit.org/show_bug.cgi?id=155401

        Reviewed by Alex Christensen.

        The issue was that NSURLSessionDataTasks can continue to invoke their NSURLSession's delegate methods
        after -[NSURLSession invalidateAndCancel] is called. So, when the NetworkSession was destroyed, and
        still had outstanding data tasks, the session delegate would get called, try to use the session, and
        crash. To fix this I:
        
        - Made NetworkSession RefCounted.
        - Gave NetworkSession two delegates, one for each NSURLSession.
        - Made each delegate have a strong reference to the NetworkSession that gets cleared out in the
          newly implemented URLSession:didBecomeInvalidWithError: method.
        - Changed from simply destroying the NetworkSession in SessionTracker::destroySession(), to derefing
          it and explicitly calling invalidateAndCancel on the two associated NSURLSessions (which in turn 
          eventually cause the URLSession:didBecomeInvalidWithError: to fire).
        - To ensure the correct lifetime of the WebCore::NetworkStorageSession, I made it a member of the
          NetworkSession. This also allowed some simplification inside SessionTracker.

        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::setPendingDownload):
        (WebKit::NetworkDataTask::pendingDownloadLocation):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSession::sessionID):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate initWithNetworkSession:]):
        (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
        (WebKit::NetworkSession::setCustomProtocolManager):
        (WebKit::NetworkSession::create):
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::invalidateAndCancel):
        (WebKit::NetworkSession::networkStorageSession):
        (WebKit::NetworkSession::clearCredentials):
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
        * Shared/SessionTracker.cpp:
        (WebKit::identifierBase):
        (WebKit::SessionTracker::getIdentifierBase):
        (WebKit::SessionTracker::setIdentifierBase):
        (WebKit::staticSessionMap):
        (WebKit::SessionTracker::networkSession):
        (WebKit::SessionTracker::storageSession):
        (WebKit::staticStorageSessionMap):
        (WebKit::SessionTracker::sessionID):
        (WebKit::SessionTracker::setSession):
        (WebKit::SessionTracker::destroySession):
        (WebKit::SessionTracker::forEachNetworkStorageSession):
        (WebKit::storageSessionToID): Deleted.
        (WebKit::SessionTracker::storageSessionMap): Deleted.
        * Shared/SessionTracker.h:
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled):
        (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):

2016-03-12  Myles C. Maxfield  <mmaxfield@apple.com>

        Delete dead SVG Font code
        https://bugs.webkit.org/show_bug.cgi?id=154718

        Reviewed by Antti Koivisto.

        * Configurations/FeatureDefines.xcconfig:

2016-03-12  Beth Dakin  <bdakin@apple.com>

        Make preview inline navigation work API
        https://bugs.webkit.org/show_bug.cgi?id=155383
        -and corresponding-
        rdar://problem/25117985

        Reviewed by Dan Bernstein.

        With this patch:
        _WKElementInfo is now WKElementInfo in file and class names. Header is now 
        public.

        _WKPreviewElementInfo is now WKPreviewElementInfo in file and class names. 
        Header is now public.

        _WKPreviewAction is now WKPreviewActionItem in filenames (header is now 
        public), the protocol _WKPreviewActionItem is now WKPreviewActionItem, and 
        the _WKPreviewAction class is now WKPreviewAction. (The internal header is 
        still project, of course.)
        and
        WKPreviewActionIdentifiersPrivate.h/mm is now
        WKPreviewActionItemIdentifiers.h/mm and all the the identifiers have been 
        updated. Header is now public.

        * Shared/API/Cocoa/WebKit.h:
        * UIProcess/API/Cocoa/WKElementInfo.h: Copied from UIProcess/API/Cocoa/_WKElementInfo.h.
        * UIProcess/API/Cocoa/WKElementInfo.mm: Copied from UIProcess/API/Cocoa/_WKElementInfo.mm.
        (-[WKElementInfo copyWithZone:]):
        (-[_WKElementInfo copyWithZone:]): Deleted.
        * UIProcess/API/Cocoa/WKElementInfoInternal.h: Copied from UIProcess/API/Cocoa/_WKElementInfoInternal.h.
        * UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.h: Removed.
        * UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.mm: Removed.
        * UIProcess/API/Cocoa/WKPreviewActionItem.h: Copied from UIProcess/API/Cocoa/_WKPreviewAction.h.
        * UIProcess/API/Cocoa/WKPreviewActionItem.mm: Copied from UIProcess/API/Cocoa/_WKPreviewAction.mm.
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h: Copied from UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.h.
        * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm: Copied from UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.mm.
        * UIProcess/API/Cocoa/WKPreviewActionItemInternal.h: Copied from UIProcess/API/Cocoa/_WKPreviewActionInternal.h.
        * UIProcess/API/Cocoa/WKPreviewElementInfo.h: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfo.h.
        * UIProcess/API/Cocoa/WKPreviewElementInfo.mm: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfo.mm.
        (-[WKPreviewElementInfo _initWithLinkURL:]):
        (-[_WKPreviewElementInfo _initWithLinkURL:]): Deleted.
        * UIProcess/API/Cocoa/WKPreviewElementInfoInternal.h: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h.
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKElementInfo.h: Removed.
        * UIProcess/API/Cocoa/_WKElementInfo.mm: Removed.
        * UIProcess/API/Cocoa/_WKElementInfoInternal.h: Removed.
        * UIProcess/API/Cocoa/_WKPreviewAction.h: Removed.
        * UIProcess/API/Cocoa/_WKPreviewAction.mm: Removed.
        * UIProcess/API/Cocoa/_WKPreviewActionInternal.h: Removed.
        * UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Removed.
        * UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Removed.
        * UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Removed.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
        (previewIdentifierForElementAction):
        (-[WKContentView _presentedViewControllerForPreviewItemController:]):
        (-[WKContentView _previewItemController:commitPreview:]):
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-12  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        [GTK][Mac] Use DYLD_LIBRARY_PATH on OSX rather then LD_LIBRARY_PATH
        https://bugs.webkit.org/show_bug.cgi?id=152650

        Reviewed by Carlos Garcia Campos.

        * PlatformGTK.cmake:

2016-03-11  John Wilander  <wilander@apple.com>

        Move prevalent resource classifier from WebCore to WebKit.
        https://bugs.webkit.org/show_bug.cgi?id=155242
        <rdar://problem/24913272>

        Reviewed by Andy Estes.

        * UIProcess/WebResourceLoadStatisticsStore.cpp:
        (WebKit::WebResourceLoadStatisticsStore::create):
        (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
        (WebKit::hasPrevalentResourceCharacteristics):
        (WebKit::classifyPrevalentResources):
            - Moved these two functions from WebCore.
        (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
            - Calls processStatistics with a lamda function to classify prevalent resources.
        * WebKit2.xcodeproj/project.pbxproj:
            - Fixed the ordering of source files.

2016-03-11  Sam Weinig  <sam@webkit.org>

        WebKit needs a new sandbox profile addition for DataDetectors
        <rdar://problem/25091102>

        Reviewed by Brent Fulgham.

        * WebProcess/com.apple.WebProcess.sb.in:

2016-03-11  Chris Dumez  <cdumez@apple.com>

        Regression(r198040): WebKit2.DocumentStartUserScriptAlertCrashTest API test is crashing in debug
        https://bugs.webkit.org/show_bug.cgi?id=155382

        Reviewed by Alexey Proskuryakov.

        r198040 introduced an assertion to make sure we never call
        applicationBundleIsEqualTo() before setApplicationBundleIdentifier()
        is called. This new assertion found a bug as it turns out we were
        calling setApplicationBundleIdentifier() too late during the
        WebProcess initialization and some runtime applications checks were
        already done by then.

        To address the problem, this patch moves the
        setApplicationBundleIdentifier() call as early as possible during
        the WebProcess and the NetworkProcess initialization. It also moves
        it to the Cocoa specific files for clarity.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2016-03-11  Enrica Casucci  <enrica@apple.com>

        Use only selected text for Look up.
        https://bugs.webkit.org/show_bug.cgi?id=155380

        Reviewed by Tim Horton.

        The corresponding piece that uses the extended context for Look up
        is not ready yet. For the moment default to retrieving the selected text.

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

2016-03-11  Chelsea Pugh  <cpugh@apple.com>

        [iOS] Allow clients to specify text suggestions to be used for a form input session
        https://bugs.webkit.org/show_bug.cgi?id=155343

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKFormInputSession.h:
        * UIProcess/API/Cocoa/_WKInputDelegate.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKFormInputSession suggestions]): Add a getter for suggestions.
        (-[WKFormInputSession setSuggestions:]): Add a setter, which calls setSuggestions with our suggestions on the input delegate.
        (-[WKContentView insertTextSuggestion:]): Call _webView:insertTextSuggestion:inInputSession: on our input delegate so clients know 
        a text suggestion was tapped.

2016-03-11  Anders Carlsson  <andersca@apple.com>

        Creating and releasing a WKBackForwardListItem crashes
        https://bugs.webkit.org/show_bug.cgi?id=155376
        rdar://problem/17377712

        Reviewed by Dan Bernstein.

        Make init unavailable.

        * UIProcess/API/Cocoa/WKBackForwardListItem.h:

2016-03-11  Beth Dakin  <bdakin@apple.com>

        Follow-up to:

        _WKPreviewAction should be in an internal header
        https://bugs.webkit.org/show_bug.cgi?id=155370

        Rubber-stamped by Dan Bernstein.

        * UIProcess/API/Cocoa/_WKPreviewActionInternal.h:

2016-03-11  Beth Dakin  <bdakin@apple.com>

        _WKPreviewAction should be in an internal header
        https://bugs.webkit.org/show_bug.cgi?id=155370

        Reviewed by Tim Horton.

        Move _WKPreviewAction to an Internal header since only the protocol needs to 
        be SPI.
        * UIProcess/API/Cocoa/_WKPreviewAction.h:
        * UIProcess/API/Cocoa/_WKPreviewAction.mm:
        * UIProcess/API/Cocoa/_WKPreviewActionInternal.h: Added.
        * UIProcess/ios/WKContentViewInteraction.mm:
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-11  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Implement Reflect.set without receiver support
        https://bugs.webkit.org/show_bug.cgi?id=155024

        Reviewed by Geoffrey Garen.

        NPJSObject::setProperty may call `methodTable()->put` operation, but we intentionally do not propagate it to the caller's ::put.
        In the current implementation, we just use the result of ::setProperty call.
        This is `true` when ::setProperty attempts to call `methodTable()->put`.
        In ::setProperty, after calling `methodTable()->put`, ::setProperty function clears the exception state.
        So this is not the same semantics to the simple data property store. Rather, this is like the accessor.
        In ECMA262 [[Set]], it returns true if there is a setter. So we just use the returned value of ::setProperty.
        This indicates that there is a setter for the given [[Set]] operation.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::put):
        * WebProcess/Plugins/Netscape/JSNPObject.h:

2016-03-10  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r197986): Don't try to link to undefined $(WEBKIT_SYSTEM_INTERFACE_LIBRARY)

        Follow-up build fix for:
            AX: Force allow user zoom
            <https://bugs.webkit.org/show_bug.cgi?id=155056>

        Fixes the following build failure:
            ld: library not found for -l-lAccessibility
            clang: error: linker command failed with exit code 1 (use -v to see invocation)

        * Configurations/WebKit.xcconfig: Remove
        "-l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)" from OTHER_LDFLAGS since
        that macro is not defined, and there is no need to link to
        libWebKitSystemInterface.a.

2016-03-10  Jeremy Jones  <jeremyj@apple.com>

        Set AVURLAssetUsesNoPersistentCacheKey on AVAsset to match caching policy.
        https://bugs.webkit.org/show_bug.cgi?id=155117
        rdar://problem/6802240

        Reviewed by Simon Fraser.

        Make AVAsset AVURLAssetUsesNoPersistentCacheKey match !m_websiteDataStore->isPersistent()
        This will prevent persistent media caches when webkit is using in-memory caching.

        * Shared/WebPageCreationParameters.cpp: Add mediaShouldUsePersistentCache.
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters): Add mediaShouldUsePersistentCache.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::mediaShouldUsePersistentCache): Added.
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_mediaUsesPersistentCache): Added.
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::mediaShouldUsePersistentCache): Added.

2016-03-10  Nan Wang  <n_wang@apple.com>

        AX: Force allow user zoom
        https://bugs.webkit.org/show_bug.cgi?id=155056

        Reviewed by Simon Fraser.

        Linked libAccessibility library so that we can observe the accessibility
        setting change for the force always user scalable feature.

        * Configurations/WebKit.xcconfig:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (shouldAllowPictureInPictureMediaPlayback):
        (forceAlwaysUserScalableChangedCallback):
        (-[WKWebView _initializeWithConfiguration:]):
        (-[WKWebView dealloc]):
        (-[WKWebView _navigationGestureDidEnd]):
        (-[WKWebView _updateForceAlwaysUserScalable]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
        (WebKit::WebPageProxy::updateForceAlwaysUserScalable):
        (WebKit::WebPageProxy::setMaximumUnobscuredSize):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::disableInspectorNodeSearch):
        (WebKit::WebPage::updateForceAlwaysUserScalable):
        (WebKit::innerFrameQuad):

2016-03-10  Simon Fraser  <simon.fraser@apple.com>

        Font antialiasing (smoothing) changes when elements are rendered into compositing layers
        https://bugs.webkit.org/show_bug.cgi?id=23364

        Reviewed by Tim Horton.

        Send the ContentsFormat to the UI process (but nothing happens to it there yet).

        Allow internal clients to turn off smoothed layer text, so that WebKitTestRunner
        can disable it.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * Shared/mac/RemoteLayerTreeTransaction.h:
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
        * UIProcess/API/C/WKContext.cpp:
        (WKContextEnableSmoothedLayerText):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::enableSmoothedLayerText):
        (WebKit::WebProcessPool::WebProcessPool): Deleted.
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::setContentsFormat):
        (WebKit::PlatformCALayerRemote::contentsFormat):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::enableSmoothedLayerText):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-03-10  Enrica Casucci  <enrica@apple.com>

        Expose additional WKDataDetectorTypes.
        https://bugs.webkit.org/show_bug.cgi?id=155331
        rdar://problem/24175813

        Reviewed by Tim Horton.

        Adding API to enable data detection of tracking numbers,
        flight number and spotlight suggestions.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (fromWKDataDetectorTypes):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:

2016-03-10  Beth Dakin  <bdakin@apple.com>

        defaultActions in UIDelegate method 
        _webView:previewingViewControllerForElement:defaultActions: need to be 
        use-able by a client
        https://bugs.webkit.org/show_bug.cgi?id=155304
        -and corresponding-
        rdar://problem/24269296

        Reviewed by Anders Carlsson.

        This patch adds a new protocol, WKPreviewActionItem, which is a sub-protocol 
        of UIPreviewActionItem. The new protocol adds an identifier so that clients 
        can identify which of our default actions they want to use. In order for a 
        client to use our default action items, they need to return those actions in 
        their UIViewController's implementation of previewActionItems.

        Change the defaultActions to NSArray <id <WKPreviewActionItem>> *
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

        This new file defines our sub-protocol and sub-class for WKPreviewActions.
        * UIProcess/API/Cocoa/_WKPreviewAction.h: Added.
        * UIProcess/API/Cocoa/_WKPreviewAction.mm: Added.
        (+[_WKPreviewAction actionWithIdentifier:title:style:handler:]):

        New BOOL _uiDelegateProvidedPreviewingViewController keeps track of whether 
        the client returned a view controller from 
        _webView:previewingViewControllerForElement:defaultActions:. If they did 
        return a view controller, then we should invoke 
        _webView:commitPreviewingViewController: at commit time. If they returned 
        nil, then they indicated that WebKit should continue with default previewing 
        behavior, so we will not invoke the UIDelegate’s commit method.
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _registerPreview]):
        (-[WKContentView _unregisterPreview]):
        (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):

        In order for our default actions to be useful, we have to create 
        _WKPreviewActions.
        (-[WKContentView _presentedViewControllerForPreviewItemController:]):

        Only invoke _webView:commitPreviewedViewController: if 
        _uiDelegateProvidedPreviewingViewController is YES.
        (-[WKContentView _previewItemController:commitPreview:]):
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-10  Jer Noble  <jer.noble@apple.com>

        Add WebCore, WebKit, & WebKit2 preference/setting to enable Main Content heuristic.
        https://bugs.webkit.org/show_bug.cgi?id=155326
        <rdar://problem/25095408>

        Reviewed by Beth Dakin.

        Add SPI to get and set the new preference.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMainContentUserGestureOverrideEnabled):
        (WKPreferencesGetMainContentUserGestureOverrideEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _mainContentUserGestureOverrideEnabled]):
        (-[WKWebViewConfiguration _setMainContentUserGestureOverrideEnabled:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-03-10  Alex Christensen  <achristensen@webkit.org>

        Remove firing assertion after r197865.
        https://bugs.webkit.org/show_bug.cgi?id=155137
        rdar://problem/25096835

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        This assertion was firing.  I'm looking into why.

2016-03-07  Jer Noble  <jer.noble@apple.com>

        Add separate WK and WK2 preferences for requiring user gestures for video media, distinct from user gestures for media generally
        https://bugs.webkit.org/show_bug.cgi?id=155141

        Reviewed by Beth Dakin.

        Add a new preference, videoPlaybackRequiresUserGesture, distinct from mediaPlaybackRequiresUserGesture. Legacy clients of 
        mediaPlaybackRequiresUserGesture will still be able to use it normally, as setting that preference to true will effectively
        set both audioPlaybackRequiresUserGesture and videoPlaybackRequiresUserGesture to true. Make these preferences all available
        universally, rather than just on PLATFORM(IOS). This requires adding a definition for -setRequiresUserActionForMediaPlayback:
        and -requiresUserActionForMediaPlayback on !PLATFORM(IOS).

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetVideoPlaybackRequiresUserGesture):
        (WKPreferencesGetVideoPlaybackRequiresUserGesture):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        (-[WKWebView _setObscuredInsets:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration requiresUserActionForMediaPlayback]):
        (-[WKWebViewConfiguration setRequiresUserActionForMediaPlayback:]):
        (-[WKWebViewConfiguration allowsInlineMediaPlayback]):
        (-[WKWebViewConfiguration setAllowsInlineMediaPlayback:]):
        (-[WKWebViewConfiguration _requiresUserActionForVideoPlayback]):
        (-[WKWebViewConfiguration _setRequiresUserActionForVideoPlayback:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-03-10  Commit Queue  <commit-queue@webkit.org>

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

        This change broke Windows, WinCairo, GTK and EFL builds
        (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "Add a baseURL parameter to _WKUserStyleSheet"
        https://bugs.webkit.org/show_bug.cgi?id=155219
        http://trac.webkit.org/changeset/197943

2016-03-10  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] push media stream state to the UI process
        https://bugs.webkit.org/show_bug.cgi?id=155281

        Reviewed by Dean Jackson.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame): Don't clear m_mediaState, it is done in
          WebPageProxy::resetState. This reverts a change added in r197929.
        

2016-03-08  Sam Weinig  <sam@webkit.org>

        Add a baseURL parameter to _WKUserStyleSheet
        https://bugs.webkit.org/show_bug.cgi?id=155219

        Reviewed by Tim Horton.

        - Moves to a model for user content where instead of using a WebCore::UserContentController
          object, we implement the new WebCore::UserContentProvider interface (on the existing 
          WebUserContentController object).
        - Uses this to maintain maps of UserStylesSheets and UserScripts along with their identifiers,
          freeing up the URL, which had been acting as the identifier, to be used as the baseURL which
          was what it was intended for.
        - Adds a baseURL property to _WKUserStyleSheet.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * Scripts/webkit/messages.py:
        (headers_for_type):
        Add support for sending WebUserContentControllerDataTypes.

        * Shared/WebUserContentControllerDataTypes.cpp: Added.
        (WebKit::WebUserScriptData::encode):
        (WebKit::WebUserScriptData::decode):
        (WebKit::WebUserStyleSheetData::encode):
        (WebKit::WebUserStyleSheetData::decode):
        * Shared/WebUserContentControllerDataTypes.h: Added.
        Add helper types for sending user content over IPC.

        * UIProcess/API/APIUserScript.cpp:
        (API::UserScript::generateUniqueURL):
        (API::UserScript::UserScript):
        * UIProcess/API/APIUserScript.h:
        * UIProcess/API/APIUserStyleSheet.cpp:
        (API::UserStyleSheet::generateUniqueURL):
        (API::UserStyleSheet::UserStyleSheet):
        * UIProcess/API/APIUserStyleSheet.h:
        Add identifiers for tracking across processes.

        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
        (-[_WKUserStyleSheet baseURL]):
        Add new initializer which takes a baseURL as well as an accessor for the baseURL.

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::addUserScript):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
        Pass identifiers as well as user content.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::addUserScript):
        (WebKit::InjectedBundle::addUserStyleSheet):
        Move user content in via move semantics rather than using a unique_ptr.

        (WebKit::InjectedBundle::removeUserScript):
        (WebKit::InjectedBundle::removeUserStyleSheet):
        (WebKit::InjectedBundle::removeUserScripts):
        (WebKit::InjectedBundle::removeUserStyleSheets):
        (WebKit::InjectedBundle::removeAllUserContent):
        Update for new function signatures.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::WebUserContentController):
        (WebKit::WebUserContentController::~WebUserContentController):
        (WebKit::WebUserContentController::addUserContentWorlds):
        (WebKit::WebUserContentController::removeUserContentWorlds):
        (WebKit::WebUserContentController::addUserScripts):
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeAllUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheets):
        (WebKit::WebUserContentController::removeUserStyleSheet):
        (WebKit::WebUserContentController::removeAllUserStyleSheets):
        (WebKit::WebUserContentController::addUserScriptMessageHandlers):
        (WebKit::WebUserContentController::removeUserScriptMessageHandler):
        (WebKit::WebUserContentController::addUserContentExtensions):
        (WebKit::WebUserContentController::removeUserContentExtension):
        (WebKit::WebUserContentController::removeAllUserContentExtensions):
        (WebKit::WebUserContentController::addUserScriptInternal):
        (WebKit::WebUserContentController::addUserScript):
        (WebKit::WebUserContentController::removeUserScriptWithURL):
        (WebKit::WebUserContentController::removeUserScriptInternal):
        (WebKit::WebUserContentController::removeUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheetInternal):
        (WebKit::WebUserContentController::addUserStyleSheet):
        (WebKit::WebUserContentController::removeUserStyleSheetWithURL):
        (WebKit::WebUserContentController::removeUserStyleSheetInternal):
        (WebKit::WebUserContentController::removeUserStyleSheets):
        (WebKit::WebUserContentController::removeAllUserContent):
        (WebKit::WebUserContentController::forEachUserScript):
        (WebKit::WebUserContentController::forEachUserStyleSheet):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:
        Convert to inheriting from UserContentProvider, rather than containing a UserContentController.
        This means adding the storage for the user content, which has been simplified to avoid using
        unique_ptrs.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::addUserScript):
        (WebKit::WebPage::addUserStyleSheet):
        (WebKit::WebPage::removeAllUserContent):
        Update to call the WebUserContentController, rather than going to the UserContentController, which
        no longer exists.

        * WebProcess/WebPage/WebPageGroupProxy.cpp:
        (WebKit::WebPageGroupProxy::userContentController):
        * WebProcess/WebPage/WebPageGroupProxy.h:
        Return the WebUserContentController rather than old UserContentController.

2016-03-10  Commit Queue  <commit-queue@webkit.org>

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

        Rolling out this change due to breaking the build and
        LayoutTests. (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "Font antialiasing (smoothing) changes when elements are
        rendered into compositing layers"
        https://bugs.webkit.org/show_bug.cgi?id=23364
        http://trac.webkit.org/changeset/197923

2016-03-10  Chris Dumez  <cdumez@apple.com>

        Speculative revalidation requests do not have their 'first party for cookies' URL set
        https://bugs.webkit.org/show_bug.cgi?id=155284
        <rdar://problem/25053203>

        Reviewed by Antti Koivisto.

        Speculative revalidation requests did not have their 'first party for cookies'
        URL set. This means the underlying NSURLRequest has a nil mainDocumentURL.
        Without a way to determine whether the cookie is in a third-party context,
        CFNetwork defaults to accepting all cookies for these resources.

        * NetworkProcess/cache/NetworkCacheCoders.cpp:
        (WebKit::NetworkCache::Coder<WebCore::URL>::encode):
        (WebKit::NetworkCache::Coder<WebCore::URL>::decode):
        * NetworkProcess/cache/NetworkCacheCoders.h:
        Add template specialization to support encoding / decoding WebCore::URL.

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        Set the "first party for cookies" URL on the revalidation request.

        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
        Now keep the subresources' ResourceRequests, in addition to their key, so we can later
        extract the 'first party for cookies' URL from the request and save it to disk.

        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
        Pass the ResourceRequest in addition to the key to
        PendingFrameLoad::registerSubresourceLoad().

        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        Add an extra SubresourceInfo parameter, in addition to the Entry, so we
        have access to the first party for cookies URL. Pass this URL to
        constructRevalidationRequest().

        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        Add an extra SubresourceInfo parameter, in addition to the Entry, so we
        have access to the first party for cookies URL.

        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
        Pass the SubresourceInfo to preloadEntry().

        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:

        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::encode):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::decode):
        Encode / Decode new firstPartyForCookies member.

        (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
        (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceLoads):
        Take SubresourceLoad objects in, instead of simple Key objects so we have
        access to the ResourceRequest. We extract the first party for cookies URL
        from the request and pass it to the SubresourceInfo constructor.

        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::SubresourceInfo):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceLoad::SubresourceLoad):

2016-02-22  Jer Noble  <jer.noble@apple.com>

        Enable AVFoundationNSURLSessionEnabled by default
        https://bugs.webkit.org/show_bug.cgi?id=154469

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:

2016-03-10  Eric Carlson  <eric.carlson@apple.com>

        Unreviewed, revert changes accidentally committed with previous patch.

        * WebProcess/com.apple.WebProcess.sb.in:

2016-03-10  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] push media stream state to the UI process
        https://bugs.webkit.org/show_bug.cgi?id=155281

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetMediaState): New.
        * UIProcess/API/C/WKPagePrivate.h:

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame): Clear m_mediaState.
        (WebKit::WebPageProxy::isPlayingMediaDidChange): Call m_pageClient.isPlayingMediaDidChange when
          audio or video state changes, call m_uiClient->isPlayingAudioDidChange when audio, vidoe,
          or media stream state changes.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::mediaStateFlags): New.

2016-03-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Artifacts when using web view background color
        https://bugs.webkit.org/show_bug.cgi?id=155229

        Reviewed by Mario Sanchez Prada.

        This is because when using a web view color, we fill with the
        color every rectangle updated by the web process, but we should
        always fill the entire backing store before rendering the actual
        contents on top.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::display): Ensure the web process always
        renders the whole visible rectangle when background is rendered by
        the UI process.

2016-03-09  Simon Fraser  <simon.fraser@apple.com>

        Font antialiasing (smoothing) changes when elements are rendered into compositing layers
        https://bugs.webkit.org/show_bug.cgi?id=23364
        rdar://problem/7288429

        Reviewed by Tim Horton.
        
        Send the ContentsFormat to the UI process (but nothing happens to it there yet).

        * Shared/mac/RemoteLayerTreeTransaction.h:
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::setContentsFormat):
        (WebKit::PlatformCALayerRemote::contentsFormat):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2016-03-09  Ryosuke Niwa  <rniwa@webkit.org>

        Add runtime flags for shadow DOM and custom elements
        https://bugs.webkit.org/show_bug.cgi?id=155213

        Reviewed by Dean Jackson.

        Set the runtime flag based on preferences. Enable shadow DOM and disable custom elements by default.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetShadowDOMEnabled):
        (WKPreferencesGetShadowDOMEnabled):
        (WKPreferencesSetCustomElementsEnabled):
        (WKPreferencesGetCustomElementsEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-03-09  Brent Fulgham  <bfulgham@apple.com>

        Handling 'allowUniversalAccessFromFileURLs' on WKWebViewConfiguration causes test breakage
        https://bugs.webkit.org/show_bug.cgi?id=155265
        <rdar://problem/11101440>

        Reviewed by Andy Estes.

        We require "AllowUniversalAccessFromFileURLs" to permit file URLs from accessing
        localStorage. However, this setting is not available on the Cocoa WKPreference (by design).
        Instead, you need to set this value on the WKWebViewConfiguration.
        
        Back out the work-around landed in r197889, 

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Remove test workaround.
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Set the correct flag on
        the WKWebViewConfiguration.

2016-03-09  Enrica Casucci  <enrica@apple.com>

        Retrieve additional context for some data detector link for preview and action menu.
        https://bugs.webkit.org/show_bug.cgi?id=155278
        rdar://problem/24884951

        Reviewed by Tim Horton.

        Data detector results for items like calendar events, can be augmented
        retrieving the text surrounding the link.

        * Platform/spi/ios/DataDetectorsUISPI.h:
        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showDataDetectorsSheet]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2016-03-09  Gavin Barraclough  <barraclough@apple.com>

        Last opened tab does not receive SetHiddenPageTimerThrottlingIncreaseLimit message
        https://bugs.webkit.org/show_bug.cgi?id=155126

        Reviewed by Anders Carlson.

        WebPageProxy will increment the hidden page throttling counter from within its constructor,
        which currently causes the WebProcessPool to try to synchronously message all processes.
        The web page triggering the increment then fails to receive the message, since it was
        still being constructed. Make the update of the limit async, such that the page is fully
        constructed before the WebProcessPool processes the update.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
            - This now schedules a zero-delay timer to handle the update.
        (WebKit::m_hiddenPageThrottlingTimer):
            - This is now responsible for calling updateHiddenPageThrottlingAutoIncreaseLimit.
        * UIProcess/WebProcessPool.h:
            - Added m_hiddenPageThrottlingTimer.

2016-03-09  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r197149): Missing availability checks when soft-linking DataDetectors.framework
        <http://webkit.org/b/155258>

        Reviewed by Andy Estes.

        * Platform/mac/MenuUtilities.mm:
        (WebKit::menuItemForTelephoneNumber):
        (WebKit::menuForTelephoneNumber):
        - Add check that returns early if DataDetectors.framework is not
          available.

        * Shared/mac/WebHitTestResultData.mm:
        (WebKit::WebHitTestResultData::platformDecode):
        - Add Debug assertion.  The soft-linked code should never be
          called if there was no actionContext passed in.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
        - Protect calls to DDActionsManager with availability check.

        * UIProcess/mac/WKImmediateActionController.mm:
        (-[WKImmediateActionController _clearImmediateActionState]):
        (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
        - Protect calls to DDActionsManager with availability check.
        (-[WKImmediateActionController _animationControllerForDataDetectedText]):
        (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
        - Add check that returns early if DataDetectors.framework is not
          available.

2016-03-09  Keith Rollin  <krollin@apple.com>

        Add state dumping facility
        https://bugs.webkit.org/show_bug.cgi?id=154930
        <rdar://problem/24939135>

        Reviewed by Anders Carlsson.

        Collect the times at which pages are loaded. Dump them when an OS
        state dump is triggered.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didCommitLoad):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::lastPageLoadTime):
        * WebProcess/WebProcess.h:
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::registerWithStateDumper):
        (WebKit::WebProcess::platformInitializeProcess):

2016-03-09  Anders Carlsson  <andersca@apple.com>

        _WKWebsiteDataSize.h should be an SPI header.

        Rubber-stamped by Tim Horton.

        * WebKit2.xcodeproj/project.pbxproj:

2016-03-09  Brent Fulgham  <bfulgham@apple.com>

        Handling 'allowUniversalAccessFromFileURLs' on WKWebViewConfiguration causes test breakage
        https://bugs.webkit.org/show_bug.cgi?id=155265

        Unreviewed work-around to allow testing to continue.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]): Workaround build break.

2016-03-09  Alex Christensen  <achristensen@webkit.org>

        Fix use-after-free when cancelling synchronous XHR when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=155253

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueWillSendRequest):
        Store the completion handler on the stack before calling didFail, which deletes the
        NetworkLoad, so we don't access m_redirectCompletionHandler after deleting the NetworkLoad.

2016-03-09  Commit Queue  <commit-queue@webkit.org>

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

        Caused assertions, and wasn't reviewed by a WK2 owner
        (Requested by andersca on #webkit).

        Reverted changeset:

        "Last opened tab does not receive
        SetHiddenPageTimerThrottlingIncreaseLimit message"
        https://bugs.webkit.org/show_bug.cgi?id=155126
        http://trac.webkit.org/changeset/197698

2016-03-09  Conrad Shultz  <conrad_shultz@apple.com>

        WebsiteDataStore::Configuration::legacyWebsiteDataStoreConfiguration() should respect the passed-in configuration
        https://bugs.webkit.org/show_bug.cgi?id=155250

        Reviewed by Anders Carlsson.

        Note that the legacy directories are already set by default in ProcessPoolConfiguration::createWithLegacyOptions(),
        which is also where the shouldHaveLegacyDataStore flag, which will cause this code path to be reached, is set.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration):
        Use the passed-in configuration to set the application cache, network cache, and media keys storage directories.

2016-03-09  Chris Dumez  <cdumez@apple.com>

        Speculative disk cache resource revalidations are sometimes wasted
        https://bugs.webkit.org/show_bug.cgi?id=155187
        <rdar://problem/25032905>

        Reviewed by Antti Koivisto.

        Speculative disk cache resource revalidations were sometimes wasted.

        We would sometimes correctly revalidate a resource but the
        NetworkResourceLoader then either:
        1. Fail to reuse the speculatively validated entry
        2. Reuse the speculatively validated entry but then validate it again

        Bug 1 was caused by the revalidated entry key sometimes being
        different from the cached entry key. This could happen when
        revalidation fails (the server did not send back a 304) in
        which case we call NetworkCache::store() which creates a new
        cache Entry, generating a cache key from our revalidation
        request. If the original request has a cache partition or a
        range, then the keys would not match because we did not set
        the cache partition or the range on the revalidation request.
        This has been addressed by setting the cache partition on the
        revalidation request in constructRevalidationRequest() and by
        not doing revalidation if the original request had a 'range'
        header.

        Bug 2 was caused by us marking a speculatively revalidated entry
        as "not needing revalidating" only in Cache::update(). Cache::update()
        is only called in the case the revalidation was successful (server
        returned a 304). If revalidation was not successful, Cache::store()
        would be called instead was we would fail to update the
        needsRevalidation flag. NetworkResourceLoader would then validate
        again the resource that was already speculatively revalidated.
        To address the problem, we now update the 'needsRevalidation' flag
        as soon as the speculative revalidation completes, in
        SpeculativeLoad::didComplete().

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::makeCacheKey):
        (WebKit::NetworkCache::Cache::update):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::setNeedsValidation):
        * NetworkProcess/cache/NetworkCacheEntry.h:
        * NetworkProcess/cache/NetworkCacheKey.cpp:
        (WebKit::NetworkCache::noPartitionString):
        (WebKit::NetworkCache::Key::Key):
        (WebKit::NetworkCache::Key::hasPartition):
        * NetworkProcess/cache/NetworkCacheKey.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::didComplete):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::constructRevalidationRequest):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):

2016-03-09  Brent Fulgham  <bfulgham@apple.com>

        Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
        https://bugs.webkit.org/show_bug.cgi?id=155185

        Reviewed by Anders Carlsson.
        <rdar://problem/11101440>

        Tested by TestWebKitAPI tests IndexedDB.IndexedDBMultiProcess and IndexedDB.IndexedDBPersistence.

        Allow Cocoa WKWebViewConfiguration access to the 'allowUniversalAccessFromFileURLs' setting.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (- [WKWebView _initializeWithConfiguration]): Set 'allowUniversalAccessFromFileURLsKey' in
        page configuration.
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration _allowUniversalAccessFromFileURLs]): Added,
        (-[WKWebViewConfiguration _setAllowUniversalAccessFromFileURLs:]): Added.
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

2016-03-09  Enrica Casucci  <enrica@apple.com>

        Add two finger tap on links.
        https://bugs.webkit.org/show_bug.cgi?id=155205
        rdar://problem/22937516

        Reviewed by Sam Weinig.

        Adds two finger tap gesture recognizer. When performed
        on a link, it calls the delegate.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView setupInteraction]):
        (-[WKContentView cleanupInteraction]):
        (-[WKContentView _removeDefaultGestureRecognizers]):
        (-[WKContentView _addDefaultGestureRecognizers]):
        (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::handleTwoFingerTapAtPoint):

2016-03-09  Alex Christensen  <achristensen@webkit.org>

        Always call NSURLSession completion handlers
        https://bugs.webkit.org/show_bug.cgi?id=155137

        Reviewed by Darin Adler.

        There are some edge cases which should not be hit, but if they are they would cause the
        network process to hang and network resources to be leaked.  This can be avoided.
        There are also a few release asserts that do not need to crash release builds.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::didReceiveChallenge):
        (WebKit::NetworkDataTask::didCompleteWithError):
        (WebKit::NetworkDataTask::didReceiveResponse):
        (WebKit::NetworkDataTask::didReceiveData):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        (WebKit::NetworkDataTask::scheduleFailure):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

2016-03-08  Sam Weinig  <sam@webkit.org>

        Roll r197632 back in now that the bots have caught up.

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

2016-03-08  Oliver Hunt  <oliver@apple.com>

        Start moving to separated writable and executable mappings in the JIT
        https://bugs.webkit.org/show_bug.cgi?id=155178

        Reviewed by Fil Pizlo.

        Update feature defines.

        * Configurations/FeatureDefines.xcconfig:

2016-03-08  Brent Fulgham  <bfulgham@apple.com>

        [WK2][Mac] Allow processes to set "fast-dev-casheable" bit in Network Process
        https://bugs.webkit.org/show_bug.cgi?id=155189
        <rdar://problem/25042678>

        Reviewed by Alexey Proskuryakov.

        Update the NetworkProcess sandbox profiles with a declaration that using the
        system-fctl to touch the "hot file" flag (to support caching operations)
        is allowed. I should have done this in Bug 154503, but did not.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Add sandbox permission.

2016-03-08  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r197793 and r197799.
        https://bugs.webkit.org/show_bug.cgi?id=155195

        something weird happened while landing this and everything
        broke (Requested by olliej on #webkit).

        Reverted changesets:

        "Start moving to separated writable and executable mappings in
        the JIT"
        https://bugs.webkit.org/show_bug.cgi?id=155178
        http://trac.webkit.org/changeset/197793

        "arm64 build fix after r197793."
        http://trac.webkit.org/changeset/197799

2016-03-08  Brent Fulgham  <bfulgham@apple.com>

        [WK2] Grant explicit read access to ManagedPreferences
        https://bugs.webkit.org/show_bug.cgi?id=155173
        <rdar://problem/24910550>

        Reviewed by Alexey Proskuryakov.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add new
        read permission.

2016-03-08  Anders Carlsson  <andersca@apple.com>

        Ignore deprecation warnings.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::stopNSAppRunLoop):
        * Shared/mac/WebEventFactory.mm:
        (WebKit::mouseButtonForEvent):
        (WebKit::mouseEventTypeForEvent):
        (WebKit::clickCountForEvent):
        (WebKit::globalPointForEvent):
        (WebKit::pointForEvent):
        (WebKit::textFromEvent):
        (WebKit::unmodifiedTextFromEvent):
        (WebKit::isKeypadEvent):
        (WebKit::isKeyUpEvent):
        (WebKit::modifiersForEvent):
        (WebKit::WebEventFactory::createWebKeyboardEvent):
        * UIProcess/API/Cocoa/WKNavigationAction.mm:
        (toNSEventModifierFlags):
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::becomeFirstResponder):
        (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
        (WebKit::WebViewImpl::viewDidMoveToWindow):
        (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
        (WebKit::WebViewImpl::createFullScreenWindow):
        (WebKit::WebViewImpl::sendToolTipMouseExited):
        (WebKit::WebViewImpl::sendToolTipMouseEntered):
        (WebKit::applicationFlagsForDrag):
        (WebKit::WebViewImpl::setLastMouseDownEvent):
        (WebKit::WebViewImpl::doneWithKeyEvent):
        (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
        (WebKit::WebViewImpl::performKeyEquivalent):
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::beginModal):
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::showContextMenu):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCanAttach):
        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::populate):
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::modifierFlagsFromWebEvent):
        (WebKit::getEventTypeFromWebEvent):
        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
        (WebKit::cssAlignmentValueForNSTextAlignment):
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
        (WebKit::convertImageToBitmap):

2016-03-08  Oliver Hunt  <oliver@apple.com>

        Start moving to separated writable and executable mappings in the JIT
        https://bugs.webkit.org/show_bug.cgi?id=155178

        Reviewed by Filip Pizlo.

        Update feature defines.

        * Configurations/FeatureDefines.xcconfig:

2016-03-08  Commit Queue  <commit-queue@webkit.org>

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

        Has platform-specific code in non-platform files (Requested by
        smfr on #webkit).

        Reverted changeset:

        "AX: Force allow user zoom"
        https://bugs.webkit.org/show_bug.cgi?id=155056
        http://trac.webkit.org/changeset/197766

2016-03-04  Ada Chan  <adachan@apple.com>

        Fix lifetime issues regarding WebVideoFullscreenInterfaceMac
        https://bugs.webkit.org/show_bug.cgi?id=155130

        Reviewed by Beth Dakin.

        Now that both fullscreen and video controls manager rely on WebVideoFullscreenInterface,
        we now keep track of a "client count" for each context ID so we'll only remove it
        from the context map after all the "clients" are done with it.

        Before this change, every time WebVideoFullscreenManager::setUpVideoControlsManager()
        is called, the existing interface is cleared and a new one is created even when there's
        an existing interface for that. With this change, we reuse the existing interface for
        the video element.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::invalidate):
        Also clear out m_clientCounts.
        (WebKit::WebVideoFullscreenManagerProxy::addClientForContext):
        If the context ID is not in m_clientCounts yet, add the count of 1 to
        that table for that ID. Otherwise, increment the count by 1.
        (WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
        Assert that we have added this context id to m_clientCounts before.
        Decrement the count. If it reaches 0, remove this context ID from both
        m_clientCounts and m_contextMap.
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
        We have started a new fullscreen session using this interface. Call
        addClientForContext() to update the client count.
        (WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
        If the current controls manager set up has the same context ID as the one
        passed in, we don't have to do anything. Otherwise, if we have set up
        the video controls manager with a different ID before, call removeClientForContext()
        on the old ID to decrement its client count. Set m_controlsManagerContextId
        to the new value and call addClientForContext() with it.
        (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
        Instead of removing the mapping from m_contextMap directly, reset the fullscreen
        mode on the interface and call removeClientForContext(), which removes the mapping
        only if there's no more client using the interface.
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
        Clear m_clientCounts.
        (WebKit::WebVideoFullscreenManager::removeContext):
        Add a helper method for removing the context.
        (WebKit::WebVideoFullscreenManager::addClientForContext):
        If the context ID is not in m_clientCounts yet, add the count of 1 to
        that table for that ID. Otherwise, increment the count by 1.
        (WebKit::WebVideoFullscreenManager::removeClientForContext):
        Assert that we have added this context id to m_clientCounts before.
        Decrement the count. If it reaches 0, remove this context ID from
        m_clientCounts and call removeContext() to clean up this context.
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
        We have started a new fullscreen session using this interface. Call
        addClientForContext() to update the client count. Create a layer hosting
        context if it's not there.
        (WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):
        If we have set up a context for this video element before, see if it's
        the one we are currently managing video controls for. If it is, return early.
        Otherwise, call removeClientForContext() on the previous m_controlsManagerContextId
        and update m_controlsManagerContextId to the context ID of this video element.
        If there's no context created for this video element yet, set one up.
        Send a SetUpVideoControlsManagerWithID message to the proxy object in the UI process
        so it'll update its controls manager context ID. Also, conditionalize all of this
        under PLATFORM(MAC) to be consistent with WebVideoFullscreenManagerProxy.
        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
        Just reset the fullscreen mode on the interface and call removeClientForContext() which
        only cleans up the context if there's no more client using it.

2016-03-08  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Add automation protocol methods for navigation

        https://bugs.webkit.org/show_bug.cgi?id=155163
        rdar://problem/25029054

        Reviewed by Darin Adler.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::getBrowsingContexts): Set url.
        (WebKit::WebAutomationSession::getBrowsingContext): Added.
        (WebKit::WebAutomationSession::navigateBrowsingContext): Added.
        (WebKit::WebAutomationSession::goBackInBrowsingContext): Added.
        (WebKit::WebAutomationSession::goForwardInBrowsingContext): Added.
        (WebKit::WebAutomationSession::reloadBrowsingContext): Added.
        * UIProcess/Automation/WebAutomationSession.h:

2016-03-08  Nan Wang  <n_wang@apple.com>

        AX: Force allow user zoom
        https://bugs.webkit.org/show_bug.cgi?id=155056

        Reviewed by Chris Fleizach.

        Soft linked libAccessibility library so that we can observe the accessibility
        setting change for the force always user scalable feature.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::forceAlwaysUserScalableChangedCallback):
        (WebKit::WebPage::create):
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
        (WebKit::WebPage::~WebPage):
        (WebKit::WebPage::preferencesDidChange):
        (WebKit::WebPage::updateForceAlwaysUserScalable):
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/WebPage.h:

2016-03-08  Csaba Osztrogonác  <ossy@webkit.org>

        One more unreviewed speculative buildfix after r197728.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):

2016-03-08  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed speculative buildfix after r197728.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):

2016-03-08  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Make WebAutomationSession::closeBrowsingContext work as expected

        https://bugs.webkit.org/show_bug.cgi?id=155162
        rdar://problem/25027191

        Reviewed by Brian Burg.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::closeBrowsingContext):
        Call closePage, the same method ultimately used by window.close().

        * UIProcess/WebPageProxy.h: Make closePage public.

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

        REGRESSION(r197062): [GTK] Transparent backgrounds no longer work after r197062
        https://bugs.webkit.org/show_bug.cgi?id=155119

        Reviewed by Martin Robinson.

        This is because after r197062 we are now realizing the view too
        early, even before the toplevel window has been realized, forcing
        the toplevel window to be realized. If the RGBA visual is set on
        the window after it has been realzied it doesn't have any
        effect. We should wait until the toplevel window is realized to
        realize the web view, giving time to the application to set RGBA
        visual and background color. If the toplevel window is already
        realized we realize the web view immediately, so that this doesn't
        affect the tearing problems fixed in r197062.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (toplevelWindowRealized):
        (webkitWebViewBaseSetToplevelOnScreenWindow):

2016-03-07  Keith Rollin  <krollin@apple.com>

        Enhance logging: Use "always on" macros
        https://bugs.webkit.org/show_bug.cgi?id=154499
        <rdar://problem/24757730>

        Reviewed by Chris Dumez.

        Make use of new logging macros by reporting on frame and resource
        load activity.

        Connection updated to report IPC errors, helping us identify when
        messaging between processes breaks down.

        ChildProcess updated to log if it is terminating early. Some
        sysdiagnose logging from customers indicate that this is happening in
        the wild.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::startNetworkLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        (WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed):
        * NetworkProcess/NetworkResourceLoader.h:
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForSyncReply):
        * Shared/ChildProcess.cpp:
        (WebKit::didCloseOnConnectionWorkQueue):
        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):
        (WebKit::WebResourceLoader::didReceiveResponse):
        (WebKit::WebResourceLoader::didReceiveData):
        (WebKit::WebResourceLoader::didFinishResourceLoad):
        (WebKit::WebResourceLoader::didFailResourceLoad):
        (WebKit::WebResourceLoader::didReceiveResource):
        (WebKit::WebResourceLoader::isAlwaysOnLoggingAllowed):
        * WebProcess/Network/WebResourceLoader.h:

2016-03-07  Brent Fulgham  <bfulgham@apple.com>

        Reduce startup and shutdown cost of resource load statistics
        https://bugs.webkit.org/show_bug.cgi?id=155120
        <rdar://problem/25010167>

        Reviewed by Andy Estes.

        Use a dedicated WorkQueue to process resource load statistics data. Allow
        processing to load (and save) previously stored statistics asynchronously so
        that it does not delay startup.
        
        Now that we have a more rational storage situation, get rid of the 'writeToDisk'
        method since it is no longer needed in the WK2 layer.

        Move all of the Resource Load Statistics file handling code from WebCore to this
        API layer.

        * UIProcess/WebResourceLoadStatisticsStore.cpp:
        (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): Initialize
        member variable with storage path, rather than passing to WebCore code.
        (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): Revised to
        use the new WorkQueue code.
        (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled): When
        activating the feature, purge any old statistics before loading from disk.
        (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded): Added.
        (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection): Added.
        (WebKit::WebResourceLoadStatisticsStore::processDidCloseConnection): Added.
        (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate): Make sure all
        of the WorkQueue tasks are done before terminating.
        (WebKit::WebResourceLoadStatisticsStore::persistentStoragePath): Moved from WebCore.
        (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk): Ditto.
        (WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk): Ditto.
        (WebKit::WebResourceLoadStatisticsStore::writeToDisk): Deleted.
        * UIProcess/WebResourceLoadStatisticsStore.h:
        (WebKit::WebResourceLoadStatisticsStore::coreStore):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::webProcessWillOpenConnection): Call new WebResourceLoadStatisticsStore code.
        (WebKit::WebsiteDataStore::webProcessDidCloseConnection): Ditto.

2016-03-07  Alex Christensen  <achristensen@webkit.org>

        Fix cookies with private browsing and NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=155147
        rdar://problem/25018279

        Reviewed by Brady Eidson.

        In the NetworkSession constructor, we look for a NetworkStorageSession in the SessionTracker
        and use that NetworkStorageSession's CFHTTPCookieStorageRef in the NSURLSessionConfiguration.
        NetworkStorageSessions were being set in SessionTracker's storageSessionMap after NetworkSessions
        were created, causing the NSHTTPCookieStorage of the NSURLSession to be different from the
        CFHTTPCookieStorageRef used by document.cookie in newly created private browsing sessions.
        This fixes that problem by passing the NetworkStorageSession as a constructor parameter to the
        NetworkSession so it can use the correct CFHTTPCookieStorageRef in its NSURLSessionConfiguration
        before it is in the storageSessionMap.

        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSession::sessionID):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):

2016-03-07  Brent Fulgham  <bfulgham@apple.com>

        Correct bug in resource load statistics debug flag for legacy clients
        https://bugs.webkit.org/show_bug.cgi?id=155118
        <rdar://problem/25020088>

        Reviewed by Andy Estes.

        Some clients launch WebKit2 using the "legacy" configuration for the website data store.
        The Resource Load Statistics code was not added to this type of configuration, which
        prevents various WebKit2 clients from using this code.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::legacyWebsiteDataStoreConfiguration): Tell the legacy initializer where to
        find the resource load statistics data.

2016-03-07  Daniel Bates  <dabates@apple.com>

        Cleanup: Add convenience function URL::procotolIsBlob()
        https://bugs.webkit.org/show_bug.cgi?id=155127
        <rdar://problem/25016829>

        Reviewed by Brent Fulgham.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad): Modified to use URL::protocolIsBlob().
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::NetworkResourceLoader): Ditto.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::canHandleRequest): Ditto.

2016-03-07  Simon Fraser  <simon.fraser@apple.com>

        Use CGColorSpaceCopyICCData instead of CGColorSpaceCopyICCProfile
        https://bugs.webkit.org/show_bug.cgi?id=155123
        rdar://problem/24990256

        Reviewed by Tim Horton.
        
        On newer OSes, use CGColorSpaceCopyICCData().

        * Shared/mac/ColorSpaceData.mm:
        (WebKit::ColorSpaceData::encode):

2016-03-07  Gavin Barraclough  <barraclough@apple.com>

        Last opened tab does not receive SetHiddenPageTimerThrottlingIncreaseLimit message
        https://bugs.webkit.org/show_bug.cgi?id=155126

        Reviewed by Chris Dumez.

        WebPageProxy will increment the hidden page throttling counter from within its constructor,
        which currently causes the WebProcessPool to try to synchronously message all processes.
        The web page triggering the increment then fails to receive the message, since it was
        still being constructed. Make the update of the limit async, such that the page is fully
        constructed before the WebProcessPool processes the update.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
            - This now schedules a zero-delay timer to handle the update.
        (WebKit::m_hiddenPageThrottlingTimer):
            - This is now responsible for calling updateHiddenPageThrottlingAutoIncreaseLimit.
        * UIProcess/WebProcessPool.h:
            - Added m_hiddenPageThrottlingTimer.

2016-03-05  Enrica Casucci  <enrica@apple.com>

        Support preview on attachment elements.
        https://bugs.webkit.org/show_bug.cgi?id=155074
        rdar://problem/24806079

        Reviewed by Sam Weinig.

        Allowing preview to start on attachment elements.
        Adding a private UIDelegate method to provide the data for the preview.

        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):

2016-03-06  Andreas Kling  <akling@apple.com>

        Reduce page cache capacity from 3 to 2.
        <https://webkit.org/b/155087>

        Reviewed by Antti Koivisto.

        It's extremely rare that users go back more than 2 pages in the page cache,
        and nowadays the network cache makes even un-cached pages fast to reload.

        Trimming the page cache from 3 to 2 entries has a very nice effect on heap
        fragmentation. I'm seeing a ~5% progression on the iPad PLUM test locally;
        average memory usage across 300 loads goes from ~121MB to ~114MB.

        * Shared/CacheModel.cpp:
        (WebKit::calculateCacheSizes):

2016-03-05  Sam Weinig  <sam@webkit.org>

        Revert usage of autofill field name for use with UITextInputTraits
        until our bots can catch up.

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

2016-03-05  Chris Dumez  <cdumez@apple.com>

        Consolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS
        https://bugs.webkit.org/show_bug.cgi?id=155035

        Reviewed by Darin Adler.

        Update runtime application checks.

        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
        * UIProcess/Cocoa/VersionChecks.mm:
        (WebKit::linkedOnOrAfter):
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
        * UIProcess/ios/WKContentViewInteraction.mm:
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::expectsLegacyImplicitRubberBandControl):
        (WebKit::WebPageProxy::appleMailPaginationQuirkEnabled):

2016-03-05  Sam Weinig  <sam@webkit.org>

        Add support for processing the autofill field name out of form control elements ultimately to aid input methods
        <rdar://problem/23041180>
        https://bugs.webkit.org/show_bug.cgi?id=155079

        Reviewed by Enrica Casucci.

        * Shared/AssistedNodeInformation.cpp:
        (WebKit::AssistedNodeInformation::encode):
        (WebKit::AssistedNodeInformation::decode):
        * Shared/AssistedNodeInformation.h:
        Add AutofillFieldName. Convert some coders to use encodeEnum/decodeEnum instead of casting.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView textInputTraits]):
        Map AutofillFieldNames to the associated UITextContentTypes.

        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getAssistedNodeInformation):
        Extract the AutofillFieldNames onto the AssistedNodeInformation for <input> elements 
        and <textarea> elements.

2016-03-05  Timothy Hatcher  <timothy@apple.com>

        Implement the Automation protocol commands by tracking WebPageProxy objects
        that are controlled by automation and assigning them a UUID handle.

        https://bugs.webkit.org/show_bug.cgi?id=154953
        rdar://problem/24947489

        Reviewed by Brian Burg.

        * UIProcess/API/APIAutomationSessionClient.h:
        (API::AutomationSessionClient::didRequestNewWindow):
        Return a WebPageProxy instead of void so it can be assigned a UUID handle.

        * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
        Return a WKPageRef from _automationSessionDidRequestNewWindow:.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::webPageProxyForHandle):
        (WebKit::WebAutomationSession::handleForWebPageProxy):
        (WebKit::WebAutomationSession::getBrowsingContexts):
        (WebKit::WebAutomationSession::createBrowsingContext):
        (WebKit::WebAutomationSession::closeBrowsingContext):
        (WebKit::WebAutomationSession::switchToBrowsingContext):

        * UIProcess/Automation/WebAutomationSession.h:
        Added new methods and maps to track pages and handles.

        * UIProcess/Cocoa/AutomationSessionClient.h:
        * UIProcess/Cocoa/AutomationSessionClient.mm:
        (WebKit::AutomationSessionClient::didRequestNewWindow):
        Return a WebPageProxy from the WKPageRef.

        * UIProcess/WebPageProxy.h: Make setFocus public.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setAutomationSession):
        Set the WebProcessPool on the WebAutomationSession so it can be used to find
        WebPageProxy objects controlled by automation.

2016-03-05  Timothy Hatcher  <timothy@apple.com>

        Rename Automation protocol methods to use "BrowsingContext" instead of "Window".
        Also flesh out the protocol commands more by adding switchToBrowsingContext
        and return a BrowsingContextHandle for createBrowsingContext.

        https://bugs.webkit.org/show_bug.cgi?id=154953
        rdar://problem/24947489

        Reviewed by Brian Burg.

        * UIProcess/Automation/Automation.json:
        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::getBrowsingContexts):
        (WebKit::WebAutomationSession::createBrowsingContext):
        (WebKit::WebAutomationSession::closeBrowsingContext):
        (WebKit::WebAutomationSession::switchToBrowsingContext):
        (WebKit::WebAutomationSession::getWindows): Deleted.
        (WebKit::WebAutomationSession::openWindow): Deleted.
        (WebKit::WebAutomationSession::closeWindow): Deleted.
        * UIProcess/Automation/WebAutomationSession.h:

2016-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Support Reflect.construct
        https://bugs.webkit.org/show_bug.cgi?id=147330

        Reviewed by Saam Barati.

        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
        (WebKit::JSNPMethod::getCallData):
        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::getCallData):
        (WebKit::JSNPObject::getConstructData):
        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
        (WebKit::NPJSObject::hasMethod):
        (WebKit::NPJSObject::construct):
        (WebKit::NPJSObject::invoke):

2016-03-04  Alex Christensen  <achristensen@webkit.org>

        Fix file mime-types when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=155058

        Reviewed by Andy Estes.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        Call adjustMIMETypeIfNecessary like we do in connection didReceiveResponse in 
        WebCoreResourceHandleAsOperationQueueDelegate.mm.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        Don't content sniff file urls.  This check is analogous to ResourceHandle::shouldContentSniffURL.

2016-03-04  Sam Weinig  <sam@webkit.org>

        [WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
        <rdar://problem/24943591>
        https://bugs.webkit.org/show_bug.cgi?id=155057

        Reviewed by Tim Horton.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageInsertNewlineInQuotedContent):
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::insertNewlineInQuotedContent):
        * WebProcess/WebPage/WebPage.h:
        Expose WKBundlePageInsertNewlineInQuotedContent as SPI.

2016-03-04  Brent Fulgham  <bfulgham@apple.com>

        Stub API to support a debug menu option for measuring resource load statistics
        https://bugs.webkit.org/show_bug.cgi?id=154998
        <rdar://problem/24944604>

        Reviewed by Andy Estes.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::resourceLoadStatisticsEnabled): Added stub.
        (API::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
        (WKWebsiteDataStoreSetResourceLoadStatisticsEnabled): Added method that calls through
        to the underlying APIWebsiteDataStore class.
        (WKWebsiteDataStoreGetResourceLoadStatisticsEnabled): Ditto.
        * UIProcess/API/C/WKWebsiteDataStoreRef.h:

2016-03-03  Enrica Casucci  <enrica@apple.com>

        Add a mechanism to customize the long press action.
        https://bugs.webkit.org/show_bug.cgi?id=154995
        rdar://problem/24823732

        Reviewed by Tim Horton.

        Adding a new private delegate method to allow clients to
        replace the action sheet displayed for images and links.
        The change also adds support for attachment elements.

        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
        * UIProcess/ios/WKActionSheetAssistant.h:
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showImageSheet]):
        (-[WKActionSheetAssistant showLinkSheet]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _showImageSheet]):
        (-[WKContentView _showAttachmentSheet]):
        (-[WKContentView _showLinkSheet]):
        (-[WKContentView _actionForLongPress]):
        (-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
        (-[WKContentView actionSheetAssistant:showCustomSheetForElement:]):
        (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2016-03-04  Brent Fulgham  <bfulgham@apple.com>

        [WK2] Gather resource load statistics
        https://bugs.webkit.org/show_bug.cgi?id=154278
        <rdar://problem/24702892>

        Reviewed by Andy Estes.

        Revise the WebProcess to notify the UIProcess about resource load statistics. These
        updates are not time-critical, and do not need to be done in concert with the actual
        load. As resource loads are made, each WebProcess notifies the UIProcess of the new
        load counts, then clears its local state. These statistics are then aggregated in
        the UIProcess.

        * CMakeLists.txt: Add new ResourceLoadStatisticsState files to build.
        * DerivedSources.make: Ditto.
        * Platform/IPC/ArgumentCoders.h: Update to support HashCountedSets.
        * PlatformEfl.cmake: Add new ResourceLoadStatisticsState files to build.
        * PlatformGTK.cmake: Ditto.
        * PlatformMac.cmake: Ditto.
        * Shared/API/APIObject.h: Add new ResourceLoadStatistics type.
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<ExceptionDetails>::decode): Support new ResourceLoadStatistics type.
        (IPC::ArgumentCoder<ResourceLoadStatistics>::encode): Added.
        (IPC::ArgumentCoder<ResourceLoadStatistics>::decode): Added.
        * Shared/WebCoreArgumentCoders.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode): Handle 'resourceLoadStatisticsEnabled' flag.
        (WebKit::WebProcessCreationParameters::decode): Ditto.
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add storage location for the
        resource load statistics.
        (API::ProcessPoolConfiguration::copy): Handle the new storage location and the feature flag.
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added stub.
        * UIProcess/API/APIWebsiteDataStore.h:
        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
        (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added.
        (API::WebsiteDataStore::defaultDataStoreConfiguration): Added support for the new resource
        load statistics storage location.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]): Sync Process Pool configuration parameters
        with the state of our websiteData object's "ResourceLoadStatisticsEnabled" flag, so that
        new processes are created in the right state.
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore _resourceLoadStatisticsEnabled]): Added.
        (-[WKWebsiteDataStore _setResourceLoadStatisticsEnabled:]): Added.
        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess): Handle new flag for enabling resource
        load statistics.
        * UIProcess/WebResourceLoadStatisticsStore.cpp: Added.
        (WebKit::WebResourceLoadStatisticsStore::create):
        (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
        (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
        (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
        (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled):
        (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsEnabled):
        (WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
        (WebKit::WebResourceLoadStatisticsStore::writeToDisk):
        (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
        * UIProcess/WebResourceLoadStatisticsStore.h: Added.
        (WebKit::WebResourceLoadStatisticsStore::coreStore):
        * UIProcess/WebResourceLoadStatisticsStore.messages.in: Added.
        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
        (WebKit::WebsiteDataStore::platformInitialize): Register a termination handler
        to close down the resource load statistics store.
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::WebsiteDataStore): Initialize the new WebResourceLoadStatisticsStore
        member.
        (WebKit::WebsiteDataStore::webProcessWillOpenConnection): Register the WebResourceLoadStatisticsStore
        object as a work queue message receiver
        (WebKit::WebsiteDataStore::webProcessDidCloseConnection): Unregister WebResourceLoadStatisticsStore.
        (WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled): Added.
        (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        (WebKit::WebsiteDataStore::resourceLoadStatisticsStore): Added.
        * WebKit2.xcodeproj/project.pbxproj: Add new ResourceLoadStatisticsState files to build.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess): Take into account the new parameter
        specifying whether resource load statistics are being captured.
        (WebKit::WebProcess::WebProcess): Initialized statistics changed notification timer.
        (WebKit::WebProcess::statisticsChangedTimerFired): Added. Send bundles of site load
        statistics to the UIProcess on a set interval. Clear out local cache after each send.
        (WebKit::WebProcess::setResourceLoadStatisticsEnabled): Added.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in: Add new SetResourceLoadStatisticsEnabled message.

2016-03-04  Daniel Bates  <dabates@apple.com>

        Temporarily use bundle identifier as part of user directory suffix
        https://bugs.webkit.org/show_bug.cgi?id=155042
        <rdar://problem/24983174>

        Reviewed by Brent Fulgham and Brady Eidson.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

2016-03-04  Alex Christensen  <achristensen@webkit.org>

        Release build fix after r197572.
        https://bugs.webkit.org/show_bug.cgi?id=154993

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):

2016-03-04  Alex Christensen  <achristensen@webkit.org>

        Use NSURLSession for loading in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=154993

        Reviewed by Sam Weinig.

        * config.h:

2016-03-04  Alex Christensen  <achristensen@webkit.org>

        Use NetworkSession for pings
        https://bugs.webkit.org/show_bug.cgi?id=154984

        Reviewed by Antti Koivisto.

        Before this patch, we were using NSURLConnection for pings when the rest of the loading was being 
        done with NSURLSession.  To fix this, I implemented PingLoad, which is the NetworkSession equivalent
        of PingHandle.

        This fixes http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::loadPing):
        (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
        * NetworkProcess/PingLoad.h: Added.
        (WebKit::PingLoad::PingLoad):
        (WebKit::PingLoad::willPerformHTTPRedirection):
        (WebKit::PingLoad::didReceiveChallenge):
        (WebKit::PingLoad::didReceiveResponseNetworkSession):
        (WebKit::PingLoad::didReceiveData):
        (WebKit::PingLoad::didCompleteWithError):
        (WebKit::PingLoad::didBecomeDownload):
        (WebKit::PingLoad::didSendData):
        (WebKit::PingLoad::wasBlocked):
        (WebKit::PingLoad::cannotShowURL):
        (WebKit::PingLoad::timeoutTimerFired):
        (WebKit::PingLoad::~PingLoad):
        * WebKit2.xcodeproj/project.pbxproj:

2016-03-04  Timothy Hatcher  <timothy@apple.com>

        Inform WebKit and WebCore if a page is controlled by automation.

        https://bugs.webkit.org/show_bug.cgi?id=154991
        rdar://problem/24965784

        Reviewed by Joseph Pecoraro.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetIsControlledByAutomation):
        (WKPageSetControlledByAutomation):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setControlledByAutomation):
        (WebKit::WebPageProxy::creationParameters):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isControlledByAutomation):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageIsControlledByAutomation):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
        (WebKit::WebPage::isControlledByAutomation):
        (WebKit::WebPage::setControlledByAutomation):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-03-03  Chris Dumez  <cdumez@apple.com>

        Regression(r196770): Unable to use HipChat Mac app
        https://bugs.webkit.org/show_bug.cgi?id=154999
        <rdar://problem/24931959>

        Reviewed by Darin Adler.

        Have the NetworkProcess and the WebProcess pass the UIProcess bundle
        identifier to WebCore so that we can do app detection of applications
        using a WK2 WebView (such as HipChat).

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-03-03  Simon Fraser  <simon.fraser@apple.com>

        Use larger tiles when possible to reduce per-tile painting overhead
        https://bugs.webkit.org/show_bug.cgi?id=154985
        rdar://problem/23635219

        Reviewed by Tim Horton.

        Do a bit of #include cleanup.

        * Shared/mac/RemoteLayerBackingStore.mm:
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

2016-03-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use std::make_unique<> when creating std::unique_ptr<>
        https://bugs.webkit.org/show_bug.cgi?id=154574

        Reviewed by Darin Adler.

        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::open):
        * NetworkProcess/cache/NetworkCacheStatistics.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::createColorChooser):

2016-03-03  Alex Christensen  <achristensen@webkit.org>

        Move SPI to CFNetworkSPI.h
        https://bugs.webkit.org/show_bug.cgi?id=154992

        Reviewed by Andy Estes.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::applyBasicAuthorizationHeader):

2016-03-03  Alex Christensen  <achristensen@webkit.org>

        Use CredentialStorage with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154939

        Reviewed by Darin Adler.

        * config.h:
        Added compile-time flag to help us be able to keep track and remove this code when we can.
        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::pendingDownloadLocation):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::clearCachedCredentials):
        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSession::sessionID):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::applyBasicAuthorizationHeader):
        (WebKit::NetworkDataTask::NetworkDataTask):
        Use a credential storage and preemptively apply basic authentication headers if we have credentials from the storage.
        This is analogous to code in ResourceHandle::createNSURLConnection.
        
        (WebKit::NetworkDataTask::didReceiveChallenge):
        Make this look more like ResourceHandle::didReceiveAuthenticationChallenge.
        The call to tryPasswordBasedAuthentication was moved from the delegate callback to here.
        
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::willSendRequest.
        
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::tryHandlePasswordBasedAuthentication.
        
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        If we are given a credential with CredentialPersistenceForSession, put it in the credential storage and give 
        CFNetwork a credential with CredentialPersistenceNone so it won't automatically be used again until the credential
        storage says its ok to use again.  This gives us the ability to clear session credentials when logout credentials are used.
        This is analogous to code in ResourceHandle::receivedCredential.
        
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkSession::clearCredentials): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::clearCachedCredentials):
        (WebKit::WebProcess::focusedWebPage):
        We no longer need to clear credentials from the NSURLSessions because we don't store session credentials in them.
        Instead, calling CredentialStorage.clearCredentials is sufficient.

2016-03-03  Andy Estes  <aestes@apple.com>

        Adopt CFNetwork storage partitioning SPI
        https://bugs.webkit.org/show_bug.cgi?id=154957
        rdar://problem/23614620

        Reviewed by Darin Adler.

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask): Computed the storage partition identifier for the new session task.
        If non-empty, set it using a NSURLSessionTask SPI.

2016-03-03  Alex Christensen  <achristensen@webkit.org>

        [WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=115274

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::blobSize):
        (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * NetworkProcess/NetworkProcess.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::destroyPrivateBrowsingSession):
        (WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
        (WebKit::WebProcess::pluginProcessConnectionManager):
        * WebProcess/WebProcess.h:

2016-03-02  Alex Christensen  <achristensen@webkit.org>

        Properly cancel downloads when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154893

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download):
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
        (WebKit::Download::cancel):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

2016-03-01  Ada Chan  <adachan@apple.com>

        Update the media element's presentation mode properly after going in and out of full screen via the Full Screen API
        https://bugs.webkit.org/show_bug.cgi?id=154834

        Reviewed by Simon Fraser.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode):
        Call the new exitFullscreenWithoutAnimationToMode() method on WebVideoFullscreenInterfaceMac.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

2016-03-02  Beth Dakin  <bdakin@apple.com>

        Crashes in media tests after http://trac.webkit.org/changeset/197461
        https://bugs.webkit.org/show_bug.cgi?id=154933

        Reviewed by Eric Carlson.

        Since the controlsManagerInterface is not guaranteed to exist, it doesn't 
        make sense to return a reference. Return a pointer instead.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::isVisible):
        (WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):
        (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):

2016-03-02  Beth Dakin  <bdakin@apple.com>

        Add support for playbackControlsManager
        https://bugs.webkit.org/show_bug.cgi?id=154742
        -and corresponding-
        rdar://problem/23833753

        Reviewed by Jer Noble.

        WebVideoFullscreenManagerProxy ensures the model and interface for the 
        UIProcess side of the playbackControlsManager. It also caches the 
        m_controlsManagerContextId so that it can return the 
        controlsManagerInterface.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
        (WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):

        Pipe isPlayingMediaDidChange() to WebViewImpl, and use that information to 
        update WebViewImplAdditions.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::isPlayingMediaDidChange):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange):
        (WebKit::WebPageProxy::isPlayingVideoWithAudio):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isPlayingAudio):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::isPlayingMediaDidChange):

        Pipe setUpVideoControlsManager to the WebVideoFullscreenManager.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::setUpVideoControlsManager):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

        Ensure the model an interface for the playbackControlsManager on the 
        WebProcess side and pass the message to the UIProcess to do the same.
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):

2016-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after r197409
        https://bugs.webkit.org/show_bug.cgi?id=154918

        Reviewed by Žan Doberšek.

        We have an incorrect check in DrawingAreaImpl constructor that has
        never actually worked because it uses the page settings before
        they were initialized. But that has been fixed in r197409 and now
        we are always forcing accelerated compositing mode incorrectly,
        because m_alwaysUseCompositing is set in the constructor and never
        changed again.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::DrawingAreaImpl): Remove code to set
        settings and m_alwaysUseCompositing, since that should be done in
        updatePreferences().
        (WebKit::DrawingAreaImpl::updatePreferences): Update the settings
        accordingly and always update m_alwaysUseCompositing when AC is
        enabled and forced in the settings.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage): WebPage::updatePreferences() calls
        DrawingArea::updatePreferences(), but since r197409 it happens
        before the drawing area has been created. So, call
        DrawingArea::updatePreferences() in the constructor right after
        the main frame has been created, since
        DrawingArea::updatePreferences() uses the main frame.

2016-02-29  Ada Chan  <adachan@apple.com>

        Adopt the new version of AVOutputDeviceMenuController's showMenuForRect method.
        https://bugs.webkit.org/show_bug.cgi?id=154823

        Reviewed by Tim Horton.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::showPlaybackTargetPicker):
        (WebKit::WebPageProxy::customPlaybackActionSelected):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::showPlaybackTargetPicker):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::customPlaybackActionSelected):

2016-02-29  Brent Fulgham  <bfulgham@apple.com>

        [WK2] Stub support for WebsiteDataTypeResourceLoadStatistics
        https://bugs.webkit.org/show_bug.cgi?id=154689
        <rdar://problem/24702576>

        Reviewed by Sam Weinig.

        * Shared/WebsiteData/WebsiteDataType.h: Add new WebsiteDataTypeResourceLoadStatistics.
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (dataTypesToString): Handle new type.
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes): Ditto.
        (WebKit::toWKWebsiteDataTypes): Ditto.
        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Add new _WebsiteDataTypeResourceLoadStatistics.

2016-03-01  Alex Christensen  <achristensen@webkit.org>

        Correctly keep track of NetworkDataTasks with and without credentials when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154876

        Reviewed by Brady Eidson.

        I was seeing an assertion failure from ASSERT(!m_session.m_dataTaskMap.contains(taskIdentifier()))
        in the NetworkDataTask constructor sometimes.  This is because a task identifier is not enough information
        to uniquely find a NetworkDataTask in a NetworkSession since r196034 because there are two NSURLSessions
        in a NetworkSession, one with credentials and one without.  The assertion would fire in a case like if we
        made the first NetworkDataTask with credentials (taskIdentifier is 1) and the first NetworkDataTask 
        without credentials before the first NetworkDataTask with credentials was finished.  In that case, the 
        taskIdentifier would also be 1, which would conflict with the other taskIdentifier.  That taskIdentifier
        would uniquely identify the task in the correct NSURLSession, though, so the solution is to keep a map
        for each NSURLSession in the NetworkSession.

        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::suspend):
        (WebKit::serverTrustCredential):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        (WebKit::NetworkSession::clearCredentials):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkSession::addDownloadID):

2016-03-01  Andreas Kling  <akling@apple.com>

        REGRESSION (r154616): Accelerated drawing is off during the initial load
        <https://webkit.org/b/123812>

        Reviewed by Tim Horton.

        Load preferences before instantiating the first DrawingArea. This ensures that we do the
        initial paint using accelerated drawing, and avoids allocating persistent data structures
        only needed by the software rendering path.

        * WebProcess/WebPage/WebPage.cpp:

2016-03-01  Alex Christensen  <achristensen@webkit.org>

        Fix tests when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154866

        Reviewed by Brady Eidson.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::globalCustomProtocolManager):
        (WebKit::NetworkSession::setCustomProtocolManager):
        
        Use a static NeverDestroyed instead of a local NeverDestroyed.
        This fix was suggested by Darin after I broke the custom protocol tests in r197362.
        
        (WebKit::NetworkSession::clearCredentials):
        
        In r197223 I added code that I thought cleared the credentials of a session, but it was
        actually trying (and failing) to remove the credentials from the NSURLCredentialStorage that
        were stored with NSURLCredentialPersistencePermanent.
        This was causing credentials stored in an NSURLSession with NSURLCredentialPersistenceForSession
        to remain for the next tests, and was causing credentials from previous tests, usually from
        http/tests/loading/basic-credentials-sent-automatically.html, to be used in future tests.
        Creating a new NSURLSession is the equivalent of CredentialStorage::clearCredentials because it
        removes all credentials stored with NSURLCredentialPersistenceForSession.

2016-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        NetworkCache: Web process leaks resource buffer when using shareable reasources
        https://bugs.webkit.org/show_bug.cgi?id=154852

        Reviewed by Darin Adler.

        ResourceLoader::didReceiveBuffer() expects a PassRefPtr, but we
        are passing a raw pointer making PassRefPtr to take another
        reference instead of transfering the ownership as expected.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResource):

2016-02-29  Zan Dobersek  <zdobersek@igalia.com>

        ThreadedCompositor: clean up composition-specific resources before shutting down the thread
        https://bugs.webkit.org/show_bug.cgi?id=154793

        Reviewed by Carlos Garcia Campos.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::runCompositingThread): Before concluding the
        compositing thread run, clean up all the resources that were allocated at
        the start, and in the reverse order. Specifically, we now also deallocate
        the CoordinatedGraphicsScene and the SimpleViewportController objects. This
        way these are not deallocated on the main thread when the ThreadedCompositor
        destructor would otherwise clean them up.

2016-02-29  Zan Dobersek  <zdobersek@igalia.com>

        ThreadSafeCoordinatedSurface: remove the unused private create() static method
        https://bugs.webkit.org/show_bug.cgi?id=154792

        Reviewed by Carlos Garcia Campos.

        Remove the static ThreadSafeCoordinatedSurface::create() method that accepted
        a std::unique_ptr<ImageBuffer> object as its third parameter. This was not used
        anywhere.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
        (WebKit::ThreadSafeCoordinatedSurface::create): Deleted.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:

2016-02-29  Simon Fraser  <simon.fraser@apple.com>

        Remove the experimental feature of antialiased font dilation
        https://bugs.webkit.org/show_bug.cgi?id=154843

        Reviewed by Zalan Bujtas.

        Remove the "antialiased font dilation" code path, and related prefs.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAntialiasedFontDilationEnabled):
        (WKPreferencesGetAntialiasedFontDilationEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _antialiasedFontDilationEnabled]): Deleted.
        (-[WKPreferences _setAntialiasedFontDilationEnabled:]): Deleted.
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Deleted.

2016-02-29  Brady Eidson  <beidson@apple.com>

        Modern IDB: WebKit 2 IPC layer easily confused about multiple web processes being connected.
        https://bugs.webkit.org/show_bug.cgi?id=154837

        Reviewed by Alex Christensen.

        The crux of the bug is that WebProcesses cannot assign themselves server-unique identifiers...
        The server must do that for them.
        
        A once-per-session-per-WebProcess sync message and a few updates to connection management fix this.
        
        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
        (WebKit::generateConnectionToServerIdentifier):
        (WebKit::DatabaseToWebProcessConnection::establishIDBConnectionToServer):
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
        (WebKit::generateConnectionToServerIdentifier): Deleted.

        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
        (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession):
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:

2016-02-29  Alex Christensen  <achristensen@webkit.org>

        Don't call NetworkProcess::singleton from WebProcess when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154829

        Reviewed by Anders Carlsson.

        We were calling NetworkProcess::singleton when making the default session in the 
        WebProcess, which caused bad things to happen.  We also were never clearing the 
        credentials in the WebProcess between tests because it used to always call
        NetworkProcess::singleton, which caused flaky tests.

        This fixes repeatable crashes in http/tests/media/media-document-referer.html and 
        http/tests/media/media-document.html when using NetworkSession.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::NetworkProcess):
        (WebKit::NetworkProcess::~NetworkProcess):
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::configurationForType):
        (WebKit::globalCustomProtocolManager):
        (WebKit::NetworkSession::setCustomProtocolManager):
        (WebKit::NetworkSession::defaultSession):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::clearCachedCredentials):

2016-02-29  Gavin Barraclough  <barraclough@apple.com>

        RefCounter<T>::Event -> RefCounterEvent
        https://bugs.webkit.org/show_bug.cgi?id=154767

        Reviewed by Darin Adler.

        RefCounter<T>::Event is kinda verbose to use, and there is no need for this
        to be specific to a particular typeof RefCounter. Move the enum class up to
        the top level & rename to RefCounterEvent.

        Also remove UserObservablePageToken - this is vestigial & not really offering
        anything over just using UserObservablePageCounter::Token directly.

        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::PluginProcessManager):
        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
        (WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::ProcessThrottler):
        (WebKit::m_backgroundCounter):
        (WebKit::m_suspendMessageCount):
        * UIProcess/ProcessThrottler.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::m_processSuppressionDisabledForPageCounter):
        (WebKit::m_hiddenPageThrottlingAutoIncreasesCounter):
        * UIProcess/WebProcessPool.h:

2016-02-29  Konstantin Tokarev  <annulen@yandex.ru>

        Fixed compilation with !ENABLE(DATABASE_PROCESS).
        https://bugs.webkit.org/show_bug.cgi?id=154813

        Reviewed by Michael Catanzaro.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::terminateDatabaseProcess): Added missing #if
        guard.

2016-02-29  Adrien Plazas  <aplazas@igalia.com>

        [GTK] Touch slider test fails due to assertion in webkitWebViewBaseTouchEvent()
        https://bugs.webkit.org/show_bug.cgi?id=153829

        Reviewed by Carlos Garcia Campos.

        Once a touch event sequence is identified as a gesture, remove it
        from the list of handled touch events.

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

2016-02-29  Csaba Osztrogonác  <ossy@webkit.org>

        [Mac][cmake] Unreviewed buildfix after r197177. Just for fun.

        * PlatformMac.cmake:

2016-02-28  Sam Weinig  <sam@webkit.org>

        Reimplement WKPageGroup in terms of WKUserContentController
        https://bugs.webkit.org/show_bug.cgi?id=154804

        Reviewed by Dan Bernstein.

        Instead of having both WebPageGroup and WebUserContentControllerProxy both keep track
        of user scripts and user stylesheets, give WebPageGroup a WebUserContentControllerProxy
        and let it take care of things. This allows us to remove a ton of duplicate code, and
        provides a convenient way for clients currently using PageGroup based user content insertion
        to start using UserContentController, since they can now be used at the same time.

        When using WKPageConfigurationRef, the rule is:
            - If you don't set a WKUserContentControllerRef, the one from the WKPageGroupRef will be used.
            - If you do set a WKUserContentControllerRef, it will be used, and the one from the WKPageGroupRef
              will do nothing for that web view.

        * DerivedSources.make:
        Remove WebPageGroupProxy. It no longer is a MessageReceiver.

        * Shared/WebPageGroupData.cpp:
        (WebKit::WebPageGroupData::encode):
        (WebKit::WebPageGroupData::decode):
        * Shared/WebPageGroupData.h:
        Stop encoding/decoding user content, instead just encode the identifier to the UserContentController.

        * UIProcess/API/C/WKPageGroup.cpp:
        (WKPageGroupGetUserContentController):
        * UIProcess/API/C/WKPageGroup.h:
        Add getter for the underlying WKUserContentControllerRef.

        * UIProcess/API/cpp/WKRetainPtr.h:
        (WebKit::retainWK):
        Add retainWK() helper to match RetainPtr's retainPtr() helper.

        * UIProcess/WebPageGroup.cpp:
        (WebKit::WebPageGroup::WebPageGroup):
        (WebKit::WebPageGroup::userContentController):
        (WebKit::WebPageGroup::addUserStyleSheet):
        (WebKit::WebPageGroup::addUserScript):
        (WebKit::WebPageGroup::removeAllUserStyleSheets):
        (WebKit::WebPageGroup::removeAllUserScripts):
        (WebKit::WebPageGroup::removeAllUserContent):
        (WebKit::WebPageGroup::addUserContentExtension):
        (WebKit::WebPageGroup::removeUserContentExtension):
        (WebKit::WebPageGroup::removeAllUserContentExtensions):
        * UIProcess/WebPageGroup.h:
        Pass through to the WebUserContentControllerProxy.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::finishInitializingWebPageAfterProcessLaunch):
        (WebKit::WebPageProxy::creationParameters):
        * UIProcess/WebPageProxy.h:
        WebPageProxies always have a WebUserContentControllerProxy now, so it can go in a Ref and
        a few branches can be removed.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createWebPage):
        If a UserContentController is not passed in, use the one from the PageGroup.

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

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        Add some #includes that are now needed.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::getOrCreate):
        * WebProcess/UserContent/WebUserContentController.h:
        Modernize WebUserContentController::getOrCreate to return a Ref.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
        (WebKit::WebPage::addUserScript):
        (WebKit::WebPage::addUserStyleSheet):
        (WebKit::WebPage::removeAllUserContent):
        * WebProcess/WebPage/WebPage.h:
        Store the WebUserContentController in Ref, remove unnecessary branches/asserts.

        * WebProcess/WebPage/WebPageGroupProxy.cpp:
        (WebKit::WebPageGroupProxy::WebPageGroupProxy):
        (WebKit::WebPageGroupProxy::~WebPageGroupProxy):
        (WebKit::WebPageGroupProxy::userContentController):
        (WebKit::WebPageGroupProxy::addUserStyleSheet): Deleted.
        (WebKit::WebPageGroupProxy::addUserScript): Deleted.
        (WebKit::WebPageGroupProxy::removeAllUserStyleSheets): Deleted.
        (WebKit::WebPageGroupProxy::removeAllUserScripts): Deleted.
        (WebKit::WebPageGroupProxy::removeAllUserContent): Deleted.
        (WebKit::WebPageGroupProxy::addUserContentExtension): Deleted.
        (WebKit::WebPageGroupProxy::removeUserContentExtension): Deleted.
        (WebKit::WebPageGroupProxy::removeAllUserContentExtensions): Deleted.
        * WebProcess/WebPage/WebPageGroupProxy.h:
        Store a WebUserContentController in a Ref, remove now unnecessary message handling functions.

        * WebProcess/WebPage/WebPageGroupProxy.messages.in:
        Removed.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didReceiveMessage):
        Remove routing to WebPageGroupProxy, which is no longer a MessageReceiver.

2016-02-28  Sam Weinig  <sam@webkit.org>

        Bind _WKUserStyleSheets to _WKUserContentWorlds to allow for grouping of user content by associating to a world
        https://bugs.webkit.org/show_bug.cgi?id=154798

        Reviewed by Dan Bernstein.

        Treat _WKUserStyleSheets like WKUserScripts and allow them to be bound to a _WKUserContentWorld.
        The immediate benefit of this is allowing a client to bind a set of user content (scripts and stylesheets
        for now) to a world and have them easily remove all user content associated with that world easily.

        * Shared/API/APIArray.h:
        Add helpers removeAllMatching and removeAllOfTypeMatching.

        * UIProcess/API/APIUserStyleSheet.h:
        Add API::UserContentWorld member.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController _removeAllUserScriptsAssociatedWithUserContentWorld:]):
        (-[WKUserContentController _removeAllUserStyleSheetsAssociatedWithUserContentWorld:]):
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        Add _removeAllUserScriptsAssociatedWithUserContentWorld and _removeAllUserStyleSheetsAssociatedWithUserContentWorld.

        * UIProcess/API/Cocoa/WKUserScript.mm:
        (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
        (toStringVector): Deleted.
        * UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
        (API::toStringVector):
        Move toStringVector to a location where it can be shared.

        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
        (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
        Add new initializer which has a world to be bound to. While here, match WKUserScript and add support for the 
        legacy whitelist and blacklists.

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::removeProcess):
        (WebKit::WebUserContentControllerProxy::addUserContentWorldUse):
        (WebKit::WebUserContentControllerProxy::shouldSendRemoveUserContentWorldsMessage):
        (WebKit::WebUserContentControllerProxy::removeUserContentWorldUses):
        (WebKit::WebUserContentControllerProxy::addUserScript):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        Refactor to share the code which decides whether to send AddUserContentWorlds/RemoveUserContentWorlds
        messages.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::addUserContentWorlds):
        (WebKit::WebUserContentController::removeUserContentWorlds):
        (WebKit::WebUserContentController::addUserScripts):
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeAllUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheets):
        (WebKit::WebUserContentController::removeUserStyleSheet):
        (WebKit::WebUserContentController::removeAllUserStyleSheets):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:
        Add support for binding stylesheets to worlds and allow removing all the scripts/stylesheets from a 
        set of worlds at once by passing Vectors of world identifiers in the remove messages.

2016-02-27  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r197204, r197207, r197211, r197217,
        r197218, and r197219.
        https://bugs.webkit.org/show_bug.cgi?id=154780

        Caused crashes in WebVideoFullscreenManagerProxy (Requested by
        ap on #webkit).

        Reverted changesets:

        "Add support for playbackControlsManager"
        https://bugs.webkit.org/show_bug.cgi?id=154742
        http://trac.webkit.org/changeset/197204

        "Attempted build fix."
        http://trac.webkit.org/changeset/197207

        "Attempted build fix."
        http://trac.webkit.org/changeset/197211

        "Attempted 32-bit build fix."
        http://trac.webkit.org/changeset/197217

        "Another 32-bit build fix."
        http://trac.webkit.org/changeset/197218

        "32-bit!!!"
        http://trac.webkit.org/changeset/197219

2016-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ clean build.

        Add missing header include.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

2016-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        Network cache: old pages returned by disk cache on history navigation after session is restored
        https://bugs.webkit.org/show_bug.cgi?id=153230

        Reviewed by Chris Dumez.

        Since r181734, the network cache never revalidates resources for
        history navigation. This is good for the memory cache, but in the
        case of disk cache, we might end up with outdated pages when
        restoring the session. When restoring the session happens because
        of an API request (we also restore the session when recovering
        from a web process crash), we should revalidate back forward list
        requests in the disk cache if needed. This will only happen the
        first time they are loaded after a session restore. After a web process
        crash, resources will be used uncondionally from the disk cache.

        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Use Ref&&
        instead of PassRefPtr.
        * WebProcess/WebPage/WebBackForwardListProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WePage::WebPage): Call restoreSessionInternal passing
        No as restoredByAPIRequest parameter.
        (WebKit::WebPage::restoreSessionInternal): Set restoredFromSession
        flag to the created HistoryItem if the item was restored from
        session by an API request.
        (WebKit::WebPage::restoreSession): Call restoreSessionInternal
        passing Yes as restoredByAPIRequest parameter.
        * WebProcess/WebPage/WebPage.h:

2016-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix a typo.

        Unreviewed. Shame I didn't notice in the previous commit.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::removeUserContentWorld):

2016-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix GTK and maybe EFL build after r197172.

        Unreviewed.

        * CMakeLists.txt:
        * UIProcess/API/gtk/WebKitUserContent.cpp:
        (_WebKitUserScript::_WebKitUserScript):
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::removeUserContentWorld):
        (WebKit::WebUserContentController::addUserScripts):
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeAllUserScripts):

2016-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Fix order of parameters in gtkdoc for webkit_web_view_get_snapshot

        Unreviewed.

        * UIProcess/API/gtk/WebKitWebView.cpp:

2016-02-26  Brady Eidson  <beidson@apple.com>

        Modern IDB: New database versions are never committed to SQLite.
        <rdar://problem/24860952> and https://bugs.webkit.org/show_bug.cgi?id=154741
        
        Modern IDB: If a database handle is not open, files are not actually deleted from disk
        https://bugs.webkit.org/show_bug.cgi?id=154756

        Reviewed by Alex Christensen.

        Add WK2 SPI to force termination of the database process.

        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _terminateDatabaseProcess]):
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::terminateDatabaseProcess):
        * UIProcess/WebProcessPool.h:

2016-02-26  Alex Christensen  <achristensen@webkit.org>

        Clear credentials and prevent unauthorized credential storage when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154755

        Reviewed by Brady Eidson.

        Credentials from previous tests were being used sometimes, notably in 
        http/tests/misc/401-alternative-content.php when running multiple credential-based
        tests with the same WebKitTestRunner.

        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::clearCachedCredentials):
        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::clearCredentials):
        (WebKit::NetworkSession::dataTaskForIdentifier):

2016-02-26  Gavin Barraclough  <barraclough@apple.com>

        Page TimerAlignmentIntervalIncrease mechanism should have upper limit
        https://bugs.webkit.org/show_bug.cgi?id=154744

        Reviewed by Geoff Garen.

        There would be diminishing returns from throttling timers in background pages infinitely.
        Add a heuristic to limit appropriately.

        The flow of data here is WebPageProxy informs WebProcessPool of the number of pages
        participating in this mechanism, WebProcessPool computes an apropriate limit and pushes
        this out to the WebProcesses, which in turn update each of their pages.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
            - Call updateHidenPageThrottingAutoIncreases on creation.
        (WebKit::WebPageProxy::updateHidenPageThrottingAutoIncreases):
            - If increasing timer throttling is enabled increment the counter on WebProcessPool.
        (WebKit::WebPageProxy::preferencesDidChange):
            - Call updateHidenPageThrottingAutoIncreases on preferences change.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
            - initialize new RefCounter.
        (WebKit::WebProcessPool::updateHidenPageThrottingAutoIncreaseLimit):
            - When count of participating pages changes, update the limit.
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::setHiddenPageTimerThrottlingIncreaseLimit):
            - Propagate limit to WebCore::Page.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::setHiddenPageTimerThrottlingIncreaseLimit):
            - Propagate limit to WebPages.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:
            - Added new message.

2016-02-26  Beth Dakin  <bdakin@apple.com>

        Attempted build fix.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
        (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):

2016-02-26  Anders Carlsson  <andersca@apple.com>

        Fix Yosemite build.

        * UIProcess/API/Cocoa/_WKWebsiteDataSize.mm:
        (-[_WKWebsiteDataSize sizeOfDataTypes:]):

2016-02-26  Beth Dakin  <bdakin@apple.com>

        Add support for playbackControlsManager
        https://bugs.webkit.org/show_bug.cgi?id=154742
        -and corresponding-
        rdar://problem/23833753

        Reviewed by Jer Noble.

        WebVideoFullscreenManagerProxy ensures the model and interface for the 
        UIProcess side of the playbackControlsManager. It also caches the 
        m_controlsManagerContextId so that it can return the 
        controlsManagerInterface.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
        (WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):

        Pipe isPlayingMediaDidChange() to WebViewImpl, and use that information to 
        update WebViewImplAdditions.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::isPlayingMediaDidChange):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::isPlayingMediaDidChange):
        (WebKit::WebPageProxy::isPlayingVideoWithAudio):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isPlayingAudio):
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::isPlayingMediaDidChange):

        Pipe setUpVideoControlsManager to the WebVideoFullscreenManager.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::setUpVideoControlsManager):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

        Ensure the model an interface for the playbackControlsManager on the 
        WebProcess side and pass the message to the UIProcess to do the same.
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):

2016-02-26  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore/WKWebsiteDataRecord needs to provide size information about each type of data
        https://bugs.webkit.org/show_bug.cgi?id=154750

        Reviewed by Tim Horton.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        WebsiteData::Entry now takes a size.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        If necessary, compute sizes.

        (WebKit::NetworkProcess::fetchWebsiteData):
        Just pass 0 for the CF cache for now.

        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        FetchWebsiteData now takes a OptionSet<WebsiteDataFetchOption>.

        * Shared/WebsiteData/WebsiteData.cpp:
        (WebKit::WebsiteData::Entry::encode):
        (WebKit::WebsiteData::Entry::decode):
        Encode and decode the size.

        * Shared/WebsiteData/WebsiteData.h:
        Add size.

        * Shared/WebsiteData/WebsiteDataFetchOption.h:
        Add new enum.

        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        Pass an empty OptionSet<WebsiteDataFetchOption>.

        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (WKResourceCacheManagerGetCacheOrigins):
        Pass an empty OptionSet<WebsiteDataFetchOption>.

        * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
        (-[WKWebsiteDataRecord description]):
        If we have a size, print it out as well.

        (-[WKWebsiteDataRecord _dataSize]):
        Return a size if we have one.

        * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        Call through to the SPI.

        (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
        Compute the right options.

        * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
        Import WKWebsiteDataStorePrivate.h.

        * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
        Add SPI.

        * UIProcess/API/Cocoa/_WKWebsiteDataSize.h:
        * UIProcess/API/Cocoa/_WKWebsiteDataSize.mm:
        (-[_WKWebsiteDataSize initWithSize:]):
        (-[_WKWebsiteDataSize totalSize]):
        (-[_WKWebsiteDataSize sizeOfDataTypes:]):
        Add _WKWebsiteDataSize header.

        * UIProcess/API/Cocoa/_WKWebsiteDataSizeInternal.h: Add IPI header.

        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        This now takes a OptionSet<WebsiteDataFetchOption>.

        * UIProcess/Network/NetworkProcessProxy.h:
        Update members.

        * UIProcess/WebsiteData/WebsiteDataRecord.h:
        Add a hash map from types to sizes.

        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::fetchData):
        This now takes a OptionSet<WebsiteDataFetchOption>.

        * UIProcess/WebsiteData/WebsiteDataStore.h:
        Update member functions.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::fetchWebsiteData):
        This now takes a OptionSet<WebsiteDataFetchOption>.

2016-02-26  Anders Carlsson  <andersca@apple.com>

        Add a toWebsiteDataType and reimplement toWebsiteDataTypes using it
        https://bugs.webkit.org/show_bug.cgi?id=154746

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataType):
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):

2016-02-26  Anders Carlsson  <andersca@apple.com>

        Add WTF::OptionSet and use it for the website data types enum
        https://bugs.webkit.org/show_bug.cgi?id=154733

        Reviewed by Geoffrey Garen.

        This is a pretty mechanical change:
        
        Convert all uses of the WebsiteDataTypes enum to WTF::OptionSet. Rename the WebsiteDataTypes enum to
        WebsiteDataType (since it only represents a single data type), and rename headers. Encode and decode WTF::OptionSet properly.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseProcess.messages.in:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::NetworkProcess::deleteWebsiteData):
        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * Platform/IPC/ArgumentCoders.h:
        (IPC::ArgumentCoder<OptionSet<T>>::encode):
        (IPC::ArgumentCoder<OptionSet<T>>::decode):
        * Scripts/webkit/messages.py:
        (class_template_headers):
        * Shared/WebsiteData/WebsiteData.h:
        * Shared/WebsiteData/WebsiteDataType.h: Renamed from Source/WebKit2/Shared/WebsiteData/WebsiteDataTypes.h.
        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        (WKApplicationCacheManagerDeleteEntriesForOrigin):
        (WKApplicationCacheManagerDeleteAllEntries):
        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (toWebsiteDataTypes):
        (WKResourceCacheManagerClearCacheForOrigin):
        * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
        (WebKit::toWebsiteDataTypes):
        (WebKit::toWKWebsiteDataTypes):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::fetchWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/Databases/DatabaseProcessProxy.h:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteData):
        (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/Network/NetworkProcessProxy.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::fetchWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteData):
        (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
        (WebKit::WebsiteDataRecord::add):
        (WebKit::WebsiteDataRecord::addCookieHostName):
        (WebKit::WebsiteDataRecord::addPluginDataHostName):
        * UIProcess/WebsiteData/WebsiteDataRecord.h:
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::computeNetworkProcessAccessTypeForDataFetch):
        (WebKit::computeWebProcessAccessTypeForDataFetch):
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
        (WebKit::computeWebProcessAccessTypeForDataRemoval):
        (WebKit::WebsiteDataStore::removeData):
        * UIProcess/WebsiteData/WebsiteDataStore.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::fetchWebsiteData):
        (WebKit::WebProcess::deleteWebsiteData):
        (WebKit::WebProcess::deleteWebsiteDataForOrigins):
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in:

2016-02-26  Sam Weinig  <sam@webkit.org>

        Try to fix the Yosemite build again.

        * UIProcess/API/Cocoa/WKUserScript.mm:
        (toStringVector):
        (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):

2016-02-26  Sam Weinig  <sam@webkit.org>

        Try to fix the Yosemite build.

        * UIProcess/API/Cocoa/WKUserScriptPrivate.h:

2016-02-25  Anders Carlsson  <andersca@apple.com>

        Cache::traverse should pass the record info to its traversal handler
        https://bugs.webkit.org/show_bug.cgi?id=154695

        Reviewed by Antti Koivisto.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::clearDiskCacheEntries):
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::traverse):
        * NetworkProcess/cache/NetworkCache.h:

2016-02-25  Gavin Barraclough  <barraclough@apple.com>

        RefCounter value changed callback should be called on all changes (not just zero edge).
        https://bugs.webkit.org/show_bug.cgi?id=154699

        Reviewed by Anders Carlsson.

        RefCounter currently only triggers a callback when the count goes from zero
        to non-zero and vice-versa. Change that, to be useful to more clients.

        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::PluginProcessManager):
            - Updated for change in RefCounter callback siganture.
        * UIProcess/Plugins/PluginProcessManager.h:
            - Updated for change in RefCounter callback siganture.
        * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
        (WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
            - updated logic for enabling process supression.
        * UIProcess/ProcessThrottler.cpp:
        (WebKit::ProcessThrottler::ProcessThrottler):
            - Updated for change in RefCounter callback siganture.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
            - Updated for change in RefCounter callback siganture.

2016-02-26  Andreas Kling  <akling@apple.com>

        Remove unused CFNetwork disk cache mmap optimization in WebKit2.
        <https://webkit.org/b/154727>

        Reviewed by Darin Adler.

        Nuke all the code related to the mmap optimization we had for CFNetwork's disk cache.
        This code has not been used since we moved to the WebKit2 network cache.

        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::sendBufferMaybeAborting): Deleted.
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::NetworkProcess::platformLowMemoryHandler): Deleted.
        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): Deleted.
        * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Removed.
        * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Removed.
        * NetworkProcess/mac/NetworkLoadMac.mm:
        (WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-26  Commit Queue  <commit-queue@webkit.org>

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

        crashing on some devices (Requested by kling on #webkit).

        Reverted changeset:

        "[Darwin] Use vm_kernel_page_size for WTF::pageSize()."
        https://bugs.webkit.org/show_bug.cgi?id=154726
        http://trac.webkit.org/changeset/197168

2016-02-25  Sam Weinig  <sam@webkit.org>

        Allow WKUserScripts to be run in isolated worlds
        https://bugs.webkit.org/show_bug.cgi?id=154701

        Reviewed by Anders Carlsson.

        Adds support for using isolated worlds, called _WKUserContentWorlds in the SPI,
        from the UIProcess.

        * Shared/API/APIObject.h:
        * Shared/Cocoa/APIObject.mm:
        * UIProcess/API/APIUserContentWorld.cpp: Added.
        (API::generateIdentifier):
        (API::UserContentWorld::worldWithName):
        (API::UserContentWorld::normalWorld):
        (API::UserContentWorld::UserContentWorld):
        (API::UserContentWorld::~UserContentWorld):
        * UIProcess/API/APIUserContentWorld.h: Added.
        Add new UserContentWorld type.

        * UIProcess/API/APIUserScript.h:
        Bind each user script to a particular _WKUserContentWorld.

        * UIProcess/API/C/WKUserScriptRef.cpp:
        (WKUserScriptCreateWithSource):
        (WKUserScriptCopySource):
        Existing APIs create user scripts for the normal world, preserving existing behavior.

        * UIProcess/API/Cocoa/WKUserScript.mm:
        (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
        Existing APIs create user scripts for the normal world, preserving existing behavior.

        (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
        Add a new initializer which takes a world to bind to.  Also add support for the legacy whitelist/blacklist mechanism
        while we are here, as the expected client needs these as well.

        (-[WKUserScript _userContentWorld]):
        Add accessor for the bound world.

        * UIProcess/API/Cocoa/WKUserScriptInternal.h:
        * UIProcess/API/Cocoa/WKUserScriptPrivate.h: Added.
        Add new private header.

        * UIProcess/API/Cocoa/_WKUserContentWorld.h: Added.
        * UIProcess/API/Cocoa/_WKUserContentWorld.mm: Added.
        (+[_WKUserContentWorld worldWithName:]):
        (+[_WKUserContentWorld normalWorld]):
        (-[_WKUserContentWorld dealloc]):
        (-[_WKUserContentWorld name]):
        (-[_WKUserContentWorld _apiObject]):
        * UIProcess/API/Cocoa/_WKUserContentWorldInternal.h: Added.
        Add SPI wrapper.

        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::addUserScript):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        (WebKit::WebUserContentControllerProxy::userScripts):
        (WebKit::WebUserContentControllerProxy::userStyleSheets):
        Add support for registering the worlds with the associated WebContentProcesses and then using
        their identifiers to map user scripts to the correct world.
        
        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
        (-[WKWebProcessPlugInScriptWorld name]):
        Expose the name property.

        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
        (WKBundleScriptWorldCopyName):
        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
        Expose the name property.

        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
        (WebKit::allWorlds):
        (WebKit::InjectedBundleScriptWorld::create):
        (WebKit::InjectedBundleScriptWorld::getOrCreate):
        (WebKit::InjectedBundleScriptWorld::normalWorld):
        (WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld):
        (WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld):
        (WebKit::InjectedBundleScriptWorld::coreWorld):
        (WebKit::InjectedBundleScriptWorld::clearWrappers):
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
        (WebKit::InjectedBundleScriptWorld::name):
        Add the name property and do some drive-by RefPtr -> Ref conversions.

        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::userContentControllers):
        (WebKit::worldMap):
        (WebKit::WebUserContentController::getOrCreate):
        (WebKit::WebUserContentController::~WebUserContentController):
        (WebKit::WebUserContentController::addUserContentWorlds):
        (WebKit::WebUserContentController::removeUserContentWorld):
        (WebKit::WebUserContentController::addUserScripts):
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeAllUserScripts):
        (WebKit::WebUserContentController::addUserStyleSheets):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:
        Track and use worlds passed from the UIProcess.

2016-02-26  Andreas Kling  <akling@apple.com>

        [Darwin] Use vm_kernel_page_size for WTF::pageSize().
        <https://webkit.org/b/154726>

        Reviewed by Antti Koivisto.

        Use WTF::pageSize() for the SharedMemory page size.

        * Platform/mac/SharedMemoryMac.cpp:
        (WebKit::SharedMemory::systemPageSize):

2016-02-25  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Remove WebUIPopupMenuClient
        https://bugs.webkit.org/show_bug.cgi?id=154717

        Reviewed by Gyuyoung Kim.

        WebUIPopupMenuClient is only for EFL to expose WebPopupMenuProxy and WebPopupItem to WK C APIs.
        This patch removes it and related code.

        * PlatformEfl.cmake: Removed WKPopupItem related files from source list.
        * UIProcess/API/C/efl/WKAPICastEfl.h: Removed WKPopupMenu related code.
        * UIProcess/API/C/efl/WKPageEfl.cpp: Removed.
        * UIProcess/API/C/efl/WKPageEfl.h: Removed.
        * UIProcess/API/C/efl/WKPopupItem.cpp: Removed.
        * UIProcess/API/C/efl/WKPopupItem.h: Removed.
        * UIProcess/API/C/efl/WKPopupMenuListener.cpp: Removed.
        * UIProcess/API/C/efl/WKPopupMenuListener.h: Removed.
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::requestPopupMenu):
        * UIProcess/API/efl/EwkView.h:
        * UIProcess/API/efl/ewk_popup_menu.cpp:
        (EwkPopupMenu::EwkPopupMenu):
        (EwkPopupMenu::close):
        (EwkPopupMenu::setSelectedIndex):
        * UIProcess/API/efl/ewk_popup_menu_item.cpp: Used WebPopupItem and others instead of WK C APIs.
        * UIProcess/API/efl/ewk_popup_menu_item_private.h: Ditto.
        * UIProcess/API/efl/ewk_popup_menu_private.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close): Removed unnecessary EFL guards.
        (WebKit::WebPageProxy::showPopupMenu): Ditto.
        (WebKit::WebPageProxy::hidePopupMenu): Ditto.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPopupMenuProxy.h:
        * UIProcess/efl/PageUIClientEfl.cpp: Removed WKPopupMenuListener related code.
        (WebKit::PageUIClientEfl::PageUIClientEfl): Deleted.
        (WebKit::PageUIClientEfl::showPopupMenu): Deleted.
        (WebKit::PageUIClientEfl::hidePopupMenu): Deleted.
        * UIProcess/efl/PageUIClientEfl.h:
        * UIProcess/efl/WebPageProxyEfl.cpp:
        (WebKit::WebPageProxy::initializeUIPopupMenuClient): Deleted.
        * UIProcess/efl/WebPopupMenuListenerEfl.cpp:
        (WebKit::WebPopupMenuListenerEfl::WebPopupMenuListenerEfl): Deleted.
        (WebKit::WebPopupMenuListenerEfl::valueChanged): Deleted.
        * UIProcess/efl/WebPopupMenuListenerEfl.h:
        (WebKit::WebPopupMenuListenerEfl::create): Deleted.
        * UIProcess/efl/WebPopupMenuProxyEfl.cpp: Used WebPopupItem and others instead of WK C APIs.
        * UIProcess/efl/WebPopupMenuProxyEfl.h: Ditto.
        (WebKit::WebPopupMenuProxyEfl::create):
        * UIProcess/efl/WebUIPopupMenuClient.cpp: Removed.
        * UIProcess/efl/WebUIPopupMenuClient.h: Removed.
        * UIProcess/efl/WebView.cpp:
        (WebKit::WebView::createPopupMenuProxy): Used WebPopupItem and others instead of WK C APIs.

2016-02-25  Andreas Kling  <akling@apple.com>

        [iOS] Enable PageCache backing store clearing optimization for WebKit2.
        <https://webkit.org/b/154712>

        Reviewed by Anders Carlsson.

        We had an optimization for iOS where we'd tear down the compositing tree for
        pages in the page cache, to save memory, but we were only enabling it when
        instantiating a WebKit1 web view.

        This patch enables the optimization for WebKit2 as well.

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

2016-02-25  Ada Chan  <adachan@apple.com>

        Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
        https://bugs.webkit.org/show_bug.cgi?id=154702

        Reviewed by Dan Bernstein.

        * Configurations/FeatureDefines.xcconfig:

2016-02-25  Jiewen Tan  <jiewen_tan@apple.com>

        Restrict information passed with navigation action which is triggered by untrusted event
        https://bugs.webkit.org/show_bug.cgi?id=154571
        <rdar://problem/15967937>

        Reviewed by Andy Estes.

        When navigation action is triggered by an untrusted event, we should be more restricted of
        what information should be passed to the clients to lower the risk that clients could
        be fooled by the untrusted event.

        In this patch, we drop the modifiers for key state events and set the mouse button to NoButton
        for mouse events.

        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
        (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):

2016-02-25  Ada Chan  <adachan@apple.com>

        Hook up fullscreenMayReturnToInline() in WKPageUIClient
        https://bugs.webkit.org/show_bug.cgi?id=154661

        Reviewed by Tim Horton.

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

2016-02-25  Gavin Barraclough  <barraclough@apple.com>

        Should template RefCounter instead of RefCounter::Token
        https://bugs.webkit.org/show_bug.cgi?id=154691

        Reviewed by Anders Carlsson.

        Mechanical update per RefCounter interface change.

        * UIProcess/Plugins/PluginProcessManager.h:
        (WebKit::PluginProcessManager::processSuppressionDisabledToken):
        (WebKit::PluginProcessManager::processSuppressionDisabled):
        * UIProcess/ProcessThrottler.h:
        (WebKit::ProcessThrottler::foregroundActivityToken):
        (WebKit::ProcessThrottler::backgroundActivityToken):
        * UIProcess/WebProcessPool.h:

2016-02-25  Brady Eidson  <beidson@apple.com>

        Remove LegacyIDB.
        https://bugs.webkit.org/show_bug.cgi?id=150854

        Reviewed by Alex Christensen.

        * CMakeLists.txt:
        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::getOrCreateLegacyUniqueIDBDatabase): Deleted.
        (WebKit::DatabaseProcess::removeLegacyUniqueIDBDatabase): Deleted.
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::didClose):
        (WebKit::DatabaseToWebProcessConnection::didReceiveMessage): Deleted.
        (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Deleted.
        (WebKit::DatabaseToWebProcessConnection::establishIDBConnection): Deleted.
        (WebKit::DatabaseToWebProcessConnection::removeDatabaseProcessIDBConnection): Deleted.
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp: Removed.
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h: Removed.
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in: Removed.
        * DatabaseProcess/IndexedDB/IDBIdentifier.h: Removed.
        * DatabaseProcess/IndexedDB/IDBSerialization.cpp: Removed.
        * DatabaseProcess/IndexedDB/IDBSerialization.h: Removed.
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.cpp: Removed.
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.h: Removed.
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.cpp: Removed.
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.h: Removed.
        * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h: Removed.
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp: Removed.
        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h: Removed.
        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp: Removed.
        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h: Removed.
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: Removed.
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h: Removed.
        * DerivedSources.make:
        * Shared/WebCrossThreadCopier.cpp:
        (WebCore::LegacyUniqueIDBDatabaseIdentifier>::copy): Deleted.
        (WebCore::IDBIdentifier>::copy): Deleted.
        * Shared/WebCrossThreadCopier.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp: Removed.
        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h: Removed.
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Removed.
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h: Removed.
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in: Removed.
        * WebProcess/Databases/WebDatabaseProvider.cpp:
        (WebKit::WebDatabaseProvider::createIDBFactoryBackend): Deleted.
        * WebProcess/Databases/WebDatabaseProvider.h:
        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
        (WebKit::WebToDatabaseProcessConnection::registerWebIDBServerConnection): Deleted.
        (WebKit::WebToDatabaseProcessConnection::removeWebIDBServerConnection): Deleted.
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

2016-02-25  Brady Eidson  <beidson@apple.com>

        Modern IDB: WebKit 2 IPC layer.
        https://bugs.webkit.org/show_bug.cgi?id=153808

        Reviewed by Alex Christensen.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad): This ASSERT fires on most WK2 tests. Alex said remove it.
        
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::putOrAdd): Properly encode the overwrite flag.
        
        * WebProcess/Databases/WebDatabaseProvider.h: Enable Modern IDB.

2016-02-25  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
        https://bugs.webkit.org/show_bug.cgi?id=153163
        <rdar://problem/24334526>

        Reviewed by Tim Horton.

        * CMakeLists.txt: Add WKFrameHandleRef.cpp.

        * Shared/API/c/WKBase.h: Add WKFrameHandleRef.
        * UIProcess/API/APIUIClient.h:
        (API::UIClient::decidePolicyForUserMediaPermissionRequest): Add parameter top level document
          security context.
        (API::UIClient::checkUserMediaPermissionForOrigin): Ditto.

        * UIProcess/API/C/WKAPICast.h: Add FrameHandle.

        * UIProcess/API/C/WKFrameHandleRef.cpp: Added.
        * UIProcess/API/C/WKFrameHandleRef.h: Added.

        * UIProcess/API/C/WKFrameInfoRef.cpp:
        (WKFrameInfoGetFrameHandleRef): Added.
        * UIProcess/API/C/WKFrameInfoRef.h:

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient): Add parameters to decidePolicyForUserMediaPermissionRequest and
          checkUserMediaPermissionForOrigin for top level document security context.

        * UIProcess/API/C/WKPageUIClient.h: Ditto.

        * UIProcess/API/C/WKUserMediaPermissionCheck.cpp:
        (WKUserMediaPermissionCheckSetUserMediaAccessInfo): Renamed from WKUserMediaPermissionCheckSetHasPersistentPermission,
          add parameter for top level document security context.
        (WKUserMediaPermissionCheckSetHasPersistentPermission): Deleted.
        * UIProcess/API/C/WKUserMediaPermissionCheck.h:

        * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
        (webkitUserMediaPermissionRequestCreate): Add top level document origin.

        * UIProcess/UserMediaPermissionCheckProxy.cpp:
        (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Renamed from setHasPersistentPermission.
        (WebKit::UserMediaPermissionCheckProxy::setHasPersistentPermission): Deleted.
        * UIProcess/UserMediaPermissionCheckProxy.h:

        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
        (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Add parameter
         for device id hash salt.
        * UIProcess/UserMediaPermissionRequestManagerProxy.h:

        * UIProcess/UserMediaPermissionRequestProxy.h:
        (WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted, unused.
        (WebKit::UserMediaPermissionRequestProxy::requiresVideo): Ditto.
        (WebKit::UserMediaPermissionRequestProxy::firstVideoDeviceUID): Ditto.
        (WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID): Ditto.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Pass through parameter for top
          level document security context.
        (WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Ditto.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * WebKit2.xcodeproj/project.pbxproj: Add WKFrameHandleRef.cpp|.h.

        * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
        (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Pass through parameter for top
          level document security context.
        (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Ditto.
        (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Pass through
          device id hash salt.
        * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didCompleteUserMediaPermissionCheck): Ditto.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Tearing when entering AC mode
        https://bugs.webkit.org/show_bug.cgi?id=150955

        Reviewed by Michael Catanzaro.

        When entering accelerated compositing mode, we keep rendering the
        non accelerated contents until we have the first frame of
        accelerated compositing contents. When the view is created hidden,
        for example when the browser opens a link in a new tab, the view
        is not realized until it is mapped. The native surface handle for
        compositing, needed by the web process to render accelerated
        compositing contents, is not available until the view is realized,
        because it depends on the properties of the parent. When a web
        view is mapped for the first time, and then realized, we send the
        native surface handle for compositing to the web process, and keep
        rendering the non composited contents until we get the first
        frame, but in this case we never had non composited contents and
        we end up rendering an untinitalized surface. This sometimes just
        produces flickering and sometimes rendering artifacts.
        We can prevent this from happening by realizing the web view as
        soon as possible. A GtkWidget can't be realized until it has been
        added to a toplevel, so we can realize our view right after it is
        added to a toplevel window, and wait until the view is actually
        mapped to notify the web process that it has been added to a
        window. This way can we enter accelerated compositing mode before
        the web view is mapped, so that when mapped we don't try to paint
        the previous contents and don't need to wait for the first frame.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (toplevelWindowFocusInEvent): Handle the case of the window being
        hidden when receiving focus in. According to
        gtk_window_focus_in_event, this can happen.
        (webkitWebViewBaseSetToplevelOnScreenWindow): When the web view is
        removed from its toplevel parent, update the IsInWindow and
        WindowIsActive flags accordingly. When the view is added to a
        toplevel, realize it and don't update the window flags, they will be
        updated when the view is mapped the first time.
        (webkitWebViewBaseMap): Also update IsInWindow and WindowIsActive
        flags if needed. This way, if for example you open a youtube video
        in a new tab, the video won't start playing until you visit the
        tab, like we did when the view was realized on map.
        (webkitWebViewBaseHierarchyChanged): Use hierarchy-changed signal
        instead of parent-set to be notified when the view is added to or
        removed from a toplevel.
        (webkit_web_view_base_class_init): Implement hierarchy-changed
        instead of parent-set.
        (webkitWebViewBaseRealize): Do not call
        webkitWebViewBaseSetToplevelOnScreenWindow on realize, it's now
        webkitWebViewBaseSetToplevelOnScreenWindow the one realizing the view.
        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit::BackingStore::createBackend): Do not realize the view
        here, it should be realized already at this point. If it's not
        realized at this point is because it hasn't been added to a
        toplevel and gtk_widget_realize will not work anyway.
        (WebKit::BackingStore::paint): This is changing the cairo source
        operator, so save/restore the cairo context to ensure it doesn't
        affect other drawing done after this.

2016-02-24  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>

        [web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Document interface
        https://bugs.webkit.org/show_bug.cgi?id=151688

        Reviewed by Dean Jackson.

        Enables the WEB_ANIMATIONS compiler switch.

        * Configurations/FeatureDefines.xcconfig:

2016-02-24  Gavin Barraclough  <barraclough@apple.com>

        Add WKPreference for HiddenPageDOMTimerThrottlingAutoIncreases
        https://bugs.webkit.org/show_bug.cgi?id=154655

        Reviewed by Geoff Garen.

        Just plumbing WebCore.settings.setHiddenPageDOMTimerThrottlingAutoIncreases through as
        WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases):
        (WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _hiddenPageDOMTimerThrottlingAutoIncreases]):
        (-[WKPreferences _setHiddenPageDOMTimerThrottlingAutoIncreases:]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-02-24  Alex Christensen  <achristensen@webkit.org>

        Fix downloads when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154620

        Reviewed by Brady Eidson.

        This fixes all the _WKDownload API tests when using NetworkSession.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::willDecidePendingDownloadDestination):
        When we store the NetworkDataTask in m_downloadsWaitingForDestination, we want to remove its owner
        from m_pendingDownloads to prevent memory leaks.
        (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
        If a file exists and the UIProcess has told us to overwrite the file, delete the file
        before starting a new download in its place.  This used to be done by CFNetwork in
        NSURLDownload's setDestination:allowOverwrite:, but the NSURLSession equivalent (setting
        NSURLSessionDataTask's _pathToDownloadTaskFile attribute) does not overwrite the file for us.
        (WebKit::DownloadManager::cancelDownload):
        If a download is canceled while it is waiting for its destination from the UIProcess, the Download
        object does not exist yet.  Instead, we have a completion handler stored in m_downloadsWaitingForDestination.
        In this case, we want to send the UIProcess a DownloadProxy::DidCancel message, which I did through
        NetworkProcess::pendingDownloadCanceled because the DownloadManager is not a MessageSender, and then
        call the completion handler with PolicyIgnore to cancel the download.
        (WebKit::DownloadManager::downloadFinished):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::PendingDownload::didBecomeDownload):
        (WebKit::PendingDownload::didFailLoading):
        (WebKit::PendingDownload::messageSenderConnection):
        (WebKit::PendingDownload::didConvertToDownload): Deleted.
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
        (WebKit::Download::cancel):
        Send a didCancel message to the UIProcess when a download was cancelled.
        Use cancelByProducingResumeData so we can resume canceled downloads.
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        didConvertToDownload is needed when using NetworkSession to tell the NetworkResourceLoader
        not to call cancel on the NetworkLoad after converting it to a download.
        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::setPendingDownload):
        (WebKit::NetworkDataTask::pendingDownloadLocation):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        Don't call findPendingDownloadLocation as a method on the NetworkDataTask to avoid memory leaks
        in DownloadManager.m_pendingDownloads.
        (WebKit::NetworkLoad::didBecomeDownload):
        Call m_client.didBecomeDownload which is being separated from didConvertToDownload.  The former is
        called after the NetworkDataTask becomes a Download, the latter is called as soon as 
        convertMainResourceLoadToDownload is called.
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::continueWillSendRequest):
        (WebKit::NetworkProcess::pendingDownloadCanceled):
        Send a DownloadProxy::DidCancel message when a pending download is canceled.
        (WebKit::NetworkProcess::findPendingDownloadLocation):
        (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didConvertToDownload):
        (WebKit::NetworkResourceLoader::didBecomeDownload):
        Separate setting m_didConvertToDownload, which needs to happen before the didReceiveResponse completion
        handler is called to tell the NetworkResourceLoader not to call cancel in NetworkResourceLoader::abort,
        from deleting the NetworkLoad, which can be done after the NSURLSessionDataTask has been converted to a
        NSURLSessionDownloadTask.
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::failureTimerFired):
        (WebKit::NetworkDataTask::setPendingDownloadLocation):
        (WebKit::NetworkDataTask::transferSandboxExtensionToDownload):
        (WebKit::NetworkDataTask::suggestedFilename):
        (WebKit::NetworkDataTask::currentRequest):
        (WebKit::NetworkDataTask::findPendingDownloadLocation): Deleted.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        Take the downloadID if it failed because we will report that download as failed and not use it again.
        (WebKit::NetworkSession::takeDownloadID):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

2016-02-24  Anders Carlsson  <andersca@apple.com>

        Add more WebKitAdditions extension points
        https://bugs.webkit.org/show_bug.cgi?id=154648
        rdar://problem/24820040

        Reviewed by Beth Dakin.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>

        Move FocusNavigationScope into FocusController.cpp
        https://bugs.webkit.org/show_bug.cgi?id=154630

        Reviewed by Darin Adler.

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

2016-02-23  Brian Burg  <bburg@apple.com>

        Web Inspector: don't run the protocol generator once per output file
        https://bugs.webkit.org/show_bug.cgi?id=154635

        Reviewed by Myles C. Maxfield.

        * DerivedSources.make: Use $(firstword, ...) to take just one file as
        the target to be built so that the generator runs only once. Make isn't
        really designed to coalesce multiple file outputs to one production rule.

2016-02-23  Dan Bernstein  <mitz@apple.com>

        [Xcode] Linker errors display mangled names, but no longer should
        https://bugs.webkit.org/show_bug.cgi?id=154632

        Reviewed by Sam Weinig.

        * Configurations/Base.xcconfig: Stop setting LINKER_DISPLAYS_MANGLED_NAMES to YES.

2016-02-23  Gavin Barraclough  <barraclough@apple.com>

        Remove HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define
        https://bugs.webkit.org/show_bug.cgi?id=112323

        Reviewed by Chris Dumez.

        This feature is controlled by a runtime switch, and defaults off.

        * Configurations/FeatureDefines.xcconfig:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKWebView should implement NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=137160
        rdar://problem/17380562

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController initWithCoder:]):
        We need to call [self init] here, so that the wrapper will be initialized.

        * UIProcess/API/Cocoa/WKWebView.h:
        -initWithCoder: shouldn't be unavailable, it should be a designated initializer.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _initializeWithConfiguration:]):
        Move initialization out into a common method.

        (-[WKWebView initWithFrame:configuration:]):
        Call -initializeWithConfiguration: here.

        (-[WKWebView initWithCoder:]):
        Decode everything.

        (-[WKWebView encodeWithCoder:]):
        Encode everything.

2016-02-23  Anders Carlsson  <andersca@apple.com>

        Fix an API test.

        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::defaultDataStore):
        Make sure to initialize WebKit2.

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKWebViewConfiguration should encode more of its properties
        https://bugs.webkit.org/show_bug.cgi?id=154611

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKUserContentController should conform to NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=154609

        Reviewed by Sam Weinig.

        Since we just want to be able to encode WKUserContentController from WKWebViewConfiguration,
        we don't encode anything inside WKUserContentController.

        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController encodeWithCoder:]):
        (-[WKUserContentController initWithCoder:]):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKProcessPool should conform to NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=154608

        Reviewed by Sam Weinig.

        Add +[WKProcessPool _sharedProcessPool] and encode/decode whether the process pool is shared.

        * UIProcess/API/Cocoa/WKProcessPool.h:
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool encodeWithCoder:]):
        (-[WKProcessPool initWithCoder:]):
        (+[WKProcessPool _sharedProcessPool]):
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKWebsiteDataStore should conform to NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=154605

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore initWithCoder:]):
        (-[WKWebsiteDataStore encodeWithCoder:]):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        Fix iOS build.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration initWithCoder:]):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKWebViewConfiguration should conform to NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=154602

        Reviewed by Beth Dakin.

        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration encodeWithCoder:]):
        (-[WKWebViewConfiguration initWithCoder:]):

2016-02-23  Anders Carlsson  <andersca@apple.com>

        WKPreferences should conform to NSCoding
        https://bugs.webkit.org/show_bug.cgi?id=154597

        Reviewed by Sam Weinig.

        Add NSCoding implementation.

        * UIProcess/API/Cocoa/WKPreferences.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences encodeWithCoder:]):
        (-[WKPreferences initWithCoder:]):

2016-02-23  Alex Christensen  <achristensen@webkit.org>

        Implement downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154473

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::~Download):
        (WebKit::Download::didStart):
        (WebKit::Download::shouldDecodeSourceDataOfMIMEType):
        (WebKit::Download::decideDestinationWithSuggestedFilename):
        (WebKit::Download::didCreateDestination):
        * NetworkProcess/Downloads/Download.h:
        (WebKit::Download::downloadID):
        (WebKit::Download::setSandboxExtension):
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::dataTaskBecameDownloadTask):
        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadManager::continueWillSendRequest):
        (WebKit::DownloadManager::willDecidePendingDownloadDestination):
        (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
        (WebKit::DownloadManager::convertHandleToDownload):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::clearClient):

        NetworkDataTasks can now outlive their client, so we need to make client a pointer
        with the ability to be nulled from the client's destructor.

        (WebKit::NetworkDataTask::pendingDownloadID):
        (WebKit::NetworkDataTask::pendingDownload):
        (WebKit::NetworkDataTask::setPendingDownload):
        (WebKit::NetworkDataTask::pendingDownloadLocation):
        (WebKit::NetworkDataTask::client): Deleted.
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::~NetworkLoad):
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):

        Don't call the didReceiveResponse completion handler immediately when we know we are
        going to turn the load into a download.  Instead, save the completion handler until
        after we have determined the download destination and set it in the NetworkDataTask.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::continueWillSendRequest):
        (WebKit::NetworkProcess::findPendingDownloadLocation):
        (WebKit::NetworkProcess::continueDecidePendingDownloadDestination):
        (WebKit::NetworkProcess::setCacheModel):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::didSendData):
        (WebKit::NetworkDataTask::didReceiveChallenge):
        (WebKit::NetworkDataTask::didCompleteWithError):
        (WebKit::NetworkDataTask::didReceiveResponse):
        (WebKit::NetworkDataTask::didReceiveData):
        (WebKit::NetworkDataTask::didBecomeDownload):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        (WebKit::NetworkDataTask::scheduleFailure):
        (WebKit::NetworkDataTask::failureTimerFired):
        (WebKit::NetworkDataTask::findPendingDownloadLocation):
        (WebKit::NetworkDataTask::setPendingDownloadLocation):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        (WebKit::NetworkDataTask::transferSandboxExtensionToDownload):
        (WebKit::NetworkDataTask::currentRequest):
        (WebKit::NetworkDataTask::cancel):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        
        This delegate callback is used for downloads, too.

        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        
        Call didCreateDestination now, which is after the file has been opened on the disk.
        A DownloadProxy::DidStart message is now sent from NetworkProcess::findPendingDownloadLocation before
        we ask the UIProcess where the download should end up on disk.
        Null check the NetworkDataTask's client before using it because it is now a pointer that could be null. 
        
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
        (WebKit::DownloadProxy::didCreateDestination):
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Downloads/DownloadProxy.messages.in:

2016-02-23  Brian Burg  <bburg@apple.com>

        Connect WebAutomationSession to its backend dispatcher as if it were an agent and add stub implementations
        https://bugs.webkit.org/show_bug.cgi?id=154518
        <rdar://problem/24761096>

        Reviewed by Timothy Hatcher.

        Add a domain dispatcher for the 'Automation' domain, and register the
        WebAutomationSession itself as the handler for Automation commands.
        Stub out these command implementations so the code will compile.

        * UIProcess/Automation/Automation.json:
        Fix the createWindow command's parameters and description.
        Add an ErrorMessage string enumeration and document how it can be used
        to signal well-known errors to the frontend.

        * UIProcess/Automation/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::WebAutomationSession):
        Add the domain backend dispatcher. It further parses commands that were deemed
        valid by the generic dispatcher and match the 'Automation' domain prefix.

        (WebKit::WebAutomationSession::getWindows):
        (WebKit::WebAutomationSession::openWindow):
        (WebKit::WebAutomationSession::closeWindow):
        Stub these out with our new ErrorMessage enumeration and a macro to
        make this code pattern more readable.

        * UIProcess/Automation/WebAutomationSession.h:
        Add new declarations and members.

2016-02-23  Antti Koivisto  <antti@apple.com>

        Remove tab suspension code
        https://bugs.webkit.org/show_bug.cgi?id=154585

        Reviewed by Andreas Kling.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::registerUserDefaultsIfNeeded):
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2016-02-22  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Merge WebView and WebViewEfl
        https://bugs.webkit.org/show_bug.cgi?id=154445

        Reviewed by Gyuyoung Kim.

        * PlatformEfl.cmake: Removed WebViewEfl.cpp from source list.
        * UIProcess/API/C/efl/WKViewEfl.cpp: Removed type cast for WebViewEfl.
        * UIProcess/API/efl/EwkView.cpp: Ditto.
        * UIProcess/API/efl/EwkView.h:
        * UIProcess/API/efl/GestureRecognizer.cpp: Removed type cast for WebViewEfl.
        * UIProcess/API/efl/WebAccessibility.cpp: Removed unnecessary includes.
        * UIProcess/API/efl/ewk_view.cpp: Ditto.
        * UIProcess/efl/ViewClientEfl.cpp: Ditto.
        * UIProcess/efl/WebColorPickerClient.cpp: Ditto.
        * UIProcess/efl/WebColorPickerClient.h:
        * UIProcess/efl/WebColorPickerEfl.cpp:
        (WebKit::WebColorPickerEfl::WebColorPickerEfl):
        * UIProcess/efl/WebColorPickerEfl.h:
        (WebKit::WebColorPickerEfl::create):
        * UIProcess/efl/WebView.cpp:
        * UIProcess/efl/WebView.h:
        * UIProcess/efl/WebViewEfl.cpp: Removed.
        * UIProcess/efl/WebViewEfl.h: Ditto.

2016-02-22  Brian Burg  <bburg@apple.com>

        Web Inspector: add 'Automation' protocol domain and generate its backend classes separately in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=154509
        <rdar://problem/24759098>

        Reviewed by Timothy Hatcher.

        Add a new 'Automation' domain which presents an RPC interface
        for sending automation commands to an active WebAutomationSession
        in the UIProcess via RemoteInspector. This is similar to how the
        Inspector backend communicates bidirectionally with a remote
        Inspector frontend.

        Add build system logic to generate JSON-RPC protocol bindings
        for the 'Automation' domain using the inspector code generators.

        Move automation-related files that are not API or SPI into their
        own directory.

        * Configurations/BaseTarget.xcconfig: Tell where JavaScriptCore's
        private headers are, since that's where the code generators live.

        * CMakeLists.txt: Look in UIProcess/Automation directory.
        * PlatformMac.cmake:
        * DerivedSources.make: Generate protocol bindings for a single domain.
        The names of the generated files will be improved in a follow-up patch
        so that they do not clash with generated files in JavaScriptCore.

        * UIProcess/Automation/Automation.json: Added.
        * UIProcess/Automation/WebAutomationSession.cpp: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.cpp.
        (WebKit::WebAutomationSession::WebAutomationSession):
        (WebKit::WebAutomationSession::~WebAutomationSession):
        Set up a backend dispatcher and frontend router. They will be used later.

        (WebKit::WebAutomationSession::dispatchMessageFromRemote):
        Forward messages from the remote to the backend dispatcher. When
        an agent / command handler is registered, it will receive the message.

        (WebKit::WebAutomationSession::connect):
        (WebKit::WebAutomationSession::disconnect):
        Connenct and disconnect the frontend router to the remote channel.

        * UIProcess/Automation/WebAutomationSession.h: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.h.
        * WebKit2.xcodeproj/project.pbxproj: Add and move files.

2016-02-16  Ada Chan  <adachan@apple.com>

        Implement basic functionality in WebVideoFullscreenInterfaceMac.
        https://bugs.webkit.org/show_bug.cgi?id=153241

        Reviewed by Beth Dakin.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
        (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::rootViewToWindow):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::rootViewToWindow):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::supportsVideoFullscreen):
        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):

2016-02-22  Commit Queue  <commit-queue@webkit.org>

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

        This change causes timeouts and crashes in LayoutTests
        (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "Enable AVFoundationNSURLSessionEnabled by default"
        https://bugs.webkit.org/show_bug.cgi?id=154469
        http://trac.webkit.org/changeset/196935

2016-02-22  Anders Carlsson  <andersca@apple.com>

        Remove _mockCaptureDevicesEnabled getter and setter
        https://bugs.webkit.org/show_bug.cgi?id=154550

        Reviewed by Beth Dakin.

        The _mockCaptureDevicesEnabled property isn't declared anywhere, and this
        should be a WKWebViewConfiguration parameter if we ever want to expose it in the modern API.

        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _mockCaptureDevicesEnabled]): Deleted.
        (-[WKPreferences _setMockCaptureDevicesEnabled:]): Deleted.

2016-02-22  Konstantin Tokarev  <annulen@yandex.ru>

        [cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
        https://bugs.webkit.org/show_bug.cgi?id=154450

        Reviewed by Alex Christensen.

        * CMakeLists.txt: Used WebKit2_SOURCES variable instead of separate
        WebKit2_DERIVED_SOURCES for compatibility with WEBKIT_FRAMEWORK macro.
        There is no real need to separate derived sources from others.
        * PlatformGTK.cmake: Ditto.

2016-02-22  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [CMake] Unreviewed build fix after r196942.

        * CMakeLists.txt: WKPluginSiteDataManager.cpp is gone.

2016-02-22  Keith Rollin  <krollin@apple.com>

        Add mechanism to disable memory pressure handling
        https://bugs.webkit.org/show_bug.cgi?id=154254
        <rdar://problem/24662616>

        Reviewed by Chris Dumez.

        Add a mechanism to disable WebKit's response to memory pressure
        triggers. This was asked for by another group for testing purposes.

        In order to disable WebKit's memory pressure handling, execute the
        following from the command line:

            defaults write com.apple.Safari WebKitSuppressMemoryPressureHandler -bool true

        To revert to standard behavior, delete the key or set it to False.

        This flag is used when a new sub-process is being spawned. The value
        is read and stored in an initialization parameter block, which is then
        sent to the new sub-process.

        In actuality, only the UI, WebContent, and Network processes heed the
        flag. The Plugin process isn't instrumented to heed this flag for
        three reasons. First, the Plugin process installs its memory pressure
        handler in initializeProcess, not initializePluginProcess. This is
        contrary to when the other processes install their handlers, which is
        in initialize<PluginType>Process, not initializeProcess. So in order
        to accomodate the Plugin process, we'd need to modify
        ChildProcessInitializationParameters. Doing this is awkward at best,
        but also seems to be opposed to what's supposed to be done in
        initializeProcess and conveyed in
        ChildProcessInitializationParameters. And even if we did add a boolean
        to this structure and added support for conveying it through the XPC
        port, it would end up being a Plugin process-only boolean in a general
        parameter block, which seems asymmetric with the other processes.
        Second, there's no convenient Cocoa function called in the flow that
        spawns the Plugin process, meaning that there's no convenient place to
        call NSUserDefaults to get the flag's value. And third, the Plugin
        process doesn't elegantly respond to the memory pressure trigger
        anyway. It might terminate itself, but that's it. As for the Database
        process, it doesn't seem to support responding to memory pressure at
        all, so we don't send it a flag telling it to ignore it.

        Internally, the memory pressure handler is suppressed by not calling
        MemoryPressureHandler::install() if the flag is set. In the case of
        the Network process, the flag is saved so that it can be checked later
        in other places that manually kick off the memory pressure handling
        procedure.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::lowMemoryHandler):
        (WebKit::NetworkProcess::initializeNetworkProcess):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcessCreationParameters.cpp:
        (WebKit::NetworkProcessCreationParameters::encode):
        (WebKit::NetworkProcessCreationParameters::decode):
        * NetworkProcess/NetworkProcessCreationParameters.h:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

2016-02-22  Anders Carlsson  <andersca@apple.com>

        Get rid of WKPluginSiteDataManager
        https://bugs.webkit.org/show_bug.cgi?id=154470

        Reviewed by Tim Horton.

        * Shared/API/c/WKBase.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetPluginSiteDataManager): Deleted.
        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/C/WKPluginSiteDataManager.cpp: Removed.
        (WKPluginSiteDataManagerGetTypeID): Deleted.
        (WKPluginSiteDataManagerGetSitesWithData): Deleted.
        (WKPluginSiteDataManagerClearSiteData): Deleted.
        (WKPluginSiteDataManagerClearAllSiteData): Deleted.
        * UIProcess/API/C/WKPluginSiteDataManager.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-21  Brent Fulgham  <bfulgham@apple.com>

        [WK2][Mac] Allow processes to set "fast-dev-casheable" bit
        https://bugs.webkit.org/show_bug.cgi?id=154503
        <rdar://problem/22920815>

        Reviewed by Alexey Proskuryakov.

        Update the various sandbox profiles with a declaration that using the
        system-fctl to touch the "hot file" flag (to support caching operations)
        is allowed.

        * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in: Add sandbox permission.
        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Ditto.
        * WebProcess/com.apple.WebProcess.sb.in: Ditto.

2016-02-22  Commit Queue  <commit-queue@webkit.org>

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

        it broke Production builds (Requested by brrian on #webkit).

        Reverted changeset:

        "Web Inspector: add 'Automation' protocol domain and generate
        its backend classes separately in WebKit2"
        https://bugs.webkit.org/show_bug.cgi?id=154509
        http://trac.webkit.org/changeset/196891

2016-02-22  Jer Noble  <jer.noble@apple.com>

        Enable AVFoundationNSURLSessionEnabled by default
        https://bugs.webkit.org/show_bug.cgi?id=154469

        Reviewed by Sam Weinig.

        * Shared/WebPreferencesDefinitions.h:

2016-02-21  Brian Burg  <bburg@apple.com>

        Web Inspector: add 'Automation' protocol domain and generate its backend classes separately in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=154509
        <rdar://problem/24759098>

        Reviewed by Timothy Hatcher.

        Add a new 'Automation' domain which presents an RPC interface
        for sending automation commands to an active WebAutomationSession
        in the UIProcess via RemoteInspector. This is similar to how the
        Inspector backend communicates bidirectionally with a remote
        Inspector frontend.

        Add build system logic to generate JSON-RPC protocol bindings
        for the 'Automation' domain using the inspector code generators.

        Move automation-related files that are not API or SPI into their
        own directory.

        * Configurations/BaseTarget.xcconfig: Tell where JavaScriptCore's
        private headers are, since that's where the code generators live.

        * CMakeLists.txt: Look in UIProcess/Automation directory.
        * PlatformMac.cmake:
        * DerivedSources.make: Generate protocol bindings for a single domain.
        The names of the generated files will be improved in a follow-up patch
        so that they do not clash with generated files in JavaScriptCore.

        * UIProcess/Automation/Automation.json: Added.
        * UIProcess/Automation/WebAutomationSession.cpp: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.cpp.
        (WebKit::WebAutomationSession::WebAutomationSession):
        (WebKit::WebAutomationSession::~WebAutomationSession):
        Set up a backend dispatcher and frontend router. They will be used later.

        (WebKit::WebAutomationSession::dispatchMessageFromRemote):
        Forward messages from the remote to the backend dispatcher. When
        an agent / command handler is registered, it will receive the message.

        (WebKit::WebAutomationSession::connect):
        (WebKit::WebAutomationSession::disconnect):
        Connenct and disconnect the frontend router to the remote channel.

        * UIProcess/Automation/WebAutomationSession.h: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.h.
        * WebKit2.xcodeproj/project.pbxproj: Add and move files.

2016-02-20  Olivier Blin  <olivier.blin@softathome.com>

        [cmake] Use ICU include dirs in WebKit2 and WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=154479

        Reviewed by Michael Catanzaro.

        * CMakeLists.txt:

2016-02-19  Brian Burg  <bburg@apple.com>

        WebAutomationSession should tell its delegate when its remote end disconnects
        https://bugs.webkit.org/show_bug.cgi?id=154426
        <rdar://problem/24732382>

        Reviewed by Timothy Hatcher.

        The client might want to free up resources or close spawned windows
        if the remote end has disconnected from the automation session.

        * UIProcess/API/APIAutomationSessionClient.h:
        (API::AutomationSessionClient::didDisconnectFromRemote): Added.
        (API::AutomationSessionClient::didRequestNewWindow):
        Remove WebProcessPool* argument as it is never used.

        * UIProcess/API/Cocoa/_WKAutomationSession.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.mm:
        (-[_WKAutomationSession isPaired]):
        Expose whether the session is paired with a remote end.

        * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: Add method.
        * UIProcess/Cocoa/AutomationSessionClient.h: Add method.
        Remove WebProcessPool* argument as it is never used.

        * UIProcess/Cocoa/AutomationSessionClient.mm:
        (WebKit::AutomationSessionClient::AutomationSessionClient):
        (WebKit::AutomationSessionClient::didRequestNewWindow):
        (WebKit::AutomationSessionClient::didDisconnectFromRemote):
        Add necessary forwarding boilerplate.

        * UIProcess/WebAutomationSession.cpp:
        (WebKit::WebAutomationSession::disconnect): Inform the client.

2016-02-19  Beth Dakin  <bdakin@apple.com>

        Enhance EditorState to include TypingAttributes, alignment, and color
        https://bugs.webkit.org/show_bug.cgi?id=154424

        Reviewed by Dean Jackson and Sam Weinig.

        TypingAttributes is already available for iOS and GTK. This patch hooks 
        that up on Mac as well, and it moves the calculation of that to the shared 
        file since there is no reason for this to be written in an iOS-only way. This 
        patch also adds textColor and textAlignment to EditorState, and since those 
        are not technically platform-specific either, they are also calculated in the 
        shared editorState() function.

        * Shared/EditorState.cpp:
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::platformEditorState):

2016-02-19  Anders Carlsson  <andersca@apple.com>

        Purge as much as we can from WKDeprecatedFunctions.cpp
        https://bugs.webkit.org/show_bug.cgi?id=154459

        Reviewed by Sam Weinig.

        * Shared/API/c/WKDeprecatedFunctions.cpp:
        (WKArrayIsMutable): Deleted.
        (WKPageSetVisibilityState): Deleted.
        (WKDictionaryIsMutable): Deleted.
        (WKDictionaryAddItem): Deleted.
        (WKDictionaryRemoveItem): Deleted.
        (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
        (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
        (WKPreferencesSetMultithreadedWebGLEnabled): Deleted.
        (WKPreferencesGetMultithreadedWebGLEnabled): Deleted.
        (WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
        (WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
        (WKInspectorIsDebuggingJavaScript): Deleted.
        (WKInspectorToggleJavaScriptDebugging): Deleted.
        (WKInspectorIsProfilingJavaScript): Deleted.
        (WKInspectorToggleJavaScriptProfiling): Deleted.
        (WKContextGetProcessModel): Deleted.
        (WKGraphicsContextGetCGContext): Deleted.
        (WKContextGetProcessSuppressionEnabled): Deleted.
        (WKContextSetProcessSuppressionEnabled): Deleted.

2016-02-19  Brady Eidson  <beidson@apple.com>

        Add "databaseProcessDidCrash" to the WKContextClient; Adopt it in WKTR.
        https://bugs.webkit.org/show_bug.cgi?id=154428

        Reviewed by Jer Noble.

        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextGetDatabaseProcessIdentifier):

        * UIProcess/WebContextClient.cpp:
        (WebKit::WebContextClient::databaseProcessDidCrash):
        * UIProcess/WebContextClient.h:

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::databaseProcessCrashed):
        (WebKit::WebProcessPool::databaseProcessIdentifier):
        * UIProcess/WebProcessPool.h:

2016-02-18  Gwang Yoon Hwang  <yoon@igalia.com>

        [GTK] Limit the number of tiles according to the visible area
        https://bugs.webkit.org/show_bug.cgi?id=126122

        Reviewed by Carlos Garcia Campos.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::initialize): Because we creates
        nonCompositingLayer with a size of current view, we should not apply
        the currently visible rect when creating / deleting tiles.
        (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Passes the current
        visible rect to the GraphicsLayers.

2016-02-18  Brady Eidson  <beidson@apple.com>

        Modern IDB: Fix IDBGetResult encoder/decoder.
        https://bugs.webkit.org/show_bug.cgi?id=154421

        Reviewed by Alex Christensen.

        No new tests, as Modern IDB is still disabled for WK2.
        
        But if you manually enable it, "Basic IndexedDB Seems To Work"

        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<IDBGetResult>::encode): Deleted.
        (IPC::ArgumentCoder<IDBGetResult>::decode): Deleted.
        * Shared/WebCoreArgumentCoders.h:

2016-02-18  Brady Eidson  <beidson@apple.com>

        Modern IDB: Implement server->client operations in WK2.
        https://bugs.webkit.org/show_bug.cgi?id=154411

        Reviewed by Alex Christensen.

        No change in behavior yet; Just laying the groundwork.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
        (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::didDeleteDatabase):
        (WebKit::WebIDBConnectionToServer::didOpenDatabase):
        (WebKit::WebIDBConnectionToServer::didAbortTransaction):
        (WebKit::WebIDBConnectionToServer::didCommitTransaction):
        (WebKit::WebIDBConnectionToServer::didCreateObjectStore):
        (WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
        (WebKit::WebIDBConnectionToServer::didClearObjectStore):
        (WebKit::WebIDBConnectionToServer::didCreateIndex):
        (WebKit::WebIDBConnectionToServer::didDeleteIndex):
        (WebKit::WebIDBConnectionToServer::didPutOrAdd):
        (WebKit::WebIDBConnectionToServer::didGetRecord):
        (WebKit::WebIDBConnectionToServer::didGetCount):
        (WebKit::WebIDBConnectionToServer::didDeleteRecord):
        (WebKit::WebIDBConnectionToServer::didOpenCursor):
        (WebKit::WebIDBConnectionToServer::didIterateCursor):
        (WebKit::WebIDBConnectionToServer::fireVersionChangeEvent):
        (WebKit::WebIDBConnectionToServer::didStartTransaction):
        (WebKit::WebIDBConnectionToServer::notifyOpenDBRequestBlocked):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        
        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):

2016-02-18  Brian Burg  <bburg@apple.com>

        RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously
        https://bugs.webkit.org/show_bug.cgi?id=154359
        <rdar://problem/24708897>

        Reviewed by Joseph Pecoraro.

        * UIProcess/Cocoa/AutomationClient.mm:
        (WebKit::AutomationClient::requestAutomationSession):
        Make an NSString out of the String reference so it gets captured correctly.

2016-02-18  Brady Eidson  <beidson@apple.com>

        Modern IDB: Implement client->server operations in WK2.
        https://bugs.webkit.org/show_bug.cgi?id=154400

        Reviewed by Alex Christensen.

        No change in behavior yet; Just laying the groundwork.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::idbServer):
        * DatabaseProcess/DatabaseProcess.h:

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::deleteDatabase):
        (WebKit::WebIDBConnectionToClient::openDatabase):
        (WebKit::WebIDBConnectionToClient::abortTransaction):
        (WebKit::WebIDBConnectionToClient::commitTransaction):
        (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToClient::createObjectStore):
        (WebKit::WebIDBConnectionToClient::deleteObjectStore):
        (WebKit::WebIDBConnectionToClient::clearObjectStore):
        (WebKit::WebIDBConnectionToClient::createIndex):
        (WebKit::WebIDBConnectionToClient::deleteIndex):
        (WebKit::WebIDBConnectionToClient::putOrAdd):
        (WebKit::WebIDBConnectionToClient::getRecord):
        (WebKit::WebIDBConnectionToClient::getCount):
        (WebKit::WebIDBConnectionToClient::deleteRecord):
        (WebKit::WebIDBConnectionToClient::openCursor):
        (WebKit::WebIDBConnectionToClient::iterateCursor):
        (WebKit::WebIDBConnectionToClient::establishTransaction):
        (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
        (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
        (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

2016-02-18  ChangSeok Oh  <changseok.oh@collabora.com>

        [GTK][Threaded Compositor] The web inspector doesn't work when using the threaded compositor
        https://bugs.webkit.org/show_bug.cgi?id=154067

        Reviewed by Carlos Garcia Campos.

        The forceCompositingMode should be true for threaded compositor. We set it true for a normal webView
        in _WebKitSettingsPrivate() but we do not for inspector anywhere. So DrawingArea is not
        properly created for the inspector. Let's move the setting to WebPreferences::platformInitializeStore
        which is a common place for the webView and the inspector.

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (_WebKitSettingsPrivate::_WebKitSettingsPrivate): Deleted.
        * UIProcess/gtk/WebPreferencesGtk.cpp:
        (WebKit::WebPreferences::platformInitializeStore):

2016-02-18  Commit Queue  <commit-queue@webkit.org>

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

        Broke Safari (Requested by andersca on #webkit).

        Reverted changeset:

        "Remove two unused functions"
        https://bugs.webkit.org/show_bug.cgi?id=154397
        http://trac.webkit.org/changeset/196765

2016-02-18  Anders Carlsson  <andersca@apple.com>

        Remove two unused functions
        https://bugs.webkit.org/show_bug.cgi?id=154397

        Reviewed by Tim Horton.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetPluginSiteDataManager): Deleted.
        (WKContextGetResourceCacheManager): Deleted.
        * UIProcess/API/C/WKContext.h:

2016-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Use G_TYPE_ERROR instead of G_TYPE_POINTER for GError parameters of signals
        https://bugs.webkit.org/show_bug.cgi?id=153786

        Reviewed by Michael Catanzaro.

        It's binary compatible and it's needed by binding generator to
        properly identify those parameters as GError.

        * UIProcess/API/gtk/WebKitDownload.cpp:
        (webkit_download_class_init):
        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
        (webkit_print_operation_class_init):
        * UIProcess/API/gtk/WebKitWebResource.cpp:
        (webkit_web_resource_class_init):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_class_init):
        * UIProcess/API/gtk/webkit2marshal.list:

2016-02-18  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Move WebView from CoordinatedGraphics to efl
        https://bugs.webkit.org/show_bug.cgi?id=154332

        Reviewed by Csaba Osztrogonác.

        * PlatformEfl.cmake:
        * UIProcess/efl/WebView.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp.
        * UIProcess/efl/WebView.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h.
        * UIProcess/efl/WebViewClient.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebViewClient.cpp.
        * UIProcess/efl/WebViewClient.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebViewClient.h.

2016-02-17  Brady Eidson  <beidson@apple.com>

        Modern IDB: Rename some "UniqueIDBDatabase" classes that conflict with new classes in WebCore.
        https://bugs.webkit.org/show_bug.cgi?id=154363.

        Reviewed by Alex Christensen.

        Adding "Legacy" to the front of the name fixes problems for now.
        
        And all of this gunk will go away after Modern IDB is done, anyways.
        
        * CMakeLists.txt:
        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::getOrCreateLegacyUniqueIDBDatabase):
        (WebKit::DatabaseProcess::removeLegacyUniqueIDBDatabase):
        (WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase): Deleted.
        (WebKit::DatabaseProcess::removeUniqueIDBDatabase): Deleted.
        * DatabaseProcess/DatabaseProcess.h:
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
        (WebKit::DatabaseProcessIDBConnection::establishConnection):
        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.cpp: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp.
        (WebKit::LegacyUniqueIDBDatabase::calculateAbsoluteDatabaseFilename):
        (WebKit::LegacyUniqueIDBDatabase::LegacyUniqueIDBDatabase):
        (WebKit::LegacyUniqueIDBDatabase::~LegacyUniqueIDBDatabase):
        (WebKit::LegacyUniqueIDBDatabase::filenameForDatabaseName):
        (WebKit::LegacyUniqueIDBDatabase::databaseFilenameIdentifier):
        (WebKit::LegacyUniqueIDBDatabase::canShareDatabases):
        (WebKit::LegacyUniqueIDBDatabase::registerConnection):
        (WebKit::LegacyUniqueIDBDatabase::unregisterConnection):
        (WebKit::LegacyUniqueIDBDatabase::shutdown):
        (WebKit::LegacyUniqueIDBDatabase::shutdownBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didShutdownBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::deleteDatabase):
        (WebKit::LegacyUniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
        (WebKit::LegacyUniqueIDBDatabase::openBackingStoreAndReadMetadata):
        (WebKit::LegacyUniqueIDBDatabase::didOpenBackingStoreAndReadMetadata):
        (WebKit::LegacyUniqueIDBDatabase::openTransaction):
        (WebKit::LegacyUniqueIDBDatabase::beginTransaction):
        (WebKit::LegacyUniqueIDBDatabase::commitTransaction):
        (WebKit::LegacyUniqueIDBDatabase::resetTransaction):
        (WebKit::LegacyUniqueIDBDatabase::rollbackTransaction):
        (WebKit::LegacyUniqueIDBDatabase::postTransactionOperation):
        (WebKit::LegacyUniqueIDBDatabase::didCompleteTransactionOperation):
        (WebKit::LegacyUniqueIDBDatabase::changeDatabaseVersion):
        (WebKit::LegacyUniqueIDBDatabase::didChangeDatabaseVersion):
        (WebKit::LegacyUniqueIDBDatabase::didCreateObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::didDeleteObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::didClearObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::didCreateIndex):
        (WebKit::LegacyUniqueIDBDatabase::didDeleteIndex):
        (WebKit::LegacyUniqueIDBDatabase::didCompleteBoolRequest):
        (WebKit::LegacyUniqueIDBDatabase::createObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::deleteObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::clearObjectStore):
        (WebKit::LegacyUniqueIDBDatabase::createIndex):
        (WebKit::LegacyUniqueIDBDatabase::deleteIndex):
        (WebKit::LegacyUniqueIDBDatabase::putRecord):
        (WebKit::LegacyUniqueIDBDatabase::getRecord):
        (WebKit::LegacyUniqueIDBDatabase::openCursor):
        (WebKit::LegacyUniqueIDBDatabase::cursorAdvance):
        (WebKit::LegacyUniqueIDBDatabase::cursorIterate):
        (WebKit::LegacyUniqueIDBDatabase::count):
        (WebKit::LegacyUniqueIDBDatabase::deleteRange):
        (WebKit::LegacyUniqueIDBDatabase::openBackingStoreTransaction):
        (WebKit::LegacyUniqueIDBDatabase::beginBackingStoreTransaction):
        (WebKit::LegacyUniqueIDBDatabase::commitBackingStoreTransaction):
        (WebKit::LegacyUniqueIDBDatabase::resetBackingStoreTransaction):
        (WebKit::LegacyUniqueIDBDatabase::rollbackBackingStoreTransaction):
        (WebKit::LegacyUniqueIDBDatabase::changeDatabaseVersionInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::createObjectStoreInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::deleteObjectStoreInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::clearObjectStoreInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::createIndexInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::deleteIndexInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::putRecordInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didPutRecordInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::getRecordFromBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didGetRecordFromBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::openCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didOpenCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::advanceCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didAdvanceCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::iterateCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didIterateCursorInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::countInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didCountInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::deleteRangeInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didDeleteRangeInBackingStore):
        (WebKit::LegacyUniqueIDBDatabase::didEstablishTransaction):
        (WebKit::LegacyUniqueIDBDatabase::didResetTransaction):
        (WebKit::LegacyUniqueIDBDatabase::resetAllTransactions):
        (WebKit::LegacyUniqueIDBDatabase::finalizeRollback):
        (WebKit::LegacyUniqueIDBDatabase::absoluteDatabaseDirectory):
        (WebKit::LegacyUniqueIDBDatabase::postMainThreadTask):
        (WebKit::LegacyUniqueIDBDatabase::performNextMainThreadTask):
        (WebKit::LegacyUniqueIDBDatabase::postDatabaseTask):
        (WebKit::LegacyUniqueIDBDatabase::performNextDatabaseTask):
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h.
        (WebKit::LegacyUniqueIDBDatabase::create):
        (WebKit::LegacyUniqueIDBDatabase::identifier):
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.cpp: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp.
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::LegacyUniqueIDBDatabaseIdentifier):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::isHashTableDeletedValue):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::hash):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::isNull):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::isolatedCopy):
        (WebKit::operator==):
        * DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h.
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::databaseName):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::openingOrigin):
        (WebKit::LegacyUniqueIDBDatabaseIdentifier::mainFrameOrigin):
        (WebKit::LegacyUniqueIDBDatabaseIdentifierHash::hash):
        (WebKit::LegacyUniqueIDBDatabaseIdentifierHash::equal):
        (WebKit::LegacyUniqueIDBDatabaseIdentifierHashTraits::isEmptyValue):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
        * Shared/WebCrossThreadCopier.cpp:
        (WebCore::LegacyUniqueIDBDatabaseIdentifier>::copy):
        (WebCore::UniqueIDBDatabaseIdentifier>::copy): Deleted.
        * Shared/WebCrossThreadCopier.h:
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-17  Anders Carlsson  <andersca@apple.com>

        Remove WebContextSupplement::shouldTerminate, it's no longer used
        https://bugs.webkit.org/show_bug.cgi?id=154367

        Reviewed by Sam Weinig.

        * UIProcess/WebContextSupplement.h:
        (WebKit::WebContextSupplement::shouldTerminate): Deleted.
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::shouldTerminate): Deleted.
        * UIProcess/WebCookieManagerProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::shouldTerminate): Deleted.

2016-02-17  Brian Burg  <bburg@apple.com>

        RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously
        https://bugs.webkit.org/show_bug.cgi?id=154359
        <rdar://problem/24708897>

        Reviewed by Joseph Pecoraro.

        RemoteInspector always grabs a lock whenever receiving or sending XPC messages. If it
        forwards a new session request via _WKAutomationDelegate, and the client synchronously
        creates and registers a session, then RemoteInspector will try to grab the lock again
        while adding the session to its registry, causing a deadlock.

        * UIProcess/Cocoa/AutomationClient.mm:
        (WebKit::AutomationClient::requestAutomationSession): Add a dispatch_async() to
        protect clients from accidentally deadlocking. They shouldn't have to care about
        RemoteInspector's locking mechanisms.

2016-02-17  Anders Carlsson  <andersca@apple.com>

        Remove an unused function
        https://bugs.webkit.org/show_bug.cgi?id=154358

        Reviewed by Sam Weinig.

        * Platform/cg/CGUtilities.cpp:
        (WebKit::paintBitmapContext): Deleted.
        * Platform/cg/CGUtilities.h:

2016-02-17  Brady Eidson  <beidson@apple.com>

        Modern IDB: More Encoder/Decoder/Messaging scaffolding for WK2 IPC.
        https://bugs.webkit.org/show_bug.cgi?id=154356

        Reviewed by Alex Christensen.

        No change in behavior yet; Just laying the groundwork.

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::didDeleteDatabase):
        (WebKit::WebIDBConnectionToClient::didOpenDatabase):
        (WebKit::WebIDBConnectionToClient::didAbortTransaction):
        (WebKit::WebIDBConnectionToClient::didCommitTransaction):
        (WebKit::WebIDBConnectionToClient::didCreateObjectStore):
        (WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
        (WebKit::WebIDBConnectionToClient::didClearObjectStore):
        (WebKit::WebIDBConnectionToClient::didCreateIndex):
        (WebKit::WebIDBConnectionToClient::didDeleteIndex):
        (WebKit::WebIDBConnectionToClient::didPutOrAdd):
        (WebKit::WebIDBConnectionToClient::didGetRecord):
        (WebKit::WebIDBConnectionToClient::didGetCount):
        (WebKit::WebIDBConnectionToClient::didDeleteRecord):
        (WebKit::WebIDBConnectionToClient::didOpenCursor):
        (WebKit::WebIDBConnectionToClient::didIterateCursor):
        (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
        (WebKit::WebIDBConnectionToClient::didStartTransaction):
        (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

2016-02-17  Alex Christensen  <achristensen@webkit.org>

        Fix GTK build after r196720.

        * UIProcess/API/gtk/WebKitUIClient.cpp:

2016-02-17  Anders Carlsson  <andersca@apple.com>

        Need listener-based version of runBeforeUnloadConfirmPanel
        https://bugs.webkit.org/show_bug.cgi?id=154354
        rdar://problem/23736691

        Reviewed by Sam Weinig.

        * Shared/API/APIObject.h:
        * Shared/API/c/WKBase.h:
        * UIProcess/API/APIUIClient.h:
        (API::UIClient::runBeforeUnloadConfirmPanel):
        * UIProcess/API/C/WKPage.cpp:
        (fixUpBotchedPageUIClient):
        (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
        (WebKit::RunBeforeUnloadConfirmPanelResultListener::~RunBeforeUnloadConfirmPanelResultListener):
        (WebKit::RunBeforeUnloadConfirmPanelResultListener::call):
        (WKPageRunBeforeUnloadConfirmPanelResultListenerGetTypeID):
        (WKPageRunBeforeUnloadConfirmPanelResultListenerCall):
        (WKPageSetPageUIClient):
        * UIProcess/API/C/WKPageUIClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

2016-02-17  Simon Fraser  <simon.fraser@apple.com>

        PDFPlugin's scrollableArea container is not properly unregistered when page is going into the PageCache
        https://bugs.webkit.org/show_bug.cgi?id=148182

        Reviewed by Brent Fulgham.
        
        When handling Command-arrow key while showing a scrollable PDF, the timing of PDFPlugin
        teardown and navigation could result in PDFPlugin::destroy() getting the wrong FrameView,
        so the old FrameView was left with a stale pointer in its scrollableAreaSet.

        Fix this by adding an explicit willDetatchRenderer() which is called on the plugin
        before the Frame gets a new FrameView.

        Also narrow the scope of the RefPtr<Widget> in HTMLPlugInElement::defaultEventHandler()
        so that the Widget is not kept alive over a possible navigation.

        I was unable to make an automated test, because reproducing the bug requires handling
        a Command-arrow key event in a way that the last ref to a Widget is held over the event
        handling, and this wasn't possible in an iframe.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::willDetatchRenderer):
        * WebProcess/Plugins/Plugin.h:
        (WebKit::Plugin::willDetatchRenderer):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::willDetatchRenderer):
        * WebProcess/Plugins/PluginView.h:

2016-02-17  Brady Eidson  <beidson@apple.com>

        Modern IDB: Encoder/Decoder/Messaging scaffolding for WK2 IPC.
        https://bugs.webkit.org/show_bug.cgi?id=154351

        Reviewed by Alex Christensen.

        No change in behavior yet; Just laying the groundwork.

        Implement in all of the client->server message sends, requiring many Encoder/Decoders for
        IDB objects to also be implemented:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::deleteDatabase):
        (WebKit::WebIDBConnectionToServer::openDatabase):
        (WebKit::WebIDBConnectionToServer::abortTransaction):
        (WebKit::WebIDBConnectionToServer::commitTransaction):
        (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToServer::createObjectStore):
        (WebKit::WebIDBConnectionToServer::deleteObjectStore):
        (WebKit::WebIDBConnectionToServer::clearObjectStore):
        (WebKit::WebIDBConnectionToServer::createIndex):
        (WebKit::WebIDBConnectionToServer::deleteIndex):
        (WebKit::WebIDBConnectionToServer::putOrAdd):
        (WebKit::WebIDBConnectionToServer::getRecord):
        (WebKit::WebIDBConnectionToServer::getCount):
        (WebKit::WebIDBConnectionToServer::deleteRecord):
        (WebKit::WebIDBConnectionToServer::openCursor):
        (WebKit::WebIDBConnectionToServer::iterateCursor):
        (WebKit::WebIDBConnectionToServer::establishTransaction):
        (WebKit::WebIDBConnectionToServer::databaseConnectionClosed):
        (WebKit::WebIDBConnectionToServer::abortOpenAndUpgradeNeeded):
        (WebKit::WebIDBConnectionToServer::didFireVersionChangeEvent):

2016-02-17  Alex Christensen  <achristensen@webkit.org>

        Copy http body when being redirected with 308 with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154348

        Reviewed by Brady Eidson.
        
        This fixes http/tests/security/cors-post-redirect-308.html
        which used to assert in ResourceRequest::doUpdateResourceHTTPBody

        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):

2016-02-17  Brady Eidson  <beidson@apple.com>

        Modern IDB: More WK2 IPC Scaffolding.
        https://bugs.webkit.org/show_bug.cgi?id=154317

        Reviewed by Alex Christensen.

        No change in behavior yet; Just laying the groundwork.

        * CMakeLists.txt:
        * DerivedSources.make:
        * WebKit2.xcodeproj/project.pbxproj:

        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
        (WebKit::WebIDBConnectionToClient::deleteDatabase):
        (WebKit::WebIDBConnectionToClient::openDatabase):
        (WebKit::WebIDBConnectionToClient::abortTransaction):
        (WebKit::WebIDBConnectionToClient::commitTransaction):
        (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToClient::createObjectStore):
        (WebKit::WebIDBConnectionToClient::deleteObjectStore):
        (WebKit::WebIDBConnectionToClient::clearObjectStore):
        (WebKit::WebIDBConnectionToClient::createIndex):
        (WebKit::WebIDBConnectionToClient::deleteIndex):
        (WebKit::WebIDBConnectionToClient::putOrAdd):
        (WebKit::WebIDBConnectionToClient::getRecord):
        (WebKit::WebIDBConnectionToClient::getCount):
        (WebKit::WebIDBConnectionToClient::deleteRecord):
        (WebKit::WebIDBConnectionToClient::openCursor):
        (WebKit::WebIDBConnectionToClient::iterateCursor):
        (WebKit::WebIDBConnectionToClient::establishTransaction):
        (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
        (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
        (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Added.

        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
        (WebKit::WebIDBConnectionToServer::didDeleteDatabase):
        (WebKit::WebIDBConnectionToServer::didOpenDatabase):
        (WebKit::WebIDBConnectionToServer::didAbortTransaction):
        (WebKit::WebIDBConnectionToServer::didCommitTransaction):
        (WebKit::WebIDBConnectionToServer::didCreateObjectStore):
        (WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
        (WebKit::WebIDBConnectionToServer::didClearObjectStore):
        (WebKit::WebIDBConnectionToServer::didCreateIndex):
        (WebKit::WebIDBConnectionToServer::didDeleteIndex):
        (WebKit::WebIDBConnectionToServer::didPutOrAdd):
        (WebKit::WebIDBConnectionToServer::didGetRecord):
        (WebKit::WebIDBConnectionToServer::didGetCount):
        (WebKit::WebIDBConnectionToServer::didDeleteRecord):
        (WebKit::WebIDBConnectionToServer::didOpenCursor):
        (WebKit::WebIDBConnectionToServer::didIterateCursor):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Added.

2016-02-17  Alex Christensen  <achristensen@webkit.org>

        CMake build fix after r196698.

        * PlatformMac.cmake:

2016-02-17  Alex Christensen  <achristensen@webkit.org>

        CMake build fix after r196698.

        * CMakeLists.txt:

2016-02-17  Anders Carlsson  <andersca@apple.com>

        Remove unused media cache manager code
        https://bugs.webkit.org/show_bug.cgi?id=154339

        Reviewed by Tim Horton.

        * DerivedSources.make:
        * Shared/API/c/WKBase.h:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetMediaCacheManager): Deleted.
        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/C/WKMediaCacheManager.cpp: Removed.
        (WKMediaCacheManagerGetTypeID): Deleted.
        (WKMediaCacheManagerGetHostnamesWithMediaCache): Deleted.
        (WKMediaCacheManagerClearCacheForHostname): Deleted.
        (WKMediaCacheManagerClearCacheForAllHostnames): Deleted.
        * UIProcess/API/C/WKMediaCacheManager.h: Removed.
        * UIProcess/WebMediaCacheManagerProxy.cpp: Removed.
        (WebKit::WebMediaCacheManagerProxy::supplementName): Deleted.
        (WebKit::WebMediaCacheManagerProxy::create): Deleted.
        (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy): Deleted.
        (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy): Deleted.
        (WebKit::WebMediaCacheManagerProxy::processPoolDestroyed): Deleted.
        (WebKit::WebMediaCacheManagerProxy::processDidClose): Deleted.
        (WebKit::WebMediaCacheManagerProxy::shouldTerminate): Deleted.
        (WebKit::WebMediaCacheManagerProxy::refWebContextSupplement): Deleted.
        (WebKit::WebMediaCacheManagerProxy::derefWebContextSupplement): Deleted.
        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Deleted.
        (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Deleted.
        (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Deleted.
        (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Deleted.
        * UIProcess/WebMediaCacheManagerProxy.h: Removed.
        * UIProcess/WebMediaCacheManagerProxy.messages.in: Removed.
        * UIProcess/WebProcessPool.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/MediaCache/WebMediaCacheManager.cpp: Removed.
        (WebKit::WebMediaCacheManager::supplementName): Deleted.
        (WebKit::WebMediaCacheManager::WebMediaCacheManager): Deleted.
        (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Deleted.
        (WebKit::WebMediaCacheManager::clearCacheForHostname): Deleted.
        (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Deleted.
        * WebProcess/MediaCache/WebMediaCacheManager.h: Removed.
        * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Removed.
        * WebProcess/WebProcess.cpp:
        (WebKit::m_webSQLiteDatabaseTracker): Deleted.

2016-02-16  Dean Jackson  <dino@apple.com>

        Allow double tap to zoom in fast-click pages
        https://bugs.webkit.org/show_bug.cgi?id=154318
        <rdar://problem/24223767>

        Reviewed by Simon Fraser and Benjamin Poulain.
        
        Most of the patch comes from Jon Lee.

        Our fast-click algorithm exposed a number of cases where
        people missed the double-tap-to-zoom behaviour. In particular,
        when you double tap on a large body of text, typical in
        blogs and articles.

        This patch enhances the algorithm to have a parallel
        double-tap gesture recognizer in the situations where
        fast-click is enabled. This new gesture recongizer does
        not cause the single tap to block for 350ms, so clicks
        are still dispatched fast. If it fires, we already have
        some information about whether we have a pending double
        tap, based on the first tap.

        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary): Remove the optimization
        that only told the content view to disable on pages that allowed double taps. We now allow
        them even on fast click pages.

        * UIProcess/ios/WKContentViewInteraction.h: Add the new UITapGestureRecognizer for double taps
        in fast click pages. This is called nonBlockingDoubleTapGestureRecognizer because, unlike
        the existing DoubleTapGestureRecognizer, this one does not force the singleTapRecognizer
        to wait.
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView setupInteraction]): Set up the new UITapGestureRecognizer.
        (-[WKContentView cleanupInteraction]): And remove it when we're done.
        (-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
        (-[WKContentView _addDefaultGestureRecognizers]):
        (-[WKContentView _inspectorNodeSearchRecognized:]): Something happened, we are no longer in
        a potential double tap situation.
        (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]): Remove the check
        for potential tap in progress.
        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
        (-[WKContentView gestureRecognizerShouldBegin:]):
        (-[WKContentView _highlightLongPressRecognized:]): Again, something happened, so we are
        no longer in a double tap situation.
        (-[WKContentView _longPressRecognized:]): Ditto.
        (-[WKContentView _singleTapRecognized:]): Ditto.
        (-[WKContentView _doubleTapRecognized:]): Ditto.
        (-[WKContentView _resetIsDoubleTapPending]):
        (-[WKContentView _fastDoubleTapRecognized:]): We're now pending a double tap.
        (-[WKContentView _twoFingerDoubleTapRecognized:]):
        (-[WKContentView _didNotHandleTapAsClick:]): If we get here and we have a pending
        double tap, then trigger a zoom operation.
        (-[WKContentView _setDoubleTapGesturesEnabled:]):

2016-02-16  Alex Christensen  <achristensen@webkit.org>

        CMake build fix.

        * PlatformMac.cmake:

2016-02-16  Alex Christensen  <achristensen@webkit.org>

        Use NSURLCredential from serverTrust when evaluating server trust AuthenticationChallenges with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154316

        Reviewed by Brady Eidson.
        
        This fixes http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
        and many other layout tests that use https because it allows https connections with servers
        with self-signed certificates when TestController::canAuthenticateAgainstProtectionSpace in
        WebKitTestRunner says it's OK, or when any other WKPageNavigationClient says it's ok. 

        * NetworkProcess/NetworkDataTask.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::serverTrustCredential):

2016-02-16  Anders Carlsson  <andersca@apple.com>

        Use pid_t everywhere, instead of PlatformProcessIdentifier
        https://bugs.webkit.org/show_bug.cgi?id=154306

        Reviewed by Sam Weinig.

        * Platform/IPC/Connection.h:
        * Platform/PlatformProcessIdentifier.h: Removed.
        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
        (TEST_F):
        * UIProcess/ChildProcessProxy.h:
        (WebKit::ChildProcessProxy::processIdentifier):
        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::didFinishLaunchingProcess):
        * UIProcess/Launcher/ProcessLauncher.h:
        (WebKit::ProcessLauncher::processIdentifier):
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::processIdentifier):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::networkProcessIdentifier):
        * UIProcess/WebProcessPool.h:
        * UIProcess/WebProcessProxy.h:
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-16  Anders Carlsson  <andersca@apple.com>

        Remove WebKit2 header cruft
        https://bugs.webkit.org/show_bug.cgi?id=154309

        Reviewed by Sam Weinig.

        * WebKit2.xcodeproj/project.pbxproj:
        * mac/WKError.h: Removed.
        * mac/WKPreferences.h: Removed.

2016-02-16  Anders Carlsson  <andersca@apple.com>

        Remove unused environment variable classes
        https://bugs.webkit.org/show_bug.cgi?id=154308

        Reviewed by Tim Horton.

        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Removed.
        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Removed.
        (WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Deleted.
        (WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Deleted.
        * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Removed.
        (WebKit::EnvironmentVariables::EnvironmentVariables): Deleted.
        (WebKit::EnvironmentVariables::~EnvironmentVariables): Deleted.
        (WebKit::EnvironmentVariables::set): Deleted.
        (WebKit::EnvironmentVariables::get): Deleted.
        (WebKit::EnvironmentVariables::appendValue): Deleted.
        (WebKit::EnvironmentVariables::valueIfVariableHasName): Deleted.
        (WebKit::EnvironmentVariables::createStringForVariable): Deleted.
        (WebKit::EnvironmentVariables::copyEnvironmentVariables): Deleted.
        (WebKit::EnvironmentVariables::dump): Deleted.
        * UIProcess/Launcher/mac/EnvironmentVariables.h: Removed.
        (WebKit::EnvironmentVariables::environmentPointer): Deleted.
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-16  Alex Christensen  <achristensen@webkit.org>

        Add checks before redirecting with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154298

        Reviewed by Andy Estes.

        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::create):
        (WebKit::NetworkDataTask::setPendingDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::willPerformHTTPRedirection):
        Implemented based on ResourceHandle::willSendRequest but with two notable exceptions:
        1. When using NSURLConnection, the last http method and the current http method are not always equal, and this
        check needs to change the current http method to match the last http method when being redirected with an http
        status code 307.  When using NSURLSession, the current http method is already updated properly.
        2. I did not copy the part of ResourceHandle::willSendRequest that uses a CredentialStorage.  I'm trying to avoid
        using CredentialStorages with NSURLSession.
        (WebKit::NetworkDataTask::scheduleFailure):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

2016-02-16  Brady Eidson  <beidson@apple.com>

        Modern IDB: WK2 IPC Scaffolding.
        https://bugs.webkit.org/show_bug.cgi?id=154296

        Reviewed by Alex Christensen.
        
        No change in behavior yet; Just laying the groundwork.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:

        * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
        (WebKit::DatabaseToWebProcessConnection::establishIDBConnectionToServer):
        (WebKit::DatabaseToWebProcessConnection::removeIDBConnectionToServer):
        * DatabaseProcess/DatabaseToWebProcessConnection.h:
        * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
        
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp: Added.
        (WebKit::WebIDBConnectionToClient::create):
        (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
        (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
        (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
        (WebKit::WebIDBConnectionToClient::messageSenderConnection):
        (WebKit::WebIDBConnectionToClient::connectionToClient):
        (WebKit::WebIDBConnectionToClient::didDeleteDatabase):
        (WebKit::WebIDBConnectionToClient::didOpenDatabase):
        (WebKit::WebIDBConnectionToClient::didAbortTransaction):
        (WebKit::WebIDBConnectionToClient::didCommitTransaction):
        (WebKit::WebIDBConnectionToClient::didCreateObjectStore):
        (WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
        (WebKit::WebIDBConnectionToClient::didClearObjectStore):
        (WebKit::WebIDBConnectionToClient::didCreateIndex):
        (WebKit::WebIDBConnectionToClient::didDeleteIndex):
        (WebKit::WebIDBConnectionToClient::didPutOrAdd):
        (WebKit::WebIDBConnectionToClient::didGetRecord):
        (WebKit::WebIDBConnectionToClient::didGetCount):
        (WebKit::WebIDBConnectionToClient::didDeleteRecord):
        (WebKit::WebIDBConnectionToClient::didOpenCursor):
        (WebKit::WebIDBConnectionToClient::didIterateCursor):
        (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
        (WebKit::WebIDBConnectionToClient::didStartTransaction):
        (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h: Added.
        
        * Platform/Logging.h:
                
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: Added.
        (WebKit::generateConnectionToServerIdentifier):
        (WebKit::WebIDBConnectionToServer::create):
        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
        (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
        (WebKit::WebIDBConnectionToServer::messageSenderConnection):
        (WebKit::WebIDBConnectionToServer::coreConnectionToServer):
        (WebKit::WebIDBConnectionToServer::deleteDatabase):
        (WebKit::WebIDBConnectionToServer::openDatabase):
        (WebKit::WebIDBConnectionToServer::abortTransaction):
        (WebKit::WebIDBConnectionToServer::commitTransaction):
        (WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
        (WebKit::WebIDBConnectionToServer::createObjectStore):
        (WebKit::WebIDBConnectionToServer::deleteObjectStore):
        (WebKit::WebIDBConnectionToServer::clearObjectStore):
        (WebKit::WebIDBConnectionToServer::createIndex):
        (WebKit::WebIDBConnectionToServer::deleteIndex):
        (WebKit::WebIDBConnectionToServer::putOrAdd):
        (WebKit::WebIDBConnectionToServer::getRecord):
        (WebKit::WebIDBConnectionToServer::getCount):
        (WebKit::WebIDBConnectionToServer::deleteRecord):
        (WebKit::WebIDBConnectionToServer::openCursor):
        (WebKit::WebIDBConnectionToServer::iterateCursor):
        (WebKit::WebIDBConnectionToServer::establishTransaction):
        (WebKit::WebIDBConnectionToServer::databaseConnectionClosed):
        (WebKit::WebIDBConnectionToServer::abortOpenAndUpgradeNeeded):
        (WebKit::WebIDBConnectionToServer::didFireVersionChangeEvent):
        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Added.

        * WebProcess/Databases/WebDatabaseProvider.cpp:
        (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
        * WebProcess/Databases/WebDatabaseProvider.h:

        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
        (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession):
        * WebProcess/Databases/WebToDatabaseProcessConnection.h:

2016-02-16  Sam Weinig  <sam@webkit.org>

        Revert r195826.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):
        (-[WKContentView _singleTapCommited:]):

2016-02-16  Csaba Osztrogonác  <ossy@webkit.org>

        [Mac][cmake] Unreviewed buildfix after r196488. Just for fun.

        * PlatformMac.cmake:

2016-02-15  Dan Bernstein  <mitz@apple.com>

        Removed unused files after r196478.

        * Configurations/DatabaseProcess.xcconfig: Removed.
        * Configurations/NetworkProcess.xcconfig: Removed.
        * Configurations/PluginProcess.xcconfig: Removed.
        * Configurations/WebContentProcess.xcconfig: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-15  ChangSeok Oh  <changseok.oh@collabora.com>

        [ThreadedCompositor] position:fixed elements do not have their own layers when threaded compositor is enabled.
        https://bugs.webkit.org/show_bug.cgi?id=154100

        Reviewed by Carlos Garcia Campos.

        Currently, fixed elements are redrawn to a backing store every time layout or scroll happens.
        It results in the bad effect on performance-wise. Letting fixed element have separate layers is
        necessary when threaded compositor is enabled at least. Because async scrolling requires it.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::updatePreferences):

2016-02-15  Alex Christensen  <achristensen@webkit.org>

        Implement content sniffing check with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154261

        Reviewed by Andy Estes.

        This fixes http/tests/xmlhttprequest/small-chunks-response-text.html when using NetworkSession.

        * NetworkProcess/NetworkDataTask.h:
        (WebKit::NetworkDataTask::create):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        Content sniffing is enabled by default.  Disable it if the NetworkLoadParameters say not to.
        This is analogous to behavior in ResourceHandle::createNSURLConnection.

2016-02-15  Alex Christensen  <achristensen@webkit.org>

        Move Download authentication code to AuthenticationManager
        https://bugs.webkit.org/show_bug.cgi?id=154132

        Reviewed by Sam Weinig.

        When a video element makes a request that receives an authentication challenge, the
        AuthenticationManager receives an AuthenticationChallenge without an AuthenticationClient.
        As a result, Download::receivedCredential and other functions were being called, which
        sent a message to the challenge's sender.  This functionality is not specific to downloads,
        so I moved it from Download to AuthenticationManager.

        This fixes http/tests/media/video-auth.html when using NetworkSession 
        because I use AuthenticationManager::receivedCredential if there is no AuthenticationClient
        instead of improperly asserting that there is always an AuthenticationClient if there is no
        completionHandler.

        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/ios/DownloadIOS.mm:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * NetworkProcess/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::continueWithoutCredential): Deleted.
        (WebKit::Download::useCredential): Deleted.
        (WebKit::Download::cancelAuthenticationChallenge): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
        (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
        (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
        (WebKit::AuthenticationManager::cancelChallenge):
        (WebKit::AuthenticationManager::cancelSingleChallenge):
        (WebKit::AuthenticationManager::performDefaultHandling):
        (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
        * Shared/Authentication/cocoa: Added.
        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Added.
        (WebKit::AuthenticationManager::receivedCredential):
        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
        (WebKit::AuthenticationManager::receivedCancellation):
        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
        (WebKit::AuthenticationManager::receivedChallengeRejection):
        * Shared/Authentication/soup: Added.
        * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Added.
        (WebKit::AuthenticationManager::receivedCredential):
        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
        (WebKit::AuthenticationManager::receivedCancellation):
        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
        (WebKit::AuthenticationManager::receivedChallengeRejection):
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-15  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [CMake][Mac] Remove WKNPAPIPlugInContainer.mm in WebKit2/PlatformMac.cmake
        https://bugs.webkit.org/show_bug.cgi?id=154234

        Reviewed by Csaba Osztrogonác.

        * PlatformMac.cmake: Remove WKNPAPIPlugInContainer.mm.

2016-02-14  Chris Dumez  <cdumez@apple.com>

        Unreviewed, land an additional Mac CMake build fix.

        * PlatformMac.cmake:

2016-02-14  Brian Burg  <bburg@apple.com>

        WKAutomationDelegate's requestAutomationSession should take a suggested session identifier
        https://bugs.webkit.org/show_bug.cgi?id=154012
        <rdar://problem/24557697>

        Reviewed by Darin Adler.

        Add a string parameter to the delegate method for requesting a new session.

        * UIProcess/API/APIAutomationClient.h:
        (API::AutomationClient::didRequestAutomationSession):
        (API::AutomationClient::requestAutomationSession): Deleted.
        Rename the client method to better match the delegate method's name.

        * UIProcess/API/Cocoa/_WKAutomationDelegate.h:
        * UIProcess/Cocoa/AutomationClient.h:
        * UIProcess/Cocoa/AutomationClient.mm:
        (WebKit::AutomationClient::AutomationClient):
        (WebKit::AutomationClient::requestAutomationSession):

2016-02-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK+ and hopefully EFL build after r196499.

        * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
        (WebKit::ProcessLauncher::launchProcess):
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::launchProcess):
        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):

2016-02-12  Beth Dakin  <bdakin@apple.com>

        REGRESSION: Link preview is slow and unreliable
        https://bugs.webkit.org/show_bug.cgi?id=154197
        -and corresponding-
        rdar://problem/24428064

        Reviewed by Tim Horton.

        This patch rolls http://trac.webkit.org/changeset/187471 back in. That was 
        how we fixed this problem ages ago. We rolled it out because it very 
        mysteriously seemed to cause a memory regression, but we want to track that 
        separately and not leave this performance regression in its place in the 
        meantime.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::updateViewState):
        (WebKit::WebPageProxy::dispatchViewStateChange):
        (WebKit::WebPageProxy::updateActivityToken):

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Get rid of a 6 year old compiler workaround
        https://bugs.webkit.org/show_bug.cgi?id=154198

        Reviewed by Sam Weinig.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::connectToService):
        (WebKit::createService):

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Fix ASan build.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::copyASanDynamicLibraryPath): Deleted.

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Remove NPAPI for showing preference panes
        https://bugs.webkit.org/show_bug.cgi?id=154193

        Reviewed by Dan Bernstein.

        No plug-ins ended up adopting this API, so there's no point in keeping it around.

        * PluginProcess/PluginControllerProxy.h:
        * PluginProcess/mac/PluginControllerProxyMac.mm:
        (WebKit::PluginControllerProxy::openPluginPreferencePane): Deleted.
        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo): Deleted.
        * Shared/Plugins/PluginModuleInfo.h:
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::openPluginPreferencePane): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue): Deleted.
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::openPluginPreferencePane): Deleted.
        (WebKit::NetscapePlugin::plugInContainer): Deleted.
        (WebKit::NetscapePlugin::platformDestroy): Deleted.
        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h: Removed.
        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm: Removed.
        (-[WKNPAPIPlugInContainer dealloc]): Deleted.
        (-[WKNPAPIPlugInContainer _invalidate]): Deleted.
        (-[WKNPAPIPlugInContainer openPlugInPreferencePane]): Deleted.
        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h: Removed.
        * WebProcess/Plugins/PluginController.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::openPluginPreferencePane): Deleted.
        * WebProcess/Plugins/PluginView.h:

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Remove PowerPC cruft
        https://bugs.webkit.org/show_bug.cgi?id=154191

        Reviewed by Dan Bernstein.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::getPluginArchitecture): Deleted.

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Remove more unneeded process launching code
        https://bugs.webkit.org/show_bug.cgi?id=154190

        Reviewed by Tim Horton.

        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::getLaunchOptions): Deleted.
        * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm: Removed.
        (WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::getLaunchOptions): Deleted.
        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
        (WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/Plugins/PluginProcessProxy.h:
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): Deleted.
        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::getLaunchOptions): Deleted.
        * UIProcess/mac/WebProcessProxyMac.mm:
        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Use different process types for 32-bit and 64-bit plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=154186

        Reviewed by Tim Horton.

        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::getLaunchOptions):
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::serviceName):
        (WebKit::shouldLeakBoost):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::getLaunchOptions):
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::getLaunchOptions): Deleted.
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::getLaunchOptions):

2016-02-12  Beth Dakin  <bdakin@apple.com>

        Re-name isClickableElement in InteractionInformationAtPosition to isElement
        https://bugs.webkit.org/show_bug.cgi?id=154179

        Reviewed by Enrica Casucci.

        The bool is set for all elements, so it’s just confusing to call it a 
        clickableElement instead of just element.
        * Shared/ios/InteractionInformationAtPosition.h:
        * Shared/ios/InteractionInformationAtPosition.mm:
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView gestureRecognizerShouldBegin:]):
        (-[WKContentView _highlightLongPressRecognized:]):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Remove more unused process launcher code
        https://bugs.webkit.org/show_bug.cgi?id=154181

        Reviewed by Tim Horton.

        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::processTypeAsString): Deleted.
        (WebKit::ProcessLauncher::getProcessTypeFromString): Deleted.
        * UIProcess/Launcher/ProcessLauncher.h:

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Remove more unused process launching code
        https://bugs.webkit.org/show_bug.cgi?id=154178

        Reviewed by Tim Horton.

        * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
        (WebKit::shouldUseXPC): Deleted.
        (WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
        (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Deleted.
        (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Deleted.
        * UIProcess/Launcher/mac/EnvironmentVariables.h:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::ProcessLauncher::launchProcess):
        (WebKit::setUpTerminationNotificationHandler): Deleted.
        (WebKit::addDYLDEnvironmentAdditions): Deleted.
        (WebKit::tryPreexistingProcess): Deleted.
        (WebKit::createProcess): Deleted.
        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
        (WebKit::shouldUseXPC): Deleted.
        (WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/ios/WebProcessProxyIOS.mm:
        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
        * UIProcess/mac/WebProcessProxyMac.mm:
        (WebKit::shouldUseXPC): Deleted.
        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.

2016-02-12  Brian Burg  <bburg@apple.com>

        Add a WebKit SPI for creating an automation session and advertise the active session via RemoteInspector
        https://bugs.webkit.org/show_bug.cgi?id=153934

        Reviewed by Dan Bernstein and Joseph Pecoraro.

        An automation session is the main place where WebKit support for user agent automation is implemented.
        A session encapsulates the state (default timeouts, page identifier mappings), objects (active automation
        WebPages) and logic (how to open a window, run JS, send user input, etc.) used to implement automation
        commands.

        A process pool can only have one session at a time. The session is created by the WebKit client in
        response to a request that comes through _WKAutomationDelegate. When a session is set on the process pool,
        it is advertised to remote drivers and debuggers as a RemoteControllableTarget. A remote driver can use
        the existing RemoteInspector API to connect to the session and send it automation commands.

        The session has a delegate so that WebKit clients can perform actions that are outside the scope of WebKit,
        such as creating new tabs, enumerating windows, or sending native user inputs.

        This patch adds AutomationSession classes at the API and implementation level in WebKit2. The
        implementation class contains RemoteInspector support, which cannot be used directly by WebKit clients.
        AutomationSessionDelegate classes exist at both the API and implementation level to bridge between
        Objective-C delegates and C++ clients. All code related to RemoteInspector and RemoteAutomationTarget
        must be guarded by ENABLE(REMOTE_INSPECTOR).

        * Shared/API/APIObject.h: Add new API type 'AutomationSession'.
        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject): Allocate in the wrapper.
        * UIProcess/API/APIAutomationSessionClient.h: Added.
        (API::AutomationSessionClient::~AutomationSessionClient):
        (API::AutomationSessionClient::didRequestNewWindow): Delegate window creation to the client.
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _setAutomationSession:]): Keep at most one WebAutomationSession at a time.
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
        * UIProcess/API/Cocoa/_WKAutomationSession.h: Added.
        * UIProcess/API/Cocoa/_WKAutomationSession.mm: Added.
        (-[_WKAutomationSession init]): Construct the API object in the implementation wrapper.
        (-[_WKAutomationSession dealloc]): Clear the client before calling the implementation destructor.

        (-[_WKAutomationSession sessionIdentifier]):
        (-[_WKAutomationSession setSessionIdentifier:]):
        Store the session identifier string in the implementation.

        (-[_WKAutomationSession delegate]):
        (-[_WKAutomationSession setDelegate:]):
        Create an Objective-C adapter for the delegate if not nil and set it as the implementation's client.

        (-[_WKAutomationSession _apiObject]):
        * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: Added.
        * UIProcess/API/Cocoa/_WKAutomationSessionInternal.h: Added.
        (wrapper):
        * UIProcess/Cocoa/AutomationSessionClient.h: Added.
        Set up the boilerplate for caching delegate method availability. It will include more methods later.

        * UIProcess/Cocoa/AutomationSessionClient.mm: Added. Forward requests to the SPI delegate.
        (WebKit::AutomationSessionClient::AutomationSessionClient):
        (WebKit::AutomationSessionClient::didRequestNewWindow): Delegate window creation to the client.

        * UIProcess/WebAutomationSession.cpp: Added.
        (WebKit::WebAutomationSession::WebAutomationSession):
        By default, a session should be available and not paired to any particular remote driver.

        (WebKit::WebAutomationSession::~WebAutomationSession): Require callers to clear the client first.
        (WebKit::WebAutomationSession::setClient):
        (WebKit::WebAutomationSession::dispatchMessageFromRemote): Stub this out for now.

        (WebKit::WebAutomationSession::connect):
        (WebKit::WebAutomationSession::disconnect):
        To prevent multiple connection attempts, mark the target as paired when a remote client has connected.

        * UIProcess/WebAutomationSession.h: Added.
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setAutomationSession):
        Store the session object and tell it to register itself. Unregistering happens automatically
        in RemoteControllableTarget::~RemoteControllableTarget.

        * UIProcess/WebProcessPool.h:
        * WebKit2.xcodeproj/project.pbxproj: Add files and headers.

2016-02-12  Anders Carlsson  <andersca@apple.com>

        Get rid of NetscapePluginModule::createPluginMIMETypesPreferences
        https://bugs.webkit.org/show_bug.cgi?id=154173

        Reviewed by Dan Bernstein.

        * Shared/Plugins/Netscape/NetscapePluginModule.h:
        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences): Deleted.

2016-02-11  Anders Carlsson  <andersca@apple.com>

        Remove legacy processes from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=154119

        Reviewed by Darin Adler.

        * Configurations/BaseLegacyProcess.xcconfig: Removed.
        * DatabaseProcess/EntryPoint/mac/LegacyProcess/DatabaseProcessMain.mm: Removed.
        (DatabaseProcessMain): Deleted.
        * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
        * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
        * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm: Removed.
        (NetworkProcessMain): Deleted.
        * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
        * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: Removed.
        (WebKit::PluginProcessMainDelegate::PluginProcessMainDelegate): Deleted.
        (PluginProcessMain): Deleted.
        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: Removed.
        (WebKit::ChildProcessMainDelegate::ChildProcessMainDelegate): Deleted.
        (WebKit::ChildProcessMain): Deleted.
        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: Removed.
        (WebKit::ChildProcessMainDelegate::~ChildProcessMainDelegate): Deleted.
        (WebKit::ChildProcessMainDelegate::installSignalHandlers): Deleted.
        (WebKit::ChildProcessMainDelegate::doPreInitializationWork): Deleted.
        (WebKit::ChildProcessMainDelegate::getConnectionIdentifier): Deleted.
        (WebKit::ChildProcessMainDelegate::getClientIdentifier): Deleted.
        (WebKit::ChildProcessMainDelegate::getClientProcessName): Deleted.
        (WebKit::ChildProcessMainDelegate::getExtraInitializationData): Deleted.
        (WebKit::ChildProcessMainDelegate::startRunLoop): Deleted.
        (WebKit::ChildProcessMainDelegate::doPostRunWork): Deleted.
        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm: Removed.
        (WebKit::closeUnusedFileDescriptors): Deleted.
        (WebKit::BootstrapMain): Deleted.
        (main): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
        * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Removed.
        (WebKit::WebContentProcessMainDelegate::WebContentProcessMainDelegate): Deleted.
        (WebContentProcessMain): Deleted.

2016-02-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] HTTP auth dialog incorrectly rendered with Accelerated Compositing enabled
        https://bugs.webkit.org/show_bug.cgi?id=154159

        Reviewed by Michael Catanzaro.

        There are two problems here, first we are changing the cairo
        operator when rendering the xcomposite window pixmap without a
        proper save/restore, so it affects the drawing that happens after
        that, and second problem is that we are not rendering the gray
        background in AC mode because we are returning earlier.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewRenderAcceleratedCompositingResults):
        (webkitWebViewBaseDraw):

2016-02-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] Allow applications to disable Accelerated Compositing mode.
        https://bugs.webkit.org/show_bug.cgi?id=154147

        Reviewed by Carlos Garcia Campos.

        * UIProcess/gtk/WebPreferencesGtk.cpp:
        (WebKit::WebPreferences::platformInitializeStore): if the environment
        variable  WEBKIT_DISABLE_COMPOSITING_MODE is defined, then disable AC.

2016-02-11  Commit Queue  <commit-queue@webkit.org>

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

        This change broke internal iOS builds (Requested by ryanhaddad
        on #webkit).

        Reverted changeset:

        "Move Download authentication code to AuthenticationManager"
        https://bugs.webkit.org/show_bug.cgi?id=154132
        http://trac.webkit.org/changeset/196453

2016-02-11  Anders Carlsson  <andersca@apple.com>

        Use the system PluginProcess.app for generating plug-in MIME type preferences
        https://bugs.webkit.org/show_bug.cgi?id=154139

        Reviewed by Dan Bernstein.

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

2016-02-11  Beth Dakin  <bdakin@apple.com>

        EditingRangeIsRelativeTo::Document and NSRangeIsRelativeTo::Document should 
        be called EditableRoot instead
        https://bugs.webkit.org/show_bug.cgi?id=154138

        Reviewed by Alexey Proskuryakov.

        EditableRoot is much more accurate than Document.
        * Shared/EditingRange.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::insertText):
        (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::rangeFromEditingRange):
        * WebProcess/WebPage/WebPage.h:

2016-02-11  Alex Christensen  <achristensen@webkit.org>

        Move Download authentication code to AuthenticationManager
        https://bugs.webkit.org/show_bug.cgi?id=154132

        Reviewed by Sam Weinig.

        When a video element makes a request that receives an authentication challenge, the
        AuthenticationManager receives an AuthenticationChallenge without an AuthenticationClient.
        As a result, Download::receivedCredential and other functions were being called, which
        sent a message to the challenge's sender.  This functionality is not specific to downloads,
        so I moved it from Download to AuthenticationManager.

        This fixes http/tests/media/video-auth.html when using NetworkSession 
        because I use AuthenticationManager::receivedCredential if there is no AuthenticationClient
        instead of improperly asserting that there is always an AuthenticationClient if there is no
        completionHandler.

        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/ios/DownloadIOS.mm:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * NetworkProcess/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::receivedCredential): Deleted.
        (WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
        (WebKit::Download::receivedCancellation): Deleted.
        (WebKit::Download::continueWithoutCredential): Deleted.
        (WebKit::Download::useCredential): Deleted.
        (WebKit::Download::cancelAuthenticationChallenge): Deleted.
        (WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
        (WebKit::Download::receivedChallengeRejection): Deleted.
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
        (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
        (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
        (WebKit::AuthenticationManager::cancelChallenge):
        (WebKit::AuthenticationManager::cancelSingleChallenge):
        (WebKit::AuthenticationManager::performDefaultHandling):
        (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
        * Shared/Authentication/cocoa: Added.
        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Added.
        (WebKit::AuthenticationManager::receivedCredential):
        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
        (WebKit::AuthenticationManager::receivedCancellation):
        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
        (WebKit::AuthenticationManager::receivedChallengeRejection):
        * Shared/Authentication/soup: Added.
        * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Added.
        (WebKit::AuthenticationManager::receivedCredential):
        (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
        (WebKit::AuthenticationManager::receivedCancellation):
        (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
        (WebKit::AuthenticationManager::receivedChallengeRejection):
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-11  Beth Dakin  <bdakin@apple.com>

        Soft spaces are often tracked in the wrong spot
        https://bugs.webkit.org/show_bug.cgi?id=154127
        -and corresponding-
        rdar://problem/24493140

        Reviewed by Sam Weinig.

        Soft spaces are in the wrong space now for two reasons. First of all, the 
        NSRange we get from the accepted candidate is relative to the paragraph 
        start, so without this patch, soft spaces are only ever right for the first 
        paragraph. Secondly, if focus changes for any reason other than text 
        insertion, soft spaces are also wrong because they need to be re-set.

        New enum can be used to indicate what an EditingRange is relative to.
        * Shared/EditingRange.h:
        (WebKit::EditingRange::EditingRange):

        didHandleAcceptedCandidate is a new message that gets sent from the 
        WebProcess. This lets us track a bool m_isHandlingAcceptedCandidate.
        * UIProcess/Cocoa/WebViewImpl.h:
        (WebKit::WebViewImpl::didHandleAcceptedCandidate):

        Re-set the m_softSpaceRange on selection changes so long as 
        m_isHandlingAcceptedCandidate is false.
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::selectionDidChange):

        Set m_isHandlingAcceptedCandidate to true.
        (WebKit::WebViewImpl::handleAcceptedCandidate):

        Set m_isHandlingAcceptedCandidate to false.
        (WebKit::WebViewImpl::didHandleAcceptedCandidate):

        insertTextAsync takes a new parameter indicating what the replacementRange is 
        relative to. If needToRemoveSoftSpace is true, then the replacementRange is 
        relative to the paragraph.
        (WebKit::WebViewImpl::insertText):

        Pipe didHandleAcceptedCandidate through to WebViewImpl.
        * UIProcess/PageClient.h:

        insertTextAsync takes an EditingRangeIsRelativeTo.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::insertTextAsync):

        Pipe didHandleAcceptedCandidate through to WebViewImpl.
        (WebKit::WebPageProxy::didHandleAcceptedCandidate):
        * UIProcess/WebPageProxy.h:

        New message lets the WebProcess tell the UIProcess when the candidate has 
        been accepted.
        * UIProcess/WebPageProxy.messages.in:

        Pipe didHandleAcceptedCandidate through to WebViewImpl.
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didHandleAcceptedCandidate):

        insertTextAsync takes an EditingRangeIsRelativeTo. Pass that through to 
        rangeFromEditingRange to get the correct range.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::insertTextAsync):

        Use the EditingRangeIsRelativeTo to find the right WebCore::Range.
        (WebKit::WebPage::rangeFromEditingRange):

        Take EditingRangeIsRelativeTo in a few places. 
        * WebProcess/WebPage/WebPage.h:

        InsertTextAsync takes a EditingRangeIsRelativeTo.
        * WebProcess/WebPage/WebPage.messages.in:

        Send didHandleAccpetedCandidate to the UIProcess
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::handleAcceptedCandidate):

2016-02-11  Alex Christensen  <achristensen@webkit.org>

        Use BlobResourceHandle when loading blob urls, even when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=154096

        Reviewed by Brady Eidson.
        
        This fixes at least http/tests/xmlhttprequest/blob-request-byte-range.html.

        * NetworkProcess/NetworkDataTask.h:
        Renamed NetworkDataTaskClient::didReceiveResponse to didReceiveResponseNetworkSession
        to avoid conflicting with ResourceHandleClient::didReceiveResponse.
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        Make a BlobResourceHandle instead of a NetworkDataTask if we have a request for a blob url.
        (WebKit::NetworkLoad::~NetworkLoad):
        (WebKit::NetworkLoad::setDefersLoading):
        (WebKit::NetworkLoad::cancel):
        (WebKit::NetworkLoad::continueWillSendRequest):
        (WebKit::NetworkLoad::continueDidReceiveResponse):
        (WebKit::NetworkLoad::sharedDidReceiveResponse):
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
        (WebKit::NetworkLoad::cannotShowURL):
        (WebKit::NetworkLoad::didReceiveResponseAsync):
        (WebKit::NetworkLoad::willSendRequestAsync):
        (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkLoad::supportsDataArray):
        (WebKit::NetworkLoad::didReceiveDataArray):
        (WebKit::NetworkLoad::didSendData):
        (WebKit::NetworkLoad::receivedCancellation):
        (WebKit::NetworkLoad::didReceiveResponse): Deleted.
        Compile ResourceHandleClient when using NetworkSession because it is used for blobs now.
        Also, add null checks because we now have NetworkLoads where either m_task or m_handle is always null.
        * NetworkProcess/NetworkLoad.h:
        (WebKit::NetworkLoad::pendingDownloadID):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        * NetworkProcess/mac/NetworkLoadMac.mm:
        (WebKit::NetworkLoad::willCacheResponseAsync):

2016-02-11  Frederic Wang  <fred.wang@free.fr>

        Bug 154103 - [GTK] Build error after bug 154046
        https://bugs.webkit.org/show_bug.cgi?id=154103

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitUserContent.cpp:
        (_WebKitUserStyleSheet::_WebKitUserStyleSheet):
        (webkitUserStyleSheetGetUserStyleSheet):
        * UIProcess/API/gtk/WebKitUserContentPrivate.h:

2016-02-10  Jiewen Tan  <jiewen_tan@apple.com>

        Rename *Event::create* which creates events for bindings to *Event::createForBindings* and cleanup corresponding paths
        https://bugs.webkit.org/show_bug.cgi?id=153903
        <rdar://problem/24518146>

        Reviewed by Darin Adler.

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

2016-02-10  Anders Carlsson  <andersca@apple.com>

        Add SPI to remove individual user scripts or user style sheets
        https://bugs.webkit.org/show_bug.cgi?id=154046
        rdar://problem/23596352

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController _removeUserScript:]):
        (-[WKUserContentController _userStyleSheets]):
        (-[WKUserContentController _addUserStyleSheet:]):
        (-[WKUserContentController _removeUserStyleSheet:]):
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        (WebKit::WebUserContentControllerProxy::userStyleSheets):
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeUserStyleSheet):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:

2016-02-10  Alex Christensen  <achristensen@webkit.org>

        Fix assertions when loading from WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=154079

        Reviewed by Anders Carlsson.

        Assertions were failing, mostly when using NetworkProcess, and mostly involving Top Sites.
        When we do loading from the WebProcess (which we should eventually not allow), we were sometimes
        using a private browsing session that did not exist because the UIProcess had told the NetworkProcess
        to create a private browsing session with the given SessionID, but the WebProcess was not told about
        the private browsing session.
        Also, sometimes we were calling NetworkProcess::singleton() from the WebProcess, which caused problems
        with the PlatformStrategies object being reset.  This prevents that, too.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        Added an assertion that we have a network session when we have just made a NetworkingContext with the given SessionID.
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):
        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
        Call NetworkProcess::singleton only when we know we are in the network process.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        Tell the WebProcesses about the new private session, too.  Sometimes they use the new private session.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::ensurePrivateBrowsingSession):
        (WebKit::WebProcess::destroyPrivateBrowsingSession):
        Removed useless macros that were always true for all WK2 clients.

2016-02-10  Dan Bernstein  <mitz@apple.com>

        [Mac] Stop installing the legacy processes
        https://bugs.webkit.org/show_bug.cgi?id=154062

        Reviewed by Anders Carlsson.

        * Configurations/All.xcconfig: Removed the legacy processes from EXCLUDED_SOURCE_FILE_NAMES
          for iOS, now that they are no longer included in a Copy Files build phase.
        * Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES for OS X as well.
        * WebKit2.xcodeproj/project.pbxproj: Removed the Copy Files build phase that copied the
          processes into the framework in engineering builds. Renamed the “Add current version
          symlinks” script build phase to “Add XPCServices symlink”, and changed it to do just that.

2016-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r196183): [GTK] Broke TestInspector
        https://bugs.webkit.org/show_bug.cgi?id=153945

        Reviewed by Michael Catanzaro.

        When the inspector view is detached and not added to a window,
        which happens when it's closed, the inspector view is destroyed
        because it doesn't have a parent anymore. When the inspector view
        is destroyed we notify the web process that the inspector was
        closed. Before r196183 this was not a problem, because the call to
        WebInspectorProxy::didClose() from platformDetach() returned early
        because WebInspectorProxy::didClose() had already set
        m_inspectorPage to nullptr. In r196183 m_inspectorPage is set to
        nullptr after platformDetach(), so we end up trying to detach the
        inpector view again. To prevent this cycle, we should disconnect
        the destroyed signal handler from the inspector view when
        platformDetach() is called from WebInspectorProxy::didClose().

        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformDetach):

2016-02-09  Commit Queue  <commit-queue@webkit.org>

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

        This change broke existing API tests on Mac and iOS (Requested
        by ryanhaddad on #webkit).

        Reverted changeset:

        "Add SPI to remove individual user scripts or user style
        sheets"
        https://bugs.webkit.org/show_bug.cgi?id=154046
        http://trac.webkit.org/changeset/196341

2016-02-09  Anders Carlsson  <andersca@apple.com>

        Add SPI to remove individual user scripts or user style sheets
        https://bugs.webkit.org/show_bug.cgi?id=154046
        rdar://problem/23596352

        Reviewed by Sam Weinig.

        * UIProcess/API/Cocoa/WKUserContentController.mm:
        (-[WKUserContentController _removeUserScript:]):
        (-[WKUserContentController _userStyleSheets]):
        (-[WKUserContentController _addUserStyleSheet:]):
        (-[WKUserContentController _removeUserStyleSheet:]):
        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
        (WebKit::WebUserContentControllerProxy::addProcess):
        (WebKit::WebUserContentControllerProxy::removeUserScript):
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
        (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
        * UIProcess/UserContent/WebUserContentControllerProxy.h:
        (WebKit::WebUserContentControllerProxy::userStyleSheets):
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::removeUserScript):
        (WebKit::WebUserContentController::removeUserStyleSheet):
        * WebProcess/UserContent/WebUserContentController.h:
        * WebProcess/UserContent/WebUserContentController.messages.in:

2016-02-07  Gavin Barraclough  <barraclough@apple.com>

        GetValueFunc/PutValueFunc should not take both slotBase and thisValue
        https://bugs.webkit.org/show_bug.cgi?id=154009

        Reviewed by Geoff Garen.

        In JavaScript there are two types of properties - regular value properties, and accessor properties.
        One difference between these is how they are reflected by getOwnPropertyDescriptor, and another is
        what object they operate on in the case of a prototype access. If you access a value property of a
        prototype object it return a value pertinent to the prototype, but in the case of a prototype object
        returning an accessor, then the accessor function is applied to the base object of the access.

        JSC supports special 'custom' properties implemented as a c++ callback, and these custom properties
        can be used to implement either value- or accessor-like behavior. getOwnPropertyDescriptor behavior
        is selected via the CustomAccessor attribute. Value- or accessor-like object selection is current
        supported by passing both the slotBase and the thisValue to the callback,and hoping it uses the
        right one. This is probably inefficient, bug-prone, and leads to crazy like JSBoundSlotBaseFunction.

        Instead, just pass one thisValue to the callback functions, consistent with CustomAccessor.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::getOwnPropertyNames):
        (WebKit::JSNPObject::propertyGetter):
        (WebKit::JSNPObject::methodGetter):
        * WebProcess/Plugins/Netscape/JSNPObject.h:
            - Merged slotBase & thisValue to custom property callbacks.

2016-02-09  Jer Noble  <jer.noble@apple.com>

        [Mac] Exiting fullscreen through the placeholder action leaves window in empty state
        https://bugs.webkit.org/show_bug.cgi?id=152979
        <rdar://problem/24132309>

        Reviewed by Brent Fulgham.

        In r194593, we relaxed the _fullScreenState requirement in -finishedExitFullScreenAnimation: to handle
        the case where the request to exit fullscreen came from outside the process. However, in so doing, we
        allowed -finishedExitFullScreenAnimation: to be called twice, and in so doing, leave the original window
        empty of its WebView.  Tighten up the restriction of _fullScreenState to allow only the "InFullScreen"
        state (to take care of the external exit command) and the "ExitingFullScreen" state, to handle the
        normal teardown path.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

2016-02-04  Jer Noble  <jer.noble@apple.com>

        [Mac] Adopt NSURLSession properties in AVAssetResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=153873

        Reviewed by Eric Carlson.

        Add a WebKit2 preference to control the WebCore isAVFoundationNSURLSessionEnabled()
        setting.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetAVFoundationNSURLSessionEnabled):
        (WKPreferencesGetAVFoundationNSURLSessionEnabled):
        * UIProcess/API/C/WKPreferencesRef.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-02-09  Anders Carlsson  <andersca@apple.com>

        All 32-bit plug-ins should use the XPC service
        https://bugs.webkit.org/show_bug.cgi?id=154036
        rdar://problem/16059483

        Reviewed by Dan Bernstein.
        
        Silverlight expects malloced memory from the tiny zone to be executable. It also expects
        the data segment from its coreclr image to be executable.
        
        Make this possible by:
        
        1. Shimming mach_vm_map, making sure to add the VM_PROT_EXECUTABLE bit to any memory in the tiny zone.
        2. Go through the address space, looking for any existing ranges from the tiny zone and mach_vm_protect them
           to be executable.
        3. Register with dyld so we'll get callbacks whenever a library is bound, look for the coreclr image, and
           mach_vm_protect its __DATA segment to be executable.

        * Platform/spi/Cocoa/DyldSPI.h: Copied from Source/WebKit2/PluginProcess/mac/PluginProcessShim.h.
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::isMallocMemoryTag):
        (WebKit::shouldMapMemoryExecutable):
        (WebKit::initializeShim):
        (WebKit::PluginProcess::platformInitializeProcess):
        * PluginProcess/mac/PluginProcessShim.h:
        * PluginProcess/mac/PluginProcessShim.mm:
        (WebKit::shimMachVMMap):
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):
        (WebKit::shouldUseXPC): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-09  Fujii Hironori  <Hironori.Fujii@jp.sony.com>

        possible buffer overrun in Connection::processMessage of Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
        https://bugs.webkit.org/show_bug.cgi?id=153637

        Reviewed by Carlos Garcia Campos.

        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage): Fix invalid arguments of memmove.

2016-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.11.5.

2016-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitWebView should send crossing events to the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=153740

        Reviewed by Michael Catanzaro.

        We don't currently handle crossing events in the web view
        (enter/leave). That's why if you hover a scrollbar and leave the
        window, the scrollbar is still rendered as hovered.

        * Shared/gtk/WebEventFactory.cpp:
        (WebKit::buttonForEvent): Handle the case of GDK_ENTER_NOTIFY and
        GDK_LEAVE_NOTIFY events.
        (WebKit::WebEventFactory::createWebMouseEvent): Ditto.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseRealize): Add GDK_ENTER_NOTIFY_MASK and
        GDK_LEAVE_NOTIFY_MASK flags to the web view event mask.
        (webkitWebViewBaseCrossingNotifyEvent): Handle enter/leave notify
        events by generating a mouse move event, ensuring the double to
        int conversion will not cause any problem.
        (webkit_web_view_base_class_init): Add an implementation for
        enter_notify_event and leave_notify_event.

2016-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        Infinite loop when processing mouse events synchronously
        https://bugs.webkit.org/show_bug.cgi?id=153995

        Reviewed by Darin Adler.

        This happened with WTR in the GTK+ port after landing patch in bug
        #153740. The thing is that WTR forces events handling IPC messages
        to be synchronous. When a drag and drop operation is in progress,
        the web process ignores mouse move events and replies with
        DidReceiveEvent signal. The DidReceiveEvent message handler in
        WebPageProxy checks if we have a m_nextMouseMoveEvent and handles
        it, but when all this happens synchronously the
        m_nextMouseMoveEvent is the current one because we haven't
        returned yet from handleMouseEvent(). We need to invalidate the
        m_nextMouseMoveEvent before calling handleMouseEvent().

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveEvent):

2016-02-08  Jeremy Jones  <jeremyj@apple.com>

        Remove __weak from WKAirPlayRoutePicker.mm to fix build warning.
        https://bugs.webkit.org/show_bug.cgi?id=153985
        rdar://problem/24485348

        Reviewed by Darin Adler.

        Remove __weak since it is only available when using ARC.

        * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

2016-02-08  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>

        [GTK] Fix crash when creating webview with g_object_new
        https://bugs.webkit.org/show_bug.cgi?id=153989

        Reviewed by Carlos Garcia Campos.

        g_object_new(WEBKIT_TYPE_WEB_VIEW, NULL) crashes webkit
        as _WebKitWebViewBasePrivate constructor requires a mainloop, but
        webkit is only initialized when a context is created (which
        doesn't happen with a direct call to g_object_new).

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

2016-02-08  Commit Queue  <commit-queue@webkit.org>

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

        Caused several crashes in GTK+ bots (Requested by KaL on
        #webkit).

        Reverted changeset:

        "[GTK] WebKitWebView should send crossing events to the
        WebProcess"
        https://bugs.webkit.org/show_bug.cgi?id=153740
        http://trac.webkit.org/changeset/196253

2016-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitWebView should send crossing events to the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=153740

        Reviewed by Michael Catanzaro.

        We don't currently handle crossing events in the web view
        (enter/leave). That's why if you hover a scrollbar and leave the
        window, the scrollbar is still rendered as hovered.

        * Shared/gtk/WebEventFactory.cpp:
        (WebKit::buttonForEvent): Handle the case of GDK_ENTER_NOTIFY and
        GDK_LEAVE_NOTIFY events.
        (WebKit::WebEventFactory::createWebMouseEvent): Ditto.
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseRealize): Add GDK_ENTER_NOTIFY_MASK and
        GDK_LEAVE_NOTIFY_MASK flags to the web view event mask.
        (webkitWebViewBaseCrossingNotifyEvent): Handle enter/leave notify
        events by generating a mouse move event, ensuring the double to
        int conversion will not cause any problem.
        (webkit_web_view_base_class_init): Add an implementation for
        enter_notify_event and leave_notify_event.

2016-02-06  Daniel Bates  <dabates@apple.com>

        Call CFRelease() on SecRequirementRef when no longer needed
        https://bugs.webkit.org/show_bug.cgi?id=153954
        <rdar://problem/24540259>

        Reviewed by Dan Bernstein.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

2016-02-06  Darin Adler  <darin@apple.com>

        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
        https://bugs.webkit.org/show_bug.cgi?id=153905

        Reviewed by Sam Weinig.

        * NetworkProcess/CustomProtocols/CustomProtocolManager.h: Use ASCII case-insensitive hash
        for set of registered schemes.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::getPluginInfoFromPropertyLists): Use convertToASCIILowercase for MIME type and
        for file extensions.

        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
        (WebKit::NetscapePluginModule::parseMIMEDescription): Use convertToASCIILowercase for
        MIME description.

        * UIProcess/API/efl/ewk_context.cpp:
        (ewk_context_preferred_languages_set): Use convertToASCIILowercase for language.

        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_set_preferred_languages): Use convertToASCIILowercase for language.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::findPluginForExtension): Use Vector::contains instead of
        writing it out using std::find.
        (WebKit::pathExtension): Lowercase the result with convertToASCIILowercase instead of
        leaving that to the caller.
        (WebKit::PluginInfoStore::findPlugin): Removed call to lower since pathExtension
        handles that now.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin): Use convertToASCIILowercase for MIME type.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::globalURLSchemesWithCustomProtocolHandlers): Use
        an ASCII case-insensitive hash.
        (WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers):
        Remove lowercasing, since the hash is now ASCII case-insensitive.
        (WebKit::WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
        Ditto.

        * UIProcess/WebProcessPool.h: Use an ASCII case-insensitive hash.

        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::initialize): Use convertToASCIILowercase on parameter names
        and values.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::pluginSupportsExtension): Use convertToASCIILowercase for extension assertion.
        Also use a modern for loop.
        (WebKit::WebFrameLoaderClient::objectContentType): Make the checks for empty MIME types
        a little less redundant. Reordered logic to avoid checking the list of supported MIME
        types extra times, and to eliminate the need for a boolean. Use convertToASCIILowercase
        on the extension.

2016-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix more incorrect ASSERT introduced in r196053.

        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::NetscapePluginX11::handleMouseEvent):
        (WebKit::NetscapePluginX11::handleWheelEvent):
        (WebKit::NetscapePluginX11::setFocus):
        (WebKit::NetscapePluginX11::handleMouseEnterEvent):
        (WebKit::NetscapePluginX11::handleMouseLeaveEvent):
        (WebKit::NetscapePluginX11::handleKeyboardEvent):

2016-02-05  Timothy Hatcher  <timothy@apple.com>

        Web Inspector: Error when closing page with WebInspector open
        https://bugs.webkit.org/show_bug.cgi?id=152867
        rdar://problem/24099423

        Reviewed by Brian Burg.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::didClose): Null out m_inspectorPage after platformDetach(),
        so the views can be cleaned up correctly.

2016-02-05  Alex Christensen  <achristensen@webkit.org>

        Move NetworkDataTask to its own header and source files
        https://bugs.webkit.org/show_bug.cgi?id=153922

        Reviewed by Tim Horton.

        Also renamed NetworkSessionTaskClient to NetworkDataTaskClient.

        * NetworkProcess/NetworkDataTask.h: Added.
        (WebKit::NetworkDataTaskClient::~NetworkDataTaskClient):
        (WebKit::NetworkDataTask::create):
        (WebKit::NetworkDataTask::client):
        (WebKit::NetworkDataTask::pendingDownloadID):
        (WebKit::NetworkDataTask::pendingDownload):
        (WebKit::NetworkDataTask::setPendingDownloadID):
        (WebKit::NetworkDataTask::setPendingDownload):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient): Deleted.
        (WebKit::NetworkDataTask::create): Deleted.
        (WebKit::NetworkDataTask::client): Deleted.
        (WebKit::NetworkDataTask::pendingDownloadID): Deleted.
        (WebKit::NetworkDataTask::pendingDownload): Deleted.
        (WebKit::NetworkDataTask::setPendingDownloadID): Deleted.
        (WebKit::NetworkDataTask::setPendingDownload): Deleted.
        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Added.
        (WebKit::NetworkDataTask::NetworkDataTask):
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::scheduleFailure):
        (WebKit::NetworkDataTask::failureTimerFired):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        (WebKit::NetworkDataTask::cancel):
        (WebKit::NetworkDataTask::resume):
        (WebKit::NetworkDataTask::suspend):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::takeDownloadID):
        (WebKit::NetworkDataTask::NetworkDataTask): Deleted.
        (WebKit::NetworkDataTask::~NetworkDataTask): Deleted.
        (WebKit::NetworkDataTask::scheduleFailure): Deleted.
        (WebKit::NetworkDataTask::failureTimerFired): Deleted.
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication): Deleted.
        (WebKit::NetworkDataTask::cancel): Deleted.
        (WebKit::NetworkDataTask::resume): Deleted.
        (WebKit::NetworkDataTask::suspend): Deleted.
        * WebKit2.xcodeproj/project.pbxproj:

2016-02-05  Alex Christensen  <achristensen@webkit.org>

        Clean up Blob code
        https://bugs.webkit.org/show_bug.cgi?id=153910

        Reviewed by Alexey Proskuryakov.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::NetworkBlobRegistry):
        (WebKit::NetworkBlobRegistry::registerFileBlobURL):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerFileBlobURL):
        * WebProcess/FileAPI/BlobRegistryProxy.h:

2016-02-05  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Get rid of unused SPI declarations
        https://bugs.webkit.org/show_bug.cgi?id=153915

        Reviewed by Tim Horton.

        * Platform/spi/Cocoa/NSInvocationSPI.h: Removed NSInvocation SPI method declaration.

        * Platform/spi/ios/SafariServicesSPI.h: Removed.

        * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
        (-[WKSecurityOrigin methodSignatureForSelector:]): Deleted.
        (-[WKSecurityOrigin forwardInvocation:]): Deleted.

        * UIProcess/ios/WKContentViewInteraction.mm: Removed unused #import.

        * WebKit2.xcodeproj/project.pbxproj: Removed reference to deleted header.

2016-02-04  Daniel Bates  <dabates@apple.com>

        WebKit for iOS Simulator fails to build with public iOS SDK
        https://bugs.webkit.org/show_bug.cgi?id=153881

        Reviewed by Alex Christensen.

        Add version guards around SPI that is now API as of iOS SDK 9.2. Until we upgrade the iOS EWS
        and iOS buildbots to use the 9.2 SDK we need to keep these SPI declarations to avoid breaking
        the build.

        * Platform/spi/ios/UIKitSPI.h:

2016-02-04  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Give nested inspectors their own process pool
        https://bugs.webkit.org/show_bug.cgi?id=153880
        <rdar://problem/24508310>

        Reviewed by Timothy Hatcher.

        When inspecting the inspector both inspectors were using the same
        Inspector process and sharing the same VM. This meant that profiling
        information was confusing (memory and JavaScript sampling) because
        it was showing data about both inspectors sharing the same process.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::inspectorProcessPool):
        (WebKit::WebInspectorProxy::isInspectorProcessPool):
        Have two process pools. The main inspector process pool (1st level inspectors)
        and a nested inspector process pool (inspecting the inspector, only expected
        by WebKit developers).

        * UIProcess/WebInspectorProxy.h:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Pass the inspectionLevel to determine the appropriate pool to use.

2016-02-04  Csaba Osztrogonác  <ossy@webkit.org>

        Fix the !ENABLE(NETSCAPE_PLUGIN_API) build after r196053
        https://bugs.webkit.org/show_bug.cgi?id=153878

        Unreviewed buildfix.

        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h:

2016-02-04  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r196067.

        Re-enable speculative revalidation now that we have measured
        the impact on the perf bots

        Reverted changeset:

        "Unreviewed, rolling out r195555."
        https://bugs.webkit.org/show_bug.cgi?id=153443
        http://trac.webkit.org/changeset/196067

2016-02-03  Alex Christensen  <achristensen@webkit.org>

        Report wasBlocked and cannotShowURL errors when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=153846

        Reviewed by Antti Koivisto.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        (WebKit::NetworkLoad::didSendData):
        (WebKit::NetworkLoad::wasBlocked):
        (WebKit::NetworkLoad::cannotShowURL):
        (WebKit::NetworkLoad::didReceiveResponseAsync):
        * NetworkProcess/NetworkLoad.h:
        NetworkDataTask is now RefCounted so we can protect it when reporting errors which delete the NetworkLoad.
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
        (WebKit::NetworkDataTask::create):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::takeDownloadID):
        (WebKit::NetworkDataTask::NetworkDataTask):
        Check the validity of the requested url and check if the port is allowed like we do in the ResourceHandle constructor.
        (WebKit::NetworkDataTask::~NetworkDataTask):
        Don't remove the task from the NetworkSession's map if we didn't make it because there was an error.
        (WebKit::NetworkDataTask::scheduleFailure):
        (WebKit::NetworkDataTask::failureTimerFired):
        Implemented like ResourceHandle's.
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        (WebKit::NetworkDataTask::resume):
        (WebKit::NetworkDataTask::suspend):
        Handle the failure timer like we do in ResourceHandle::setDefersLoading.

2016-02-02  Alex Christensen  <achristensen@webkit.org>

        Use proposed credentials in authentication challenges with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=153811

        Reviewed by Darin Adler.

        This fixes http/tests/xmlhttprequest/basic-auth-default.html

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        Use the proposed credential if there is one.  This matches behavior in
        ResourceHandle::tryHandlePasswordBasedAuthentication.

2016-02-03  Jessie Berlin  <jberlin@webkit.org>

        Build fix.

        [NSEvent context] has always returned nil. Replace uses with nullptr.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):

2016-02-03  Dan Bernstein  <mitz@apple.com>

        [iOS] Engineering builds use manual sandboxing, but don’t need to
        https://bugs.webkit.org/show_bug.cgi?id=153834

        Reviewed by Anders Carlsson.

        Now that engineering builds use the non-re-execing variant of XPC services, they can be
        statically sandboxed and no longer need to be manually sandboxed.

        * Configurations/DebugRelease.xcconfig: Don’t set WK_MANUAL_SANDBOXING_ENABLED to YES.
        * WebKit2.xcodeproj/project.pbxproj: Let Xcode make changes to the built product references.

2016-02-03  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r195555.

        Temporarily disable speculative revalidation to measure the
        impact on the bots

        Reverted changeset:

        "[WK2][NetworkCache] Enable speculative revalidation"
        https://bugs.webkit.org/show_bug.cgi?id=153443
        http://trac.webkit.org/changeset/195555

2016-02-03  Daniel Bates  <dabates@apple.com>

        REGRESSION (r194660): Legacy WebProcess crashes in ChildProcess::initializeSandbox()
        https://bugs.webkit.org/show_bug.cgi?id=153734
        <rdar://problem/24433179>

        Reviewed by Dan Bernstein.

        Fixes an issue where clients that used the legacy WebProcess bootstrapping process would crash.

        Additionally, only consider the extra initialization parameter user-directory-suffix for
        unsigned apps (e.g. WebKitTestRunner).

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

2016-02-03  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed speculative buildfix after r195979.

        * PlatformMac.cmake:

2016-02-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Reduce IPC traffic due to view state changes
        https://bugs.webkit.org/show_bug.cgi?id=153745

        Reviewed by Sergio Villar Senin.

        Very often view state changes happen one after another in a very
        short period of time, even in the same run loop iteration. For
        example, when you switch to the web view window, the view is
        focused and the active window flag changes as well. In that case
        we are sending two messages to the web process and the page
        updates its status according to the new flags in two steps. So, we
        could group all state changes happening in the same run loop
        iteration and notify about them all in the next iteration. This
        also prevents unnecessary changes of state when we quickly go back
        to a previous state, for example in focus follows mouse
        configurations if you move the mouse outside the window and then
        inside the window again quickly.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate): Use
        VirewState::Flags to keep the web view state instead of
        boolean, and also to keep the flags that need to be updated. Use a
        timer to update web view state flags.
        (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Call
        WebPageProxy::viewStateDidChange() and reset the flags that need
        to be updated.
        (webkitWebViewBaseScheduleUpdateViewState): Update the flags that
        need to be updated and schedule the timer if it's not active.
        (toplevelWindowFocusInEvent): Use the flags and schedule an update.
        (toplevelWindowFocusOutEvent): Ditto.
        (toplevelWindowStateEvent): Also mark the view as hidden when minimized.
        (webkitWebViewBaseSetToplevelOnScreenWindow): Connect to
        window-state-event instead of deprecated visibility-notify-event.
        (webkitWebViewBaseMap): Use the flags and schedule an update.
        (webkitWebViewBaseUnmap): Ditto.
        (webkitWebViewBaseSetFocus): Ditto.
        (webkitWebViewBaseIsInWindowActive): Use the flags.
        (webkitWebViewBaseIsFocused): Ditto
        (webkitWebViewBaseIsVisible): Ditto.
        (webkitWebViewBaseIsInWindow): Removed this since it was unused.
        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

2016-02-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix incorrect ASSERT introduced in r196053.

        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::NetscapePluginX11::paint): Ensure the plugin is not
        windowed if paint() is called.

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

        [UNIX] Add support for windowless NPAPI plugins with no UI in non X11 platforms
        https://bugs.webkit.org/show_bug.cgi?id=151992

        Reviewed by Darin Adler.

        We are currently disabling all plugins when running under wayland,
        for example. There are some plugins, like the one used by
        extensions.gnome.org, that don't do any rendering, so there's not
        reason not to support those plugins under wayland or any other
        unix non-x11 platform.
        X11 specific code has been moved to a new class NetscapePluginX11,
        only used under X11. The common code is in NetscapePluginUnix.cpp
        that will use the X11 implementatin only when needed and
        available. For windowed plugins we will fail the initialization
        under non-X11 plaforms, while for windowless plugins we will just
        return early from paint method.

        * PlatformEfl.cmake: Add new files to compilation.
        * PlatformGTK.cmake: Ditto.
        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webkit_settings_set_enable_plugins): Do not disable plugins in wayland.
        * UIProcess/gtk/WebPreferencesGtk.cpp:
        (WebKit::WebPreferences::platformInitializeStore): Ditto.
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue): Use PlatformDisplay instead of
        NetscapePlugin::x11HostDisplay() and don't claim to support X11
        specific features under non-x11 platforms.
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::NetscapePlugin): Remove X11 and GTK
        specific memebers that are now moved to a dedicated class NetscapePluginX11.
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        (WebKit::NetscapePlugin::frameRectInWindowCoordinates): Make this public.
        (WebKit::NetscapePlugin::clipRect): Add getter.
        (WebKit::NetscapePlugin::size): Ditto.
        (WebKit::NetscapePlugin::isWindowed): Ditto.
        (WebKit::NetscapePlugin::isVisible): Ditto.
        * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp: Added.
        (WebKit::NetscapePlugin::platformPreInitialize):
        (WebKit::NetscapePlugin::platformPostInitialize):
        (WebKit::NetscapePlugin::platformDestroy):
        (WebKit::NetscapePlugin::platformInvalidate):
        (WebKit::NetscapePlugin::platformGeometryDidChange):
        (WebKit::NetscapePlugin::platformVisibilityDidChange):
        (WebKit::NetscapePlugin::platformPaint):
        (WebKit::NetscapePlugin::platformHandleMouseEvent):
        (WebKit::NetscapePlugin::platformHandleWheelEvent):
        (WebKit::NetscapePlugin::platformSetFocus):
        (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
        (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
        * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.h: Added.
        (WebKit::NetscapePluginUnix::~NetscapePluginUnix):
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::getPluginDisplay):
        (WebKit::displayDepth):
        (WebKit::x11HostDisplay):
        (WebKit::NetscapePluginX11::create):
        (WebKit::NetscapePluginX11::NetscapePluginX11):
        (WebKit::NetscapePluginX11::~NetscapePluginX11):
        (WebKit::NetscapePluginX11::windowType):
        (WebKit::NetscapePluginX11::window):
        (WebKit::NetscapePluginX11::geometryDidChange):
        (WebKit::NetscapePluginX11::visibilityDidChange):
        (WebKit::NetscapePluginX11::paint):
        (WebKit::initializeXEvent):
        (WebKit::NetscapePluginX11::handleMouseEvent):
        (WebKit::NetscapePluginX11::handleWheelEvent):
        (WebKit::NetscapePluginX11::setFocus):
        (WebKit::NetscapePluginX11::handleMouseEnterEvent):
        (WebKit::NetscapePluginX11::handleMouseLeaveEvent):
        (WebKit::NetscapePluginX11::handleKeyboardEvent):
        (WebKit::setCommonMouseEventFields): Deleted.
        (WebKit::setXKeyEventFields): Deleted.
        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h: Added.

2016-02-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Remove ENABLE(GLOBAL_FASTMALLOC_NEW) guard in WebMemorySamplerLinux.cpp
        https://bugs.webkit.org/show_bug.cgi?id=153812

        Reviewed by Darin Adler.

        r164261 already removed ENABLE_GLOBAL_FASTMALLOC_NEW guard though, WebMemorySamplerLinux
        is still using it. That's why EFL and GTK memory sampler don't show fast malloc memory use.

        * Shared/linux/WebMemorySamplerLinux.cpp:
        (WebKit::WebMemorySampler::sampleWebKit): Deleted.

2016-02-02  Enrica Casucci  <enrica@apple.com>

        Provide handleKeyWebEvent with completion handler.
        https://bugs.webkit.org/show_bug.cgi?id=153806
        rdar://problem/24399218

        Reviewed by Tim Horton.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
        (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):

2016-02-02  Alex Christensen  <achristensen@webkit.org>

        Fix authentication with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=153779

        Reviewed by Brady Eidson.

        This fixes many tests, including http/tests/xmlhttprequest/cross-origin-authorization.html.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        NetworkingContexts are not used with NetworkSession.  NetworkSession is used instead.
        Pass allowStoredCredentials to the NetworkLoad so it knows whether to use a session with credential storage or not.
        (WebKit::NetworkLoad::didReceiveChallenge):
        Always call continueCanAuthenticateAgainstProtectionSpace because we might need credentials for synchronous requests.
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        Reject the protection space if we cannot authenticate against this protection space.
        If the protection space is not password-based (such as ServerTrustEvaluationRequested) and we can authenticate against this protection space,
        then perform default handling instead of asking the UI process for a password, which wouldn't mean anything.
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        Use a NSURLSession with configuration.URLCredentialStorage = nil but with the same cookie storage for requests without credentials.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::NetworkSession):
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkSession::takeDownloadID):
        (WebKit::NetworkDataTask::NetworkDataTask):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
        Always send a reply message so we can always do the callbacks of NSURLSession delegates.

2016-02-01  Dave Hyatt  <hyatt@apple.com>

        Add a line grid pagination SPI to WebKit.
        https://bugs.webkit.org/show_bug.cgi?id=153757
        <rdar://problem/23041598>

        Reviewed by Anders Carlsson.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPaginationLineGridEnabled):
        (WKPageGetPaginationLineGridEnabled):
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
        (-[WKBrowsingContextController setPaginationLineGridEnabled:]):
        (-[WKBrowsingContextController paginationLineGridEnabled]):
        * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _paginationLineGridEnabled]):
        (-[WKWebView _setPaginationLineGridEnabled:]):
       * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::setPaginationLineGridEnabled):
        (WebKit::WebPageProxy::creationParameters):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::paginationLineGridEnabled):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setPaginationLineGridEnabled):
         WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2016-02-02  Adrien Plazas  <aplazas@igalia.com>

        [GTK] Several tests fail due to assert not reached in DrawingArea::dispatchAfterEnsuringDrawing()
        https://bugs.webkit.org/show_bug.cgi?id=153785

        Reviewed by Carlos Garcia Campos.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
        * UIProcess/DrawingAreaProxyImpl.h:

2016-02-01  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: High Level Memory Overview Instrument
        https://bugs.webkit.org/show_bug.cgi?id=153516
        <rdar://problem/24356378>

        Reviewed by Brian Burg.

        * Configurations/FeatureDefines.xcconfig:

2016-02-01  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build.

        * PlatformMac.cmake:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        More iOS build fix.

        * Platform/spi/ios/UIKitSPI.h:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        iOS build fix.

        * Platform/IPC/mac/ConnectionMac.mm:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        Copy sandbox profiles during installhdrs.

        Reviewed by Anders Carlsson.

        * Configurations/SandboxProfiles.xcconfig:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Remove some more __has_include guards
        https://bugs.webkit.org/show_bug.cgi?id=153774

        Reviewed by Tim Horton.

        Guard private header includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.

        * Platform/IPC/mac/ConnectionMac.mm:
        * Platform/IPC/mac/ImportanceAssertion.h:
        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
        * Shared/cf/ArgumentCodersCF.cpp:
        * Shared/mac/ChildProcessMac.mm:
        * Shared/mac/SecItemShim.cpp:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        [Xcode] Let Xcode know that the WebKit XPC service products are XPC services
        https://bugs.webkit.org/show_bug.cgi?id=153773

        Reviewed by Tim Horton.

        * Configurations/BaseXPCService.xcconfig: Removed now-redundant definitions of
          MACH_O_TYPE and WRAPPER_EXTENSION.
        * WebKit2.xcodeproj/project.pbxproj: Updated product types.

2016-02-01  Tim Horton  <timothy_horton@apple.com>

        Crash using WKPDFView, in -[UIPDFPageView showContent]
        https://bugs.webkit.org/show_bug.cgi?id=153770
        <rdar://problem/20157864>

        Reviewed by Anders Carlsson.

        When scrolling, we throw away UIPDFPageViews, but forget to unhook their delegates.
        In some cases (also because their delegate is a raw pointer, not weak), they can call
        back into a deleted WKPDFView, causing a crash.

        * UIProcess/ios/WKPDFView.mm:
        (detachViewForPage):
        Add a helper to detach a page view, and unhook its delegates.

        (-[WKPDFView _clearPages]):
        (-[WKPDFView _revalidateViews]):
        Make use of the new helper.

2016-02-01  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
        https://bugs.webkit.org/show_bug.cgi?id=153754

        Reviewed by Darin Adler.

        * Platform/spi/ios/UIKitSPI.h: Removed conditional forward declaration of SPI.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (photoLibraryIcon): Removed check for HAVE_WEBKIT_DOC_PICKER_ICONS, which is always true in
          iOS 9 and later.
        (cameraIcon): Ditto.
        (-[WKFileUploadPanel presentWithParameters:resultListener:]): Removed branch for when
          UIDocumentMenuViewController doesn’t respond to
          -_initIgnoringApplicationEntitlementForImportOfTypes:.
        (-[WKFileUploadPanel _showMediaSourceSelectionSheet]): Deleted now-unused method.

2016-02-01  Anders Carlsson  <andersca@apple.com>

        Stop linking to PassKit
        https://bugs.webkit.org/show_bug.cgi?id=153746

        Reviewed by Tim Horton.

        * Configurations/WebKit.xcconfig:

2016-02-01  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Get rid of WK_ macros for initializers
        https://bugs.webkit.org/show_bug.cgi?id=153744

        Reviewed by Anders Carlsson.

        * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_DESIGNATED_INITIALIZER and
          WK_UNAVAILABLE.

        * mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
          removed Foundation import that became unnecessary, and definitions that were only needed
          before iOS 8.

        Replaced instances of the above macros with their expansions.

        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
        * UIProcess/API/Cocoa/WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:

2016-02-01  Csaba Osztrogonác  <ossy@webkit.org>

        One more unreviewed speculative buildfix after r195755.

        * PlatformMac.cmake:

2016-02-01  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed speculative buildfix after r195755.

        * PlatformMac.cmake:

2016-02-01  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed speculative buildfix after r195795.

        * PlatformMac.cmake: Remove Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm.

2016-01-31  Darin Adler  <darin@apple.com>

        Get rid of most calls to String::upper; mostly replace them with convertToASCIIUppercase
        https://bugs.webkit.org/show_bug.cgi?id=153715

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
        Use convertToASCIIUppercase on language names.

2016-01-31  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Remove __has_include guards around use of WebKitAdditions
        https://bugs.webkit.org/show_bug.cgi?id=153728

        Reviewed by Andy Estes.

        Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.

        * Shared/Cocoa/WebKitAdditions.mm:
        * Shared/WebCoreArgumentCoders.h:
        * Shared/mac/RemoteLayerBackingStore.mm:
        * UIProcess/API/Cocoa/WKWebView.mm:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::resetState):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):

2016-01-31  Timothy Horton  <timothy_horton@apple.com>

        Include the right WebKitAdditions files
        <rdar://problem/24429804>

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::resetState):

2016-01-31  Darin Adler  <darin@apple.com>

        Replace CaseFoldingHash with ASCIICaseInsensitiveHash
        https://bugs.webkit.org/show_bug.cgi?id=153639

        Reviewed by Filip Pizlo.

        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Use ASCIICaseInsensitiveHash
        for MIME types. MIME types are all ASCII.

        * UIProcess/Plugins/PlugInAutoStartProvider.h: Use ASCIICaseInsensitiveHash for
        origins. Origin strings should use ASCII case insensitive matching and should not
        fold non-ASCII case.

        * WebProcess/WebPage/WebPage.h: Use ASCIICaseInsensitiveHash for MIME types.
        MIME types are all ASCII.

        * WebProcess/WebProcess.cpp:
        (WebKit::addCaseFoldedCharacters): Use ASCIICaseInsensitiveHash to hash plug-in
        origin strings. (See rationale above.)
        (WebKit::hashForPlugInOrigin): Updated comment.

2016-01-31  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Use std::make_unique<> when creating an unique_ptr object.
        https://bugs.webkit.org/show_bug.cgi?id=153705

        Reviewed by Darin Adler.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy): Use std::make_unique<> instead of RunLoopObserver::create().

2016-01-30  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Get rid of many WK_ macros for nullability
        https://bugs.webkit.org/show_bug.cgi?id=153718

        Sam Weinig reviewed an earlier version of this change, and Simon Fraser rubber-stamped this version.

        * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
          WK_NULLABLE, WK_NULL_UNSPECIFIED, and WK_NULLABLE_PROPERTY. Removed the
          !__has_feature(assume_nonnull) case.

        * mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
          chanegd to rewrite WK_NULLABLE_SPECIFIER to the modern _Nullable instead of __nullable.

        Replaced instances of the above macros with their expansions.

        * UIProcess/API/Cocoa/WKBackForwardList.h:
        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
        * UIProcess/API/Cocoa/WKError.h:
        * UIProcess/API/Cocoa/WKFrameInfo.h:
        * UIProcess/API/Cocoa/WKNavigationAction.h:
        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKNavigationResponse.h:
        * UIProcess/API/Cocoa/WKScriptMessage.h:
        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
        * UIProcess/API/Cocoa/WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKUserScript.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWindowFeatures.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKElementInfo.h:
        * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:

2016-01-30  Dan Bernstein  <mitz@apple.com>

        Reverted r195914, because at least one of the build.webkit.org builders still uses a compiler that doesn’t understand _Nullable.

        * Shared/API/Cocoa/WKFoundation.h:
        * UIProcess/API/Cocoa/WKBackForwardList.h:
        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
        * UIProcess/API/Cocoa/WKError.h:
        * UIProcess/API/Cocoa/WKFrameInfo.h:
        * UIProcess/API/Cocoa/WKNavigationAction.h:
        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKNavigationResponse.h:
        * UIProcess/API/Cocoa/WKScriptMessage.h:
        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
        * UIProcess/API/Cocoa/WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKUserScript.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWindowFeatures.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKElementInfo.h:
        * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
        * mac/postprocess-framework-headers.sh:

2016-01-30  Commit Queue  <commit-queue@webkit.org>

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

        Caused frequent assertion failures on bots (Requested by ap on
        #webkit).

        Reverted changeset:

        "Replace CaseFoldingHash with ASCIICaseInsensitiveHash"
        https://bugs.webkit.org/show_bug.cgi?id=153639
        http://trac.webkit.org/changeset/195911

2016-01-30  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Get rid of WK_ macros for nullability
        https://bugs.webkit.org/show_bug.cgi?id=153718

        Reviewed by Sam Weinig.

        * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
          WK_NULLABLE, WK_NULL_UNSPECIFIED, WK_NULLABLE_SPECIFIER, and WK_NULLABLE_PROPERTY.

        * mac/postprocess-framework-headers.sh: Removed rules for rewriting those macros.

        Replaced instances of those macros with their expansions, but using the modern _Nullable
        instead of __nullable:

        * UIProcess/API/Cocoa/WKBackForwardList.h:
        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
        * UIProcess/API/Cocoa/WKError.h:
        * UIProcess/API/Cocoa/WKFrameInfo.h:
        * UIProcess/API/Cocoa/WKNavigationAction.h:
        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
        * UIProcess/API/Cocoa/WKNavigationResponse.h:
        * UIProcess/API/Cocoa/WKScriptMessage.h:
        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
        * UIProcess/API/Cocoa/WKSecurityOrigin.h:
        * UIProcess/API/Cocoa/WKUIDelegate.h:
        * UIProcess/API/Cocoa/WKUserContentController.h:
        * UIProcess/API/Cocoa/WKUserScript.h:
        * UIProcess/API/Cocoa/WKWebView.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
        * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
        * UIProcess/API/Cocoa/WKWindowFeatures.h:
        * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
        * UIProcess/API/Cocoa/_WKElementInfo.h:
        * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:

2016-01-30  Darin Adler  <darin@apple.com>

        Replace CaseFoldingHash with ASCIICaseInsensitiveHash
        https://bugs.webkit.org/show_bug.cgi?id=153639

        Reviewed by Filip Pizlo.

        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Use ASCIICaseInsensitiveHash
        for MIME types. MIME types are all ASCII.

        * UIProcess/Plugins/PlugInAutoStartProvider.h: Use ASCIICaseInsensitiveHash for
        origins. Origin strings should use ASCII case insensitive matching and should not
        fold non-ASCII case.

        * WebProcess/WebPage/WebPage.h: Use ASCIICaseInsensitiveHash for MIME types.
        MIME types are all ASCII.

        * WebProcess/WebProcess.cpp:
        (WebKit::addCaseFoldedCharacters): Use ASCIICaseInsensitiveHash to hash plug-in
        origin strings. (See rationale above.)
        (WebKit::hashForPlugInOrigin): Updated comment.

2016-01-30  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        [GTK] Use configured python executable when executing generate-inspector-gresource-manifest.py
        https://bugs.webkit.org/show_bug.cgi?id=153712

        Reviewed by Michael Catanzaro.

        * PlatformGTK.cmake:

2016-01-29  Ada Chan  <adachan@apple.com>

        Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
        https://bugs.webkit.org/show_bug.cgi?id=153665

        Reviewed by Dan Bernstein.

        * Configurations/FeatureDefines.xcconfig:

2016-01-29  Dan Bernstein  <mitz@apple.com>

        Don’t use the “.Development” suffix for engineering builds targeting iOS devices, because the XPC cache is only aware of the unsuffixed service identifiers.

        Reviewed by Chris Dumez.

        * Configurations/DebugRelease.xcconfig:

2016-01-29  Enrica Casucci  <enrica@apple.com>

        One more iOS build fix.

        Unreviewed.

        * Platform/spi/ios/UIKitSPI.h:

2016-01-29  Enrica Casucci  <enrica@apple.com>

        iOS build fix after r195826.

        Unreviewed.

        * Platform/spi/ios/UIKitSPI.h:

2016-01-29  Enrica Casucci  <enrica@apple.com>

        Disable text interaction with pencil.
        https://bugs.webkit.org/show_bug.cgi?id=153655
        rdar://problem/24337778

        Reviewed by Tim Horton.

        * Platform/spi/ios/UIKitSPI.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):
        (-[WKContentView _singleTapCommited:]):

2016-01-29  Mario Sanchez Prada  <mario@endlessm.com>

        [GTK] WebProcess crashes when quickly attempting many DnD operations
        https://bugs.webkit.org/show_bug.cgi?id=138468

        Reviewed by Michael Catanzaro.

        Guard all the new DnD-related code under GTK_CHECK_VERSION #if's to
        make sure we don't bump the required version of GTK+ up to 3.16, and
        it's buildable again with GTK+ >= 3.6.

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

2016-01-28  Antti Koivisto  <antti@apple.com>

        Enable background tab suspension by default on OSX
        https://bugs.webkit.org/show_bug.cgi?id=153629
        <rdar://problem/24402895>

        Reviewed by Andreas Kling.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::registerUserDefaultsIfNeeded):

2016-01-28  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Use the non-Development variants of XPC services for development
        https://bugs.webkit.org/show_bug.cgi?id=152545

        Reviewed by Darin Adler.

        The purpose of the Development variants of the WebKit XPC services is to allow the service
        to link against the development WebKit dylibs rather than the system ones. Instead, we
        accomplish this here by including dyld environment load commands in the normal services
        when the WebKit dylibs are expected to be relocated. A new build setting,
        WK_RELOCATABLE_FRAMEWORKS, controls this.

        To make it easy to identify engineering builds of the services at runtime, they can be
        given a distinctive suffix. A new build setting, WK_XPC_SERVICE_SUFFIX, controls this.

        * Configurations/DebugRelease.xcconfig: Set WK_RELOCATABLE_FRAMEWORKS to YES and
          WK_XPC_SERVICE_SUFFIX to ".Development".

        * Configurations/BaseTarget.xcconfig: Make the quoted value of the WK_XPC_SERVICE_SUFFIX
          build setting available as a preprocessor macro.

        * Configurations/BaseXPCService.xcconfig:
          - Simplify the definition of INSTALL_PATH now that there are no Development variants.
          - Define WK_RELOCATABLE_FRAMEWORKS_LDFLAGS when building relocatable frameworks to include
            -dyld_env options setting DYLD_FRAMEWORK_PATH to point to the directory containing
            WebKit.framework and DYLD_LIBRARY_PATH to the framework’€™s Frameworks subdirectory. When
            not building relocatable frameworks, define WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to include
            a -headerpad option allowing dyld environment load commands to be added after the fact.
          - Add WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to OTHER_LDFLAGS.
          - Define WK_XPC_SERVICE_INSERT_LIBRARIES_DIR when building relocatable frameworks to be
            the path to the Frameworks subdirectory of the WebKit framework containing the service.
            When not building relocatable frameworks, define it to the absolute path of the
            Frameworks subdirectory of the installed WebKit framework.

        * Configurations/DatabaseService.xcconfig: Append WK_XPC_SERVICE_SUFFIX to PRODUCT_NAME,
          and remove no-longer-used definition of WK_XPC_SERVICE_VARIANT.
        * Configurations/NetworkService.xcconfig: Append WK_XPC_SERVICE_SUFFIX to PRODUCT_NAME, add
          WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to OTHER_LDFLAGS, and remove no-longer-used definition
          of WK_XPC_SERVICE_VARIANT.
        * Configurations/PluginService.32.xcconfig: Ditto.
        * Configurations/PluginService.64.xcconfig: Ditto.
        * Configurations/WebContentService.xcconfig: Ditto.

        * Configurations/DatabaseService.Development.xcconfig: Removed.
        * Configurations/NetworkService.Development.xcconfig: Removed.
        * Configurations/PluginService.32.Development.xcconfig: Removed.
        * Configurations/PluginService.64.Development.xcconfig: Removed.
        * Configurations/WebContentService.Development.xcconfig: Removed.

        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development: Removed.
        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist: Removed.
        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Set
          CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Removed.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist: Removed.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist: Removed.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Set
          CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix. Use
          WK_XPC_SERVICE_INSERT_LIBRARIES_DIR in the value of DYLD_INSERT_LIBRARIES.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Set
          CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.

        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development: Removed.
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: Removed.

        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development: Removed.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist: Removed.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Removed.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Set
          CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix. Use
          WK_XPC_SERVICE_INSERT_LIBRARIES_DIR in the value of DYLD_INSERT_LIBRARIES.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Set
          CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: Removed.

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
        (WebKit::XPCServiceEventHandler): If stdout and stderr file descriptors are included in the
          bootstrap message, hook them up to the service’s stdout and stderr, like the Development
          services do.
        (main): Moved code from XPCServiceMain.Development.mm to handle the optional
          OverrideLanguages array.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::addDYLDEnvironmentAdditions): Addressed a FIXME.
        (WebKit::serviceName): Removed forDevelopment argument and .Development service names.
          Added WK_XPC_SERVICE_SUFFIX to the names.
        (WebKit::connectToService): Updated for removal of forDevelopment argument. Removed
          "framework-executable-path" key from the bootstrap message, because it was only used in
          the Development variants.
        (WebKit::connectToReExecService): Deleted.
        (WebKit::createService): Removed call to connectToReExecService. Instead pass forDevelopment
          to connectToService.

        * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files. Removed targets
          for Development services. Removed Development services from script build phase that copies
          services into the framework in engineering builds, and made it respect
          WK_XPC_SERVICE_SUFFIX.

2016-01-28  Enrica Casucci  <enrica@apple.com>

        Should avoid navigation for some data detector urls.
        https://bugs.webkit.org/show_bug.cgi?id=153600

        Reviewed by Tim Horton.

        When a tap is commited, we normally generate a synthetic click if
        the node responds to click events.
        This patch adds the logic to prevent that from happening if the node
        is a data detector link with certain characteristics (calendar event, telephone, etc.).
        If this is the case, we compute the interaction information as position, send it
        over to the UI process and notify that we did not handle the tap.
        The page client is now also notified of this event and can show the data detector sheet if
        appropriate.

        * UIProcess/PageClient.h:
        * UIProcess/ios/PageClientImplIOS.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::toolTipChanged):
        (WebKit::PageClientImpl::didNotHandleTapAsClick):
        (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView clearSelection]):
        (-[WKContentView _didNotHandleTapAsClick:]):
        (-[WKContentView _positionInformationDidChange:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::didNotHandleTapAsClick):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::commitPotentialTap):

2016-01-28  Brent Fulgham  <bfulgham@apple.com>

        [iOS] Update Web Process sandbox profile for audiodeviceclock access
        https://bugs.webkit.org/show_bug.cgi?id=153571
        <rdar://problem/24134612>

        Reviewed by Alexey Proskuryakov.

        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

2016-01-26  Ada Chan  <adachan@apple.com>

        Get WebVideoFullscreenManager and related classes to also compile for Mac platform
        with video presentation mode support.
        https://bugs.webkit.org/show_bug.cgi?id=153221

        Reviewed by Eric Carlson.

        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
        Enabled also for Mac with video presentation mode support.
        (-[WKLayerHostView makeBackingLayer]):
        Make sure this view uses CALayerHost for its layer.
        (WebKit::WebVideoFullscreenManagerProxy::invalidate):
        (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
        (WebKit::WebVideoFullscreenManagerProxy::ensureInterface):
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
        Replace WebCore::WebVideoFullscreenInterfaceAVKit with PlatformWebVideoFullscreenInterface.
        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
        +[UIWindow _synchronizeDrawingAcrossProcesses] is not available on Mac.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::viewDidLeaveWindow):
        (WebKit::WebPageProxy::resetState):
        * UIProcess/WebPageProxy.h:
        The code that creates m_videoFullscreenManager is now enabled also on Mac with video
        presentation mode support.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        Enable the API related to the video fullscreen layer also on Mac with video presentation
        mode support.

        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/WebPage.h:
        The code that creates m_videoFullscreenManager is now enabled also on Mac with video
        presentation mode support.

        * WebProcess/cocoa/WebVideoFullscreenManager.h:
        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
        Enabled also for Mac with video presentation mode support.
        (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):
        Return false for now on Mac.

2016-01-28  Darin Adler  <darin@apple.com>

        Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase
        https://bugs.webkit.org/show_bug.cgi?id=153411

        Reviewed by Ryosuke Niwa.

        * Shared/API/c/WKString.cpp:
        (WKStringIsEqualToUTF8CStringIgnoringCase): Use equalIgnoringASCIICase.
        This is a change in behavior for callers who passed non-ASCII letters to
        this function and expected case insensitive comparison.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::streamDidReceiveResponse): Use equalIgnoringASCIICase.
        No change in behavior because this is just checking a fixed ASCII MIME type.
        (WebKit::PDFPlugin::manualStreamDidReceiveResponse): Ditto.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::streamDidReceiveResponse): Ditto.
        (WebKit::PDFPlugin::manualStreamDidReceiveResponse): Ditto.

2016-01-27  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build after r195722.

        * PlatformMac.cmake:
        Include new file.

2016-01-27  Dan Bernstein  <mitz@apple.com>

        Fix other builds.

        * Configurations/WebKit.xcconfig:

2016-01-27  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * Configurations/WebKit.xcconfig:

2016-01-27  Krzysztof Czech  <k.czech@samsung.com>

        [EFL] Remove unused accessibility related code
        https://bugs.webkit.org/show_bug.cgi?id=153543

        Reviewed by Darin Adler.

        Do not need to load external library to expose WebKit's
        accessibility tree. There have been changes in EFL/Elementary
        in terms of support of accessibility and we should follow those.

        * WebProcess/efl/WebProcessMainEfl.cpp:
        (eailLibraryPath): Deleted.
        (eail): Deleted.

2016-01-27  Enrica Casucci  <enrica@apple.com>

        Cache results of data detection in the UI process when load completes.
        https://bugs.webkit.org/show_bug.cgi?id=153560

        Reviewed by Tim Horton.

        This patch changes when the results of data detections are sent to the
        UIProcess. Before this change, they were only provided as part of
        InteractionInformationAtPosition, which is populated when long press
        gesture is triggered.
        We need to have the results available if the client wants to allow navigation
        to a data detector link, in order to allow them to retrieve the full url.
        With this change, we now send the results as soon as they are computed
        and keep them in the WebPageProxy object so that they can be fetched when
        necessary from a WKWebView private interface.

        * Shared/Cocoa/DataDetectionResult.h: Added.
        * Shared/Cocoa/DataDetectionResult.mm: Added.
        (WebKit::DataDetectionResult::encode):
        (WebKit::DataDetectionResult::decode):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
        (-[WKWebView _dataDetectionResults]):
        (-[WKWebView _didRelaunchProcess]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
        (WebKit::WebPageProxy::setDataDetectionResult):
        (WebKit::WebPageProxy::saveRecentSearches):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::websiteDataStore):
        (WebKit::WebPageProxy::dataDetectionResults):
        (WebKit::WebPageProxy::scrollingCoordinatorProxy):
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView ensurePositionInformationIsUpToDate:]):
        (-[WKContentView _dataDetectionResults]):
        (-[WKContentView gestureRecognizerShouldBegin:]):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishDataDetection):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        (WebKit::WebPage::setDataDetectionResults):
        (WebKit::WebPage::willCommitLayerTree):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):

2016-01-27  Anders Carlsson  <andersca@apple.com>

        Include the right WebKitAdditions files
        https://bugs.webkit.org/show_bug.cgi?id=153572

        Reviewed by Tim Horton.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):

2016-01-27  Daniel Bates  <dabates@apple.com>

        Move ContentSecurityPolicy.{cpp, h} to its own directory
        https://bugs.webkit.org/show_bug.cgi?id=153527
        <rdar://problem/24359892>

        Reviewed by Sam Weinig.

        Add ${WEBCORE_DIR}/page/csp to the list of WebKit2 include directories.

        * CMakeLists.txt:

2016-01-27  Anders Carlsson  <andersca@apple.com>

        Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
        https://bugs.webkit.org/show_bug.cgi?id=153550

        Reviewed by Sam Weinig.

        * DerivedSources.make:
        Add the ability for WebKitAdditions to add new message receivers.

        * Shared/Cocoa/WebKitAdditions.mm: Added.
        Add addition files.

        * Shared/WebCoreArgumentCoders.h:
        Add extension points.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::reattachToWebProcess):
        (WebKit::WebPageProxy::resetState):
        Add extension points.

        * UIProcess/WebPageProxy.h:
        Add extension points.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/WebPage/WebPage.cpp:
        Add extension points.

2016-01-27  Chris Dumez  <cdumez@apple.com>

        window.atob() should ignore spaces in input
        https://bugs.webkit.org/show_bug.cgi?id=153522
        <rdar://problem/24357822>

        Reviewed by Benjamin Poulain.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformSave):

2016-01-27  Ryosuke Niwa  <rniwa@webkit.org>

        Add API to access closed shadowRoot in InjectedBundle
        https://bugs.webkit.org/show_bug.cgi?id=153533

        Reviewed by Antti Koivisto.

        Added WKBundleScriptWorldMakeAllShadowRootsOpen to make all shadow roots open.
        This is needed to keep supporting certain browser-level features such as autofill.

        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
        (WKBundleScriptWorldMakeAllShadowRootsOpen): Added.
        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
        (WebKit::InjectedBundleScriptWorld::makeAllShadowRootsOpen): Added.
        * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:

2016-01-27  Zhuo Li  <zachli@apple.com>

        Need ability to specify alternate image for AutoFill button in input fields.
        https://bugs.webkit.org/show_bug.cgi?id=153116.
        rdar://problem/23384854.

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (toAutoFillButtonType): Convert the WebKit AutoFill button type enum to WebCore AutoFill button
        type enum.
        (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabledWithButtonType): Added to be able to specify
        what the AutoFill button type is. None means the AutoFill button is not shown.
        (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled): Deprecate this method.
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Declare an AutoFill button type enum.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled): None means the AutoFill button is not enabled.
        (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabledWithButtonType): Use the new parameter to specify
        what the AutoFill button type is.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.

2016-01-27  Dan Bernstein  <mitz@apple.com>

        More trying to fix the build.

        * Configurations/WebKit.xcconfig:

2016-01-27  Alexey Proskuryakov  <ap@apple.com>

        Remove ENABLE_CURRENTSRC
        https://bugs.webkit.org/show_bug.cgi?id=153545

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:

2016-01-27  Sam Weinig  <sam@webkit.org>

        Try to fix the build.

        * Configurations/WebKit.xcconfig:

2016-01-26  Sam Weinig  <sam@webkit.org>

        Attempt to force a rebuild.

        * DerivedSources.make:

2016-01-26  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r194557): Keyboard shortcuts stop working after the WKWebView is unparented and reparented
        https://bugs.webkit.org/show_bug.cgi?id=153492
        <rdar://problem/24138989>

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView canBecomeFirstResponder]):
        (-[WKContentView becomeFirstResponder]):
        (-[WKContentView resignFirstResponder]):
        When WKWebView is unparented, WKContentView will attempt to resignFirstResponder upwards,
        first asking WKWebView. After r194557, WKWebView will accept first responder and forward
        it on to the WKContentView, which will happily accept it again, despite being the view
        that's trying to resign. This will cause us to completely lose first responder,
        where it was actually supposed to propagate up above WKWebView to the client.

        Keep track of when WKContentView is resigning first responder, and don't
        let it become first responder while it is doing so, breaking the cycle.

        * UIProcess/ios/WKContentView.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView canBecomeFirstResponder]):
        If the WKContentView is currently in the process of resigning first responder status,
        we shouldn't accept it, because clients expect to receive it.

2016-01-26  I-Ting Liu  <iting_liu@apple.com>

        Implement wildcard matching for plug-in policy host.
        https://bugs.webkit.org/show_bug.cgi?id=153090

        Reviewed by Darin Adler.

        WebPlatformStrategies decides the plug-in load policy for a host by looking
        for a matched hostname in the list of plug-in policies sent by Safari. This
        patch adds support for wildcard matching -- if there's a policy with hostname
        "*.example.com," the policy for "foo.example.com" would be replaced with that
        of "*.example.com" if there's no policy for this hostname. If there is more
        than one wildcard hostname, the host with the longest wildcard hostname will
        be used.

        This patch adds a helper function in StringUtilites that matches a string to
        another string, which may contain wildcard ('*') characters.

        * Platform/mac/StringUtilities.h:
        - Add WebKit::stringMatchesWildcardString.
        - Remove #if ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC) flag so that
        the compiler allows exposing StringUtilities.h.
        - Add #if __OBJC__ to allow the file to be included in WebPltformStrategies.cpp

        * Platform/mac/StringUtilities.mm:
        (WebKit::stringMatchesWildcardString):
        Return true if the entire first given String matches the second. The second string 
        may contain wildcard characters.
        (WebKit::wildcardRegexPatternString):
        Return the regex expression from a wildcard string by replacing the wildcard
        character ('*') with (".*") and escaping regular expression metacharacters.
        (WebKit::formattedPhoneNumberString):
        To expose StringUtilities.h for tests, we removed #if ENABLE(TELEPHONE_NUMBER_DETECTION)
        && PLATFORM(MAC) flag in the header. Add a function that returns nil for
        #if !(ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC)) to fix the removal
        of the flag in the header file.

        * WebKit2.xcodeproj/project.pbxproj:
        Change the file attribute of StringUtilities.h from Project to Private for
        testing in TestWebKitAPI.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
        Return the wildcard hostname whose matched substring with the host is the longest.
        (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
        Replace the look-up host with a matched wildcard host if there is a match and that
        the matched wildcard host's plug-in identifier is the same as that of the host.
        (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
        Try to replace the look-up host with the wildcard host if there's no policy for
        the host. Restructure the function to reduce hashmap lookup.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
        Declare the methods.

2016-01-26  Anders Carlsson  <andersca@apple.com>

        Remove -d flag from make invocation.

        * WebKit2.xcodeproj/project.pbxproj:

2016-01-26  Joseph Pecoraro  <pecoraro@apple.com>

        Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
        https://bugs.webkit.org/show_bug.cgi?id=153509
        <rdar://problem/24354291>

        Reviewed by Andreas Kling.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        Rename the ENABLE flag.

2016-01-26  Commit Queue  <commit-queue@webkit.org>

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

        broke more than it fixed (Requested by thorton on #webkit).

        Reverted changeset:

        "REGRESSION (r194557): Keyboard shortcuts stop working after
        the WKWebView is unparented and reparented"
        https://bugs.webkit.org/show_bug.cgi?id=153492
        http://trac.webkit.org/changeset/195602

2016-01-26  Anders Carlsson  <andersca@apple.com>

        WebKitAdditions should be able to modify derived source rules
        https://bugs.webkit.org/show_bug.cgi?id=153514

        Reviewed by Tim Horton.

        * Configurations/BaseTarget.xcconfig:
        * Configurations/WebKit.xcconfig:
        Set WEBKITADDITIONS_HEADER_SEARCH_PATHS.

        * DerivedSources.make:
        Move the path computation earlier and include WebKitDerivedSourcesAdditions.make.

        * WebKit2.xcodeproj/project.pbxproj:
        Pass our WebKitAdditions paths as include paths to make.

2016-01-26  Anders Carlsson  <andersca@apple.com>

        Add a private WKUIDelegate method for getting a presenting view controller for a WKWebView on iOS
        https://bugs.webkit.org/show_bug.cgi?id=153510

        Reviewed by Dan Bernstein.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::presentingViewController):
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/Cocoa/UIDelegate.h:
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::setDelegate):
        (WebKit::UIDelegate::UIClient::presentingViewController):

2016-01-26  Dean Jackson  <dino@apple.com>

        [iOS] Documents without an explicit width should not get fast tapping
        https://bugs.webkit.org/show_bug.cgi?id=153465
        <rdar://problem/23962529>

        Reviewed by Simon Fraser (and Wenson Hseih).

        As the title says, documents that do not set a viewport should
        not get the fast click behaviour. There were complaints that we broke
        double-tap to scroll in ImageDocuments where the image was narrow and long.

        The fix is to just keep a flag that tells the UI process if the
        width was explicit. However, it turns out that those ImageDocuments
        are given an explicit device-width, which is fine for scaling but
        really should behave as auto for fast tapping. So we also need
        to tell the UIProcess if the viewport arguments came from an
        ImageDocument.

        * Shared/mac/RemoteLayerTreeTransaction.h: Add two new flags into
        the transaction.
        (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidthWasExplicit):
        (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidthWasExplicit):
        (WebKit::RemoteLayerTreeTransaction::viewportMetaTagCameFromImageDocument):
        (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagCameFromImageDocument):
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::encode):
        (WebKit::RemoteLayerTreeTransaction::decode):
        (WebKit::RemoteLayerTreeTransaction::description):

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _didCommitLayerTree:]): Notice whether or not the viewport
        width was explicit.
        (-[WKWebView _allowsDoubleTapGestures]): Return yes if the width
        was not explicit, or if the viewport came from an ImageDocument.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::willCommitLayerTree):

2016-01-26  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r194557): Keyboard shortcuts stop working after the WKWebView is unparented and reparented
        https://bugs.webkit.org/show_bug.cgi?id=153492
        <rdar://problem/24138989>

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.h:
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView canBecomeFirstResponder]):
        (-[WKContentView becomeFirstResponder]):
        (-[WKContentView resignFirstResponder]):
        When WKWebView is unparented, WKContentView will attempt to resignFirstResponder upwards,
        first asking WKWebView. After r194557, WKWebView will accept first responder and forward
        it on to the WKContentView, which will happily accept it again, despite being the view
        that's trying to resign. This will cause us to completely lose first responder,
        where it was actually supposed to propagate up above WKWebView to the client.

        Keep track of when WKContentView is resigning first responder, and don't
        let it become first responder while it is doing so, breaking the cycle.

2016-01-25  Ada Chan  <adachan@apple.com>

        Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
        https://bugs.webkit.org/show_bug.cgi?id=153473

        Reviewed by Eric Carlson.

        * DerivedSources.make:
        Add new paths.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in.
        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm.
        (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
        Fix a style error by moving the opening curly brace to the same line as the for statement.
        * WebKit2.xcodeproj/project.pbxproj:
        Update due to changes to the file locations.
        * WebProcess/cocoa/WebVideoFullscreenManager.h: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h.
        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.messages.in.
        * WebProcess/cocoa/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm.
        (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
        Fix a style error by adding a missing space after a comma.

2016-01-26  Daniel Bates  <dabates@apple.com>

        WebKitTestRunner: Credential cache is not cleared between tests
        https://bugs.webkit.org/show_bug.cgi?id=153407
        <rdar://problem/24280834>

        Reviewed by Alexey Proskuryakov.

        Expose SPI to call CredentialStorage::clearCredentials() on the default network storage
        session to clear cached credentials.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::clearCachedCredentials): Added.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in: Added message ClearCachedCredentials().
        * UIProcess/API/C/WKContext.cpp:
        (WKContextClearCachedCredentials): Added.
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::clearCachedCredentials): Notify all web processes and the
        network process to clear cached credentials.
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::clearCachedCredentials): Clear cached credentials in the default
        network storage session.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in: Added message ClearCachedCredentials().

2016-01-26  Mario Sanchez Prada  <mario@endlessm.com>

        [GTK] WebProcess crashes when quickly attempting many DnD operations
        https://bugs.webkit.org/show_bug.cgi?id=138468

        Reviewed by Michael Catanzaro.

        Do not allow different DnD operations over the same element at the
        same time, so that any new attempt to DnD an element happening before
        a previous attempt has ended will take precedence, cancelling the older
        operation before going ahead with the new one.

        This is consistent with how WebCore::EventHandler handles DnD operations,
        preventing the web process from crashing in scenarios where the user might
        try to perform many DnD operations over the same element very quickly.

        * UIProcess/gtk/DragAndDropHandler.cpp:
        (WebKit::DragAndDropHandler::DragAndDropHandler): Initialized new member.
        (WebKit::DragAndDropHandler::startDrag): Ensure a previous DnD operation
        is cancelled before handling the new one that has just started.
        (WebKit::DragAndDropHandler::fillDragData): Protect against calling this
        function from webkitWebViewBaseDragDataGet for already cancelled operations.
        (WebKit::DragAndDropHandler::finishDrag): Protect against calling this
        function from webkitWebViewBaseDragEnd for already cancelled operations.
        * UIProcess/gtk/DragAndDropHandler.h:

2016-01-25  Enrica Casucci  <enrica@apple.com>

        Add support for DataDetectors in WK (iOS).
        https://bugs.webkit.org/show_bug.cgi?id=152989
        rdar://problem/22855960

        Reviewed by Tim Horton.

        Moving InteractionInformationAtPosition files to platform folder,
        since this is only used on iOS and changing from .cpp to .mm.
        The structure is extended to include data detection specific fields
        and the relevant encode/decode functions have been updated to
        handle the new fields.
        The patch also adds a new WKUIDelegatePrivate method to allow
        the client to provide additional context for data detection actions.

        * Platform/spi/ios/UIKitSPI.h:
        * Shared/InteractionInformationAtPosition.cpp: Removed.
        * Shared/InteractionInformationAtPosition.h: Removed.
        * Shared/ios/InteractionInformationAtPosition.h: Copied from Shared/InteractionInformationAtPosition.h.
        * Shared/ios/InteractionInformationAtPosition.mm: Copied from Shared/InteractionInformationAtPosition.cpp.
        (WebKit::InteractionInformationAtPosition::encode):
        (WebKit::InteractionInformationAtPosition::decode):
        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
        * UIProcess/WebPageProxy.h:
        * UIProcess/ios/WKActionSheetAssistant.h:
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showDataDetectorsSheet]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView actionSheetAssistantDidStopInteraction:]):
        (-[WKContentView dataDetectionContextForActionSheetAssistant:]):
        (-[WKContentView selectedTextForActionSheetAssistant:]):
        (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::getPositionInformation):

2016-01-25  Commit Queue  <commit-queue@webkit.org>

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

        regressed performance of test bots by ~6% (Requested by dydz
        on #webkit).

        Reverted changeset:

        "WebKitTestRunner: Credential cache is not cleared between
        tests"
        https://bugs.webkit.org/show_bug.cgi?id=153407
        http://trac.webkit.org/changeset/195543

2016-01-25  Chris Dumez  <cdumez@apple.com>

        [WK2][NetworkCache] Enable speculative revalidation
        https://bugs.webkit.org/show_bug.cgi?id=153443
        <rdar://problem/23092196>

        Reviewed by Antti Koivisto.

        Enable speculative revalidation to better evaluate performance and
        robustness.

        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::registerUserDefaultsIfNeeded):

2016-01-25  Beth Dakin  <bdakin@apple.com>

        Handle soft spaces after accepted candidates
        https://bugs.webkit.org/show_bug.cgi?id=153331
        -and corresponding-
        rdar://problem/23958418

        Reviewed by Darin Adler.

        New member variable m_softSpaceRange keeps track to the NSRange of a soft 
        space if the last text that was inserted has a soft space at the end.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::WebViewImpl):

        The space at the end of candidates is a soft space. If that space exists, 
        cache the range of the space in m_softSpaceRange.
        (WebKit::WebViewImpl::handleAcceptedCandidate):

        When new text is inserted, find out if it is being inserted right after a 
        soft space. If it is, then [NSSpellChecker deletesAutospaceBeforeString] will 
        tell us if the space needs to be removed. If that is the case, then set the 
        replacementString to the soft space.
        (WebKit::WebViewImpl::insertText):

2016-01-25  Daniel Bates  <dabates@apple.com>

        WebKitTestRunner: Credential cache is not cleared between tests
        https://bugs.webkit.org/show_bug.cgi?id=153407
        <rdar://problem/24280834>

        Reviewed by Brady Eidson.

        Add SPI to call NetworkStorageSession::switchToNewTestingSession() to create a new testing session.
        The new testing session will have an empty credential cache.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::switchToNewTestingSession): Added.
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in: Added message SwitchToNewTestingSession().
        * UIProcess/API/C/WKContext.cpp:
        (WKContextResetTestingNetworkSession): Added.
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::resetTestingNetworkSession): Added.
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::switchToNewTestingSession): Added.
        * WebProcess/WebProcess.h:
        * WebProcess/WebProcess.messages.in: Added message SwitchToNewTestingSession().

2016-01-22  Ryosuke Niwa  <rniwa@webkit.org>

        document.createElement should be able to create a custom element
        https://bugs.webkit.org/show_bug.cgi?id=153173

        Reviewed by Darin Adler.

        Use createElementForBindings here since this is for SPI.

        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
        (-[WKDOMDocument createElement:]):
        (-[WKDOMDocument createTextNode:]):

2016-01-24  Alex Christensen  <achristensen@webkit.org>

        Report upload progress to NetworkLoadClient when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=153388

        Reviewed by Darin Adler.

        This fixes http/tests/xmlhttprequest/upload-onload-event.html and a few other tests.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didBecomeDownload):
        (WebKit::NetworkLoad::didSendData):
        (WebKit::NetworkLoad::didReceiveResponseAsync):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate initWithNetworkSession:]):
        (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

2016-01-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        Reduce PassRefPtr uses in dom - 4
        https://bugs.webkit.org/show_bug.cgi?id=153270

        Reviewed by Darin Adler.

        As a step to remove PassRefPtr uses, this patch reduces the uses in WebCore/dom.

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

2016-01-23  Alex Christensen  <achristensen@webkit.org>

        CMake build fix after r195494.

        * PlatformMac.cmake:
        WebKit2 needs to be able to find DataDetectors.h.

2016-01-23  Alex Christensen  <achristensen@webkit.org>

        Use credentials from a URL with NetworkSession like we did with ResourceHandle
        https://bugs.webkit.org/show_bug.cgi?id=153328

        Reviewed by Alexey Proskuryakov.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        createDataTaskWithRequest is being removed, so use std::make_unique<NetworkDataTask> directly instead.
        Also, create the task even if we are deferring loading.  Don't call resume if we are deferring loading.
        * NetworkProcess/NetworkSession.h:
        Callbacks are not just used in NetworkSessionTaskClient, so declare them outside.
        The NetworkDataTask now takes a ResourceRequest so we can strip its credentials.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        Try credentials stored with the NetworkDataTask before asking the client for credentials.
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkSession::takeDownloadID):
        (WebKit::NetworkDataTask::NetworkDataTask):
        Strip the credentials from the url before creating the task because we do not know the authentication type.
        We will use these credentials when a challenge is received.
        (WebKit::NetworkDataTask::~NetworkDataTask):
        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
        If we have credentials from the initial URL, try using them if it is appropriate.
        (WebKit::NetworkDataTask::cancel):
        (WebKit::NetworkSession::createDataTaskWithRequest): Deleted.
        * Shared/Authentication/AuthenticationManager.h:

2016-01-22  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/24304228> REGRESSION (r184215): Staged XPC services load non-staged shims
        https://bugs.webkit.org/show_bug.cgi?id=153389

        Reviewed by Alexey Proskuryakov.

        * Configurations/Shim.xcconfig: Don’t override the install name when using a staged install path.

2016-01-22  Enrica Casucci  <enrica@apple.com>

        Add support for DataDetectors in WK (iOS).
        https://bugs.webkit.org/show_bug.cgi?id=152989
        rdar://problem/22855960

        Reviewed by Tim Horton.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (fromWKDataDetectorTypes): Changed parameter to uint64_t to
        successfully compare against WKDataDetectorTypeAll.

2016-01-17  Ada Chan  <adachan@apple.com>

        Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
        https://bugs.webkit.org/show_bug.cgi?id=153220

        Reviewed by Eric Carlson.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::supportsVideoFullscreen):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2016-01-22  Tim Horton  <timothy_horton@apple.com>

        Reproducible "Unhanded web process message 'WebUserContentController:AddUserScripts'" and friends
        https://bugs.webkit.org/show_bug.cgi?id=153193
        <rdar://problem/24222034>

        Reviewed by Darin Adler.

        The WebPageProxy constructor assumes that if its WebProcess is already running,
        it can add itself to the existing WebUserContentController(Proxy) and all will be well.

        However, if the API client constructs a different WKUserContentController for two views,
        and forces them both into the same process, WebPageProxy's constructor sends a message
        with a WebUserContentController ID that doesn't exist yet on the WebProcess side
        (because createWebPage, which usually brings it up, hasn't happened yet), and we 
        drop the message on the floor (and get the aforementioned logging).

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::initializeWebPageAfterProcessLaunch):
        Instead of connecting our WebUserContentControllerProxy and WebVisitedLinkStoreProxy
        to our WebProcessProxy in the constructor, when doing so might send messages
        to the WebProcess that arrive before their corresponding WebProcess objects have
        been created, do this in initializeWebPageAfterProcessLaunch, which always runs
        during-or-after inititalizeWebPage (and always after the CreateWebPage message goes out).

        (WebKit::WebPageProxy::initializeWebPage):
        Mark us as needing initializeWebPageAfterProcessLaunch run, and run it right now
        if the WebProcess is already up.
        (WebKit::WebPageProxy::processDidFinishLaunching):
        If the WebProcess wasn't up at the end of initializeWebPage, we'll eventually end up here
        after it is launched, and will initializeWebPageAfterProcessLaunch.

        (WebKit::WebPageProxy::resetStateAfterProcessExited):
        If the WebProcess dies, we don't want to initializeWebPageAfterProcessLaunch
        until after initializeWebPage runs again, so make sure the flag isn't set.

        * UIProcess/WebPageProxy.h:

2016-01-22  Darin Adler  <darin@apple.com>

        Reduce use of equalIgnoringCase to just ignore ASCII case
        https://bugs.webkit.org/show_bug.cgi?id=153266

        Reviewed by Ryosuke Niwa.

        * UIProcess/PageLoadState.cpp:
        (WebKit::PageLoadState::hasOnlySecureContent): Use the protocolIs
        function from WebCore instead of calling startsWith.
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::initialize): Use equalLettersIgnoringASCIICase.

2016-01-21  Brent Fulgham  <bfulgham@apple.com>

        [Mac] Tooltips do not honor some types of obscuring windows
        https://bugs.webkit.org/show_bug.cgi?id=153263
        <rdar://problem/21423972>

        Reviewed by Simon Fraser.

        Recognize that the current WebView is obscured by comparing the current event's Window Number against
        the Window Number of the current WebView. If they don't match, something is in the way.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::windowIsFrontWindowUnderMouse): Added.
        * UIProcess/PageClient.h:
        (WebKit::PageClient::windowIsFrontWindowUnderMouse):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::handleMouseEvent): Check if the current WebView is obscured. If it
        is, clear the tooltip and return.
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::windowIsFrontWindowUnderMouse): Added.

2016-01-22  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        Remove PassRefPtr from ResourceRequest and FormData
        https://bugs.webkit.org/show_bug.cgi?id=153229

        Reviewed by Chris Dumez.

        * NetworkProcess/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::decode):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):

2016-01-21  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top
        https://bugs.webkit.org/show_bug.cgi?id=136019

        Reviewed by Dan Bernstein.

        Now call frameView.positionForRootContentLayer(), and add a FIXME questioning the
        behavior in horizontal b-t documents. However, this code isn't hit now that we always
        do extended backgrounds, so never have shadow layers.

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

2016-01-21  Dean Jackson  <dino@apple.com>

        Move _allowsDoubleTapGestures implementation out of category
        https://bugs.webkit.org/show_bug.cgi?id=153329
        <rdar://problem/24289768>

        Reviewed by Simon Fraser.

        We were generating a linker warning because the implementation
        was located inside the WKPrivate category.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _allowsDoubleTapGestures]): Move this out of
        the category.

2016-01-21  Dean Jackson  <dino@apple.com>

        [iOS] Crash in _endPotentialTapAndEnableDoubleTapGesturesIfNecessary
        https://bugs.webkit.org/show_bug.cgi?id=153326
        <rdar://problem/24264339>

        Reviewed by Anders Carlsson.

        UIKit's UIGestureRecognizer could call back into the WKContentView
        after the associated WKWebView has disappeared. The fix is to
        explicitly null the WKWebView reference as we deallocate.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView dealloc]): Tell the WKContentView we are going away.
        * UIProcess/ios/WKContentView.h:
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _webViewDestroyed]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
        Only do something if the WKWebView is still around.

2016-01-21  Beth Dakin  <bdakin@apple.com>

        Add the ability to update WebKitAdditions to WK2
        https://bugs.webkit.org/show_bug.cgi?id=153320
        -and corresponding-
        rdar://problem/23639629

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        * UIProcess/API/mac/WKView.mm:
        * UIProcess/Cocoa/WebViewImpl.h:
        (WebKit::WebViewImpl::createWeakPtr):
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::updateWebViewImplAdditions):
        (WebKit::WebViewImpl::showCandidates):
        (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
        (WebKit::trackingAreaOptions):
        (WebKit::WebViewImpl::~WebViewImpl):
        (WebKit::WebViewImpl::becomeFirstResponder):
        (WebKit::WebViewImpl::selectionDidChange):
        (WebKit::WebViewImpl::handleRequestedCandidates):
        (WebKit::textCheckingResultFromNSTextCheckingResult):

2016-01-19  Ada Chan  <adachan@apple.com>

        Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
        https://bugs.webkit.org/show_bug.cgi?id=153218

        Reviewed by Eric Carlson.

        * Configurations/FeatureDefines.xcconfig:

2016-01-20  Alex Christensen  <achristensen@webkit.org>

        Fix CMake build after r195300.

        * PlatformMac.cmake:
        Include editing/mac to find DataDetection.h.

2016-01-20  Alex Christensen  <achristensen@webkit.org>

        Ask UI Process before sending redirect requests when downloading
        https://bugs.webkit.org/show_bug.cgi?id=153041

        Reviewed by Darin Adler.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadManager::continueWillSendRequest):
        (WebKit::DownloadManager::convertHandleToDownload):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::willSendRedirectedRequest):
        (WebKit::PendingDownload::continueWillSendRequest):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcess::continueWillSendRequest):
        (WebKit::NetworkProcess::setCacheModel):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * UIProcess/API/APIDownloadClient.h:
        (API::DownloadClient::didCancel):
        (API::DownloadClient::processDidCrash):
        (API::DownloadClient::canAuthenticateAgainstProtectionSpace):
        (API::DownloadClient::willSendRequest):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
        (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadProxy::willSendRequest):
        (WebKit::DownloadProxy::didReceiveResponse):
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Downloads/DownloadProxy.messages.in:

2016-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.11.4.

2016-01-19  Enrica Casucci  <enrica@apple.com>

        Add support for DataDetectors in WK (iOS).
        https://bugs.webkit.org/show_bug.cgi?id=152989
        rdar://problem/22855960

        Reviewed by Tim Horton.

        This is the first step toward implementing Data Detectors support
        in WK2. The patch adds a new property to the configuration
        object to indicate the type of detection desired and propagates
        to the WebProcess.

        * Configurations/FeatureDefines.xcconfig:
        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (fromWKDataDetectorTypes):
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-01-19  Commit Queue  <commit-queue@webkit.org>

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

        enrica wants more time to fix Windows (Requested by thorton on
        #webkit).

        Reverted changeset:

        "Add support for DataDetectors in WK (iOS)."
        https://bugs.webkit.org/show_bug.cgi?id=152989
        http://trac.webkit.org/changeset/195300

2016-01-19  Enrica Casucci  <enrica@apple.com>

        Add support for DataDetectors in WK (iOS).
        https://bugs.webkit.org/show_bug.cgi?id=152989
        rdar://problem/22855960

        Reviewed by Tim Horton.

        This is the first step toward implementing Data Detectors support
        in WK2. The patch adds a new property to the configuration
        object to indicate the type of detection desired and propagates
        to the WebProcess.

        * Configurations/FeatureDefines.xcconfig:
        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration copyWithZone:]):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Added.
        (WebKit::WebPage::fromWKDataDetectorTypes):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/WebPage.h:

2016-01-19  Commit Queue  <commit-queue@webkit.org>

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

        purportedly caused a significant memory regression and want to
        see if that is true (Requested by thorton on #webkit).

        Reverted changeset:

        "First in-window viewStateChange synchronously blocks despite
        not previously being in-window"
        https://bugs.webkit.org/show_bug.cgi?id=147344
        http://trac.webkit.org/changeset/187471

2016-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Runtime critical warnings when loading a URL after a session restore
        https://bugs.webkit.org/show_bug.cgi?id=153233

        Reviewed by Michael Catanzaro.

        This happens when doing a normal load after restoring the back
        forward list from session state and the list contained forward
        items. In that case the forward items are removed from the list
        and we try to reference a WebBackForwardListItem wrapper that
        hasn't been created. We create the wrappers on demand, and when
        the back forward list is populated from session state, items are
        added to the list without creating their wrappers. That was not
        possible before, and that's why we assumed that any item that is
        removed from the list should have a wrapper already created.

        * UIProcess/API/gtk/WebKitBackForwardList.cpp:
        (webkitBackForwardListChanged): If we don't have a wrapper for the
        removed item, create a new one to be passed to the signal, but
        without adding it to the map.

2016-01-19  Ryosuke Niwa  <rniwa@webkit.org>

        CharacterData::setData doesn't need ExceptionCode as an out argument
        https://bugs.webkit.org/show_bug.cgi?id=153225

        Reviewed by Antti Koivisto.

        * WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
        (-[WKDOMText setData:]):

2016-01-18  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Remove wkView() from EwkView
        https://bugs.webkit.org/show_bug.cgi?id=152604

        Reviewed by Gyuyoung Kim.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkViewEventHandler<EVAS_CALLBACK_SHOW>::handleEvent):
        (EwkViewEventHandler<EVAS_CALLBACK_HIDE>::handleEvent):
        (EwkView::EwkView):
        (EwkView::create):
        (EwkView::wkPage):
        (EwkView::isVisible):
        (EwkView::setVisible):
        (EwkView::setDeviceScaleFactor):
        (EwkView::deviceSize):
        (EwkView::displayTimerFired):
        (EwkView::setViewportPosition):
        (EwkView::requestExitFullScreen):
        (EwkView::contentsSize):
        (EwkView::setThemePath):
        (EwkView::feedTouchEvent):
        (EwkView::createGLSurface):
        (EwkView::showContextMenu):
        (EwkView::requestPopupMenu):
        (EwkView::webView):
        (EwkView::handleEvasObjectCalculate):
        (EwkView::handleEvasObjectColorSet):
        (EwkView::handleEwkViewFocusIn):
        (EwkView::handleEwkViewFocusOut):
        (EwkView::feedTouchEvents):
        (EwkView::takeSnapshot):
        (EwkView::scrollBy):
        (EwkView::setBackgroundColor):
        (EwkView::backgroundColor):
        * UIProcess/API/efl/EwkView.h:
        (EwkView::wkView): Deleted.
        * UIProcess/API/efl/GestureRecognizer.cpp:
        (WebKit::GestureHandler::handleSingleTap):
        * UIProcess/API/efl/ewk_view.cpp:
        (EWKViewCreate):
        (EWKViewGetWKView):
        (ewk_view_fullscreen_exit):
        (ewk_view_layout_fixed_set):
        (ewk_view_layout_fixed_get):
        (ewk_view_layout_fixed_size_set):
        (ewk_view_layout_fixed_size_get):
        (ewk_view_bg_color_get):
        (ewk_view_contents_size_get):
        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
        (WebKit::PageViewportControllerClientEfl::setPageScaleFactor):
        * UIProcess/efl/ViewClientEfl.cpp:
        (WebKit::ViewClientEfl::webProcessDidRelaunch):
        (WebKit::ViewClientEfl::ViewClientEfl):
        (WebKit::ViewClientEfl::~ViewClientEfl):

2016-01-18  Zan Dobersek  <zdobersek@igalia.com>

        Sink the Vector<uint8_t> buffer into the SerializedScriptValue constructor
        https://bugs.webkit.org/show_bug.cgi?id=142634

        Reviewed by Darin Adler.

        Update API::SerializedScriptValue::adopt() to take in a Vector<uint8_t>
        rvalue, moving it into the WebCore::SerializedScriptValue::adopt() call.

        Update other places that are affected by the SerializedScriptValue changes.

        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
        * Shared/API/APISerializedScriptValue.h:
        (API::SerializedScriptValue::adopt):
        * Shared/UserData.cpp:
        (WebKit::UserData::decode):
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::didPostMessage):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scriptValueCallback):
        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
        (WebKit::applyFrameState):

2016-01-18  Olivier Blin  <olivier.blin@softathome.com>

        [EFL][GTK][WK2] Fix UIProcess build with GStreamer and without VIDEO
        https://bugs.webkit.org/show_bug.cgi?id=153135

        Reviewed by Michael Catanzaro.

        GStreamer builds fail when WebAudio is enabled but VIDEO disabled.

        This change makes the flag more consistent around the
        decicePolicyForInstallMissingMediaPluginsPermissionRequest() method:
        ENABLE(VIDEO) && USE(GSTREAMER) everywhere, while the code used to
        test either one or the other.

        This does not enable InstallMissingMediaPlugins for WebAudio, since no
        code makes use of this in WebKitWebAudioSourceGStreamer.

        It also fixes a naming typo for the following method:
        decidePolicyForInstallMissingMediaPluginsPermissionRequest()

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::decidePolicyForInstallMissingMediaPluginsPermissionRequest):
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/PageClient.h:
        * UIProcess/efl/WebViewEfl.h:
        * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
        (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):

2016-01-17  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        Add quotes around ${CMAKE_SHARED_LINKER_FLAGS} in case it is unset
        https://bugs.webkit.org/show_bug.cgi?id=153175

        Reviewed by Michael Catanzaro.

        * PlatformGTK.cmake:

2016-01-16  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>

        Remove a now-irrelevant darwin build hack
        https://bugs.webkit.org/show_bug.cgi?id=153117

        Reviewed by Michael Catanzaro.

        * PlatformGTK.cmake:

2016-01-16  Jon Honeycutt  <jhoneycutt@apple.com>

        [iOS] Replace deprecated -[UIDocumentMenuViewController
        _setIgnoreApplicationEntitlementForImport:]

        <https://bugs.webkit.org/show_bug.cgi?id=145690>
        <rdar://problem/20636577>

        Reviewed by Brent Fulgham.

        * Platform/spi/ios/UIKitSPI.h:
        Replace deprecated SPI with newer SPI.

        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel presentWithParameters:resultListener:]):
        (-[WKFileUploadPanel _showDocumentPickerMenu]):
        Ditto.

2016-01-16  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Unreviewed. Fix a typo in an API comment.

        * UIProcess/API/gtk/WebKitWebViewSessionState.cpp:

2016-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] GVariant runtime critical errors when encoding session data
        https://bugs.webkit.org/show_bug.cgi?id=153130

        Reviewed by Michael Catanzaro.

        It happens when the FrameState has children, because the recursive
        serialization is wrong. Also fix serialization of
        documentSequenceNumber and itemSequenceNumber that are gint64, not
        guint64.

        * UIProcess/API/gtk/WebKitWebViewSessionState.cpp:
        (encodeFrameState): Let the caller open/init the given
        builder. Use a new builder to encode child states recursively.
        (encodePageState): Do the builder open/close for the FrameState encoding.
        (decodeFrameState): Get the variant of every child.

2016-01-15  Michael Catanzaro  <mcatanzaro@igalia.com>

        Fix internal Windows build
        https://bugs.webkit.org/show_bug.cgi?id=153142

        Unreviewed addition to Alex's JSC patch, which was reviewed by Brent Fulgham. Pass
        -I${JAVASCRIPTCORE_DIR} to g-ir-scanner.

        * PlatformGTK.cmake:

2016-01-14  Simon Fraser  <simon.fraser@apple.com>

        Remove workaround for rdar://problem/23623670
        https://bugs.webkit.org/show_bug.cgi?id=153107
        rdar://problem/23633319

        Reviewed by Tim Horton.

        Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
        back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.

        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::display):

2016-01-14  Beth Dakin  <bdakin@apple.com>

        WK1 and WK2 should share more candidate request code
        https://bugs.webkit.org/show_bug.cgi?id=153108

        Reviewed by Simon Fraser.

        requestCandidatesForSelection() does not need to be exposed as an 
        EditorClient function. WK1 can just call invoke this code from the existing 
        respondToChangedSelection EditorClient function, which is what WK2 does.
        * WebProcess/WebCoreSupport/WebEditorClient.h:

2016-01-14  Beth Dakin  <bdakin@apple.com>

        WK2: Request completion candidates when needed
        https://bugs.webkit.org/show_bug.cgi?id=153040
        -and corresponding-
        rdar://problem/24155631

        Reviewed by Enrica Casucci and Tim Horton.

        Mac needs to support postLayoutData in order to have some layout-related 
        editing information to request candidates. This patch re-shuffles some items 
        in the struct so that they can be shared by Mac and iOS, and it adds 3 new 
        items for Mac only.
        * Shared/EditorState.cpp:
        (WebKit::EditorState::encode):
        (WebKit::EditorState::decode):
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:

        Request and handle candidates here in WebViewImpl, and cache the 
        m_lastStringForCandidateRequest so that we can ensure the results we receive 
        were received in a timely enough manner that they are still for the same 
        String.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::selectionDidChange):

        When selection changes, request new candidates.
        (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):

        Once candidates have been received, we ask the sharedSpellChecker to show 
        them.
        (WebKit::WebViewImpl::handleRequestedCandidates):

        If a candidate is accepted, we ask the WebProcess to accept it, so we start 
        by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
        (WebKit::textCheckingResultFromNSTextCheckingResult):
        (WebKit::WebViewImpl::handleAcceptedCandidate):

        Ask the WebProcess to handle accepting the candidate.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::handleAcceptedCandidate):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage:: handleAcceptedCandidate):
        * WebProcess/WebPage/WebPage.messages.in:

        Now that Mac has some postLayoutData in the EditorState, fill that in in 
        platformEditorState().
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformEditorState):

        Ask WebCore::Editor to handle the accepted candidate.
        (WebKit::WebPage::handleAcceptedCandidate):

2016-01-14  Commit Queue  <commit-queue@webkit.org>

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

        Crashes many/most editing tests (Requested by ap on #webkit).

        Reverted changeset:

        "WK2: Request completion candidates when needed"
        https://bugs.webkit.org/show_bug.cgi?id=153040
        http://trac.webkit.org/changeset/195002

2016-01-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL][GTK][SeccompFilter] Fix build break when enabling --seccomp-filters
        https://bugs.webkit.org/show_bug.cgi?id=153094

        Reviewed by Csaba Osztrogonác.

        diskCacheDirectory and cookiePersistentStoragePath were removed by r192796.
        But SyscallPolicy::addDefaultWebProcessPolicy has added directory permission
        to the removed paths.

        It looks two paths needs to be handled by network process.

        * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
        (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Deleted.

2016-01-13  Alex Christensen  <achristensen@webkit.org>

        Implement custom protocols when using NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=153078

        Reviewed by Andy Estes.

        * NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
        (WebKit::generateCustomProtocolID):
        (+[WKCustomProtocol canInitWithRequest:]):
        (+[WKCustomProtocol canonicalRequestForRequest:]):
        (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
        (-[WKCustomProtocol startLoading]):
        (-[WKCustomProtocol stopLoading]):
        There's no need to have a static pointer when we can use NetworkProcess::singleton to access 
        the process-global CustomProtocolManager, and add null checks because that's a good thing to do.
        (WebKit::CustomProtocolManager::CustomProtocolManager):
        Call UTF8Encoding when creating the CustomProtocolManager on the main thread to make sure it exists
        for when we decode URLS in ResourceResponses from IPC later, which is done on a different WorkQueue.
        (WebKit::CustomProtocolManager::initializeConnection):
        (WebKit::CustomProtocolManager::initialize):
        (WebKit::CustomProtocolManager::removeCustomProtocol):
        (WebKit::CustomProtocolManager::registerProtocolClass):
        (WebKit::CustomProtocolManager::registerScheme):
        * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::NetworkSession):
        Call registerProtocolClass to set configuration.protocolClasses if there is a CustomProtocolManager.

2016-01-13  Beth Dakin  <bdakin@apple.com>

        WK2: Request completion candidates when needed
        https://bugs.webkit.org/show_bug.cgi?id=153040
        -and corresponding-
        rdar://problem/24155631

        Reviewed by Enrica Casucci.

        Mac needs to support postLayoutData in order to have some layout-related 
        editing information to request candidates. This patch re-shuffles some items 
        in the struct so that they can be shared by Mac and iOS, and it adds 3 new 
        items for Mac only.
        * Shared/EditorState.cpp:
        (WebKit::EditorState::encode):
        (WebKit::EditorState::decode):
        (WebKit::EditorState::PostLayoutData::encode):
        (WebKit::EditorState::PostLayoutData::decode):
        * Shared/EditorState.h:

        Request and handle candidates here in WebViewImpl, and cache the 
        m_lastStringForCandidateRequest so that we can ensure the results we receive 
        were received in a timely enough manner that they are still for the same 
        String.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::selectionDidChange):

        When selection changes, request new candidates.
        (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):

        Once candidates have been received, we ask the sharedSpellChecker to show 
        them.
        (WebKit::WebViewImpl::handleRequestedCandidates):

        If a candidate is accepted, we ask the WebProcess to accept it, so we start 
        by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
        (WebKit::textCheckingResultFromNSTextCheckingResult):
        (WebKit::WebViewImpl::handleAcceptedCandidate):

        Ask the WebProcess to handle accepting the candidate.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::handleAcceptedCandidate):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage:: handleAcceptedCandidate):
        * WebProcess/WebPage/WebPage.messages.in:

        Now that Mac has some postLayoutData in the EditorState, fill that in in 
        platformEditorState().
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformEditorState):

        Ask WebCore::Editor to handle the accepted candidate.
        (WebKit::WebPage::handleAcceptedCandidate):

2016-01-12  Geoffrey Garen  <ggaren@apple.com>

        WebKit2 should have an API for eagerly querying whether the web process is responsive
        https://bugs.webkit.org/show_bug.cgi?id=153037

        Reviewed by Tim Horton.

        WebKit2 provides a delegate notification when the web process doesn't
        respond to a message after a while. But there's no way to send a message
        eagerly and check for reply.

        We want this new mechanism so that navigation can terminate the web
        process eagerly if it is hung.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetWebProcessIsResponsive):
        * UIProcess/API/C/WKPagePrivate.h: This is the new API.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::sendWheelEvent): Updated for interface change.

        (WebKit::WebPageProxy::getWebProcessIsResponsive): Calls through to the
        web process proxy. We claim that we are responsive when there is no
        web process because we assume that a fresh web process will not hang.

        * UIProcess/WebPageProxy.h:

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy):
        (WebKit::WebProcessProxy::didBecomeUnresponsive): Keep a flag indicating
        whether the process is unresponsive so that we can fire unresponsiveness
        callbacks immediately for a hung process instead of waiting another 3s.

        (WebKit::WebProcessProxy::didBecomeResponsive): We don't fire responsiveness
        callbacks inside didBecomeResponsive because we assume that a responsive
        web process will invoke didReceiveMainThreadPing -- and we fire the
        callbacks there.

        (WebKit::WebProcessProxy::getIsResponsive): If the web process is already
        known to be unresponsive, fire the callback right away. Otherwise, queue
        it up to fire once we have an answer from a main thread ping.

        (WebKit::WebProcessProxy::didReceiveMainThreadPing): Fire any pending
        callbacks when we learn that the web process is responsive.

        * UIProcess/WebProcessProxy.h:

2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>

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

        * gtk/NEWS: Add release notes for 2.11.3.

2016-01-12  Geoffrey Garen  <ggaren@apple.com>

        WebPageProxy should reattach to the web process before navigating
        https://bugs.webkit.org/show_bug.cgi?id=153026

        Reviewed by Anders Carlsson.

        This fixes a crash (and lots of other corruption) when force-quitting
        the web process during navigation.

        Some objects (like ViewGestureController) use one-time initialization
        to point to a ChildProcessProxy -- and, by design, we destroy them when
        the ChildProcessProxy becomes invalid (i.e., crashes or quits).

        If we navigate *before* creating a new, valid ChildProcessProxy, then
        we accidentally re-create these objects pointing to the old, invalid
        ChildProcessProxy.

        We need to wait until we have a valid ChildProcessProxy before we
        initialize these objects.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reattachToWebProcessWithItem): Navigate after
        reattaching to the web process so that lazily allocated helper objects
        point to the right ChildProcessProxy.

2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>

        Add a build flag for custom element
        https://bugs.webkit.org/show_bug.cgi?id=153005

        Reviewed by Alex Christensen.

        * Configurations/FeatureDefines.xcconfig:

2016-01-12  Alex Christensen  <achristensen@webkit.org>

        Ask for UI Process approval of ProtectionSpace when authenticating downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152999

        Reviewed by Brady Eidson.

        * DerivedSources.make:
        I mistakenly added PendingDownload.messages.in in r194810, but this will not be needed because
        the PendingDownload is not a MessageReceiver.  Rather, the NetworkProcess receives the messages
        and forwards their contents to the PendingDownload through its DownloadManager.
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::dataTaskBecameDownloadTask):
        (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadManager::convertHandleToDownload):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/Downloads/PendingDownload.cpp:
        (WebKit::PendingDownload::continueWillSendRequest):
        (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
        Instead of taking a shortcut I added in r194810, send a message to the UI process and wait for its
        asynchronous reply to determine if we can authenticate against this protection space.
        (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::PendingDownload::didConvertToDownload):
        * NetworkProcess/Downloads/PendingDownload.h:
        * NetworkProcess/Downloads/PendingDownload.messages.in: Removed.
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::cancelDownload):
        (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::NetworkProcess::setCacheModel):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * Shared/Authentication/AuthenticationManager.h:
        * UIProcess/API/APIDownloadClient.h:
        (API::DownloadClient::didFail):
        (API::DownloadClient::didCancel):
        (API::DownloadClient::processDidCrash):
        (API::DownloadClient::canAuthenticateAgainstProtectionSpace):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
        (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
        (WebKit::DownloadProxy::didReceiveResponse):
        * UIProcess/Downloads/DownloadProxy.h:
        * UIProcess/Downloads/DownloadProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:

2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        Move ChildProcessProxy from Shared to UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=125570

        Reviewed by Darin Adler.

        ChildProcessProxy is only used by the UI process.

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * UIProcess/ChildProcessProxy.cpp: Renamed from Source/WebKit2/Shared/ChildProcessProxy.cpp.
        (WebKit::ChildProcessProxy::ChildProcessProxy):
        (WebKit::ChildProcessProxy::~ChildProcessProxy):
        (WebKit::ChildProcessProxy::fromConnection):
        (WebKit::ChildProcessProxy::getLaunchOptions):
        (WebKit::ChildProcessProxy::connect):
        (WebKit::ChildProcessProxy::terminate):
        (WebKit::ChildProcessProxy::state):
        (WebKit::ChildProcessProxy::sendMessage):
        (WebKit::ChildProcessProxy::addMessageReceiver):
        (WebKit::ChildProcessProxy::removeMessageReceiver):
        (WebKit::ChildProcessProxy::dispatchMessage):
        (WebKit::ChildProcessProxy::dispatchSyncMessage):
        (WebKit::ChildProcessProxy::didFinishLaunching):
        (WebKit::ChildProcessProxy::shutDownProcess):
        (WebKit::ChildProcessProxy::connectionWillOpen):
        * UIProcess/ChildProcessProxy.h: Renamed from Source/WebKit2/Shared/ChildProcessProxy.h.
        (WebKit::ChildProcessProxy::connection):
        (WebKit::ChildProcessProxy::processIdentifier):
        (WebKit::ChildProcessProxy::canSendMessage):
        (WebKit::ChildProcessProxy::send):
        (WebKit::ChildProcessProxy::sendSync):
        * WebKit2.xcodeproj/project.pbxproj:

2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] UI process crashes if webkit_web_view_get_tls_info is called before internal load-committed event
        https://bugs.webkit.org/show_bug.cgi?id=142375

        Reviewed by Michael Catanzaro.

        Remove all the hacks to emit delayed load events now that the
        page cache resource load delegates are consistent with all other
        resource loads.

        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkitWebViewLoadChanged):
        (webkitWebViewResourceLoadStarted):
        (webkit_web_view_get_tls_info): Add a g_return_val_if_fail to
        prevent this function from being misused.
        (webkitWebViewDisconnectMainResourceResponseChangedSignalHandler): Deleted.
        (webkitWebViewDispose): Deleted.
        (webkitWebViewEmitLoadChanged): Deleted.
        (webkitWebViewEmitDelayedLoadEvents): Deleted.
        (mainResourceResponseChangedCallback): Deleted.
        (waitForMainResourceResponseIfWaitingForResource): Deleted.

2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r190717): [GTK] Popup menus stop working after being dismissed without selecting an item
        https://bugs.webkit.org/show_bug.cgi?id=152977

        Reviewed by Michael Catanzaro.

        This happens since r190717 when you open a popup menu and without
        selecting any option it's dismissed (press ESC or click somewhere
        else). This is because I removed the code to track when the menu
        is unmapped, thinking that it was no longer necessary. But we need
        to send the DidChangeSelectedIndexForActivePopupMenu to the
        WebProcess with -1 as index to keep the web process in sync.

        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
        (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
        (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
        (WebKit::WebPopupMenuProxyGtk::cancelTracking):
        (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
        (WebKit::WebPopupMenuProxyGtk::dismissMenuTimerFired):
        (WebKit::WebPopupMenuProxyGtk::menuUnmappedCallback):
        * UIProcess/gtk/WebPopupMenuProxyGtk.h:

2016-01-09  Andy Estes  <aestes@apple.com>

        [Cocoa] Add SPI to opt out a URL scheme from the memory cache
        https://bugs.webkit.org/show_bug.cgi?id=152950
        rdar://problem/24066652

        Reviewed by Tim Horton.

        Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
        schemes to SchemeRegistry when initializing a new web process.

        * Shared/API/Cocoa/WKFoundation.h: Added a newline to force re-postprocessing.
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
        (-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):
        * WebProcess/WebProcess.h:

2016-01-11  Anders Carlsson  <andersca@apple.com>

        Get rid of CFMakeCollectable, it is a no-op
        https://bugs.webkit.org/show_bug.cgi?id=152988

        Reviewed by Sam Weinig.

        * Shared/Cocoa/WKNSString.mm:
        * Shared/Cocoa/WKNSURL.mm:
        (-[WKNSURL _web_createTarget]):

2016-01-11  Commit Queue  <commit-queue@webkit.org>

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

        This change broke the mac build (Requested by ryanhaddad on
        #webkit).

        Reverted changeset:

        "[Cocoa] Add SPI to opt out a URL scheme from the memory
        cache"
        https://bugs.webkit.org/show_bug.cgi?id=152950
        http://trac.webkit.org/changeset/194866

2016-01-11  Andy Estes  <aestes@apple.com>

        [Cocoa] Add SPI to opt out a URL scheme from the memory cache
        https://bugs.webkit.org/show_bug.cgi?id=152950
        rdar://problem/24066652

        Reviewed by Tim Horton.

        Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
        schemes to SchemeRegistry when initializing a new web process.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
        (-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::createNewWebProcess):
        * UIProcess/WebProcessPool.h:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):
        * WebProcess/WebProcess.h:

2016-01-11  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build after r194810.

        * PlatformMac.cmake:
        PendingDownload isn't needed until NETWORK_SESSION is used by default.
        I'll figure this out when I make the switch.

2016-01-11  Mario Sanchez Prada  <mario@endlessm.com>

        [WK2][GTK] Propagate motion-notify-event signals from the WebView
        https://bugs.webkit.org/show_bug.cgi?id=152974

        Reviewed by Carlos Garcia Campos.

        Always propagate motion-notify-event signals, regardless of what the
        web process does, so that we can listen for those events (which does
        not act on specific targets inside the webview) from the container
        widget too, and not just from the WebView itself.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseMotionNotifyEvent): Ensure the signal gets propagated.

2016-01-10  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Disable header postprocessing when building for El Capitan
        https://bugs.webkit.org/show_bug.cgi?id=152962

        Reviewed by Anders Carlsson.

        * Configurations/WebKit.xcconfig:

2016-01-09  Dan Bernstein  <mitz@apple.com>

        [Cocoa] Allow overriding the frameworks directory independently of using a staging install path
        https://bugs.webkit.org/show_bug.cgi?id=152926

        Reviewed by Tim Horton.

        Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
        where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
        WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.

        Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.

        * Configurations/BaseTarget.xcconfig:
        - Add quotes to account for spaces.
        - Define WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
          WK_OVERRIDE_FRAMEWORKS_DIR.

        * WebKit2.xcodeproj/project.pbxproj:
        - In the Migrate WebKitLegacy Headers build phase, work around make’s inability to handle
          spaces in paths by creating a symlink to WEBKIT_LEGACY_PRIVATE_HEADERS_DIR under
          BUILT_PRODUCTS_DIR and using the symlink as the value of
          WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
        - In the Postprocess WKBase.h and Postprocess WKFoundation.h build phases, add quotes to
          account for spaces.

        * mac/MigrateHeadersFromWebKitLegacy.make:
          Use a BUILT_PRODUCTS_DIR-based path to the framework instead of a TARGET_BUILD_DIR-based
          one in order to avoid spaces.

        * mac/postprocess-framework-headers.sh:
          Add quotes to account for spaces.

2016-01-08  Alex Christensen  <achristensen@webkit.org>

        Implement download authentication with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152878

        Reviewed by Brady Eidson.

        * DerivedSources.make:
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/PendingDownload.cpp: Added.
        (WebKit::PendingDownload::PendingDownload):
        (WebKit::PendingDownload::willSendRedirectedRequest):
        (WebKit::PendingDownload::continueWillSendRequest):
        (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
        (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
        (WebKit::PendingDownload::didConvertToDownload):
        (WebKit::PendingDownload::messageSenderConnection):
        (WebKit::PendingDownload::messageSenderDestinationID):
        * NetworkProcess/Downloads/PendingDownload.h:
        (WebKit::PendingDownload::PendingDownload): Deleted.
        * NetworkProcess/Downloads/PendingDownload.messages.in: Added.
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueWillSendRequest):
        The completion handler should always be called.  If m_currentRequest is null, then the request will not proceed, which is the same as canceling it.
        (WebKit::NetworkLoad::setPendingDownloadID):
        (WebKit::NetworkLoad::setPendingDownload):
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        If this load is going to become a download, then call the PendingDownload version of didReceiveAuthenticationChallenge to communicate with the 
        UI process directly because there wasn't necessarily a web process associated with this request that will become a download.
        * NetworkProcess/NetworkLoad.h:
        (WebKit::NetworkLoad::pendingDownloadID):
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkDataTask::client):
        (WebKit::NetworkDataTask::pendingDownloadID):
        (WebKit::NetworkDataTask::pendingDownload):
        (WebKit::NetworkDataTask::setPendingDownloadID):
        (WebKit::NetworkDataTask::setPendingDownload):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        * PlatformMac.cmake:
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
        Removed unnecessary protection and move null check to before using the pointer it checks.

2016-01-07  Simon Fraser  <simon.fraser@apple.com>

        Use an appropriate buffer format for swipe snapshots
        https://bugs.webkit.org/show_bug.cgi?id=152880
        rdar://problem/23728299

        Reviewed by Tim Horton.
        
        Choose an appropriate buffer format for swipe snapshots, and avoid converting
        them to YUV422.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (WebKit::bufferFormat):
        (-[WKWebView _takeViewSnapshot]):

2016-01-07  Alex Christensen  <achristensen@webkit.org>

        Progress towards implementing downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152760

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download):
        There's no need to store the unused NetworkSession&.
        (WebKit::Download::didStart):
        (WebKit::Download::didReceiveAuthenticationChallenge):
        Downloads with NetworkSession are NetworkLoads until the response is received, which is after authentication
        challenges are handled by NetworkLoad's code.
        (WebKit::Download::didReceiveResponse):
        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        Create a PendingDownload, which is basically a NetworkLoad that knows that it will become a Download 
        when the response is received, regardless of whether or not there is a Content-Disposition header.
        (WebKit::DownloadManager::dataTaskBecameDownloadTask):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/Downloads/PendingDownload.h: Added.
        (WebKit::PendingDownload::PendingDownload):
        Added a new NetworkLoadClient for requests that will become downloads.
        A PendingDownload contains a NetworkLoad so we can always keep them together
        and so it can handle setting its pending download id.
        * WebKit2.xcodeproj/project.pbxproj:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        Avoid dereferencing a pointer if the NetworkSession hadn't been created when a NetworkLoad starts.
        This shouldn't be possible, but it's good to not assume that all pointers are non-null.
        (WebKit::NetworkLoad::cancel):
        Add a null check in case the constructor doesn't make m_task.
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::setPendingDownloadID):
        Added for downloads that start with startDownload.  The pending DownloadID is used to indicate that
        this request should always become a download, regardless of whether or not the response has a 
        Content-Disposition header.
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::didReceiveResponse):
        * NetworkProcess/NetworkLoad.h:
        There's no need to store a DownloadID here.  It's stored in the NetworkDataTask (m_task).
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkDataTask::client):
        (WebKit::NetworkDataTask::pendingDownloadID):
        (WebKit::NetworkDataTask::setPendingDownloadID):
        (WebKit::NetworkDataTask::downloadID): Deleted.
        (WebKit::NetworkDataTask::setDownloadID): Deleted.
        Renamed downloadID and setDownloadID to pendingDownloadID and setPendingDownloadID, respectively,
        to indicate their use.  They are not the current downloadID, but they are the downloadID of the download
        that will happen once the response is received and PolicyDownload will be returned in the completion handler.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        Call dataTaskBecameDownloadTask after didBecomeDownload because the networkDataTask is deleted by removing it 
        from m_pendingDownloads in dataTaskBecameDownloadTask.

2016-01-06  Simon Fraser  <simon.fraser@apple.com>

        Add a setting and preferences to enable display-list drawing. Does nothing yet.
        https://bugs.webkit.org/show_bug.cgi?id=152807

        Reviewed by Zalan Bujtas.
        
        WK2 debug pref for display-list drawing, defaults to off.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _displayListDrawingEnabled]):
        (-[WKPreferences _setDisplayListDrawingEnabled:]):
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2016-01-06  Daniel Bates  <dabates@apple.com>

        Use code signed identifier as part of user directory suffix
        https://bugs.webkit.org/show_bug.cgi?id=152310
        <rdar://problem/13352225>

        As pointed out by Sam Weinig, the year is 2016! I inadvertently added the copyright year 2015 instead of 2016.

        * Shared/mac/ChildProcessMac.mm:

2016-01-06  Simon Fraser  <simon.fraser@apple.com>

        [iOS] Revert overflow:hidden on the body affecting viewport scale (r186786)
        https://bugs.webkit.org/show_bug.cgi?id=152803
        rdar://problem/22242515

        Reviewed by Tim Horton.

        You can't assume that if an author uses overflow:hidden on the body, they have no
        content outside the body that is important. Sites like Google Translate put
        abspos elements outside the body.
        
        So revert the change.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::mainFrameDidLayout): Go back to using contents size.

2016-01-06  Anders Carlsson  <andersca@apple.com>

        Add a smart block pointer
        https://bugs.webkit.org/show_bug.cgi?id=152799

        Reviewed by Tim Horton.

        Use WTF::BlockPtr.

        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
        (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):

2016-01-06  Daniel Bates  <dabates@apple.com>

        Use code signed identifier as part of user directory suffix
        https://bugs.webkit.org/show_bug.cgi?id=152310
        <rdar://problem/13352225>

        Reviewed by Brent Fulgham.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::findSecCodeForProcess): Added.
        (WebKit::ChildProcess::initializeSandbox): Modified to use an identifier
        from the code signature of the app/tool as part of the user directory suffix.

2016-01-06  Brian Burg  <bburg@apple.com>

        Add a WebKit SPI for registering an automation controller with RemoteInspector
        https://bugs.webkit.org/show_bug.cgi?id=151576

        Reviewed by Dan Bernstein and Joseph Pecoraro.

        _WKAutomationDelegate is a new SPI that allows WKProcessPool clients to decide
        policy and implement actions for remote automation.

        The SPI's implementation connects the client's delegate to RemoteInspector::Client.
        This allows the delegate to handle some commands, such as requestAutomationSession,
        that come over XPC from an external test runner but are not associated with a specific
        automation target.

        * PlatformMac.cmake:
        * UIProcess/API/APIAutomationClient.h: Added. Boilerplate for WebKit::AutomationClient.
        (API::AutomationClient::~AutomationClient):
        (API::AutomationClient::allowsRemoteAutomation):
        (API::AutomationClient::requestAutomationSession):
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        (-[WKProcessPool _automationDelegate]): Added.
        (-[WKProcessPool _setAutomationDelegate:]): Added.
        (-[WKProcessPool _automationCapabilitiesDidChange]): Added.
        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Add delegate.
        * UIProcess/API/Cocoa/_WKAutomationDelegate.h: Added.

            This is a new delegate SPI of WKProcessPool; it corresponds to AutomationClient.

        * UIProcess/Cocoa/AutomationClient.h: Added.
        * UIProcess/Cocoa/AutomationClient.mm: Added.

            This implements a bridge between RemoteInspector::Client and _WKAutomationDelegate.
            Since the delegate can be called from JavaScriptCore, save the delegating
            WKProcessPool and pass it as the self parameter to delegate methods.

        (WebKit::AutomationClient::AutomationClient):
        (WebKit::AutomationClient::~AutomationClient):

            This client automatically registers and unregisters as a RemoteInspector::Client.

        (WebKit::AutomationClient::remoteAutomationAllowed):
        (WebKit::AutomationClient::requestAutomationSession):

            Forward requests from RemoteInspector to the automation delegate.

        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::WebProcessPool::setAutomationClient): Added.
        (WebKit::WebProcessPool::updateAutomationCapabilities): Added, it notifies RemoteInspector.
        * UIProcess/WebProcessPool.h:
        * WebKit2.xcodeproj/project.pbxproj:

2016-01-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Set WebKit2 process output name
        https://bugs.webkit.org/show_bug.cgi?id=152773

        Reviewed by Benjamin Poulain.

        If we add *WebKit* prefix to each WK2 process, it is more clear when checking what process is running.
        So this patch sets wk2 process output name.

        * PlatformEfl.cmake:

2016-01-05  Alex Christensen  <achristensen@webkit.org>

        Implement defersLoading with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=151818

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::NetworkLoad):
        (WebKit::NetworkLoad::setDefersLoading):
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkDataTask::resume):
        (WebKit::NetworkDataTask::suspend):

2016-01-05  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r192432): Keyboard repeat doesn't work anymore for arrow keys/spacebar
        https://bugs.webkit.org/show_bug.cgi?id=152767
        <rdar://problem/24017380>

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
        Instead of always bailing, call [super _handleKeyUIEvent:] if we aren't
        in an editable area, because we won't have done so in _handleKeyUIEvent.

        It's important that the event makes it to the root UIResponder (even if
        we handled it!) for key repeat to function.

        The double-scrolling case is still fixed because we notice the resent
        event coming back in to us and bail if we've already seen it.

2016-01-05  Jer Noble  <jer.noble@apple.com>

        [Mac] Exiting fullscreen via Mission Control leaves fullcreen window frontmost on desktop
        https://bugs.webkit.org/show_bug.cgi?id=152733

        Reviewed by Eric Carlson.

        Rather than ignore -windowDidExitFullScreen: notifications when fullscreen exit was
        not initiated by WebKit (and the -window:startCustomAnimationToEnterFullScreenWithDuration:
        method was not called), continue to exit fullscreen normally.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

2016-01-05  Alex Christensen  <achristensen@webkit.org>

        Clean up download code
        https://bugs.webkit.org/show_bug.cgi?id=152739

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::DownloadManager):
        (WebKit::DownloadManager::didCreateDownload):
        (WebKit::DownloadManager::didDestroyDownload):
        (WebKit::DownloadManager::downloadProxyConnection):
        (WebKit::DownloadManager::downloadsAuthenticationManager):
        * NetworkProcess/Downloads/DownloadManager.h:
        Keep a Client& instead of a Client*.
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::downloadManager):
        * NetworkProcess/NetworkSession.h:
        m_sessionID is not used. There is no need to store the sessionID if it is only used in the NetworkSession constructor.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::defaultSession):
        (WebKit::NetworkSession::NetworkSession):

2016-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Allow to save and restore session
        https://bugs.webkit.org/show_bug.cgi?id=115600

        Reviewed by Michael Catanzaro.

        Add new API to get and resore the web view session state.

        * PlatformGTK.cmake: Add new files to compilation.
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_get_session_state): Create a new
        WebKitWebViewSessionState representing the current session state.
        (webkit_web_view_restore_session_state): Restore the web view
        session state from the given WebKitWebViewSessionState.
        * UIProcess/API/gtk/WebKitWebView.h:
        * UIProcess/API/gtk/WebKitWebViewSessionState.cpp: Added.
        (_WebKitWebViewSessionState::_WebKitWebViewSessionState):
        (toExternalURLsPolicy):
        (toWebCoreExternalURLsPolicy):
        (toHTMLBodyElementType):
        (toHTTPBodyElementType):
        (encodeHTTPBody):
        (encodeFrameState):
        (encodePageState):
        (encodeBackForwardListItemState):
        (encodeBackForwardListState):
        (encodeSessionState):
        (decodeHTTPBody):
        (decodeFrameState):
        (decodeBackForwardListItemState):
        (decodeSessionState):
        (webkitWebViewSessionStateCreate):
        (webkitWebViewSessionStateGetSessionState):
        (webkit_web_view_session_state_new): Create a
        WebKitWebViewSessionState from serialized data.
        (webkit_web_view_session_state_ref):
        (webkit_web_view_session_state_unref):
        (webkit_web_view_session_state_serialize): Serialize the WebKitWebViewSessionState.
        * UIProcess/API/gtk/WebKitWebViewSessionState.h: Added.
        * UIProcess/API/gtk/WebKitWebViewSessionStatePrivate.h: Added.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_web_view_session_state_get_type.
        * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewSessionState.h.

2016-01-04  Alex Christensen  <achristensen@webkit.org>

        Use unique_ptr for NetworkDataTasks and references for NetworkSessionTaskClients
        https://bugs.webkit.org/show_bug.cgi?id=152724

        Reviewed by Andy Estes.

        There is no reason to have a NetworkSessionTaskClient* instead of a 
        NetworkSessionTaskClient& just so we can clear it in the NetworkLoad destructor, 
        which immediately calls ~NetworkDataTask.
        Also, NetworkDataTasks are owned only by the NetworkLoad, so there's no reason to refcount them.

        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::~NetworkLoad):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
        (WebKit::NetworkDataTask::client):
        (WebKit::NetworkDataTask::downloadID):
        (WebKit::NetworkDataTask::setDownloadID):
        (WebKit::NetworkDataTask::clearClient): Deleted.
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::createDataTaskWithRequest):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkDataTask::NetworkDataTask):

2016-01-04  Alex Christensen  <achristensen@webkit.org>

        Progress towards implementing downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152716

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/Download.h:
        * NetworkProcess/Downloads/DownloadID.h:
        (WebKit::DownloadID::DownloadID):
        (WebKit::DownloadID::operator==):
        (WebKit::DownloadID::operator!=):
        (WebKit::DownloadID::downloadID):
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        * NetworkProcess/Downloads/DownloadManager.h:
        (WebKit::DownloadManager::download):
        (WebKit::DownloadManager::isDownloading):
        * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
        (WebKit::Download::resume):
        (WebKit::Download::platformInvalidate):
        (WebKit::Download::platformDidFinish):
        (WebKit::Download::start): Deleted.
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

        When using NSURLSession, a data task is converted to a download task after the connection has already
        been established, the headers have been received, and WebCore looks at the response and decides that
        this connection should become a download.  We call the didReceiveResponse to match the behavior of 
        NSURLDownload, but this could be cleaned up later to match what is actually happening.  We also do not
        need to tell the download to start because it has already started.

        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkSession::addDownloadID):
        (WebKit::NetworkSession::downloadID):
        (WebKit::NetworkSession::takeDownloadID):
        (WebKit::NetworkDataTask::NetworkDataTask):

        NSURLSessionDownloadTask taskIdentifiers are unique to that NSURLSession, but we have one global DownloadManager
        in the NetworkProcess.  We need to have each NetworkSession keep a map of taskIdentifiers to global DownloadID.

2016-01-04  Tim Horton  <timothy_horton@apple.com>

        Turn on gesture events when building for Yosemite
        https://bugs.webkit.org/show_bug.cgi?id=152704
        rdar://problem/24042472

        Reviewed by Anders Carlsson.

        * Configurations/FeatureDefines.xcconfig:

2016-01-04  Tim Horton  <timothy_horton@apple.com>

        Hardware keyboard key-commands stop responding when viewing PDFs
        https://bugs.webkit.org/show_bug.cgi?id=152712
        <rdar://problem/23014457>

        Reviewed by Dan Bernstein.

        Maintain first responder status through any content view swapping, by
        making WKWebView become first responder if needed, and pushing first
        responder status down to the swapped-in content view if possible.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView becomeFirstResponder]):
        Make the current content view first responder instead of the WKContentView,
        in case we have a custom content view installed.

        (-[WKWebView canBecomeFirstResponder]):
        WKWebView can always become first responder, even if none of its children can.
        This makes it so that if a custom content view can't become first responder,
        WKWebView will take the responsibility.

        (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
        Return the responsibility of being first responder to the newly-installed
        content view if WKWebView is currently the first responder (either because
        of tab switching or because the previous content view did not support
        being first responder), if it supports being first responder.

2016-01-04  Commit Queue  <commit-queue@webkit.org>

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

        This change caused assertions in existing inspector tests
        (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "Web Inspector: reproducible debug ASSERT when inspecting the
        inspector (WK2)"
        https://bugs.webkit.org/show_bug.cgi?id=152080
        http://trac.webkit.org/changeset/194544

2016-01-04  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build after r194378.

        * CMakeLists.txt:

2016-01-04  Brian Burg  <bburg@apple.com>

        Web Inspector: reproducible debug ASSERT when inspecting the inspector (WK2)
        https://bugs.webkit.org/show_bug.cgi?id=152080

        Reviewed by Timothy Hatcher.

        We hit an assert underneath ChildProcessProxy::addMessageReceiver when opening Inspector[2]
        because we try to add WebInpectorProxy as a message receiver twice for the same process.

        On investigating, I found several interrelated issues that caused this state of affairs:

         - WebInspectorProxy adds message receivers for inspector page's WebProcess and the
        inspected page's WebProcess. When inspecting the inspector, we mistakenly add a receiver
        again because the inspector is now the inspected page.
         - We mixed up process ids when adding message receivers.
         - invalidate() is re-entrant, causing us to try and double-remove the message receiver.

        Fix this by removing add/remove of message recievers for the inspector page when then
        inspected page is itself an inspector page. In that case, the receivers are managed by
        the inspector page's WebInspectorProxy instance.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::invalidate): Re-arrange to guard against useless reentrancy.
        (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
        (WebKit::WebInspectorProxy::didClose):

2016-01-04  Alex Christensen  <achristensen@webkit.org>

        Build fix after r194536 when using NetworkSession.

        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::dataTaskBecameDownloadTask):
        (WebKit::DownloadManager::convertHandleToDownload):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        WTFMove changed underneath me.

2016-01-04  Alex Christensen  <achristensen@webkit.org>

        Progress towards implementing downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152576

        Reviewed by Brady Eidson.

        * NetworkProcess/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::~Download):
        (WebKit::Download::didStart):
        (WebKit::Download::didReceiveAuthenticationChallenge):
        * NetworkProcess/Downloads/Download.h:
        (WebKit::Download::downloadID):
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::dataTaskBecameDownloadTask):
        (WebKit::DownloadManager::convertHandleToDownload):
        * NetworkProcess/Downloads/DownloadManager.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::convertTaskToDownload):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkDataTask::client):
        (WebKit::NetworkDataTask::clearClient):
        (WebKit::NetworkDataTask::downloadID):
        (WebKit::NetworkDataTask::setDownloadID):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
        (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

2016-01-04  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Rename _WebKitWebContextPrivate.context to _WebKitWebContextPrivate.processPool
        https://bugs.webkit.org/show_bug.cgi?id=152672

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitDownloadClient.cpp:
        (attachDownloadClientToContext):
        * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
        (attachInjectedBundleClientToContext):
        * UIProcess/API/gtk/WebKitSecurityManager.cpp:
        (registerSecurityPolicyForURIScheme):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextConstructed):
        (webkitWebContextDispose):
        (webkit_web_context_set_cache_model):
        (webkit_web_context_get_cache_model):
        (webkit_web_context_clear_cache):
        (webkit_web_context_get_cookie_manager):
        (ensureFaviconDatabase):
        (webkit_web_context_set_favicon_database_directory):
        (webkit_web_context_set_additional_plugins_directory):
        (webkitWebContextGetPluginThread):
        (webkit_web_context_set_tls_errors_policy):
        (webkit_web_context_set_disk_cache_directory):
        (webkit_web_context_prefetch_dns):
        (webkit_web_context_allow_tls_certificate_for_host):
        (webkit_web_context_set_process_model):
        (webkit_web_context_set_web_process_count_limit):
        (webkitWebContextStartDownload):
        (webkitWebContextGetProcessPool):
        (webkitWebContextCreatePageForWebView):
        (webkitWebContextGetContext): Deleted.
        * UIProcess/API/gtk/WebKitWebContextPrivate.h:

2016-01-03  Simon Fraser  <simon.fraser@apple.com>

        Rename scrollPosition(Scrollbar*) to scrollOffset(ScrollbarOrientation)
        https://bugs.webkit.org/show_bug.cgi?id=152666

        Reviewed by Dan Bernstein.

        Scrollbar values take offsets (zero-based), so rename the accessor used
        by scrollbars to set their value, and pass in an orientation, rather than
        a pointer to the scrollbar.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::scrollOffset):
        (WebKit::PDFPlugin::scrollPosition): Renamed.

2015-12-31  Andy Estes  <aestes@apple.com>

        Replace WTF::move with WTFMove
        https://bugs.webkit.org/show_bug.cgi?id=152601

        Reviewed by Brady Eidson.

        * DatabaseProcess/DatabaseProcess.cpp:
        (WebKit::DatabaseProcess::postDatabaseTask):
        (WebKit::DatabaseProcess::fetchWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteData):
        (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
        (WebKit::DatabaseProcess::indexedDatabaseOrigins):
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        (WebKit::UniqueIDBDatabase::postTransactionOperation):
        (WebKit::UniqueIDBDatabase::postMainThreadTask):
        (WebKit::UniqueIDBDatabase::postDatabaseTask):
        * NetworkProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::convertHandleToDownload):
        (WebKit::DownloadManager::resumeDownload):
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
        (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didReceiveData):
        (WebKit::NetworkLoad::didReceiveBuffer):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::fetchDiskCacheEntries):
        (WebKit::NetworkProcess::fetchWebsiteData):
        (WebKit::NetworkProcess::deleteWebsiteData):
        (WebKit::clearDiskCacheEntries):
        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
        (WebKit::NetworkResourceLoader::retrieveCacheEntry):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
        (WebKit::NetworkResourceLoader::validateCacheEntry):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):
        (WebKit::NetworkCache::Cache::clear):
        * NetworkProcess/cache/NetworkCacheCoders.h:
        * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
        (WebKit::NetworkCache::Data::empty):
        (WebKit::NetworkCache::Data::subrange):
        (WebKit::NetworkCache::concatenate):
        (WebKit::NetworkCache::Data::adoptMap):
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):
        * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
        (WebKit::NetworkCache::runTaskInQueue):
        (WebKit::NetworkCache::fillDataFromReadBuffer):
        (WebKit::NetworkCache::IOChannel::readSyncInThread):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
        (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
        (WebKit::NetworkCache::SpeculativeLoad::didComplete):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::Statistics::queryWasEverRequested):
        * NetworkProcess/cache/NetworkCacheStorage.cpp:
        (WebKit::NetworkCache::Storage::ReadOperation::finish):
        (WebKit::NetworkCache::Storage::synchronize):
        (WebKit::NetworkCache::Storage::dispatchReadOperation):
        (WebKit::NetworkCache::Storage::dispatchWriteOperation):
        (WebKit::NetworkCache::Storage::retrieve):
        (WebKit::NetworkCache::Storage::store):
        (WebKit::NetworkCache::Storage::traverse):
        (WebKit::NetworkCache::Storage::clear):
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
        (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys):
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkDataTask::NetworkDataTask):
        * NetworkProcess/soup/NetworkProcessSoup.cpp:
        (WebKit::NetworkProcess::clearDiskCache):
        * Platform/IPC/ArgumentCoders.h:
        (IPC::ArgumentCoder<WTF::Optional<T>>::decode):
        * Platform/IPC/ArgumentDecoder.cpp:
        (IPC::ArgumentDecoder::ArgumentDecoder):
        * Platform/IPC/ArgumentEncoder.cpp:
        (IPC::ArgumentEncoder::addAttachment):
        (IPC::ArgumentEncoder::releaseAttachments):
        * Platform/IPC/Attachment.cpp:
        (IPC::Attachment::encode):
        * Platform/IPC/Connection.cpp:
        (IPC::Connection::SyncMessageState::processIncomingMessage):
        (IPC::Connection::SyncMessageState::dispatchMessages):
        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
        (IPC::Connection::sendMessage):
        (IPC::Connection::sendSyncReply):
        (IPC::Connection::waitForMessage):
        (IPC::Connection::sendSyncMessage):
        (IPC::Connection::sendSyncMessageFromSecondaryThread):
        (IPC::Connection::waitForSyncReply):
        (IPC::Connection::processIncomingSyncReply):
        (IPC::Connection::processIncomingMessage):
        (IPC::Connection::sendOutgoingMessages):
        (IPC::Connection::dispatchSyncMessage):
        (IPC::Connection::enqueueIncomingMessage):
        (IPC::Connection::dispatchOneMessage):
        * Platform/IPC/Connection.h:
        (IPC::Connection::Identifier::Identifier):
        (IPC::Connection::send):
        (IPC::Connection::sendSync):
        * Platform/IPC/HandleMessage.h:
        (IPC::handleMessage):
        (IPC::handleMessageDelayed):
        * Platform/IPC/MessageDecoder.cpp:
        (IPC::MessageDecoder::MessageDecoder):
        (IPC::MessageDecoder::setImportanceAssertion):
        (IPC::MessageDecoder::unwrapForTesting):
        * Platform/IPC/MessageDecoder.h:
        (IPC::MessageDecoder::setMessageProcessingToken):
        * Platform/IPC/MessageEncoder.cpp:
        (IPC::MessageEncoder::wrapForTesting):
        * Platform/IPC/MessageRecorder.cpp:
        (IPC::MessageRecorder::recordOutgoingMessage):
        (IPC::MessageRecorder::recordIncomingMessage):
        (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken):
        * Platform/IPC/MessageSender.cpp:
        (IPC::MessageSender::sendMessage):
        * Platform/IPC/MessageSender.h:
        (IPC::MessageSender::send):
        (IPC::MessageSender::sendSync):
        * Platform/IPC/glib/GSocketMonitor.cpp:
        (IPC::GSocketMonitor::start):
        * Platform/IPC/mac/ConnectionMac.mm:
        (IPC::Connection::open):
        (IPC::createMessageDecoder):
        (IPC::Connection::receiveSourceEventHandler):
        * Platform/IPC/unix/ConnectionUnix.cpp:
        (IPC::Connection::processMessage):
        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::Handle::decode):
        (WebKit::SharedMemory::Handle::releaseAttachment):
        (WebKit::SharedMemory::Handle::adoptAttachment):
        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
        (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
        * PluginProcess/PluginProcess.cpp:
        (WebKit::PluginProcess::initializePluginProcess):
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::addPluginControllerProxy):
        (WebKit::WebProcessConnection::createPluginInternal):
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::platformInitializePluginProcess):
        * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
        * Scripts/webkit/MessageReceiver-expected.cpp:
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
        (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
        (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
        * Scripts/webkit/messages.py:
        (generate_message_handler):
        * Shared/API/APIArray.cpp:
        (API::Array::create):
        (API::Array::createStringArray):
        (API::Array::copy):
        * Shared/API/APIArray.h:
        * Shared/API/APIDictionary.cpp:
        (API::Dictionary::create):
        (API::Dictionary::Dictionary):
        (API::Dictionary::keys):
        * Shared/API/APIPageGroupHandle.cpp:
        (API::PageGroupHandle::create):
        (API::PageGroupHandle::PageGroupHandle):
        (API::PageGroupHandle::decode):
        * Shared/API/APIString.h:
        * Shared/API/APIURL.h:
        (API::URL::create):
        (API::URL::URL):
        * Shared/API/Cocoa/RemoteObjectInvocation.h:
        (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
        * Shared/API/Cocoa/RemoteObjectInvocation.mm:
        (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
        (WebKit::RemoteObjectInvocation::decode):
        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
        (ensureObjectStream):
        (createEncodedObject):
        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
        (initializeMethod):
        (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
        (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
        * Shared/API/c/WKArray.cpp:
        (WKArrayCreate):
        (WKArrayCreateAdoptingValues):
        * Shared/API/c/WKDictionary.cpp:
        (WKDictionaryCreate):
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::ProxyingRefPtr::ProxyingRefPtr):
        * Shared/APIWebArchive.mm:
        (API::WebArchive::WebArchive):
        (API::WebArchive::subresources):
        (API::WebArchive::subframeArchives):
        * Shared/AsyncRequest.cpp:
        (WebKit::AsyncRequest::AsyncRequest):
        (WebKit::AsyncRequest::setAbortHandler):
        * Shared/AsyncRequest.h:
        * Shared/BlockingResponseMap.h:
        (BlockingResponseMap::didReceiveResponse):
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::sendMessage):
        (WebKit::ChildProcessProxy::didFinishLaunching):
        * Shared/ChildProcessProxy.h:
        (WebKit::ChildProcessProxy::send):
        (WebKit::ChildProcessProxy::sendSync):
        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
        (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
        (WebKit::CoordinatedGraphicsScene::createLayer):
        (WebKit::CoordinatedGraphicsScene::syncRemoteContent):
        (WebKit::CoordinatedGraphicsScene::appendUpdate):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
        (WebKit::ThreadSafeCoordinatedSurface::create):
        (WebKit::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::CompositingRunLoop::CompositingRunLoop):
        (WebKit::CompositingRunLoop::callOnCompositingRunLoop):
        (WebKit::ThreadedCompositor::callOnCompositingThread):
        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
        (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
        (WebKit::XPCServiceInitializer):
        * Shared/Plugins/Netscape/PluginInformation.cpp:
        (WebKit::createPluginInformationDictionary):
        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
        (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
        * Shared/SessionTracker.cpp:
        (WebKit::SessionTracker::setSession):
        * Shared/UserData.cpp:
        (WebKit::UserData::UserData):
        (WebKit::transformGraph):
        (WebKit::UserData::decode):
        * Shared/WebBackForwardListItem.cpp:
        (WebKit::WebBackForwardListItem::create):
        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
        * Shared/WebBackForwardListItem.h:
        (WebKit::WebBackForwardListItem::setPageState):
        * Shared/WebCompiledContentExtension.cpp:
        (WebKit::WebCompiledContentExtension::create):
        (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
        * Shared/WebCompiledContentExtensionData.h:
        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<UserStyleSheet>::decode):
        (IPC::ArgumentCoder<UserScript>::decode):
        (IPC::ArgumentCoder<FilterOperations>::decode):
        (IPC::ArgumentCoder<BlobPart>::decode):
        * Shared/WebKeyboardEvent.cpp:
        (WebKit::WebKeyboardEvent::WebKeyboardEvent):
        * Shared/WebPreferencesStore.h:
        (WebKit::WebPreferencesStore::Value::Value):
        * Shared/WebRenderLayer.cpp:
        (WebKit::WebRenderLayer::createArrayFromLayerList):
        * Shared/WebRenderObject.cpp:
        (WebKit::WebRenderObject::WebRenderObject):
        * Shared/WebTouchEvent.cpp:
        (WebKit::WebTouchEvent::WebTouchEvent):
        * Shared/efl/WebEventFactory.cpp:
        (WebKit::WebEventFactory::createWebTouchEvent):
        * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
        * Shared/gtk/NativeWebTouchEventGtk.cpp:
        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
        * Shared/gtk/WebContextMenuItemGtk.cpp:
        (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
        * Shared/gtk/WebEventFactory.cpp:
        (WebKit::WebEventFactory::createWebKeyboardEvent):
        (WebKit::WebEventFactory::createWebTouchEvent):
        * Shared/linux/SeccompFilters/OpenSyscall.cpp:
        (WebKit::OpenSyscall::createFromOpenatContext):
        (WebKit::OpenSyscall::createFromCreatContext):
        (WebKit::OpenSyscallResult::encode):
        * Shared/mac/ObjCObjectGraph.mm:
        (WebKit::ObjCObjectGraph::decode):
        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
        (WebKit::RemoteLayerBackingStore::Buffer::discard):
        * Shared/mac/RemoteLayerTreeTransaction.h:
        (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
        (WebKit::RemoteLayerTreeTransaction::decode):
        (WebKit::RemoteLayerTreeTransaction::setCreatedLayers):
        (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
        (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/APISessionState.cpp:
        (API::SessionState::create):
        (API::SessionState::SessionState):
        * UIProcess/API/APIUserContentExtension.cpp:
        (API::UserContentExtension::UserContentExtension):
        * UIProcess/API/APIUserContentExtension.h:
        * UIProcess/API/APIUserContentExtensionStore.cpp:
        (API::compiledToFile):
        (API::createExtension):
        (API::UserContentExtensionStore::compileContentExtension):
        * UIProcess/API/APIUserScript.h:
        * UIProcess/API/APIWebsiteDataRecord.cpp:
        (API::WebsiteDataRecord::create):
        (API::WebsiteDataRecord::WebsiteDataRecord):
        * UIProcess/API/APIWebsiteDataStore.cpp:
        (API::WebsiteDataStore::create):
        (API::WebsiteDataStore::WebsiteDataStore):
        * UIProcess/API/C/WKApplicationCacheManager.cpp:
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
        * UIProcess/API/C/WKPage.cpp:
        (WKPageCopySessionState):
        (WKPageRestoreFromSessionState):
        (WKPageSetPageContextMenuClient):
        (WKPageSetPageFindMatchesClient):
        (WKPageSetPageLoaderClient):
        (WebKit::RunJavaScriptAlertResultListener::create):
        (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
        (WebKit::RunJavaScriptConfirmResultListener::create):
        (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
        (WebKit::RunJavaScriptPromptResultListener::create):
        (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
        (WKPageSetPageUIClient):
        (WKPageSetPageNavigationClient):
        (WKPageCopyRelatedPages):
        * UIProcess/API/C/WKResourceCacheManager.cpp:
        (WKResourceCacheManagerGetCacheOrigins):
        * UIProcess/API/C/WKSessionStateRef.cpp:
        (WKSessionStateCreateFromData):
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextGetInfoForInstalledPlugIns):
        * UIProcess/API/C/mac/WKPagePrivateMac.mm:
        (-[WKObservablePageState initWithPage:]):
        * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
        (createWKArray):
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        (-[WKWebView _takeViewSnapshot]):
        (-[WKWebView _restoreFromSessionStateData:]):
        (-[WKWebView _setInputDelegate:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (LazyInitialized::set):
        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
        (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
        (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
        * UIProcess/API/Cocoa/_WKSessionState.mm:
        (-[_WKSessionState _initWithSessionState:]):
        * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
        (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
        * UIProcess/API/efl/ewk_database_manager.cpp:
        (EwkDatabaseManager::getDatabaseOrigins):
        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
        (webkitContextMenuItemToWebContextMenuItemGtk):
        * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
        (webkit_file_chooser_request_select_files):
        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
        (WebKitNotificationProvider::notificationCloseCallback):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkit_web_context_prefetch_dns):
        (webkitWebContextCreatePageForWebView):
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkit_web_view_get_snapshot):
        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseTouchEvent):
        (webkitWebViewBaseCreateWebPage):
        * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
        (webkitWebsiteDataManagerCreate):
        (webkitWebsiteDataManagerGetDataStore):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:processPool:configuration:webView:]):
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
        (-[WKView initWithFrame:configurationRef:]):
        * UIProcess/Cocoa/NavigationState.mm:
        (WebKit::tryAppLink):
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
        (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::WebViewImpl):
        (WebKit::WebViewImpl::takeViewSnapshot):
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate):
        * UIProcess/Databases/DatabaseProcessProxy.cpp:
        (WebKit::DatabaseProcessProxy::fetchWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteData):
        (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
        * UIProcess/GenericCallback.h:
        (WebKit::CallbackMap::put):
        * UIProcess/InspectorServer/WebSocketServer.cpp:
        (WebKit::WebSocketServer::didAcceptConnection):
        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
        (WebKit::connectionCallback):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::fetchWebsiteData):
        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
        (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
        * UIProcess/Notifications/WebNotificationProvider.cpp:
        (WebKit::WebNotificationProvider::clearNotifications):
        * UIProcess/PageLoadState.cpp:
        (WebKit::PageLoadState::Transaction::Transaction):
        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::pluginProcessToken):
        (WebKit::PluginProcessManager::fetchWebsiteData):
        (WebKit::PluginProcessManager::deleteWebsiteData):
        (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::fetchWebsiteData):
        (WebKit::PluginProcessProxy::deleteWebsiteData):
        (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
        (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
        * UIProcess/StatisticsRequest.cpp:
        (WebKit::StatisticsRequest::completedRequest):
        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::create):
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::StorageArea::create):
        (WebKit::StorageManager::StorageArea::StorageArea):
        (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::getSessionStorageOrigins):
        (WebKit::StorageManager::getLocalStorageOrigins):
        (WebKit::StorageManager::getLocalStorageOriginDetails):
        (WebKit::StorageManager::createTransientLocalStorageMap):
        (WebKit::StorageManager::createSessionStorageMap):
        * UIProcess/UserContent/WebScriptMessageHandler.cpp:
        (WebKit::WebScriptMessageHandler::create):
        (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
        * UIProcess/ViewGestureController.cpp:
        (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
        (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::addItem):
        (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
        (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
        (WebKit::WebBackForwardList::removeAllItems):
        (WebKit::WebBackForwardList::clear):
        (WebKit::WebBackForwardList::restoreFromState):
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
        * UIProcess/WebFormClient.cpp:
        (WebKit::WebFormClient::willSubmitForm):
        * UIProcess/WebFrameListenerProxy.h:
        (WebKit::WebFrameListenerProxy::setNavigation):
        * UIProcess/WebFrameProxy.h:
        (WebKit::WebFrameProxy::contentFilterDidBlockLoad):
        * UIProcess/WebGrammarDetail.cpp:
        (WebKit::WebGrammarDetail::guesses):
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::createInspectorPage):
        * UIProcess/WebMediaCacheManagerProxy.cpp:
        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::ExceededDatabaseQuotaRecords::add):
        (WebKit::WebPageProxy::create):
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::setHistoryClient):
        (WebKit::WebPageProxy::setNavigationClient):
        (WebKit::WebPageProxy::setLoaderClient):
        (WebKit::WebPageProxy::setPolicyClient):
        (WebKit::WebPageProxy::setFormClient):
        (WebKit::WebPageProxy::setUIClient):
        (WebKit::WebPageProxy::setFindClient):
        (WebKit::WebPageProxy::setFindMatchesClient):
        (WebKit::WebPageProxy::setDiagnosticLoggingClient):
        (WebKit::WebPageProxy::setContextMenuClient):
        (WebKit::WebPageProxy::reattachToWebProcessForReload):
        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
        (WebKit::WebPageProxy::loadRequest):
        (WebKit::WebPageProxy::loadFile):
        (WebKit::WebPageProxy::loadData):
        (WebKit::WebPageProxy::loadHTMLString):
        (WebKit::WebPageProxy::reload):
        (WebKit::WebPageProxy::didChangeBackForwardList):
        (WebKit::WebPageProxy::setInitialFocus):
        (WebKit::WebPageProxy::validateCommand):
        (WebKit::WebPageProxy::handleWheelEvent):
        (WebKit::WebPageProxy::processNextQueuedWheelEvent):
        (WebKit::WebPageProxy::restoreFromSessionState):
        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
        (WebKit::WebPageProxy::getSourceForFrame):
        (WebKit::WebPageProxy::getContentsAsString):
        (WebKit::WebPageProxy::getBytecodeProfile):
        (WebKit::WebPageProxy::getContentsAsMHTMLData):
        (WebKit::WebPageProxy::getSelectionOrContentsAsString):
        (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
        (WebKit::WebPageProxy::getMainResourceDataOfFrame):
        (WebKit::WebPageProxy::getResourceDataFromFrame):
        (WebKit::WebPageProxy::getWebArchiveOfFrame):
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::sendMessage):
        (WebKit::WebPageProxy::exceededDatabaseQuota):
        (WebKit::WebPageProxy::getMarkedRangeAsync):
        (WebKit::WebPageProxy::getSelectedRangeAsync):
        (WebKit::WebPageProxy::characterIndexForPointAsync):
        (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
        (WebKit::WebPageProxy::takeSnapshot):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::setHistoryClient):
        (WebKit::WebProcessPool::setDownloadClient):
        (WebKit::WebProcessPool::createWebPage):
        (WebKit::WebProcessPool::getStatistics):
        (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::createWebPage):
        (WebKit::WebProcessProxy::addBackForwardItem):
        (WebKit::WebProcessProxy::fetchWebsiteData):
        * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
        (WebKit::WebsiteDataRecord::add):
        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
        (WebKit::WebsiteDataStore::create):
        (WebKit::WebsiteDataStore::WebsiteDataStore):
        (WebKit::WebsiteDataStore::fetchData):
        (WebKit::WebsiteDataStore::removeData):
        (WebKit::WebsiteDataStore::mediaKeyOrigins):
        * UIProcess/efl/InputMethodContextEfl.cpp:
        (WebKit::InputMethodContextEfl::InputMethodContextEfl):
        * UIProcess/efl/InputMethodContextEfl.h:
        (WebKit::InputMethodContextEfl::create):
        * UIProcess/efl/WebContextMenuProxyEfl.cpp:
        (WebKit::WebContextMenuProxyEfl::showContextMenu):
        * UIProcess/efl/WebUIPopupMenuClient.cpp:
        (WebUIPopupMenuClient::showPopupMenu):
        * UIProcess/gtk/InputMethodFilter.cpp:
        (WebKit::InputMethodFilter::filterKeyEvent):
        * UIProcess/gtk/KeyBindingTranslator.cpp:
        (WebKit::KeyBindingTranslator::commandsForKeyEvent):
        * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
        (WebKit::XDamageNotifier::add):
        (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
        (WebKit::RedirectedXCompositeWindow::surface):
        * UIProcess/ios/WKActionSheetAssistant.mm:
        (-[WKActionSheetAssistant showImageSheet]):
        (-[WKActionSheetAssistant showLinkSheet]):
        * UIProcess/ios/WKContentView.mm:
        (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
        (-[WKContentView initWithFrame:processPool:configuration:webView:]):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
        * UIProcess/ios/WKGeolocationProviderIOS.mm:
        (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
        (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView actionSheetAssistant:decideActionsForElement:defaultActions:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::selectWithGesture):
        (WebKit::WebPageProxy::updateSelectionWithTouches):
        (WebKit::WebPageProxy::requestAutocorrectionData):
        (WebKit::WebPageProxy::applyAutocorrection):
        (WebKit::WebPageProxy::executeEditCommand):
        (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
        (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
        (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
        (WebKit::WebPageProxy::selectPositionAtPoint):
        (WebKit::WebPageProxy::beginSelectionInDirection):
        (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
        (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
        (WebKit::WebPageProxy::requestDictationContext):
        (WebKit::WebPageProxy::requestAutocorrectionContext):
        (WebKit::WebPageProxy::getLookupContextAtPoint):
        (WebKit::WebPageProxy::selectWithTwoTouches):
        (WebKit::WebPageProxy::moveSelectionByOffset):
        (WebKit::WebPageProxy::focusNextAssistedNode):
        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
        * UIProcess/ios/forms/WKFileUploadPanel.mm:
        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
        * UIProcess/mac/LegacySessionStateCoding.cpp:
        (WebKit::HistoryEntryDataEncoder::finishEncoding):
        (WebKit::decodeFormData):
        (WebKit::decodeBackForwardTreeNode):
        (WebKit::decodeSessionHistoryEntries):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
        * UIProcess/mac/ViewGestureController.h:
        (WebKit::ViewGestureController::setCustomSwipeViews):
        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
        * UIProcess/mac/ViewSnapshotStore.mm:
        (WebKit::ViewSnapshot::create):
        (WebKit::ViewSnapshot::ViewSnapshot):
        (WebKit::ViewSnapshot::setSurface):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
        (WebKit::WebPageProxy::fontAtSelection):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (contextMenuItems):
        (WKBundlePageCopyOriginsWithApplicationCache):
        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
        (WKBundlePageOverlayCreate):
        * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
        (EwkExtension::didCreatePage):
        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
        (webkitFrameGetOrCreate):
        (didInitiateLoadForResource):
        (willSendRequestForFrame):
        (didReceiveResponseForResource):
        (didReceiveContentLengthForResource):
        (didFinishLoadForResource):
        (didFailLoadForResource):
        (webkitWebPageDidReceiveMessage):
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::addUserScript):
        (WebKit::InjectedBundle::addUserStyleSheet):
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
        (WebKit::InjectedBundleBackForwardListItem::children):
        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
        (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
        (WebKit::InjectedBundlePageFormClient::willSubmitForm):
        (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
        (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::willSendRequest):
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_PostURL):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::scheduleTimer):
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::convertStringToKeyCodes):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::PDFPlugin):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (-[WKPDFHUDAnimationDelegate initWithAnimationCompletionHandler:]):
        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
        (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::create):
        (WebKit::StorageAreaMap::StorageAreaMap):
        * WebProcess/Storage/StorageNamespaceImpl.cpp:
        (WebKit::StorageNamespaceImpl::storageArea):
        * WebProcess/UserContent/WebUserContentController.cpp:
        (WebKit::WebUserContentController::addUserContentExtensions):
        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
        (WebKit::toHTTPBody):
        (WebKit::toFrameState):
        (WebKit::applyFrameState):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
        (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
        * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
        (WebKit::WebPasteboardOverrides::addOverride):
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::executePendingEditorCommands):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::findStringMatches):
        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
        (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::createSubframe):
        (WebKit::WebFrame::create):
        (WebKit::WebFrame::WebFrame):
        (WebKit::WebFrame::didReceivePolicyDecision):
        (WebKit::WebFrame::childFrames):
        (WebKit::WebFrame::createSelectionSnapshot):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setInjectedBundleContextMenuClient):
        (WebKit::WebPage::setInjectedBundleFormClient):
        (WebKit::WebPage::setInjectedBundleUIClient):
        (WebKit::WebPage::trackedRepaintRects):
        (WebKit::WebPage::createDocumentLoader):
        * WebProcess/WebPage/WebPageGroupProxy.cpp:
        (WebKit::WebPageGroupProxy::addUserContentExtension):
        * WebProcess/WebPage/WebPageOverlay.cpp:
        (WebKit::WebPageOverlay::create):
        (WebKit::WebPageOverlay::WebPageOverlay):
        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF):
        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
        (WebKit::PlatformCAAnimationRemote::setTimingFunction):
        (WebKit::PlatformCAAnimationRemote::setValues):
        (WebKit::PlatformCAAnimationRemote::setTimingFunctions):
        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
        (WebKit::RemoteLayerTreeContext::layerWasCreated):
        (WebKit::RemoteLayerTreeContext::buildTransaction):
        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::transformObjectsToHandles):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
        (WebKit::WebVideoFullscreenManager::createModelAndInterface):
        (WebKit::WebVideoFullscreenManager::setSeekableRanges):
        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
        (webkitSoupRequestInputStreamDidFailWithError):

2016-01-01  Simon Fraser  <simon.fraser@apple.com>

        Fix the iOS and EFL builds, after an over-eager commit-queue commit.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::restoreViewState):
        * WebProcess/WebPage/efl/WebPageEfl.cpp:
        (WebKit::WebPage::restorePageState):

2016-01-01  Simon Fraser  <simon.fraser@apple.com>

        Fix naming in HistoryItem to refer to scrollPositions
        https://bugs.webkit.org/show_bug.cgi?id=152646

        Reviewed by Zalan Bujtas.
        
        HistoryItem stores a scrollPosition, so call it that.
        
        No behavior change.

        * Shared/SessionState.cpp:
        (WebKit::FrameState::encode):
        (WebKit::FrameState::decode):
        * Shared/SessionState.h:
        * UIProcess/mac/LegacySessionStateCoding.cpp:
        (WebKit::encodeFrameStateNode):
        (WebKit::decodeBackForwardTreeNode):
        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
        (WebKit::toFrameState):
        (WebKit::applyFrameState):

2016-01-01  Simon Fraser  <simon.fraser@apple.com>

        Fix reload and programmatic scrolling in RTL documents
        https://bugs.webkit.org/show_bug.cgi?id=152639

        Reviewed by Zalan Bujtas.

        Reloading a left-scrolled RTL document would cause the content to appear
        at an odd offset, and programmatic sideways scrolls in RTL documents also
        jumped to the wrong location.
        
        Fix by resolving offset/position confusion in ScrollableArea::scrollPositionChanged()
        and the scrolling tree.
        
        ScrollableArea::scrollPositionChanged() was erroneously passing a scrollPosition
        to setScrollOffset(). 
        
        ScrollingTreeFrameScrollingNode* were confused about offsets and positions. It
        turns out that the layer position is just -scrollPosition, but minimumScrollPosition()
        and maximumScrollPosition() need fixing to return positions, not offsets.
        
        ScrollingTreeFrameScrollingNode::viewToContentsOffset() was also doing incorrect
        math with scrollOrigin, which was detected by a failing test.
        
        Add more logging to the Scrolling channel.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::setScrollOffset):

2016-01-01  Michael Catanzaro  <mcatanzaro@igalia.com>

        [SOUP] REGRESSION(r192761): Broke resource URIs for applications that use g_resource_load in a web extension
        https://bugs.webkit.org/show_bug.cgi?id=152634

        Reviewed by Carlos Garcia Campos.

        Load GResource URIs locally, not in the network process. Applications expect calling
        g_resource_load in a web extension to make it possible to load resource URIs, but that
        doesn't work now that the network process is in use. Loading them locally solves this.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::WebLoaderStrategy::scheduleLoad):

2016-01-01  Jeff Miller  <jeffm@apple.com>

        Update user-visible copyright strings to include 2016
        https://bugs.webkit.org/show_bug.cgi?id=152531

        Reviewed by Alexey Proskuryakov.

        * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
        * Info.plist:
        * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
        * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist:
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
        * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

2015-12-31  Simon Fraser  <simon.fraser@apple.com>

        Rename documentScrollOffsetRelativeTo* functions
        https://bugs.webkit.org/show_bug.cgi?id=152632

        Reviewed by Zalan Bujtas.

        ScrollView::documentScrollOffsetRelativeTo* functions return scroll positions,
        not offsets, so rename them and fix their return types, and fix callers. Make
        their code more similar.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
        (WebKit::WebPage::plugInIntersectsSearchRect):

2015-12-31  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Fix incorrect scrollPosition handling
        https://bugs.webkit.org/show_bug.cgi?id=152630

        Reviewed by Zalan Bujtas.
        
        WebPage::updateVisibleContentRects() was setting the ScrollView's scroll position
        to a scrollOffset, which was counteracted by ScrollView::unobscuredContentRect()
        adding the scrollOrigin to the scrollPosition, which resulted in the correct
        rects, but an incorrect scrollPosition. Fix.

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

2015-12-31  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed, fix a log message

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResponse):

2015-12-31  David Kilzer  <ddkilzer@apple.com>

        Stop using USE(CFNETWORK) path on iOS
        https://bugs.webkit.org/show_bug.cgi?id=142540

        Step 1/2: Do everything but turn off USE(CFNETWORK) internally.

        Original patch by Antti Koivisto <antti@apple.com> on 2015-03-10
        Reviewed by Daniel Bates.

        * NetworkProcess/Downloads/ios/DownloadIOS.mm: This is now the
        USE(CFNETWORK) && !USE(NETWORK_SESSION) code path.
        * NetworkProcess/Downloads/mac/DownloadMac.mm: This is now the
        !USE(CFNETWORK) && !USE(NETWORK_SESSION) code path.  Make use of
        NSURLDownloadSPI.h.  Ignore a deprecated delcaration warning now
        that we're using actual header declarations internally.
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeNetworkProcess): Update for
        iOS to use NSURLConnection loader.

2015-12-31  Andy Estes  <aestes@apple.com>

        Fix warnings uncovered by migrating to WTF_MOVE
        https://bugs.webkit.org/show_bug.cgi?id=152601

        Reviewed by Daniel Bates.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::actionsForElement): Moving a return value passed to the function by value is redundant, since it
        will be implicitly moved in this case.
        * UIProcess/Cocoa/UIDelegate.mm:
        (WebKit::UIDelegate::UIClient::actionsForElement): Ditto.

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

        Add explicit conversions between scrollOffset and scrollPostion, and use them in a few places
        https://bugs.webkit.org/show_bug.cgi?id=152594

        Reviewed by Sam Weinig.

        Add functions to ScrollableArea to convert between scrollPosition and scrollOffset,
        and use them in places where code did the math with scrollOrigin.

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

2015-12-30  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Clean up TextureMapperAnimation, TextureMapperAnimations
        https://bugs.webkit.org/show_bug.cgi?id=152112

        Reviewed by Darin Adler.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<TextureMapperAnimation>::decode):

2015-12-29  Simon Fraser  <simon.fraser@apple.com>

        Remove ScrollView::scrollOffset() in preparation for scrollOffset vs. scrollPosition clarification
        https://bugs.webkit.org/show_bug.cgi?id=152589

        Reviewed by Sam Weinig.

        Current code uses scrollOffset vs. scrollPosition interchangeably, and confusingly.
        Longer term, I plan to make "scrollPosition" be the value that is relative to the 
        contents, i.e. affected by scrollOrigin, and "scrollOffset" be the zero-based value
        that's used to set scrollbar values.
        
        To prepare for this, remove ScrollView::scrollOffset(), which is just the
        scrollPosition as an IntSize.
        
        Add some typedefs in ScrollableArea, which will slowly propagate through the
        code as position vs. offset is clarified.

        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
        (WebKit::InjectedBundleRangeHandle::renderedImage):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::scrollPosition):
        (WebKit::PDFPlugin::minimumScrollPosition):
        (WebKit::PDFPlugin::maximumScrollPosition):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::scrollOffset):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition):
        (WebKit::WebPage::updateMainFrameScrollOffsetPinning):

2015-12-25  Andy Estes  <aestes@apple.com>

        Stop moving local objects in return statements
        https://bugs.webkit.org/show_bug.cgi?id=152557

        Reviewed by Brady Eidson.

        Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.

        Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
        I found these issues by temporarily replacing WTF::move with std::move and recompiling.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::ExceededDatabaseQuotaRecords::createRecord):

2015-12-26  Joonghun Park  <jh718.park@samsung.com>

        [WK2][EFL] Use eina_file_path_join at platformDefaultIconDatabasePath in WebProcessPoolEfl
        https://bugs.webkit.org/show_bug.cgi?id=152565

        Reviewed by Gyuyoung Kim.

        Use eina_file_path_join and EINA_PATH_SEP_S at platformDefaultIconDatabasePath
        instead of operator+ and separator "/" respectively
        to concatenate paths.

        * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::platformDefaultIconDatabasePath):

2015-12-25  David Kilzer  <ddkilzer@apple.com>

        ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
        <http://webkit.org/b/146391>

        Reviewed by Antti Koivisto.

        * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp:
        (WebKit::platformDownloadNetworkError):
        * NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp:
        (WebKit::platformDownloadNetworkError):
        * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
        (WebKit::DownloadClient::didReceiveResponse):
        * NetworkProcess/Downloads/soup/DownloadSoupErrors.h:
        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
        (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
        (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
        (LoaderClient::didFailProvisionalLoadWithErrorForFrame):
        (LoaderClient::didFailLoadWithErrorForFrame):
        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        (webkit_uri_scheme_request_finish_error):
        * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
        (WebKit::internalError):
        * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
        (WebKit::internalError):
        - Update for type change of 'failingURL' argument to
          ResourceError().

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

        Use "constrainedBetween" in more places
        https://bugs.webkit.org/show_bug.cgi?id=152543

        Reviewed by Zalan Bujtas.

        Replace code that contrains points via shrunkTo/expandedTo() with calls
        to constrainedBetween(), and implement constrainedBetween() on IntPoint,
        FloatPoint and LayoutPoint.

        Convert some functions that return points to more modern syntax.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (constrainContentOffset):

2015-12-22  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] ewk_application_cache_manager test failed after r193812
        https://bugs.webkit.org/show_bug.cgi?id=152498

        Reviewed by Gyuyoung Kim.

        Need to enable the offline_web_application_cache for the ewk_application_cache_manager test.

        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
        (TEST_F):

2015-12-22  Andy Estes  <aestes@apple.com>

        [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
        https://bugs.webkit.org/show_bug.cgi?id=152463

        Reviewed by Alexey Proskuryakov.

        Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward
        declared in CFNetworkSPI.h.

        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        (WebKit::initializeNetworkSettings):
        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::overrideSystemProxies):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

2015-12-22  Brent Fulgham  <bfulgham@apple.com>

        Allow JavaScript to iterate over plugins for local SecurityOrigins
        https://bugs.webkit.org/show_bug.cgi?id=152489

        Reviewed by Alexey Proskuryakov.

        The 'getWebVisiblePluginInfo' is filtering plugins, even when we want to list
        all plugins. To avoid this, we check the Document's SecurityOrigin. If no such
        origin exists, we construct a SecurityOrigin from the URL.
        
        If the relevant SecurityOrigin satsifies 'isLocal', we show all plugins.

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

2015-12-21  Hunseop Jeong  <hs85.jeong@samsung.com>

        [EFL] test_ewk2_context failed after r192808
        https://bugs.webkit.org/show_bug.cgi?id=151846

        Reviewed by Gyuyoung Kim.

        As we can make the single WebProcess behavior by setting the miximum number
        of WebProcess to 1 after r192808, I remove the ewk_context_process_model_{set|get}
        apis and add the ewk_context_web_process_count_limit_{set|get} apis and tests.

        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::EwkContext):
        (EwkContext::setProcessCountLimit):
        (EwkContext::processCountLimit):
        (ewk_context_web_process_count_limit_set):
        (ewk_context_web_process_count_limit_get):
        (EwkContext::setProcessModel): Deleted.
        (EwkContext::processModel): Deleted.
        (ewk_context_process_model_set): Deleted.
        (ewk_context_process_model_get): Deleted.
        * UIProcess/API/efl/ewk_context.h:
        * UIProcess/API/efl/ewk_context_private.h:
        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
        (TEST_F): Changed the ewk_context_{web|network}_process_model tests to
        ewk_context_{web|network}_process_count_limit tests.

2015-12-21  Joonghun Park  <jh718.park@samsung.com>

        [WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
        to refactor APIWebsiteDataStoreEfl
        https://bugs.webkit.org/show_bug.cgi?id=152475

        Reviewed by Gyuyoung Kim.

        Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
        instead of to use efreet_cache_home_get
        and efreet_data_home_get directly.
        And also use EINA_PATH_SEP_S instead of "/" as directory separator,
        and WebCore::pathByAppendingComponent instead of operator+.

        * UIProcess/API/efl/APIWebsiteDataStoreEfl.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):

2015-12-21  Antti Koivisto  <antti@apple.com>

        Factor NetworkResourceLoader code for storing a cache entry into a function
        https://bugs.webkit.org/show_bug.cgi?id=152467

        Reviewed by Andreas Kling.

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

            Having m_cacheEntryForValidation already implies canUseCache() so remove the test from this path.
            Move storing to the end of the function so we don't delay DidFinishResourceLoad message on it.

        (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
        (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

            Factor to a function.
            Remove m_response.isHTTP() test as it is covered by NetworkCache::store().
            Remove !isPrivateSession test as it is covered by NetworkResourceLoader::canUseCache().

        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
        * NetworkProcess/NetworkResourceLoader.h:

2015-12-21  Antti Koivisto  <antti@apple.com>

        Limit cached redirect chain length
        https://bugs.webkit.org/show_bug.cgi?id=152477

        Reviewed by Andreas Kling.

        Networking layer prevents cycles and limits the redirect chain length so creating cache cycles is difficult.
        For robustness the network cache should still limit the maximum redirect chain length.

        This patch adds a limit of five redirects both when storing and retrieving cache entries.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::canUseCache):
        (WebKit::NetworkResourceLoader::canUseCachedRedirect):
        (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
        (WebKit::NetworkResourceLoader::continueWillSendRequest):
        (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
        * NetworkProcess/NetworkResourceLoader.h:

2015-12-21  Dan Bernstein  <mitz@apple.com>

        Different and incorrect flags are passed to sendSync when accessibility is enabled, SpinRunLoopWhileWaitingForReply
        https://bugs.webkit.org/show_bug.cgi?id=126021

        Reviewed by Darin Adler.

        Get rid of SpinRunLoopWhileWaitingForReply because it’s not used anymore.

        * Platform/IPC/Connection.cpp:
        (IPC::Connection::waitForSyncReply): Removed the SpinRunLoopWhileWaitingForReply branch.

        * Platform/IPC/Connection.h: Removed SpinRunLoopWhileWaitingForReply.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): Don’t check
          WebPage::synchronousMessagesShouldSpinRunLoop() and don’t specify
          SpinRunLoopWhileWaitingForReply.
        (WebKit::WebChromeClient::runJavaScriptAlert): Ditto.
        (WebKit::WebChromeClient::runJavaScriptConfirm): Ditto.
        (WebKit::WebChromeClient::runJavaScriptPrompt): Ditto.
        (WebKit::WebChromeClient::print): Ditto.
        (WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
        (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.

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

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::synchronousMessagesShouldSpinRunLoop): Deleted.
        * WebProcess/WebPage/WebPage.h:

2015-12-20  Joonghun Park  <jh718.park@samsung.com>

        [WK2][EFL] Use WebsiteDataStore instead of WebDatabaseManager which has been deleted in r194295
        https://bugs.webkit.org/show_bug.cgi?id=152460

        Reviewed by Gyuyoung Kim.

        Use WebsiteDataStore to support EFL WebDatabase API and to fix build break.

        * PlatformEfl.cmake:
        * UIProcess/API/APIWebsiteDataStore.cpp:
        * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.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/efl/ewk_context.cpp:
        (EwkContext::EwkContext):
        * UIProcess/API/efl/ewk_database_manager.cpp:
        (EwkDatabaseManager::EwkDatabaseManager):
        (EwkDatabaseManager::getDatabaseOrigins):
        * UIProcess/API/efl/ewk_database_manager_private.h:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
        (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):

2015-12-20  Dan Bernstein  <mitz@apple.com>

        Remove unused setToolbarHeight
        https://bugs.webkit.org/show_bug.cgi?id=152466

        Reviewed by Darin Adler.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::setToolbarHeight): Deleted.
        * UIProcess/WebInspectorProxy.messages.in:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::setToolbarHeight): Deleted.
        * WebProcess/WebPage/WebInspectorUI.h:

2015-12-19  Dan Bernstein  <mitz@apple.com>

        [Mac] WebKit contains dead source code for OS X Mavericks and earlier
        https://bugs.webkit.org/show_bug.cgi?id=152462

        Reviewed by Alexey Proskuryakov.

        - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
          that became uniform across all OS X versions as a result:

        * Configurations/BaseTarget.xcconfig:
        * Configurations/BaseXPCService.xcconfig:
        * Configurations/DebugRelease.xcconfig:
        * Configurations/FeatureDefines.xcconfig:
        * Configurations/Version.xcconfig:
        * Configurations/WebKit.xcconfig:

        - Removed the definition of BUNDLE_LOCALIZATION_KEY:

        * Configurations/WebContentService.Development.xcconfig:
        * Configurations/WebContentService.xcconfig:

        - Added CFBundleFollowParentLocalization set to true:

        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

        * WebKit2.xcodeproj/project.pbxproj: Removed the “Add CFBundle Localization Info.plist Key”
          script build phases from the Web Content Service targets.

        - Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
          never getting compiled:

        * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
        * Platform/IPC/mac/ConnectionMac.mm:
        * Platform/IPC/mac/ImportanceAssertion.h:
        * Platform/mac/MenuUtilities.h:
        * Platform/mac/MenuUtilities.mm:
        * Platform/mac/StringUtilities.h:
        * Platform/mac/StringUtilities.mm:
        * Shared/API/Cocoa/WKFoundation.h:
        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * UIProcess/mac/PageClientImpl.mm:
        * UIProcess/mac/WKImmediateActionController.h:
        * UIProcess/mac/WKImmediateActionController.mm:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        * WebProcess/WebPage/FindController.cpp:
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/com.apple.WebProcess.sb.in:
        * config.h:

2015-12-18  Antti Koivisto  <antti@apple.com>

        Cache redirects as separate entries
        https://bugs.webkit.org/show_bug.cgi?id=152424

        Reviewed by Alex Christensen.

        We are currently caching redirect chains. This has correctness issues and can be inefficient in cases
        where multiple URLs redirect to the same destination.

        After this patch we write a cache entry for each redirect individually.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
        * NetworkProcess/NetworkLoad.h:
        (WebKit::NetworkLoad::currentRequest):
        (WebKit::NetworkLoad::clearCurrentRequest):
        * NetworkProcess/NetworkLoadClient.h:

            Add original request as a parameter for willSendRedirectedRequest.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
        (WebKit::NetworkResourceLoader::canUseCache):

            Factor to a function.

        (WebKit::NetworkResourceLoader::isSynchronous):
        (WebKit::NetworkResourceLoader::start):
        (WebKit::NetworkResourceLoader::retrieveCacheEntry):

            Factor to a function.
            Call dispatchWillSendRequestForCacheEntry for cached redirects.

        (WebKit::NetworkResourceLoader::startNetworkLoad):

            Make this take request as argument instead of always loading originalRequest().

        (WebKit::NetworkResourceLoader::abort):
        (WebKit::NetworkResourceLoader::didFinishLoading):

            Remove redirect chain code.
            Store cache entry for current request instead of the original request.

        (WebKit::NetworkResourceLoader::didFailLoading):
        (WebKit::NetworkResourceLoader::willSendRedirectedRequest):

            Write cache entry for redirect.

        (WebKit::NetworkResourceLoader::continueWillSendRequest):

            If we are playing back cached redirect continue with another cache lookup.

        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

            No need to synthesize fake willSendRequest anymore.

        (WebKit::NetworkResourceLoader::validateCacheEntry):
        (WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):

            Route via web process willSendRequest so cached redirects looks exactly like network ones.

        (WebKit::NetworkResourceLoader::messageSenderConnection):
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::makeUseDecision):

            Ignore validation headers for cached redirects.

        (WebKit::NetworkCache::makeRetrieveDecision):
        (WebKit::NetworkCache::makeStoreDecision):
        (WebKit::NetworkCache::Cache::retrieve):
        (WebKit::NetworkCache::Cache::store):

            Rename originalRequest -> request since it is not really the original request anymore in all cases.

        (WebKit::NetworkCache::Cache::storeRedirect):

            Stored redirects include the network layer generated ResourceRequest instead of body data.

        (WebKit::NetworkCache::Cache::update):
        * NetworkProcess/cache/NetworkCache.h:
        * NetworkProcess/cache/NetworkCacheEntry.cpp:
        (WebKit::NetworkCache::Entry::Entry):

            New constructor for making redirect entries.

        (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
        (WebKit::NetworkCache::Entry::decodeStorageRecord):

            Encoding support.

        * NetworkProcess/cache/NetworkCacheEntry.h:
        (WebKit::NetworkCache::Entry::varyingRequestHeaders):
        (WebKit::NetworkCache::Entry::redirectRequest):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
        (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
        (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
        (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):

2015-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        Avoid triggering clang's -Wundefined-bool-conversion
        https://bugs.webkit.org/show_bug.cgi?id=152408

        Reviewed by Mark Lam.

        Use ASSERT_THIS_GC_OBJECT_INHERITS where needed.

        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
        (WebKit::JSNPObject::callMethod):
        (WebKit::JSNPObject::callObject):
        (WebKit::JSNPObject::callConstructor):
        (WebKit::JSNPObject::deleteProperty):

2015-12-15  Anders Carlsson  <andersca@apple.com>

        Get rid of WebDatabaseManager, it's been replaced by WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=152318

        Reviewed by Tim Horton.

        Build fixes by Ossy.

        * DerivedSources.make:
        * Shared/API/APIObject.h:
        * Shared/API/c/WKBase.h:
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetDatabaseManager): Deleted.
        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/C/WKDatabaseManager.cpp: Removed.
        (WKDatabaseManagerGetTypeID): Deleted.
        (WKDatabaseManagerGetOriginKey): Deleted.
        (WKDatabaseManagerGetOriginQuotaKey): Deleted.
        (WKDatabaseManagerGetOriginUsageKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsNameKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey): Deleted.
        (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey): Deleted.
        (WKDatabaseManagerSetClient): Deleted.
        (WKDatabaseManagerGetDatabasesByOrigin): Deleted.
        (WKDatabaseManagerGetDatabaseOrigins): Deleted.
        (WKDatabaseManagerDeleteDatabasesWithNameForOrigin): Deleted.
        (WKDatabaseManagerDeleteDatabasesForOrigin): Deleted.
        (WKDatabaseManagerDeleteAllDatabases): Deleted.
        (WKDatabaseManagerSetQuotaForOrigin): Deleted.
        * UIProcess/API/C/WKDatabaseManager.h: Removed.
        * UIProcess/WebDatabaseManagerProxy.cpp: Removed.
        (WebKit::WebDatabaseManagerProxy::supplementName): Deleted.
        (WebKit::WebDatabaseManagerProxy::originKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::originQuotaKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::originUsageKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsCreationTimeKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::databaseDetailsModificationTimeKey): Deleted.
        (WebKit::WebDatabaseManagerProxy::create): Deleted.
        (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy): Deleted.
        (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy): Deleted.
        (WebKit::WebDatabaseManagerProxy::initializeClient): Deleted.
        (WebKit::WebDatabaseManagerProxy::processPoolDestroyed): Deleted.
        (WebKit::WebDatabaseManagerProxy::processDidClose): Deleted.
        (WebKit::WebDatabaseManagerProxy::shouldTerminate): Deleted.
        (WebKit::WebDatabaseManagerProxy::refWebContextSupplement): Deleted.
        (WebKit::WebDatabaseManagerProxy::derefWebContextSupplement): Deleted.
        (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): Deleted.
        (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins): Deleted.
        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::deleteAllDatabases): Deleted.
        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::didModifyOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxy::didModifyDatabase): Deleted.
        * UIProcess/WebDatabaseManagerProxy.h: Removed.
        * UIProcess/WebDatabaseManagerProxy.messages.in: Removed.
        * UIProcess/WebDatabaseManagerProxyClient.cpp: Removed.
        (WebKit::WebDatabaseManagerProxyClient::didModifyOrigin): Deleted.
        (WebKit::WebDatabaseManagerProxyClient::didModifyDatabase): Deleted.
        * UIProcess/WebDatabaseManagerProxyClient.h: Removed.
        * UIProcess/WebProcessPool.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Removed.
        (WebKit::WebDatabaseManager::supplementName): Deleted.
        (WebKit::WebDatabaseManager::WebDatabaseManager): Deleted.
        (WebKit::WebDatabaseManager::initialize): Deleted.
        (WebKit::WebDatabaseManager::getDatabasesByOrigin): Deleted.
        (WebKit::WebDatabaseManager::getDatabaseOrigins): Deleted.
        (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): Deleted.
        (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): Deleted.
        (WebKit::WebDatabaseManager::deleteAllDatabases): Deleted.
        (WebKit::WebDatabaseManager::closeAllDatabases): Deleted.
        (WebKit::WebDatabaseManager::setQuotaForOrigin): Deleted.
        (WebKit::WebDatabaseManager::dispatchDidModifyOrigin): Deleted.
        (WebKit::WebDatabaseManager::dispatchDidModifyDatabase): Deleted.
        * WebProcess/WebCoreSupport/WebDatabaseManager.h: Removed.
        * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Removed.
        * WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm: Removed.
        (WebKit::WebDatabaseManager::dispatchDidAddNewOrigin): Deleted.
        (WebKit::WebDatabaseManager::dispatchDidDeleteDatabase): Deleted.
        (WebKit::WebDatabaseManager::dispatchDidDeleteDatabaseOrigin): Deleted.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::processWillSuspendImminently):
        (WebKit::m_webSQLiteDatabaseTracker): Deleted.

2015-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Unreviewed, fix GtkDoc after r193620

        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

2015-12-18  Dan Bernstein  <mitz@apple.com>

        WebPage::didCompleteUserMediaPermissionCheck and WebPage::didReceiveUserMediaPermissionDecision are exported
        https://bugs.webkit.org/show_bug.cgi?id=152429

        Reviewed by Tim Horton.

        * WebProcess/WebPage/WebPage.h: Removed WK_EXPORT specifiers from these two declarations.

2015-12-18  Alex Christensen  <achristensen@webkit.org>

        Move networking code from Shared to NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=152421

        Reviewed by Antti Koivisto.

        Since recently removing the non-NetworkProcess configurations, this code is no longer shared with the WebProcess.

        * CMakeLists.txt:
        * DerivedSources.make:
        * NetworkProcess/CustomProtocols: Copied from Source/WebKit2/Shared/Network/CustomProtocols.
        * NetworkProcess/Downloads: Copied from Source/WebKit2/Shared/Downloads.
        * NetworkProcess/Downloads/Download.cpp: Copied from Source/WebKit2/Shared/Downloads/Download.cpp.
        * NetworkProcess/Downloads/Download.h: Copied from Source/WebKit2/Shared/Downloads/Download.h.
        * NetworkProcess/Downloads/DownloadID.h: Copied from Source/WebKit2/Shared/Downloads/DownloadID.h.
        * NetworkProcess/Downloads/DownloadManager.cpp: Copied from Source/WebKit2/Shared/Downloads/DownloadManager.cpp.
        * NetworkProcess/Downloads/DownloadManager.h: Copied from Source/WebKit2/Shared/Downloads/DownloadManager.h.
        * NetworkProcess/NetworkProcessCreationParameters.cpp: Copied from Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp.
        * NetworkProcess/NetworkProcessCreationParameters.h: Copied from Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h.
        * NetworkProcess/NetworkProcessSupplement.h: Copied from Source/WebKit2/Shared/Network/NetworkProcessSupplement.h.
        * NetworkProcess/NetworkResourceLoadParameters.cpp: Copied from Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp.
        * NetworkProcess/NetworkResourceLoadParameters.h: Copied from Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h.
        * PlatformEfl.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * Shared/Downloads: Removed.
        * Shared/Downloads/Download.cpp: Removed.
        * Shared/Downloads/Download.h: Removed.
        * Shared/Downloads/DownloadAuthenticationClient.cpp: Removed.
        * Shared/Downloads/DownloadAuthenticationClient.h: Removed.
        * Shared/Downloads/DownloadID.h: Removed.
        * Shared/Downloads/DownloadManager.cpp: Removed.
        * Shared/Downloads/DownloadManager.h: Removed.
        * Shared/Downloads/cocoa: Removed.
        * Shared/Downloads/cocoa/DownloadCocoa.mm: Removed.
        * Shared/Downloads/efl: Removed.
        * Shared/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
        * Shared/Downloads/gtk: Removed.
        * Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp: Removed.
        * Shared/Downloads/ios: Removed.
        * Shared/Downloads/ios/DownloadIOS.mm: Removed.
        * Shared/Downloads/mac: Removed.
        * Shared/Downloads/mac/DownloadMac.mm: Removed.
        * Shared/Downloads/soup: Removed.
        * Shared/Downloads/soup/DownloadSoup.cpp: Removed.
        * Shared/Downloads/soup/DownloadSoupErrors.h: Removed.
        * Shared/Network: Removed.
        * Shared/Network/CustomProtocols: Removed.
        * Shared/Network/CustomProtocols/Cocoa: Removed.
        * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: Removed.
        * Shared/Network/CustomProtocols/CustomProtocolManager.h: Removed.
        * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Removed.
        * Shared/Network/CustomProtocols/soup: Removed.
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: Removed.
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: Removed.
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Removed.
        * Shared/Network/NetworkProcessCreationParameters.cpp: Removed.
        * Shared/Network/NetworkProcessCreationParameters.h: Removed.
        * Shared/Network/NetworkProcessSupplement.h: Removed.
        * Shared/Network/NetworkResourceLoadParameters.cpp: Removed.
        * Shared/Network/NetworkResourceLoadParameters.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2015-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>

        LayerTreeHostGtk triggers -Wunused-private-field
        https://bugs.webkit.org/show_bug.cgi?id=152410

        Reviewed by Carlos Garcia Campos.

        Remove the unused member variable.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

2015-12-18  Alex Christensen  <achristensen@webkit.org>

        Add types for DownloadID and TaskIdentifier
        https://bugs.webkit.org/show_bug.cgi?id=152401

        Reviewed by Brady Eidson.

        DownloadID and TaskIdentifier used to both be just uint64_t's.
        It is confusing to distinguish between them, so now they both have names.
        We need a HashMap<TaskIdentifier, DownloadID> instead of a HashMap<uint64_t, uint64_t>.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::storageSession):
        (WebKit::NetworkConnectionToWebProcess::startDownload):
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        (WebKit::NetworkProcess::downloadRequest):
        (WebKit::NetworkProcess::resumeDownload):
        (WebKit::NetworkProcess::cancelDownload):
        (WebKit::NetworkProcess::getNetworkProcessStatistics):
        (WebKit::NetworkProcess::logDiagnosticMessage):
        (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
        (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::createDataTaskWithRequest):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkDataTask::resume):
        (WebKit::NetworkDataTask::taskIdentifier): Deleted.
        * Shared/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::messageSenderDestinationID):
        * Shared/Downloads/Download.h:
        (WebKit::Download::downloadID):
        * Shared/Downloads/DownloadID.h: Added.
        (WebKit::DownloadID::DownloadID):
        (WebKit::DownloadID::operator==):
        (WebKit::DownloadID::downloadID):
        (IPC::ArgumentCoder<WebKit::DownloadID>::encode):
        (IPC::ArgumentCoder<WebKit::DownloadID>::decode):
        (WTF::DownloadIDHash::hash):
        (WTF::DownloadIDHash::equal):
        (WTF::HashTraits<WebKit::DownloadID>::emptyValue):
        (WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue):
        (WTF::HashTraits<WebKit::DownloadID>::isDeletedValue):
        * Shared/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::DownloadManager):
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::convertHandleToDownload):
        (WebKit::DownloadManager::resumeDownload):
        (WebKit::DownloadManager::cancelDownload):
        * Shared/Downloads/DownloadManager.h:
        (WebKit::DownloadManager::isDownloading):
        * UIProcess/API/C/WKDownload.cpp:
        (WKDownloadGetID):
        (WKDownloadCopyRequest):
        * UIProcess/Downloads/DownloadProxy.h:
        (WebKit::DownloadProxy::downloadID):
        (WebKit::DownloadProxy::request):
        (WebKit::DownloadProxy::resumeData):
        * UIProcess/Downloads/DownloadProxyMap.cpp:
        (WebKit::DownloadProxyMap::createDownloadProxy):
        (WebKit::DownloadProxyMap::downloadFinished):
        (WebKit::DownloadProxyMap::processDidClose):
        * UIProcess/Downloads/DownloadProxyMap.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::receivedPolicyDecision):
        (WebKit::WebPageProxy::frameDidBecomeFrameSet):
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::decidePolicyForResponseSync):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::invalidatePolicyListener):
        (WebKit::WebFrame::didReceivePolicyDecision):
        (WebKit::WebFrame::startDownload):
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        * WebProcess/WebPage/WebFrame.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setSessionID):
        (WebKit::WebPage::didReceivePolicyDecision):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

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

        Fixed a typo from r194022.

        * Configurations/WebKit.xcconfig: Changed PlugInProcessShim.dylib to PluginProcessShim.dylib.

2015-12-17  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r194250 and r194254.
        https://bugs.webkit.org/show_bug.cgi?id=152414

        broke api tests (Requested by alexchristensen on #webkit).

        Reverted changesets:

        "Add types for DownloadID and TaskIdentifier"
        https://bugs.webkit.org/show_bug.cgi?id=152401
        http://trac.webkit.org/changeset/194250

        "Build fix after r194250"
        http://trac.webkit.org/changeset/194254

2015-12-17  Alex Christensen  <achristensen@webkit.org>

        Build fix after r194250

        * WebKit2.xcodeproj/project.pbxproj:
        Change target membership from all to WebKit.

2015-12-17  Alex Christensen  <achristensen@webkit.org>

        Add types for DownloadID and TaskIdentifier
        https://bugs.webkit.org/show_bug.cgi?id=152401

        Reviewed by Brady Eidson.

        DownloadID and TaskIdentifier used to both be just uint64_t's.
        It is confusing to distinguish between them, so now they both have names.
        We need a HashMap<TaskIdentifier, DownloadID> instead of a HashMap<uint64_t, uint64_t>.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::storageSession):
        (WebKit::NetworkConnectionToWebProcess::startDownload):
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
        (WebKit::NetworkProcess::downloadRequest):
        (WebKit::NetworkProcess::resumeDownload):
        (WebKit::NetworkProcess::cancelDownload):
        (WebKit::NetworkProcess::getNetworkProcessStatistics):
        (WebKit::NetworkProcess::logDiagnosticMessage):
        (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
        (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (WebKit::NetworkSession::createDataTaskWithRequest):
        (WebKit::NetworkSession::dataTaskForIdentifier):
        (WebKit::NetworkDataTask::resume):
        (WebKit::NetworkDataTask::taskIdentifier): Deleted.
        * Shared/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::messageSenderDestinationID):
        * Shared/Downloads/Download.h:
        (WebKit::Download::downloadID):
        * Shared/Downloads/DownloadID.h: Added.
        (WebKit::DownloadID::DownloadID):
        (WebKit::DownloadID::operator==):
        (WebKit::DownloadID::downloadID):
        (IPC::ArgumentCoder<WebKit::DownloadID>::encode):
        (IPC::ArgumentCoder<WebKit::DownloadID>::decode):
        (WTF::DownloadIDHash::hash):
        (WTF::DownloadIDHash::equal):
        (WTF::HashTraits<WebKit::DownloadID>::emptyValue):
        (WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue):
        (WTF::HashTraits<WebKit::DownloadID>::isDeletedValue):
        * Shared/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::DownloadManager):
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::convertHandleToDownload):
        (WebKit::DownloadManager::resumeDownload):
        (WebKit::DownloadManager::cancelDownload):
        * Shared/Downloads/DownloadManager.h:
        (WebKit::DownloadManager::isDownloading):
        * UIProcess/API/C/WKDownload.cpp:
        (WKDownloadGetID):
        (WKDownloadCopyRequest):
        * UIProcess/Downloads/DownloadProxy.h:
        (WebKit::DownloadProxy::downloadID):
        (WebKit::DownloadProxy::request):
        (WebKit::DownloadProxy::resumeData):
        * UIProcess/Downloads/DownloadProxyMap.cpp:
        (WebKit::DownloadProxyMap::createDownloadProxy):
        (WebKit::DownloadProxyMap::downloadFinished):
        (WebKit::DownloadProxyMap::processDidClose):
        * UIProcess/Downloads/DownloadProxyMap.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::receivedPolicyDecision):
        (WebKit::WebPageProxy::frameDidBecomeFrameSet):
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::decidePolicyForResponseSync):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::invalidatePolicyListener):
        (WebKit::WebFrame::didReceivePolicyDecision):
        (WebKit::WebFrame::startDownload):
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        * WebProcess/WebPage/WebFrame.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setSessionID):
        (WebKit::WebPage::didReceivePolicyDecision):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2015-12-17  Simon Fraser  <simon.fraser@apple.com>

        Disable viewport "shrink to fit" outside of multitasking mode
        https://bugs.webkit.org/show_bug.cgi?id=152403
        rdar://problem/23818102

        Reviewed by Tim Horton.
        
        Plumb through a value that indicates whether the WKWebView is in split screen,
        and use it to conditionally enable shrink-to-fit mode only in split screen.
        
        * Shared/VisibleContentRectUpdateInfo.cpp: Added m_allowShrinkToFit, and sort
        the member variables, and encoding order, to optimize packing, with some initializers.
        (WebKit::VisibleContentRectUpdateInfo::encode):
        (WebKit::VisibleContentRectUpdateInfo::decode):
        * Shared/VisibleContentRectUpdateInfo.h:
        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
        (WebKit::VisibleContentRectUpdateInfo::allowShrinkToFit):
        (WebKit::operator==):
        * UIProcess/API/Cocoa/WKWebView.mm: Add _allowsViewportShrinkToFit member variable,
        with getter and setter.
        (-[WKWebView _updateVisibleContentRects]): Unwrap the line.
        (-[WKWebView _setAllowsViewportShrinkToFit:]):
        (-[WKWebView _allowsViewportShrinkToFit]):
        * UIProcess/API/Cocoa/WKWebViewPrivate.h: _allowsViewportShrinkToFit SPI.
        * UIProcess/WebPageProxy.h: Pass allowShrinkToFit through.
        * UIProcess/ios/WKContentView.mm: Ditto.
        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::updateVisibleContentRects): Padd allowShrinkToFit to the web process via the VisibleContentRectUpdateInfo.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Store m_ignoreViewportScalingConstraints in a member variable since we can't
        get back to the prefs later.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects): This is the behavior change: call setCanIgnoreScalingConstraints()
        on the viewport configuration, consulting the pref (via m_ignoreViewportScalingConstraints) and the new
        visibleContentRectUpdateInfo.allowShrinkToFit().

2015-12-16  Simon Fraser  <simon.fraser@apple.com>

        ViewportConfiguration functions should return a bool to say if anything changed
        https://bugs.webkit.org/show_bug.cgi?id=152353

        Reviewed by Tim Horton.

        Rather than callers all checking whether setting ViewportConfiguration values
        changes state, have its functions return a bool if the values change.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::mainFrameDidLayout):
        (WebKit::WebPage::didCommitLoad):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::viewportPropertiesDidChange):
        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):

2015-12-16  Alex Christensen  <achristensen@webkit.org>

        Progress towards implementing downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=152371

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::downloadRequest):
        (WebKit::NetworkProcess::resumeDownload):
        (WebKit::NetworkProcess::cancelDownload):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/NetworkProcess.messages.in:
        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        * Shared/Authentication/AuthenticationManager.h:
        * Shared/Downloads/Download.cpp:
        (WebKit::Download::Download):
        (WebKit::Download::didReceiveAuthenticationChallenge):
        * Shared/Downloads/Download.h:
        * Shared/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::startDownload):
        (WebKit::DownloadManager::convertHandleToDownload):
        (WebKit::DownloadManager::resumeDownload):
        (WebKit::DownloadManager::cancelDownload):
        (WebKit::DownloadManager::downloadFinished):
        (WebKit::DownloadManager::didCreateDownload):
        * Shared/Downloads/DownloadManager.h:
        * Shared/Downloads/cocoa: Added.
        * Shared/Downloads/cocoa/DownloadCocoa.mm: Added.
        (WebKit::Download::start):
        (WebKit::Download::resume):
        (WebKit::Download::cancel):
        (WebKit::Download::platformInvalidate):
        * Shared/Downloads/ios/DownloadIOS.mm:
        * Shared/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::start):
        (WebKit::Download::startWithHandle):
        (WebKit::Download::resume):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::resumeDownload):
        * UIProcess/WebProcessPool.h:
        * WebKit2.xcodeproj/project.pbxproj:

2015-12-16  Simon Fraser  <simon.fraser@apple.com>

        ViewportConfiguration functions should return a bool to say if anything changed
        https://bugs.webkit.org/show_bug.cgi?id=152353

        Reviewed by Tim Horton.

        Rather than callers all checking whether setting ViewportConfiguration values
        changes state, have its functions return a bool if the values change.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::mainFrameDidLayout):
        (WebKit::WebPage::didCommitLoad):
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::viewportPropertiesDidChange):
        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):

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

        REGRESSION (r191299): Zoom gestures are enabled even if allowsMagnification=NO
        https://bugs.webkit.org/show_bug.cgi?id=152373
        <rdar://problem/23931998>

        Reviewed by Simon Fraser.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
        Don't pass the event on to ViewGestureController if we shouldn't handle it,
        just like we would have done in magnifyWithEvent before.

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

        REGRESSION (r194125): Crashes in touchesEndedWithEvent on occasion when interacting with the page
        https://bugs.webkit.org/show_bug.cgi?id=152366
        <rdar://problem/23929672>

        Reviewed by Beth Dakin.

        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::touchesEndedWithEvent):
        (WebKit::WebViewImpl::touchesCancelledWithEvent):
        NSTouch identifiers aren't pointer-comparable. We need to use isEqual to
        compare them and find the ones to remove.

2015-12-16  Simon Fraser  <simon.fraser@apple.com>

        Simplify isOverlayScrollbar() logic
        https://bugs.webkit.org/show_bug.cgi?id=152357

        Reviewed by Beth Dakin.

        Replace code that checks for isOverlayScrollbar() explicitly with calls to new
        occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay
        scrollbar check internally.
        
        Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth
        and occupiedHeight of any scrollbars, and use it in a few places.

        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::updateScrollbars):
        (WebKit::PDFPlugin::maximumScrollPosition):

2015-12-16  Alex Christensen  <achristensen@webkit.org>

        Build fix when using NETWORK_SESSION after r193972.

        Rubber-stamped by Joseph Pecoraro.

        Renamed NetworkSessionDelegate to WKNetworkSessionDelegate to conform to the 
        newly-enforced style rule in check-for-inappropriate-objc-class-names.

        * NetworkProcess/NetworkSession.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (toNSURLSessionAuthChallengeDisposition):
        (-[WKNetworkSessionDelegate initWithNetworkSession:]):
        (WebKit::NetworkSession::NetworkSession):
        (-[NetworkSessionDelegate initWithNetworkSession:]): Deleted.

2015-12-16  Alex Christensen  <achristensen@webkit.org>

        Implement Web Timing when using NETWORK_SESSION
        https://bugs.webkit.org/show_bug.cgi?id=152285

        Reviewed by Darin Adler.

        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
        (WebKit::NetworkSession::NetworkSession):
        Use functions moved to ResourceLoadTiming.h.  setCollectsTimingData is for Mavericks, _timingDataOptions is post-Mavericks.

2015-12-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>

        [Fetch API] Add fetch API compile time flag
        https://bugs.webkit.org/show_bug.cgi?id=152254

        Reviewed by Darin Adler.

        * Configurations/FeatureDefines.xcconfig:

2015-12-15  Tim Horton  <timothy_horton@apple.com>

        [Mac] Gesture Events should not have negative scale
        https://bugs.webkit.org/show_bug.cgi?id=151065
        <rdar://problem/23474123>

        Reviewed by Anders Carlsson.

        * Shared/NativeWebGestureEvent.h:
        * Shared/mac/NativeWebGestureEventMac.mm:
        (WebKit::distanceForTouches):
        (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
        Compute the distance between the two oldest touches, and use that as
        the scale (really the gesture diameter) on the event, instead of
        passing through AppKit's magnification (which is computed differently).
        This matches the documented behavior of the existing gesture events on iOS.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView touchesBeganWithEvent:]):
        (-[WKWebView touchesMovedWithEvent:]):
        (-[WKWebView touchesEndedWithEvent:]):
        (-[WKWebView touchesCancelledWithEvent:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView touchesBeganWithEvent:]):
        (-[WKView touchesMovedWithEvent:]):
        (-[WKView touchesEndedWithEvent:]):
        (-[WKView touchesCancelledWithEvent:]):
        Plumb touch events through to WebViewImpl.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::WebViewImpl):
        (WebKit::WebViewImpl::magnifyWithEvent):
        (WebKit::WebViewImpl::touchesOrderedByAge):
        (WebKit::WebViewImpl::touchesBeganWithEvent):
        (WebKit::WebViewImpl::touchesMovedWithEvent):
        (WebKit::WebViewImpl::touchesEndedWithEvent):
        (WebKit::WebViewImpl::touchesCancelledWithEvent):
        (WebKit::WebViewImpl::rotateWithEvent):
        Keep track of the most recent incoming touches, by identifier, in age order.
        Pass them through to NativeWebGestureEvent so it can determine the gesture diameter.

2015-12-15  Anders Carlsson  <andersca@apple.com>

        Call DatabaseManager directly from WKBundle.cpp
        https://bugs.webkit.org/show_bug.cgi?id=152317

        Reviewed by Tim Horton.

        This is in preparation for getting rid of some old database manager code.

        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
        (WKBundleClearAllDatabases):
        (WKBundleSetDatabaseQuota):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::clearAllDatabases): Deleted.
        (WebKit::InjectedBundle::setDatabaseQuota): Deleted.
        * WebProcess/InjectedBundle/InjectedBundle.h:

2015-12-15  Daniel Bates  <dabates@apple.com>

        Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTURE_MAPPER)
        https://bugs.webkit.org/show_bug.cgi?id=152265

        Reviewed by Tim Horton.

        We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes
        use of this class as applicable. This also fixes the iOS Simulator build when using
        Apple Internal software.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost.
        * WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER).
        * WebProcess/WebPage/LayerTreeHost.h: Ditto.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scalePage): Ditto.
        (WebKit::WebPage::setDeviceScaleFactor): Ditto.
        * WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use
        of the enum class LayerHostingMode.
        * WebProcess/WebPage/ios/WebPageIOS.mm:
        (WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always
        returns nullptr on iOS.

2015-12-15  Zan Dobersek  <zdobersek@igalia.com>

        [TexMap] Operate with a reference to the TextureMapper wherever possible
        https://bugs.webkit.org/show_bug.cgi?id=152118

        Reviewed by Martin Robinson.

        Replace pointers to the TextureMapper object with references.

        * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
        (WebKit::CoordinatedBackingStoreTile::swapBuffers):
        (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper):
        (WebKit::CoordinatedBackingStore::paintToTextureMapper):
        (WebKit::CoordinatedBackingStore::drawBorder):
        (WebKit::CoordinatedBackingStore::drawRepaintCounter):
        (WebKit::CoordinatedBackingStore::commitTileOperations):
        * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
        (WebKit::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):

2015-12-14  YongGeol Jung  <yg48.jung@samsung.com>

        [Coordinated Graphics] CSS transition effect is not shown when transformed with "%" unit.
        https://bugs.webkit.org/show_bug.cgi?id=152278

        Reviewed by Darin Adler.

        boxSize is encoded as FloatSize type but decoded as IntSize type.
        So boxSize gets invalid value after decoding.
        Due to this layer goes to out of screen during animation.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (IPC::ArgumentCoder<TextureMapperAnimation>::decode):

2015-12-14  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/23886216> REGRESSION (r194022): Production builds of PluginProcess crash on launch when not installed in /System
        https://bugs.webkit.org/show_bug.cgi?id=152291

        Reviewed by Darin Adler.

        * Configurations/PluginProcess.xcconfig: Added a FIXME.
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::addDYLDEnvironmentAdditions): Set DYLD_LIBRARY_PATH to point to where the shims
        are. This is needed because starting in El Capitan, the processes’ main executables link
        directly against the shims, so the dynamic linker needs to be able to find them in the
        non-/System location. Also added a FIXME about not having to set DYLD_INSERT_LIBRARIES when
        the main executables link the them directly.

2015-12-14  Simon Fraser  <simon.fraser@apple.com>

        Dump some more data in the RemoteLayerTreeTransaction
        https://bugs.webkit.org/show_bug.cgi?id=152283

        Reviewed by Dean Jackson.
        
        Dump some scale factors, viewport meta tag width and render tree size.

        * Shared/mac/RemoteLayerTreeTransaction.mm:
        (WebKit::RemoteLayerTreeTransaction::description):

2015-12-14  Tim Horton  <timothy_horton@apple.com>

        Frequent crash under -[WKPDFView web_setMinimumSize:]_block_invoke
        https://bugs.webkit.org/show_bug.cgi?id=152266
        <rdar://problem/22092676>

        Reviewed by Simon Fraser.

        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView web_setMinimumSize:]):
        We weren't retaining the UIScrollView, but depending on it surviving
        into this block's invocation.

        We don't need to do this asynchronously anymore because the referenced
        bug is fixed, so make it happen synchronously. This also fixes the crash
        because there's no opportunity for the scroll view to be released.

2015-12-14  Tim Horton  <timothy_horton@apple.com>

        TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate() sets fence port on context twice
        https://bugs.webkit.org/show_bug.cgi?id=152239
        <rdar://problem/22893289>

        Reviewed by Darin Adler.

        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
        No need to setFencePort; createFencePort also installs it on the creating context.

2015-12-12  Alex Christensen  <achristensen@webkit.org>

        Use existing code for redirects when using NETWORK_SESSION
        https://bugs.webkit.org/show_bug.cgi?id=152207
        rdar://problem/23860624

        Reviewed by Darin Adler.
        
        This fixes http/tests/cookies/set-cookie-on-redirect.html when using NETWORK_SESSION.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::continueWillSendRequest):
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::didReceiveChallenge):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:

2015-12-13  Tim Horton  <timothy_horton@apple.com>

        Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback
        https://bugs.webkit.org/show_bug.cgi?id=150988
        <rdar://problem/18993594>

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::createSelectionSnapshot):
        Adopt sinkIntoImage and drawConsumingImageBuffer in a few places.

2015-12-13  Dan Bernstein  <mitz@apple.com>

        Another fix after r194018.

        * Configurations/BaseTarget.xcconfig:
        * Configurations/BaseXPCService.xcconfig:

2015-12-13  Dan Bernstein  <mitz@apple.com>

        [Mac] Shims used by XPC services are installed inside legacy process bundles
        https://bugs.webkit.org/show_bug.cgi?id=152233

        Reviewed by Sam Weinig.

        Have the shim dylibs installed in the framework’s Frameworks directory instead.

        * Configurations/BaseLegacyProcess.xcconfig: Simplified now that EXCLUDED_SHIM_FILE_NAME is
          no longer defined, because shims aren’t copied into legacy processes.

        * Configurations/NetworkProcess.xcconfig: Removed definition of EXCLUDED_SHIM_FILE_NAME.
        * Configurations/PluginProcess.xcconfig: Ditto.
        * Configurations/WebContentProcess.xcconfig: Ditto.

        * Configurations/Shim.xcconfig: Install the shims when building for OS X. Added definitions
          of INSTALL_PATH and DYLIB_INSTALL_NAME_BASE which are now common to all shims.

        * Configurations/PluginProcessShim.xcconfig: Removed definitions of INSTALL_PATH and
          DYLIB_INSTALL_NAME_BASE from here, now that they are defined for all shims in
          Shim.xcconfig.
        * Configurations/SecItemShim.xcconfig: Ditto.
        * Configurations/WebProcessShim.xcconfig:

        * Configurations/WebKit.xcconfig: Added the shims to EXCLUDED_SOURCE_FILE_NAMES for iOS.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed
          the value of DYLD_INSERT_LIBRARIES to point to the shim’s new location.
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::computeProcessShimPath): Changed to return the new paths, which are all inside the
          framework’s Frameworks directory.

        * WebKit2.xcodeproj/project.pbxproj:
        - Removed references to WRAPPER_NAME from the “Copy XPC services for engineering builds”
          build phase in the All target, becase WRAPPER_NAME is empty in an aggregate target.
        - Removed the PlugInProcess target’s dependency on the PluginProcessShim target and its
          Copy Plug-in Process Shim build phase.
        - Removed the NetworkProcess target’s dependency on the SecItemShim target and its Copy
          Sec Item Shim build phase.
        - Removed the WebProcess target’s dependency on the WebProcessShim target and its Copy
          WebProcessShim build phase.
        - Made the WebKit target depend on the shim targets, and added to it a Copy Shims build
          phase that copies the shims into the framework’s Frameworks directory.

2015-12-13  Dan Bernstein  <mitz@apple.com>

        Build fix.

        * Configurations/PluginProcess.xcconfig:

2015-12-13  Dan Bernstein  <mitz@apple.com>

        [Mac] Shims aren’t inserted properly on Yosemite when building with the El Capitan SDK
        https://bugs.webkit.org/show_bug.cgi?id=152229

        Reviewed by Darin Adler.

        * Configurations/BaseTarget.xcconfig: Defined WK_LINK_SHIM on OS X to YES or NO based on the
          target version.
        * Configurations/BaseXPCService.xcconfig: Define WK_XPC_SERVICE_INFOPLIST_SUFFIX to
          "-10.9-10.10" when targeting those OS X versions.
        * Configurations/NetworkService.xcconfig: Use WK_XPC_SERVICE_INFOPLIST_SUFFIX in the
          definition of INFOPLIST_FILE. Use WK_LINK_SHIM in the definition of OTHER_LDFLAGS.
        * Configurations/PluginProcess.xcconfig: Use WK_LINK_SHIM in the definition of
          LDFLAGS_SHIM_Production for OS X.
        * Configurations/PluginService.32.xcconfig: Use WK_XPC_SERVICE_INFOPLIST_SUFFIX in the
          definition of INFOPLIST_FILE. Use WK_LINK_SHIM in the definition of OTHER_LDFLAGS.
        * Configurations/PluginService.64.xcconfig: Ditto.
        * Configurations/WebContentService.xcconfig: Ditto.

2015-12-12  Katlyn Graff  <kgraff@apple.com>

        Safari background tabs should be fully suspended where possible.
        https://bugs.webkit.org/show_bug.cgi?id=150515

        Reviewed by Ryosuke Niwa.

        Added a runtime flag enabling tab suspension, default off.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::registerUserDefaultsIfNeeded):
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

2015-12-11  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
        https://bugs.webkit.org/show_bug.cgi?id=152197

        Reviewed by Dean Jackson.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMockCaptureDevicesEnabled):
        (WKPreferencesGetMockCaptureDevicesEnabled):
        * UIProcess/API/C/WKPreferencesRefPrivate.h:
        * UIProcess/API/Cocoa/WKPreferences.mm:
        (-[WKPreferences _mockCaptureDevicesEnabled]):
        (-[WKPreferences _setMockCaptureDevicesEnabled:]):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

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

        check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
        https://bugs.webkit.org/show_bug.cgi?id=152156

        Reviewed by Dan Bernstein.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
        Rename internal classes with "_WK" prefix.

2015-12-10  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Expose media capture devices persistent permissions to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=152087

        Reviewed by Chris Dumez.

        * CMakeLists.txt: Add UserMediaPermissionCheckProxy.cpp and WKUserMediaPermissionCheck.cpp.

        * Shared/API/APIObject.h: Define UserMediaPermissionCheck.

        * Shared/API/c/WKBase.h: Add WKUserMediaPermissionCheckRef typedef.

        * UIProcess/API/APIUIClient.h:
        (API::UIClient::checkUserMediaPermissionForOrigin): New.

        * UIProcess/API/C/WKAPICast.h: Add WKUserMediaPermissionCheckRef/UserMediaPermissionCheckProxy mapping.

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

        * UIProcess/API/C/WKPageUIClient.h: Add WKCheckUserMediaPermissionCallback typedef and add
          checkUserMediaPermissionForOrigin to WKPageUIClientV6.

        * UIProcess/API/C/WKUserMediaPermissionCheck.cpp: Added.
        (WKUserMediaPermissionCheckGetTypeID):
        (WKUserMediaPermissionCheckSetHasPermission):

        * UIProcess/API/C/WKUserMediaPermissionCheck.h: Added.

        * UIProcess/UserMediaPermissionCheckProxy.cpp: Added.
        (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy):
        (WebKit::UserMediaPermissionCheckProxy::setHasPermission):
        (WebKit::UserMediaPermissionCheckProxy::invalidate):
        * UIProcess/UserMediaPermissionCheckProxy.h: Added.
        (WebKit::UserMediaPermissionCheckProxy::create):
        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
        (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
        (WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
        (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision):
        (WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck):
        (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck):
        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
        (WebKit::WebPageProxy::checkUserMediaPermissionForFrame):
        (WebKit::WebPageProxy::requestNotificationPermission):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * WebKit2.xcodeproj/project.pbxproj: Add UserMediaPermissionCheckProxy.*, and WKUserMediaPermissionCheck.*.

        * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
        (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Renamed from startRequest.
        (WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Renamed from cancelRequest.
        (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): m_requestToIDMap ->
          m_userMediaRequestToIDMap.remove.
        (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): New, start the request.
        (WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): New, cancel
          the request.
        (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): New, 
          all the request completion method.
        (WebKit::UserMediaPermissionRequestManager::startRequest): Deleted.
        (WebKit::UserMediaPermissionRequestManager::cancelRequest): Deleted.
        * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

        * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
        (WebKit::WebUserMediaClient::requestUserMediaAccess): startRequest -> startUserMediaRequest.
        (WebKit::WebUserMediaClient::cancelUserMediaAccessRequest): cancelRequest -> cancelUserMediaRequest.
        (WebKit::WebUserMediaClient::checkUserMediaPermission): New.
        (WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): New.
        * WebProcess/WebCoreSupport/WebUserMediaClient.h:

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didCompleteUserMediaPermissionCheck): New.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Add DidCompleteUserMediaPermissionCheck.

2015-12-10  Joseph Pecoraro  <pecoraro@apple.com>

        Remote Inspector: Verify the identity of the other side of XPC connections
        https://bugs.webkit.org/show_bug.cgi?id=152153

        Reviewed by Brian Burg.

        * Shared/mac/SandboxUtilities.mm:
        * UIProcess/ApplicationStateTracker.mm:
        Use new header.

2015-12-10  Alex Christensen  <achristensen@webkit.org>

        REGRESSION (r192796) WKBundlePageResourceLoadClient should be able to setHTTPBody in willSendRequestForFrame
        https://bugs.webkit.org/show_bug.cgi?id=152022
        rdar://problem/23763584

        Reviewed by Darin Adler.

        * Shared/API/c/WKURLRequest.cpp:
        (WKURLRequestCopyHTTPMethod):
        (WKURLRequestCopyWithHTTPBody):
        (WKURLRequestSetDefaultTimeoutInterval):
        * Shared/API/c/WKURLRequest.h:
        Make WKURLRequestCopyWithHTTPBody SPI for testing.
        * Shared/API/c/mac/WKURLRequestNS.mm:
        (WKURLRequestCreateWithNSURLRequest):
        Crash if someone tries to use an NSURLRequest with HTTPBodyStream, which will not work with the network process.
        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
        (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
        Use an HTTP body if the client's willSendRequestForFrame returned one.
        This is the functional change of this patch.

2015-12-10  Zan Dobersek  <zdobersek@igalia.com>

        [CoordinatedGraphics] Reserve capacity for the children vector in CoordinatedGraphicsScene::setLayerChildrenIfNeeded()
        https://bugs.webkit.org/show_bug.cgi?id=152117

        Reviewed by Martin Robinson.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::setLayerChildrenIfNeeded): Reserve the capacity
        for the new Vector that will contain the same number of items as the Vector
        on the CoordinatedGraphicsLayerState object.

2015-12-09  Daniel Bates  <dabates@apple.com>

        [iOS] Bail out if the page proxy is invalid when WebPageProxy::processWillBecome{Foreground, Suspended}() are called
        https://bugs.webkit.org/show_bug.cgi?id=151877

        Reviewed by Darin Adler.

        We cannot assume that a WebPageProxy is in a valid state when WebPageProxy::processWillBecome{Foreground, Suspended}()
        are called because these callbacks may occur after the web process crashed and before a
        WebPageProxy attaches to a new web process (and hence is considered in a valid state).

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::processWillBecomeSuspended): Early return if the page proxy is invalid.
        (WebKit::WebPageProxy::processWillBecomeForeground): Ditto.

2015-12-09  Commit Queue  <commit-queue@webkit.org>

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

        caused all inspector tests to assert in WK2 Debug (Requested
        by brrian on #webkit).

        Reverted changeset:

        "Web Inspector: reproducible debug ASSERT when inspecting the
        inspector (WK2)"
        https://bugs.webkit.org/show_bug.cgi?id=152080
        http://trac.webkit.org/changeset/193864

2015-12-09  Brian Burg  <bburg@apple.com>

        Web Inspector: reproducible debug ASSERT when inspecting the inspector (WK2)
        https://bugs.webkit.org/show_bug.cgi?id=152080

        Reviewed by Timothy Hatcher.

        We hit an assert underneath ChildProcessProxy::addMessageReceiver because
        we tried to connect the inspector page and inspected page more than once.
        This relationship is already set up in the constructor of WebProcessProxy.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):

2015-12-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Need to change expectation result in ewk_settings_offline_web_application_cache_enabled API test
        https://bugs.webkit.org/show_bug.cgi?id=152063

        Reviewed by Csaba Osztrogonác.

        Expect false initial value of ewk_settings_offline_web_application_cache_enabled_get()
        because r193812 didn't enable it by default.

        * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
        (TEST_F):

2015-12-09  Gwang Yoon Hwang  <yoon@igalia.com>

        [ThreadedCompositor] Add support for HiDPI
        https://bugs.webkit.org/show_bug.cgi?id=152071

        Reviewed by Carlos Garcia Campos.

        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
        (WebKit::ThreadedCompositor::setDeviceScaleFactor): Added to receive the
        device scale factor from the layer tree host.
        (WebKit::ThreadedCompositor::renderLayerTree):
        Apply device scale factor before rendering the page.
        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
        (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        Send a updated device scale factor to the compositing thread.

2015-12-09  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] Remove unnecessary guards in CoordinatedDrawingArea
        https://bugs.webkit.org/show_bug.cgi?id=152068

        Reviewed by Gyuyoung Kim.

        CoordinatedDrawingArea is only for UI side compositor of CoordinatedGraphics.
        So, COORDINATED_GRAPHICS_MULTIPROCESS guards are not necessary.
        This patch also removes COORDINATED_GRAPHICS_MULTIPROCESS guards from DrawingAreaImpl
        because of same reason.

        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
        (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
        (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
        * WebProcess/WebPage/DrawingAreaImpl.h:

2015-12-09  Mario Sanchez Prada  <mario@endlessm.com>

        [GTK] Crash in WebProcess when loading large content with custom URI schemes
        https://bugs.webkit.org/show_bug.cgi?id=144262

        Reviewed by Carlos Garcia Campos.

        Properly handle scenarios where errors happen after reading the first
        chunk of data coming from the GInputStream provided by the application.

        * UIProcess/API/gtk/WebKitWebContextPrivate.h:
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextIsLoadingCustomProtocol): New, checks whether a load
        is still in progress, after the startLoading method has been called.
        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        (webkitURISchemeRequestReadCallback): Early return if the stream has been
        cancelled on finish_error, so that we make sure we don't keep on reading
        the GInputStream after that point.
        (webkit_uri_scheme_request_finish_error): Don't send a didFailWithError
        message to the Network process if the load is not longer in progress.
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
        (WebKit::CustomProtocolManagerImpl::didFailWithError): Handle the case where
        an error is notified from the UI process after the first chunk has been read.
        (WebKit::CustomProtocolManagerImpl::didReceiveResponse): Handle the case where
        data might no longer be available if an error happened even before this point.
        * WebProcess/soup/WebKitSoupRequestInputStream.h:
        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
        (webkitSoupRequestInputStreamDidFailWithError): Notify the custom GInputStream
        that we no longer want to keep reading data in chunks due to a specific error.
        (webkitSoupRequestInputStreamReadAsync): Early finish the GTask with a specific
        error whenever webkitSoupRequestInputStreamDidFailWithError() has been called.

2015-12-09  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics][EFL] Fix unhandled web process message when launching MiniBrowser
        https://bugs.webkit.org/show_bug.cgi?id=152048

        Reviewed by Gyuyoung Kim.

        WebPage should be initialized before updating preferences.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewInitialize): Deleted.
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        Calls WKViewSetIsActive instead of WKViewInitialize not to change the behavior
        of EFL port.
        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::WebView):
        Initialize just before creating WebPage because there is not use case to separate
        initializing WebPage from creating in CoordinatedGraphics.
        (WebKit::WebView::initialize): Deleted.
        * UIProcess/CoordinatedGraphics/WebView.h:

2015-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add API to handle beforeunload events
        https://bugs.webkit.org/show_bug.cgi?id=139090

        Reviewed by Gustavo Noronha Silva.

        beforeunload is fired when a page is about to be closed, to ask
        the user for confirmation. This happens when reloading a page,
        when navigating to another page or when the page is closed by a
        user action (a tab or window closed). In the first two cases, the
        event is automatically fired by WebCore, but in the case of a user
        action we need additional API to ensure the event is fired before
        the page is closed. A new script dialog type has been added to
        handle beforeunload events and webkit_web_view_try_close() to
        allow applications to try to close the page.

        * UIProcess/API/gtk/WebKitScriptDialog.cpp:
        (webkit_script_dialog_confirm_set_confirmed): BeforeUnloadConfirm
        dialogs can also be confirmed.
        * UIProcess/API/gtk/WebKitScriptDialog.h: Add
        WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type.
        * UIProcess/API/gtk/WebKitUIClient.cpp: Implement
        canRunBeforeUnloadConfirmPanel() and runBeforeUnloadConfirmPanel().
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (webkitWebViewCreateJavaScriptDialog): Add secondaryText optional
        parameter for BeforeUnloadConfirm dialogs. Do not set the default
        response if the dialog was created without buttons.
        (webkitWebViewScriptDialog): Handle
        WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type to
        create a message dialog for beforeunlos events.
        (webkit_web_view_class_init): Update documentation of
        WebKitWebView::close and WebKitWebView::script-dialog.
        (webkitWebViewRunJavaScriptBeforeUnloadConfirm): Emit WebKitWebView::script-dialog.
        (webkit_web_view_try_close): Try to close the page.
        * UIProcess/API/gtk/WebKitWebView.h:
        * UIProcess/API/gtk/WebKitWebViewPrivate.h:
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

2015-12-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] Missing to set ignoreTLSError to NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=152047

        Reviewed by Csaba Osztrogonác.

        NetworkProcess has been enabled for all ports since r192796 though, EFL port
        didn't send the ignoreTLSError value to NetworkProcess. This has caused failure of EFL API tests
        related with ssl feature.

        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::setIgnoreTLSErrors):

2015-12-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        [EFL] REGRESSION(r193616): WKPreferences test has been failed since r193616
        https://bugs.webkit.org/show_bug.cgi?id=151942

        Reviewed by Darin Adler.

        As wkpreference settings were moved from EwkView to WKPreferenceEfl, the offline-web-application-cache feature
        is enabled by default when running API test. It seems this option should be enabled by MiniBrowser.

        * UIProcess/efl/WebPreferencesEfl.cpp:
        (WebKit::WebPreferences::platformInitializeStore): Remove to enable web application cache feature here.

2015-12-09  Ryuan Choi  <ryuan.choi@navercorp.com>

        [CoordinatedGraphics] layerTreeHost always exist in CoordinatedDrawingArea
        https://bugs.webkit.org/show_bug.cgi?id=151987

        Reviewed by Darin Adler.

        CoordinatedGraphics using UI side compositor always forces accelerated compositing.
        This patch cleans up dead code for layerTreeHost which always exists.

        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
        (WebKit::CoordinatedDrawingAreaProxy::paint): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::update): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::discardBackingStoreSoon): Deleted.
        (WebKit::CoordinatedDrawingAreaProxy::discardBackingStore): Deleted.
        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
        (WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
        (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea): Deleted.
        (WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers): Deleted.
        (WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlush): Deleted.
        (WebKit::CoordinatedDrawingArea::didUpdate): Deleted.
        (WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode): Deleted.
        (WebKit::CoordinatedDrawingArea::scheduleDisplay): Deleted.
        (WebKit::CoordinatedDrawingArea::displayTimerFired): Deleted.
        (WebKit::CoordinatedDrawingArea::display): Deleted.
        (WebKit::shouldPaintBoundsRect): Deleted.
        (WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer): Deleted.
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:

2015-12-08  Alex Christensen  <achristensen@webkit.org>

        Progress towards implementing downloads with NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=151883

        Reviewed by Brady Eidson.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::~NetworkLoad):
        (WebKit::NetworkLoad::continueDidReceiveResponse):
        (WebKit::NetworkLoad::convertTaskToDownload):
        (WebKit::NetworkLoad::willPerformHTTPRedirection):
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponse):
        (WebKit::NetworkLoad::didReceiveData):
        (WebKit::NetworkLoad::didCompleteWithError):
        (WebKit::NetworkLoad::didBecomeDownload):
        (WebKit::NetworkLoad::didReceiveResponseAsync):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkLoadClient.h:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::cleanup):
        (WebKit::NetworkResourceLoader::didConvertToDownload):
        (WebKit::NetworkResourceLoader::abort):
        (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Deleted.
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/NetworkSession.h:
        (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
        (WebKit::NetworkSession::~NetworkSession): Deleted.
        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
        (-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
        (-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
        (WebKit::NetworkSession::NetworkSession):
        (WebKit::NetworkSession::~NetworkSession):
        (WebKit::NetworkSession::createDataTaskWithRequest):
        * Shared/Downloads/Download.h:
        * Shared/Downloads/DownloadManager.h:
        (WebKit::DownloadManager::isDownloading):
        (WebKit::DownloadManager::activeDownloadCount):

2015-12-08  Joseph Pecoraro  <pecoraro@apple.com>

        Create a Sandbox SPI header
        https://bugs.webkit.org/show_bug.cgi?id=151981

        Reviewed by Andy Estes.

        * PluginProcess/mac/PluginProcessShim.mm:
        * Shared/ios/ChildProcessIOS.mm:
        * Shared/mac/ChildProcessMac.mm:
        * Shared/mac/SandboxUtilities.mm:

2015-12-08  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Rename UserMediaClient and UserMediaController methods
        https://bugs.webkit.org/show_bug.cgi?id=152001

        Reviewed by Brady Eidson.

        * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
        (WebKit::WebUserMediaClient::pageDestroyed):
        (WebKit::WebUserMediaClient::requestUserMediaAccess):
        (WebKit::WebUserMediaClient::cancelUserMediaAccessRequest):
        (WebKit::WebUserMediaClient::requestPermission): Deleted.
        (WebKit::WebUserMediaClient::cancelRequest): Deleted.
        * WebProcess/WebCoreSupport/WebUserMediaClient.h:

2015-12-08  Tomas Popela  <tpopela@redhat.com>

        [GTK] Remove an unused variable from WebKitWebContext
        https://bugs.webkit.org/show_bug.cgi?id=151999

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitWebContext.cpp:

2015-12-08  Chris Dumez  <cdumez@apple.com>

        Add diagnostic logging to measure speculative revalidation accuracy
        https://bugs.webkit.org/show_bug.cgi?id=151953
        <rdar://problem/23092196>

        Reviewed by Darin Adler.

        We track the following:
        1. Resources we knew about AND did not get requested
           A. We did not speculate (Good)
           B. We speculated but did not go to network (Bad)
           C. We speculated and went to network (Very bad)
        2. Resources we did not know about (Neutral)
        3. Resources we knew about AND got requested
           A. We did not speculate (Bad)
           B. We speculated but did not go to network (Good)
           C. We speculated and went to network (Very good)

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::allSpeculativeLoadingDiagnosticMessages):
        (WebKit::NetworkCache::printSpeculativeLoadingDiagnosticMessageCounts):
        (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):
        (WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::wasRevalidated):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
        (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
        (WebKit::NetworkCache::makeSubresourcesKey): Deleted.
        (WebKit::NetworkCache::constructRevalidationRequest): Deleted.
        (WebKit::NetworkCache::responseNeedsRevalidation): Deleted.
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady): Deleted.
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage): Deleted.
        (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): Deleted.
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:

2015-12-08  Csaba Osztrogonác  <ossy@webkit.org>

        [EFL] REGRESSION(r173394): MiniBrowser stucked in an infinite loop if NETWORK_CACHE is disabled
        https://bugs.webkit.org/show_bug.cgi?id=137692

        Reviewed by Darin Adler.

        * WebProcess/Network/WebLoaderStrategy.cpp:
        (WebKit::maximumBufferingTime): Disable caching if NETWORK_CACHE is disabled.

2015-12-08  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] Add API to provide preferences before creating ewk_view
        https://bugs.webkit.org/show_bug.cgi?id=151587

        Reviewed by Gyuyoung Kim.

        This patch adds ewk_view_configuration_settings_get to provide preferences
        before createing ewk_view.

        * PlatformEfl.cmake:
        * UIProcess/API/efl/ewk_view_configuration.cpp:
        (EwkViewConfiguration::EwkViewConfiguration):
        (ewk_view_configuration_settings_get):
        * UIProcess/API/efl/ewk_view_configuration.h:
        * UIProcess/API/efl/ewk_view_configuration_private.h:
        (EwkViewConfiguration::pageGroup):
        * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp:
        (TEST_F): Added test case for ewk_view_configuration_settings_get().

2015-12-07  Gustavo Noronha Silva  <gns@gnome.org>

        [GTK] Notify WebCore when notification is clicked
        https://bugs.webkit.org/show_bug.cgi?id=151951

        Reviewed by Carlos Garcia Campos.

        * UIProcess/API/gtk/WebKitNotification.cpp:
        (webkit_notification_class_init): new clicked signal.
        (webkit_notification_clicked): method to emit the clicked signal.
        * UIProcess/API/gtk/WebKitNotification.h:
        * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
        (WebKitNotificationProvider::notificationClickedCallback): handle the clicked signal and tell WebProcess about the click.
        (WebKitNotificationProvider::show): connect to the clicked signal in addition to closed.
        * UIProcess/API/gtk/WebKitNotificationProvider.h:
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (notifyNotificationClicked): handle the click on our libnotify notification.
        (webkitWebViewShowNotification): add the "default" action to our libnotify notification to be notified of the click.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

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

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

        This change broke existing LayoutTests on mac-wk2 (Requested
        by ryanhaddad on #webkit).

        Reverted changeset:

        "UIProcess should determine AppNap state for WebPage"
        https://bugs.webkit.org/show_bug.cgi?id=151964
        http://trac.webkit.org/changeset/193655

2015-12-05  Gavin Barraclough  <barraclough@apple.com>

        UIProcess should determine AppNap state for WebPage
        https://bugs.webkit.org/show_bug.cgi?id=151964

        Reviewed by Anders Carlson.

        Step 1 in unifying this with the iOS process suppression mechanism is to move the decision out of the WebContent process.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::dispatchViewStateChange):
        (WebKit::WebPageProxy::setPageActivityState):
        (WebKit::WebPageProxy::updateActivityToken):
        (WebKit::WebPageProxy::preferencesDidChange):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::isInWindow):
        (WebKit::WebPageProxy::didUpdateViewState):
        * UIProcess/WebPageProxy.messages.in:
            - WebPage now propagates PageActivityState to the WebPageProxy, for use
              determining the supression state of the WebProcess.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
        (WebKit::WebPage::setPageActivityState):
        (WebKit::WebPage::setUserActivityStarted):
        (WebKit::WebPage::setViewState):
        (WebKit::WebPage::updatePreferences):
        (WebKit::WebPage::updateUserActivity): Deleted.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
            - WebPage no longer determines when to update it's own UserActivity - instead,
              let the UI process do so. As such, no longer need to track whether process
              supression is enabled. Instead, add message to

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

        [WK2] Regression(r187691): If a page is showing an auth pane in one tab, any new tabs with same page hang until credentials are entered in first tab
        https://bugs.webkit.org/show_bug.cgi?id=151960
        <rdar://problem/23618112>

        Reviewed by Alex Christensen.

        After r187691, if a page is showing an auth pane in one tab, any new
        tabs with same page hang until credentials are entered in first tab.
        This is because we coalescing all authentication challenges from the
        same domain, no matter what tab they are for. This can be confusing
        so we now only coalesce authentication challenges within each tab,
        by leveraging the pageID (in addition to the domain).

        * Shared/Authentication/AuthenticationManager.cpp:
        (WebKit::AuthenticationManager::shouldCoalesceChallenge):
        (WebKit::AuthenticationManager::coalesceChallengesMatching):
        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
        * Shared/Authentication/AuthenticationManager.h:

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

        Hook up request and show for typing candidates in WK1
        https://bugs.webkit.org/show_bug.cgi?id=151831
        -and corresponding-
        <rdar://problem/23751214>

        Reviewed by Enrica Casucci.

        Empty client for now.
        * WebProcess/WebCoreSupport/WebEditorClient.h:

2015-12-07  Philippe Normand  <pnormand@igalia.com>

        [GTK][Mac] socketpair assertion failure
        https://bugs.webkit.org/show_bug.cgi?id=151293

        Reviewed by Carlos Garcia Campos.

        * Platform/IPC/unix/ConnectionUnix.cpp: Don't use SEQPACKET sockets on Darwin.

2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>

        [ThreadedCompositor] Add support for PlatformLayer.
        https://bugs.webkit.org/show_bug.cgi?id=143299

        Reviewed by Žan Doberšek.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
        Swap pending buffers of TextureMapperPlatformLayerProxies before painting contents.
        (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
        In threaded compositor, CoordinatedGraphicsScence only cares about creation and deletion
        of platform layers.

        (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
        Whenever new buffer comes via TextureMapperPlatformLayerProxy, CoordinatedGraphicsScene will
        update the scene if it is needed.

2015-12-07  Mario Sanchez Prada  <mario@endlessm.com>

        [GTK] Allow applications to force Accelerated Compositing mode
        https://bugs.webkit.org/show_bug.cgi?id=150558

        Reviewed by Carlos Garcia Campos.

        Enable forcing Accelerated Compositing mode to be always on if
        a WEBKIT_FORCE_COMPOSITING_MODE environment variable is set.

        This can be useful for controlled environments where we know that
        AC always on works well enough, to get smoother animations.

        * UIProcess/gtk/WebPreferencesGtk.cpp:
        (WebKit::WebPreferences::platformInitializeStore): Set forceCompositingMode
        setting to true if the environment variable is found.

2015-12-07  Jon Forsberg  <jon.orebro@gmail.com>

        [GTK] Add webkit_uri_request_get_http_method
        https://bugs.webkit.org/show_bug.cgi?id=151601

        Reviewed by Martin Robinson.

        Add a method to get the HTTP method of a WebKitURIRequest.

        * UIProcess/API/gtk/WebKitURIRequest.cpp:
        (webkit_uri_request_get_http_method):
        * UIProcess/API/gtk/WebKitURIRequest.h:
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

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

        [GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API
        https://bugs.webkit.org/show_bug.cgi?id=79918

        Reviewed by Gustavo Noronha Silva.

        Add WebKitConsoleMessage boxed type that is passed to the
        WebKitWebPage::console-message-sent signal with all the details
        about the message.

        * PlatformGTK.cmake: Add new files to compilation.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
        * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_console_message_get_type.
        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section to the docs.
        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
        (API::InjectedBundle::PageUIClient::willAddMessageToConsole): Add
        paramaters for all console message details.
        * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp: Added.
        (webkit_console_message_copy):
        (webkit_console_message_free):
        (webkit_console_message_get_source):
        (webkit_console_message_get_level):
        (webkit_console_message_get_text):
        (webkit_console_message_get_line):
        (webkit_console_message_get_source_id):
        * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h: Added.
        * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h: Added.
        (_WebKitConsoleMessage::_WebKitConsoleMessage):
        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
        (webkitWebPageDidSendConsoleMessage): Emit the
        WebKitWebPage::console-message-sent signal.
        (didReceiveResponseForResource): Generate a console message in
        case of HTTP failure >= 400 for consistency with the inspector.
        (didFailLoadForResource): Generate a console message in case of
        resource load failure for consistency with the inspector.
        (webkit_web_page_class_init): Add WebKitWebPage::console-message-sent signal.
        (webkitWebPageCreate): Set custom UI client.
        * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
        (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::addMessageToConsole): Pass all the
        console message details to the ui client.

2015-12-07  Ryuan Choi  <ryuan.choi@navercorp.com>

        [EFL] MiniBrowser doesn't exit when called ewk_view_try_close()
        https://bugs.webkit.org/show_bug.cgi?id=151934

        Reviewed by Csaba Osztrogonác.

        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_try_close):
        Called window_close callback immediately when WKPageTryClose returns true.
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F): Improved test cases for try_close to test when content does not contain
        onbeforeunload callback.

2015-12-07  Jaehun Lim  <ljaehun.lim@samsung.com>

        [EFL] Moving preference settings from EwkView to WebPreferencesEfl
        https://bugs.webkit.org/show_bug.cgi?id=151928

        Reviewed by Gyuyoung Kim.

        It implements WebPreferences::platformInitializeStore() in WebPreferencesEfl.cpp.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        * UIProcess/efl/WebPreferencesEfl.cpp:
        (WebKit::WebPreferences::platformInitializeStore):

2015-12-04  Anders Carlsson  <andersca@apple.com>

        Crash when secondary clicking on a link on yahoo.com
        https://bugs.webkit.org/show_bug.cgi?id=151900
        rdar://problem/23765149

        Reviewed by Beth Dakin.

        Don't use +[NSURL URLWithString:] since it doesn't handle invalid URLs as well as WebCore::URL.

        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::WebContextMenuProxyMac::createShareMenuItem):

2015-12-04  Beth Dakin  <bdakin@apple.com>

        Crash in clients using userData in 
        _immediateActionAnimationControllerForHitTestResult
        https://bugs.webkit.org/show_bug.cgi?id=151887

        Rubber-stamped by Anders Carlsson.

        Follow-up fix to handle null userData.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):

2015-12-04  Beth Dakin  <bdakin@apple.com>

        Crash in clients using userData in 
        _immediateActionAnimationControllerForHitTestResult
        https://bugs.webkit.org/show_bug.cgi?id=151887

        Reviewed by Sam Weinig.

        Cast this correctly.
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):

2015-12-04  Gavin Barraclough  <barraclough@apple.com>

        Background state not being tracked correctly for PDFs on iOS
        https://bugs.webkit.org/show_bug.cgi?id=151886

        Reviewed by Anders Carlson.

        The problem here is that when viewing a PDF we don't have an ApplicationStateTracker.
        (While we do have a content view - which normally holds the ApplicationStateTracker -
        the content view is not in a window, and only has an ApplicationStateTracker while in a
        window). For now, let's give the WKPDFView an ApplicationStateTracker of its very own.
        In the future we may want to refactor ownership of the ApplicationStateTracker up to
        the WKWebView.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView _isBackground]):
            - Added, checks background state of content/PDF view.
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
            - expose _isBackground to PageClientImplIOS.
        * UIProcess/ApplicationStateTracker.h:
        (WebKit::ApplicationStateTracker::isInBackground):
        * UIProcess/ApplicationStateTracker.mm:
        (WebKit::isBackgroundState):
        (WebKit::ApplicationStateTracker::ApplicationStateTracker):
            - generalize WKContentView -> UIView, so this may now also be a WKPDFView.
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::isViewVisible):
            - check background state via the WKWebView.
        * UIProcess/ios/WKPDFView.h:
        * UIProcess/ios/WKPDFView.mm:
        (-[WKPDFView willMoveToWindow:]):
        (-[WKPDFView didMoveToWindow]):
        (-[WKPDFView isBackground]):
        (-[WKPDFView _applicationDidEnterBackground]):
        (-[WKPDFView _applicationWillEnterForeground]):
            - added methods to initialize ApplicationStateTracker, access background state, & callbacks to the page proxy.

2015-12-04  Antti Koivisto  <antti@apple.com>

        Rename WebResourceLoadScheduler to WebLoaderStrategy
        https://bugs.webkit.org/show_bug.cgi?id=151854

        Reviewed by Anders Carlsson.

        It implements WebCore::LoaderStrategy and doesn't do any scheduling.

        * CMakeLists.txt:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Network/NetworkProcessConnection.cpp:
        (WebKit::NetworkProcessConnection::didReceiveMessage):
        * WebProcess/Network/WebLoaderStrategy.cpp: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp.
        (WebKit::WebLoaderStrategy::WebLoaderStrategy):
        (WebKit::WebLoaderStrategy::~WebLoaderStrategy):
        (WebKit::WebLoaderStrategy::loadResource):
        (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
        (WebKit::maximumBufferingTime):
        (WebKit::WebLoaderStrategy::scheduleLoad):
        (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad):
        (WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired):
        (WebKit::WebLoaderStrategy::startLocalLoad):
        (WebKit::WebLoaderStrategy::remove):
        (WebKit::WebLoaderStrategy::setDefersLoading):
        (WebKit::WebLoaderStrategy::crossOriginRedirectReceived):
        (WebKit::WebLoaderStrategy::servePendingRequests):
        (WebKit::WebLoaderStrategy::suspendPendingRequests):
        (WebKit::WebLoaderStrategy::resumePendingRequests):
        (WebKit::WebLoaderStrategy::networkProcessCrashed):
        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
        (WebKit::WebLoaderStrategy::createPingHandle):
        (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler): Deleted.
        (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler): Deleted.
        (WebKit::WebResourceLoadScheduler::loadResource): Deleted.
        (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): Deleted.
        (WebKit::WebResourceLoadScheduler::scheduleLoad): Deleted.
        (WebKit::WebResourceLoadScheduler::scheduleInternallyFailedLoad): Deleted.
        (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired): Deleted.
        (WebKit::WebResourceLoadScheduler::startLocalLoad): Deleted.
        (WebKit::WebResourceLoadScheduler::remove): Deleted.
        (WebKit::WebResourceLoadScheduler::setDefersLoading): Deleted.
        (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): Deleted.
        (WebKit::WebResourceLoadScheduler::servePendingRequests): Deleted.
        (WebKit::WebResourceLoadScheduler::suspendPendingRequests): Deleted.
        (WebKit::WebResourceLoadScheduler::resumePendingRequests): Deleted.
        (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Deleted.
        (WebKit::WebResourceLoadScheduler::loadResourceSynchronously): Deleted.
        (WebKit::WebResourceLoadScheduler::createPingHandle): Deleted.
        * WebProcess/Network/WebLoaderStrategy.h: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h.
        (WebKit::WebLoaderStrategy::webResourceLoaderForIdentifier):
        (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier): Deleted.
        * WebProcess/Network/WebResourceLoadScheduler.cpp: Removed.
        * WebProcess/Network/WebResourceLoadScheduler.h: Removed.
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::Stream::start):
        (WebKit::PluginView::Stream::cancel):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createLoaderStrategy):
        (WebKit::WebPlatformStrategies::createPasteboardStrategy):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::networkProcessConnectionClosed):
        (WebKit::WebProcess::webLoaderStrategy):
        (WebKit::WebProcess::webResourceLoadScheduler): Deleted.
        * WebProcess/WebProcess.h:

2015-12-03  Simon Fraser  <simon.fraser@apple.com>

        Have layer memory use consult the backing store format
        https://bugs.webkit.org/show_bug.cgi?id=151827
        rdar://problem/23746497

        Reviewed by Dean Jackson.

        When computing the backing store memory size, take the pixel format into account,
        rather than assuming 4 bytes per pixel.

        * Shared/mac/RemoteLayerBackingStore.h:
        * Shared/mac/RemoteLayerBackingStore.mm:
        (WebKit::RemoteLayerBackingStore::bytesPerPixel):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
        (WebKit::PlatformCALayerRemote::backingStoreBytesPerPixel):
        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:

2015-12-03  Jer Noble  <jer.noble@apple.com>

        Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit & WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=151830

        Reviewed by Anders Carlsson.

        Add a new, private WKWebViewConfiguration property _invisibleAutoplayNotPermitted.

        * Shared/WebPreferencesDefinitions.h:
        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
        (-[WKWebViewConfiguration init]):
        (-[WKWebViewConfiguration copyWithZone:]):
        (-[WKWebViewConfiguration _invisibleAutoplayNotPermitted]):
        (-[WKWebViewConfiguration _setInvisibleAutoplayNotPermitted:]):
        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2015-12-03  Sam Weinig  <sam@webkit.org>

        It should be possible to use version 6 of the WKPageUIClient without adopting the new createNewPage
        https://bugs.webkit.org/show_bug.cgi?id=151826

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageSetPageUIClient):
        Pick which variant of createNewPage to use based on which function pointer is available,
        not the version number.

2015-12-03  Anders Carlsson  <andersca@apple.com>

        Remove Objective-C GC support
        https://bugs.webkit.org/show_bug.cgi?id=151819
        rdar://problem/23746991

        Reviewed by Dan Bernstein.

        * Configurations/Base.xcconfig:
        * Configurations/BaseLegacyProcess.xcconfig:
        * Configurations/BaseXPCService.xcconfig:
        * Shared/Cocoa/APIObject.mm:
        (API::Object::newObject): Deleted.

2015-12-03  Jer Noble  <jer.noble@apple.com>

        Unreviewed build-fix; fix !HAVE(AVKIT) build after r193340.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive):

2015-12-03  Sam Weinig  <sam@webkit.org>

        Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
        <rdar://problem/23320863>
        https://bugs.webkit.org/show_bug.cgi?id=151708

        (Add missing function definitions)

        * UIProcess/API/C/WKPage.cpp:
        (WKPageRunJavaScriptAlertResultListenerGetTypeID):
        (WKPageRunJavaScriptAlertResultListenerCall):
        (WKPageRunJavaScriptConfirmResultListenerGetTypeID):
        (WKPageRunJavaScriptConfirmResultListenerCall):
        (WKPageRunJavaScriptPromptResultListenerGetTypeID):
        (WKPageRunJavaScriptPromptResultListenerCall):

2015-12-03  Jer Noble  <jer.noble@apple.com>

        [iOS] Fullscreen -> PiP should resume to Fullscreen, not inline
        https://bugs.webkit.org/show_bug.cgi?id=150906

        Reviewed by Simon Fraser.

        Add methods to pass isVisible(), applicationDidBecomeActive(), and requestFullscreenMode()
        to and from models and interfaces.

        * UIProcess/ios/WebPageProxyIOS.mm:
        (WebKit::WebPageProxy::applicationDidBecomeActive): Notify the fullscreen manager, if preset.

        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
        (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum.
        (WebKit::WebVideoFullscreenModelContext::isVisible): Added.
        (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive): Pass to all existing interfaces.
        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Do not re-create the view if it already exists.
        (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum.
        (WebKit::WebVideoFullscreenManagerProxy::isVisible): Added. Query Page::isVisible() and Page::isInWindow(), the latter because
                PiP will cause Page::isVisible() to be TRUE even when the containing tab is backgrounded.
        (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen): Deleted.
        (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen): Deleted.
        * WebProcess/ios/WebVideoFullscreenManager.mm:
        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Only resize the view if we are not already in one of
                the fullscreen modes.
        (WebKit::WebVideoFullscreenManager::requestFullscreenMode): Renamed from requestExitFullscreen().
        (WebKit::WebVideoFullscreenManager::requestExitFullscreen): Deleted.

2015-12-02  Antti Koivisto  <antti@apple.com>

        Move ResourceLoadScheduler to WebKit1
        https://bugs.webkit.org/show_bug.cgi?id=151743

        Reviewed by Alex Christensen.

        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
        (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy):
        (WebKit::NetworkProcessPlatformStrategies::createLoaderStrategy):
        (WebKit::NetworkProcessPlatformStrategies::createPasteboardStrategy):
        (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy):
        (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
        (WebKit::NetworkProcessPlatformStrategies::resourceLoadScheduler): Deleted.
        (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): Deleted.
        * NetworkProcess/NetworkProcessPlatformStrategies.h:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
        (WebKit::WebResourceLoadScheduler::loadResource):
        (WebKit::WebResourceLoadScheduler::resumePendingRequests):
        (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
        (WebKit::WebResourceLoadScheduler::loadResourceSynchronously):
        (WebKit::WebResourceLoadScheduler::createPingHandle):
        (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Deleted.
        (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled): Deleted.
        * WebProcess/Network/WebResourceLoadScheduler.h:
        (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::Stream::start):
        (WebKit::PluginView::Stream::cancel):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createLoaderStrategy):
        (WebKit::WebPlatformStrategies::createPasteboardStrategy):
        (WebKit::WebPlatformStrategies::createPluginStrategy):
        (WebKit::WebPlatformStrategies::createBlobRegistry):
        (WebKit::WebPlatformStrategies::cookiesForDOM):
        (WebKit::WebPlatformStrategies::deleteCookie):
        (WebKit::WebPlatformStrategies::refreshPlugins):
        (WebKit::WebPlatformStrategies::resourceLoadScheduler): Deleted.
        (WebKit::WebPlatformStrategies::loadResourceSynchronously): Deleted.
        (WebKit::WebPlatformStrategies::createPingHandle): Deleted.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

        Fix authentication requests with NetworkSession and canHandleHTTPSServerTrustEvaluation true
        https://bugs.webkit.org/show_bug.cgi?id=151775
        rdar://problem/23586265

        Reviewed by Chris Dumez.

        In https://bugs.webkit.org/show_bug.cgi?id=150968 I copied functionality from 
        NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync into NetworkLoad::didReceiveChallenge
        but I overlooked the call to m_client.canAuthenticateAgainstProtectionSpaceAsync which is needed
        if canHandleHTTPSServerTrustEvaluation is true.  This adds that call and moves what should happen
        after that to NetworkLoad::continueCanAuthenticateAgainstProtectionSpace.

        * NetworkProcess/NetworkLoad.cpp:
        (WebKit::NetworkLoad::didReceiveChallenge):
        (WebKit::NetworkLoad::didReceiveResponse):
        (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
        * NetworkProcess/NetworkLoad.h:
        * NetworkProcess/NetworkSession.h:
        * Shared/Authentication/AuthenticationManager.h:

2015-12-01  Hunseop Jeong  <hs85.jeong@samsung.com>

        Unreviewed, fix build after r192931.

        * CMakeLists.txt: Remove the WKOriginDataManager in CMakeLists.txt.

2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
        https://bugs.webkit.org/show_bug.cgi?id=150792

        Reviewed by Saam Barati.

        * Configurations/FeatureDefines.xcconfig:

2015-12-01  Commit Queue  <commit-queue@webkit.org>

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

        JSC tests for this change are failing on 32 and 64-bit bots
        (Requested by ryanhaddad on #webkit).

        Reverted changeset:

        "[ES6] Implement LLInt/Baseline Support for ES6 Generators and
        enable this feature"
        https://bugs.webkit.org/show_bug.cgi?id=150792
        http://trac.webkit.org/changeset/192914

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

        Remove WKOriginDataManager
        https://bugs.webkit.org/show_bug.cgi?id=151723

        Reviewed by Andy Estes.

        * UIProcess/API/C/WKOriginDataManager.cpp: Removed.
        (WKOriginDataManagerGetTypeID): Deleted.
        (WKOriginDataManagerGetOrigins): Deleted.
        (WKOriginDataManagerDeleteEntriesForOrigin): Deleted.
        (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Deleted.
        (WKOriginDataManagerDeleteAllEntries): Deleted.
        * UIProcess/API/C/WKOriginDataManager.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:

2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>

        [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
        https://bugs.webkit.org/show_bug.cgi?id=150792

        Reviewed by Saam Barati.

        * Configurations/FeatureDefines.xcconfig:

2015-12-01  Sam Weinig  <sam@webkit.org>

        Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
        <rdar://problem/23320863>
        https://bugs.webkit.org/show_bug.cgi?id=151708

        Reviewed by Anders Carlsson.

        Add listener based versions of alert, confirm and prompt.

        * Shared/API/APIObject.h:
        * Shared/API/c/WKBase.h:
        * UIProcess/API/C/WKPage.cpp:
        (WebKit::RunJavaScriptAlertResultListener::create):
        (WebKit::RunJavaScriptAlertResultListener::~RunJavaScriptAlertResultListener):
        (WebKit::RunJavaScriptAlertResultListener::call):
        (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
        (WebKit::RunJavaScriptConfirmResultListener::create):
        (WebKit::RunJavaScriptConfirmResultListener::~RunJavaScriptConfirmResultListener):
        (WebKit::RunJavaScriptConfirmResultListener::call):
        (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
        (WebKit::RunJavaScriptPromptResultListener::create):
        (WebKit::RunJavaScriptPromptResultListener::~RunJavaScriptPromptResultListener):
        (WebKit::RunJavaScriptPromptResultListener::call):
        (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
        (WKPageSetPageUIClient):
        * UIProcess/API/C/WKPageUIClient.h:

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

        Remove WebKit2.framework
        https://bugs.webkit.org/show_bug.cgi?id=151715

        Reviewed by Dan Bernstein.

        * Configurations/WebKit2.xcconfig: Removed.
        * UIProcess/API/Cocoa/WebKit2.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:
        * mac/Info-WebKit2.plist: Removed.
        * mac/MigrateHeadersToWebKit2.make: Removed.
        * mac/WebKit2.m: Removed.

2015-12-01  Alex Christensen  <achristensen@webkit.org>

        Use Optional for matrix inverses
        https://bugs.webkit.org/show_bug.cgi?id=151575

        Reviewed by Myles C. Maxfield.

        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::convertFromRootView):
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::convertPoint):
        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
        (WebKit::PDFPlugin::convertFromPDFViewToRootView):
        (WebKit::PDFPlugin::convertFromPDFViewToScreen):
        (WebKit::PDFPlugin::boundsOnScreen):
        (WebKit::PDFPlugin::geometryDidChange):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::geometryDidChange):

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

        Remove swipe snapshot before main document load if scroll position is already restored
        https://bugs.webkit.org/show_bug.cgi?id=151224

        Reviewed by Darin Adler.

        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::didRestoreScrollPosition):
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didRestoreScrollPosition):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didRestoreScrollPosition):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::didRestoreScrollPosition):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didRestoreScrollPosition):
        * WebProcess/WebPage/WebPage.h:
        Plumb didRestoreScrollPosition through to ViewGestureController (yikes!).

        * UIProcess/ViewGestureController.cpp:
        (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
        Cancel waiting for any more loads if we get to firstVisuallyNonEmptyLayout.

        (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
        Cancel waiting for scroll position restoration if we make it to main frame load,
        because there is a chance we won't be able to restore the old scroll position, and
        by main frame load time we've tried as hard as we're going to to restore it.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::endSwipeGesture):
        Make some legacy-style-only code clearer that it's legacy-style-only.
        Wait for scroll position restoration.

2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r192834): [GTK] Test /webkit2/WebKitWebView/editor-state/typing-attributes times out after r192834
        https://bugs.webkit.org/show_bug.cgi?id=151699

        Reviewed by Tim Horton.

        In r192834 the code to send EditorStateChanged message to the UI
        process from WebPage::didChangeSelection was removed for non-mac
        ports.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection): Send EditorStateChanged
        message to the UI process also for non-mac ports, as before r192834.

2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix timeouts in several HTTP layout tests in GTK+ after r192796.

        In r192796, the initialization of m_ignoreTLSErrors in
        WebProcessPool was removed by mistake, making all HTTP tests that use
        HTTPS fail due to invalid certificate errors.

        * UIProcess/WebProcessPool.h: Bring back m_ignoreTLSErrors initialization.

2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType
        https://bugs.webkit.org/show_bug.cgi?id=151513

        Reviewed by Martin Robinson.

        This happens because we are using our own WebContextMenuItemGtk
        derived from WebContextMenuItemData, but using our own submenu
        items handling. We are using the non-submenu
        WebContextMenuItemData constructor to create our submenu items
        too, because WebContextMenuItemData always expect the submenu
        items to be passed to the constructor, but we have a set_submenu
        method in the public API. So we consider that a
        WebContextMenuItemGtk is SubmenuType if it has submenu items, but
        we use the action type internally. When converting a
        WebContextMenuItemGtk to a generic WebContextMenuItemData, we
        correctly set the type and pass the submenu items to the
        approriate constructor.

        * Shared/gtk/WebContextMenuItemGtk.cpp:
        (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): When
        constructing from a WebContextMenuItemData, set the type as
        ActionType when it's a submenu type.
        * Shared/gtk/WebContextMenuItemGtk.h:
        (WebKit::WebContextMenuItemGtk::type): Return SubmenuType if
        submenu items vector is not empty, otherwise use the parent method.
        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
        (webkit_context_menu_item_new_with_submenu): Create the
        WebContextMenuItemGtk as ActionType.

2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Add missing inspector files to the GTK+ build.

        * PlatformGTK.cmake: Add also Debug css files.

2015-11-30  Alexey Proskuryakov  <ap@apple.com>

        Build fix for some compiler versions.

        * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Disable deprecation warnings while
        processing SOFT_LINK_CLASS too.

2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>

        Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
        https://bugs.webkit.org/show_bug.cgi?id=149309
        <rdar://problem/22748363>

        Reviewed by Brent Fulgham.

        Callback of bundle clients could kill the documentloader. Therefore, make a copy
        of the navigationID before invoking the callback.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
        (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):

2015-11-30  Tim Horton  <timothy_horton@apple.com>

        Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
        https://bugs.webkit.org/show_bug.cgi?id=151673

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKWebView.mm:
        * UIProcess/API/mac/WKView.mm:
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::resignFirstResponder): Deleted.
        (WebKit::WebViewImpl::interpretKeyEvent): Deleted.
        (WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted.
        (WebKit::WebViewImpl::doCommandBySelector): Deleted.
        (WebKit::WebViewImpl::insertText): Deleted.
        (WebKit::WebViewImpl::inputContext): Deleted.
        (WebKit::WebViewImpl::selectedRange): Deleted.
        (WebKit::WebViewImpl::hasMarkedText): Deleted.
        (WebKit::WebViewImpl::unmarkText): Deleted.
        (WebKit::WebViewImpl::setMarkedText): Deleted.
        (WebKit::WebViewImpl::markedRange): Deleted.
        (WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted.
        (WebKit::WebViewImpl::characterIndexForPoint): Deleted.
        (WebKit::WebViewImpl::firstRectForCharacterRange): Deleted.
        (WebKit::WebViewImpl::performKeyEquivalent): Deleted.
        (WebKit::WebViewImpl::keyUp): Deleted.
        (WebKit::WebViewImpl::keyDown): Deleted.
        (WebKit::WebViewImpl::flagsChanged): Deleted.
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy): Deleted.
        (WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted.
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/PageClientImpl.h:
        * UIProcess/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted.
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::setComposition): Deleted.
        (WebKit::WebPageProxy::confirmComposition): Deleted.
        (WebKit::WebPageProxy::insertText): Deleted.
        (WebKit::WebPageProxy::insertDictatedText): Deleted.
        (WebKit::WebPageProxy::getMarkedRange): Deleted.
        (WebKit::WebPageProxy::getSelectedRange): Deleted.
        (WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted.
        (WebKit::WebPageProxy::characterIndexForPoint): Deleted.
        (WebKit::WebPageProxy::firstRectForCharacterRange): Deleted.
        (WebKit::WebPageProxy::executeKeypressCommands): Deleted.
        (WebKit::WebPageProxy::cancelComposition): Deleted.
        (WebKit::WebPageProxy::editorStateChanged): Deleted.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didChangeSelection):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::setComposition): Deleted.
        (WebKit::WebPage::confirmComposition): Deleted.
        (WebKit::WebPage::insertText): Deleted.
        (WebKit::WebPage::insertDictatedText): Deleted.
        (WebKit::WebPage::getMarkedRange): Deleted.
        (WebKit::WebPage::getSelectedRange): Deleted.
        (WebKit::WebPage::getAttributedSubstringFromRange): Deleted.
        (WebKit::WebPage::characterIndexForPoint): Deleted.
        (WebKit::WebPage::firstRectForCharacterRange): Deleted.
        (WebKit::WebPage::executeKeypressCommands): Deleted.
        (WebKit::WebPage::cancelComposition): Deleted.

2015-11-30  Tim Horton  <timothy_horton@apple.com>

        Remove some unused synchronous drawing SPI
        https://bugs.webkit.org/show_bug.cgi?id=151672

        Reviewed by Anders Carlsson.

        * UIProcess/API/Cocoa/WKViewPrivate.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView forceAsyncDrawingAreaSizeUpdate:]): Deleted.
        (-[WKView waitForAsyncDrawingAreaSizeUpdate]): Deleted.
        * UIProcess/Cocoa/WebViewImpl.h:
        * UIProcess/Cocoa/WebViewImpl.mm:
        (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate): Deleted.
        (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate): Deleted.

2015-11-30  Tim Horton  <timothy_horton@apple.com>

        Get rid of the legacy swipe shadow style
        https://bugs.webkit.org/show_bug.cgi?id=151671

        Reviewed by Anders Carlsson.

        * UIProcess/mac/ViewGestureControllerMac.mm:
        (WebKit::ViewGestureController::beginSwipeGesture): Deleted.
        (WebKit::ViewGestureController::handleSwipeGesture): Deleted.
        (WebKit::ViewGestureController::removeSwipeSnapshot): Deleted.
        It is no longer needed.

2015-11-30  Tim Horton  <timothy_horton@apple.com>

        [iOS] Option-up and Option-down should scroll a little less than a full page
        https://bugs.webkit.org/show_bug.cgi?id=151538
        <rdar://problem/23642675>

        Reviewed by Simon Fraser.

        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView _scrollOffsetForEvent:]):
        (-[WKContentView _interpretKeyEvent:isCharEvent:]):
        Clean up the code a little, and adjust so that we *always* use pageStep
        instead of just scrolling by the unobscured rect when scrolling by a page.
        Previously, we did for the spacebar, but not for option-up and option-down.

2015-11-30  Brian Burg  <bburg@apple.com>

        Web Inspector: using "Reload Web Inspector" when docked breaks dock-specific styles
        https://bugs.webkit.org/show_bug.cgi?id=151642

        Reviewed by Timothy Hatcher.

        After a frontend loads, explicitly tell it about the current dock
        state. This is necessary for force-reloading the inspector, since
        the dock state isn't sent from UIProcess in this case.

        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::frontendLoaded):
        (WebKit::WebInspectorUI::setDockingUnavailable):
        * WebProcess/WebPage/WebInspectorUI.h:

2015-11-30  Alex Christensen  <achristensen@webkit.org>

        Make ProcessModel always MultipleSecondaryProcesses
        https://bugs.webkit.org/show_bug.cgi?id=151662

        Reviewed by Antti Koivisto.

        Single WebProcess behavior can still be achieved by setting the maximum number of WebProcesses to 1.

        * Shared/API/c/WKDeprecatedFunctions.cpp:
        (WKContextSetUsesNetworkProcess):
        (WKContextSetProcessModel):
        (WKContextGetProcessModel):
        (WKGraphicsContextGetCGContext):
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toAPI):
        (WebKit::toFontSmoothingLevel):
        (WebKit::toProcessModel): Deleted.
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetCacheModel):
        (WKContextSetMaximumNumberOfProcesses):
        (WKContextSetProcessModel): Deleted.
        (WKContextGetProcessModel): Deleted.
        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/Cocoa/WKProcessGroup.mm:
        (-[WKProcessGroup initWithInjectedBundleURL:]):
        * UIProcess/API/Cocoa/WKProcessPool.mm:
        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::cacheModel):
        (EwkContext::setProcessModel):
        (EwkContext::processModel):
        (EwkContext::clearResourceCache):
        (EwkContext::jsGlobalContext):
        (ewk_context_message_from_extensions_callback_set):
        (ewk_context_process_model_set):
        (ewk_context_process_model_get):
        (ewk_context_tls_error_policy_get):
        (toWKProcessModel): Deleted.
        (toEwkProcessModel): Deleted.
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        * UIProcess/ProcessModel.h: Removed.
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::shouldTerminate):
        (WebKit::WebCookieManagerProxy::refWebContextSupplement):
        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::inspectorProcessPool):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::reattachToWebProcess):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::create):
        (WebKit::WebProcessPool::setDownloadClient):
        (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
        (WebKit::WebProcessPool::processDidCachePage):
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::disconnectProcess):
        (WebKit::WebProcessPool::createWebPage):
        (WebKit::WebProcessPool::postMessageToInjectedBundle):
        (WebKit::WebProcessPool::requestWebContentStatistics):
        (WebKit::WebProcessPool::requestNetworkingStatistics):
        (WebKit::WebProcessPool::setProcessModel): Deleted.
        (WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
        * UIProcess/WebProcessPool.h:
        (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
        (WebKit::WebProcessPool::sendToOneProcess):
        * WebKit2.xcodeproj/project.pbxproj:

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

        [WK2][Cache] We should not speculatively revalidate transient resources
        https://bugs.webkit.org/show_bug.cgi?id=151402
        <rdar://problem/23092196>

        Reviewed by Antti Koivisto.

        We should not speculatively revalidate transient resources. This patch
        adds a simple and conservative algorithm to detect that a subresource is
        transient and then ignores those when doing the speculative revalidation.

        The algorithm is question marks as transient all subresources that are
        not common to the 2 last loads of a main resource.

        This is not perfect as I see the number of non-speculative revalidations
        going up to 11-12 from 9 in the context of the warm PLT. However, it is
        best to be conservative at first and we can improve this later.

        * NetworkProcess/cache/NetworkCache.cpp:
        (WebKit::NetworkCache::Cache::retrieve):
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::~PendingFrameLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
        (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
        (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
        (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): Deleted.
        (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted.
        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
        (WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
        (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
        (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys):
        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::encode):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::decode):
        (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::SubresourceInfo):
        (WebKit::NetworkCache::SubresourcesEntry::subresources):

2015-11-30  Brent Fulgham  <bfulgham@apple.com>

        [Mac] Add font service permission to the sandbox profile
        https://bugs.webkit.org/show_bug.cgi?id=151509
        <rdar://problem/23508753>

        Reviewed by Anders Carlsson.

        Update the sandbox profile for Mac WebKit to allow access to the
        "com.apple.fonts" service.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * WebProcess/com.apple.WebProcess.sb.in:

2015-11-30  Alex Christensen  <achristensen@webkit.org>

        Make usesNetworkProcess always true
        https://bugs.webkit.org/show_bug.cgi?id=151580

        Reviewed by Darin Adler.

        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
        * Shared/API/c/WKDeprecatedFunctions.cpp:
        (WKInspectorToggleJavaScriptProfiling):
        (WKContextSetUsesNetworkProcess):
        (WKGraphicsContextGetCGContext):
        * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
        (WebKit::CustomProtocolManager::initializeConnection):
        (WebKit::CustomProtocolManager::initialize):
        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
        * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
        (WebKit::CustomProtocolManager::initialize):
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        (API::ProcessPoolConfiguration::copy):
        * UIProcess/API/APIProcessPoolConfiguration.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
        (WKContextUseTestingNetworkSession):
        (WKContextSetUsesNetworkProcess): Deleted.
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/API/Cocoa/WKProcessGroup.mm:
        (-[WKProcessGroup initWithInjectedBundleURL:]):
        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::setProcessModel):
        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
        (WebKit::WebProcessPool::updateProcessSuppressionState):
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::cancel):
        (WebKit::DownloadProxy::invalidate):
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
        * UIProcess/WebProcessPool.cpp:
        (WebKit::WebProcessPool::WebProcessPool):
        (WebKit::m_processSuppressionDisabledForPageCounter):
        (WebKit::WebProcessPool::networkingProcessConnection):
        (WebKit::WebProcessPool::languageChanged):
        (WebKit::WebProcessPool::textCheckerStateChanged):
        (WebKit::WebProcessPool::ensureNetworkProcess):
        (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
        (WebKit::WebProcessPool::createNewWebProcess):
        (WebKit::WebProcessPool::download):
        (WebKit::WebProcessPool::resumeDownload):
        (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
        (WebKit::WebProcessPool::setCacheModel):
        (WebKit::WebProcessPool::createDownloadProxy):
        (WebKit::WebProcessPool::addMessageReceiver):
        (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
        (WebKit::WebProcessPool::setHTTPPipeliningEnabled):
        (WebKit::WebProcessPool::requestNetworkingStatistics):
        (WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
        (WebKit::WebProcessPool::usesNetworkProcess): Deleted.
        * UIProcess/WebProcessPool.h:
        (WebKit::WebProcessPool::sendToNetworkingProcess):
        (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::shutDown):
        (WebKit::WebProcessProxy::removeWebPage):
        (WebKit::WebProcessProxy::canTerminateChildProcess):
        (WebKit::WebProcessProxy::updateTextCheckerState):
        (WebKit::WebProcessProxy::didSaveToPageCache):
        (WebKit::WebProcessProxy::didSetAssertionState):
        (WebKit::WebProcessProxy::createDownloadProxy): Deleted.
        * UIProcess/WebProcessProxy.h:
        * UIProcess/efl/WebProcessPoolEfl.cpp:
        (WebKit::WebProcessPool::platformInitializeWebProcess):
        (WebKit::WebProcessPool::setIgnoreTLSErrors):
        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
        (WebKit::BlobRegistryProxy::registerFileBlobURL):
        (WebKit::BlobRegistryProxy::registerBlobURL):
        (WebKit::BlobRegistryProxy::unregisterBlobURL):
        (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
        (WebKit::BlobRegistryProxy::blobSize):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::cookiesForDOM):
        (WebKit::WebPlatformStrategies::setCookiesFromDOM):
        (WebKit::WebPlatformStrategies::cookiesEnabled):
        (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
        (WebKit::WebPlatformStrategies::getRawCookies):
        (WebKit::WebPlatformStrategies::deleteCookie):
        (WebKit::WebPlatformStrategies::resourceLoadScheduler):
        (WebKit::WebPlatformStrategies::loadResourceSynchronously):
        (WebKit::WebPlatformStrategies::createPingHandle):
        (WebKit::WebPlatformStrategies::createBlobRegistry):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::startDownload):
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        (WebKit::WebFrame::source):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        (WebKit::m_webSQLiteDatabaseTracker):
        (WebKit::WebProcess::initializeConnection):
        (WebKit::WebProcess::initializeWebProcess):
        (WebKit::WebProcess::ensureNetworkProcessConnection):
        (WebKit::WebProcess::destroyPrivateBrowsingSession):
        (WebKit::WebProcess::pluginProcessConnectionManager):
        (WebKit::WebProcess::shouldTerminate):
        (WebKit::WebProcess::setInjectedBundleParameters):
        (WebKit::WebProcess::networkConnection):
        (WebKit::WebProcess::setEnhancedAccessibility):
        (WebKit::WebProcess::prefetchDNS):
        (WebKit::WebProcess::didCreateDownload): Deleted.
        (WebKit::WebProcess::didDestroyDownload): Deleted.
        (WebKit::WebProcess::downloadProxyConnection): Deleted.
        (WebKit::WebProcess::downloadsAuthenticationManager): Deleted.
        (WebKit::WebProcess::downloadManager): Deleted.
        (WebKit::WebProcess::usesNetworkProcess): Deleted.
        (WebKit::WebProcess::downloadRequest): Deleted.
        (WebKit::WebProcess::resumeDownload): Deleted.
        (WebKit::WebProcess::cancelDownload): Deleted.
        * WebProcess/WebProcess.h:
        (WebKit::WebProcess::textCheckerState):
        (WebKit::WebProcess::eventDispatcher):
        * WebProcess/WebProcess.messages.in:
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformSetCacheModel):
        (WebKit::WebProcess::platformClearResourceCaches):
        (WebKit::WebProcess::platformInitializeWebProcess):
        (WebKit::WebProcess::platformTerminate):
        (WebKit::getCacheDiskFreeSize): Deleted.
        (WebKit::setSoupSessionAcceptLanguage): Deleted.
        (WebKit::languageChanged): Deleted.
        (WebKit::WebProcess::setIgnoreTLSErrors): Deleted.
        (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Deleted.

2015-11-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] UI process crash when the screensaver DBus proxy is being created while the web view is destroyed
        https://bugs.webkit.org/show_bug.cgi?id=151653

        Reviewed by Martin Robinson.

        We correctly cancel the proxy creation, but when the async ready
        callback is called, the view could be destroyed already. In that
        case g_dbus_proxy_new_for_bus_finish() will return nullptr and
        fail with cancelled error, but we are using the passed web view
        without checking first if the creation failed or not.

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

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

        Stop unnecessarily copying WKWebViewConfiguration in a few places
        https://bugs.webkit.org/show_bug.cgi?id=151639

        Reviewed by Dan Bernstein.

        * UIProcess/API/Cocoa/WKWebView.mm:
        (-[WKWebView initWithFrame:configuration:]):
        (-[WKWebView dealloc]):
        (-[WKWebView _contentProviderRegistry]):
        (-[WKWebView _selectionGranularity]):
        (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
        * UIProcess/API/Cocoa/WKWebViewInternal.h:
        * UIProcess/ios/PageClientImplIOS.mm:
        (WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
        * UIProcess/ios/WKContentViewInteraction.mm:
        (-[WKContentView setupInteraction]):
        (-[WKContentView _stopAssistingKeyboard]):
        Looking at allocation traces I noticed that we were making way more
        WKWebViewConfigurations than made sense; looking at backtraces I found
        a few internal callers of -[WKWebView configuration], which copies the
        configuration. There's no reason for these internal callers to make 
        such a copy, though.

        I'm not exactly sure what the usual approach is here, but I added
        getters so WKContentViewInteraction and PageClientImplIOS can get to
        the values they're looking for without using the configuration property.

2015-11-27  Brady Eidson  <beidson@apple.com>

        Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
        https://bugs.webkit.org/show_bug.cgi?id=151627

        Reviewed by Alexey Proskuryakov.

        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
        (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
        
        * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
        
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
        
        * Shared/WebCoreArgumentCoders.cpp:
        (IPC::ArgumentCoder<IDBGetResult>::encode):
        (IPC::ArgumentCoder<IDBGetResult>::decode):
        * Shared/WebCoreArgumentCoders.h:
        
        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

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

        [GTK] Remove the remaining uses of GMainLoopSource
        https://bugs.webkit.org/show_bug.cgi?id=151632

        Reviewed by Žan Doberšek.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
        (_WebKitWebViewBasePrivate::clearRedirectedWindowSoonTimerFired):
        (webkitWebViewBaseClearRedirectedWindowSoon):
        (webkitWebViewBaseEnterAcceleratedCompositingMode):

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

        [GTK] Use the network process unconditionally
        https://bugs.webkit.org/show_bug.cgi?id=151541

        Reviewed by Alex Christensen.

        Make the shared secondary process model become multiple secondary
        process model with a limit of 1 web process. Use the same options
        when creating a context with legacy configuration (unit tests and
        inspector proxy).

        * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
        * UIProcess/API/APIProcessPoolConfiguration.cpp:
        (API::ProcessPoolConfiguration::createWithLegacyOptions):
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (webkitWebContextConstructed):
        (webkit_web_context_set_process_model):
        (webkit_web_context_get_process_model):
        (webkit_web_context_set_web_process_count_limit):
        (webkit_web_context_get_web_process_count_limit):
        (toWebKitProcessModel): Deleted.
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        * UIProcess/gtk/WebProcessPoolGtk.cpp:
        (WebKit::WebProcessPool::setIgnoreTLSErrors):
        (WebKit::WebProcessPool::platformInitializeWebProcess):

2015-11-23  Brian Burg  <bburg@apple.com>

        Web Inspector: inspector settings should not be shared between different inspection levels
        https://bugs.webkit.org/show_bug.cgi?id=151151

        Reviewed by Timothy Hatcher.

        In WebKit2, we already track the inspection level of WebPages in order to give inspectors
        different page groups. Send the inspection level to WebInspectorUI WebProcess when
        establishing a connection from the UIProcess. Use this number in the FrontendClient.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::inspectionLevel): Renamed from inspectorLevel to be consistent.
        (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier):
        (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
        (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
        (WebKit::WebInspectorProxy::createInspectorPage):
        (WebKit::WebInspectorProxy::inspectorLevel): Deleted.
        * UIProcess/WebInspectorProxy.h:
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::updateInspectorWindowTitle):
        * WebProcess/WebPage/WebInspectorUI.cpp:
        (WebKit::WebInspectorUI::establishConnection):
        * WebProcess/WebPage/WebInspectorUI.h:
        * WebProcess/WebPage/WebInspectorUI.messages.in:

2015-11-23  Gyuyoung Kim  <gyuyoung.kim@webkit.org>

        REGRESSION(r188206): [EFL] Missing to adjust scrollbar size to ewk_view_contents_size_get API test
        https://bugs.webkit.org/show_bug.cgi?id=148735

        Reviewed by Csaba Osztrogonác.

        r189256 missed to adjust scrollbar size to other tests in ewk_view_contents_size_get() API test.
        In this case we need to apply scrollbar size to both width and height unlike previous fix. Because
        horizontal scrollbar is also shown since device pixel ratio(= 2.0) is adjusted.

        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):

2015-11-23  Alex Christensen  <achristensen@webkit.org>

        Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
        https://bugs.webkit.org/show_bug.cgi?id=151532

        Reviewed by Benjamin Poulain.

        * UIProcess/WebGeolocationManagerProxy.cpp:
        (WebKit::WebGeolocationManagerProxy::processPoolDestroyed):
        (WebKit::WebGeolocationManagerProxy::processDidClose):
        When a WebProcessPool is destroyed, only call stopUpdating if m_updateRequesters.clear()
        stopped the updating, like we do in WebGeolocationManagerProxy::removeRequester.
        Otherwise, call setEnableHighAccuracy if needed, also like we do in WebGeolocationManagerProxy::removeRequester.

2015-11-23  Brian Burg  <bburg@apple.com>

        Web Inspector: when inspecting the inspector, add the inspection level to the title bar
        https://bugs.webkit.org/show_bug.cgi?id=151555

        Reviewed by Timothy Hatcher.

        If the inspection level says we are inspecting an inspector, include the level
        in the title bar to easily disambiguate it from the base level inspector.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::updateInspectorWindowTitle):

2015-11-23  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed speculative buildfix after r192701.

        * PlatformMac.cmake:

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

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

        * gtk/NEWS: Add release notes for 2.11.2.

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

        Unreviewed. Add missing inspector file to GTK+ compilation.

        * PlatformGTK.cmake:

== Rolled over to ChangeLog-2015-11-21 ==