[webkit-reviews] review granted: [Bug 107652] [WK2] Replace some internal API usage in EwkView with C API : [Attachment 184183] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 23 12:41:53 PST 2013


Benjamin Poulain <benjamin at webkit.org> has granted Kenneth Rohde Christiansen
<kenneth at webkit.org>'s request for review:
Bug 107652: [WK2] Replace some internal API usage in EwkView with C API
https://bugs.webkit.org/show_bug.cgi?id=107652

Attachment 184183: Patch
https://bugs.webkit.org/attachment.cgi?id=184183&action=review

------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=184183&action=review


Really nice.

Just one API thingy you might want to look into:

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:758
> -    if (unreachableUrl && *unreachableUrl)
> -	   impl->page()->loadAlternateHTMLString(String::fromUTF8(html),
baseUrl ? String::fromUTF8(baseUrl) : "", String::fromUTF8(unreachableUrl));
> -    else
> -	   impl->page()->loadHTMLString(String::fromUTF8(html), baseUrl ?
String::fromUTF8(baseUrl) : "");
> +    WKRetainPtr<WKStringRef> wkHTMLString =
adoptWK(WKStringCreateWithUTF8CString(html));
> +    WKRetainPtr<WKURLRef> wkBaseURL =
adoptWK(WKURLCreateWithUTF8CString(baseUrl));
> +
> +    if (unreachableUrl && *unreachableUrl) {
> +	   WKRetainPtr<WKURLRef> wkUnreachableURL =
adoptWK(WKURLCreateWithUTF8CString(unreachableUrl));
> +	   WKPageLoadAlternateHTMLString(impl->wkPage(), wkHTMLString.get(),
wkBaseURL.get(), wkUnreachableURL.get());
> +    } else
> +	   WKPageLoadHTMLString(impl->wkPage(), wkHTMLString.get(),
wkBaseURL.get());

The new code is nicer than the old one.


More information about the webkit-reviews mailing list