[Webkit-unassigned] [Bug 107931] [EFL][WK2] Introduce a WebView class as counterpart for WKViewRef

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 25 06:36:52 PST 2013


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





--- Comment #5 from Christophe Dumez <christophe.dumez at intel.com>  2013-01-25 06:38:45 PST ---
(From update of attachment 184737)
View in context: https://bugs.webkit.org/attachment.cgi?id=184737&action=review

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:118
> +WebView::WebView(WebContext* context, PageClient* pageClient, WebPageGroup* pageGroup, Evas_Object* evas)

We should really call it evasObject, not evas since evas is the name we use for the canvas.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:142
> +    m_webPageProxy->setThemePath(toImpl(theme)->string().utf8().data());

You're using WebString here but we are trying to avoid C++ classes usage.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:580
> +        WKRetainPtr<WKStringRef> wkTheme = WKStringCreateWithUTF8CString(theme);

Needs to be adopted.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:587
> +    WKStringRef customEncoding = WKPageCopyCustomTextEncodingName(wkPage());

We should probably use a WKRetainPtr and adopt to avoid leaking on early return (the WKStringIsEmpty() if check).

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:591
> +    m_customEncoding = WKEinaSharedString(AdoptWK, customEncoding);

No longer needs to be adopted if you use a WKRetainPtr earlier.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:598
> +    WKPageSetCustomTextEncodingName(wkPage(), WKStringCreateWithUTF8CString(encoding.utf8().data()));

Value returned by WKStringCreateWithUTF8CString() needs to be adopted.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:922
> +    WKRetainPtr<WKURLRef> wkActiveURL = WKPageCopyActiveURL(wkPage());

Needs to be adopted.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:923
> +    WKStringRef wkURLString = WKURLCopyString(wkActiveURL.get());

I would prefer if we use WKRetainPtr and adopt rather than having to call WKRelease() manually.

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:930
> +    m_url = WKEinaSharedString(AdoptWK, wkURLString);

No longer needs to be adopted if you use WKRetainPtr earlier.

> Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp:76
> +    evas_object_del(WKViewGetEvasObject(m_view));

This does not look right.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list