1. 22 Jan, 2014 13 commits
  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 6 commits
  4. 19 Jan, 2014 2 commits