Bug 105267 - [EFL] Add guard around ContextMenuItemTagInspectElement
Summary: [EFL] Add guard around ContextMenuItemTagInspectElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 01:58 PST by Seokju Kwon
Modified: 2012-12-21 06:52 PST (History)
4 users (show)

See Also:


Attachments
Patch (5.69 KB, patch)
2012-12-18 06:22 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (4.09 KB, patch)
2012-12-21 06:28 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seokju Kwon 2012-12-18 01:58:34 PST
Need INSPECTOR guard for using ContextMenuItemTagInspectElement.
Comment 1 Seokju Kwon 2012-12-18 06:22:51 PST
Created attachment 179930 [details]
Patch
Comment 2 Thiago Marcos P. Santos 2012-12-19 01:53:33 PST
Comment on attachment 179930 [details]
Patch

LGTM.
Comment 3 Ryosuke Niwa 2012-12-19 21:59:56 PST
Comment on attachment 179930 [details]
Patch

rs=me.
Comment 4 Gyuyoung Kim 2012-12-19 22:06:56 PST
Comment on attachment 179930 [details]
Patch

Sorry for free cq+. I would like to check if we can use ENABLE_XXX macro in public header a little further.
Comment 5 Gyuyoung Kim 2012-12-19 22:28:55 PST
Comment on attachment 179930 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_context_menu_item.h:118
> +#if defined ENABLE_INSPECTOR && ENABLE_INSPECTOR

If app want to use this INSPECT_ELEMENT type, app should define ENABLE_INSPECTOR macro, isn't it ? It looks app should do unnecessary job. I would suggest not to use ENABLE_INSPECTOR macro in public header as chromium port. Chromium port only uses macro in internal implementation. Any other comments ?
Comment 6 Vivek Galatage 2012-12-20 01:14:59 PST
Comment on attachment 179930 [details]
Patch

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

> Source/WebKit/efl/ewk/ewk_contextmenu.h:112
> +#if defined ENABLE_INSPECTOR && ENABLE_INSPECTOR

Wouldn't the use of #if ENABLE(INSPECTOR) do the same thing as above? I think its better to use the ENABLE(INSPECTOR) macro for consistency.
Comment 7 Gyuyoung Kim 2012-12-20 01:22:03 PST
(In reply to comment #6)
> (From update of attachment 179930 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=179930&action=review
> 
> > Source/WebKit/efl/ewk/ewk_contextmenu.h:112
> > +#if defined ENABLE_INSPECTOR && ENABLE_INSPECTOR
> 
> Wouldn't the use of #if ENABLE(INSPECTOR) do the same thing as above? I think its better to use the ENABLE(INSPECTOR) macro for consistency.

ENABLE(XXX) is defined to WTF/wtf/Platform.h. So, application which uses ewk_contextmenu.h should include the Platform.h to use ENABLE(XXX) macro. But, we don't install Platform.h file. We can't use ENABLE() in public header. Beside, as we already talked, to use macro in public header will make unneeded overhead when using public header.
Comment 8 Seokju Kwon 2012-12-21 06:28:24 PST
Created attachment 180512 [details]
Patch
Comment 9 Seokju Kwon 2012-12-21 06:30:33 PST
Comment on attachment 180512 [details]
Patch

No #ifdefs in public header. I have removed them.
Thank you for review :)
Comment 10 WebKit Review Bot 2012-12-21 06:52:39 PST
Comment on attachment 180512 [details]
Patch

Clearing flags on attachment: 180512

Committed r138370: <http://trac.webkit.org/changeset/138370>
Comment 11 WebKit Review Bot 2012-12-21 06:52:43 PST
All reviewed patches have been landed.  Closing bug.