[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
Mon Feb 10 08:07:41 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=207352
Alex Christensen <achristensen at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #390154|review? |review-
Flags| |
--- Comment #21 from Alex Christensen <achristensen 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/Shared/ContentAsStringIncludesChildFrames.h:38
> +template<> struct EnumTraits<WebKit::ContentAsStringIncludesChildFrames> {
If you use a bool as the storage type of an enum, you don't need EnumTraits because we know there are only two valid values: 0 and 1.
>> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:269
>> +- (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:
Do we know existing users of _getContentsAsStringWithCompletionHandler need to not have subframe content, or do we just want to not change them out of caution?
If we do need the boolean, should we deprecate _getContentsAsStringWithCompletionHandler with this as a replacement?
Also, I don't think we need to have the NSError exposed in this SPI, even though its predecessor had it.
--
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/99e54ccd/attachment-0001.htm>
More information about the webkit-unassigned
mailing list