Title: [106908] trunk/Source/WebKit/efl
Revision
106908
Author
[email protected]
Date
2012-02-06 23:22:36 -0800 (Mon, 06 Feb 2012)

Log Message

[EFL] Define to prevent a single backing-store application from calling the tiled view function.
https://bugs.webkit.org/show_bug.cgi?id=77842

Patch by JungJik Lee <[email protected]> on 2012-02-06
Reviewed by Andreas Kling.

The define prevents an application using single backing store from calling tiled cache function.
The tiled APIs opened to outer should check the view type before being called.

* ewk/ewk_private.h:
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(ewk_view_frame_view_creation_notify):
* ewk/ewk_view_tiled.cpp:
(ewk_view_tiled_unused_cache_get):
(ewk_view_tiled_unused_cache_set):

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (106907 => 106908)


--- trunk/Source/WebKit/efl/ChangeLog	2012-02-07 07:09:28 UTC (rev 106907)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-02-07 07:22:36 UTC (rev 106908)
@@ -1,5 +1,23 @@
 2012-02-06  JungJik Lee  <[email protected]>
 
+        [EFL] Define to prevent a single backing-store application from calling the tiled view function.
+        https://bugs.webkit.org/show_bug.cgi?id=77842
+
+        Reviewed by Andreas Kling.
+
+        The define prevents an application using single backing store from calling tiled cache function.
+        The tiled APIs opened to outer should check the view type before being called.
+
+        * ewk/ewk_private.h:
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (ewk_view_frame_view_creation_notify):
+        * ewk/ewk_view_tiled.cpp:
+        (ewk_view_tiled_unused_cache_get):
+        (ewk_view_tiled_unused_cache_set):
+
+2012-02-06  JungJik Lee  <[email protected]>
+
         [EFL] Adopt C++ style using camelCase and full variable names.
         https://bugs.webkit.org/show_bug.cgi?id=76378
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_private.h (106907 => 106908)


--- trunk/Source/WebKit/efl/ewk/ewk_private.h	2012-02-07 07:09:28 UTC (rev 106907)
+++ trunk/Source/WebKit/efl/ewk/ewk_private.h	2012-02-07 07:22:36 UTC (rev 106908)
@@ -62,6 +62,13 @@
 const char ewkViewTiledName[] = "Ewk_View_Tiled";
 const char ewkViewSingleName[] = "Ewk_View_Single";
 
+// Define to prevent an application using different view type from calling the function.
+#define EWK_VIEW_TYPE_CHECK_OR_RETURN(ewkView, viewName, ...) \
+    if (!evas_object_smart_type_check(ewkView, viewName)) { \
+        INF("ewkView isn't an instance of %s", viewName); \
+        return __VA_ARGS__; \
+    }
+
 // forward declarations
 namespace WebCore {
 struct PopupMenuClient;

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (106907 => 106908)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-02-07 07:09:28 UTC (rev 106907)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2012-02-07 07:22:36 UTC (rev 106908)
@@ -266,12 +266,6 @@
         return __VA_ARGS__; \
     }
 
-#define EWK_VIEW_TILED_TYPE_CHECK_OR_RETURN(ewkView, ...) \
-    if (!evas_object_smart_type_check(ewkView, ewkViewTiledName)) { \
-        INF("object isn't an instance of %s", ewkViewTiledName); \
-        return __VA_ARGS__; \
-    }
-
 static void _ewk_view_smart_changed(Ewk_View_Smart_Data* smartData)
 {
     if (smartData->changed.any)
@@ -3216,7 +3210,7 @@
  */
 void ewk_view_frame_view_creation_notify(Evas_Object* ewkView)
 {
-    EWK_VIEW_TILED_TYPE_CHECK_OR_RETURN(ewkView);
+    EWK_VIEW_TYPE_CHECK_OR_RETURN(ewkView, ewkViewTiledName);
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     ewk_frame_paint_full_set(smartData->main_frame, true);
 }

Modified: trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp (106907 => 106908)


--- trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp	2012-02-07 07:09:28 UTC (rev 106907)
+++ trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp	2012-02-07 07:22:36 UTC (rev 106908)
@@ -392,6 +392,7 @@
 
 Ewk_Tile_Unused_Cache* ewk_view_tiled_unused_cache_get(const Evas_Object* ewkView)
 {
+    EWK_VIEW_TYPE_CHECK_OR_RETURN(ewkView, ewkViewTiledName, 0);
     Ewk_View_Smart_Data* smartData = ewk_view_smart_data_get(ewkView);
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData, 0);
     return ewk_tiled_backing_store_tile_unused_cache_get(smartData->backing_store);
@@ -399,6 +400,7 @@
 
 void ewk_view_tiled_unused_cache_set(Evas_Object* ewkView, Ewk_Tile_Unused_Cache* cache)
 {
+    EWK_VIEW_TYPE_CHECK_OR_RETURN(ewkView, ewkViewTiledName);
     Ewk_View_Smart_Data* smartData = ewk_view_smart_data_get(ewkView);
     EINA_SAFETY_ON_NULL_RETURN(smartData);
     ewk_tiled_backing_store_tile_unused_cache_set(smartData->backing_store, cache);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to