Title: [127390] trunk/Source/WebKit2
Revision
127390
Author
[email protected]
Date
2012-09-02 10:43:52 -0700 (Sun, 02 Sep 2012)

Log Message

[EFL] Add missing semicolon at the end of some lines.
https://bugs.webkit.org/show_bug.cgi?id=95640

Patch by Byungwoo Lee <[email protected]> on 2012-09-02
Reviewed by Gyuyoung Kim.

EWK_VIEW_PRIV_GET_OR_RETURN macro and other related macro can be used
without semicolon, because it ends with a semicolon or complete block.
This can make a human mistake about missing semicolon.

Fixed the macros to require semicolon, and added missing semicolons.

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_focus_in):
(_ewk_view_smart_focus_out):
(_ewk_view_smart_mouse_wheel):
(_ewk_view_smart_mouse_down):
(_ewk_view_smart_mouse_up):
(_ewk_view_smart_mouse_move):
(_ewk_view_smart_key_down):
(_ewk_view_smart_key_up):
(_ewk_view_initialize):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (127389 => 127390)


--- trunk/Source/WebKit2/ChangeLog	2012-09-02 17:09:26 UTC (rev 127389)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-02 17:43:52 UTC (rev 127390)
@@ -1,3 +1,27 @@
+2012-09-02  Byungwoo Lee  <[email protected]>
+
+        [EFL] Add missing semicolon at the end of some lines.
+        https://bugs.webkit.org/show_bug.cgi?id=95640
+
+        Reviewed by Gyuyoung Kim.
+
+        EWK_VIEW_PRIV_GET_OR_RETURN macro and other related macro can be used
+        without semicolon, because it ends with a semicolon or complete block.
+        This can make a human mistake about missing semicolon.
+
+        Fixed the macros to require semicolon, and added missing semicolons.
+
+        * UIProcess/API/efl/ewk_view.cpp:
+        (_ewk_view_smart_focus_in):
+        (_ewk_view_smart_focus_out):
+        (_ewk_view_smart_mouse_wheel):
+        (_ewk_view_smart_mouse_down):
+        (_ewk_view_smart_mouse_up):
+        (_ewk_view_smart_mouse_move):
+        (_ewk_view_smart_key_down):
+        (_ewk_view_smart_key_up):
+        (_ewk_view_initialize):
+
 2012-09-01  Sam Weinig  <[email protected]>
 
         Remove unused member variable from WebProcess.

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (127389 => 127390)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-09-02 17:09:26 UTC (rev 127389)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-09-02 17:43:52 UTC (rev 127390)
@@ -163,15 +163,17 @@
     EWK_VIEW_TYPE_CHECK(ewkView, _tmp_result);                                 \
     Ewk_View_Smart_Data* smartData = 0;                                        \
     if (_tmp_result)                                                           \
-        smartData = (Ewk_View_Smart_Data*)evas_object_smart_data_get(ewkView);
+        smartData = (Ewk_View_Smart_Data*)evas_object_smart_data_get(ewkView)
 
 #define EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, ...)                     \
     EWK_VIEW_SD_GET(ewkView, smartData);                                       \
-    if (!smartData) {                                                          \
-        EINA_LOG_CRIT("no smart data for object %p (%s)",                      \
-                 ewkView, evas_object_type_get(ewkView));                      \
-        return __VA_ARGS__;                                                    \
-    }
+    do {                                                                       \
+        if (!smartData) {                                                      \
+            EINA_LOG_CRIT("no smart data for object %p (%s)",                  \
+                     ewkView, evas_object_type_get(ewkView));                  \
+            return __VA_ARGS__;                                                \
+        }                                                                      \
+    } while (0)
 
 #define EWK_VIEW_PRIV_GET(smartData, priv)                                     \
     Ewk_View_Private_Data* priv = smartData->priv
@@ -182,11 +184,13 @@
         return __VA_ARGS__;                                                    \
     }                                                                          \
     EWK_VIEW_PRIV_GET(smartData, priv);                                        \
-    if (!priv) {                                                               \
-        EINA_LOG_CRIT("no private data for object %p (%s)",                    \
-                 smartData->self, evas_object_type_get(smartData->self));      \
-        return __VA_ARGS__;                                                    \
-    }
+    do {                                                                       \
+        if (!priv) {                                                           \
+            EINA_LOG_CRIT("no private data for object %p (%s)",                \
+                     smartData->self, evas_object_type_get(smartData->self));  \
+            return __VA_ARGS__;                                                \
+        }                                                                      \
+    } while (0)
 
 static void _ewk_view_smart_changed(Ewk_View_Smart_Data* smartData)
 {
@@ -199,7 +203,7 @@
 // Default Event Handling.
 static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     priv->pageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
     return true;
@@ -207,7 +211,7 @@
 
 static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     priv->pageProxy->viewStateDidChange(WebPageProxy::ViewIsFocused | WebPageProxy::ViewWindowIsActive);
     return true;
@@ -215,7 +219,7 @@
 
 static Eina_Bool _ewk_view_smart_mouse_wheel(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Wheel* wheelEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Evas_Point position = {smartData->view.x, smartData->view.y};
     priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(wheelEvent, &position));
@@ -224,7 +228,7 @@
 
 static Eina_Bool _ewk_view_smart_mouse_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Down* downEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Evas_Point position = {smartData->view.x, smartData->view.y};
     priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(downEvent, &position));
@@ -233,7 +237,7 @@
 
 static Eina_Bool _ewk_view_smart_mouse_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Up* upEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Evas_Point position = {smartData->view.x, smartData->view.y};
     priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(upEvent, &position));
@@ -242,7 +246,7 @@
 
 static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Move* moveEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     Evas_Point position = {smartData->view.x, smartData->view.y};
     priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(moveEvent, &position));
@@ -251,7 +255,7 @@
 
 static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Down* downEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent));
     return true;
@@ -259,7 +263,7 @@
 
 static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Up* upEvent)
 {
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
 
     priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
     return true;
@@ -673,7 +677,7 @@
 static void _ewk_view_initialize(Evas_Object* ewkView, Ewk_Context* context, WKPageGroupRef pageGroupRef)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     EINA_SAFETY_ON_NULL_RETURN(context);
 
     if (priv->pageClient)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to