Title: [108961] trunk/Source/WebKit2
- Revision
- 108961
- Author
- [email protected]
- Date
- 2012-02-26 23:47:48 -0800 (Sun, 26 Feb 2012)
Log Message
[EFL][WK2] Add InjectedBundleEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=75463
Patch by YoungTaeck Song <[email protected]> on 2012-02-26
Reviewed by Andreas Kling.
Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::load):
(WebKit::InjectedBundle::activateMacFontAscentHack):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (108960 => 108961)
--- trunk/Source/WebKit2/ChangeLog 2012-02-27 06:54:04 UTC (rev 108960)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-27 07:47:48 UTC (rev 108961)
@@ -1,3 +1,17 @@
+2012-02-26 YoungTaeck Song <[email protected]>
+
+ [EFL][WK2] Add InjectedBundleEfl.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=75463
+
+ Reviewed by Andreas Kling.
+
+ Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
+
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
+ (WebKit::InjectedBundle::load):
+ (WebKit::InjectedBundle::activateMacFontAscentHack):
+
2012-02-26 Shinya Kawanaka <[email protected]>
Rename ShadowRootList to ShadowTree.
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (108960 => 108961)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2012-02-27 06:54:04 UTC (rev 108960)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2012-02-27 07:47:48 UTC (rev 108961)
@@ -43,6 +43,10 @@
typedef struct _GModule GModule;
#endif
+#if PLATFORM(EFL)
+#include <Eina.h>
+#endif
+
namespace CoreIPC {
class ArgumentDecoder;
class Connection;
@@ -59,6 +63,8 @@
typedef QLibrary PlatformBundle;
#elif PLATFORM(GTK)
typedef ::GModule* PlatformBundle;
+#elif PLATFORM(EFL)
+typedef Eina_Module* PlatformBundle;
#endif
class ImmutableArray;
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp (108960 => 108961)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp 2012-02-27 06:54:04 UTC (rev 108960)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp 2012-02-27 07:47:48 UTC (rev 108961)
@@ -28,20 +28,38 @@
#include "WKBundleAPICast.h"
#include "WKBundleInitialize.h"
-#include <WebCore/NotImplemented.h>
+#include <wtf/text/CString.h>
using namespace WebCore;
namespace WebKit {
-bool InjectedBundle::load(APIObject*)
+bool InjectedBundle::load(APIObject* initializationUserData)
{
- return false;
+ m_platformBundle = eina_module_new(m_path.utf8().data());
+ if (!m_platformBundle) {
+ EINA_LOG_CRIT("Error loading the injected bundle: eina_module_new() failed");
+ return false;
+ }
+ if (!eina_module_load(m_platformBundle)) {
+ EINA_LOG_CRIT("Error loading the injected bundle: %s", m_path.utf8().data());
+ eina_module_free(m_platformBundle);
+ m_platformBundle = 0;
+ return false;
+ }
+
+ WKBundleInitializeFunctionPtr initializeFunction = reinterpret_cast<WKBundleInitializeFunctionPtr>(eina_module_symbol_get(m_platformBundle, "WKBundleInitialize"));
+ if (!initializeFunction) {
+ EINA_LOG_CRIT("Error loading WKBundleInitialize symbol from injected bundle.");
+ return false;
+ }
+
+ initializeFunction(toAPI(this), toAPI(initializationUserData));
+ return true;
}
void InjectedBundle::activateMacFontAscentHack()
{
- notImplemented();
}
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes