Changeset 163448 in webkit


Ignore:
Timestamp:
Feb 5, 2014 9:13:07 AM (10 years ago)
Author:
mitz@apple.com
Message:

[Cocoa] Notify WKWebProcessPlugInLoadDelegate when a frame is removed from the frame hierarchy
https://bugs.webkit.org/show_bug.cgi?id=128239

Reviewed by Anders Carlsson.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new

delegate method.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(didRemoveFrameFromHierarchy): Implemented this page loader client callback by calling the
load delegate.
(setUpPageLoaderClient): Set the above callback in the client structure.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163440 r163448  
     12014-02-05  Dan Bernstein  <mitz@apple.com>
     2
     3        [Cocoa] Notify WKWebProcessPlugInLoadDelegate when a frame is removed from the frame hierarchy
     4        https://bugs.webkit.org/show_bug.cgi?id=128239
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
     9        delegate method.
     10        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
     11        (didRemoveFrameFromHierarchy): Implemented this page loader client callback by calling the
     12        load delegate.
     13        (setUpPageLoaderClient): Set the above callback in the client structure.
     14
    1152014-02-05  Csaba Osztrogonác  <ossy@webkit.org>
    216
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h

    r162259 r163448  
    4242- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller didSameDocumentNavigationForFrame:(WKWebProcessPlugInFrame *)frame;
    4343- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController*)controller globalObjectIsAvailableForFrame:(WKWebProcessPlugInFrame *)frame inScriptWorld:(WKWebProcessPlugInScriptWorld *)scriptWorld;
     44- (void)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller didRemoveFrameFromHierarchy:(WKWebProcessPlugInFrame *)frame;
    4445
    4546// Layout
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm

    r162259 r163448  
    8989}
    9090
     91static void didRemoveFrameFromHierarchy(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void* clientInfo)
     92{
     93    WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo;
     94    auto loadDelegate = pluginContextController->_loadDelegate.get();
     95
     96    if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didRemoveFrameFromHierarchy:)])
     97        [loadDelegate webProcessPlugInBrowserContextController:pluginContextController didRemoveFrameFromHierarchy:wrapper(*toImpl(frame))];
     98}
     99
    91100static void didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo)
    92101{
     
    157166    client.didFinishLoadForFrame = didFinishLoadForFrame;
    158167    client.globalObjectIsAvailableForFrame = globalObjectIsAvailableForFrame;
     168    client.didRemoveFrameFromHierarchy = didRemoveFrameFromHierarchy;
    159169
    160170    client.didLayoutForFrame = didLayoutForFrame;
Note: See TracChangeset for help on using the changeset viewer.