[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
Sun Feb 9 21:02:42 PST 2020


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

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com

--- Comment #20 from Darin Adler <darin at apple.com> ---
Comment on attachment 390154
  --> https://bugs.webkit.org/attachment.cgi?id=390154
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:269
>  - (void)_getContentsAsStringWithCompletionHandler:(void (^)(NSString *, NSError *))completionHandler WK_API_AVAILABLE(macos(10.13), ios(11.0));
> +- (void)_getContentsAsStringInAllFrames:(BOOL)allFrames withCompletionHandler:(void (^)(NSString *, NSError *))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

Do we really need the boolean here? Why not just have two separate methods? I’d suggest the name:

    _getAllFrameContentsAsStringWithCompletionHandler:

Or maybe:

    _getContentsOfAllFramesAsStringWithCompletionHandler:

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:3461
> +                builder.append(webFrame->contentsAsString());

Seems risky to concatenate frames without separating them with something like a newline.

-- 
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/20200210/642266fc/attachment-0001.htm>


More information about the webkit-unassigned mailing list