[Webkit-unassigned] [Bug 168147] Add new WKWebKit Cocoa API for getContentsAsString

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 13 16:14:02 PST 2017


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

Tim Horton <thorton at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #301407|review?                     |review+
              Flags|                            |

--- Comment #2 from Tim Horton <thorton at apple.com> ---
Comment on attachment 301407
  --> https://bugs.webkit.org/attachment.cgi?id=301407
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3807
> +    auto handler = adoptNS([completionHandler copy]);

This should probably use BlockPtr these days.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3813
> +            RetainPtr<NSError> error = adoptNS([[NSError alloc] init]);

This actually logs an error, and the other uses (of [[NSError alloc] init]) are wrong. Should we fix it? Or just propagate the wrongness.

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewGetContents.mm:42
> +    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
> +    [webView loadRequest:request];
> +    [webView _test_waitForDidFinishNavigation];

If you want, if you use the TestWKWebView subclass instead of WKWebView directly, it has synchronouslyLoadTestPageNamed, which will replace all of these lines.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170214/b979431b/attachment.html>


More information about the webkit-unassigned mailing list