WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch v4
bug109794_v4 (text/plain), 11.29 KB, created by
Mikhail Pozdnyakov
on 2013-02-18 05:21:26 PST
(
hide
)
Description:
patch v4
Filename:
MIME Type:
Creator:
Mikhail Pozdnyakov
Created:
2013-02-18 05:21:26 PST
Size:
11.29 KB
patch
obsolete
>commit 85103f58a9821f0a9ee68a8a482e000d8d6db0e0 >Author: Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> >Date: Mon Feb 18 14:55:57 2013 +0200 > > bug109794 > >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index 6c301ab..8dda6bd 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,55 @@ >+2013-02-18 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> >+ >+ [WK2][EFL] Eliminate access to WK2 C++ internals from ewk_view functions >+ https://bugs.webkit.org/show_bug.cgi?id=109794 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/C/efl/WKView.cpp: >+ (WKViewSetShowsAsSource): >+ (WKViewGetShowsAsSource): >+ >+ Added new WKView API to wrap WebPageProxy::setMainFrameInViewSourceMode() >+ and WebPageProxy::mainFrameInViewSourceMode() calls. >+ >+ (WKViewExitFullScreen): >+ >+ Added new WKView API to wrap WebFullScreenManagerProxy::exitFullScreen() >+ calls. >+ >+ * UIProcess/API/C/efl/WKView.h: >+ * UIProcess/API/efl/EwkView.cpp: >+ (EwkView::feedTouchEvent): >+ >+ Added feedTouchEvent() method so that: at first ewk_view_feed_touch_event() >+ is not invoked from EwkView class, secondly ewk_view_feed_touch_event() does >+ not access WebPage instance directly. >+ >+ (EwkView::feedTouchEvents): >+ * UIProcess/API/efl/EwkView.h: >+ (EwkView): >+ * UIProcess/API/efl/ewk_view.cpp: >+ (ewk_view_feed_touch_event): >+ (ewk_view_pagination_mode_set): >+ (ewk_view_pagination_mode_get): >+ (ewk_view_fullscreen_exit): >+ (ewkViewPageContentsCallback): >+ (ewk_view_page_contents_get): >+ (ewk_view_source_mode_set): >+ (ewk_view_source_mode_get): >+ >+ Those are now using exported C API. >+ >+ * UIProcess/efl/WebView.cpp: >+ (WebKit::WebView::setShowsAsSource): >+ (WebKit): >+ (WebKit::WebView::showsAsSource): >+ (WebKit::WebView::exitFullScreen): >+ * UIProcess/efl/WebView.h: >+ (WebView): >+ >+ Added WebView methods to support added WKView API. >+ > 2013-02-18 Grzegorz Czajkowski <g.czajkowski@samsung.com> > > [WK2][EFL] Unified text checker implementation >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp b/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp >index 210f2e2..76ed9df 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp >@@ -97,6 +97,25 @@ 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(); >+} >+ >+void WKViewExitFullScreen(WKViewRef viewRef) >+{ >+#if ENABLE(FULLSCREEN_API) >+ toImpl(viewRef)->exitFullScreen(); >+#else >+ UNUSED_PARAM(viewRef); >+#endif >+} >+ > Evas_Object* WKViewGetEvasObject(WKViewRef viewRef) > { > return toImpl(viewRef)->evasObject(); >diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKView.h b/Source/WebKit2/UIProcess/API/C/efl/WKView.h >index 32546c6..b42b227 100644 >--- a/Source/WebKit2/UIProcess/API/C/efl/WKView.h >+++ b/Source/WebKit2/UIProcess/API/C/efl/WKView.h >@@ -70,6 +70,11 @@ 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 void WKViewExitFullScreen(WKViewRef); >+ > // FIXME: The long term plan is to get rid of this, so keep usage to a bare minimum. > WK_EXPORT Evas_Object* WKViewGetEvasObject(WKViewRef); > >diff --git a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >index 73a0cf5..fe1ccfb 100644 >--- a/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >+++ b/Source/WebKit2/UIProcess/API/efl/EwkView.cpp >@@ -748,6 +748,11 @@ void EwkView::setMouseEventsEnabled(bool enabled) > } > > #if ENABLE(TOUCH_EVENTS) >+void EwkView::feedTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers) >+{ >+ page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, transformFromScene(), transformToScreen(), ecore_time_get())); >+} >+ > void EwkView::setTouchEventsEnabled(bool enabled) > { > if (m_touchEventsEnabled == enabled) >@@ -1299,7 +1304,7 @@ void EwkView::feedTouchEvents(Ewk_Touch_Event_Type type) > points = eina_list_append(points, point); > } > >- ewk_view_feed_touch_event(m_evasObject, type, points, evas_key_modifier_get(sd->base.evas)); >+ feedTouchEvent(type, points, evas_key_modifier_get(sd->base.evas)); > > void* data; > EINA_LIST_FREE(points, data) >diff --git a/Source/WebKit2/UIProcess/API/efl/EwkView.h b/Source/WebKit2/UIProcess/API/efl/EwkView.h >index 747998b..379d6cb 100644 >--- a/Source/WebKit2/UIProcess/API/efl/EwkView.h >+++ b/Source/WebKit2/UIProcess/API/efl/EwkView.h >@@ -158,6 +158,7 @@ public: > bool mouseEventsEnabled() const { return m_mouseEventsEnabled; } > void setMouseEventsEnabled(bool enabled); > #if ENABLE(TOUCH_EVENTS) >+ void feedTouchEvent(Ewk_Touch_Event_Type type, const Eina_List* points, const Evas_Modifier* modifiers); > bool touchEventsEnabled() const { return m_touchEventsEnabled; } > void setTouchEventsEnabled(bool enabled); > #endif >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >index c91d7b8..4f1a131 100644 >--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >@@ -30,19 +30,6 @@ > #include "PageUIClientEfl.h" > #include "PageViewportController.h" > #include "PageViewportControllerClientEfl.h" >-#include "WKAPICast.h" >-#include "WKEinaSharedString.h" >-#include "WKFindOptions.h" >-#include "WKInspector.h" >-#include "WKRetainPtr.h" >-#include "WKString.h" >-#include "WKURL.h" >-#include "WKView.h" >-#include "WebContext.h" >-#include "WebData.h" >-#include "WebFullScreenManagerProxy.h" >-#include "WebPageGroup.h" >-#include "WebPreferences.h" > #include "ewk_back_forward_list_private.h" > #include "ewk_context.h" > #include "ewk_context_private.h" >@@ -50,7 +37,16 @@ > #include "ewk_private.h" > #include "ewk_settings_private.h" > #include <Ecore_Evas.h> >+#include <WebKit2/WKAPICast.h> >+#include <WebKit2/WKData.h> >+#include <WebKit2/WKEinaSharedString.h> >+#include <WebKit2/WKFindOptions.h> >+#include <WebKit2/WKInspector.h> > #include <WebKit2/WKPageGroup.h> >+#include <WebKit2/WKRetainPtr.h> >+#include <WebKit2/WKString.h> >+#include <WebKit2/WKURL.h> >+#include <WebKit2/WKView.h> > #include <wtf/UnusedParam.h> > #include <wtf/text/CString.h> > >@@ -376,7 +372,7 @@ Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type t > EINA_SAFETY_ON_NULL_RETURN_VAL(points, false); > EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false); > >- impl->page()->handleTouchEvent(NativeWebTouchEvent(type, points, modifiers, impl->transformFromScene(), impl->transformToScreen(), ecore_time_get())); >+ impl->feedTouchEvent(type, points, modifiers); > > return true; > #else >@@ -457,8 +453,8 @@ COMPILE_ASSERT_MATCHING_ENUM(EWK_PAGINATION_MODE_BOTTOM_TO_TOP, WebCore::Paginat > Eina_Bool ewk_view_pagination_mode_set(Evas_Object* ewkView, Ewk_Pagination_Mode mode) > { > EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false); >- >- impl->page()->setPaginationMode(static_cast<WebCore::Pagination::Mode>(mode)); >+ // FIXME: move to exported C WKPage API when it appears. >+ toImpl(impl->wkPage())->setPaginationMode(static_cast<WebCore::Pagination::Mode>(mode)); > > return true; > } >@@ -466,8 +462,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); >- >- return static_cast<Ewk_Pagination_Mode>(impl->page()->paginationMode()); >+ // FIXME: move to exported C WKPage API when it appears. >+ return static_cast<Ewk_Pagination_Mode>(toImpl(impl->wkPage())->paginationMode()); > } > > Eina_Bool ewk_view_fullscreen_exit(Evas_Object* ewkView) >@@ -475,7 +471,7 @@ Eina_Bool ewk_view_fullscreen_exit(Evas_Object* ewkView) > #if ENABLE(FULLSCREEN_API) > EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false); > >- impl->page()->fullScreenManager()->requestExitFullScreen(); >+ WKViewExitFullScreen(impl->wkView()); > > return true; > #else >@@ -510,9 +506,8 @@ static void ewkViewPageContentsCallback(WKDataRef wkData, WKErrorRef, void* cont > { > EINA_SAFETY_ON_NULL_RETURN(context); > >- RefPtr<WebData> webData = toImpl(wkData); > Ewk_Page_Contents_Context* contentsContext= static_cast<Ewk_Page_Contents_Context*>(context); >- contentsContext->callback(contentsContext->type, reinterpret_cast<const char*>(webData->bytes())); >+ contentsContext->callback(contentsContext->type, reinterpret_cast<const char*>(WKDataGetBytes(wkData))); > > delete contentsContext; > } >@@ -530,7 +525,7 @@ Eina_Bool ewk_view_page_contents_get(const Evas_Object* ewkView, Ewk_Page_Conten > context->type = type; > context->callback = callback; > >- impl->page()->getContentsAsMHTMLData(DataCallback::create(context, ewkViewPageContentsCallback), false); >+ WKPageGetContentsAsMHTMLData(impl->wkPage(), false, context, ewkViewPageContentsCallback); > > return true; > } >@@ -539,7 +534,7 @@ Eina_Bool ewk_view_source_mode_set(Evas_Object* ewkView, Eina_Bool enabled) > { > EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false); > >- impl->page()->setMainFrameInViewSourceMode(enabled); >+ WKViewSetShowsAsSource(impl->wkView(), enabled); > > return true; > } >@@ -548,5 +543,5 @@ Eina_Bool ewk_view_source_mode_get(const Evas_Object* ewkView) > { > EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false); > >- return impl->page()->mainFrameInViewSourceMode(); >+ return WKViewGetShowsAsSource(impl->wkView()); > } >diff --git a/Source/WebKit2/UIProcess/efl/WebView.cpp b/Source/WebKit2/UIProcess/efl/WebView.cpp >index 3ab4fd4..7ec87b9 100644 >--- a/Source/WebKit2/UIProcess/efl/WebView.cpp >+++ b/Source/WebKit2/UIProcess/efl/WebView.cpp >@@ -118,6 +118,23 @@ 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) >+void WebView::exitFullScreen() >+{ >+ m_page->fullScreenManager()->requestExitFullScreen(); >+} >+#endif >+ > void WebView::initializeClient(const WKViewClient* client) > { > m_client.initialize(client); >diff --git a/Source/WebKit2/UIProcess/efl/WebView.h b/Source/WebKit2/UIProcess/efl/WebView.h >index ab228b0..44ee9d7 100644 >--- a/Source/WebKit2/UIProcess/efl/WebView.h >+++ b/Source/WebKit2/UIProcess/efl/WebView.h >@@ -64,6 +64,13 @@ public: > void suspendActiveDOMObjectsAndAnimations(); > void resumeActiveDOMObjectsAndAnimations(); > >+ void setShowsAsSource(bool); >+ bool showsAsSource() const; >+ >+#if ENABLE(FULLSCREEN_API) >+ void exitFullScreen(); >+#endif >+ > // View client. > void initializeClient(const WKViewClient*); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 109794
:
188291
|
188293
|
188319
|
188855
| 188858