1. 18 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Change storage factory functions to take a PageGroup and Page respectively · e44d33f5
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114776
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Change StorageNamespace::localStorageNamespace to take a PageGroup since WebKit2 needs
      to know which local storage namespace belongs to which page group. Also remove the quota parameter from
      the sessionStorageNamespace function since that's trivial to get from the Page.
      
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::sessionStorage):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::localStorage):
      * storage/StorageNamespace.cpp:
      (WebCore::StorageNamespace::localStorageNamespace):
      (WebCore::StorageNamespace::sessionStorageNamespace):
      * storage/StorageNamespace.h:
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::localStorageNamespace):
      (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
      * storage/StorageNamespaceImpl.h:
      * storage/StorageStrategy.cpp:
      (WebCore::StorageStrategy::localStorageNamespace):
      (WebCore::StorageStrategy::sessionStorageNamespace):
      * storage/StorageStrategy.h:
      
      Source/WebKit2:
      
      Update for WebCore changes.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::localStorageNamespace):
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e44d33f5
  2. 10 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Rename StorageNamespaceProxy to StorageNamespaceImpl. · fb76d539
      andersca@apple.com authored
      Rubber-stamped by Beth Dakin.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/Storage/StorageAreaProxy.cpp:
      (WebKit::StorageAreaProxy::create):
      (WebKit::StorageAreaProxy::StorageAreaProxy):
      * WebProcess/Storage/StorageAreaProxy.h:
      (StorageAreaProxy):
      * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp.
      * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb76d539
  3. 01 Apr, 2013 2 commits
    • andersca@apple.com's avatar
      Didn't mean to commit this! · 087c4ede
      andersca@apple.com authored
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      087c4ede
    • andersca@apple.com's avatar
      Apply changes from storage events locally · c4232f57
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111502
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Add and export a helper function for setting an item without taking
      into account the quota for the map. Also, reindent StorageMap.h
      
      * WebCore.exp.in:
      * storage/StorageMap.cpp:
      (WebCore::StorageMap::setItemIgnoringQuota):
      (WebCore):
      * storage/StorageMap.h:
      (StorageMap):
      (WebCore::StorageMap::quota):
      
      Source/WebKit2:
      
      * WebProcess/Storage/StorageAreaProxy.cpp:
      (WebKit::StorageAreaProxy::StorageAreaProxy):
      Store the security origin as a member variable.
      
      (WebKit::StorageAreaProxy::dispatchStorageEvent):
      Set the item and call the appropriate event dispatch function.
      
      (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
      (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
      Add stubs.
      
      * WebProcess/Storage/StorageAreaProxy.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4232f57
  4. 01 Mar, 2013 1 commit
    • ap@apple.com's avatar
      Make in-memory blobs work in NetworkProcess · ce0e4764
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=111132
      
              Reviewed by Sam Weinig.
      
              * NetworkProcess/NetworkConnectionToWebProcess.cpp:
              (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
              (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
              (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
              * NetworkProcess/NetworkConnectionToWebProcess.h:
              Implement BlobRegistry interface by using BlobRegistryImpl (same one as used in
              WebProcess in non-PPT mode).
      
              * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added three messages
              needed for BlobRegistry.
      
              * NetworkProcess/NetworkProcess.cpp:
              * NetworkProcess/NetworkProcessPlatformStrategies.cpp: Added.
              * NetworkProcess/NetworkProcessPlatformStrategies.h: Added.
              Added a mostly empty platform strategy, just for FormData to talk to BlobRegistry.
              Perhaps we'll find a way to avoid this WebCore code path in NetworkProcess, because
              we obviously know which registry implementation is in use in this process.
      
              * Shared/FileAPI: Added.
              * Shared/FileAPI/BlobRegistrationData.cpp: Added.
              * Shared/FileAPI/BlobRegistrationData.h: Added.
              Added a class for passing BlobData and extension handles over IPC.
              This uses a trick with mutable a member to avoid copying decoded BlobStorageData.
      
              * WebKit2.xcodeproj/project.pbxproj:
              * WebProcess/FileAPI: Added.
              * WebProcess/FileAPI/BlobRegistryProxy.cpp: Added.
              * WebProcess/FileAPI/BlobRegistryProxy.h: Added.
              A proxy implementation of BlobRegistry that just sends requests over IPC. We only
              need async ones.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::createBlobRegistry):
              * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
              Create an appropriate BlobRegistry.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce0e4764
  5. 08 Feb, 2013 1 commit
    • andersca@apple.com's avatar
      Move plug-in enumeration back to the main thread · a0212a8c
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109337
      <rdar://problem/12015046>
      
      Reviewed by Andreas Kling.
      
      Plug-in enumeration was moved to a separate work queue to improve responsiveness, but
      doing so lead to crashes when WebKit1 would enumerate plug-ins on the main thread at the same time.
      Bug <rdar://problem/13185819> tracks fixing the responsiveness issue by spawning a plug-in process
      and have it do the enumeration.
      
      * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
      (WebKit::getPluginInfoFromCarbonResources):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::connectionWillOpen):
      (WebKit::WebProcessProxy::connectionWillClose):
      (WebKit::WebProcessProxy::getPlugins):
      * UIProcess/WebProcessProxy.h:
      (WebCore):
      (WebProcessProxy):
      * UIProcess/WebProcessProxy.messages.in:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit):
      (WebKit::WebPlatformStrategies::populatePluginCache):
      * WebProcess/WebProcess.cpp:
      * WebProcess/WebProcess.h:
      (WebProcess):
      * WebProcess/WebProcess.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0212a8c
  6. 06 Feb, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Take referrer policy into account when clearing the referrer header · c85cc612
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86000
      
      Patch by Marja Hölttä <marja@chromium.org> on 2013-02-06
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      The referrer should only be cleared when doing a https -> http redirect,
      if the policy is "default". Otherwise the referrer should be left intact.
      
      In order to do that, added a function for checking the policy in
      NetworkingContext, and stored the NetworkingContext in ResourceHandle
      (like some ports already did).
      
      No new tests (unskipped old tests).
      
      * loader/FrameNetworkingContext.h:
      (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
      (FrameNetworkingContext):
      * platform/network/BlobResourceHandle.cpp:
      (WebCore::BlobResourceHandle::BlobResourceHandle):
      * platform/network/NetworkingContext.h:
      (NetworkingContext):
      * platform/network/ResourceHandle.cpp:
      (WebCore::ResourceHandle::ResourceHandle):
      (WebCore::ResourceHandle::create):
      (WebCore::ResourceHandle::context):
      (WebCore):
      * platform/network/ResourceHandle.h:
      (ResourceHandle):
      * platform/network/ResourceHandleInternal.h:
      (WebCore::ResourceHandleInternal::ResourceHandleInternal):
      (ResourceHandleInternal):
      * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      * platform/network/cf/ResourceHandleCFNet.cpp:
      (WebCore::willSendRequest):
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      * platform/network/chromium/ResourceHandle.cpp:
      (WebCore::ResourceHandleInternal::ResourceHandleInternal):
      (WebCore::ResourceHandle::ResourceHandle):
      (WebCore::ResourceHandle::create):
      (WebCore::ResourceHandle::context):
      (WebCore):
      (WebCore::ResourceHandle::start):
      * platform/network/chromium/ResourceHandleInternal.h:
      (WebCore):
      (ResourceHandleInternal):
      (WebCore::ResourceHandleInternal::context):
      * platform/network/curl/ResourceHandleCurl.cpp:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      * platform/network/mac/ResourceHandleMac.mm:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
      * platform/network/qt/QNetworkReplyHandler.cpp:
      (WebCore::QNetworkReplyHandler::redirect):
      * platform/network/qt/ResourceHandleQt.cpp:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::doRedirect):
      (WebCore::ResourceHandle::start):
      * platform/network/win/ResourceHandleWin.cpp:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::loadResourceSynchronously):
      
      Source/WebKit2:
      
      The referrer should only be cleared when doing a https -> http redirect,
      if the policy is "default". Otherwise the referrer should be left intact.
      
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::start):
      * NetworkProcess/SchedulableLoader.cpp:
      (WebKit::SchedulableLoader::SchedulableLoader):
      * NetworkProcess/SchedulableLoader.h:
      (WebKit::SchedulableLoader::shouldClearReferrerOnHTTPSToHTTPRedirect):
      (SchedulableLoader):
      * NetworkProcess/SyncNetworkResourceLoader.cpp:
      (WebKit::SyncNetworkResourceLoader::start):
      * NetworkProcess/mac/RemoteNetworkingContext.h:
      (WebKit::RemoteNetworkingContext::create):
      (RemoteNetworkingContext):
      * NetworkProcess/mac/RemoteNetworkingContext.mm:
      (WebKit::RemoteNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
      (WebKit):
      (WebKit::RemoteNetworkingContext::RemoteNetworkingContext):
      * Shared/Network/NetworkResourceLoadParameters.cpp:
      (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::encode):
      (WebKit::NetworkResourceLoadParameters::decode):
      * Shared/Network/NetworkResourceLoadParameters.h:
      (NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::shouldClearReferrerOnHTTPSToHTTPRedirect):
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
      (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      * WebProcess/Network/WebResourceLoadScheduler.h:
      (WebResourceLoadScheduler):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously):
      
      LayoutTests:
      
      Unskip http/tests/security/referrer-policy-redirect-link.html
      
      Skipping the tests on wk2, because other referrer policy tests are
      skipped, too ( https://bugs.webkit.org/show_bug.cgi?id=73913 ).
      
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wk2/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c85cc612
  7. 28 Jan, 2013 2 commits
    • andersca@apple.com's avatar
      More work on UI side local storage · ec9bce76
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108119
      
      Reviewed by Beth Dakin.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/Storage/StorageNamespaceProxy.cpp:
      (WebKit::StorageNamespaceProxy::createSessionStorageNamespace):
      Rename create to createSessionStorageNamespace and make it take a WebPage.
      
      (WebKit::StorageNamespaceProxy::StorageNamespaceProxy):
      Add WebPage parameter.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      Add an #ifdef for enabling UI side storage.
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::page):
      Call new WebPage::fromCorePage helper.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::fromCorePage):
      Add new function for getting a WebPage from a WebCore::Page.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec9bce76
    • andersca@apple.com's avatar
      Add StorageStrategy member functions to WebKit2 · a9ae4491
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108105
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      StorageStrategy::sessionStorageNamespace should be virtual, not static...
      
      * WebCore.exp.in:
      * storage/StorageStrategy.h:
      (StorageStrategy):
      
      Source/WebKit2:
      
      Add default implementations that just chain up to the base class for now.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::localStorageNamespace):
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9ae4491
  8. 25 Jan, 2013 1 commit
    • beidson@apple.com's avatar
      HTTP Authentication should be directly between the NetworkProcess and the UIProcess · daf91063
      beidson@apple.com authored
      <rdar://problem/13074829> and https://bugs.webkit.org/show_bug.cgi?id=107974
      
      Reviewed by Alexey Proskuryakov.
      
      Some of this patch is refactoring to enable more flexibility in the authentication mechanism
      and the rest is actually implementing Network->UI process authentication.
      
      Expose the same AuthenticationManager to anyone in the NetworkProcess asking for it:
      * NetworkProcess/NetworkProcess.cpp:
      (WebKit::NetworkProcess::authenticationManager):
      (WebKit::NetworkProcess::downloadsAuthenticationManager):
      * NetworkProcess/NetworkProcess.h:
      
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Instead of messaging to
        the WebProcess, tell the NetworkProcess AuthenticationManager.
      
      Add WebPageID and WebFrameID members to SchedulableLoader that they receive from
      * NetworkProcess/SchedulableLoader.cpp:
      * NetworkProcess/SchedulableLoader.h:
      (WebKit::SchedulableLoader::webPageID):
      (WebKit::SchedulableLoader::webFrameID):
      
      Add a 3rd form of "didReceiveAuthenticationChallenge" for NetworkProcess use:
      * Shared/Authentication/AuthenticationManager.cpp:
      (WebKit::AuthenticationManager::mapChallengeToIdentifier):
      (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
      * Shared/Authentication/AuthenticationManager.h:
      * Shared/Authentication/mac/AuthenticationManager.mac.mm:
      (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Remove a now obsolete comment
      
      Include the WebPage and WebFrame ID for the originator of this request in case it results in a challenge:
      * Shared/Network/NetworkResourceLoadParameters.cpp:
      (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::encode):
      (WebKit::NetworkResourceLoadParameters::decode):
      * Shared/Network/NetworkResourceLoadParameters.h:
      (WebKit::NetworkResourceLoadParameters::webPageID):
      (WebKit::NetworkResourceLoadParameters::webFrameID):
      
      Create a AuthenticationChallengeProxy pointing back to the NetworkProcess (instead of a WebProcess),
      and send the challenge to the appropriate WebPageProxy:
      * UIProcess/Network/NetworkProcessProxy.cpp:
      (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
      * UIProcess/Network/NetworkProcessProxy.h:
      * UIProcess/Network/NetworkProcessProxy.messages.in:
      
      Refactor didReceiveAuthenticationChallenge so an outsider can directly hand over an AuthenticationChallengeProxy:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
      (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
      * UIProcess/WebPageProxy.h:
      
      Add a global WebPageID -> WebPageProxy map so parties with an ID don't need to know which process it belongs to:
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::globalPageMap):
      (WebKit::WebProcessProxy::webPage):
      (WebKit::WebProcessProxy::createWebPage):
      (WebKit::WebProcessProxy::addExistingWebPage):
      (WebKit::WebProcessProxy::removeWebPage):
      * UIProcess/WebProcessProxy.h:
      
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass 0 for WebFrameID and WebPageID since synchronous
        loads don't go through "normal" authentication channels and don't need them. Yet.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      daf91063
  9. 22 Jan, 2013 1 commit
    • andersca@apple.com's avatar
      Source/WebCore: Use a platform strategy for local storage · 89cf38d9
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      Add new files.
      
      * platform/PlatformStrategies.h:
      Add a way to create/get the storage strategy.
      
      * storage/StorageNamespace.cpp:
      (WebCore::StorageNamespace::localStorageNamespace):
      (WebCore::StorageNamespace::sessionStorageNamespace):
      Call the storage strategy.
      
      * storage/StorageNamespace.h:
      * storage/StorageStrategy.cpp: Added.
      (WebCore::StorageStrategy::localStorageNamespace):
      (WebCore::StorageStrategy::sessionStorageNamespace):
      Call through to StorageNamespaceImpl.
      
      * storage/StorageStrategy.h: Added.
      
      Source/WebKit/efl: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createStorageStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createStorageStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createStorageStrategy):
      
      Source/WebKit/qt: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createStorageStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createStorageStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createStorageStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2: Use a platforom strategy for local storage
      https://bugs.webkit.org/show_bug.cgi?id=107600
      
      Reviewed by Andreas Kling.
      
      Update for new storage strategy.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createStorageStrategy):
      (WebKit):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89cf38d9
  10. 18 Jan, 2013 1 commit
    • beidson@apple.com's avatar
      Rework NetworkProcess resource load identifiers. · 4a2042ce
      beidson@apple.com authored
      <rdar://problem/12934449> and https://bugs.webkit.org/show_bug.cgi?id=107192
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (No effect in tested configs).
      
      * WebCore.exp.in:
      
      Include an identifier argument for synchronous loads:
      * loader/LoaderStrategy.cpp:
      (WebCore::LoaderStrategy::loadResourceSynchronously):
      * loader/LoaderStrategy.h:
      
      Pass along a unique identifier to the synchronous load:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadResourceSynchronously):
      
      Remove the "setIdentifier" method:
      * loader/ResourceLoader.cpp:
      * loader/ResourceLoader.h:
      
      Source/WebKit2:
      
      Having the NetworkProcess vend out identifiers to WebProcesses was a bad idea.
      This patch reverts that so that WebProcesses are in control of their own unique identifiers.
      
      The NetworkProcess doesn't need identifiers at all.
      It can represent outstanding loads with the loaders themselves.
      
      This patch adds a "SchedulableLoader" base class for normal and synchronous loaders.
      It reworks each use of identifiers into using SchedulableLoaders instead.
      
      This also gave an opportunity to move the serving of pending requests for a host into the
      HostRecord itself which cleans certain things up nicely.
      
      Change HostRecord to have queues of SchedulableLoaders instead of identifiers.
      Make HostRecord responsible for actually starting the loaders in its queues:
      * NetworkProcess/HostRecord.cpp:
      (WebKit::HostRecord::~HostRecord):
      (WebKit::HostRecord::scheduleResourceLoader):
      (WebKit::HostRecord::addLoaderInProgress):
      (WebKit::HostRecord::removeLoader):
      (WebKit::HostRecord::hasRequests):
      (WebKit::HostRecord::servePendingRequestsForQueue):
      (WebKit::HostRecord::servePendingRequests):
      (WebKit::HostRecord::limitsRequests):
      * NetworkProcess/HostRecord.h:
      (WebKit::HostRecord::create): HostRecord is now also RefCounted. new and delete are so 2004.
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): Create the loader then schedule
        it with the scheduler, instead of having the scheduler create it.
      (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
      (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      
      Remove maps and sets of identifiers, replacing them with sets of SchedulableLoaders where needed.
      Rely on HostRecords to actually manage sets of SchedulableLoaders.
      Rely on HostRecord to do the actual serving of its pending requests:
      * NetworkProcess/NetworkResourceLoadScheduler.cpp:
      (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
      (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
      (WebKit::NetworkResourceLoadScheduler::hostForURL):
      (WebKit::NetworkResourceLoadScheduler::removeLoader):
      (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
      (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
      (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      
      A new base class for all loaders that the scheduler and HostRecords might need to know about:
      * NetworkProcess/SchedulableLoader.cpp:
      (WebKit::SchedulableLoader::SchedulableLoader):
      (WebKit::SchedulableLoader::~SchedulableLoader):
      * NetworkProcess/SchedulableLoader.h:
      (WebKit::SchedulableLoader::loadParameters):
      (WebKit::SchedulableLoader::connectionToWebProcess):
      (WebKit::SchedulableLoader::isSynchronous):
      (WebKit::SchedulableLoader::setHostRecord):
      (WebKit::SchedulableLoader::hostRecord):
      
      Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::connection):
      (WebKit::NetworkResourceLoader::destinationID):
      (WebKit::NetworkResourceLoader::start):
      (WebKit::NetworkResourceLoader::stop):
      (WebKit::NetworkResourceLoader::didReceiveResponse):
      (WebKit::NetworkResourceLoader::didFail):
      (WebKit::NetworkResourceLoader::willSendRequest):
      (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
      * NetworkProcess/NetworkResourceLoader.h:
      (WebKit::NetworkResourceLoader::create):
      
      Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
      * NetworkProcess/SyncNetworkResourceLoader.cpp:
      (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
      (WebKit::SyncNetworkResourceLoader::start):
      * NetworkProcess/SyncNetworkResourceLoader.h:
      (WebKit::SyncNetworkResourceLoader::create):
      (WebKit::SyncNetworkResourceLoader::isSynchronous):
      
      Fold the WebProcess resource load identifier in with the load parameters:
      * Shared/Network/NetworkResourceLoadParameters.cpp:
      (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::encode):
      (WebKit::NetworkResourceLoadParameters::decode):
      * Shared/Network/NetworkResourceLoadParameters.h:
      (WebKit::NetworkResourceLoadParameters::identifier):
      
      The identifier is preset in the WebProcess and doesn't come from the NetworkProcess,
      so the message to schedule a load can now be asynchronous:
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      
      Update to include a WebProcess generated identifier along with synchronous loads:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a2042ce
  11. 16 Jan, 2013 2 commits
    • weinig@apple.com's avatar
      Fix crashes on the bots. · 2808ea1e
      weinig@apple.com authored
      The WebKit LoaderStrategy for loading synchronously was only implemented
      for the case where you have a network process. When you don't, we should
      be using the base implementation.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2808ea1e
    • beidson@apple.com's avatar
      Synchronous XMLHTTPRequests need to go to the NetworkProcess. · 0c140b4e
      beidson@apple.com authored
      <rdar://problem/12951765> and https://bugs.webkit.org/show_bug.cgi?id=106826
      
      Reviewed by Sam Weinig and Alexey Proskuryakov.
      
      Source/WebCore:
      
      No new tests (No changes to any config that is currently tested)
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadResourceSynchronously): Consult the LoaderStrategy when strategies are
        being used.
      
      * loader/LoaderStrategy.cpp:
      (WebCore::LoaderStrategy::loadResourceSynchronously): Defaults to using ResourceHandle directly.
      * loader/LoaderStrategy.h:
      
      Break out the StoredCredentials enum to a new header:
      * platform/network/ResourceHandle.h:
      * platform/network/ResourceHandleTypes.h:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously): Entry point for WebCore to get
        synchronous requests to the NetworkProcess.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): Create a SyncNetworkResourceLoader
        and schedule it.
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      
      * NetworkProcess/NetworkResourceLoadScheduler.cpp:
      (WebKit::NetworkResourceLoadScheduler::scheduleSyncNetworkResourceLoader):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve synchronous loaders
        before async loaders.
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      
      A class that encapsulates a synchronous load request and the CoreIPC reply to be made once it is complete:
      * NetworkProcess/SyncNetworkResourceLoader.cpp: Added.
      (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
      (WebKit::SyncNetworkResourceLoader::start):
      * NetworkProcess/SyncNetworkResourceLoader.h: Copied from Source/WebKit2/NetworkProcess/HostRecord.h.
      (WebKit::SyncNetworkResourceLoader::create):
      (WebKit::SyncNetworkResourceLoader::setIdentifier):
      (WebKit::SyncNetworkResourceLoader::identifier):
      (WebKit::SyncNetworkResourceLoader::loadParameters):
      
      Add a second queue of sync loaders:
      * NetworkProcess/HostRecord.h:
      (WebKit::HostRecord::syncLoadersPending):
      
      Add comments to explicitly spell out the current reliance on some messages that are currently synchronous:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::willSendRequest):
      (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c140b4e
  12. 07 Jan, 2013 1 commit
    • andersca@apple.com's avatar
      Remove PLATFORM(WIN) #ifdefs · 30854d12
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106279
      
      Reviewed by Sam Weinig.
      
      * Platform/CoreIPC/BinarySemaphore.cpp:
      * Platform/CoreIPC/Connection.cpp:
      (CoreIPC::Connection::waitForSyncReply):
      * Platform/CoreIPC/Connection.h:
      (Client):
      * Platform/Module.cpp:
      (WebKit::Module::Module):
      * Platform/Module.h:
      (Module):
      * Platform/PlatformProcessIdentifier.h:
      (WebKit):
      * Shared/CommandLine.h:
      (CommandLine):
      * Shared/FontSmoothingLevel.h:
      * Shared/LayerTreeContext.h:
      (LayerTreeContext):
      * Shared/NativeWebKeyboardEvent.h:
      (NativeWebKeyboardEvent):
      * Shared/NativeWebMouseEvent.h:
      (NativeWebMouseEvent):
      * Shared/NativeWebWheelEvent.h:
      (NativeWebWheelEvent):
      * Shared/PlatformPopupMenuData.cpp:
      (WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
      (WebKit::PlatformPopupMenuData::encode):
      (WebKit::PlatformPopupMenuData::decode):
      * Shared/PlatformPopupMenuData.h:
      (PlatformPopupMenuData):
      * Shared/Plugins/PluginModuleInfo.h:
      (PluginModuleInfo):
      (WebKit::PluginModuleInfo::isolatedCopy):
      * Shared/ShareableBitmap.h:
      (ShareableBitmap):
      * Shared/WebCoreArgumentCoders.h:
      * Shared/WebEvent.h:
      (WebMouseEvent):
      * Shared/WebEventConversion.cpp:
      (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
      * Shared/WebMouseEvent.cpp:
      (WebKit::WebMouseEvent::WebMouseEvent):
      (WebKit::WebMouseEvent::encode):
      (WebKit::WebMouseEvent::decode):
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      (WebPageCreationParameters):
      * Shared/WebPreferencesStore.h:
      (WebKit):
      * Shared/WebProcessCreationParameters.cpp:
      (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
      (WebKit::WebProcessCreationParameters::encode):
      (WebKit::WebProcessCreationParameters::decode):
      * Shared/WebProcessCreationParameters.h:
      (WebProcessCreationParameters):
      * Shared/WebURLRequest.h:
      * Shared/WebURLResponse.h:
      * Shared/cg/ShareableBitmapCG.cpp:
      (WebKit::ShareableBitmap::makeCGImageCopy):
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toFontSmoothingLevel):
      (WebKit::toAPI):
      * UIProcess/API/C/WKPage.cpp:
      * UIProcess/BackingStore.h:
      (BackingStore):
      * UIProcess/PageClient.h:
      (WebKit):
      (PageClient):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      * UIProcess/WebContext.h:
      (WebContext):
      * UIProcess/WebFullScreenManagerProxy.h:
      (WebKit):
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::WebInspectorProxy):
      * UIProcess/WebInspectorProxy.h:
      (WebInspectorProxy):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didReceiveEvent):
      (WebKit::WebPageProxy::creationParameters):
      (WebKit):
      * UIProcess/WebPageProxy.h:
      (WebKit):
      (WebPageProxy):
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebProcessProxy.h:
      (WebProcessProxy):
      * WebKit2Prefix.h:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      (WKBundleFrameCopyWebArchiveFilteringSubframes):
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
      (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession):
      * WebProcess/InjectedBundle/InjectedBundle.h:
      (WebKit):
      (InjectedBundle):
      * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
      (WebKit::NPN_GetValue):
      * WebProcess/Plugins/Netscape/NetscapePlugin.h:
      (NetscapePlugin):
      * WebProcess/Plugins/PluginController.h:
      (PluginController):
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/Plugins/PluginView.h:
      (PluginView):
      * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
      (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
      (WebKit):
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit):
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::respondToChangedSelection):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
      (WebKit::WebPopupMenu::updateFromElement):
      * WebProcess/WebKitMain.cpp:
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit):
      (DrawingArea):
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::createGraphicsContext):
      * WebProcess/WebPage/DrawingAreaImpl.h:
      (DrawingAreaImpl):
      * WebProcess/WebPage/LayerTreeHost.cpp:
      (WebKit::LayerTreeHost::create):
      * WebProcess/WebPage/LayerTreeHost.h:
      (WebCore):
      (WebKit):
      (LayerTreeHost):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit):
      * WebProcess/WebPage/WebFrame.h:
      (WebFrame):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::installPageOverlay):
      (WebKit::WebPage::uninstallPageOverlay):
      (WebKit::WebPage::getWebArchiveOfFrame):
      (WebKit):
      * WebProcess/WebPage/WebPage.h:
      (WebPage):
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::initializeWebProcess):
      (WebKit::WebProcess::ensurePrivateBrowsingSession):
      (WebKit::WebProcess::destroyPrivateBrowsingSession):
      * WebProcess/WebProcess.h:
      (WebProcess):
      * WebProcess/WebProcess.messages.in:
      * config.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30854d12
  13. 25 Dec, 2012 1 commit
    • weinig@apple.com's avatar
      Reduce the number of includes in WebProcess.h · b633b28e
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105709
      
      Reviewed by Dan Bernstein.
      
      * NetworkProcess/NetworkProcess.cpp:
      (WebKit::NetworkProcess::NetworkProcess):
      (WebKit::NetworkProcess::downloadsAuthenticationManager):
      * NetworkProcess/NetworkProcess.h:
      (WebKit):
      * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
      * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
      * WebProcess/FullScreen/WebFullScreenManager.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/Network/NetworkProcessConnection.cpp:
      * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebPage/FindController.cpp:
      * WebProcess/WebPage/WebContextMenu.cpp:
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::WebProcess):
      (WebKit::WebProcess::downloadsAuthenticationManager):
      (WebKit::WebProcess::initializeWebProcess):
      (WebKit::WebProcess::geolocationManager):
      (WebKit):
      (WebKit::WebProcess::applicationCacheManager):
      (WebKit::WebProcess::resourceCacheManager):
      (WebKit::WebProcess::cookieManager):
      (WebKit::WebProcess::authenticationManager):
      (WebKit::WebProcess::databaseManager):
      (WebKit::WebProcess::notificationManager):
      (WebKit::WebProcess::pluginProcessConnectionManager):
      (WebKit::WebProcess::networkProcessConnectionClosed):
      (WebKit::WebProcess::webResourceLoadScheduler):
      (WebKit::WebProcess::pluginProcessCrashed):
      * WebProcess/WebProcess.h:
      (WebCore):
      (WebKit):
      (WebProcess):
      * WebProcess/mac/WebProcessMac.mm:
      (WebKit::WebProcess::platformInitializeWebProcess):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b633b28e
  14. 23 Dec, 2012 1 commit
    • ap@apple.com's avatar
      <rdar://problem/12808377> Network process should respect cookie accept policy · a6354cb9
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105684
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Changed cookie change observer to not use platform strategies, to make it usable
      in NetworkProcess. startObservingCookieChanges() now just takes a callback pointer.
      
      * WebCore.exp.in:
      * platform/CookiesStrategy.h:
      * platform/network/CookieStorage.h:
      * platform/network/cf/CookieStorageCFNet.cpp:
      (WebCore::notifyCookiesChangedOnMainThread):
      (WebCore::startObservingCookieChanges):
      * platform/network/mac/CookieStorageMac.mm:
      (-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]):
      (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
      (WebCore::startObservingCookieChanges):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      * WebCoreSupport/PlatformStrategiesEfl.h:
      CookiesStrategy no longer has notifyCookiesChanged(). This port didn't use it anyway.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      * WebCoreSupport/PlatformStrategiesGtk.h:
      CookiesStrategy no longer has notifyCookiesChanged(). This port didn't use it anyway.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      CookiesStrategy no longer has notifyCookiesChanged().
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      * WebCoreSupport/PlatformStrategiesQt.h:
      CookiesStrategy no longer has notifyCookiesChanged(). This port didn't use it anyway.
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      * WebCoreSupport/WebPlatformStrategies.h:
      CookiesStrategy no longer has notifyCookiesChanged(). This port didn't use it anyway.
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      CookiesStrategy no longer has notifyCookiesChanged(). This port didn't use it anyway.
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkProcess.cpp:
      (WebKit::NetworkProcess::initialize): Tell cookie manager which connection to
      make calls on. Now that the code can run in either WebProcess or NetworkProcess,
      it cannot use WebProcess singleton.
      (WebKit::NetworkProcess::didReceiveMessage): Dispatch WebCookieManager messages.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::initialize): Tell cookie manager which connection to
      make calls on.
      
      * UIProcess/Downloads/DownloadProxy.cpp:
      (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): Changed to use
      WebContext::networkingProcessConnection() instead of deciding upon the connection here.
      
      * UIProcess/Network/NetworkProcessProxy.cpp:
      (WebKit::NetworkProcessProxy::didReceiveMessage): Call m_webContext->dispatchMessage),
      as WebCookieManagerProxy handlers are registered on the context. This may seem wasteful,
      but a lot of registered managers will need the ame handling soon.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::networkingProcessConnection): Added a way to get connection
      to whichever process performs networking.
      (WebKit::WebContext::removeNetworkProcessProxy): Invalidate cookie manager proxy,
      so that expected responses could be cleared.
      (WebKit::WebContext::disconnectProcess): Updated a FIXME.
      
      * UIProcess/WebContext.h: Deleted deprecatedSharedProcess().
      (WebKit::WebContext::networkingProcessConnection): Added.
      (WebKit::WebContext::sendToNetworkingProcess): Added.
      (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary): Added.
      
      * UIProcess/WebCookieManagerProxy.cpp:
      (WebKit::WebCookieManagerProxy::shouldTerminate): Should not prevent WebProcess
      termination when NetworkProcess is in use.
      (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Removed a useless ASSERT
      that neiter documents expectations nor helps find bugs. Send a message to correct
      process, whether WebProcess or NetworkProcess.
      (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Ditto.
      (WebKit::WebCookieManagerProxy::deleteAllCookies): Ditto.
      (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Ditto.
      (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
      (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Ditto.
      (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): Ditto.
      
      * WebProcess/Cookies/WebCookieManager.h:
      * WebProcess/Cookies/WebCookieManager.cpp: Made the class usable in either WebProcess
      or NetworkProcess.
      (WebKit::WebCookieManager::setConnection): WebCookieManager now remembers which
      connection to talk back on.
      (WebKit::WebCookieManager::didReceiveMessage): Added an assertion that stored connection
      matches the one being used to reciev messages.
      (WebKit::WebCookieManager::getHostnamesWithCookies): Use the stored connection to
      send a reply.
      (WebKit::WebCookieManager::startObservingCookieChanges): Pass a callback function,
      so that WebCore doesn't have to use a platform strategy.
      (WebKit::WebCookieManager::cookiesDidChange): The new callback.
      (WebKit::WebCookieManager::dispatchCookiesDidChange): Use the stored connection.
      (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): Use the stored connection.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      Removed notifyCookiesChanged() which is no longer part of CookiesStrategy.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6354cb9
  15. 22 Dec, 2012 1 commit
    • ap@apple.com's avatar
      Add a separate class for networking related storage · f18b8090
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=105676
      
              Reviewed by Sam Weinig.
      
              NetworkingContext combines a reference to storage (cookies and more) and data that's
              only meaningful when loading. This makes it very ugly to use for cookie manipulation
              when there is no load (e.g. for document.cookie).
      
              Adding NetworkStorageSession, which encorportes network-related sesion data, such
              as cookies and session HTTP credentials.
      
              For some ports, refactoring is not finished, NetworkStorageSession being a wrapper
              for NetworkingContext.
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * Target.pri:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              Updated for new files and functions.
      
              * platform/network/PlatformCookieJar.h:
              * loader/CookieJar.cpp:
              * platform/CookiesStrategy.h:
              * platform/network/cf/CookieJarCFNet.cpp:
              * platform/network/chromium/CookieJarChromium.cpp:
              * platform/network/curl/CookieJarCurl.cpp:
              * platform/network/mac/CookieJarMac.mm:
              * platform/network/qt/CookieJarQt.cpp:
              * platform/network/soup/CookieJarSoup.cpp:
              * platform/network/win/CookieJarWin.cpp:
              PlatformCookieJar and strategy cookie functions now take a NetworkStorageSession
              instead of NetworkingContext.
              Note that they take a const reference to support creating a temporary session
              wrapper for ports that just wrap a NetworkingContext.
      
              * loader/ResourceLoader.cpp:
              * loader/cache/CachedResource.h:
              * platform/network/BlobResourceHandle.cpp:
              * platform/network/ResourceHandle.cpp:
              * platform/network/ResourceHandle.h:
              * platform/network/ResourceHandleInternal.h:
              * platform/network/chromium/ResourceHandle.cpp:
              * platform/network/curl/ResourceHandleCurl.cpp:
              * platform/network/mac/ResourceHandleMac.mm:
              * platform/network/qt/QNetworkReplyHandler.cpp:
              * platform/network/soup/DNSSoup.cpp:
              * platform/network/soup/ResourceHandleSoup.cpp:
              * platform/network/win/ResourceHandleWin.cpp:
              ResourceHandle no longer includes unneeded NetworkingContext.h and AuthenticationClient.h.
              This avoids near-world rebuilds on any NetworkingContext change.
      
              * platform/network/NetworkStorageSession.h: Added.
              * platform/network/NetworkStorageSessionStub.cpp: Added.
              * platform/network/cf/NetworkStorageSessionCFNet.cpp: Added.
              Good new stuff. Stub version just wraps NetworkingContext for platforms that still
              need to finish the refactoring.
      
              * platform/network/NetworkingContext.h:
              The context now has a NetworkStorageSession, and doesn't expose CFNet level objects directly.
      
              * platform/network/cf/CookieStorageCFNet.cpp:
              * platform/network/cf/CookieStorageCFNet.h: Removed.
              We no longer have separate free functions to track storage, it's part of NetworkStorageSession now.
      
              * platform/network/cf/ResourceHandleCFNet.cpp: Updated to use NetworkStorageSession.
      
              * platform/network/mac/CookieStorageMac.mm: Dont include CookieStorageCFNet.h, it
              was not needed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f18b8090
  16. 18 Dec, 2012 1 commit
  17. 15 Dec, 2012 2 commits
    • mark.lam@apple.com's avatar
      Added #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer(). · 2fc9801b
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104934..
      
      Not reviewed.
      
      Greening the Qt Linux Release Minimal bot.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fc9801b
    • mark.lam@apple.com's avatar
      Re-landing patch for "Introducing the DatabaseStrategy and database servers". · 266a1d70
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104934.
      
      Not reviewed.
      
      Source/WebCore: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
      
      No new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
      * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      (DatabaseManager):
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
      * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::databaseStrategy):
      (PlatformStrategies):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      Source/WebKit/efl: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createDatabaseStrategy):
      
      Source/WebKit/qt: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createDatabaseStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2: 
      
      Merged from r137767. Previously reviewed by Sam Weinig.
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createDatabaseStrategy):
      (WebKit):
      (WebKit::WebPlatformStrategies::getDatabaseServer):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      266a1d70
  18. 14 Dec, 2012 3 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r137767. · 13209154
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/137767
      https://bugs.webkit.org/show_bug.cgi?id=105062
      
      Broke Mac builds. (Requested by mlam on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-14
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Removed.
      * Modules/webdatabase/DBBackendServer.h: Removed.
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Removed.
      * platform/DatabaseStrategy.h: Removed.
      * platform/PlatformStrategies.h:
      (WebCore):
      (WebCore::PlatformStrategies::PlatformStrategies):
      (PlatformStrategies):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2:
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13209154
    • mark.lam@apple.com's avatar
      Introducing the DatabaseStrategy and database servers. · 6122d624
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104934.
      
      Reviewed by Sam Weinig.
      
      The database server is currently a placeholder that does nothing.
      
      Source/WebCore: 
      
      No new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/webdatabase/AbstractDatabaseServer.h: Added.
      (WebCore):
      (AbstractDatabaseServer):
      (WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
      (WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
      * Modules/webdatabase/DBBackendServer.h: Added.
      (DBBackend):
      * Modules/webdatabase/DatabaseManager.cpp:
      (WebCore::DatabaseManager::DatabaseManager):
      * Modules/webdatabase/DatabaseManager.h:
      (WebCore):
      (DatabaseManager):
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/DatabaseStrategy.cpp: Added.
      (WebCore):
      (WebCore::DatabaseStrategy::getDatabaseServer):
      * platform/DatabaseStrategy.h: Added.
      (WebCore):
      (DatabaseStrategy):
      (WebCore::DatabaseStrategy::~DatabaseStrategy):
      * platform/PlatformStrategies.h:
      (WebCore):
      (WebCore::PlatformStrategies::databaseStrategy):
      (PlatformStrategies):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createDatabaseStrategy):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win: 
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createDatabaseStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince: 
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createDatabaseStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2: 
      
      * CMakeLists.txt:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createDatabaseStrategy):
      (WebKit):
      (WebKit::WebPlatformStrategies::getDatabaseServer):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6122d624
    • ap@apple.com's avatar
      <rdar://problem/12880750> RGRESSION: Crash when emptying cookie jar · daa22817
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=105038
      
              Reviewed by Jessie Berlin.
      
              Handle null context, which is used for cookie management functions.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::cookiesForDOM):
              (WebKit::WebPlatformStrategies::setCookiesFromDOM):
              (WebKit::WebPlatformStrategies::cookiesEnabled):
              (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
              (WebKit::WebPlatformStrategies::getRawCookies):
              (WebKit::WebPlatformStrategies::deleteCookie):
              (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
              (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
              (WebKit::WebPlatformStrategies::deleteAllCookies):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      daa22817
  19. 13 Dec, 2012 1 commit
  20. 29 Nov, 2012 1 commit
    • ap@apple.com's avatar
      [WK2] Forward cookie jar calls to NetworkProcess · 043d6115
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=103457
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      PlatformCookieJar.h functions are now used in WebKit2.
      
      * loader/CookieJar.cpp:
      (WebCore::cookies):
      (WebCore::setCookies):
      (WebCore::cookiesEnabled):
      (WebCore::cookieRequestHeaderFieldValue):
      (WebCore::getRawCookies):
      (WebCore::deleteCookie):
      (WebCore::getHostnamesWithCookies):
      (WebCore::deleteCookiesForHostname):
      (WebCore::deleteAllCookies):
      Use a strategy instead of going to PlatformCookieJar directly.
      
      * platform/Cookie.h: (Cookie): Added a default constructor, so that Cookie could be
      sent over IPC.
      
      * platform/CookiesStrategy.h: Added functions for cookie jar.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::cookiesForDOM):
      (PlatformStrategiesEfl::setCookiesFromDOM):
      (PlatformStrategiesEfl::cookiesEnabled):
      (PlatformStrategiesEfl::cookieRequestHeaderFieldValue):
      (PlatformStrategiesEfl::getRawCookies):
      (PlatformStrategiesEfl::deleteCookie):
      (PlatformStrategiesEfl::getHostnamesWithCookies):
      (PlatformStrategiesEfl::deleteCookiesForHostname):
      (PlatformStrategiesEfl::deleteAllCookies):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::cookiesForDOM):
      (PlatformStrategiesGtk::setCookiesFromDOM):
      (PlatformStrategiesGtk::cookiesEnabled):
      (PlatformStrategiesGtk::cookieRequestHeaderFieldValue):
      (PlatformStrategiesGtk::getRawCookies):
      (PlatformStrategiesGtk::deleteCookie):
      (PlatformStrategiesGtk::getHostnamesWithCookies):
      (PlatformStrategiesGtk::deleteCookiesForHostname):
      (PlatformStrategiesGtk::deleteAllCookies):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::cookiesForDOM):
      (WebPlatformStrategies::setCookiesFromDOM):
      (WebPlatformStrategies::cookiesEnabled):
      (WebPlatformStrategies::cookieRequestHeaderFieldValue):
      (WebPlatformStrategies::getRawCookies):
      (WebPlatformStrategies::deleteCookie):
      (WebPlatformStrategies::getHostnamesWithCookies):
      (WebPlatformStrategies::deleteCookiesForHostname):
      (WebPlatformStrategies::deleteAllCookies):
      (WebPlatformStrategies::getPluginInfo):
      (WebPlatformStrategies::bufferForType):
      WebKit1 strategy just uses PlatformCookieJar.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::cookiesForDOM):
      (PlatformStrategiesQt::setCookiesFromDOM):
      (PlatformStrategiesQt::cookiesEnabled):
      (PlatformStrategiesQt::cookieRequestHeaderFieldValue):
      (PlatformStrategiesQt::getRawCookies):
      (PlatformStrategiesQt::deleteCookie):
      (PlatformStrategiesQt::getHostnamesWithCookies):
      (PlatformStrategiesQt::deleteCookiesForHostname):
      (PlatformStrategiesQt::deleteAllCookies):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::cookiesForDOM):
      (WebPlatformStrategies::setCookiesFromDOM):
      (WebPlatformStrategies::cookiesEnabled):
      (WebPlatformStrategies::cookieRequestHeaderFieldValue):
      (WebPlatformStrategies::getRawCookies):
      (WebPlatformStrategies::deleteCookie):
      (WebPlatformStrategies::getHostnamesWithCookies):
      (WebPlatformStrategies::deleteCookiesForHostname):
      (WebPlatformStrategies::deleteAllCookies):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::cookiesForDOM):
      (PlatformStrategiesWinCE::setCookiesFromDOM):
      (PlatformStrategiesWinCE::cookiesEnabled):
      (PlatformStrategiesWinCE::cookieRequestHeaderFieldValue):
      (PlatformStrategiesWinCE::getRawCookies):
      (PlatformStrategiesWinCE::deleteCookie):
      (PlatformStrategiesWinCE::getHostnamesWithCookies):
      (PlatformStrategiesWinCE::deleteCookiesForHostname):
      (PlatformStrategiesWinCE::deleteAllCookies):
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      Added messages to maniputate CookieJar in network process.
      
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      * NetworkProcess/NetworkConnectionToWebProcess.cpp: Removed unnecessary WebCore:: prefixes,
      this file has a using direcive.
      (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
      (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
      (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
      (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
      (WebKit::NetworkConnectionToWebProcess::getRawCookies):
      (WebKit::NetworkConnectionToWebProcess::deleteCookie):
      (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
      (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
      (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
      Added implementations that use PlatformCookieJar in the network process.
      
      * Scripts/webkit2/messages.py: (struct_or_class):
      * Shared/WebCoreArgumentCoders.h:
      * Shared/WebCoreArgumentCoders.cpp:
      (CoreIPC::::encode):
      (CoreIPC::::decode):
      Added support for Cookie.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.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::getHostnamesWithCookies):
      (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
      (WebKit::WebPlatformStrategies::deleteAllCookies):
      When using the network process, forward cookie calls to it.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      043d6115
  21. 16 Nov, 2012 3 commits
    • timothy_horton@apple.com's avatar
      Fix the windows build. · 92fae5d4
      timothy_horton@apple.com authored
      Patch by Sam Weinig <weinig@apple.com> on 2012-11-16
      
      * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
      (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
      (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
      (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::defaultCookieStorage):
      * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
      (WebFrameNetworkingContext):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      * WebProcess/WebPage/win/WebPageWin.cpp:
      (WebKit::cachedResponseForURL):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::initializeWebProcess):
      * WebProcess/win/WebProcessWin.cpp:
      (WebKit::WebProcess::platformSetCacheModel):
      (WebKit::WebProcess::platformClearResourceCaches):
      (WebKit::WebProcess::platformInitializeWebProcess):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92fae5d4
    • bfulgham@webkit.org's avatar
      Source/WebKit/win: [WinCairo] Unreviewed build fix after r134960. · bf61fdc1
      bfulgham@webkit.org authored
      Avoid including Mac-specific headers.
      
      * WebCoreSupport/WebFrameNetworkingContext.cpp: Stub out
      CFNetwork-based implementations.
      * WebCoreSupport/WebFrameNetworkingContext.h: Exclude
      CFNetwork data types.
      * WebCoreSupport/WebPlatformStrategies.cpp: Stub out
      CFNetwork-based implementations.
      * WebCoreSupport/WebPlatformStrategies.h: Exclude
      CFNetwork data types.
      
      Source/WebKit2: [WinCairo] Build correction after r134960.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:  Stub out
      calls to CFNetwork-based implementation.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf61fdc1
    • ap@apple.com's avatar
      Private Browsing is a per-page setting that sets a global value · 9ffc45d7
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=67870
      
              Reviewed by Sam Weinig.
      
              Make ResourceHandle{Mac,CFNet} use context to access storage session.
      
              * WebCore.exp.in: We track less session state in WebCore now, so we need fewer
              exports.
      
              * loader/FrameNetworkingContext.h: Added an OVERRIDE.
      
              * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): WebCore
              no longer keeps track of a globally enabled private CFNetwork storage session.
      
              * platform/CookiesStrategy.h: Added defaultCookieStorage(). Some cookie jar methods
              don't have a NetworkingContext pointer, and have to use whatever a client expects
              them to do. Perhaps we should move those methods away from WebCore eventually.
      
              * platform/network/NetworkingContext.h: Added storageSession().
      
              * platform/network/ResourceHandle.h: Removed sttaic methods for dealing with global
              sessions.
      
              * platform/network/ResourceHandleInternal.h: Added m_storageSession. We need to
              remember it post-creation to do things in willSendRequest. Alternatively, we could
              keep a reference to NetworkingContext itself.
      
              * platform/network/cf/CookieJarCFNet.cpp:
              (WebCore::setCookiesFromDOM): currentCFHTTPCookieStorage now needs a context,
              there is no globally current one any more. Also, we don't really expect cookie
              stirage to be 0 when not using NSURLConnection.
              (WebCore::cookiesForDOM): Ditto.
              (WebCore::cookieRequestHeaderFieldValue): Ditto.
              (WebCore::cookiesEnabled): Ditto.
              (WebCore::getRawCookies): Ditto.
              (WebCore::deleteCookie): Ditto.
              (WebCore::getHostnamesWithCookies): Ditto.
              (WebCore::deleteCookiesForHostname): Ditto.
              (WebCore::deleteAllCookies): Ditto.
              * platform/network/cf/CookieStorageCFNet.cpp:
              (WebCore::currentCFHTTPCookieStorage): Use a context.
              (WebCore::defaultCFHTTPCookieStorage): Except for Windows-only override session,
              this is implemented in a strategy.
              (WebCore::overridenCookieStorage): Exposed the override for WebKit use on Windows.
      
              * platform/network/cf/CookieStorageCFNet.h: Ditto.
      
              * platform/network/cf/ResourceHandleCFNet.cpp:
              (WebCore::willSendRequest): Use storage session from the context, not global one.
              (WebCore::makeFinalRequest): Merged this into the only remaining caller. This
              function didn't really make any sense on its own.
              (WebCore::shouldRelaxThirdPartyCookiePolicy): Factored out of createCFURLConnection
              to match Mac.
              (WebCore::ResourceHandle::createCFURLConnection): While merging makeFinalRequest()
              in, removed some seemingly nonsensical code that was getting and immediately re-applying
              cookie storage accept policy.
              (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest.
              (WebCore::ResourceHandle::willSendRequest): Apply the stored session, not global one.
              (WebCore::ResourceHandle::storageSession): An accessor for static methods that cannot
              access "d".
              (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession() for use in willSendRequest.
              (WebCore::ResourceHandle::willLoadFromCache): Don't call makeFinalRequest here.
              It didn't match Mac, and nothing in makeFinalRequest should have affected the result.
      
              * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest):
              This function used to apply current storage session to every request for no apparent
              reason.
      
              * platform/network/mac/CookieJarMac.mm:
              (WebCore::cookiesForDOM): Changed to pass context to currentCFHTTPCookieStorage.
              (WebCore::cookieRequestHeaderFieldValue): Ditto.
              (WebCore::setCookiesFromDOM): Ditto.
              (WebCore::cookiesEnabled): Ditto.
              (WebCore::getRawCookies): Ditto.
              (WebCore::deleteCookie): Ditto.
              (WebCore::getHostnamesWithCookies): Ditto.
              (WebCore::deleteCookiesForHostname): Ditto.
              (WebCore::deleteAllCookies): Ditto.
              * platform/network/mac/ResourceHandleMac.mm:
              (WebCore::shouldRelaxThirdPartyCookiePolicy): There was no need to special case
              null currentCFHTTPCookieStorage, WKSI handles that internally. Added a context
              argument, so that the function can access current session.
              (WebCore::ResourceHandle::createNSURLConnection): Updated for other code changes.
              (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest.
              (WebCore::ResourceHandle::willLoadFromCache): Style fix.
              (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession()
              for use in willSendRequest. 
              (WebCore::ResourceHandle::willSendRequest): Use stored session, not global one.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ffc45d7
  22. 26 Oct, 2012 2 commits
    • beidson@apple.com's avatar
      Have NetworkProcess manage resource load scheduling. · 2d31232a
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100479
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Down in WebCore we need to virtualize a handful of ResourceLoadScheduler methods
      to be overridden by WebKit's implementation.
      
      No new tests (No change in Core behavior).
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::resourceLoadScheduler): Gracefully handle LoaderStrategies wanting to return the default scheduler.
      (WebCore::ResourceLoadScheduler::scheduleLoad): Call notifyDidScheduleResourceRequest.
      (WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest): Moved InspectorInstrumentation call
        here so derived classes can do it indirectly.
      (WebCore::ResourceLoadScheduler::startResourceLoader): To allow derived classes the ability to call
        ResourceLoader::start() which only ResourceLoadScheduler can do.
      
      * loader/ResourceLoadScheduler.h:
      (ResourceLoadScheduler): Virtualize some core public methods so they can be overridden.
      (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled): Make virtual.
      (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests): Make private as it's internal only.
      
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::setIdentifier): Add this setter so outside clients can manually change the identifier.
      
      * loader/ResourceLoader.h:
      (WebCore::ResourceLoader::identifier): Change identifier to explicitly be uint64_t.
      (WebCore::ResourceLoader::request): Make public.
      (ResourceLoader):
      
      Source/WebKit2:
      
      Implement a ResourceLoadScheduler that models the same behavior as WebCore::ResourceLoadScheduler.
      
      The WebProcess scheduler acts as a marshall to the NetworkProcess scheduler via CoreIPC messaging.
      
      Besides MainResourceLoads which are started directly in the WebProcess, all other loads are now
      started only when the NetworkProcess tells them to start.
      
      Build-system and messaging related stuff:
      * DerivedSources.make:
      * Platform/CoreIPC/MessageID.h:
      * WebKit2.xcodeproj/project.pbxproj:
      
      Add a new Network logging channel.
      * Platform/Logging.cpp:
      (WebKit::getChannelFromName):
      * Platform/Logging.h:
      
      Modeled after ResourceLoadScheduler::HostInformation but more specifically geared towards what NetworkProcess needs to track:
      * NetworkProcess/HostRecord.cpp: Added.
      (WebKit::HostRecord::HostRecord):
      (WebKit::HostRecord::~HostRecord):
      (WebKit::HostRecord::schedule):
      (WebKit::HostRecord::addLoadInProgress):
      (WebKit::HostRecord::remove):
      (WebKit::HostRecord::hasRequests):
      (WebKit::HostRecord::limitRequests):
      * NetworkProcess/HostRecord.h:
      (WebKit::HostRecord::name):
      (WebKit::HostRecord::requestsPending):
      
      Gateway messaging from the WebResourceLoadScheduler to the NetworkResourceLoadScheduler:
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
      (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
      (WebKit::NetworkConnectionToWebProcess::registerObserver):
      (WebKit::NetworkConnectionToWebProcess::unregisterObserver):
      (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
      (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
      (WebKit::NetworkConnectionToWebProcess::didClose):
      (WebKit::NetworkConnectionToWebProcess::scheduleNetworkRequest):
      (WebKit::NetworkConnectionToWebProcess::addLoadInProgress):
      (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
      (WebKit::NetworkConnectionToWebProcess::crossOriginRedirectReceived):
      (WebKit::NetworkConnectionToWebProcess::servePendingRequests):
      (WebKit::NetworkConnectionToWebProcess::suspendPendingRequests):
      (WebKit::NetworkConnectionToWebProcess::resumePendingRequests):
      (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled):
      * NetworkProcess/NetworkConnectionToWebProcess.h:
      (NetworkConnectionToWebProcessObserver): Add an observer interface so arbitrary objects can be notified if
        a Network->WebProcess connection closes.
      (WebKit::NetworkConnectionToWebProcessObserver::~NetworkConnectionToWebProcessObserver):
      (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled):
      * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
      
      Represents a request,  ResourceLoadIdentifier, and connection that all correspond to the same pending NetworkLoad:
      * NetworkProcess/NetworkRequest.cpp:
      (WebKit::NetworkRequest::NetworkRequest):
      (WebKit::NetworkRequest::~NetworkRequest):
      (WebKit::NetworkRequest::connectionToWebProcessDidClose): Using the NetworkConnectionToWebProcessObserver interface,
        if the connection closes then clear out the connection pointer for this request that is now irrelevant.
      * NetworkProcess/NetworkRequest.h:
      (WebKit::NetworkRequest::create):
      (WebKit::NetworkRequest::identifier):
      (WebKit::NetworkRequest::connectionToWebProcess):
      
      Manages connection-per-host scheduling with the same structure as WebCore::ResourceLoadScheduling but also with IPC:
      * NetworkProcess/NetworkResourceLoadScheduler.cpp: Added.
      (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
      (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests):
      (WebKit::NetworkResourceLoadScheduler::requestTimerFired):
      (WebKit::NetworkResourceLoadScheduler::scheduleNetworkRequest):
      (WebKit::NetworkResourceLoadScheduler::addLoadInProgress):
      (WebKit::NetworkResourceLoadScheduler::hostForURL):
      (WebKit::NetworkResourceLoadScheduler::removeLoadIdentifier):
      (WebKit::NetworkResourceLoadScheduler::crossOriginRedirectReceived):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
      (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve as many requests for the host as we should,
        skipping the NetworkRequests who have lost their connection to their WebProcess.
      (WebKit::NetworkResourceLoadScheduler::suspendPendingRequests):
      (WebKit::NetworkResourceLoadScheduler::resumePendingRequests):
      * NetworkProcess/NetworkResourceLoadScheduler.h: Added.
      * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Added.
      (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
      
      * NetworkProcess/NetworkProcess.h:
      (WebKit::NetworkProcess::networkResourceLoadScheduler): Add a scheduler global to the NetworkProcess.
      
      A thin derivation of WebCore::ResourceLoadScheduler, most of what WebResourceLoadScheduler does is handle IPC to the NetworkProcess:
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
      (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
      (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      (WebKit::WebResourceLoadScheduler::addMainResourceLoad):
      (WebKit::WebResourceLoadScheduler::remove):
      (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived):
      (WebKit::WebResourceLoadScheduler::servePendingRequests):
      (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
      (WebKit::WebResourceLoadScheduler::resumePendingRequests):
      (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
      (WebKit::WebResourceLoadScheduler::startResourceLoad):
      * WebProcess/Network/WebResourceLoadScheduler.h:
      
      Add the ability for the NetworkProcess to message back to the WebProcess telling it to start a resource load:
      * WebProcess/Network/NetworkProcessConnection.cpp:
      (WebKit::NetworkProcessConnection::didReceiveMessage):
      (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
      (WebKit::NetworkProcessConnection::startResourceLoad):
      * WebProcess/Network/NetworkProcessConnection.h:
      * WebProcess/Network/NetworkProcessConnection.messages.in:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::resourceLoadScheduler): Only return the WebResourceLoadScheduler if NetworkProcess is enabled.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::ensureNetworkProcessConnection): Actually keep the NetworkProcessConnection around in a member variable.
      (WebKit::WebProcess::networkConnection):
      * WebProcess/WebProcess.h:
      (WebKit::WebProcess::usesNetworkProcess): Expose this for platform strategies sake.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d31232a
    • beidson@apple.com's avatar
      Crash in WebProces at WebCore::ResourceLoadScheduler::crossOriginRedirectReceived + 78 · edf13385
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100554
      
      Reviewed by Alexey Proskuryakov.
      
      For now, just have WebPlatformStrategies return the same default resourceLoadScheduler that
      WebCore knows about.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::resourceLoadScheduler):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edf13385
  23. 25 Oct, 2012 1 commit
    • beidson@apple.com's avatar
      Allow LoaderStrategy to override the ResourceLoadScheduler · 33785568
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100355
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Allow LoaderStrategy to override the implementation of the ResourceLoadScheduler.
      Add a default implementation that just returns the current ResourceLoadScheduler.
      
      No new tests (No behavior change).
      
      Project file stuff:
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      "Virtualize" ResourceLoadScheduler to expose build issues in preparation for future virtualization:
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::~ResourceLoadScheduler):
      * loader/ResourceLoadScheduler.h:
      (ResourceLoadScheduler):
      
      Add the new method plus a default implementation:
       * loader/LoaderStrategy.cpp:
      (WebCore::LoaderStrategy::resourceLoadScheduler):
      * loader/LoaderStrategy.h:
      
      When strategies are enabled, use the LoaderStrategy for this:
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::suspendPostAttachCallbacks):
      (WebCore::ContainerNode::resumePostAttachCallbacks):
      
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::loadNow):
      
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::releaseResources):
      (WebCore::ResourceLoader::willSendRequest):
      
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::load):
      
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::performPostLoadActions):
      
      Source/WebKit2:
      
      Add a WebKit2 subclass of ResourceLoadScheduler that currently adds no new functionality:
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
      * WebProcess/Network/WebResourceLoadScheduler.h:
      
      WebProcess hangs on to the default shared WebResourceLoadScheduler:
      * WebProcess/WebProcess.h:
      (WebKit::WebProcess::webResourceLoadScheduler):
      
      If the NetworkProcess is enabled, return the new WebResourceLoadScheduler:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::resourceLoadScheduler):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33785568
  24. 24 Oct, 2012 2 commits
    • beidson@apple.com's avatar
      Add a strategy for loader customization. · 888d153a
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100278
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      It's empty for now and does nothing, just like the goggles.
      
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::loaderStrategy):
      (PlatformStrategies):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/PlatformStrategiesEfl.cpp:
      (PlatformStrategiesEfl::createLoaderStrategy):
      * WebCoreSupport/PlatformStrategiesEfl.h:
      (PlatformStrategiesEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/PlatformStrategiesGtk.cpp:
      (PlatformStrategiesGtk::createLoaderStrategy):
      * WebCoreSupport/PlatformStrategiesGtk.h:
      (PlatformStrategiesGtk):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createLoaderStrategy):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (PlatformStrategiesQt::createLoaderStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createLoaderStrategy):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::createLoaderStrategy):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      (PlatformStrategiesWinCE):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createLoaderStrategy):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      888d153a
    • ap@apple.com's avatar
      Add a strategy for shared workers · 9416a2e7
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=100165
      
              Reviewed by Brady Eidson.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9416a2e7
  25. 18 Oct, 2012 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] WebKit2 does not build without PLUGIN_PROCESS on Mac · 08462199
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99771
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-10-18
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * WebCore.exp.in: The symbol is used by WebCore Test Support, move it
      to the general section.
      
      Source/WebKit2:
      
      Add ENABLE(PLUGIN_PROCESS), ENABLE(SHARED_WORKER_PROCESS) and ENABLE(NETSCAPE_PLUGIN_API)
      as needed to exclude the code with dependencies on PLUGIN_PROCESS.
      
      * Platform/CoreIPC/MessageID.h:
      * Shared/SharedWorkerProcessCreationParameters.cpp:
      * Shared/SharedWorkerProcessCreationParameters.h:
      * SharedWorkerProcess/SharedWorkerProcess.cpp:
      * SharedWorkerProcess/SharedWorkerProcess.h:
      * SharedWorkerProcess/SharedWorkerProcess.messages.in:
      * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
      * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm:
      * UIProcess/API/C/WKContext.cpp:
      (WKContextSetAdditionalPluginsDirectory):
      (WKContextGetPluginSiteDataManager):
      * UIProcess/API/C/WKPluginSiteDataManager.cpp:
      (WKPluginSiteDataManagerGetTypeID):
      (WKPluginSiteDataManagerGetSitesWithData):
      * UIProcess/Launcher/ProcessLauncher.cpp:
      (WebKit::ProcessLauncher::processTypeAsString):
      (WebKit::ProcessLauncher::getProcessTypeFromString):
      * UIProcess/Launcher/ProcessLauncher.h:
      * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
      (WebKit::createProcess):
      * UIProcess/Plugins/PluginInfoStore.cpp:
      * UIProcess/Plugins/PluginInfoStore.h:
      * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
      * UIProcess/Plugins/WebPluginSiteDataManager.h:
      * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
      (WebKit::PluginInfoStore::getPluginInfo):
      * UIProcess/SharedWorkers/SharedWorkerProcessManager.cpp:
      * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
      * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
      * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
      * UIProcess/SharedWorkers/SharedWorkerProcessProxy.messages.in:
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::~WebContext):
      (WebKit::WebContext::shouldTerminate):
      (WebKit::WebContext::disconnectProcess):
      (WebKit):
      * UIProcess/WebContext.h:
      (WebContext):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::canShowMIMEType):
      (WebKit):
      (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit):
      * UIProcess/WebProcessProxy.h:
      (WebProcessProxy):
      * UIProcess/WebProcessProxy.messages.in:
      * WebKit2Prefix.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::createPlugin):
      (WebKit::WebFrameLoaderClient::recreatePlugin):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::WebPlatformStrategies):
      (WebKit::WebPlatformStrategies::refreshPlugins):
      (WebKit::WebPlatformStrategies::getPluginInfo):
      (WebKit):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      (WebKit):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit):
      (WebKit::WebPage::createPlugin):
      (WebKit::canPluginHandleResponse):
      * WebProcess/WebPage/WebPage.h:
      (WebPage):
      * WebProcess/WebProcess.cpp:
      (WebKit):
      * WebProcess/WebProcess.h:
      (WebProcess):
      * WebProcess/WebProcess.messages.in:
      
      Tools:
      
      * DumpRenderTree/mac/MockWebNotificationProvider.mm: The file was not including config.h,
      effectively breaking feature flags.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08462199
  26. 13 Aug, 2012 1 commit
    • ap@apple.com's avatar
      [WK2] Move a remaining per-process message from WebContext to WebProcessProxy · 49a7220a
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=93883
      
              Reviewed by Sam Weinig.
      
              There was one plug-in message renaming. Moving it, and also other plug-in messages
              for consistency.
      
              * UIProcess/WebContext.cpp:
              (WebKit): Got rid of the last MESSAGE_CHECK in this file.
              (WebKit::WebContext::WebContext): Moved m_pluginWorkQueue to a singleton.
              We don't need more than one queue (all it does is read plug-in info), and if we
              needed, it would have been per-process, not per-context.
              (WebKit::WebContext::~WebContext): No more work queue.
              (WebKit::WebContext::processDidFinishLaunching): Ditto.
      
              * UIProcess/WebContext.h: No longer needs to be a QueueClient.
      
              * UIProcess/WebContext.messages.in:
              * UIProcess/WebProcessProxy.messages.in:
              Moved plug-in related messages.
      
              * UIProcess/WebProcessProxy.cpp:
              (WebKit::pluginWorkQueue): Moved from WebContext to a singleton.
              (WebKit::WebProcessProxy::sendDidGetPlugins): Moved from WebContext.
              (WebKit::WebProcessProxy::handleGetPlugins): Ditto.
              (WebKit::WebProcessProxy::getPlugins): Ditto.
              (WebKit::WebProcessProxy::getPluginPath): Ditto.
              (WebKit::WebProcessProxy::getPluginProcessConnection): Ditto.
              (WebKit::WebProcessProxy::didGetSitesWithPluginData): Ditto.
              (WebKit::WebProcessProxy::didClearPluginSiteData): Ditto.
      
              * UIProcess/WebProcessProxy.h: Process proxy needs to be thread safe ref counted
              now, since it sends messages to itself on a work queue and back.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::populatePluginCache): Updated for new receiver.
      
              * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Ditto.
      
              * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49a7220a
  27. 11 May, 2012 1 commit
    • kling@webkit.org's avatar
      WK2/Plugins: Move enumeration of plugins to a secondary UIProcess thread. · 89ef6688
      kling@webkit.org authored
      <http://webkit.org/b/86143>
      <rdar://problem/10777218>
      
      Reviewed by Anders Carlsson.
      
      To avoid spins beneath PluginInfoStore::getPluginInfo(), do this work on a secondary
      thread in the UIProcess.
      
      * Shared/APIObject.h:
      
          Made APIObject a ThreadSafeRefCounted. In the context of this patch, this is to
          be able to dispatch bound Functions on WebContext.
      
      * WebProcess/mac/KeychainItemShimMethods.mm:
      (WebKit::responseMap):
      * WebProcess/mac/SecItemShimMethods.mm:
      (WebKit::responseMap):
      * WebKit2.xcodeproj/project.pbxproj:
      * Shared/BlockingResponseMap.h:
      (BlockingResponseMap):
      (BlockingResponseMap::waitForResponse):
      (BlockingResponseMap::didReceiveResponse):
      
           Renamed from Source/WebKit2/WebProcess/mac/KeychainShimResponseMap.h.
           Generalize this somewhat since it's useful in more than just the keychain scenario.
           This can/should be generalized further, but that's a topic for another patch.
      
      * UIProcess/Plugins/PluginInfoStore.h:
      * UIProcess/Plugins/PluginInfoStore.cpp:
      (WebKit::PluginInfoStore::plugins):
      (WebKit::PluginInfoStore::findPluginForMIMEType):
      (WebKit::PluginInfoStore::findPluginForExtension):
      (WebKit::PluginInfoStore::findPlugin):
      (WebKit::PluginInfoStore::infoForPluginWithPath):
      
          Slap a mutex on the PluginInfoStore since it can now be called from both the
          main thread (via WKFrameCanShowMIMEType) and the GetPlugin work queue.
      
      * UIProcess/WebContext.messages.in:
      * UIProcess/WebContext.h:
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::~WebContext):
      (WebKit::WebContext::processDidFinishLaunching):
      (WebKit::WebContext::sendDidGetPlugins):
      (WebKit::WebContext::handleGetPlugins):
      (WebKit::WebContext::getPlugins):
      (WebKit::WebContext::didReceiveMessageOnConnectionWorkQueue):
      
          Make GetPlugins a DispatchOnConnectionQueue message and execute it on a new
          plug-in work queue. This effectively makes the GetPlugin call asynchronous.
          On Mac, the built-in PDF reader is still registered on the main thread as that
          ends up calling into localizedString().
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::didGetPlugins):
      * WebProcess/WebProcess.h:
      * WebProcess/WebProcess.messages.in:
      
          Add a DidGetPlugins message to WebProcess. This is passed directly to the handler
          in WebPlatformStrategies.cpp.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::responseMap):
      (WebKit::handleDidGetPlugins):
      (WebKit::generateRequestID):
      (WebKit::WebPlatformStrategies::populatePluginCache):
      
          Use a BlockingResponseMap to block the WebProcess main thread until the UIProcess
          responds with DidGetPlugins.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89ef6688
  28. 19 Mar, 2012 1 commit
    • enrica@apple.com's avatar
      WebKit2: create sandbox extensions for files that are dropped in an input control. · 4fbcba29
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=81153
      <rdar://problem/11031207>
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore: 
      
      Now the pasteboard access is performed only in the UI process, it is
      necessary to create sandbox extensions for each file that is dropped into
      an input type=file element. The extensions are created at the time the files
      are dropped and consumed immediately.
      
      * page/DragActions.h: Added new drag action to be used by the WebDragClient.
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag): Added call to the drag client with the new action.
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebDragClient.mm:
      (WebDragClient::willPerformDragDestinationAction): Avoid calling the delegate with the new drag action.
      We want to avoid any unwanted side effects for the WebKit clients.
      
      Source/WebKit2: 
      
      Now the pasteboard access is performed only in the UI process, it is
      necessary to create sandbox extensions for each file that is dropped into
      an input type=file element. The extensions are created at the time the files
      are dropped and consumed immediately.
              
      * Platform/CoreIPC/HandleMessage.h:
      (CoreIPC::callMemberFunction): Added template that takes 8 arguments.
      * Shared/SandboxExtension.h:
      (HandleArray): Added new class to handle an array of sandbox extension handles.
      (WebKit::SandboxExtension::HandleArray::HandleArray):
      (WebKit::SandboxExtension::HandleArray::~HandleArray):
      (WebKit::SandboxExtension::HandleArray::resize):
      (WebKit::SandboxExtension::HandleArray::operator[]):
      (WebKit::SandboxExtension::HandleArray::size):
      (WebKit::SandboxExtension::HandleArray::encode):
      (WebKit::SandboxExtension::HandleArray::decode):
      * Shared/mac/SandboxExtensionMac.mm: Added new class implementation.
      (WebKit::SandboxExtension::HandleArray::HandleArray):
      (WebKit::SandboxExtension::HandleArray::~HandleArray):
      (WebKit::SandboxExtension::HandleArray::resize):
      (WebKit::SandboxExtension::HandleArray::operator[]):
      (WebKit::SandboxExtension::HandleArray::size):
      (WebKit::SandboxExtension::HandleArray::encode):
      (WebKit::SandboxExtension::HandleArray::decode):
      * UIProcess/API/mac/WKView.mm:
      (createSandboxExtensionsForFileUpload):
      (-[WKView performDragOperation:]): Added logic to create the sandbox extensions for each
      file/directory being dropped.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::dragEntered):
      (WebKit::WebPageProxy::dragUpdated):
      (WebKit::WebPageProxy::dragExited):
      (WebKit::WebPageProxy::performDrag):
      (WebKit::WebPageProxy::performDragControllerAction): Added the handle array parameter.
      * UIProcess/WebPageProxy.h:
      * UIProcess/qt/QtWebPageEventHandler.cpp:
      (QtWebPageEventHandler::handleDropEvent):
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::Drop):
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction): Added handling of the new DragActionUpload.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::getPathnamesForType): Implemented using message to the UI process.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      (WebKit::WebPage::performUploadDragDestinationAction): Added method that consumes the received extensions.
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4fbcba29
  29. 16 Mar, 2012 1 commit
    • beidson@apple.com's avatar
      <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412... · 75158d2e
      beidson@apple.com authored
      <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412 REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted
      
      Reviewed by Geoff Garen.
      
      Source/WebCore:
      
      WebKit API test WebViewCanPasteURL.mm added.
      
      * WebCore.exp.in:
      
      Add a strategy method specifically for getting the URL:
      * platform/PasteboardStrategy.h:
      
      Use that strategy method when creating the fragment for a URL:
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::documentFragment):
      
      Add a platform pasteboard accessor to "do the right thing" for getting a URL:
      * platform/PlatformPasteboard.h:
      * platform/mac/PlatformPasteboardMac.mm:
      (WebCore::PlatformPasteboard::url):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::setInsertionPasteboard):
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::url):
      
      Source/WebKit2:
      
      Add new message so the WebProcess can ask the UIProcesses pasteboard for the URL:
      * UIProcess/WebContext.h:
      * UIProcess/WebContext.messages.in:
      * UIProcess/mac/WebContextMac.mm:
      (WebKit::WebContext::getPasteboardURL):
      
      Use that new message to implement the pasteboard strategy:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::url):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      Tools:
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75158d2e
  30. 15 Mar, 2012 1 commit
    • beidson@apple.com's avatar
      <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079... · 9f1cddac
      beidson@apple.com authored
      <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079 REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Test: editing/pasteboard/copy-two-pasteboard-types-both-work.html
      
      Add the non-destructive "addTypes" to supplement the destructive "setTypes"
      * platform/PasteboardStrategy.h:
      (PasteboardStrategy):
      * platform/PlatformPasteboard.h:
      (PlatformPasteboard):
      * platform/mac/PlatformPasteboardMac.mm:
      (WebCore::PlatformPasteboard::addTypes):
      * WebCore.exp.in:
      
      * platform/mac/ClipboardMac.mm:
      (WebCore::ClipboardMac::setData): Call the non-destructive "addTypes" instead of
        the destructive "setTypes"
      
      Source/WebKit/mac:
      
      Add the non-destructive "addTypes" to supplement the destructive "setTypes"
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::addTypes):
      
      Source/WebKit2:
      
      Add the non-destructive "addTypes" to supplement the destructive "setTypes"
      
      * UIProcess/WebContext.h:
      * UIProcess/WebContext.messages.in:
      * UIProcess/mac/WebContextMac.mm:
      (WebKit::WebContext::addPasteboardTypes):
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::addTypes):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      LayoutTests:
      
      * editing/pasteboard/copy-two-pasteboard-types-both-work-expected.txt: Added.
      * editing/pasteboard/copy-two-pasteboard-types-both-work.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f1cddac