WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71433
[EFL] Use standard boolean data type.
https://bugs.webkit.org/show_bug.cgi?id=71433
Summary
[EFL] Use standard boolean data type.
Gyuyoung Kim
Reported
2011-11-02 19:01:15 PDT
This is a fourth step in order to be more compliant with WebKit coding style. Use standard boolean data type instead of efl boolean data type. It makes efl port is more close to webkit coding style. In addition, GTK port is also using standard boolean type despite header files are using "gboolean" type.
Attachments
Patch
(156.16 KB, patch)
2011-11-02 19:03 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(173.60 KB, patch)
2011-11-02 21:25 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(173.59 KB, patch)
2011-11-02 21:51 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(5.67 KB, patch)
2011-11-15 02:39 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2011-11-02 19:03:12 PDT
Created
attachment 113419
[details]
Patch
Gyuyoung Kim
Comment 2
2011-11-02 19:05:33 PDT
CC'ing kenneth, tonikitoo, kubo, leandro, ryuan.
Raphael Kubo da Costa (:rakuco)
Comment 3
2011-11-02 19:40:21 PDT
Comment on
attachment 113419
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=113419&action=review
> Source/WebKit/efl/ewk/ewk_contextmenu.cpp:259 > Eina_Bool ewk_context_menu_free(Ewk_Context_Menu* menu)
Internal functions such as this one could have their return type changed to bool as well.
Gyuyoung Kim
Comment 4
2011-11-02 21:25:15 PDT
Created
attachment 113428
[details]
Patch
Gyuyoung Kim
Comment 5
2011-11-02 21:26:00 PDT
(In reply to
comment #3
)
> (From update of
attachment 113419
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=113419&action=review
> > > Source/WebKit/efl/ewk/ewk_contextmenu.cpp:259 > > Eina_Bool ewk_context_menu_free(Ewk_Context_Menu* menu) > > Internal functions such as this one could have their return type changed to bool as well.
Ok, I change return type with bool for internal functions.
Ryuan Choi
Comment 6
2011-11-02 21:42:52 PDT
Comment on
attachment 113428
[details]
Patch I think that we also change Eina_Bool in static functions which start to "_ewk_XXX" View in context:
https://bugs.webkit.org/attachment.cgi?id=113428&action=review
> Source/WebKit/efl/ewk/ewk_frame.cpp:469 > - EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, EINA_FALSE); > + EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, false);
Although this bug is for fixing style issue, this should be 0.
Gyuyoung Kim
Comment 7
2011-11-02 21:51:39 PDT
Created
attachment 113429
[details]
Patch
Gyuyoung Kim
Comment 8
2011-11-02 21:52:39 PDT
(In reply to
comment #6
)
> (From update of
attachment 113428
[details]
) > I think that we also change Eina_Bool in static functions which start to "_ewk_XXX" > > View in context:
https://bugs.webkit.org/attachment.cgi?id=113428&action=review
> > > Source/WebKit/efl/ewk/ewk_frame.cpp:469 > > - EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, EINA_FALSE); > > + EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, false); > > Although this bug is for fixing style issue, this should be 0.
Yes, right. it is fixed.
Grzegorz Czajkowski
Comment 9
2011-11-03 00:41:43 PDT
You didn't update any public header files of WebKit-EFL. Present documentation describes that API returns EINA_TRUE or EINA_FALSE not true or false. Please update header files too.
Gyuyoung Kim
Comment 10
2011-11-03 03:35:34 PDT
(In reply to
comment #9
)
> You didn't update any public header files of WebKit-EFL. Present documentation describes that API returns EINA_TRUE or EINA_FALSE not true or false. > Please update header files too.
I'm not sure if we should change the return type in documentation. Is it better to know return type is *Eina_Bool* type instead of *bool* ?
Grzegorz Czajkowski
Comment 11
2011-11-03 04:41:34 PDT
(In reply to
comment #10
)
> (In reply to
comment #9
) > > You didn't update any public header files of WebKit-EFL. Present documentation describes that API returns EINA_TRUE or EINA_FALSE not true or false. > > Please update header files too. > > I'm not sure if we should change the return type in documentation. Is it better to know return type is *Eina_Bool* type instead of *bool* ?
You've already changed documentation of private functions by replacing EINA_TRUE/EINA_FALSE to true/false. I think we should consistently update API documentation too.
Gyuyoung Kim
Comment 12
2011-11-03 05:29:09 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > (In reply to
comment #9
) > > > You didn't update any public header files of WebKit-EFL. Present documentation describes that API returns EINA_TRUE or EINA_FALSE not true or false. > > > Please update header files too. > > > > I'm not sure if we should change the return type in documentation. Is it better to know return type is *Eina_Bool* type instead of *bool* ? > > You've already changed documentation of private functions by replacing EINA_TRUE/EINA_FALSE to true/false. I think we should consistently update API documentation too.
Hmm, it seems it can make confusion when we add new APIs or internal functions. However, we can't change efl style with webkit style in public headers. Thus, I think it is difficult to change Eina_Bool of documentation with true/false. Because, I think efl application developers refer to public headers basically. But, in internal function case, that is used by webkit efl port developers. So, I think it is better to keep Eina_Bool in documentation of public headers. I'd like to know other guys opinions.
Raphael Kubo da Costa (:rakuco)
Comment 13
2011-11-03 05:46:14 PDT
(In reply to
comment #12
)
> Hmm, it seems it can make confusion when we add new APIs or internal functions. However, we can't change efl style with webkit style in public headers. Thus, I think it is difficult to change Eina_Bool of documentation with true/false. Because, I think efl application developers refer to public headers basically. But, in internal function case, that is used by webkit efl port developers. So, I think it is better to keep Eina_Bool in documentation of public headers. I'd like to know other guys opinions.
Yes. Just like the public headers still have "Evas_Object *o", I think they should keep things familiar to the EFL users who are going to use the API -- whether we use bools or Eina_Bools, or the coding style we use internally should be transparent.
Raphael Kubo da Costa (:rakuco)
Comment 14
2011-11-03 05:48:32 PDT
LGTM.
Ryuan Choi
Comment 15
2011-11-03 20:29:16 PDT
Looks good to me, too.
Zoltan Herczeg
Comment 16
2011-11-04 01:39:29 PDT
Comment on
attachment 113429
[details]
Patch Nice work! r=me
WebKit Review Bot
Comment 17
2011-11-04 01:53:39 PDT
Comment on
attachment 113429
[details]
Patch Clearing flags on attachment: 113429 Committed
r99268
: <
http://trac.webkit.org/changeset/99268
>
WebKit Review Bot
Comment 18
2011-11-04 01:53:47 PDT
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 19
2011-11-15 02:39:01 PST
Created
attachment 115132
[details]
Patch
Gyuyoung Kim
Comment 20
2011-11-15 02:40:03 PST
I missed to change *Eina_Bool* in internal struct. So, I re-open this bug.
Raphael Kubo da Costa (:rakuco)
Comment 21
2011-11-15 05:56:49 PST
LGTM, just not sure if it's better to reopen this one or open a new bug.
Xan Lopez
Comment 22
2011-11-16 09:38:40 PST
Comment on
attachment 115132
[details]
Patch This looks fine but you really need to open a new bug for it. CC me and I'll r+ it.
Xan Lopez
Comment 23
2011-11-16 09:38:52 PST
Closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug