Title: [96140] trunk/Source/WebKit/efl
Revision
96140
Author
commit-qu...@webkit.org
Date
2011-09-27 12:34:35 -0700 (Tue, 27 Sep 2011)

Log Message

[EFL] Make ewk_view emit the "load,document,finished" signal.
https://bugs.webkit.org/show_bug.cgi?id=66782

Patch by Raphael Kubo da Costa <k...@profusion.mobi> on 2011-09-27
Reviewed by Antonio Gomes.

Currently, only ewk_frame emits the "load,document,finished" signal
when FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() calls
ewk_frame_load_document_finished().

However, in some cases it is not even possible to connect to the
"frame,created" signal to properly monitor the
"load,document,finished" signal, as the former is not emitted.
fast/frames/frame-unload-crash.html, for example, has a page with an
iframe inside an iframe, and this innermost iframe does not seem to be
loaded via FrameLoaderClientEfl::createFrame (which calls all the
machinery which then emits the "frame,created" signal).

We now make ewk_frame_load_document_finished() call the newly-created
ewk_view_load_document_finished() function, whose job is to emit the
"load,document,signal" with the frame as its parameter. This way, one
can just connect to the view and make sure all the signals will get
delivered.

* ewk/ewk_frame.cpp:
(ewk_frame_load_document_finished):
* ewk/ewk_private.h:
* ewk/ewk_view.cpp:
(ewk_view_load_document_finished):
* ewk/ewk_view.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (96139 => 96140)


--- trunk/Source/WebKit/efl/ChangeLog	2011-09-27 19:31:31 UTC (rev 96139)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-09-27 19:34:35 UTC (rev 96140)
@@ -1,3 +1,35 @@
+2011-09-27  Raphael Kubo da Costa  <k...@profusion.mobi>
+
+        [EFL] Make ewk_view emit the "load,document,finished" signal.
+        https://bugs.webkit.org/show_bug.cgi?id=66782
+
+        Reviewed by Antonio Gomes.
+
+        Currently, only ewk_frame emits the "load,document,finished" signal
+        when FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() calls
+        ewk_frame_load_document_finished().
+
+        However, in some cases it is not even possible to connect to the
+        "frame,created" signal to properly monitor the
+        "load,document,finished" signal, as the former is not emitted.
+        fast/frames/frame-unload-crash.html, for example, has a page with an
+        iframe inside an iframe, and this innermost iframe does not seem to be
+        loaded via FrameLoaderClientEfl::createFrame (which calls all the
+        machinery which then emits the "frame,created" signal).
+
+        We now make ewk_frame_load_document_finished() call the newly-created
+        ewk_view_load_document_finished() function, whose job is to emit the
+        "load,document,signal" with the frame as its parameter. This way, one
+        can just connect to the view and make sure all the signals will get
+        delivered.
+
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_load_document_finished):
+        * ewk/ewk_private.h:
+        * ewk/ewk_view.cpp:
+        (ewk_view_load_document_finished):
+        * ewk/ewk_view.h:
+
 2011-09-26  Raphael Kubo da Costa  <k...@profusion.mobi>
 
         [CMake] Remove FindFreetype.cmake

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (96139 => 96140)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-09-27 19:31:31 UTC (rev 96139)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-09-27 19:34:35 UTC (rev 96140)
@@ -1339,6 +1339,8 @@
 void ewk_frame_load_document_finished(Evas_Object* o)
 {
     evas_object_smart_callback_call(o, "load,document,finished", 0);
+    EWK_FRAME_SD_GET_OR_RETURN(o, sd);
+    ewk_view_load_document_finished(sd->view, o);
 }
 
 /**

Modified: trunk/Source/WebKit/efl/ewk/ewk_private.h (96139 => 96140)


--- trunk/Source/WebKit/efl/ewk/ewk_private.h	2011-09-27 19:31:31 UTC (rev 96139)
+++ trunk/Source/WebKit/efl/ewk/ewk_private.h	2011-09-27 19:34:35 UTC (rev 96140)
@@ -81,6 +81,7 @@
 void ewk_view_input_method_state_set(Evas_Object* o, Eina_Bool active);
 void ewk_view_title_set(Evas_Object* o, const char* title);
 void ewk_view_uri_changed(Evas_Object* o);
+void ewk_view_load_document_finished(Evas_Object* o, Evas_Object* frame);
 void ewk_view_load_started(Evas_Object* o);
 void ewk_view_load_provisional(Evas_Object* o);
 void ewk_view_frame_main_load_started(Evas_Object* o);

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (96139 => 96140)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2011-09-27 19:31:31 UTC (rev 96139)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2011-09-27 19:34:35 UTC (rev 96140)
@@ -2702,6 +2702,20 @@
 
 /**
  * @internal
+ * Reports that a DOM document object has finished loading for @p frame.
+ *
+ * @param o View which contains the frame.
+ * @param frame The frame whose load has triggered the event.
+ *
+ * Emits signal: "load,document,finished" with @p frame as the parameter.
+ */
+void ewk_view_load_document_finished(Evas_Object* o, Evas_Object* frame)
+{
+    evas_object_smart_callback_call(o, "load,document,finished", frame);
+}
+
+/**
+ * @internal
  * Reports the view started loading something.
  *
  * @param o View.

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.h (96139 => 96140)


--- trunk/Source/WebKit/efl/ewk/ewk_view.h	2011-09-27 19:31:31 UTC (rev 96139)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.h	2011-09-27 19:34:35 UTC (rev 96140)
@@ -44,6 +44,7 @@
  *  - "link,hover,in", const char *link[2]: reports mouse is over a link.
  *    It gives the url in link[0] and link's title in link[1] as an argument.
  *  - "link,hover,out", void: reports mouse moved out from a link.
+ *  - "load,document,finished", Evas_Object*: a DOM document object in a frame has finished loading.
  *  - "load,error", const Ewk_Frame_Load_Error*: reports load failed
  *  - "load,finished", const Ewk_Frame_Load_Error*: reports load
  *    finished and it gives @c NULL on success or pointer to
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to