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. 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
  3. 28 Jan, 2013 1 commit
  4. 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
  5. 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
  6. 16 Jan, 2013 1 commit
    • 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
  7. 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
  8. 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
  9. 18 Dec, 2012 1 commit
  10. 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
  11. 14 Dec, 2012 2 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
  12. 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
  13. 16 Nov, 2012 1 commit
    • 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 17 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      Refactor DragData class to use PlatformStrategies in the Mac implementation. · 1a0e7a68
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78768
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      No new tests. No behavior change.
      
      * WebCore.exp.in: Added new exported method of the PlatformPasteboard class.
      * platform/DragData.h:
      (WebCore::DragData::pasteboardName): Added pasteboardName and removed pasteboard.
      * platform/PasteboardStrategy.h: Added color() method.
      * platform/PlatformPasteboard.h: Ditto.
      * platform/mac/ClipboardMac.mm:
      (WebCore::Clipboard::create): Changed to use pasteboardName() method.
      * platform/mac/DragDataMac.mm: All the methods below have been changed to use pasteboardName
      and the pasteboardStrategy() methods.
      (WebCore::DragData::DragData):
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::numberOfFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asColor):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PlatformPasteboardMac.mm:
      (WebCore::PlatformPasteboard::color): Added implementation of the color() method.
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebPlatformStrategies.h: Added color() method.
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::color):
      
      Source/WebKit2: 
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method.
      (WebKit::WebPlatformStrategies::color):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a0e7a68
  21. 15 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      Refactor ClipboardMac class to use PlatformStrategies. · 6d9962f6
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78554
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      No new tests. No change in behavior.
      
      * WebCore.exp.in: Added new exported methods of the PlatformPasteboard class
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::newGeneralClipboard): Use name based pasteboard references.
      * page/DragClient.h:
      (WebCore::DragClient::declareAndWriteDragImage): Ditto.
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::createDraggingClipboard): Ditto.
      * platform/PasteboardStrategy.h: Added new methods to get a unique pasteboard name
      and the pasteboard change count.
      * platform/PlatformPasteboard.h: Ditto.
      * platform/mac/ClipboardMac.h:
      (WebCore::ClipboardMac::create): Using name based pasteboard.
      (WebCore::ClipboardMac::pasteboardName): Replacing the old pasteboard() method.
      * platform/mac/ClipboardMac.mm: All the methods below have been modified to avoid
      using Objective-C types and direct access to NSPasteboard object.
      (WebCore::Clipboard::create):
      (WebCore::ClipboardMac::ClipboardMac):
      (WebCore::ClipboardMac::hasData):
      (WebCore::cocoaTypeFromHTMLClipboardType):
      (WebCore::utiTypeFromCocoaType):
      (WebCore::addHTMLClipboardTypesForCocoaType):
      (WebCore::ClipboardMac::clearData):
      (WebCore::ClipboardMac::clearAllData):
      (WebCore::absoluteURLsFromPasteboardFilenames):
      (WebCore::absoluteURLsFromPasteboard):
      (WebCore::ClipboardMac::getData):
      (WebCore::ClipboardMac::setData):
      (WebCore::ClipboardMac::types):
      (WebCore::ClipboardMac::files):
      (WebCore::ClipboardMac::setDragImage):
      (WebCore::ClipboardMac::writeRange):
      (WebCore::ClipboardMac::writePlainText):
      (WebCore::ClipboardMac::writeURL):
      (WebCore::ClipboardMac::declareAndWriteDragImage):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::writeClipboard): Using name based pasteboard reference.
      * platform/mac/PlatformPasteboardMac.mm:
      (WebCore::PlatformPasteboard::getPathnamesForType): Fixed to support NSArray and NString content.
      (WebCore::PlatformPasteboard::changeCount): Added.
      (WebCore::PlatformPasteboard::uniqueName): Added.
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebDragClient.h: Changed methods signature to use name based pasteboard.
      * WebCoreSupport/WebDragClient.mm: Ditto.
      (WebDragClient::willPerformDragSourceAction):
      (WebDragClient::startDrag):
      (WebDragClient::declareAndWriteDragImage):
      * WebCoreSupport/WebPlatformStrategies.h: Added new methods.
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::changeCount):
      (WebPlatformStrategies::uniqueName):
      
      Source/WebKit2: 
      
      * WebProcess/WebCoreSupport/WebDragClient.h: Changed method signature to reference
      the pasteboard by name.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added new methods.
      (WebKit::WebPlatformStrategies::changeCount):
      (WebKit::WebPlatformStrategies::uniqueName):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
      (WebKit::WebDragClient::declareAndWriteDragImage): Changed method signature to reference
      the pasteboard by name.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d9962f6
  22. 13 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Refactor Mac platform implementation of the Pasteboard class... · 58eb2d47
      enrica@apple.com authored
      Source/WebCore: Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
      https://bugs.webkit.org/show_bug.cgi?id=78282
      
      This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
      now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
      WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
      class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
      interface but this one more step in the direction of removing access to NSPasteboard from
      the WebProcess.
      As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
      
      Reviewed by Anders Carlsson.
      
      No new tests. No change in behavior, just code refactoring.
      
      * WebCore.exp.in: Added exported class PlatformPasteboard.
      * WebCore.xcodeproj/project.pbxproj: Added new files to the build.
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::writeSelectionToPasteboard): New method signature that doesn't use OBJ-C types.
      * platform/Pasteboard.h:
      
      * platform/PasteboardStrategy.h: Added PasteboardStrategy abstract class.
      * platform/PlatformPasteboard.h: Added. This class implements access to NSPasteboard.
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::pasteboardStrategy): Added.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::canSmartReplace):
      (WebCore::insertablePasteboardTypes): 
      (WebCore::DragData::asURL):
      * platform/mac/PasteboardMac.mm:
      (WebCore::selectionPasteboardTypes): Changed to use Vector<String> instead of NSArray.
      (WebCore::writableTypesForURL): Ditto.
      (WebCore::createWritableTypesForImage): Ditto.
      (WebCore::writableTypesForImage): Ditto.
      (WebCore::Pasteboard::Pasteboard): Removed access to NSPasteboard.
      (WebCore::Pasteboard::clear): Modified to use platformStrategies()->pasteboardStrategy().
      (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
      (WebCore::Pasteboard::writePlainText): Ditto.
      (WebCore::Pasteboard::writeSelection): Ditto.
      (WebCore::writeURLForTypes): Ditto.
      (WebCore::Pasteboard::writeURL): Ditto.
      (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
      (WebCore::Pasteboard::writeImage): Ditto.
      (WebCore::Pasteboard::writeClipboard): Ditto.
      (WebCore::Pasteboard::canSmartReplace): Ditto.
      (WebCore::Pasteboard::plainText): Ditto.
      (WebCore::documentFragmentWithRTF): Ditto.
      (WebCore::Pasteboard::documentFragment): Ditto.
      * platform/mac/PlatformPasteboardMac.mm: Added.
      (WebCore::PlatformPasteboard::PlatformPasteboard):
      (WebCore::PlatformPasteboard::getTypes):
      (WebCore::PlatformPasteboard::bufferForType):
      (WebCore::PlatformPasteboard::getPathnamesForType):
      (WebCore::PlatformPasteboard::stringForType):
      (WebCore::PlatformPasteboard::copy):
      (WebCore::PlatformPasteboard::setTypes):
      (WebCore::PlatformPasteboard::setBufferForType):
      (WebCore::PlatformPasteboard::setPathnamesForType):
      (WebCore::PlatformPasteboard::setStringForType):
      
      Source/WebKit/mac:  Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
       https://bugs.webkit.org/show_bug.cgi?id=78282
       
       This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
       now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
       WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
       class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
       interface but this one more step in the direction of removing access to NSPasteboard from
       the WebProcess.
       As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
               
       Reviewed by Anders Carlsson.
       
       * WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
       * WebCoreSupport/WebPlatformStrategies.mm: Added implementation of PasteboardStrategy interface.
       (WebPlatformStrategies::createPasteboardStrategy):
       (WebPlatformStrategies::getTypes):
       (WebPlatformStrategies::bufferForType):
       (WebPlatformStrategies::getPathnamesForType):
       (WebPlatformStrategies::stringForType):
       (WebPlatformStrategies::copy):
       (WebPlatformStrategies::setTypes):
       (WebPlatformStrategies::setBufferForType):
       (WebPlatformStrategies::setPathnamesForType):
       (WebPlatformStrategies::setStringForType):
      
      Source/WebKit/qt: Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
      https://bugs.webkit.org/show_bug.cgi?id=78282
      
      Build fix. Unreviewed.
      
      * WebCoreSupport/PlatformStrategiesQt.cpp:
      (WebPlatformStrategies::createPasteboardStrategy):
      * WebCoreSupport/PlatformStrategiesQt.h:
      (PlatformStrategiesQt):
      
      Source/WebKit2: Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
      https://bugs.webkit.org/show_bug.cgi?id=78282
      
      This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
      now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
      WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
      class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
      interface but this one more step in the direction of removing access to NSPasteboard from
      the WebProcess.
      As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
      interface.
      (WebKit::WebPlatformStrategies::createPasteboardStrategy):
      (WebKit::WebPlatformStrategies::getTypes):
      (WebKit::WebPlatformStrategies::bufferForType):
      (WebKit::WebPlatformStrategies::getPathnamesForType):
      (WebKit::WebPlatformStrategies::stringForType):
      (WebKit::WebPlatformStrategies::copy):
      (WebKit::WebPlatformStrategies::setTypes):
      (WebKit::WebPlatformStrategies::setBufferForType):
      (WebKit::WebPlatformStrategies::setPathnamesForType):
      (WebKit::WebPlatformStrategies::setStringForType):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58eb2d47
  23. 11 Feb, 2012 1 commit
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r107435. · 073885a5
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/107435
      https://bugs.webkit.org/show_bug.cgi?id=78410
      
      It broke the Qt build (Requested by Ossy on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-11
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::writeSelectionToPasteboard):
      * platform/Pasteboard.h:
      (WebCore):
      (Pasteboard):
      * platform/PasteboardStrategy.h: Removed.
      * platform/PlatformPasteboard.h: Removed.
      * platform/PlatformStrategies.h:
      (WebCore):
      (WebCore::PlatformStrategies::PlatformStrategies):
      (PlatformStrategies):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::canSmartReplace):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::asURL):
      * platform/mac/PasteboardMac.mm:
      (WebCore):
      (WebCore::selectionPasteboardTypes):
      (WebCore::writableTypesForURL):
      (WebCore::createWritableTypesForImage):
      (WebCore::writableTypesForImage):
      (WebCore::Pasteboard::Pasteboard):
      (WebCore::Pasteboard::clear):
      (WebCore::Pasteboard::writeSelectionForTypes):
      (WebCore::Pasteboard::writePlainText):
      (WebCore::Pasteboard::writeSelection):
      (WebCore::writeURLForTypes):
      (WebCore::Pasteboard::writeURL):
      (WebCore::writeFileWrapperAsRTFDAttachment):
      (WebCore::Pasteboard::writeImage):
      (WebCore::Pasteboard::writeClipboard):
      (WebCore::Pasteboard::canSmartReplace):
      (WebCore::Pasteboard::plainText):
      (WebCore::documentFragmentWithRTF):
      (WebCore::Pasteboard::documentFragment):
      * platform/mac/PlatformPasteboardMac.mm: Removed.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::addVisitedLink):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      073885a5
  24. 10 Feb, 2012 1 commit
    • enrica@apple.com's avatar
      Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies. · 71941ebb
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78282
      
      This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
      now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
      WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
      class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
      interface but this one more step in the direction of removing access to NSPasteboard from
      the WebProcess.
      As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
              
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      No new tests. No change in behavior, just code refactoring.
      
      * WebCore.exp.in: Added exported class PlatformPasteboard.
      * WebCore.xcodeproj/project.pbxproj: Added new files to the build.
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::writeSelectionToPasteboard): New method signature that doesn't use OBJ-C types.
      * platform/Pasteboard.h:
      
      * platform/PasteboardStrategy.h: Added PasteboardStrategy abstract class.
      * platform/PlatformPasteboard.h: Added. This class implements access to NSPasteboard.
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::pasteboardStrategy): Added.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::canSmartReplace):
      (WebCore::insertablePasteboardTypes): 
      (WebCore::DragData::asURL):
      * platform/mac/PasteboardMac.mm:
      (WebCore::selectionPasteboardTypes): Changed to use Vector<String> instead of NSArray.
      (WebCore::writableTypesForURL): Ditto.
      (WebCore::createWritableTypesForImage): Ditto.
      (WebCore::writableTypesForImage): Ditto.
      (WebCore::Pasteboard::Pasteboard): Removed access to NSPasteboard.
      (WebCore::Pasteboard::clear): Modified to use platformStrategies()->pasteboardStrategy().
      (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
      (WebCore::Pasteboard::writePlainText): Ditto.
      (WebCore::Pasteboard::writeSelection): Ditto.
      (WebCore::writeURLForTypes): Ditto.
      (WebCore::Pasteboard::writeURL): Ditto.
      (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
      (WebCore::Pasteboard::writeImage): Ditto.
      (WebCore::Pasteboard::writeClipboard): Ditto.
      (WebCore::Pasteboard::canSmartReplace): Ditto.
      (WebCore::Pasteboard::plainText): Ditto.
      (WebCore::documentFragmentWithRTF): Ditto.
      (WebCore::Pasteboard::documentFragment): Ditto.
      * platform/mac/PlatformPasteboardMac.mm: Added.
      (WebCore::PlatformPasteboard::PlatformPasteboard):
      (WebCore::PlatformPasteboard::getTypes):
      (WebCore::PlatformPasteboard::bufferForType):
      (WebCore::PlatformPasteboard::getPathnamesForType):
      (WebCore::PlatformPasteboard::stringForType):
      (WebCore::PlatformPasteboard::copy):
      (WebCore::PlatformPasteboard::setTypes):
      (WebCore::PlatformPasteboard::setBufferForType):
      (WebCore::PlatformPasteboard::setPathnamesForType):
      (WebCore::PlatformPasteboard::setStringForType):
      
      Source/WebKit/mac: 
      
      * WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
      * WebCoreSupport/WebPlatformStrategies.mm: Added implementation of PasteboardStrategy interface.
      (WebPlatformStrategies::createPasteboardStrategy):
      (WebPlatformStrategies::getTypes):
      (WebPlatformStrategies::bufferForType):
      (WebPlatformStrategies::getPathnamesForType):
      (WebPlatformStrategies::stringForType):
      (WebPlatformStrategies::copy):
      (WebPlatformStrategies::setTypes):
      (WebPlatformStrategies::setBufferForType):
      (WebPlatformStrategies::setPathnamesForType):
      (WebPlatformStrategies::setStringForType):
      
      Source/WebKit2: 
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
      interface.
      (WebKit::WebPlatformStrategies::createPasteboardStrategy):
      (WebKit::WebPlatformStrategies::getTypes):
      (WebKit::WebPlatformStrategies::bufferForType):
      (WebKit::WebPlatformStrategies::getPathnamesForType):
      (WebKit::WebPlatformStrategies::stringForType):
      (WebKit::WebPlatformStrategies::copy):
      (WebKit::WebPlatformStrategies::setTypes):
      (WebKit::WebPlatformStrategies::setBufferForType):
      (WebKit::WebPlatformStrategies::setPathnamesForType):
      (WebKit::WebPlatformStrategies::setStringForType):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71941ebb
  25. 23 Sep, 2011 1 commit
    • andersca@apple.com's avatar
      Add OVERRIDE to overrides of virtual member functions in client classes · b4a311d2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68702
      
      Reviewed by Darin Adler.
      
      Disable the warning in Xcode and VS2005 for using override and final when compiling as C++98,
      and remove WebEditorClient::isEditable, WebChromeClient::formDidFocus,
      WebChromeClient::formDidBlur and WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest since
      they have been removed from their respective base classes.
              
      * Configurations/Base.xcconfig:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebCoreSupport/WebContextMenuClient.h:
      * WebProcess/WebCoreSupport/WebDatabaseManager.h:
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/WebCoreSupport/WebGeolocationClient.h:
      * WebProcess/WebCoreSupport/WebInspectorClient.h:
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      * WebProcess/WebCoreSupport/WebPopupMenu.h:
      * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
      * win/WebKit2Common.vsprops:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4a311d2
  26. 21 Sep, 2011 1 commit
    • abecsi@webkit.org's avatar
      [Qt] Remove Qt specific code from css/SelectorChecker.cpp · 6e1f6ccd
      abecsi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67702
      
      Reviewed by Csaba Osztrogonác.
      
      Source/WebCore:
      
      No new tests needed.
      
      * css/SelectorChecker.cpp: Move Qt-specific code to the Qt-specific WebPlatformStrategies.
      (WebCore::SelectorChecker::determineLinkStateSlowCase):
      * platform/VisitedLinkStrategy.h:
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::isLinkVisited):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/WebPlatformStrategies.cpp: Check the Qt global history here, instead of a platform independent file.
      (WebPlatformStrategies::isLinkVisited):
      * WebCoreSupport/WebPlatformStrategies.h:
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
      (WebPlatformStrategies::isLinkVisited):
      * WebCoreSupport/WebPlatformStrategies.h: Ditto.
      
      Source/WebKit/wince:
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::addVisitedLink):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
      (WebKit::WebPlatformStrategies::isLinkVisited):
      (WebKit::WebPlatformStrategies::addVisitedLink):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e1f6ccd
  27. 30 Mar, 2011 1 commit
    • weinig@apple.com's avatar
      Add default localization strategy that can be shared by WebKit1 and WebKit2 · 8f811332
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=57406
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Currently, only WebKit2 uses this default strategy, but WebKit1 should be able
      to adopt it soon.
      
      * platform/DefaultLocalizationStrategy.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp.
      (WebCore::DefaultLocalizationStrategy::DefaultLocalizationStrategy):
      * platform/DefaultLocalizationStrategy.h: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h.
      Copy the implementation of the Localization strategy from WebKit2 into a shared default strategy.
      
      * platform/LocalizedStrings.cpp:
      (WebCore::localizedString):
      Add default implementation of localization bottleneck function.
      
      * platform/LocalizedStrings.h:
      Add localization macros here, instead of defining them in the above layer.
      
      * platform/PlatformStrategies.cpp:
      (WebCore::PlatformStrategies::createLocalizationStrategy):
      * platform/PlatformStrategies.h:
      Add default implementation of strategy creation function which creates the default strategy.
      
      * platform/win/LocalizedStringsWin.cpp: Copied from Source/WebCore/platform/mac/LocalizedStringsMac.mm.
      (WebCore::localizedString):
      Add stub for windows, this will be update to pull from the bundle in a follow up patch.
      
      * Android.mk:
      * CMakeLists.txt:
      * GNUmakefile.am:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      Add new files.
      
      Source/WebKit2: 
      
      * Shared/WebLocalizableStrings.h: Removed.
      Removed in favor of using WebCore/LocalizedStrings.h directly.
      
      * PluginProcess/mac/PluginProcessMac.mm:
      * UIProcess/API/mac/WKView.mm:
      * UIProcess/mac/WebInspectorProxyMac.mm:
      * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
      * WebProcess/mac/WebProcessMac.mm:
      Use WebCore/LocalizedStrings.h directly.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      Remove localization strategy override in favor of using new default implementation.
      
      * GNUmakefile.am:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Remove WebLocalizableStrings.h
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f811332
  28. 29 Mar, 2011 1 commit
    • timothy@apple.com's avatar
      Update the order of the context menu to better match AppKit on Mac. · fac725ca
      timothy@apple.com authored
      <rdar://problem/9054893>
      
      Reviewed by John Sullivan.
      
      Source/WebCore:
      
      * English.lproj/Localizable.strings: Updated.
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate): Update the order of items on Mac.
      * platform/LocalizationStrategy.h:
      * platform/LocalizedStrings.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
      * platform/LocalizedStrings.h:
      * platform/android/LocalizedStringsAndroid.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      * platform/brew/LocalizedStringsBrew.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      * platform/efl/LocalizedStringsEfl.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      * platform/gtk/LocalizedStringsGtk.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      * platform/haiku/LocalizedStringsHaiku.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      * platform/wx/LocalizedStringsWx.cpp:
      (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
      
      Source/WebKit/mac:
      
      * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
      (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): Update the order of items.
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fac725ca
  29. 15 Mar, 2011 1 commit
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · ae3d226b
      ap@apple.com authored
              REGRESSION (WebKit2): keygen element doesn't work
              https://bugs.webkit.org/show_bug.cgi?id=56402
              <rdar://problem/9006545>
      
              Covered by existing regresison tests.
      
              * English.lproj/Localizable.strings:
      
              * WebCore.exp.in: Removed WebCoreKeyGenerator, which no longer exists. Added
              _wkSignedPublicKeyAndChallengeString, so that this WKSI function could be used in WebCore.
      
              * platform/mac/SSLKeyGeneratorMac.mm: Removed.
              * platform/mac/WebCoreKeyGenerator.h: Removed.
              * platform/mac/WebCoreKeyGenerator.m: Removed.
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
              * WebCore.xcodeproj/project.pbxproj:
              Renamed SSLKeyGeneratorMac.mm to .cpp, as it doesn't use any Objective C any more.
              Removed WebCoreKeyGenerator, as we no longer need an interface to WebKit.
      
              * platform/LocalizationStrategy.h:
              * platform/LocalizedStrings.cpp:
              (WebCore::keygenMenuItem512):
              (WebCore::keygenMenuItem1024):
              (WebCore::keygenMenuItem2048):
              (WebCore::keygenKeychainItemName):
              * platform/LocalizedStrings.h:
              Added strings used by keygen element, now that the code using them is in WebCore.
      
              * platform/mac/SSLKeyGeneratorMac.cpp: Copied from Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm.
              (WebCore::getSupportedKeySizes):
              (WebCore::signedPublicKeyAndChallengeString):
              Moved the code from WebKit. There is never any need to provide implementation at runtime,
              like old code was doing.
      
              * platform/win/SSLKeyGeneratorWin.cpp: (WebCore::WebCore::getSupportedKeySizes):
              Added a FIXME about localization. Note that Safari for Windows doesn't support keygen.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae3d226b
  30. 02 Mar, 2011 1 commit
    • bweinstein@apple.com's avatar
      Source/WebCore: Part of WebKit2: Need a way to send notifications to client when cookies change · a95f4c4d
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=55427
      <rdar://problem/9056027>
              
      Reviewed by Adam Roben.
      
      Add functions on CookieStorage that allow listening for changes in cookies. When
      the cookies are changed, they call through to CookiesStrategy::notifyCookiesChanged.
      
      No change in behavior requiring tests.
      
      * platform/CookiesStrategy.h: Added.
      (WebCore::CookiesStrategy::~CookiesStrategy):
      
      * platform/PlatformStrategies.h:
      (WebCore::PlatformStrategies::cookiesStrategy):
      (WebCore::PlatformStrategies::PlatformStrategies):
      
      * platform/network/CookieStorage.h: Add new function declarations.
      
      * platform/network/cf/CookieStorageCFNet.cpp:
      (WebCore::notifyCookiesChangedOnMainThread): Call through to CookiesStrategy::notifyCookiesChanged.
      (WebCore::notifyCookiesChanged): Call notifyCookiesChangedOnMainThread on the main thread.
      (WebCore::beginObservingCookieChanges): Set up cookie observers on the loader run loop.
      (WebCore::finishObservingCookieChanges): Remove our cookie observers from the loader run loop.
      
      * platform/network/mac/CookieStorageMac.mm:
      (-[CookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Call through to CookiesStrategy::notifyCookiesChanged.
      (-[CookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Call notifyCookiesChangedOnMainThread on 
          the main thread.
      (-[CookieStorageObjCAdapter registerForCookieChangeNotifications]): Set up the observer for cookie change notifications.
      (-[CookieStorageObjCAdapter unregisterForCookieChangeNotifications]): Remove the observer for cookie change notifications.
      (WebCore::beginObservingCookieChanges): Create our CookieStorageObjCAdapter, and call registerForCookieChangeNotifications.
      (WebCore::finishObservingCookieChanges): Call unregisterForCookieChangeNotifications.
              
      Add new file.
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj: Set role on files we need to include in WebKit to private.
      
      Source/WebKit/mac: Part of WebKit2: Need a way to send notifications to client when cookies change
      https://bugs.webkit.org/show_bug.cgi?id=55427
      <rdar://problem/9056027>
              
      Reviewed by Adam Roben.
      
      Add stubs for CookiesStrategy on Mac WebKit1.
      
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::createCookiesStrategy):
      (WebPlatformStrategies::notifyCookiesChanged):
      
      Source/WebKit/qt: Part of WebKit2: Need a way to send notifications to client when cookies change
      https://bugs.webkit.org/show_bug.cgi?id=55427
      <rdar://problem/9056027>
              
      Reviewed by Adam Roben.
      
      Add stubs for CookiesStrategy on Qt WebKit1.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createCookiesStrategy):
      (WebPlatformStrategies::notifyCookiesChanged):
      * WebCoreSupport/WebPlatformStrategies.h:
      
      Source/WebKit/win: Part of WebKit2: Need a way to send notifications to client when cookies change
      https://bugs.webkit.org/show_bug.cgi?id=55427
      <rdar://problem/9056027>
              
      Reviewed by Adam Roben.
      
      Add stubs for CookiesStrategy on Windows WebKit1.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::createCookiesStrategy):
      (WebPlatformStrategies::notifyCookiesChanged):
      * WebCoreSupport/WebPlatformStrategies.h:
      
      Source/WebKit2: Part of WebKit2: Need a way to send notifications to client when cookies change
      https://bugs.webkit.org/show_bug.cgi?id=55427
      <rdar://problem/9056027>
      
      Reviewed by Adam Roben.
      
      * WebProcess/Cookies/WebCookieManager.cpp:
      (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
          message to the UI process.
      
      * WebProcess/Cookies/WebCookieManager.h:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createCookiesStrategy):
      (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a95f4c4d
  31. 17 Feb, 2011 1 commit
    • luiz@webkit.org's avatar
      HTML5 <details> and <summary>: localized text · 74fbcc4b
      luiz@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=54260
      
      Reviewed by Adam Roben.
      
      Source/WebCore:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class and to
      platform/LocalizedStrings. It is used to provide the default label to be used by a
      <details> tag that has no <summary> child.
      
      * platform/LocalizationStrategy.h:
      * platform/LocalizedStrings.cpp:
      (WebCore::fileButtonNoFileSelectedLabel):
      (WebCore::defaultDetailsSummaryText):
      * platform/LocalizedStrings.h:
      * platform/android/LocalizedStringsAndroid.cpp:
      (WebCore::defaultDetailsSummaryText):
      * platform/brew/LocalizedStringsBrew.cpp:
      (WebCore::defaultDetailsSummaryText):
      * platform/efl/LocalizedStringsEfl.cpp:
      (WebCore::defaultDetailsSummaryText):
      * platform/gtk/LocalizedStringsGtk.cpp:
      (WebCore::defaultDetailsSummaryText):
      * platform/haiku/LocalizedStringsHaiku.cpp:
      (WebCore::defaultDetailsSummaryText):
      * platform/wx/LocalizedStringsWx.cpp:
      (WebCore::defaultDetailsSummaryText):
      
      Source/WebKit:
      
      Default details summary text must be localizable.
      
      * English.lproj/Localizable.strings:
      
      Source/WebKit/chromium:
      
      The method defaultDetailsSummaryText was added to LocalizedStrings. It is used to provide
      the default label to be used by a <details> tag that has no <summary> child.
      
      * src/LocalizedStrings.cpp:
      (WebCore::defaultDetailsSummaryText):
      
      Source/WebKit/mac:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
      provide the default label to be used by a <details> tag that has no <summary> child.
      
      * WebCoreSupport/WebPlatformStrategies.h:
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::defaultDetailsSummaryText):
      
      Source/WebKit/qt:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
      provide the default label to be used by a <details> tag that has no <summary> child.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::defaultDetailsSummaryText):
      * WebCoreSupport/WebPlatformStrategies.h:
      
      Source/WebKit/win:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
      provide the default label to be used by a <details> tag that has no <summary> child.
      
      * WebCoreSupport/WebPlatformStrategies.cpp:
      (WebPlatformStrategies::defaultDetailsSummaryText):
      * WebCoreSupport/WebPlatformStrategies.h:
      
      Source/WebKit/wince:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
      provide the default label to be used by a <details> tag that has no <summary> child.
      
      * WebCoreSupport/PlatformStrategiesWinCE.cpp:
      (PlatformStrategiesWinCE::defaultDetailsSummaryText):
      * WebCoreSupport/PlatformStrategiesWinCE.h:
      
      Source/WebKit2:
      
      The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
      provide the default label to be used by a <details> tag that has no <summary> child.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::defaultDetailsSummaryText):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74fbcc4b
  32. 07 Feb, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-02-07 Qi Zhang <qi.2.zhang@nokia.com> · d10a96e7
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
              https://bugs.webkit.org/show_bug.cgi?id=52974
      
              Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              (WebCore::ContextMenuController::populate):
              (WebCore::ContextMenuController::checkOrEnableIfNeeded):
              * platform/ContextMenuItem.h:
              * platform/LocalizationStrategy.h:
              * platform/LocalizedStrings.cpp:
              (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
              * platform/LocalizedStrings.h:
      2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
      
              Reviewed by Andreas Kling.
      
              [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
              https://bugs.webkit.org/show_bug.cgi?id=52974
      
              Add QWebPage::CopyImageUrlToClipboard into QWebPage::WebAction.
      
              * Api/qwebpage.cpp:
              (webActionForContextMenuAction):
              (QWebPage::triggerAction):
              (QWebPage::action):
              * Api/qwebpage.h:
              * WebCoreSupport/WebPlatformStrategies.cpp:
              (WebPlatformStrategies::contextMenuItemTagCopyImageUrlToClipboard):
              * WebCoreSupport/WebPlatformStrategies.h:
      2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
      
              Reviewed by Andreas Kling.
      
              [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
              https://bugs.webkit.org/show_bug.cgi?id=52974
      
              Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::contextMenuItemTagCopyImageUrlToClipboard):
              * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d10a96e7
  33. 15 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move WebKit2 into Source · be159d97
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=52438
      
      Rubber-stamped by Eric Seidel.
      
      .: 
      
      Update reference to WebKit2.
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * Source/cmake/WebKitPackaging.cmake:
      * WebKit.pro:
      * configure.ac:
      
      Source/WebCore: 
      
      * WebCore.pro:
      
      Source/WebKit2: 
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * WebKit2.pro:
      * WebProcess.pro:
      * win/WebKit2.vcproj:
      * win/WebKit2WebProcess.vcproj:
      
      Tools: 
      
      * MiniBrowser/qt/MiniBrowser.pro:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/test-webkitpy:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/style/checker.py:
      * WebKitTestRunner/DerivedSources.pro:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      
      WebKit/win: 
      
      Update reference to WebKit2.
      
      * WebKit.vcproj/WebKit.sln:
      
      Websites/bugs.webkit.org: 
      
      Remove WebKit2 from the list of top-level source directories.
      
      * PrettyPatch/PrettyPatch.rb:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be159d97
  34. 03 Jan, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-01-03 Yi Shen <yi.4.shen@nokia.com> · 84ffa4ae
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              [Qt] Add SelectAll option to the context menu for the editor
              https://bugs.webkit.org/show_bug.cgi?id=50049
      
              Set shortcut for the SelectAll action.
      
              * QtTestBrowser/mainwindow.cpp:
              (MainWindow::buildUI):
      2011-01-03  Yi Shen  <yi.4.shen@nokia.com>
      
              Reviewed by Adam Barth.
      
              [Qt] Add SelectAll option to the context menu for the editor
              https://bugs.webkit.org/show_bug.cgi?id=50049
      
              Enable SelectAll for the Qt context menu.
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::populate):
              * platform/ContextMenuItem.h:
              * platform/LocalizationStrategy.h:
              * platform/LocalizedStrings.cpp:
              (WebCore::contextMenuItemTagSelectAll):
              * platform/LocalizedStrings.h:
      2011-01-03  Yi Shen  <yi.4.shen@nokia.com>
      
              Reviewed by Adam Barth.
      
              [Qt] Add SelectAll option to the context menu for the editor
              https://bugs.webkit.org/show_bug.cgi?id=50049
      
              Enable SelectAll for the Qt context menu.
      
              * Api/qwebpage.cpp:
              (webActionForContextMenuAction):
              (QWebPage::action):
              * WebCoreSupport/WebPlatformStrategies.cpp:
              (WebPlatformStrategies::contextMenuItemTagSelectAll):
              * WebCoreSupport/WebPlatformStrategies.h:
      2011-01-03  Yi Shen  <yi.4.shen@nokia.com>
      
              Reviewed by Adam Barth.
      
              [Qt] Add SelectAll option to the context menu for the editor
              https://bugs.webkit.org/show_bug.cgi?id=50049
      
              Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
              * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84ffa4ae
  35. 22 Sep, 2010 1 commit
    • andreas.kling@nokia.com's avatar
      2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu> · 453b53c6
      andreas.kling@nokia.com authored
              Reviewed by Kenneth Rohde Christiansen.
      
              PluginStrategy should satisfy the needs of Qt
              https://bugs.webkit.org/show_bug.cgi?id=45857
              No new functionality so no new tests.
      
              * WebCoreSupport/WebPlatformStrategies.cpp:
              (WebPlatformStrategies::getPluginInfo):
              * WebCoreSupport/WebPlatformStrategies.h:
      2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              PluginStrategy should satisfy the needs of Qt
              https://bugs.webkit.org/show_bug.cgi?id=45857
              No new functionality so no new tests.
      
              * WebCoreSupport/WebPlatformStrategies.h:
              * WebCoreSupport/WebPlatformStrategies.mm:
              (WebPlatformStrategies::getPluginInfo):
      2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              PluginStrategy should satisfy the needs of Qt
              https://bugs.webkit.org/show_bug.cgi?id=45857
              No new functionality so no new tests.
      
              * plugins/PluginData.cpp:
              (WebCore::PluginData::initPlugins):
              * plugins/PluginStrategy.h: Added a |const Page*| argument to getPluginInfo.
      2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              PluginStrategy should satisfy the needs of Qt
              https://bugs.webkit.org/show_bug.cgi?id=45857
              No new functionality so no new tests.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::getPluginInfo):
              * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      453b53c6
  36. 21 Sep, 2010 1 commit
    • philn@webkit.org's avatar
      2010-09-20 Philippe Normand <pnormand@igalia.com> · fd50428d
      philn@webkit.org authored
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New items in the media Element context menu:
              - play/pause
              - mute/unmute
              - controls display control
              - switch to fullscreen (for video only)
              - loop playback control
              - copy media url to clipboard
              - open in new window
      
              Test: media/context-menu-actions.html
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              * platform/ContextMenu.cpp:
              (WebCore::ContextMenu::populate):
              (WebCore::ContextMenu::checkOrEnableIfNeeded):
              * platform/ContextMenuItem.h:
              * platform/LocalizationStrategy.h:
              * platform/LocalizedStrings.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/LocalizedStrings.h:
              * platform/android/LocalizedStringsAndroid.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/brew/LocalizedStringsBrew.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/efl/LocalizedStringsEfl.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/gtk/ContextMenuItemGtk.cpp:
              (WebCore::gtkStockIDFromContextMenuAction):
              * platform/gtk/LocalizedStringsGtk.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/haiku/LocalizedStringsHaiku.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * platform/wx/LocalizedStringsWx.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::absoluteMediaURL):
              (WebCore::HitTestResult::mediaSupportsFullscreen):
              (WebCore::HitTestResult::mediaElement):
              (WebCore::HitTestResult::toggleMediaControlsDisplay):
              (WebCore::HitTestResult::toggleMediaLoopPlayback):
              (WebCore::HitTestResult::enterFullscreenForVideo):
              (WebCore::HitTestResult::mediaControlsEnabled):
              (WebCore::HitTestResult::mediaLoopEnabled):
              (WebCore::HitTestResult::mediaPlaying):
              (WebCore::HitTestResult::toggleMediaPlayState):
              (WebCore::HitTestResult::mediaHasAudio):
              (WebCore::HitTestResult::mediaMuted):
              (WebCore::HitTestResult::toggleMediaMuteState):
              * rendering/HitTestResult.h:
      
      LayoutTests:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New test checking the actions that can be triggered by activating
              the contex-menu of the media element. Skipped on mac, qt and win
              because of lack of DRT support.
      
              * media/context-menu-actions-expected.txt: Added.
              * media/context-menu-actions.html: Added.
              * platform/mac/Skipped:
              * platform/qt/Skipped:
              * platform/win/Skipped:
      
      WebKit:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              Updated localizable strings.
      
              * English.lproj/Localizable.strings:
      
      WebKit/chromium:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New localized strings for the media element context-menu.
      
              * src/LocalizedStrings.cpp:
              (WebCore::contextMenuItemTagOpenVideoInNewWindow):
              (WebCore::contextMenuItemTagOpenAudioInNewWindow):
              (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebCore::contextMenuItemTagToggleMediaControls):
              (WebCore::contextMenuItemTagToggleMediaLoop):
              (WebCore::contextMenuItemTagEnterVideoFullscreen):
              (WebCore::contextMenuItemTagMediaPlay):
              (WebCore::contextMenuItemTagMediaPause):
              (WebCore::contextMenuItemTagMediaMute):
      
      WebKit/mac:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New localized strings for the media element context-menu.
      
              * WebCoreSupport/WebPlatformStrategies.h:
              * WebCoreSupport/WebPlatformStrategies.mm:
              (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
              (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
              (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
              (WebPlatformStrategies::contextMenuItemTagMediaPlay):
              (WebPlatformStrategies::contextMenuItemTagMediaPause):
              (WebPlatformStrategies::contextMenuItemTagMediaMute):
      
      Webkit/qt:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              * WebCoreSupport/WebPlatformStrategies.cpp:
              * WebCoreSupport/WebPlatformStrategies.h:
              (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagToggleMediaControls)
              (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop)
              (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen)
              (WebPlatformStrategies::contextMenuItemTagMediaPlay)
              (WebPlatformStrategies::contextMenuItemTagMediaPause)
              (WebPlatformStrategies::contextMenuItemTagMediaMute)
      
      WebKit/win:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New localized strings for the media element context-menu.
      
              * WebCoreSupport/WebPlatformStrategies.cpp:
              (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
              (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
              (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
              (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
              (WebPlatformStrategies::contextMenuItemTagMediaPlay):
              (WebPlatformStrategies::contextMenuItemTagMediaPause):
              (WebPlatformStrategies::contextMenuItemTagMediaMute):
              * WebCoreSupport/WebPlatformStrategies.h:
      
      WebKit2:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              New localized strings for the media element context-menu.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
              (WebKit::WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
              (WebKit::WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
              (WebKit::WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
              (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
              (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
              (WebKit::WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
              (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPlay):
              (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPause):
              (WebKit::WebPlatformStrategies::contextMenuItemTagMediaMute):
              (WebKit::WebPlatformStrategies::contextMenuItemTagMediaUnMute):
              * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      WebKitTools:
      
              Reviewed by Eric Carlson.
      
              [GTK] enhanced context menu for media elements
              https://bugs.webkit.org/show_bug.cgi?id=45021
      
              EventSender::contextClick() now returns an array of js
              objects. Each object has a title property and a click() method.
      
              * DumpRenderTree/gtk/EventSender.cpp:
              (getMenuItemTitleCallback):
              (setMenuItemTitleCallback):
              (menuItemClickCallback):
              (getMenuItemClass):
              (contextClickCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd50428d
  37. 17 Sep, 2010 1 commit
    • weinig@apple.com's avatar
      Replace all uses of WTF::String and WTF::AtomicString with · c3c27e89
      weinig@apple.com authored
      String and AtomicString.
      
      Rubber-stamped by Anders Carlsson.
      
      * Platform/Module.h:
      * Shared/CommandLine.h:
      (WebKit::CommandLine::operator[]):
      * Shared/WebCoreArgumentCoders.h:
      * Shared/WebEvent.h:
      (WebKit::WebKeyboardEvent::WebKeyboardEvent):
      (WebKit::WebKeyboardEvent::text):
      (WebKit::WebKeyboardEvent::unmodifiedText):
      (WebKit::WebKeyboardEvent::keyIdentifier):
      (WebKit::WebKeyboardEvent::decode):
      * Shared/WebNavigationDataStore.h:
      * Shared/WebPreferencesStore.h:
      * Shared/WebString.h:
      (WebKit::WebString::create):
      (WebKit::WebString::string):
      (WebKit::WebString::WebString):
      * Shared/WebURL.h:
      (WebKit::WebURL::create):
      (WebKit::WebURL::string):
      (WebKit::WebURL::WebURL):
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toRef):
      (WebKit::toURLRef):
      (WebKit::toCopiedRef):
      (WebKit::toCopiedURLRef):
      (WebKit::toWTFString):
      * UIProcess/API/C/WKContext.cpp:
      (WKContextCreate):
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::nsStringFromWebCoreString):
      * UIProcess/PageClient.h:
      * UIProcess/Plugins/PluginInfoStore.cpp:
      (WebKit::PluginInfoStore::setAdditionalPluginsDirectories):
      * UIProcess/Plugins/PluginInfoStore.h:
      * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
      (WebKit::PluginInfoStore::getPluginInfo):
      (WebKit::PluginInfoStore::getMIMETypeForExtension):
      * UIProcess/WebBackForwardListItem.h:
      (WebKit::WebBackForwardListItem::create):
      (WebKit::WebBackForwardListItem::setOriginalURL):
      (WebKit::WebBackForwardListItem::originalURL):
      (WebKit::WebBackForwardListItem::setURL):
      (WebKit::WebBackForwardListItem::url):
      (WebKit::WebBackForwardListItem::setTitle):
      (WebKit::WebBackForwardListItem::title):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::setAdditionalPluginsDirectory):
      * UIProcess/WebContext.h:
      (WebKit::WebContext::injectedBundlePath):
      * UIProcess/WebContextInjectedBundleClient.h:
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::didReceiveTitle):
      * UIProcess/WebFrameProxy.h:
      (WebKit::WebFrameProxy::url):
      (WebKit::WebFrameProxy::provisionalURL):
      * UIProcess/WebHistoryClient.h:
      * UIProcess/WebLoaderClient.cpp:
      (WebKit::WebLoaderClient::didReceiveTitleForFrame):
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebNavigationData.h:
      (WebKit::WebNavigationData::title):
      (WebKit::WebNavigationData::url):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::pageTitle):
      (WebKit::WebPageProxy::toolTip):
      (WebKit::WebPageProxy::urlAtProcessExit):
      * UIProcess/WebPolicyClient.h:
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::getPluginHostConnection):
      * UIProcess/WebProcessProxy.h:
      * UIProcess/WebUIClient.h:
      * WebProcess/InjectedBundle/InjectedBundle.h:
      (WebKit::InjectedBundle::create):
      (WebKit::InjectedBundle::setSandboxToken):
      * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
      (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
      * WebProcess/Plugins/NPRuntimeObjectMap.h:
      * WebProcess/Plugins/Netscape/NetscapePlugin.h:
      * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
      * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
      (WebKit::NetscapePluginStream::start):
      * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
      * WebProcess/Plugins/Plugin.h:
      * WebProcess/Plugins/PluginController.h:
      * WebProcess/Plugins/PluginView.h:
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebCoreSupport/WebContextMenuClient.h:
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::showCorrectionPanel):
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/WebCoreSupport/WebInspectorClient.h:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
      (WebKit::WebSearchPopupMenu::saveRecentSearches):
      (WebKit::WebSearchPopupMenu::loadRecentSearches):
      * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
      * WebProcess/WebPage/WebFrame.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::runJavaScriptInMainFrame):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
      * WebProcess/WebProcess.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3c27e89