[EFL][WK2] LayoutTests are broken after r160301
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 19:30:40 +0000 (19:30 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 19:30:40 +0000 (19:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125447

Reviewed by Darin Adler.

r160301 moved FullScreenManagerProxyClient logic to WebViewEfl, child class
of CoordinatedGraphics::WebView, because implementations are EFL specific.
However, CoordinatedGraphics::WebView creates WebPageProxy in constructor and
WebPageProxy requires FullScreenManagerProxyClient in constructor.
So, All WK2/Efl based applications got crashed

This patch adds virtual methods for FullScreenManagerProxyClient to CoordinatedGraphics::WebView
so that WebPageProxy can get FullScreenManagerProxyClient instance without
pure viertual methods.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewExitFullScreen):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::fullScreenManagerProxyClient):
(WebKit::WebView::requestExitFullScreen):
renamed from exitFullScreen not to conflict with methods of FullScreenManagerProxyClient.
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebViewEfl.cpp:
* UIProcess/efl/WebViewEfl.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/CoordinatedGraphics/WKView.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
Source/WebKit2/UIProcess/efl/WebViewEfl.cpp
Source/WebKit2/UIProcess/efl/WebViewEfl.h

index db71b7a..2fa0923 100644 (file)
@@ -1,3 +1,30 @@
+2013-12-09  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL][WK2] LayoutTests are broken after r160301
+        https://bugs.webkit.org/show_bug.cgi?id=125447
+
+        Reviewed by Darin Adler.
+
+        r160301 moved FullScreenManagerProxyClient logic to WebViewEfl, child class
+        of CoordinatedGraphics::WebView, because implementations are EFL specific.
+        However, CoordinatedGraphics::WebView creates WebPageProxy in constructor and
+        WebPageProxy requires FullScreenManagerProxyClient in constructor.
+        So, All WK2/Efl based applications got crashed
+
+        This patch adds virtual methods for FullScreenManagerProxyClient to CoordinatedGraphics::WebView
+        so that WebPageProxy can get FullScreenManagerProxyClient instance without
+        pure viertual methods.
+
+        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
+        (WKViewExitFullScreen):
+        * UIProcess/CoordinatedGraphics/WebView.cpp:
+        (WebKit::WebView::fullScreenManagerProxyClient):
+        (WebKit::WebView::requestExitFullScreen):
+        renamed from exitFullScreen not to conflict with methods of FullScreenManagerProxyClient.
+        * UIProcess/CoordinatedGraphics/WebView.h:
+        * UIProcess/efl/WebViewEfl.cpp:
+        * UIProcess/efl/WebViewEfl.h:
+
 2013-12-09  Sergio Villar Senin  <svillar@igalia.com>
 
         [WK2] Add UNIX_DOMAIN_SOCKETS specific bits for supporting NetworkProcess
index a6ed96c..dd12838 100644 (file)
@@ -182,7 +182,7 @@ bool WKViewGetShowsAsSource(WKViewRef viewRef)
 bool WKViewExitFullScreen(WKViewRef viewRef)
 {
 #if ENABLE(FULLSCREEN_API)
-    return toImpl(viewRef)->exitFullScreen();
+    return toImpl(viewRef)->requestExitFullScreen();
 #else
     UNUSED_PARAM(viewRef);
     return false;
index 82664de..386f76f 100644 (file)
@@ -194,13 +194,16 @@ bool WebView::showsAsSource() const
 }
 
 #if ENABLE(FULLSCREEN_API)
-bool WebView::exitFullScreen()
+WebFullScreenManagerProxyClient& WebView::fullScreenManagerProxyClient()
 {
-#if PLATFORM(EFL)
-    // FIXME: Implement this for other platforms.
-    if (!m_page->fullScreenManager()->isFullScreen())
+    return *this;
+}
+
+bool WebView::requestExitFullScreen()
+{
+    if (!isFullScreen())
         return false;
-#endif
+
     m_page->fullScreenManager()->requestExitFullScreen();
     return true;
 }
index 96e397c..75bc386 100644 (file)
@@ -33,6 +33,7 @@
 #include "DefaultUndoController.h"
 #include "PageClient.h"
 #include "WebContext.h"
+#include "WebFullScreenManagerProxy.h"
 #include "WebGeometry.h"
 #include "WebPageGroup.h"
 #include "WebPageProxy.h"
@@ -46,7 +47,11 @@ class CoordinatedGraphicsScene;
 
 namespace WebKit {
 
-class WebView : public API::TypedObject<API::Object::Type::View>, public PageClient {
+class WebView : public API::TypedObject<API::Object::Type::View>, public PageClient
+#if ENABLE(FULLSCREEN_API)
+    , public WebFullScreenManagerProxyClient
+#endif
+    {
 public:
     virtual ~WebView();
 
@@ -93,7 +98,7 @@ public:
     bool showsAsSource() const;
 
 #if ENABLE(FULLSCREEN_API)
-    bool exitFullScreen();
+    bool requestExitFullScreen();
 #endif
 
     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
@@ -189,6 +194,18 @@ protected:
     virtual void exitAcceleratedCompositingMode() OVERRIDE;
     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&) OVERRIDE;
 
+#if ENABLE(FULLSCREEN_API)
+    WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() OVERRIDE;
+
+    // WebFullScreenManagerProxyClient
+    virtual void closeFullScreenManager() OVERRIDE { }
+    virtual bool isFullScreen() OVERRIDE { return false; }
+    virtual void enterFullScreen() OVERRIDE { }
+    virtual void exitFullScreen() OVERRIDE { }
+    virtual void beganEnterFullScreen(const WebCore::IntRect&, const WebCore::IntRect&) OVERRIDE { }
+    virtual void beganExitFullScreen(const WebCore::IntRect&, const WebCore::IntRect&) OVERRIDE { }
+#endif
+
 protected:
     WebViewClient m_client;
     RefPtr<WebPageProxy> m_page;
index 5f08181..4233548 100644 (file)
@@ -142,11 +142,6 @@ void WebViewEfl::sendMouseEvent(const Evas_Event_Mouse_Move* event)
 
 #if ENABLE(FULLSCREEN_API)
 
-WebFullScreenManagerProxyClient& WebViewEfl::fullScreenManagerProxyClient()
-{
-    return *this;
-}
-
 // WebFullScreenManagerProxyClient
 bool WebViewEfl::isFullScreen()
 {
index ba1e870..59075a2 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef WebViewEfl_h
 #define WebViewEfl_h
 
-#include "WebFullScreenManagerProxy.h"
 #include "WebView.h"
 
 class EwkView;
@@ -38,9 +37,6 @@ class EwkTouchEvent;
 #endif
 
 class WebViewEfl : public WebView
-#if ENABLE(FULLSCREEN_API)
-    , public WebFullScreenManagerProxyClient
-#endif
     {
 public:
     void setEwkView(EwkView*);
@@ -66,10 +62,6 @@ private:
     void handleDownloadRequest(DownloadProxy*) OVERRIDE;
 
 #if ENABLE(FULLSCREEN_API)
-    WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() OVERRIDE;
-#endif
-
-#if ENABLE(FULLSCREEN_API)
     // WebFullScreenManagerProxyClient
     virtual void closeFullScreenManager() OVERRIDE FINAL { }
     virtual bool isFullScreen() OVERRIDE FINAL;