Page MenuHomePhabricator

elementary: only apply text when the object is not invalidated and dying.
ClosedPublic

Authored by cedric on Mar 14 2019, 2:29 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Mar 14 2019, 2:29 PM
cedric requested review of this revision.Mar 14 2019, 2:29 PM

Would be nice if the commit message explained WHY this is needed (what is the problem being fixed). Otherwise, reviewers will have a hard time figuring out how to check this. That's the reason for the "Test plan" section.

cedric updated this revision to Diff 20651.Mar 15 2019, 5:01 PM
cedric added a reviewer: YOhoho.

Rebase.

bu5hm4n requested changes to this revision.Mar 16 2019, 12:51 PM

I am nearly 100% sure that this breaks behavior. We use elm_layout_text_set before finalize is called, but the theme is maybe already set, so we want to call elm_layout_text_set on it...

This revision now requires changes to proceed.Mar 16 2019, 12:51 PM

I am nearly 100% sure that this breaks behavior. We use elm_layout_text_set before finalize is called, but the theme is maybe already set, so we want to call elm_layout_text_set on it...

It is my understanding that it is not safe to call text_set while the object is not finalized and it is also a bad idea to call it when it is invalidating. So I am not sure what kind of break you are thinking about?

Tbh. i am confused *when* its legal and *when* its not. Because right now, this function is always executed at a time where the layout object is *not* finalized. (Check _efl_ui_progressbar_efl_ui_widget_theme_apply for example) So this would break that right now AFAICS.

Tbh. i am confused *when* its legal and *when* its not. Because right now, this function is always executed at a time where the layout object is *not* finalized. (Check _efl_ui_progressbar_efl_ui_widget_theme_apply for example) So this would break that right now AFAICS.

Hum, indeed. That was not supposed to work :-D Fun if it is, will have to look and understand why. Will do that next week. I don't have much time today and none until Wednesday.

I think you are right. It seems that for legacy we should be able to apply text before finalize. Going to be fun! Will adjust patch to be only for invalidating and after.

cedric planned changes to this revision.Mar 20 2019, 10:58 AM
cedric updated this revision to Diff 20814.Mar 20 2019, 11:36 AM
cedric retitled this revision from elementary: only apply text when the object is still alive. to elementary: only apply text when the object is not invalidated and dying..
cedric edited the summary of this revision. (Show Details)

Rebase and correct.

bu5hm4n accepted this revision.Mar 21 2019, 2:37 AM

I wait for the day we get a bug report "But i wanted to set text while the object was beeing deleted! I used that to safe a string Plz fix!"

This revision is now accepted and ready to land.Mar 21 2019, 2:37 AM
cedric updated this revision to Diff 21001.Mar 27 2019, 2:38 PM

Rebase.

This revision was automatically updated to reflect the committed changes.