1. 22 Jan, 2014 20 commits
    • dfarler@apple.com's avatar
      ASAN builds are broken - missing flags · bfa3b26c
      dfarler@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127231
      
      Reviewed by Andy Estes.
      
      Add missing $(ASAN_OTHER_LDFLAGS).
      * Configurations/PluginProcessShim.xcconfig:
      * Configurations/SecItemShim.xcconfig:
      * Configurations/WebKit2.xcconfig:
      * Configurations/WebProcessShim.xcconfig:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bfa3b26c
    • beidson@apple.com's avatar
      Source/WebCore: The IDB backing store get() method shouldn't call IDB callbacks directly · 4c4044de
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127453
      
      Reviewed by Beth Dakin.
      
      * Modules/indexeddb/IDBServerConnection.h:
      (WebCore::IDBGetResult::IDBGetResult): Add a new structure to hold all of the
        possible results of a get() call.
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::get): Don't call IDBCallbacks directly.
        Instead, return the GetResult to the GetOperation which will make IDBCallbacks.
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::GetOperation::perform): Get all of the IDBGetResults in the completion callback
        make the appropriate IDBCallback.
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      
      Source/WebKit2: The IDB backing store get() method shouldn't call IDB callbacks directly
      https://bugs.webkit.org/show_bug.cgi?id=127453
      
      Reviewed by Beth Dakin.
      
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
      (WebKit::WebIDBServerConnection::get):
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c4044de
    • commit-queue@webkit.org's avatar
      Enable Session API. · 2b394b0b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127255
      
      Patch by Martin Hock <mhock@apple.com> on 2014-01-22
      Reviewed by Alexey Proskuryakov.
      
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      (WebKit::storageSession):
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::start):
      * NetworkProcess/NetworkResourceLoader.h:
      * NetworkProcess/RemoteNetworkingContext.h:
      * NetworkProcess/mac/RemoteNetworkingContext.mm:
      (WebKit::RemoteNetworkingContext::storageSession):
      (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
      * Shared/Network/NetworkResourceLoadParameters.cpp:
      (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
      (WebKit::NetworkResourceLoadParameters::encode):
      (WebKit::NetworkResourceLoadParameters::decode):
      * Shared/Network/NetworkResourceLoadParameters.h:
      * Shared/SessionTracker.cpp:
      (WebKit::staticSessionMap):
      (WebKit::SessionTracker::sessionMap):
      (WebKit::SessionTracker::session):
      (WebKit::SessionTracker::setSession):
      (WebKit::SessionTracker::destroySession):
      * Shared/SessionTracker.h:
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSetSession):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WKSessionRef.cpp:
      (WKSessionCreate):
      * UIProcess/API/C/WKSessionRef.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::setSession):
      * UIProcess/WebPageProxy.h:
      * WebProcess/Network/WebResourceLoadScheduler.cpp:
      (WebKit::WebResourceLoadScheduler::scheduleLoad):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::loadResourceSynchronously):
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
      (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
      (WebKit::WebFrameNetworkingContext::storageSession):
      * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
      (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::startDownload):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::sessionID):
      (WebKit::WebPage::updatePreferences):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::setSessionID):
      * WebProcess/WebPage/WebPage.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b394b0b
    • beidson@apple.com's avatar
      IDB: "Put" support · 0f1c94b6
      beidson@apple.com authored
      <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Add persistent encode/decode for storage to the database:
      * Modules/indexeddb/IDBKey.cpp:
      (WebCore::IDBKey::encode):
      (WebCore::IDBKey::decode):
      * Modules/indexeddb/IDBKey.h:
      
      Add a data class to represent IDBKey suitable for crossing IPC:
      * Modules/indexeddb/IDBKeyData.cpp: Added.
      (WebCore::IDBKeyData::IDBKeyData):
      (WebCore::IDBKeyData::maybeCreateIDBKey):
      (WebCore::IDBKeyData::isolatedCopy):
      * Modules/indexeddb/IDBKeyData.h: Added.
      (WebCore::IDBKeyData::IDBKeyData):
      
      * platform/CrossThreadCopier.cpp:
      (WebCore::IDBKeyData>::copy):
      * platform/CrossThreadCopier.h:
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      Ship putRecord requests over to the DatabaseProcess, and listen for completion from the DatabaseProcess:
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
      (WebKit::WebIDBServerConnection::put):
      (WebKit::WebIDBServerConnection::didPutRecord):
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
      
      Pass off the putRecord request to the Unique IDBDatabase:
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
      (WebKit::DatabaseProcessIDBConnection::putRecord):
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
      
      Pass off the putRecord request to the backing store:
      * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
      (WebKit::UniqueIDBDatabase::putRecord):
      (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
      (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore):
      * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
      
      Add backing store methods related to putRecord, though only one is critical right now:
      * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
      * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
      (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
      (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKey):
      (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
      (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
      (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGenerator):
      * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
      
      Add the IDBKeyData type to IPC:
      * Scripts/webkit2/messages.py:
      (struct_or_class):
      
      * Shared/WebCoreArgumentCoders.cpp:
      (IPC::ArgumentCoder<IDBKeyData>::encode):
      (IPC::ArgumentCoder<IDBKeyData>::decode):
      * Shared/WebCoreArgumentCoders.h:
      
      * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
      (WebKit::serializeIDBKey):
      * DatabaseProcess/IndexedDB/IDBSerialization.h:
      
      Implement more cross-thread copying:
      * Shared/WebCrossThreadCopier.cpp:
      (WebCore::Vector<uint8_t>>::copy):
      (WebCore::Vector<Vector<IDBKeyData>>>::copy):
      (WebCore::ASCIILiteral>::copy):
      * Shared/WebCrossThreadCopier.h:
      
      Implement more numbers of generic AsyncTask templates:
      * Shared/AsyncTask.h:
      (WebKit::createAsyncTask):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f1c94b6
    • andersca@apple.com's avatar
      WKProcessClass should create a WebContext · 26c7ef46
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127449
      <rdar://problem/15885582>
      
      Reviewed by Dan Bernstein.
      
      * Shared/Cocoa/APIObject.mm:
      (API::Object::newObject):
      * UIProcess/API/Cocoa/WKBrowsingContextController.h:
      * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
      * UIProcess/API/Cocoa/WKProcessClass.mm:
      (-[WKProcessClass initWithConfiguration:]):
      (-[WKProcessClass dealloc]):
      (-[WKProcessClass API::]):
      * UIProcess/API/Cocoa/WKProcessClassInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroupInternal.h.
      (WebKit::wrapper):
      * UIProcess/API/Cocoa/WKProcessGroup.mm:
      (-[WKProcessGroup initWithInjectedBundleURL:]):
      * UIProcess/API/ios/WKContentView.mm:
      (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26c7ef46
    • timothy_horton@apple.com's avatar
      Crashes in DrawingAreaProxy::setExposedRect (null DrawingAreaProxy) · 7e1519a7
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127445
      
      Reviewed by Anders Carlsson.
      
      * UIProcess/API/ios/WKContentView.mm:
      (-[WKContentView _updateViewExposedRect]):
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _updateViewExposedRect]):
      Null-check.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e1519a7
    • andersca@apple.com's avatar
      Add WKWebView class · 747fe3bf
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127444
      <rdar://problem/15884418>
      
      Reviewed by Dan Bernstein.
      
      * UIProcess/API/Cocoa/WKWebView.h: Added.
      * UIProcess/API/Cocoa/WKWebView.mm: Added.
      (-[WKWebView initWithFrame:configuration:]):
      (-[WKWebView configuration]):
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      747fe3bf
    • andersca@apple.com's avatar
      Fix 32-bit build. · 11c799d2
      andersca@apple.com authored
      * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11c799d2
    • timothy_horton@apple.com's avatar
      [wk2] Scroll pinning state is wrong until the first scroll event · b8eee002
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127437
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
      (WebKit::WebPage::didCommitLoad):
      * WebProcess/WebPage/WebPage.h:
      Rename WebPage::didChangeScrollOffsetForMainFrame to
      updateMainFrameScrollOffsetPinning, which better describes what it
      actually does. Call it when a load is committed, so that we have valid
      pinning state before the first scroll event comes in.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8eee002
    • andersca@apple.com's avatar
      Add WKWebViewConfiguration class · 332743e3
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127436
      <rdar://problem/15882923>
      
      Reviewed by Tim Horton.
      
      * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Added.
      * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Added.
      (-[WKWebViewConfiguration copyWithZone:]):
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      332743e3
    • alice.liu@apple.com's avatar
      [WK2] add cocoa API for private browsing setting · a3ea4823
      alice.liu@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127391
      
      Reviewed by Sam Weinig.
      
      * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
      * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
      (-[WKBrowsingContextGroup privateBrowsingEnabled]):
      (-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
      Adding some API for the private Browsing setting. Reaches through
      to the WKPageGroup's preferences.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3ea4823
    • andersca@apple.com's avatar
      Add WKProcessClass class · cd066fc7
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127433
      <rdar://problem/15882582>
      
      Reviewed by Dan Bernstein.
      
      Add a stubbed out WKProcessClass class.
      
      * Shared/API/Cocoa/WKFoundation.h:
      * UIProcess/API/Cocoa/WKProcessClass.h: Added.
      * UIProcess/API/Cocoa/WKProcessClass.mm: Added.
      (-[WKProcessClass initWithConfiguration:]):
      (-[WKProcessClass configuration]):
      * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd066fc7
    • thiago.lacerda@openbossa.org's avatar
      [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled · 8e6984a4
      thiago.lacerda@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127119
      
      Reviewed by Mario Sanchez Prada.
      
      Source/WebCore:
      
      At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
      ACCESSIBILITY is not enabled, fixing that.
      Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.
      
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::AXObjectCache):
      * accessibility/AccessibilityObject.h:
      
      Source/WebKit/gtk:
      
      Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_class_init):
      
      Source/WebKit2:
      
      Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/gtk/WebPageGtk.cpp:
      (WebKit::WebPage::platformInitialize):
      
      Tools:
      
      Guarding ACCESSIBILITY code in DumpRenderTree and WebKitTestRunner with HAVE(ACCESSIBILITY).
      
      * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
      * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
      * DumpRenderTree/gtk/DumpRenderTree.cpp:
      (resetDefaultsToConsistentValues):
      (webViewWindowObjectCleared):
      (main):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
      (WTR::AccessibilityController::platformName):
      * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
      (WTR::AccessibilityUIElement::isIndeterminate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e6984a4
    • mrobinson@webkit.org's avatar
      [GTK][CMake] Add support for building the NetworkProcess · 60736dcd
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127195
      
      Reviewed by Daniel Bates.
      
      .:
      
      * Source/cmake/OptionsGTK.cmake: Turn on the network process and give it
      a name like the WebProcess.
      
      Source/WebKit2:
      
      * CMakeLists.txt: Add shared network process build instructions.
      * PlatformEfl.cmake: Move build instructions to the platform-independent file.
      * PlatformGTK.cmake: Add some files to the source lists.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60736dcd
    • carlosgc@webkit.org's avatar
      REGRESSION(r162441): [GTK] ResourceLoader is broken when there aren't user extensions · 8ea340ad
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127422
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/gtk/WebGtkExtensionManager.cpp:
      (WebKit::WebGtkExtensionManager::initialize): Always create the
      WebKitWebExtension object since it's used internally to implement
      the ResourceLoader client.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ea340ad
    • jer.noble@apple.com's avatar
      [Mac][WK2] Unable to play video protected by session cookies · b3711302
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127207
      
      Reviewed by Sam Weinig.
      
      Recent changes in our underlying media frameworks caused our shimmed methods
      in CookieStorageShim to stop being called. Insert an objective-c shim in addition
      to our original shim to intercept pulling cookies out of cookie storage.
      
      * Shared/mac/CookieStorageShim.mm: Renamed from Source/WebKit2/Shared/mac/CookieStorageShim.cpp.
      (WebKit::CookieStorageShim::initialize): Insert the shim.
      (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
          Pass through to webKitCookieStorageCopyRequestHeaderFieldsForURL().
      * WebKit2.xcodeproj/project.pbxproj: Rename CookieStorageShim.cpp -> .mm.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b3711302
    • commit-queue@webkit.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=127380 · 155ba0f7
      commit-queue@webkit.org authored
      Add more methods to WKWebProcessPlugInNodeHandle.
      
      Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-22
      Reviewed by Sam Weinig.
      
      Add a static method that creates a WKWebProcessPlugInNodeHandle from a JSValue* and a JSContext*.  Also
      add a method to return the iframe's content frame from a WKWebProcessPlugInNodeHandle.
      
      * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
      * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
      (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
      (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      155ba0f7
    • carlosgc@webkit.org's avatar
      Unreviewed. Fix GTK+ build with CUSTOM_PROTOCOL enabled after r162449. · 07c6de7e
      carlosgc@webkit.org authored
      * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
      Use override instead of OVERRIDE.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07c6de7e
    • commit-queue@webkit.org's avatar
      Build fixes for FreeBSD. · 6fd8d9d4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126779
      
      Patch by Koop Mast <kwm@FreeBSD.org> on 2014-01-22
      Reviewed by Csaba Osztrogonác.
      
      * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
      (WebKit::PluginProcessProxy::scanPlugin):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6fd8d9d4
    • jinwoo7.song@samsung.com's avatar
      [EFL][WK2] Use std::function in the rest of EFL's WorkQueue implementation · 9e4b6433
      jinwoo7.song@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127397
      
      Reviewed by Anders Carlsson.
      
      Move to using std::function and move semantics in WorkQueue::registerSocketEventHandler
      and DispatchQueue::setSocketEventHandler.
      
      * Platform/IPC/unix/ConnectionUnix.cpp:
      (IPC::Connection::open):
      * Platform/WorkQueue.h:
      * Platform/efl/DispatchQueueEfl.cpp:
      (DispatchQueue::setSocketEventHandler):
      * Platform/efl/DispatchQueueEfl.h:
      * Platform/efl/WorkQueueEfl.cpp:
      (WorkQueue::registerSocketEventHandler):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e4b6433
  2. 21 Jan, 2014 19 commits
    • timothy_horton@apple.com's avatar
      [wk2] De-.get()ify receivers of Objective-C messages · 326164de
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127398
      
      Reviewed by Sam Weinig.
      
      RetainPtr does the right thing when you use it as the
      receiver of an Obj-C message, so we don't need .get().
      
      Long and useless file list elided.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      326164de
    • beidson@apple.com's avatar
      The IDB backing store put() method shouldn't call IDB callbacks directly · 2fd9bcf6
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127399
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Refactor the put() callback to take a resulting key or an error.
      * Modules/indexeddb/IDBServerConnection.h:
      
      * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
      (WebCore::PutOperation::perform): Call to the backing store, then perform the
        appropriate IDB callback whether a key or an error was returned.
      * Modules/indexeddb/IDBTransactionBackendOperations.h:
      
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
      (WebCore::IDBServerConnectionLevelDB::put): Don’t call IDB callbacks directly.
        Instead, pass the resulting key/error back to the PutOperation.
      * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
      
      Source/WebKit2:
      
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
      (WebKit::WebIDBServerConnection::put):
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fd9bcf6
    • mrowe@apple.com's avatar
      Roll out r162483. It removes SPI that is currently in use. · 08316f74
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08316f74
    • andersca@apple.com's avatar
      Fix 32-bit build. · a75aad25
      andersca@apple.com authored
      * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a75aad25
    • jinwoo7.song@samsung.com's avatar
      [EFL][WK2] Use nanoseconds in TimerWorkItem class consistently · d26b85c2
      jinwoo7.song@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127263
      
      Reviewed by Gyuyoung Kim.
      
      After r162276 and r162300, TimerWorkItem is getting nanoseconds as parameter.
      So it would be better to use nanoseconds in TimerWorkItem for consistency.
      
      * Platform/efl/DispatchQueueEfl.cpp:
      (DispatchQueue::performTimerWork):
      (DispatchQueue::insertTimerWorkItem):
      (DispatchQueue::getNextTimeOut):
      * Platform/efl/DispatchQueueWorkItemEfl.h:
      (TimerWorkItem::create):
      (TimerWorkItem::expirationTimeNanoSeconds):
      (TimerWorkItem::hasExpired):
      (TimerWorkItem::TimerWorkItem):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d26b85c2
    • timothy_horton@apple.com's avatar
      Don't copy ViewGestureGeometryCollector.messages.in into the WebProcess bundle. · 5be92614
      timothy_horton@apple.com authored
      Reviewed by Simon Fraser.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5be92614
    • andersca@apple.com's avatar
      Add a WKProcessClassConfiguration class · 3af9b01d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127378
      <rdar://problem/15875413>
      
      Reviewed by Dan Bernstein.
      
      * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Added.
      * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Added.
      (-[WKProcessClassConfiguration copyWithZone:]):
      * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Added.
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3af9b01d
    • timothy_horton@apple.com's avatar
      Make ViewGestureController Obj-C++ · 34692e93
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127385
      
      Reviewed by Dean Jackson.
      
      * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
      * WebKit2.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34692e93
    • roger_fong@apple.com's avatar
      Unreviewed. WebGLLoadPolicy::WebGLAsk is an unnecessary value. · 7ccea399
      roger_fong@apple.com authored
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::getContext):
      * loader/FrameLoaderTypes.h:
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toWebGLLoadPolicy):
      * UIProcess/API/C/WKPageLoaderClient.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ccea399
    • andersca@apple.com's avatar
      Make all the WebKit2 headers private and move Cocoa UIProcess API headers to a Deprecated group · e9cfc1f1
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127374
      
      Reviewed by Dan Bernstein.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9cfc1f1
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r162452. · 4acc4a4b
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/162452
      https://bugs.webkit.org/show_bug.cgi?id=127366
      
      broke a few tests on all Mac WebKit1 bots (Requested by
      thorton on #webkit).
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * page/FocusController.cpp:
      (WebCore::FocusController::FocusController):
      (WebCore::FocusController::setFocused):
      (WebCore::FocusController::setActive):
      (WebCore::FocusController::setContentIsVisible):
      * page/FocusController.h:
      (WebCore::FocusController::isActive):
      (WebCore::FocusController::isFocused):
      * page/Page.cpp:
      (WebCore::Page::Page):
      (WebCore::Page::setIsInWindow):
      (WebCore::Page::setIsVisuallyIdle):
      (WebCore::Page::setIsVisible):
      (WebCore::Page::visibilityState):
      (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
      * page/Page.h:
      (WebCore::Page::isVisible):
      (WebCore::Page::isInWindow):
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView _windowWillOrderOnScreen:]):
      (-[WebView _windowWillOrderOffScreen:]):
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::setActive):
      (WebKit::WebPage::setViewIsVisible):
      (WebKit::WebPage::setFocused):
      (WebKit::WebPage::setIsInWindow):
      (WebKit::WebPage::setViewStateInternal):
      (WebKit::WebPage::setIsVisuallyIdle):
      * WebProcess/WebPage/WebPage.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4acc4a4b
    • commit-queue@webkit.org's avatar
      Trivial Session API cleanup. · c3f31ab5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127356
      
      Patch by Martin Hock <mhock@apple.com> on 2014-01-21
      Reviewed by Alexey Proskuryakov.
      
      * UIProcess/API/C/WKSessionRef.cpp:
      (WKSessionIsEphemeral):
      * UIProcess/API/C/WKSessionRef.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3f31ab5
    • simon.fraser@apple.com's avatar
      Log an error for a common cause of WebProcess early launch crashing in... · 215375d8
      simon.fraser@apple.com authored
      Log an error for a common cause of WebProcess early launch crashing in misconfigured development builds
      https://bugs.webkit.org/show_bug.cgi?id=127121
      
      Reviewed by Anders Carlsson.
      
      A common cause of early WebProcess crashes during development is a null return
      from CFBundleGetValueForInfoDictionaryKey(), so log and return an error in
      this case rather than passing a null C string to dlsym().
      
      * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
      (WebKit::BootstrapMain):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      215375d8
    • timothy_horton@apple.com's avatar
      Sort headers after the rename that happened in r162454. · f4bf3112
      timothy_horton@apple.com authored
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f4bf3112
    • timothy_horton@apple.com's avatar
      Address late review naming comments after r162453. · 8736f0e1
      timothy_horton@apple.com authored
      * UIProcess/API/mac/WKView.mm:
      And, fix the build by adding an include I accidentally missed.
      
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
      
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      * platform/graphics/mac/CALayerWebAdditions.h: Removed.
      * platform/graphics/mac/CALayerWebAdditions.mm: Removed.
      * platform/graphics/mac/WebCoreCALayerExtras.h: Added.
      * platform/graphics/mac/WebCoreCALayerExtras.mm: Added.
      Rename.
      
      (-[CALayer web_disableAllActions]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8736f0e1
    • timothy_horton@apple.com's avatar
      Keep CALayer implicit animation disabling code in a single place · fdfc3bb9
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127355
      
      Reviewed by Simon Fraser.
      
      * WebCore.xcodeproj/project.pbxproj:
      Add CALayerWebAdditions.{h,mm}.
      
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      (PlatformCALayerMac::commonInit):
      Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.
      
      * platform/graphics/mac/CALayerWebAdditions.h: Added.
      * platform/graphics/mac/CALayerWebAdditions.mm: Added.
      (-[CALayer web_disableAllActions]):
      Added. Disable all implicit actions on the layer.
      
      * Shared/mac/RemoteLayerTreePropertyApplier.h:
      * Shared/mac/RemoteLayerTreePropertyApplier.mm:
      Remove disableActionsForLayer.
      
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _rootLayer]):
      Disable actions on the root layer. It doesn't need them, and currently
      isn't affected by implicit animations, but future patches which animate
      the root layer will benefit from this.
      
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      (WebKit::RemoteLayerTreeHost::createLayer):
      Use web_disableAllActions instead of disableActionsForLayer.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp.
      (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
      (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
      (PlatformCALayerRemoteCustom::hostingContextID):
      Use web_disableAllActions instead of disableActionsForLayer.
      This requires making this file Obj-C++ but that's OK since it's Mac/iOS only.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdfc3bb9
    • barraclough@apple.com's avatar
      Change Page, FocusController to use ViewState · 3ffc4f37
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126533
      
      Reviewed by Tim Horton.
      
      These classes currently maintain a set of separate fields to represent the view state;
      combine these into a single field, and allow WebPage to send the combined update rather
      than individual changes.
      
      Maintain existing interface for WebKit1 clients.
      
      Source/WebCore: 
      
      * WebCore.exp.in:
          - Added WebCore::setViewState, removed WebCore::setIsVisuallyIdle.
      * page/FocusController.cpp:
      (WebCore::FocusController::FocusController):
          - Initialize combined m_viewState.
      (WebCore::FocusController::setFocused):
          - Calls setViewState.
      (WebCore::FocusController::setFocusedInternal):
          - setFocused -> setFocusedInternal.
      (WebCore::FocusController::setViewState):
          - Added, update all ViewState flags.
      (WebCore::FocusController::setActive):
          - Calls setViewState.
      (WebCore::FocusController::setActiveInternal):
          - setActive -> setActiveInternal.
      (WebCore::FocusController::setContentIsVisible):
          - Calls setViewState.
      (WebCore::FocusController::setContentIsVisibleInternal):
          - setContentIsVisible -> setContentIsVisibleInternal.
      * page/FocusController.h:
      (WebCore::FocusController::isActive):
      (WebCore::FocusController::isFocused):
      (WebCore::FocusController::contentIsVisible):
          - Implemented in terms of ViewState.
      * page/Page.cpp:
      (WebCore::Page::Page):
          - Initialize using PageInitialViewState.
      (WebCore::Page::setIsInWindow):
          - Calls setViewState.
      (WebCore::Page::setIsInWindowInternal):
          - setIsInWindow -> setIsInWindowInternal.
      (WebCore::Page::setIsVisuallyIdleInternal):
          - setIsVisuallyIdle -> setIsVisuallyIdleInternal.
      (WebCore::Page::setViewState):
          - Added, update all ViewState flags, including FocusController.
      (WebCore::Page::setIsVisible):
          - Calls setViewState.
      (WebCore::Page::setIsVisibleInternal):
          - setIsVisible -> setIsVisibleInternal.
      (WebCore::Page::visibilityState):
          - m_isVisible -> isVisible()
      (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
          - m_isVisible -> isVisible()
      * page/Page.h:
      (WebCore::Page::isVisible):
      (WebCore::Page::isInWindow):
          - Implemented in terms of ViewState.
      (WebCore::Page::scriptedAnimationsSuspended):
          - Combined member fields into ViewState::Flags.
      
      Source/WebKit/mac: 
      
      * WebView/WebView.mm:
      (-[WebView _windowWillOrderOnScreen:]):
      (-[WebView _windowWillOrderOffScreen:]):
          - remove calls to FocusController::setContentIsVisible, these are redundant
            (this is handled when page visibility is set).
      
      Source/WebKit2: 
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
          - Combined separate calls to Page::setViewState.
      (WebKit::WebPage::updateIsInWindow):
          - Simplied from setIsInWindow.
      (WebKit::WebPage::setViewState):
          - Combined separate calls to Page::setViewState.
      * WebProcess/WebPage/WebPage.h:
          - Declare updateIsInWindow.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ffc4f37
    • carlosgc@webkit.org's avatar
      [SOUP] Implement CUSTOM PROTOCOLS · 6188bb92
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125583
      
      Reviewed by Anders Carlsson.
      
      Add new classes to implement CustomProtocols for soup. The
      implementation is the same, but using the CustomProtocol API and
      messages. The current implementation can be removed once all ports
      using soup switch to using CustomProtocols.
      
      * GNUmakefile.am: Add new include paths.
      * GNUmakefile.list.am: Add new files to compilation.
      * PlatformGTK.cmake: Add new files to compilation.
      * Shared/API/c/soup/WKBaseSoup.h:
      * Shared/APIObject.h:
      * Shared/Network/CustomProtocols/CustomProtocolManager.h:
      * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: Added.
      (WebKit::generateCustomProtocolID):
      (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
      (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
      (WebKit::WebSoupRequestAsyncData::requestFailed):
      (WebKit::WebSoupRequestAsyncData::releaseTask):
      (WebKit::CustomProtocolManagerImpl::CustomProtocolManagerImpl):
      (WebKit::CustomProtocolManagerImpl::~CustomProtocolManagerImpl):
      (WebKit::CustomProtocolManagerImpl::registerScheme):
      (WebKit::CustomProtocolManagerImpl::supportsScheme):
      (WebKit::CustomProtocolManagerImpl::didFailWithError):
      (WebKit::CustomProtocolManagerImpl::didLoadData):
      (WebKit::CustomProtocolManagerImpl::didReceiveResponse):
      (WebKit::CustomProtocolManagerImpl::didFinishLoading):
      (WebKit::CustomProtocolManagerImpl::send):
      (WebKit::CustomProtocolManagerImpl::finish):
      * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: Added.
      * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
      (WebKit::CustomProtocolManager::CustomProtocolManager):
      (WebKit::CustomProtocolManager::initialize):
      (WebKit::CustomProtocolManager::registerScheme):
      (WebKit::CustomProtocolManager::supportsScheme):
      (WebKit::CustomProtocolManager::didFailWithError):
      (WebKit::CustomProtocolManager::didLoadData):
      (WebKit::CustomProtocolManager::didReceiveResponse):
      (WebKit::CustomProtocolManager::didFinishLoading):
      * Shared/WebProcessCreationParameters.cpp:
      (WebKit::WebProcessCreationParameters::encode):
      (WebKit::WebProcessCreationParameters::decode):
      * Shared/WebProcessCreationParameters.h:
      * UIProcess/API/C/soup/WKAPICastSoup.h:
      * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Copied from Source/WebKit2/UIProcess/soup/WebContextSoup.cpp.
      (WKSoupCustomProtocolRequestManagerGetTypeID):
      (WKSoupCustomProtocolRequestManagerSetClient):
      * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Added.
      * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
      * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
      (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
      * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
      (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
      (WebKit::CustomProtocolManagerProxy::startLoading):
      (WebKit::CustomProtocolManagerProxy::stopLoading):
      * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Added.
      (WebKit::WebSoupCustomProtocolRequestManager::supplementName):
      (WebKit::WebSoupCustomProtocolRequestManager::create):
      (WebKit::WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager):
      (WebKit::WebSoupCustomProtocolRequestManager::~WebSoupCustomProtocolRequestManager):
      (WebKit::WebSoupCustomProtocolRequestManager::initializeClient):
      (WebKit::WebSoupCustomProtocolRequestManager::contextDestroyed):
      (WebKit::WebSoupCustomProtocolRequestManager::processDidClose):
      (WebKit::WebSoupCustomProtocolRequestManager::refWebContextSupplement):
      (WebKit::WebSoupCustomProtocolRequestManager::derefWebContextSupplement):
      (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
      (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
      (WebKit::WebSoupCustomProtocolRequestManager::startLoading):
      (WebKit::WebSoupCustomProtocolRequestManager::stopLoading):
      (WebKit::WebSoupCustomProtocolRequestManager::didReceiveResponse):
      (WebKit::WebSoupCustomProtocolRequestManager::didLoadData):
      (WebKit::WebSoupCustomProtocolRequestManager::didFailWithError):
      (WebKit::WebSoupCustomProtocolRequestManager::didFinishLoading):
      * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Added.
      (WebKit::WebSoupCustomProtocolRequestManager::registeredSchemesForCustomProtocols):
      * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Added.
      (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
      (WebKit::WebSoupCustomProtocolRequestManagerClient::stopLoading):
      * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Added.
      * UIProcess/Network/NetworkProcessProxy.cpp:
      (WebKit::NetworkProcessProxy::NetworkProcessProxy):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::WebProcessProxy):
      * UIProcess/gtk/WebContextGtk.cpp:
      (WebKit::WebContext::platformInitializeWebProcess):
      * UIProcess/soup/WebContextSoup.cpp:
      (WebKit::WebContext::platformInitializeNetworkProcess):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::WebProcess):
      * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
      (webkitSoupRequestGenericSendAsync):
      (webkitSoupRequestGenericSendFinish):
      * WebProcess/soup/WebKitSoupRequestGeneric.h:
      * WebProcess/soup/WebProcessSoup.cpp:
      (WebKit::WebProcess::platformInitializeWebProcess):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6188bb92
    • commit-queue@webkit.org's avatar
      [GTK] Allow passing extra data to web extensions · 4c113670
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125990
      
      Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-01-21
      Reviewed by Carlos Garcia Campos.
      
      Allow passing additional information to the injected bundle. On top
      of the string containing the path to the web extensions directory,
      a GVariant can be set with additional data using
      webkit_web_context_set_web_extensions_initialization_user_data().
      Also, a new initialize-web-extensions signal is emitted before
      launching a new WebProcess to allow setting different user data
      for each process. The GVariant is serialized as a string, passed
      to the injected bundle, and the injected bundle deserializes back
      the data, which is passed to web extensions which define the
      webkit_web_extension_initialize_with_user_data() function (for
      backwards compatibility, webkit_web_extension_initialize() is
      used as a fallback.)
      
      Source/WebKit2:
      
      * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
      (getInjectedBundleInitializationUserData): Define new callback
      function which causes emission of the initialize-web-extensions
      signal, and serializes the data to be passed to the web process.
      (attachInjectedBundleClientToContext): Set the
      getInjectedBundleInitializationUserData() callback.
      * UIProcess/API/gtk/WebKitWebContext.cpp:
      (webkit_web_context_class_init): Define the
      initialize-web-extensions signal.
      (webkit_web_context_set_web_extensions_directory):
      Web extensions directory as now member of WebKitWebContextPrivate,
      to be able to retrieve it later.
      (webkit_web_context_set_web_extensions_initialization_user_data):
      New API method to set the user data passed to the web extensions
      when initialized.
      (webkitWebContextInitializeWebExtensions): Private function used
      to trigger emission of the initialize-web-extensions signal.
      * UIProcess/API/gtk/WebKitWebContext.h:
      Added prototype for new API method
      webkit_web_context_set_web_extensions_initialization_user_data().
      * UIProcess/API/gtk/WebKitWebContextPrivate.h:
      Prototype of the new private function.
      * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
      Add new public API bits to the documentation.
      * WebProcess/gtk/WebGtkExtensionManager.cpp:
      (WebKit::WebGtkExtensionManager::initialize):
      Deserialize the data received from the UI process and pass it to
      webkit_web_extension_initialize_with_user_data() if available,
      keeping webkit_web_extension_initialize() as fallback.
      
      Tools:
      
      * TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
      (initializeWebExtensions): Handles the initialize-web-extensions
      signal, and sets the web extensions directory and the initialization
      user data.
      (testWebExtensionInitializationUserData): New test case for checking
      the user data passed on initialization to web extensions.
      * TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
      (methodCallCallback): Added implementation for the
      GetInitializationUserData D-Bus method, used by
      testWebExtensionInitializationUserData().
      (webkit_web_extension_initialize_with_user_data): Define the
      initialization function with the additional user data parameter.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c113670
  3. 20 Jan, 2014 1 commit