[CoordinatedGraphics][EFL] Remove view_source functions.
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 02:50:50 +0000 (02:50 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Feb 2014 02:50:50 +0000 (02:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128945

Reviewed by Anders Carlsson.

EFL port has been broken since r164254 because of removing view source files in WK2.
This patch is to follow to remove remained view source functions.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/CoordinatedGraphics/WebView.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/CoordinatedGraphics/WKView.cpp
Source/WebKit2/UIProcess/API/C/CoordinatedGraphics/WKView.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.h
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
Tools/MiniBrowser/efl/main.c

index 8200002..5863343 100644 (file)
@@ -1,3 +1,21 @@
+2014-02-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [CoordinatedGraphics][EFL] Remove view_source functions.
+        https://bugs.webkit.org/show_bug.cgi?id=128945
+
+        Reviewed by Anders Carlsson.
+
+        EFL port has been broken since r164254 because of removing view source files in WK2.
+        This patch is to follow to remove remained view source functions.
+
+        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
+        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
+        * UIProcess/API/efl/ewk_view.cpp:
+        * UIProcess/API/efl/ewk_view.h:
+        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
+        * UIProcess/CoordinatedGraphics/WebView.cpp:
+        * UIProcess/CoordinatedGraphics/WebView.h:
+
 2014-02-17  Tim Horton  <timothy_horton@apple.com>
 
         [iOS][wk2] Custom layers are sometimes put on-screen without being parented
index dd12838..b324d26 100644 (file)
@@ -169,16 +169,6 @@ void WKViewResumeActiveDOMObjectsAndAnimations(WKViewRef viewRef)
     toImpl(viewRef)->resumeActiveDOMObjectsAndAnimations();
 }
 
-void WKViewSetShowsAsSource(WKViewRef viewRef, bool flag)
-{
-    toImpl(viewRef)->setShowsAsSource(flag);
-}
-
-bool WKViewGetShowsAsSource(WKViewRef viewRef)
-{
-    return toImpl(viewRef)->showsAsSource();
-}
-
 bool WKViewExitFullScreen(WKViewRef viewRef)
 {
 #if ENABLE(FULLSCREEN_API)
index 616a6e5..3c519b2 100644 (file)
@@ -106,9 +106,6 @@ WK_EXPORT bool WKViewGetDrawsTransparentBackground(WKViewRef);
 WK_EXPORT void WKViewSuspendActiveDOMObjectsAndAnimations(WKViewRef);
 WK_EXPORT void WKViewResumeActiveDOMObjectsAndAnimations(WKViewRef);
 
-WK_EXPORT void WKViewSetShowsAsSource(WKViewRef, bool);
-WK_EXPORT bool WKViewGetShowsAsSource(WKViewRef);
-
 WK_EXPORT bool WKViewExitFullScreen(WKViewRef);
 
 WK_EXPORT void WKViewSetOpacity(WKViewRef view, double opacity);
index 89fc63e..1bc41fc 100644 (file)
@@ -658,22 +658,6 @@ Eina_Bool ewk_view_page_contents_get(const Evas_Object* ewkView, Ewk_Page_Conten
     return true;
 }
 
-Eina_Bool ewk_view_source_mode_set(Evas_Object* ewkView, Eina_Bool enabled)
-{
-    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
-
-    WKViewSetShowsAsSource(impl->wkView(), enabled);
-
-    return true;
-}
-
-Eina_Bool ewk_view_source_mode_get(const Evas_Object* ewkView)
-{
-    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
-
-    return WKViewGetShowsAsSource(impl->wkView());
-}
-
 struct Ewk_View_Script_Execute_Callback_Context {
     Ewk_View_Script_Execute_Callback_Context(Ewk_View_Script_Execute_Cb callback, Evas_Object* ewkView, void* userData)
         : m_callback(callback)
index 4d417f5..1469764 100644 (file)
@@ -867,30 +867,6 @@ EAPI void ewk_view_draws_page_background_set(Evas_Object *o, Eina_Bool enabled);
 EAPI Eina_Bool ewk_view_page_contents_get(const Evas_Object *o, Ewk_Page_Contents_Type type, Ewk_Page_Contents_Cb callback, void *user_data);
 
 /**
- * Sets the source mode as EINA_TRUE to display the web source code
- * or EINA_FALSE otherwise. The default value is EINA_FALSE.
- *
- * This method should be called before loading new contents on web view
- * so that the new view mode will be applied to the new contents.
- *
- * @param o view object to set the view source mode
- * @param enabled a state to set view source mode
- *
- * @return @c EINA_TRUE on success, or @c EINA_FALSE on failure
- */
-EAPI Eina_Bool ewk_view_source_mode_set(Evas_Object *o, Eina_Bool enabled);
-
-/**
- * Gets the view source mode of the current web page.
- *
- * @param o view object to get the view source mode
- *
- * @return @c EINA_TRUE if the view mode is set to load source code, or
- *         @c EINA_FALSE otherwise
- */
-EAPI Eina_Bool ewk_view_source_mode_get(const Evas_Object *o);
-
-/**
  * Requests execution of the given script.
  *
  * The result value for the execution can be retrieved from the asynchronous callback.
index c16b31b..bdfd781 100644 (file)
@@ -1001,27 +1001,6 @@ TEST_F(EWK2ViewTest, ewk_view_page_contents_get)
     waitUntilTrue(obtainedPageContents);
 }
 
-TEST_F(EWK2ViewTest, ewk_view_source_mode)
-{
-    const char indexHTML[] = "<html><body>Test Web View Mode<script>document.title=window.document.body.innerText;</script></body></html>";
-    const char contents[] = "Test Web View Mode";
-
-    // Default source mode is false.
-    EXPECT_FALSE(ewk_view_source_mode_get(webView()));
-
-    // Load web contents of the web page.
-    ewk_view_html_string_load(webView(), indexHTML, 0, 0);
-    EXPECT_TRUE(waitUntilTitleChangedTo(contents));
-
-    EXPECT_TRUE(ewk_view_source_mode_set(webView(), true));
-    EXPECT_TRUE(ewk_view_source_mode_get(webView()));
-
-    // TODO: Add a test case when the source mode is true.
-    //       But it needs a way to retrieve the body contents to compare the loaded contents
-    //       such as excuting the JavaScript, 'window.document.body.innerText'.
-    //       https://bugs.webkit.org/show_bug.cgi?id=101904.
-}
-
 TEST_F(EWK2ViewTest, ewk_view_user_agent)
 {
     const char* defaultUserAgent = eina_stringshare_add(ewk_view_user_agent_get(webView()));
index 5d16e97..671d7c0 100644 (file)
@@ -189,16 +189,6 @@ void WebView::resumeActiveDOMObjectsAndAnimations()
     m_page->resumeActiveDOMObjectsAndAnimations();
 }
 
-void WebView::setShowsAsSource(bool showsAsSource)
-{
-    m_page->setMainFrameInViewSourceMode(showsAsSource);
-}
-
-bool WebView::showsAsSource() const
-{
-    return m_page->mainFrameInViewSourceMode();
-}
-
 #if ENABLE(FULLSCREEN_API)
 WebFullScreenManagerProxyClient& WebView::fullScreenManagerProxyClient()
 {
index 75f019e..112ba3b 100644 (file)
@@ -93,9 +93,6 @@ public:
     void suspendActiveDOMObjectsAndAnimations();
     void resumeActiveDOMObjectsAndAnimations();
 
-    void setShowsAsSource(bool);
-    bool showsAsSource() const;
-
 #if ENABLE(FULLSCREEN_API)
     bool requestExitFullScreen();
 #endif
index 8c54cbd..4b239fe 100644 (file)
@@ -1828,7 +1828,6 @@ static Browser_Window *window_create(Evas_Object *opener, int width, int height,
     ewk_view_theme_set(window->ewk_view, TEST_THEME_DIR "/default.edj");
     if (device_pixel_ratio)
         ewk_view_device_pixel_ratio_set(window->ewk_view, (float)device_pixel_ratio);
-    ewk_view_source_mode_set(window->ewk_view, view_mode);
     ewk_view_user_agent_set(window->ewk_view, user_agent_string);
     ewk_view_layout_fixed_set(window->ewk_view, fixed_layout_enabled);