[Webkit-unassigned] [Bug 95672] [EFL][WK2] Add javascript popup api.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 3 23:08:49 PDT 2012


--- Comment #3 from Christophe Dumez <christophe.dumez at intel.com>  2012-09-03 23:09:00 PST ---
(From update of attachment 161938)
View in context: https://bugs.webkit.org/attachment.cgi?id=161938&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:106
> +    OwnPtr<CString> javascriptPromptResult;

Why does does this need to be a pointer? What prevents you from using simply a CString?

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:122
> +        , javascriptPromptResult(nullptr)

Not needed (either with CString or OwnPtr<CString> types).

> Source/WebKit2/UIProcess/API/efl/ewk_view.h:239
> + */

You should document that the strings are stringshared.

>> Source/WebKit2/UIProcess/API/efl/ewk_view_private.h:104
>> +PassOwnPtr<CString> ewk_view_run_javascript_prompt(Evas_Object* ewkView, char* message, char* default_value);
> s/defalut_value/defaultValue/g

Why does this function return a PassOwnPtr<CString> instead of a simple CString?

> Source/WebKit2/UIProcess/API/efl/ewk_view_ui_client.cpp:51
> +    OwnArrayPtr<char> alertTextBuffer = adoptArrayPtr(new char[length]);

In EFL port, we usually expose stringshared strings to the client. I believe you should use WKEinaSharedString instead of OwnArrayPtr:
WKEinaSharedString text(alertText);

> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:276
> +    destination->alert.message = strdup(source->alert.message);

Should use eina_stringshare_ref() instead of strdup().

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