Modified: trunk/Tools/ChangeLog (138014 => 138015)
--- trunk/Tools/ChangeLog 2012-12-18 13:53:45 UTC (rev 138014)
+++ trunk/Tools/ChangeLog 2012-12-18 14:42:31 UTC (rev 138015)
@@ -1,3 +1,18 @@
+2012-12-18 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ [EFL][WK2] When creating new windows, use the opener's context
+ https://bugs.webkit.org/show_bug.cgi?id=105283
+
+ Reviewed by Laszlo Gombos.
+
+ Use the context of the opener if exists.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_window_create):
+ (window_create):
+ (elm_main):
+
2012-12-18 Thiago Marcos P. Santos <thiago.san...@intel.com>
[EFL][WK2] Gardening of TestWebKitAPI tests
Modified: trunk/Tools/MiniBrowser/efl/main.c (138014 => 138015)
--- trunk/Tools/MiniBrowser/efl/main.c 2012-12-18 13:53:45 UTC (rev 138014)
+++ trunk/Tools/MiniBrowser/efl/main.c 2012-12-18 14:42:31 UTC (rev 138015)
@@ -132,7 +132,7 @@
}
};
-static Browser_Window *window_create(const char *url, int width, int height);
+static Browser_Window *window_create(Evas_Object* opener, const char *url, int width, int height);
static Browser_Window *window_find_with_elm_window(Evas_Object *elm_window)
{
@@ -224,7 +224,7 @@
info("Change Pagination Mode (F7) was pressed, but NOT changed!");
} else if (!strcmp(ev->key, "n") && ctrlPressed) {
info("Create new window (Ctrl+n) was pressed.\n");
- Browser_Window *window = window_create(DEFAULT_URL, 0, 0);
+ Browser_Window *window = window_create(0, DEFAULT_URL, 0, 0);
// 0 equals default width and height.
windows = eina_list_append(windows, window);
} else if (!strcmp(ev->key, "i") && ctrlPressed) {
@@ -804,7 +804,7 @@
if (!height)
height = window_height;
- Browser_Window *window = window_create(url, width, height);
+ Browser_Window *window = window_create(smartData->self, url, width, height);
Evas_Object *new_view = window->ewk_view;
windows = eina_list_append(windows, window);
@@ -996,7 +996,7 @@
return button;
}
-static Browser_Window *window_create(const char *url, int width, int height)
+static Browser_Window *window_create(Evas_Object *opener, const char *url, int width, int height)
{
Browser_Window *window = malloc(sizeof(Browser_Window));
if (!window) {
@@ -1097,7 +1097,8 @@
window->ewk_view = (Evas_Object*)WKViewCreate(evas, 0, 0);
} else {
Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc);
- window->ewk_view = ewk_view_smart_add(evas, smart, ewk_context_default_get());
+ Ewk_Context* context = opener ? ewk_view_context_get(opener) : ewk_context_default_get();
+ window->ewk_view = ewk_view_smart_add(evas, smart, context);
}
ewk_view_theme_set(window->ewk_view, THEME_DIR "/default.edj");
if (device_pixel_ratio)
@@ -1228,10 +1229,10 @@
if (args < argc) {
char *url = ""
- window = window_create(url, 0, 0);
+ window = window_create(0, url, 0, 0);
free(url);
} else
- window = window_create(DEFAULT_URL, 0, 0);
+ window = window_create(0, DEFAULT_URL, 0, 0);
if (!window)
return quit(EINA_FALSE, "ERROR: could not create browser window.\n");