[EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 May 2013 12:30:01 +0000 (12:30 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 May 2013 12:30:01 +0000 (12:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116657

Reviewed by Christophe Dumez.

WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
ewk_view_pagination_mode_set|get.

Besides we don't need to use WebCore namespace anymore.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_pagination_mode_set):
(ewk_view_pagination_mode_get):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

index 6e677a1..c31f4ab 100644 (file)
@@ -1,3 +1,19 @@
+2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
+        https://bugs.webkit.org/show_bug.cgi?id=116657
+
+        Reviewed by Christophe Dumez.
+
+        WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
+        ewk_view_pagination_mode_set|get.
+
+        Besides we don't need to use WebCore namespace anymore.
+
+        * UIProcess/API/efl/ewk_view.cpp:
+        (ewk_view_pagination_mode_set):
+        (ewk_view_pagination_mode_get):
+
 2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>
 
         Support frame instrumentation for coordinated graphics
index d802e50..9c2aded 100644 (file)
@@ -57,7 +57,6 @@
 #endif
 
 using namespace WebKit;
-using namespace WebCore;
 
 static inline EwkView* toEwkViewChecked(const Evas_Object* evasObject)
 {
@@ -497,18 +496,18 @@ Eina_Bool ewk_view_inspector_close(Evas_Object* ewkView)
 #endif
 }
 
-// Ewk_Pagination_Mode should be matched up orders with WebCore::Pagination::Mode.
-COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_UNPAGINATED, WebCore::Pagination::Unpaginated);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_LEFT_TO_RIGHT, WebCore::Pagination::LeftToRightPaginated);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_RIGHT_TO_LEFT, WebCore::Pagination::RightToLeftPaginated);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_TOP_TO_BOTTOM, WebCore::Pagination::TopToBottomPaginated);
-COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_BOTTOM_TO_TOP, WebCore::Pagination::BottomToTopPaginated);
+// Ewk_Pagination_Mode should be matched up orders with WKPaginationMode.
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_UNPAGINATED, kWKPaginationModeUnpaginated);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_LEFT_TO_RIGHT, kWKPaginationModeLeftToRight);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_RIGHT_TO_LEFT, kWKPaginationModeRightToLeft);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_TOP_TO_BOTTOM, kWKPaginationModeTopToBottom);
+COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_BOTTOM_TO_TOP, kWKPaginationModeBottomToTop);
 
 Eina_Bool ewk_view_pagination_mode_set(Evas_Object* ewkView, Ewk_Pagination_Mode mode)
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
-    // FIXME: move to exported C WKPage API when it appears.
-    toImpl(impl->wkPage())->setPaginationMode(static_cast<WebCore::Pagination::Mode>(mode));
+
+    WKPageSetPaginationMode(impl->wkPage(), static_cast<WKPaginationMode>(mode));
 
     return true;
 }
@@ -516,8 +515,8 @@ Eina_Bool ewk_view_pagination_mode_set(Evas_Object* ewkView, Ewk_Pagination_Mode
 Ewk_Pagination_Mode ewk_view_pagination_mode_get(const Evas_Object* ewkView)
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EWK_PAGINATION_MODE_INVALID);
-    // FIXME: move to exported C WKPage API when it appears.
-    return static_cast<Ewk_Pagination_Mode>(toImpl(impl->wkPage())->paginationMode());
+    
+    return static_cast<Ewk_Pagination_Mode>(WKPageGetPaginationMode(impl->wkPage()));
 }
 
 Eina_Bool ewk_view_fullscreen_exit(Evas_Object* ewkView)