[Webkit-unassigned] [Bug 207352] Add a variant of -[WKWebViewPrivate _getContentsAsStringWithCompletionHandler:] that includes contents from subframes.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 6 16:01:22 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=207352

--- Comment #4 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 389994
  --> https://bugs.webkit.org/attachment.cgi?id=389994
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389994&action=review

We'd ideally want an API test for this, as well.

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:270
> +- (void)_getContentsAsStringInAllFrames:(BOOL)allFrames withCompletionHandler:(void (^)(NSString *, NSError *))completionHandler WK_API_AVAILABLE(macos(10.15), ios(13.0));

The availability should be `WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA))`.

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:3459
> +        WebFrame* webFrame = WebFrame::fromCoreFrame(*frame);

Nit - this would be ever so slightly cleaner as:

if (auto* webFrame = WebFrame::fromCoreFrame(*frame))
    resultString.append(webFrame->contentsAsString());

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200207/2a835c3a/attachment-0001.htm>


More information about the webkit-unassigned mailing list