Source/WebCore/ChangeLog

 12012-10-15 Eunmi Lee <eunmi15.lee@samsung.com>
 2
 3 [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
 4 https://bugs.webkit.org/show_bug.cgi?id=97173
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Remove codes to initialize and shutdown the EFL libraries from
 9 RunLoopEfl.cpp. Initialization and shutdown will be done in the
 10 ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
 11 process.
 12
 13 No new tests. This patch doesn't change behavior.
 14
 15 * platform/efl/RunLoopEfl.cpp:
 16 (WebCore::RunLoop::RunLoop):
 17 (WebCore::RunLoop::~RunLoop):
 18
1192012-10-14 Sam Weinig <sam@webkit.org>
220
321 Simplify user content in WebKit2 by using WebCore::UserStyleSheet and WebCore::UserScript directly

Source/WebKit2/ChangeLog

 12012-10-15 Eunmi Lee <eunmi15.lee@samsung.com>
 2
 3 [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
 4 https://bugs.webkit.org/show_bug.cgi?id=97173
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!).
 9
 10 * UIProcess/API/efl/ewk_main.cpp:
 11 (ewk_init):
 12 (ewk_shutdown):
 13 * WebProcess/efl/WebProcessMainEfl.cpp:
 14 (WebKit::WebProcessMainEfl):
 15
1162012-10-14 Anders Carlsson <andersca@apple.com>
217
318 Fix the world.

Source/WebCore/platform/efl/RunLoopEfl.cpp

2828#include "RunLoop.h"
2929
3030#include <Ecore.h>
31 #include <Ecore_Evas.h>
32 #include <Ecore_File.h>
33 #include <Edje.h>
3431#include <wtf/OwnPtr.h>
3532#include <wtf/PassOwnPtr.h>
3633

@@namespace WebCore {
4239RunLoop::RunLoop()
4340 : m_initEfl(false)
4441{
45  if (!ecore_init()) {
46  LOG_ERROR("could not init ecore.");
47  return;
48  }
49 
50  if (!ecore_evas_init()) {
51  LOG_ERROR("could not init ecore_evas.");
52  goto errorEcoreEvas;
53  }
54 
55  if (!ecore_file_init()) {
56  LOG_ERROR("could not init ecore_file.");
57  goto errorEcoreFile;
58  }
59 
60  if (!edje_init()) {
61  LOG_ERROR("could not init edje.");
62  goto errorEdje;
63  }
64 
6542 m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this));
6643 m_initEfl = true;
67 
68  return;
69 
70 errorEdje:
71  ecore_file_shutdown();
72 errorEcoreFile:
73  ecore_evas_shutdown();
74 errorEcoreEvas:
75  ecore_shutdown();
7644}
7745
7846RunLoop::~RunLoop()
7947{
80  if (m_initEfl) {
81  edje_shutdown();
82  ecore_file_shutdown();
83  ecore_evas_shutdown();
84  ecore_shutdown();
85  }
8648}
8749
8850void RunLoop::run()

Source/WebKit2/UIProcess/API/efl/ewk_main.cpp

@@int ewk_init(void)
7979 }
8080#endif
8181
 82 if (!edje_init()) {
 83 CRITICAL("could not init edje.");
 84 goto error_edje;
 85 }
 86
8287 g_type_init();
8388
8489 if (!ecore_main_loop_glib_integrate()) {

@@int ewk_init(void)
8994 return ++_ewkInitCount;
9095
9196#ifdef HAVE_ECORE_X
 97error_edje:
 98 ecore_x_shutdown();
9299error_ecore_x:
93100 ecore_evas_shutdown();
 101#else
 102error_edje:
 103 ecore_evas_shutdown();
94104#endif
95105error_ecore_evas:
96106 ecore_shutdown();

@@int ewk_shutdown(void)
110120 if (--_ewkInitCount)
111121 return _ewkInitCount;
112122
 123 edje_shutdown();
113124#ifdef HAVE_ECORE_X
114125 ecore_x_shutdown();
115126#endif

Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp

3131#include "ProxyResolverSoup.h"
3232#include "WKBase.h"
3333#include <Ecore.h>
 34#include <Ecore_Evas.h>
 35#include <Edje.h>
3436#include <Efreet.h>
3537#include <WebCore/ResourceHandle.h>
3638#include <WebCore/RunLoop.h>

@@WK_EXPORT int WebProcessMainEfl(int argc, char* argv[])
6466 return 1;
6567 }
6668
 69 if (!ecore_evas_init()) {
 70 ecore_shutdown();
 71 eina_shutdown();
 72 return 1;
 73 }
 74
 75 if (!edje_init()) {
 76 ecore_evas_shutdown();
 77 ecore_shutdown();
 78 eina_shutdown();
 79 return 1;
 80 }
 81
6782#if ENABLE(GLIB_SUPPORT)
6883 g_type_init();
6984

@@WK_EXPORT int WebProcessMainEfl(int argc, char* argv[])
105120 soup_cache_dump(soupCache);
106121 g_object_unref(soupCache);
107122
 123 edje_shutdown();
 124 ecore_evas_shutdown();
 125 ecore_shutdown();
 126 eina_shutdown();
 127
108128 return 0;
109129
110130}