[Webkit-unassigned] [Bug 61915] [EFL][WK2] Add efl port's ewk_view files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 2 09:32:17 PDT 2011


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


Leandro Pereira <leandro at profusion.mobi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #95745|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #4 from Leandro Pereira <leandro at profusion.mobi>  2011-06-02 09:32:16 PST ---
(From update of attachment 95745)
View in context: https://bugs.webkit.org/attachment.cgi?id=95745&action=review

I don't know much about WebKit2, but I've found some small issues, after a quick glance over the code.

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:33
> +static const char EWK_VIEW_TYPE_STR[] = "EWK_View";

EWK_View is also used by EWK1 -- at least while the two APIs are coexisting here, I'd change that to "EWK2_View" or something similar.

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:58
> +static void _ewk_view_smart_focus_in(Ewk_View_Smart_Data* sd)
> +{
> +    if (!sd)
> +        return;
> +    EWK_VIEW_PRIV_GET(sd, priv);

This pattern repeats all over -- wouldn't it be nicer you had a macro like EWK_VIEW_PRIV_GET_OR_RETURN, like you have on current WebKitEFL?

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:222
> +{
> +    if (!priv)
> +        return;
> +
> +    free(priv);

This will leak the RefPtr on the Ewk_View_Private_Data structure -- attribute 0 to it before freeing the structure.

> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:246
> +    if (!sd->priv)
> +        return;

sd leaks here.

> Source/WebKit2/UIProcess/API/efl/ewk_view.h:102
> +struct _Ewk_View_Smart_Data {
> +    Evas_Object_Smart_Clipped_Data base;
> +    const Ewk_View_Smart_Class* api;     /**< reference to casted class instance */
> +    Evas_Object* self;                   /**< reference to owner object */
> +    Evas_Object *backing_store;          /**< reference to backing store */

Small style issue: * aligned to the type.

-- 
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