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

Changeset 251673 in webkit


Ignore:
Timestamp:
Oct 28, 2019, 2:42:43 PM (7 years ago)
Author:
beidson@apple.com
Message:

Expose _printOperationWithPrintInfo: SPI as API
<rdar://problem/36557179> and https://bugs.webkit.org/show_bug.cgi?id=203496

Reviewed by Andy Estes.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView printOperationWithPrintInfo:]):
(-[WKWebView _printOperationWithPrintInfo:]):

Tools:

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController printWebView:]):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r251672 r251673  
     12019-10-28  Brady Eidson  <beidson@apple.com>
     2
     3        Expose _printOperationWithPrintInfo: SPI as API
     4        <rdar://problem/36557179> and https://bugs.webkit.org/show_bug.cgi?id=203496
     5
     6        Reviewed by Andy Estes.
     7
     8        * UIProcess/API/Cocoa/WKWebView.h:
     9        * UIProcess/API/Cocoa/WKWebView.mm:
     10        (-[WKWebView printOperationWithPrintInfo:]):
     11        (-[WKWebView _printOperationWithPrintInfo:]):
     12
    1132019-10-28  Kate Cheney  <katherine_cheney@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.h

    r251560 r251673  
    301301+ (BOOL)handlesURLScheme:(NSString *)urlScheme WK_API_AVAILABLE(macos(10.13), ios(11.0));
    302302
     303#if !TARGET_OS_IPHONE
     304/* @abstract Returns an NSPrintOperation object configured to print the contents of this WKWebView
     305@param printInfo The print info object used to configure the resulting print operation.
     306*/
     307- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo WK_API_AVAILABLE(macos(WK_MAC_TBA));
     308#endif
    303309@end
    304310
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r251600 r251673  
    46344634#endif // ENABLE(DRAG_SUPPORT)
    46354635
     4636- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo
     4637{
     4638    if (auto webFrameProxy = _page->mainFrame())
     4639        return _impl->printOperationWithPrintInfo(printInfo, *webFrameProxy);
     4640    return nil;
     4641}
     4642
    46364643#endif // PLATFORM(MAC)
    46374644
     
    67466753- (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo
    67476754{
    6748     if (auto webFrameProxy = _page->mainFrame())
    6749         return _impl->printOperationWithPrintInfo(printInfo, *webFrameProxy);
    6750     return nil;
     6755    return [self printOperationWithPrintInfo:printInfo];
    67516756}
    67526757
  • trunk/Tools/ChangeLog

    r251670 r251673  
     12019-10-28  Brady Eidson  <beidson@apple.com>
     2
     3        Expose _printOperationWithPrintInfo: SPI as API
     4        <rdar://problem/36557179> and https://bugs.webkit.org/show_bug.cgi?id=203496
     5
     6        Reviewed by Andy Estes.
     7
     8        * MiniBrowser/mac/WK2BrowserWindowController.m:
     9        (-[WK2BrowserWindowController printWebView:]):
     10
    1112019-10-28  Jonathan Bedard  <jbedard@apple.com>
    212
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r251560 r251673  
    645645- (IBAction)printWebView:(id)sender
    646646{
    647     [[_webView _printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]] runOperationModalForWindow:self.window delegate:nil didRunSelector:nil contextInfo:nil];
     647    [[_webView printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]] runOperationModalForWindow:self.window delegate:nil didRunSelector:nil contextInfo:nil];
    648648}
    649649
Note: See TracChangeset for help on using the changeset viewer.