Title: [157502] trunk
Revision
157502
Author
[email protected]
Date
2013-10-16 01:48:14 -0700 (Wed, 16 Oct 2013)

Log Message

[EFL] Minibrowser can't load child window's location
https://bugs.webkit.org/show_bug.cgi?id=122485

Patch by Robert Plociennik <[email protected]> on 2013-10-16
Reviewed by Gyuyoung Kim.

Source/WebKit2:

EwkView::createNewPage(), which is only called during handling of
Messages::WebPageProxy::CreateNewPage message from WebProcess, no longer passes
the URL to window_create(). As a result, no Messages::WebPage::LoadURL message
is sent back, that would load the same URL twice and effectively cancel any
other scheduled navigation inside WebProcess.

Additionally, since the url parameter in MiniBrowser's implementation of
window_create() is only used internally and is prone to bugs as demonstrated
in r139303 (d7f10c8), it has been removed in favour of explicit calls to
ewk_view_url_set().

* UIProcess/API/efl/EwkView.cpp:
(EwkView::createNewPage): No longer passes the URL to window_create() impl.
* UIProcess/API/efl/ewk_view.h: window_create() no longer has the url parameter.
* UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Test methods updated to
    comply with the API change.
(EWK2WindowFeaturesTest::createDefaultWindow): Ditto.
(EWK2WindowFeaturesTest::createWindow): Ditto.

Tools:

* MiniBrowser/efl/main.c: Now calling window_create() without the url parameter
    followed by an explicit call to ewk_view_url_set() where appropriate.
(on_key_down):
(on_window_create):
(window_create):
(elm_main):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (157501 => 157502)


--- trunk/Source/WebKit2/ChangeLog	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Source/WebKit2/ChangeLog	2013-10-16 08:48:14 UTC (rev 157502)
@@ -1,3 +1,29 @@
+2013-10-16  Robert Plociennik  <[email protected]>
+
+        [EFL] Minibrowser can't load child window's location
+        https://bugs.webkit.org/show_bug.cgi?id=122485
+
+        Reviewed by Gyuyoung Kim.
+
+        EwkView::createNewPage(), which is only called during handling of
+        Messages::WebPageProxy::CreateNewPage message from WebProcess, no longer passes
+        the URL to window_create(). As a result, no Messages::WebPage::LoadURL message
+        is sent back, that would load the same URL twice and effectively cancel any
+        other scheduled navigation inside WebProcess.
+
+        Additionally, since the url parameter in MiniBrowser's implementation of
+        window_create() is only used internally and is prone to bugs as demonstrated
+        in r139303 (d7f10c8), it has been removed in favour of explicit calls to
+        ewk_view_url_set().
+
+        * UIProcess/API/efl/EwkView.cpp:
+        (EwkView::createNewPage): No longer passes the URL to window_create() impl.
+        * UIProcess/API/efl/ewk_view.h: window_create() no longer has the url parameter.
+        * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Test methods updated to
+            comply with the API change.
+        (EWK2WindowFeaturesTest::createDefaultWindow): Ditto.
+        (EWK2WindowFeaturesTest::createWindow): Ditto.
+
 2013-10-15  Jae Hyun Park  <[email protected]>
 
         Unreviewed. Build fix after r157476.

Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp (157501 => 157502)


--- trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp	2013-10-16 08:48:14 UTC (rev 157502)
@@ -1085,7 +1085,7 @@
 
     RefPtr<EwkWindowFeatures> ewkWindowFeatures = EwkWindowFeatures::create(windowFeatures, this);
 
-    Evas_Object* newEwkView = sd->api->window_create(sd, request->url(), ewkWindowFeatures.get());
+    Evas_Object* newEwkView = sd->api->window_create(sd, ewkWindowFeatures.get());
     if (!newEwkView)
         return 0;
 

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h (157501 => 157502)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h	2013-10-16 08:48:14 UTC (rev 157502)
@@ -154,7 +154,7 @@
 
     // window creation and closing:
     //   - Create a new window with specified features and close window.
-    Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, const char* url, const Ewk_Window_Features *window_features);
+    Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, const Ewk_Window_Features *window_features);
     void (*window_close)(Ewk_View_Smart_Data *sd);
 };
 

Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_window_features.cpp (157501 => 157502)


