Bug 76165 - [EFL] Add visible field into ewk_tiled_backing_store's data.
Summary: [EFL] Add visible field into ewk_tiled_backing_store's data.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 03:59 PST by KwangHyuk
Modified: 2012-01-16 05:26 PST (History)
4 users (show)

See Also:


Attachments
Patch. (4.01 KB, patch)
2012-01-12 04:11 PST, KwangHyuk
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KwangHyuk 2012-01-12 03:59:40 PST
Using of evas_object_visible_get() API can't gurantee the correctness of evas_object's visible status if it's called inside of evas_object's smart_show() method.

From the EFL's evas_object_show() API's implementation, I could see the reason why.

EAPI void
evas_object_show(Evas_Object *obj)
{
   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();
   if (obj->delete_me) return;
   if (evas_object_intercept_call_show(obj)) return;
   if (obj->smart.smart)
     {
       if (obj->smart.smart->smart_class->show)
         obj->smart.smart->smart_class->show(obj); // This calls object's smart_show() method. e.g) _ewk_tiled_backing_store_smart_show()
     }
   if (obj->cur.visible)
     {
        return;
     }
   obj->cur.visible = 1; // This will set the visibility of object and it is used by evas_object_visible_get() API.
Comment 1 KwangHyuk 2012-01-12 04:11:24 PST
Created attachment 122210 [details]
Patch.
Comment 2 Gyuyoung Kim 2012-01-12 23:23:55 PST
Comment on attachment 122210 [details]
Patch.

Looks OK. :-)
Comment 3 Nikolas Zimmermann 2012-01-13 02:04:27 PST
Comment on attachment 122210 [details]
Patch.

r=me.
Comment 4 WebKit Review Bot 2012-01-13 03:25:22 PST
Comment on attachment 122210 [details]
Patch.

Clearing flags on attachment: 122210

Committed r104915: <http://trac.webkit.org/changeset/104915>
Comment 5 WebKit Review Bot 2012-01-13 03:25:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Raphael Kubo da Costa (:rakuco) 2012-01-13 07:39:54 PST
Comment on attachment 122210 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=122210&action=review

> Source/WebKit/efl/ChangeLog:10
> +        Using of evas_object_visible_get() API can't gurantee the correctness of
> +        evas_object's visible status if it's called inside of evas_object's
> +        smart_show() method.

This sounds weird. What kind of problems were you having, and couldn't they be solved if you call the parent show/hide functions in your smart_{show,hide} _before_ the functions enabling/disabling rendering?
Comment 7 KwangHyuk 2012-01-15 16:59:51 PST
(In reply to comment #6)
> (From update of attachment 122210 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=122210&action=review
> 
> > Source/WebKit/efl/ChangeLog:10
> > +        Using of evas_object_visible_get() API can't gurantee the correctness of
> > +        evas_object's visible status if it's called inside of evas_object's
> > +        smart_show() method.
> 
> This sounds weird. What kind of problems were you having, and couldn't they be solved if you call the parent show/hide functions in your smart_{show,hide} _before_ the functions enabling/disabling rendering?

for example, If any API which is using evas_object_visible_getUI provide unexpected behavior if it would be called inside of smart_show api.

I had already checked the case you suggested too, but it wasn't effective  either. but, let me check it one more time.
Comment 8 KwangHyuk 2012-01-15 23:27:58 PST
(In reply to comment #6)
> (From update of attachment 122210 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=122210&action=review
> 
> > Source/WebKit/efl/ChangeLog:10
> > +        Using of evas_object_visible_get() API can't gurantee the correctness of
> > +        evas_object's visible status if it's called inside of evas_object's
> > +        smart_show() method.
> 
> This sounds weird. What kind of problems were you having, and couldn't they be solved if you call the parent show/hide functions in your smart_{show,hide} _before_ the functions enabling/disabling rendering?

Double check was done.
No significant effect from change calling position of parent show/hide function.

I have also checked the return value as follows.

static void _ewk_tiled_backing_store_smart_show(Evas_Object* ewkBackingStore)
{
    printf("visible =  %d in \n",evas_object_visible_get(ewkBackingStore));
    ewk_tiled_backing_store_enable_render(ewkBackingStore);
    _parent_sc.show(ewkBackingStore);
    printf("visible =  %d out \n",evas_object_visible_get(ewkBackingStore));
}

AFAIK, as parent's methods are just for smart clipped, it calls evas_object_smart_clipped_smart_show() or hide().
Comment 9 Raphael Kubo da Costa (:rakuco) 2012-01-16 05:26:54 PST
(In reply to comment #8)
> I have also checked the return value as follows.
> 
> static void _ewk_tiled_backing_store_smart_show(Evas_Object* ewkBackingStore)
> {
>     printf("visible =  %d in \n",evas_object_visible_get(ewkBackingStore));
>     ewk_tiled_backing_store_enable_render(ewkBackingStore);
>     _parent_sc.show(ewkBackingStore);
>     printf("visible =  %d out \n",evas_object_visible_get(ewkBackingStore));
> }

Hmm, the problem is that this is called from evas_object_show() before it sets its own `cur.visible' to 1. If these functions which have been patched are indeed called from the smart_show function, the flag added by the patch is probably needed. Thanks for the details.