https://bugs.webkit.org/show_bug.cgi?id=80748
Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2012-03-22
Reviewed by Noam Rosenthal.
Source/WebCore:
* platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
(WebCore):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::platformGetValue): Use PageClientEfl.
Source/WebKit:
* PlatformEfl.cmake: Add WebCore/platform/graphics/efl to the include path
and PageClientEfl.cpp to the source list.
Source/WebKit/efl:
This patch adds PageClientEfl for implementaion of accelerated compositing.
* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::platformPageClient):
* WebCoreSupport/PageClientEfl.cpp: Added.
(WebCore):
(WebCore::PageClientEfl::PageClientEfl):
(WebCore::PageClientEfl::~PageClientEfl):
(WebCore::PageClientEfl::createEvasObjectForAcceleratedCompositing):
Just call ewk_view_accelerated_compositing_object_create().
(WebCore::PageClientEfl::acceleratedCompositingContext):
Just call ewk_view_accelerated_compositing_context_get().
* WebCoreSupport/PageClientEfl.h: Added.
(WebCore):
(PageClientEfl):
(WebCore::PageClientEfl::view): Return ewkView.
* ewk/ewk_private.h:
(WebCore):
(EWKPrivate):
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data): Add OwnPtr<PageClientEfl>.
(_ewk_view_priv_new): Create a new PageClientEfl.
(ewk_view_accelerated_compositing_object_create): Not implemented.
(ewk_view_accelerated_compositing_context_get): Not implemented.
(EWKPrivate::corePageClient): Return the PageClientEfl pointer.
(EWKPrivate):
Source/WTF:
* wtf/Platform.h: Disable accelerated compositing. It's not ready yet.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111673
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ * wtf/Platform.h: Disable accelerated compositing. It's not ready yet.
+
2012-03-21 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=80322
#endif
/* Accelerated compositing */
-#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(EFL)
+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
#define WTF_USE_ACCELERATED_COMPOSITING 1
#endif
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
+ (WebCore):
+ * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
+ (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
+ * plugins/efl/PluginViewEfl.cpp:
+ (WebCore::PluginView::platformGetValue): Use PageClientEfl.
+
2012-03-22 Kaustubh Atrawalkar <kaustubh@motorola.com>
blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees
#elif PLATFORM(BLACKBERRY)
#include "PageClientBlackBerry.h"
typedef PageClientBlackBerry* PlatformPageClient;
+#elif PLATFORM(EFL)
+namespace WebCore {
+class PageClientEfl;
+typedef PageClientEfl* PlatformPageClient;
+}
#else
typedef PlatformWidget PlatformPageClient;
#endif
evas_gl_native_surface_get(m_evasGL, m_surface, &nativeSurface);
// Create and specially set up a evas_object which act as the render targer surface.
- if (!pageClient->createEvasObjectForAcceleratedCompositing(&nativeSurface, x, y, width, height))
+ if (!pageClient->createEvasObjectForAcceleratedCompositing(&nativeSurface, IntRect(x, y, width, height)))
return false;
}
#endif
#include "HostWindow.h"
#include "MouseEvent.h"
#include "NotImplemented.h"
+#include "PageClientEfl.h"
#include "PluginPackage.h"
#include "npruntime_impl.h"
#include "runtime/JSLock.h"
}
case NPNVnetscapeWindow: {
- Evas_Object* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
+ PageClientEfl* pageClient = static_cast<PageClientEfl*>(m_parentFrame->view()->hostWindow()->platformPageClient());
+ Evas_Object* widget = pageClient->view();
Evas* evas = evas_object_evas_get(widget);
Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(evas);
*static_cast<XID*>(value) = static_cast<Window>(ecore_evas_window_get(ecoreEvas));
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ * PlatformEfl.cmake: Add WebCore/platform/graphics/efl to the include path
+ and PageClientEfl.cpp to the source list.
+
2012-03-20 Eric Seidel <eric@webkit.org>
Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
"${JAVASCRIPTCORE_DIR}/wtf/gobject"
"${WEBCORE_DIR}/platform/efl"
"${WEBCORE_DIR}/platform/graphics/cairo"
+ "${WEBCORE_DIR}/platform/graphics/efl"
${Cairo_INCLUDE_DIRS}
${ECORE_X_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
efl/WebCoreSupport/StorageTrackerClientEfl.cpp
efl/WebCoreSupport/InspectorClientEfl.cpp
efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
+ efl/WebCoreSupport/PageClientEfl.cpp
efl/ewk/ewk_auth.cpp
efl/ewk/ewk_auth_soup.cpp
+2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
+
+ [EFL] Add PageClientEfl to WebCoreSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=80748
+
+ Reviewed by Noam Rosenthal.
+
+ This patch adds PageClientEfl for implementaion of accelerated compositing.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::platformPageClient):
+ * WebCoreSupport/PageClientEfl.cpp: Added.
+ (WebCore):
+ (WebCore::PageClientEfl::PageClientEfl):
+ (WebCore::PageClientEfl::~PageClientEfl):
+ (WebCore::PageClientEfl::createEvasObjectForAcceleratedCompositing):
+ Just call ewk_view_accelerated_compositing_object_create().
+ (WebCore::PageClientEfl::acceleratedCompositingContext):
+ Just call ewk_view_accelerated_compositing_context_get().
+ * WebCoreSupport/PageClientEfl.h: Added.
+ (WebCore):
+ (PageClientEfl):
+ (WebCore::PageClientEfl::view): Return ewkView.
+ * ewk/ewk_private.h:
+ (WebCore):
+ (EWKPrivate):
+ * ewk/ewk_view.cpp:
+ (_Ewk_View_Private_Data): Add OwnPtr<PageClientEfl>.
+ (_ewk_view_priv_new): Create a new PageClientEfl.
+ (ewk_view_accelerated_compositing_object_create): Not implemented.
+ (ewk_view_accelerated_compositing_context_get): Not implemented.
+ (EWKPrivate::corePageClient): Return the PageClientEfl pointer.
+ (EWKPrivate):
+
2012-03-19 Adam Barth <abarth@webkit.org>
Remove support for "magic" iframe
PlatformPageClient ChromeClientEfl::platformPageClient() const
{
- return m_view;
+ return EWKPrivate::corePageClient(m_view);
}
void ChromeClientEfl::scrollbarsModeDidChange() const
--- /dev/null
+/*
+ Copyright (C) 2012 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "PageClientEfl.h"
+
+#include "ewk_private.h"
+
+namespace WebCore {
+
+PageClientEfl::PageClientEfl(Evas_Object* view)
+ : m_view(view)
+{
+ ASSERT(m_view);
+}
+
+PageClientEfl::~PageClientEfl()
+{
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+bool PageClientEfl::createEvasObjectForAcceleratedCompositing(Evas_Native_Surface* nativeSurface, const IntRect& rect)
+{
+ return ewk_view_accelerated_compositing_object_create(m_view, nativeSurface, rect);
+}
+
+GraphicsContext3D* PageClientEfl::acceleratedCompositingContext()
+{
+ return ewk_view_accelerated_compositing_context_get(m_view);
+}
+#endif
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2012 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PageClientEfl_h
+#define PageClientEfl_h
+
+#include "IntRect.h"
+
+typedef struct _Evas_Native_Surface Evas_Native_Surface;
+typedef struct _Evas_Object Evas_Object;
+
+namespace WebCore {
+
+class GraphicsContext3D;
+
+class PageClientEfl {
+public:
+ PageClientEfl(Evas_Object* view);
+ virtual ~PageClientEfl();
+
+#if USE(ACCELERATED_COMPOSITING)
+ bool createEvasObjectForAcceleratedCompositing(Evas_Native_Surface*, const IntRect&);
+ GraphicsContext3D* acceleratedCompositingContext();
+#endif
+
+ Evas_Object* view() { return m_view; }
+
+protected:
+ Evas_Object* m_view;
+};
+
+} // namespace WebCore
+
+#endif // PageClientEfl_h
#include "ewk_js.h"
#include "ewk_view.h"
#include <Evas.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include <Evas_GL.h>
+#endif
#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
struct PopupMenuClient;
struct ContextMenu;
struct ContextMenuItem;
+#if USE(ACCELERATED_COMPOSITING)
+class GraphicsContext3D;
+class GraphicsLayer;
+#endif
}
struct Ewk_Window_Object_Cleared_Event {
WebCore::Frame *coreFrame(const Evas_Object *ewkFrame);
WebCore::Page *corePage(const Evas_Object *ewkView);
WebCore::HistoryItem *coreHistoryItem(const Ewk_History_Item *ewkHistoryItem);
+WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView);
Evas_Object* kitFrame(const WebCore::Frame* coreFrame);
void ewk_view_mixed_content_displayed_set(Evas_Object* ewkView, bool hasDisplayed);
void ewk_view_mixed_content_run_set(Evas_Object* ewkView, bool hasRun);
+#if USE(ACCELERATED_COMPOSITING)
+bool ewk_view_accelerated_compositing_object_create(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface, const WebCore::IntRect& rect);
+WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView);
+#endif
+
#endif // ewk_private_h
#include "JSDOMWindow.h"
#include "JSLock.h"
#include "LayoutTypes.h"
+#include "PageClientEfl.h"
#include "PlatformMouseEvent.h"
#include "PopupMenuClient.h"
#include "ProgressTracker.h"
#include "BatteryClientEfl.h"
#endif
+#if USE(ACCELERATED_COMPOSITING)
+#include "NotImplemented.h"
+#endif
+
static const float zoomMinimum = 0.05;
static const float zoomMaximum = 4.0;
WebCore::Frame* mainFrame;
WebCore::ViewportArguments viewportArguments;
Ewk_History* history;
+ OwnPtr<WebCore::PageClientEfl> pageClient;
struct {
Ewk_Menu menu;
WebCore::PopupMenuClient* menuClient;
priv->soupSession = WebCore::ResourceHandle::defaultSession();
+ priv->pageClient = adoptPtr(new WebCore::PageClientEfl(smartData->self));
+
return priv;
}
priv->soupSession = session;
}
+#if USE(ACCELERATED_COMPOSITING)
+bool ewk_view_accelerated_compositing_object_create(Evas_Object* ewkView, Evas_Native_Surface* nativeSurface, const WebCore::IntRect& rect)
+{
+ notImplemented();
+ return false;
+}
+
+WebCore::GraphicsContext3D* ewk_view_accelerated_compositing_context_get(Evas_Object* ewkView)
+{
+ notImplemented();
+ return 0;
+}
+#endif
+
namespace EWKPrivate {
WebCore::Page *corePage(const Evas_Object *ewkView)
return priv->page.get();
}
+WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0);
+ return priv->pageClient.get();
+}
+
} // namespace EWKPrivate