⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267387 in webkit


Ignore:
Timestamp:
Sep 21, 2020, 5:37:16 PM (6 years ago)
Author:
timothy@apple.com
Message:

Add some WKWebProcessPlugInFrame SPI needed by Safari.
https://bugs.webkit.org/show_bug.cgi?id=216809
rdar://problem/69336928

Reviewed by Brian Weinstein.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(+[WKWebProcessPlugInFrame lookUpFrameFromJSContext:]): Added.
(-[WKWebProcessPlugInFrame _securityOrigin]): Added.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r267385 r267387  
     12020-09-21  Timothy Hatcher  <timothy@apple.com>
     2
     3        Add some WKWebProcessPlugInFrame SPI needed by Safari.
     4        https://bugs.webkit.org/show_bug.cgi?id=216809
     5        rdar://problem/69336928
     6
     7        Reviewed by Brian Weinstein.
     8
     9        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
     10        (+[WKWebProcessPlugInFrame lookUpFrameFromJSContext:]): Added.
     11        (-[WKWebProcessPlugInFrame _securityOrigin]): Added.
     12        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
     13
    1142020-09-21  Andres Gonzalez  <andresg_22@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm

    r260709 r267387  
    5151{
    5252    return wrapper(WebKit::WebProcess::singleton().webFrame(handle->_frameHandle->frameID()));
     53}
     54
     55+ (instancetype)lookUpFrameFromJSContext:(JSContext *)context
     56{
     57    return wrapper(WebKit::WebFrame::frameForContext(context.JSGlobalContextRef));
    5358}
    5459
     
    109114{
    110115    return wrapper(API::FrameHandle::create(_frame->frameID()));
     116}
     117
     118- (NSString *)_securityOrigin
     119{
     120    auto* coreFrame = _frame->coreFrame();
     121    if (!coreFrame)
     122        return nil;
     123    return coreFrame->document()->securityOrigin().toString();
    111124}
    112125
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h

    r242339 r267387  
    2626#import "WKWebProcessPlugInFrame.h"
    2727
     28@class JSContext;
    2829@class WKWebProcessPlugInBrowserContextController;
    2930
     
    3132
    3233+ (instancetype)lookUpFrameFromHandle:(_WKFrameHandle *)handle;
     34+ (instancetype)lookUpFrameFromJSContext:(JSContext *)context;
    3335
    3436@property (nonatomic, readonly) WKWebProcessPlugInBrowserContextController *_browserContextController;
     
    3840@property (nonatomic, readonly) SecTrustRef _serverTrust;
    3941@property (nonatomic, readonly) NSURL *_provisionalURL;
     42@property (nonatomic, readonly) NSString *_securityOrigin;
    4043
    4144@property (nonatomic, readonly) WKWebProcessPlugInFrame *_parentFrame;
Note: See TracChangeset for help on using the changeset viewer.