WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
105846
[WK2][EFL] Add guard around NativeWebTouchEvent
https://bugs.webkit.org/show_bug.cgi?id=105846
Summary
[WK2][EFL] Add guard around NativeWebTouchEvent
Seokju Kwon
Reported
2012-12-28 21:05:22 PST
Build breaks when TOUCH_EVENTS is disabled. Source/WebKit2/Shared/NativeWebTouchEvent.h:41:50: error: expected class-name before ‘{’ token
Attachments
Patch
(1.16 KB, patch)
2012-12-28 21:11 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(1.65 KB, patch)
2013-01-08 15:30 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(1.65 KB, patch)
2013-01-08 15:37 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(1.18 KB, patch)
2013-01-09 01:46 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(1.46 KB, patch)
2013-01-09 22:26 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Patch
(1.46 KB, patch)
2013-01-09 22:36 PST
,
Seokju Kwon
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Seokju Kwon
Comment 1
2012-12-28 21:11:40 PST
Created
attachment 180913
[details]
Patch
Benjamin Poulain
Comment 2
2013-01-07 12:05:16 PST
Comment on
attachment 180913
[details]
Patch With a few exceptions, the feature #ifdef should be on the #include side, not in the header. Why is this case different?
Seokju Kwon
Comment 3
2013-01-07 15:42:03 PST
(In reply to
comment #2
)
> (From update of
attachment 180913
[details]
) > With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > Why is this case different?
NativeWebTouchEvent was derived from WebTouchEvent. But it is around ENABLE(TOUCH_EVENTS) in header file (WebEvent.h). It seems that build breaks when TOUCH_EVENTS is disabled.
Benjamin Poulain
Comment 4
2013-01-07 16:33:56 PST
(In reply to
comment #3
)
> (In reply to
comment #2
) > > (From update of
attachment 180913
[details]
[details]) > > With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > > > Why is this case different? > > NativeWebTouchEvent was derived from WebTouchEvent. But it is around ENABLE(TOUCH_EVENTS) in header file (WebEvent.h). > It seems that build breaks when TOUCH_EVENTS is disabled.
I understand that. But why #ifdef the header instead of in the code where the header is included?
Seokju Kwon
Comment 5
2013-01-07 18:35:59 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (In reply to
comment #2
) > > > (From update of
attachment 180913
[details]
[details] [details]) > > > With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > > > > > Why is this case different? > > > > NativeWebTouchEvent was derived from WebTouchEvent. But it is around ENABLE(TOUCH_EVENTS) in header file (WebEvent.h). > > It seems that build breaks when TOUCH_EVENTS is disabled. > > I understand that. But why #ifdef the header instead of in the code where the header is included?
Sorry, I was confused. I will upload a new patch.
Seokju Kwon
Comment 6
2013-01-08 15:30:37 PST
Created
attachment 181787
[details]
Patch
Seokju Kwon
Comment 7
2013-01-08 15:37:44 PST
Created
attachment 181790
[details]
Patch
Benjamin Poulain
Comment 8
2013-01-08 15:52:24 PST
Comment on
attachment 181790
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181790&action=review
> Source/WebKit2/ChangeLog:8 > + Add TOUCH_EVENTS guard.
Please add a sentence to say this fixes EFL build without TOUCH_EVENTS.
> Source/WebKit2/Shared/qt/NativeWebTouchEventQt.cpp:29 > +#if ENABLE(TOUCH_EVENTS) > #include "NativeWebTouchEvent.h" > +#endif
This is not correct for Qt. For performance reason, Qt exclude such files through the project file. In this case, NativeWebTouchEventQt.cpp is excluded from Target.pri if TOUCH_EVENTS is not defined.
Gyuyoung Kim
Comment 9
2013-01-08 21:29:48 PST
Comment on
attachment 181790
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181790&action=review
> Source/WebKit2/ChangeLog:3 > + Add guard around NativeWebTouchEvent
It would be good if you add [WK2][EFL][QT] prefix.
Seokju Kwon
Comment 10
2013-01-09 01:46:14 PST
Created
attachment 181876
[details]
Patch
Gyuyoung Kim
Comment 11
2013-01-09 02:45:04 PST
Comment on
attachment 181876
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181876&action=review
> Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:27 > +#if ENABLE(TOUCH_EVENTS)
NativeWebTouchEventEfl.cpp already uses this guard. I think this build break occurs because NativeWebTouchEvent.h doesn't use the guard. I think it would be good to add this guard to NativeWebTouchEvent.h.
Benjamin Poulain
Comment 12
2013-01-09 09:39:00 PST
Comment on
attachment 181876
[details]
Patch (In reply to
comment #11
)
> (From update of
attachment 181876
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=181876&action=review
> > > Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:27 > > +#if ENABLE(TOUCH_EVENTS) > > NativeWebTouchEventEfl.cpp already uses this guard.
You can just move that guard up under the #include of config.h.
> I think this build break occurs because NativeWebTouchEvent.h doesn't use the guard. I think it would be good to add this guard to NativeWebTouchEvent.h.
See my previous comments.
Gyuyoung Kim
Comment 13
2013-01-09 22:05:16 PST
(In reply to
comment #12
)
> (From update of
attachment 181876
[details]
) > (In reply to
comment #11
) > > (From update of
attachment 181876
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=181876&action=review
> > > > > Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:27 > > > +#if ENABLE(TOUCH_EVENTS) > > > > NativeWebTouchEventEfl.cpp already uses this guard. > > You can just move that guard up under the #include of config.h.
Seokju, please do that. Then, I will set cq+.
> > I think this build break occurs because NativeWebTouchEvent.h doesn't use the guard. I think it would be good to add this guard to NativeWebTouchEvent.h. > > See my previous comments.
>> With a few exceptions, the feature #ifdef should be on the #include side, not in the header.
I have no strong opinion on this, but it seems to me #ifdef has been using in header in many places. For example, Modules sub-directories. But, I don't wanna object your opinion.
Seokju Kwon
Comment 14
2013-01-09 22:25:55 PST
(In reply to
comment #13
)
> (In reply to
comment #12
) > > (From update of
attachment 181876
[details]
[details]) > > (In reply to
comment #11
) > > > (From update of
attachment 181876
[details]
[details] [details]) > > > View in context:
https://bugs.webkit.org/attachment.cgi?id=181876&action=review
> > > > > > > Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:27 > > > > +#if ENABLE(TOUCH_EVENTS) > > > > > > NativeWebTouchEventEfl.cpp already uses this guard. > > > > You can just move that guard up under the #include of config.h. > > Seokju, please do that. Then, I will set cq+. > > > > I think this build break occurs because NativeWebTouchEvent.h doesn't use the guard. I think it would be good to add this guard to NativeWebTouchEvent.h. > > > > See my previous comments. > > >> With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > I have no strong opinion on this, but it seems to me #ifdef has been using in header in many places. For example, Modules sub-directories. But, I don't wanna object your opinion.
Ok, Thanks.
Seokju Kwon
Comment 15
2013-01-09 22:26:38 PST
Created
attachment 182066
[details]
Patch
Gyuyoung Kim
Comment 16
2013-01-09 22:29:20 PST
Comment on
attachment 182066
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=182066&action=review
> Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:26 > #include "config.h"
I prefer to add a new line below config.h, if possible.
Seokju Kwon
Comment 17
2013-01-09 22:36:08 PST
Created
attachment 182068
[details]
Patch
Benjamin Poulain
Comment 18
2013-01-09 22:48:25 PST
> >> With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > I have no strong opinion on this, but it seems to me #ifdef has been using in header in many places. For example, Modules sub-directories. But, I don't wanna object your opinion.
You are right, I am thinking of touch events header in particular. If I am not mistaken, those use the style I mentioned above (right?). For me the difference ties into a feature in development, and optional features like touch events. (In reply to
comment #16
)
> > Source/WebKit2/Shared/efl/NativeWebTouchEventEfl.cpp:26 > > #include "config.h" > > I prefer to add a new line below config.h, if possible.
+1 :)
WebKit Review Bot
Comment 19
2013-01-09 23:08:40 PST
Comment on
attachment 182068
[details]
Patch Clearing flags on attachment: 182068 Committed
r139287
: <
http://trac.webkit.org/changeset/139287
>
WebKit Review Bot
Comment 20
2013-01-09 23:08:45 PST
All reviewed patches have been landed. Closing bug.
Gyuyoung Kim
Comment 21
2013-01-09 23:17:24 PST
(In reply to
comment #18
)
> > >> With a few exceptions, the feature #ifdef should be on the #include side, not in the header. > > > > I have no strong opinion on this, but it seems to me #ifdef has been using in header in many places. For example, Modules sub-directories. But, I don't wanna object your opinion. > > You are right, I am thinking of touch events header in particular. If I am not mistaken, those use the style I mentioned above (right?). > > For me the difference ties into a feature in development, and optional features like touch events.
It looks there is no rule for this. However, I prefer to tie .h and .cpp together with #ifdef guard personally if there is #ifdef guard for those files. I think it will prevent unexpected build break on other ports. But, I'm not sure if this should become one of coding style.
Michael Catanzaro
Comment 22
2017-03-11 10:39:18 PST
Closing this bug because the EFL port has been removed from trunk. If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.
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