[Webkit-unassigned] [Bug 44334] [EFL] Text selection advanced API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 26 09:52:15 PDT 2010


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


Rafael Antognolli <antognolli at profusion.mobi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antognolli at profusion.mobi




--- Comment #2 from Rafael Antognolli <antognolli at profusion.mobi>  2010-08-26 09:52:15 PST ---
Hi Mirek,

The patch is nice, but could you please consider adding some doxygen comments on each of these functions, describing the parameters and return values?

I also couldn't get the reason why you need top_h and bottom_h parameters, but I think the documentation will be enough for me to understand it.

Another change if you want to make the API more versatile is here:

+Eina_Bool ewk_frame_selection_handlers_get(
+        Evas_Object* o,
+        int* top_x, int* top_y, int* top_h, 
+        int* bottom_x, int* bottom_y, int* bottom_h)
+{
+    EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(top_x, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(top_y, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(top_h, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(bottom_x, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(bottom_y, EINA_FALSE);
+    EINA_SAFETY_ON_NULL_RETURN_VAL(bottom_h, EINA_FALSE);

Instead of failing if any of the parameters is NULL, you can check each of them before assigning its value, like the function ewk_view_viewport_get(). This would allow the user to fetch just some of the values, without the need to create dummy variables to receive the other parameters.

This comment is valid for all these new functions you've created.

Regards,
Rafael

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