--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_window_features.cpp	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_window_features.cpp	2013-10-16 08:48:14 UTC (rev 157502)
@@ -35,7 +35,7 @@
 
 class EWK2WindowFeaturesTest : public EWK2UnitTestBase {
 public:
-    static Evas_Object* createDefaultWindow(Ewk_View_Smart_Data* smartData, const char*, const Ewk_Window_Features* windowFeatures)
+    static Evas_Object* createDefaultWindow(Ewk_View_Smart_Data* smartData, const Ewk_Window_Features* windowFeatures)
     {
         // default values of WebCore:WindowFeatures()
         // - menuBarVisible(true)
@@ -66,7 +66,7 @@
         return 0;
     }
 
-    static Evas_Object* createWindow(Ewk_View_Smart_Data *smartData, const char*, const Ewk_Window_Features *windowFeatures)
+    static Evas_Object* createWindow(Ewk_View_Smart_Data *smartData, const Ewk_Window_Features *windowFeatures)
     {
         EXPECT_FALSE(ewk_window_features_toolbar_visible_get(windowFeatures));
         EXPECT_TRUE(ewk_window_features_statusbar_visible_get(windowFeatures));

Modified: trunk/Tools/ChangeLog (157501 => 157502)


--- trunk/Tools/ChangeLog	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Tools/ChangeLog	2013-10-16 08:48:14 UTC (rev 157502)
@@ -1,3 +1,17 @@
+2013-10-16  Robert Plociennik  <[email protected]>
+
+        [EFL] Minibrowser can't load child window's location
+        https://bugs.webkit.org/show_bug.cgi?id=122485
+
+        Reviewed by Gyuyoung Kim.
+
+        * MiniBrowser/efl/main.c: Now calling window_create() without the url parameter
+            followed by an explicit call to ewk_view_url_set() where appropriate.
+        (on_key_down):
+        (on_window_create):
+        (window_create):
+        (elm_main):
+
 2013-10-15  Sergio Correia  <[email protected]>
 
         [EFL][WK2] Make SeccompFilters build again after r156349 and r156353

Modified: trunk/Tools/MiniBrowser/efl/main.c (157501 => 157502)


--- trunk/Tools/MiniBrowser/efl/main.c	2013-10-16 08:42:38 UTC (rev 157501)
+++ trunk/Tools/MiniBrowser/efl/main.c	2013-10-16 08:48:14 UTC (rev 157502)
@@ -180,7 +180,7 @@
 };
 
 static Eina_Stringshare *show_file_entry_dialog(Browser_Window *window, const char *label_tag, const char *default_text);
-static Browser_Window *window_create(Evas_Object* opener, const char *url, int width, int height, Eina_Bool view_mode);
+static Browser_Window *window_create(Evas_Object* opener, int width, int height, Eina_Bool view_mode);
 
 static Browser_Window *window_find_with_elm_window(Evas_Object *elm_window)
 {
@@ -422,14 +422,16 @@
             info("Change Pagination Mode (F7) was pressed, but NOT changed!");
     } else if (!strcmp(ev->key, "F8")) {
         info("Create souce code window (F8) was pressed.");
-        Browser_Window *window = window_create(ewk_view, ewk_view_url_get(ewk_view), 0, 0, EINA_TRUE);
+        Browser_Window *window = window_create(ewk_view, 0, 0, EINA_TRUE);
+        ewk_view_url_set(window->ewk_view, ewk_view_url_get(ewk_view));
         windows = eina_list_append(windows, window);
     } else if (!strcmp(ev->key, "F11")) {
         info("Fullscreen (F11) was pressed, toggling window/fullscreen.");
         elm_win_fullscreen_set(window->elm_window, !elm_win_fullscreen_get(window->elm_window));
     } else if (!strcmp(ev->key, "n") && ctrlPressed) {
         info("Create new window (Ctrl+n) was pressed.");
-        Browser_Window *window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE);
+        Browser_Window *window = window_create(NULL, 0, 0, EINA_FALSE);
+        ewk_view_url_set(window->ewk_view, DEFAULT_URL);
         // 0 equals default width and height.
         windows = eina_list_append(windows, window);
     } else if (!strcmp(ev->key, "i") && ctrlPressed) {
@@ -1353,7 +1355,7 @@
 }
 
 static Evas_Object *
-on_window_create(Ewk_View_Smart_Data *smartData, const char *url, const Ewk_Window_Features *window_features)
+on_window_create(Ewk_View_Smart_Data *smartData, const Ewk_Window_Features *window_features)
 {
     int x = 0;
     int y = 0;
@@ -1368,12 +1370,12 @@
     if (!height)
         height = window_height;
 
-    Browser_Window *window = window_create(smartData->self, url, width, height, EINA_FALSE);
+    Browser_Window *window = window_create(smartData->self, width, height, EINA_FALSE);
     Evas_Object *new_view = window->ewk_view;
 
     windows = eina_list_append(windows, window);
 
-    info("minibrowser: location(%d,%d) size=(%d,%d) url="" x, y, width, height, url);
+    info("minibrowser: location(%d,%d) size=(%d,%d)", x, y, width, height);
 
     return new_view;
 }
@@ -1663,7 +1665,7 @@
     return button;
 }
 
-static Browser_Window *window_create(Evas_Object *opener, const char *url, int width, int height, Eina_Bool view_mode)
+static Browser_Window *window_create(Evas_Object *opener, int width, int height, Eina_Bool view_mode)
 {
     Browser_Window *window = calloc(1, sizeof(Browser_Window));
     if (!window) {
@@ -1863,9 +1865,6 @@
     elm_box_pack_before(vertical_layout, window->ewk_view, window->search.search_bar);
     evas_object_show(window->ewk_view);
 
-    if (url && strcmp(url, "about:blank")) // Do not reset 'about:blank' as it would erase all previous document modifications.
-        ewk_view_url_set(window->ewk_view, url);
-
     evas_object_resize(window->elm_window, width ? width : window_width, height ? height : window_height);
     evas_object_show(window->elm_window);
     search_box_hide(window);
@@ -1980,10 +1979,13 @@
 
     if (args < argc) {
         char *url = ""
-        window = window_create(NULL, url, 0, 0, EINA_FALSE);
+        window = window_create(NULL, 0, 0, EINA_FALSE);
+        ewk_view_url_set(window->ewk_view, url);
         free(url);
-    } else
-        window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE);
+    } else {
+        window = window_create(NULL, 0, 0, EINA_FALSE);
+        ewk_view_url_set(window->ewk_view, DEFAULT_URL);
+    }
 
     if (!window)
         return quit(EINA_FALSE, "ERROR: could not create browser window.\n");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to